From b2a2c2f88eae33ef61c32b5f2682acb8305e210d Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 31 May 2024 07:09:40 +0000 Subject: [PATCH] CodeGen from PR 28981 in Azure/azure-rest-api-specs Merge 92ae5288817d9f1a79db2eb149bb32f282bd1f2d into bc06df2282fe4d29f42dce56a930fac14ea0f6c4 --- .../CHANGELOG.md | 4 +- .../README.md | 12 +- .../SAMPLE.md | 386 ---- .../pom.xml | 31 +- .../AppComplianceAutomationManager.java | 205 +- ...ava => AppComplianceAutomationClient.java} | 68 +- .../fluent/EvidencesClient.java | 170 ++ .../fluent/OperationsClient.java | 22 +- .../fluent/ProviderActionsClient.java | 233 ++ .../fluent/ReportOperationsClient.java | 202 -- .../fluent/ReportsClient.java | 429 +++- .../fluent/ScopingConfigurationsClient.java | 131 ++ .../fluent/SnapshotOperationsClient.java | 108 - .../fluent/SnapshotsClient.java | 120 +- .../fluent/WebhooksClient.java | 165 ++ .../CheckNameAvailabilityResponseInner.java | 74 + .../fluent/models/DownloadResponseInner.java | 101 - .../EvidenceFileDownloadResponseInner.java | 47 + .../fluent/models/EvidenceResourceInner.java | 82 + .../GetCollectionCountResponseInner.java | 43 + .../GetOverviewStatusResponseInner.java | 48 + ...ListInUseStorageAccountsResponseInner.java | 49 + .../fluent/models/OperationInner.java | 53 +- .../fluent/models/ReportResourceInner.java | 23 +- .../ScopingConfigurationResourceInner.java | 82 + .../fluent/models/ScopingQuestionsInner.java | 48 + .../fluent/models/SnapshotResourceInner.java | 24 +- .../fluent/models/WebhookResourceInner.java | 82 + .../fluent/models/package-info.java | 6 +- .../fluent/package-info.java | 6 +- .../AppComplianceAutomationClientBuilder.java | 121 ++ ...=> AppComplianceAutomationClientImpl.java} | 216 +- ...eAutomationToolForMicrosoft365Builder.java | 123 -- .../CheckNameAvailabilityResponseImpl.java | 41 + .../implementation/DownloadResponseImpl.java | 61 - .../EvidenceFileDownloadResponseImpl.java | 33 + .../implementation/EvidenceResourceImpl.java | 50 + .../implementation/EvidencesClientImpl.java | 856 ++++++++ .../implementation/EvidencesImpl.java | 124 ++ .../GetCollectionCountResponseImpl.java | 32 + .../GetOverviewStatusResponseImpl.java | 40 + .../ListInUseStorageAccountsResponseImpl.java | 40 + .../implementation/OperationImpl.java | 5 +- .../implementation/OperationsClientImpl.java | 193 +- .../implementation/OperationsImpl.java | 9 +- .../ProviderActionsClientImpl.java | 879 ++++++++ .../implementation/ProviderActionsImpl.java | 149 ++ .../ReportOperationsClientImpl.java | 827 ------- .../implementation/ReportOperationsImpl.java | 104 - .../implementation/ReportResourceImpl.java | 5 +- .../implementation/ReportsClientImpl.java | 1907 +++++++++++++++-- .../implementation/ReportsImpl.java | 159 +- .../{Utils.java => ResourceManagerUtils.java} | 45 +- .../ScopingConfigurationResourceImpl.java | 50 + .../ScopingConfigurationsClientImpl.java | 645 ++++++ .../ScopingConfigurationsImpl.java | 103 + .../implementation/ScopingQuestionsImpl.java | 40 + .../SnapshotOperationsClientImpl.java | 464 ---- .../SnapshotOperationsImpl.java | 81 - .../implementation/SnapshotResourceImpl.java | 5 +- .../implementation/SnapshotsClientImpl.java | 668 ++++-- .../implementation/SnapshotsImpl.java | 58 +- .../implementation/WebhookResourceImpl.java | 50 + .../implementation/WebhooksClientImpl.java | 837 ++++++++ .../implementation/WebhooksImpl.java | 120 ++ .../models/EvidenceResourceListResult.java | 70 + .../models/PagedOperation.java} | 38 +- .../models/ReportResourceListResult.java | 69 + ...copingConfigurationResourceListResult.java | 70 + .../models/SnapshotResourceListResult.java | 70 + .../models/WebhookResourceListResult.java | 70 + .../implementation/package-info.java | 6 +- .../models/ActionType.java | 23 +- .../models/Assessment.java | 133 -- .../models/AssessmentResource.java | 84 - .../models/AssessmentSeverity.java | 41 - .../models/Category.java | 35 +- .../models/CategoryStatus.java | 41 +- .../models/CategoryType.java | 41 - .../models/CertSyncRecord.java | 136 ++ .../models/CheckNameAvailabilityReason.java | 53 + .../models/CheckNameAvailabilityRequest.java | 80 + .../models/CheckNameAvailabilityResponse.java | 41 + .../models/ComplianceReportItem.java | 225 -- .../models/ComplianceResult.java | 18 +- .../models/ComplianceState.java | 38 - .../models/ContentType.java | 48 + .../models/Control.java | 83 +- .../models/ControlFamily.java | 57 +- .../models/ControlFamilyStatus.java | 41 +- .../models/ControlFamilyType.java | 41 - .../models/ControlStatus.java | 36 +- .../models/ControlSyncRecord.java | 80 + .../models/ControlType.java | 41 - .../models/DeliveryStatus.java | 58 + .../models/DownloadResponse.java | 46 - ...adResponseComplianceDetailedPdfReport.java | 39 - .../DownloadResponseCompliancePdfReport.java | 39 - .../models/DownloadType.java | 35 +- .../models/EnableSslVerification.java | 53 + .../models/EvidenceFileDownloadRequest.java | 80 + .../models/EvidenceFileDownloadResponse.java | 27 + ...denceFileDownloadResponseEvidenceFile.java | 43 + .../models/EvidenceProperties.java | 180 ++ .../models/EvidenceResource.java | 55 + .../models/EvidenceType.java | 58 + .../models/Evidences.java | 155 ++ .../models/GetCollectionCountRequest.java | 54 + .../models/GetCollectionCountResponse.java | 27 + .../models/GetOverviewStatusRequest.java | 54 + .../models/GetOverviewStatusResponse.java | 28 + .../models/InputType.java | 133 ++ .../models/IsPass.java | 38 - .../models/IsRecommendSolution.java | 53 + .../ListInUseStorageAccountsRequest.java | 59 + .../ListInUseStorageAccountsResponse.java | 28 + .../models/NotificationEvent.java | 68 + .../models/OnboardRequest.java | 62 + .../models/Operation.java | 24 +- .../models/OperationDisplay.java | 42 +- .../models/Operations.java | 22 +- .../models/Origin.java | 27 +- .../models/OverviewStatus.java | 93 +- .../models/ProviderActions.java | 155 ++ .../models/ProvisioningState.java | 53 +- .../models/Recommendation.java | 77 + .../models/RecommendationSolution.java | 73 + .../models/ReportComplianceStatus.java | 33 +- .../models/ReportPatchProperties.java | 319 +++ .../models/ReportProperties.java | 277 ++- .../models/ReportResource.java | 18 +- .../models/ReportResourceList.java | 73 - .../models/ReportResourcePatch.java | 22 +- .../models/ReportStatus.java | 36 +- .../models/Reports.java | 241 ++- .../models/ResourceItem.java | 88 - .../models/ResourceMetadata.java | 99 +- .../models/ResourceOrigin.java | 58 + .../models/ResourceStatus.java | 28 +- .../models/Responsibility.java | 245 +++ .../models/ResponsibilityEnvironment.java | 63 + .../models/ResponsibilityResource.java | 135 ++ .../models/ResponsibilitySeverity.java | 58 + .../models/ResponsibilityStatus.java | 63 + .../models/ResponsibilityType.java | 58 + .../appcomplianceautomation/models/Rule.java | 113 + .../models/ScopingAnswer.java | 92 + .../ScopingConfigurationProperties.java | 73 + .../models/ScopingConfigurationResource.java | 56 + ...ations.java => ScopingConfigurations.java} | 96 +- .../models/ScopingQuestion.java | 119 + .../models/ScopingQuestions.java | 27 + .../models/SendAllEvents.java | 53 + .../models/SnapshotDownloadRequest.java | 31 +- .../models/SnapshotOperations.java | 64 - .../models/SnapshotProperties.java | 37 +- .../models/SnapshotResource.java | 20 +- .../models/SnapshotResourceList.java | 73 - .../models/Snapshots.java | 82 +- .../models/StatusItem.java | 58 + .../models/StorageInfo.java | 132 ++ .../models/SyncCertRecordRequest.java | 64 + .../models/TriggerEvaluationRequest.java | 63 + .../models/UpdateWebhookKey.java | 53 + .../models/WebhookKeyEnabled.java | 53 + .../models/WebhookProperties.java | 314 +++ .../models/WebhookResource.java | 55 + .../models/WebhookResourcePatch.java | 57 + .../models/WebhookStatus.java | 53 + .../models/Webhooks.java | 152 ++ .../models/package-info.java | 6 +- .../appcomplianceautomation/package-info.java | 6 +- .../src/main/java/module-info.java | 15 +- .../proxy-config.json | 1 + .../reflect-config.json | 406 ++++ .../generated/CategoryTests.java | 21 +- .../generated/CertSyncRecordTests.java | 42 + .../CheckNameAvailabilityRequestTests.java | 29 + ...eckNameAvailabilityResponseInnerTests.java | 22 + .../generated/ComplianceResultTests.java | 21 +- .../generated/ControlFamilyTests.java | 21 +- .../generated/ControlSyncRecordTests.java | 29 + .../generated/ControlTests.java | 21 +- .../EvidenceFileDownloadRequestTests.java | 29 + ...FileDownloadResponseEvidenceFileTests.java | 16 + ...videnceFileDownloadResponseInnerTests.java | 17 + .../generated/EvidencePropertiesTests.java | 39 + .../generated/EvidenceResourceInnerTests.java | 41 + .../EvidenceResourceListResultTests.java | 25 + .../GetCollectionCountRequestTests.java | 25 + .../GetCollectionCountResponseInnerTests.java | 18 + .../GetOverviewStatusRequestTests.java | 25 + .../GetOverviewStatusResponseInnerTests.java | 20 + .../ListInUseStorageAccountsRequestTests.java | 28 + ...nUseStorageAccountsResponseInnerTests.java | 22 + .../generated/OnboardRequestTests.java | 26 + .../generated/OperationDisplayTests.java | 26 +- .../generated/OperationInnerTests.java | 29 +- .../generated/OverviewStatusTests.java | 28 +- .../generated/PagedOperationTests.java | 25 + .../RecommendationSolutionTests.java | 17 + .../generated/RecommendationTests.java | 17 + .../ReportComplianceStatusTests.java | 35 +- .../generated/ReportPatchPropertiesTests.java | 76 + .../generated/ReportPropertiesTests.java | 114 +- .../generated/ReportResourceInnerTests.java | 125 +- .../ReportResourceListResultTests.java | 36 + .../generated/ReportResourcePatchTests.java | 109 +- .../generated/ResourceMetadataTests.java | 65 +- .../ResponsibilityResourceTests.java | 19 + .../generated/ResponsibilityTests.java | 21 + .../generated/ScopingAnswerTests.java | 30 + .../ScopingConfigurationPropertiesTests.java | 32 + ...copingConfigurationResourceInnerTests.java | 33 + ...gConfigurationResourceListResultTests.java | 21 + .../generated/ScopingQuestionTests.java | 17 + .../generated/ScopingQuestionsInnerTests.java | 17 + .../SnapshotDownloadRequestTests.java | 35 +- .../generated/SnapshotPropertiesTests.java | 21 +- .../generated/SnapshotResourceInnerTests.java | 21 +- .../SnapshotResourceListResultTests.java | 19 + .../generated/StatusItemTests.java | 19 + .../generated/StorageInfoTests.java | 35 + .../generated/SyncCertRecordRequestTests.java | 44 + .../TriggerEvaluationRequestTests.java | 27 + .../tsp-location.yaml | 4 + 226 files changed, 16514 insertions(+), 5519 deletions(-) rename sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/{AppComplianceAutomationToolForMicrosoft365.java => AppComplianceAutomationClient.java} (54%) create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/EvidencesClient.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/ProviderActionsClient.java delete mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/ReportOperationsClient.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/ScopingConfigurationsClient.java delete mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/SnapshotOperationsClient.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/WebhooksClient.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/CheckNameAvailabilityResponseInner.java delete mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/DownloadResponseInner.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/EvidenceFileDownloadResponseInner.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/EvidenceResourceInner.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/GetCollectionCountResponseInner.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/GetOverviewStatusResponseInner.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/ListInUseStorageAccountsResponseInner.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/ScopingConfigurationResourceInner.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/ScopingQuestionsInner.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/WebhookResourceInner.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/AppComplianceAutomationClientBuilder.java rename sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/{AppComplianceAutomationToolForMicrosoft365Impl.java => AppComplianceAutomationClientImpl.java} (67%) delete mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/AppComplianceAutomationToolForMicrosoft365Builder.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/CheckNameAvailabilityResponseImpl.java delete mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/DownloadResponseImpl.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/EvidenceFileDownloadResponseImpl.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/EvidenceResourceImpl.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/EvidencesClientImpl.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/EvidencesImpl.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/GetCollectionCountResponseImpl.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/GetOverviewStatusResponseImpl.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ListInUseStorageAccountsResponseImpl.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ProviderActionsClientImpl.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ProviderActionsImpl.java delete mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ReportOperationsClientImpl.java delete mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ReportOperationsImpl.java rename sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/{Utils.java => ResourceManagerUtils.java} (79%) create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ScopingConfigurationResourceImpl.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ScopingConfigurationsClientImpl.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ScopingConfigurationsImpl.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ScopingQuestionsImpl.java delete mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/SnapshotOperationsClientImpl.java delete mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/SnapshotOperationsImpl.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/WebhookResourceImpl.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/WebhooksClientImpl.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/WebhooksImpl.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/models/EvidenceResourceListResult.java rename sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/{models/OperationListResult.java => implementation/models/PagedOperation.java} (52%) create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/models/ReportResourceListResult.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/models/ScopingConfigurationResourceListResult.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/models/SnapshotResourceListResult.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/models/WebhookResourceListResult.java delete mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Assessment.java delete mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/AssessmentResource.java delete mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/AssessmentSeverity.java delete mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/CategoryType.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/CertSyncRecord.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/CheckNameAvailabilityReason.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/CheckNameAvailabilityRequest.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/CheckNameAvailabilityResponse.java delete mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ComplianceReportItem.java delete mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ComplianceState.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ContentType.java delete mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ControlFamilyType.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ControlSyncRecord.java delete mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ControlType.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/DeliveryStatus.java delete mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/DownloadResponse.java delete mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/DownloadResponseComplianceDetailedPdfReport.java delete mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/DownloadResponseCompliancePdfReport.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/EnableSslVerification.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/EvidenceFileDownloadRequest.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/EvidenceFileDownloadResponse.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/EvidenceFileDownloadResponseEvidenceFile.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/EvidenceProperties.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/EvidenceResource.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/EvidenceType.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Evidences.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/GetCollectionCountRequest.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/GetCollectionCountResponse.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/GetOverviewStatusRequest.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/GetOverviewStatusResponse.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/InputType.java delete mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/IsPass.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/IsRecommendSolution.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ListInUseStorageAccountsRequest.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ListInUseStorageAccountsResponse.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/NotificationEvent.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/OnboardRequest.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ProviderActions.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Recommendation.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/RecommendationSolution.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ReportPatchProperties.java delete mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ReportResourceList.java delete mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ResourceItem.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ResourceOrigin.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Responsibility.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ResponsibilityEnvironment.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ResponsibilityResource.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ResponsibilitySeverity.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ResponsibilityStatus.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ResponsibilityType.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Rule.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ScopingAnswer.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ScopingConfigurationProperties.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ScopingConfigurationResource.java rename sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/{ReportOperations.java => ScopingConfigurations.java} (50%) create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ScopingQuestion.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ScopingQuestions.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/SendAllEvents.java delete mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/SnapshotOperations.java delete mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/SnapshotResourceList.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/StatusItem.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/StorageInfo.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/SyncCertRecordRequest.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/TriggerEvaluationRequest.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/UpdateWebhookKey.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/WebhookKeyEnabled.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/WebhookProperties.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/WebhookResource.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/WebhookResourcePatch.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/WebhookStatus.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Webhooks.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-appcomplianceautomation/proxy-config.json create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-appcomplianceautomation/reflect-config.json create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/CertSyncRecordTests.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/CheckNameAvailabilityRequestTests.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/CheckNameAvailabilityResponseInnerTests.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ControlSyncRecordTests.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/EvidenceFileDownloadRequestTests.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/EvidenceFileDownloadResponseEvidenceFileTests.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/EvidenceFileDownloadResponseInnerTests.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/EvidencePropertiesTests.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/EvidenceResourceInnerTests.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/EvidenceResourceListResultTests.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/GetCollectionCountRequestTests.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/GetCollectionCountResponseInnerTests.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/GetOverviewStatusRequestTests.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/GetOverviewStatusResponseInnerTests.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ListInUseStorageAccountsRequestTests.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ListInUseStorageAccountsResponseInnerTests.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/OnboardRequestTests.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/PagedOperationTests.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/RecommendationSolutionTests.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/RecommendationTests.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ReportPatchPropertiesTests.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ReportResourceListResultTests.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ResponsibilityResourceTests.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ResponsibilityTests.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ScopingAnswerTests.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ScopingConfigurationPropertiesTests.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ScopingConfigurationResourceInnerTests.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ScopingConfigurationResourceListResultTests.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ScopingQuestionTests.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ScopingQuestionsInnerTests.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/SnapshotResourceListResultTests.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/StatusItemTests.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/StorageInfoTests.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/SyncCertRecordRequestTests.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/TriggerEvaluationRequestTests.java create mode 100644 sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/tsp-location.yaml diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/CHANGELOG.md b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/CHANGELOG.md index c712d5eedaa04..318a90dd99f11 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/CHANGELOG.md +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0-beta.1 (2024-05-31) + +- Azure Resource Manager App Compliance Automation client library for Java. This package contains Microsoft Azure SDK for App Compliance Automation Management SDK. App Compliance Automation Tool for Microsoft 365 API spec. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/README.md b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/README.md index 8d59339fe5039..87c024bf89913 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/README.md +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/README.md @@ -1,8 +1,8 @@ -# Azure Resource Manager AppComplianceAutomation client library for Java +# Azure Resource Manager App Compliance Automation client library for Java -Azure Resource Manager AppComplianceAutomation client library for Java. +Azure Resource Manager App Compliance Automation client library for Java. -This package contains Microsoft Azure SDK for AppComplianceAutomation Management SDK. App Compliance Automation Tool for Microsoft 365 API spec. Package tag package-2022-11-16-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for App Compliance Automation Management SDK. App Compliance Automation Tool for Microsoft 365 API spec. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -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%2Fappcomplianceautomation%2Fazure-resourcemanager-appcomplianceautomation%2FREADME.png) diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/SAMPLE.md b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/SAMPLE.md index 6d4a07f30ebcb..77e24ff3efbda 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/SAMPLE.md +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/SAMPLE.md @@ -1,388 +1,2 @@ # Code snippets and samples - -## Operations - -- [List](#operations_list) - -## ReportOperation - -- [CreateOrUpdate](#reportoperation_createorupdate) -- [Delete](#reportoperation_delete) -- [Get](#reportoperation_get) -- [Update](#reportoperation_update) - -## Reports - -- [List](#reports_list) - -## SnapshotOperation - -- [Download](#snapshotoperation_download) -- [Get](#snapshotoperation_get) - -## Snapshots - -- [List](#snapshots_list) -### Operations_List - -```java -import com.azure.core.util.Context; - -/** Samples for Operations List. */ -public final class OperationsListSamples { - /* - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/preview/2022-11-16-preview/examples/Operations_List.json - */ - /** - * Sample code: Operations_List. - * - * @param manager Entry point to AppComplianceAutomationManager. - */ - public static void operationsList( - com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager manager) { - manager.operations().list(Context.NONE); - } -} -``` - -### ReportOperation_CreateOrUpdate - -```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcomplianceautomation.fluent.models.ReportResourceInner; -import com.azure.resourcemanager.appcomplianceautomation.models.ReportProperties; -import com.azure.resourcemanager.appcomplianceautomation.models.ResourceMetadata; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** Samples for ReportOperation CreateOrUpdate. */ -public final class ReportOperationCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/preview/2022-11-16-preview/examples/Report_CreateOrUpdate.json - */ - /** - * Sample code: Report_CreateOrUpdate. - * - * @param manager Entry point to AppComplianceAutomationManager. - */ - public static void reportCreateOrUpdate( - com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager manager) { - manager - .reportOperations() - .createOrUpdate( - "testReportName", - new ReportResourceInner() - .withProperties( - new ReportProperties() - .withOfferGuid("0000") - .withTimeZone("GMT Standard Time") - .withTriggerTime(OffsetDateTime.parse("2022-03-04T05:11:56.197Z")) - .withResources( - Arrays - .asList( - new ResourceMetadata() - .withResourceId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint") - .withTags(mapOf("key1", "value1"))))), - Context.NONE); - } - - @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; - } -} -``` - -### ReportOperation_Delete - -```java -import com.azure.core.util.Context; - -/** Samples for ReportOperation Delete. */ -public final class ReportOperationDeleteSamples { - /* - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/preview/2022-11-16-preview/examples/Report_Delete.json - */ - /** - * Sample code: Report_Delete. - * - * @param manager Entry point to AppComplianceAutomationManager. - */ - public static void reportDelete( - com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager manager) { - manager.reportOperations().delete("testReportName", Context.NONE); - } -} -``` - -### ReportOperation_Get - -```java -import com.azure.core.util.Context; - -/** Samples for ReportOperation Get. */ -public final class ReportOperationGetSamples { - /* - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/preview/2022-11-16-preview/examples/Report_Get.json - */ - /** - * Sample code: Report_Get. - * - * @param manager Entry point to AppComplianceAutomationManager. - */ - public static void reportGet( - com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager manager) { - manager.reportOperations().getWithResponse("testReport", Context.NONE); - } -} -``` - -### ReportOperation_Update - -```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcomplianceautomation.models.ReportProperties; -import com.azure.resourcemanager.appcomplianceautomation.models.ReportResourcePatch; -import com.azure.resourcemanager.appcomplianceautomation.models.ResourceMetadata; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** Samples for ReportOperation Update. */ -public final class ReportOperationUpdateSamples { - /* - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/preview/2022-11-16-preview/examples/Report_Update.json - */ - /** - * Sample code: Report_Update. - * - * @param manager Entry point to AppComplianceAutomationManager. - */ - public static void reportUpdate( - com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager manager) { - manager - .reportOperations() - .update( - "testReportName", - new ReportResourcePatch() - .withProperties( - new ReportProperties() - .withOfferGuid("0000") - .withTimeZone("GMT Standard Time") - .withTriggerTime(OffsetDateTime.parse("2022-03-04T05:11:56.197Z")) - .withResources( - Arrays - .asList( - new ResourceMetadata() - .withResourceId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint") - .withTags(mapOf("key1", "value1"))))), - Context.NONE); - } - - @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; - } -} -``` - -### Reports_List - -```java -import com.azure.core.util.Context; - -/** Samples for Reports List. */ -public final class ReportsListSamples { - /* - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/preview/2022-11-16-preview/examples/Reports_List.json - */ - /** - * Sample code: Reports_List. - * - * @param manager Entry point to AppComplianceAutomationManager. - */ - public static void reportsList( - com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager manager) { - manager - .reports() - .list( - "1", - 100, - null, - "00000000-0000-0000-0000-000000000000", - "00000000-0000-0000-0000-000000000000", - Context.NONE); - } -} -``` - -### SnapshotOperation_Download - -```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcomplianceautomation.models.DownloadType; -import com.azure.resourcemanager.appcomplianceautomation.models.SnapshotDownloadRequest; - -/** Samples for SnapshotOperation Download. */ -public final class SnapshotOperationDownloadSamples { - /* - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/preview/2022-11-16-preview/examples/Snapshot_ComplianceReport_Download.json - */ - /** - * Sample code: Snapshot_Download_ComplianceReport. - * - * @param manager Entry point to AppComplianceAutomationManager. - */ - public static void snapshotDownloadComplianceReport( - com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager manager) { - manager - .snapshotOperations() - .download( - "testReportName", - "testSnapshotName", - new SnapshotDownloadRequest() - .withReportCreatorTenantId("00000000-0000-0000-0000-000000000000") - .withDownloadType(DownloadType.COMPLIANCE_REPORT) - .withOfferGuid("00000000-0000-0000-0000-000000000000"), - Context.NONE); - } - - /* - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/preview/2022-11-16-preview/examples/Snapshot_ResourceList_Download.json - */ - /** - * Sample code: Snapshot_Download_ResourceList. - * - * @param manager Entry point to AppComplianceAutomationManager. - */ - public static void snapshotDownloadResourceList( - com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager manager) { - manager - .snapshotOperations() - .download( - "testReportName", - "testSnapshotName", - new SnapshotDownloadRequest() - .withReportCreatorTenantId("00000000-0000-0000-0000-000000000000") - .withDownloadType(DownloadType.RESOURCE_LIST) - .withOfferGuid("00000000-0000-0000-0000-000000000000"), - Context.NONE); - } - - /* - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/preview/2022-11-16-preview/examples/Snapshot_ComplianceDetailedPdfReport_Download.json - */ - /** - * Sample code: Snapshot_Download_ComplianceDetailedPdfReport. - * - * @param manager Entry point to AppComplianceAutomationManager. - */ - public static void snapshotDownloadComplianceDetailedPdfReport( - com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager manager) { - manager - .snapshotOperations() - .download( - "testReportName", - "testSnapshotName", - new SnapshotDownloadRequest() - .withReportCreatorTenantId("00000000-0000-0000-0000-000000000000") - .withDownloadType(DownloadType.COMPLIANCE_DETAILED_PDF_REPORT) - .withOfferGuid("00000000-0000-0000-0000-000000000000"), - Context.NONE); - } - - /* - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/preview/2022-11-16-preview/examples/Snapshot_CompliancePdfReport_Download.json - */ - /** - * Sample code: Snapshot_Download_CompliancePdfReport. - * - * @param manager Entry point to AppComplianceAutomationManager. - */ - public static void snapshotDownloadCompliancePdfReport( - com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager manager) { - manager - .snapshotOperations() - .download( - "testReportName", - "testSnapshotName", - new SnapshotDownloadRequest() - .withReportCreatorTenantId("00000000-0000-0000-0000-000000000000") - .withDownloadType(DownloadType.COMPLIANCE_PDF_REPORT) - .withOfferGuid("00000000-0000-0000-0000-000000000000"), - Context.NONE); - } -} -``` - -### SnapshotOperation_Get - -```java -import com.azure.core.util.Context; - -/** Samples for SnapshotOperation Get. */ -public final class SnapshotOperationGetSamples { - /* - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/preview/2022-11-16-preview/examples/Snapshot_Get.json - */ - /** - * Sample code: Snapshot_Get. - * - * @param manager Entry point to AppComplianceAutomationManager. - */ - public static void snapshotGet( - com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager manager) { - manager.snapshotOperations().getWithResponse("testReportName", "testSnapshot", Context.NONE); - } -} -``` - -### Snapshots_List - -```java -import com.azure.core.util.Context; - -/** Samples for Snapshots List. */ -public final class SnapshotsListSamples { - /* - * x-ms-original-file: specification/appcomplianceautomation/resource-manager/Microsoft.AppComplianceAutomation/preview/2022-11-16-preview/examples/Snapshots_List.json - */ - /** - * Sample code: Snapshots_List. - * - * @param manager Entry point to AppComplianceAutomationManager. - */ - public static void snapshotsList( - com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager manager) { - manager - .snapshots() - .list( - "testReportName", - "1", - 100, - null, - "00000000-0000-0000-0000-000000000000", - "00000000-0000-0000-0000-000000000000", - Context.NONE); - } -} -``` - diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/pom.xml b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/pom.xml index c8a569741eeee..1cd11e9565a75 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/pom.xml +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/pom.xml @@ -1,3 +1,8 @@ + 4.0.0 @@ -9,11 +14,11 @@ com.azure.resourcemanager azure-resourcemanager-appcomplianceautomation - 1.0.0-beta.2 + 1.0.0-beta.1 jar - Microsoft Azure SDK for AppComplianceAutomation Management - This package contains Microsoft Azure SDK for AppComplianceAutomation Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. App Compliance Automation Tool for Microsoft 365 API spec. Package tag package-2022-11-16-preview. + Microsoft Azure SDK for App Compliance Automation Management + This package contains Microsoft Azure SDK for App Compliance Automation Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. App Compliance Automation Tool for Microsoft 365 API spec. https://github.com/Azure/azure-sdk-for-java @@ -38,7 +43,9 @@ UTF-8 - true + 0 + 0 + true @@ -54,7 +61,7 @@ com.azure azure-core-test - 1.26.0-beta.1 + 1.25.0 test @@ -75,14 +82,18 @@ 5.9.3 test + + org.slf4j + slf4j-simple + 1.7.36 + test + org.mockito mockito-core 4.11.0 test - - net.bytebuddy byte-buddy @@ -95,11 +106,5 @@ 1.14.12 test - - org.slf4j - slf4j-simple - 1.7.36 - test - diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/AppComplianceAutomationManager.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/AppComplianceAutomationManager.java index b6e68c2627c68..77dab9f9fd911 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/AppComplianceAutomationManager.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/AppComplianceAutomationManager.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation; @@ -11,8 +11,8 @@ import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; import com.azure.core.http.policy.AddHeadersFromContextPolicy; -import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpPipelinePolicy; import com.azure.core.http.policy.HttpPolicyProviders; import com.azure.core.http.policy.RequestIdPolicy; @@ -23,18 +23,22 @@ import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.appcomplianceautomation.fluent.AppComplianceAutomationToolForMicrosoft365; -import com.azure.resourcemanager.appcomplianceautomation.implementation.AppComplianceAutomationToolForMicrosoft365Builder; +import com.azure.resourcemanager.appcomplianceautomation.fluent.AppComplianceAutomationClient; +import com.azure.resourcemanager.appcomplianceautomation.implementation.AppComplianceAutomationClientBuilder; +import com.azure.resourcemanager.appcomplianceautomation.implementation.EvidencesImpl; import com.azure.resourcemanager.appcomplianceautomation.implementation.OperationsImpl; -import com.azure.resourcemanager.appcomplianceautomation.implementation.ReportOperationsImpl; +import com.azure.resourcemanager.appcomplianceautomation.implementation.ProviderActionsImpl; import com.azure.resourcemanager.appcomplianceautomation.implementation.ReportsImpl; -import com.azure.resourcemanager.appcomplianceautomation.implementation.SnapshotOperationsImpl; +import com.azure.resourcemanager.appcomplianceautomation.implementation.ScopingConfigurationsImpl; import com.azure.resourcemanager.appcomplianceautomation.implementation.SnapshotsImpl; +import com.azure.resourcemanager.appcomplianceautomation.implementation.WebhooksImpl; +import com.azure.resourcemanager.appcomplianceautomation.models.Evidences; import com.azure.resourcemanager.appcomplianceautomation.models.Operations; -import com.azure.resourcemanager.appcomplianceautomation.models.ReportOperations; +import com.azure.resourcemanager.appcomplianceautomation.models.ProviderActions; import com.azure.resourcemanager.appcomplianceautomation.models.Reports; -import com.azure.resourcemanager.appcomplianceautomation.models.SnapshotOperations; +import com.azure.resourcemanager.appcomplianceautomation.models.ScopingConfigurations; import com.azure.resourcemanager.appcomplianceautomation.models.Snapshots; +import com.azure.resourcemanager.appcomplianceautomation.models.Webhooks; import java.time.Duration; import java.time.temporal.ChronoUnit; import java.util.ArrayList; @@ -42,38 +46,43 @@ import java.util.Objects; import java.util.stream.Collectors; -/** Entry point to AppComplianceAutomationManager. App Compliance Automation Tool for Microsoft 365 API spec. */ +/** + * Entry point to AppComplianceAutomationManager. + * App Compliance Automation Tool for Microsoft 365 API spec. + */ public final class AppComplianceAutomationManager { - private Operations operations; - private Reports reports; - private ReportOperations reportOperations; + private Webhooks webhooks; private Snapshots snapshots; - private SnapshotOperations snapshotOperations; + private ScopingConfigurations scopingConfigurations; + + private Evidences evidences; - private final AppComplianceAutomationToolForMicrosoft365 clientObject; + private Operations operations; - private AppComplianceAutomationManager( - HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { + private ProviderActions providerActions; + + private final AppComplianceAutomationClient clientObject; + + private AppComplianceAutomationManager(HttpPipeline httpPipeline, AzureProfile profile, + Duration defaultPollInterval) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = - new AppComplianceAutomationToolForMicrosoft365Builder() - .pipeline(httpPipeline) - .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) - .defaultPollInterval(defaultPollInterval) - .buildClient(); + this.clientObject = new AppComplianceAutomationClientBuilder().pipeline(httpPipeline) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) + .defaultPollInterval(defaultPollInterval) + .buildClient(); } /** - * Creates an instance of AppComplianceAutomation service API entry point. - * + * Creates an instance of App Compliance Automation service API entry point. + * * @param credential the credential to use. * @param profile the Azure profile for client. - * @return the AppComplianceAutomation service API instance. + * @return the App Compliance Automation service API instance. */ public static AppComplianceAutomationManager authenticate(TokenCredential credential, AzureProfile profile) { Objects.requireNonNull(credential, "'credential' cannot be null."); @@ -82,11 +91,11 @@ public static AppComplianceAutomationManager authenticate(TokenCredential creden } /** - * Creates an instance of AppComplianceAutomation service API entry point. - * + * Creates an instance of App Compliance Automation service API entry point. + * * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. * @param profile the Azure profile for client. - * @return the AppComplianceAutomation service API instance. + * @return the App Compliance Automation service API instance. */ public static AppComplianceAutomationManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); @@ -97,14 +106,16 @@ public static AppComplianceAutomationManager authenticate(HttpPipeline httpPipel /** * Gets a Configurable instance that can be used to create AppComplianceAutomationManager with optional * configuration. - * + * * @return the Configurable instance allowing configurations. */ public static Configurable configure() { return new AppComplianceAutomationManager.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); @@ -176,8 +187,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. @@ -194,8 +205,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")); @@ -204,26 +215,24 @@ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { } /** - * Creates an instance of AppComplianceAutomation service API entry point. + * Creates an instance of App Compliance Automation service API entry point. * * @param credential the credential to use. * @param profile the Azure profile for client. - * @return the AppComplianceAutomation service API instance. + * @return the App Compliance Automation service API instance. */ public AppComplianceAutomationManager authenticate(TokenCredential credential, AzureProfile profile) { Objects.requireNonNull(credential, "'credential' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); StringBuilder userAgentBuilder = new StringBuilder(); - userAgentBuilder - .append("azsdk-java") + userAgentBuilder.append("azsdk-java") .append("-") .append("com.azure.resourcemanager.appcomplianceautomation") .append("/") .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { - userAgentBuilder - .append(" (") + userAgentBuilder.append(" (") .append(Configuration.getGlobalConfiguration().get("java.version")) .append("; ") .append(Configuration.getGlobalConfiguration().get("os.name")) @@ -248,50 +257,28 @@ public AppComplianceAutomationManager authenticate(TokenCredential credential, A 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 AppComplianceAutomationManager(httpPipeline, profile, defaultPollInterval); } } - /** - * Gets the resource collection API of Operations. - * - * @return Resource collection API of Operations. - */ - public Operations operations() { - if (this.operations == null) { - this.operations = new OperationsImpl(clientObject.getOperations(), this); - } - return operations; - } - /** * Gets the resource collection API of Reports. - * + * * @return Resource collection API of Reports. */ public Reports reports() { @@ -302,20 +289,20 @@ public Reports reports() { } /** - * Gets the resource collection API of ReportOperations. - * - * @return Resource collection API of ReportOperations. + * Gets the resource collection API of Webhooks. + * + * @return Resource collection API of Webhooks. */ - public ReportOperations reportOperations() { - if (this.reportOperations == null) { - this.reportOperations = new ReportOperationsImpl(clientObject.getReportOperations(), this); + public Webhooks webhooks() { + if (this.webhooks == null) { + this.webhooks = new WebhooksImpl(clientObject.getWebhooks(), this); } - return reportOperations; + return webhooks; } /** * Gets the resource collection API of Snapshots. - * + * * @return Resource collection API of Snapshots. */ public Snapshots snapshots() { @@ -326,22 +313,60 @@ public Snapshots snapshots() { } /** - * Gets the resource collection API of SnapshotOperations. - * - * @return Resource collection API of SnapshotOperations. + * Gets the resource collection API of ScopingConfigurations. + * + * @return Resource collection API of ScopingConfigurations. + */ + public ScopingConfigurations scopingConfigurations() { + if (this.scopingConfigurations == null) { + this.scopingConfigurations = new ScopingConfigurationsImpl(clientObject.getScopingConfigurations(), this); + } + return scopingConfigurations; + } + + /** + * Gets the resource collection API of Evidences. + * + * @return Resource collection API of Evidences. + */ + public Evidences evidences() { + if (this.evidences == null) { + this.evidences = new EvidencesImpl(clientObject.getEvidences(), this); + } + return evidences; + } + + /** + * Gets the resource collection API of Operations. + * + * @return Resource collection API of Operations. + */ + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(clientObject.getOperations(), this); + } + return operations; + } + + /** + * Gets the resource collection API of ProviderActions. + * + * @return Resource collection API of ProviderActions. */ - public SnapshotOperations snapshotOperations() { - if (this.snapshotOperations == null) { - this.snapshotOperations = new SnapshotOperationsImpl(clientObject.getSnapshotOperations(), this); + public ProviderActions providerActions() { + if (this.providerActions == null) { + this.providerActions = new ProviderActionsImpl(clientObject.getProviderActions(), this); } - return snapshotOperations; + return providerActions; } /** - * @return Wrapped service client AppComplianceAutomationToolForMicrosoft365 providing direct access to the - * underlying auto-generated API implementation, based on Azure REST API. + * Gets wrapped service client AppComplianceAutomationClient providing direct access to the underlying + * auto-generated API implementation, based on Azure REST API. + * + * @return Wrapped service client AppComplianceAutomationClient. */ - public AppComplianceAutomationToolForMicrosoft365 serviceClient() { + public AppComplianceAutomationClient serviceClient() { return this.clientObject; } } diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/AppComplianceAutomationToolForMicrosoft365.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/AppComplianceAutomationClient.java similarity index 54% rename from sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/AppComplianceAutomationToolForMicrosoft365.java rename to sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/AppComplianceAutomationClient.java index 8600c599aa035..f7d9632160c95 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/AppComplianceAutomationToolForMicrosoft365.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/AppComplianceAutomationClient.java @@ -1,74 +1,90 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.fluent; import com.azure.core.http.HttpPipeline; import java.time.Duration; -/** The interface for AppComplianceAutomationToolForMicrosoft365 class. */ -public interface AppComplianceAutomationToolForMicrosoft365 { +/** + * The interface for AppComplianceAutomationClient class. + */ +public interface AppComplianceAutomationClient { /** - * Gets server parameter. - * + * Gets Server parameter. + * * @return the endpoint value. */ String getEndpoint(); /** - * Gets Api Version. - * + * Gets Version parameter. + * * @return the apiVersion value. */ String getApiVersion(); /** * 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 OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - OperationsClient getOperations(); - /** * Gets the ReportsClient object to access its operations. - * + * * @return the ReportsClient object. */ ReportsClient getReports(); /** - * Gets the ReportOperationsClient object to access its operations. - * - * @return the ReportOperationsClient object. + * Gets the WebhooksClient object to access its operations. + * + * @return the WebhooksClient object. */ - ReportOperationsClient getReportOperations(); + WebhooksClient getWebhooks(); /** * Gets the SnapshotsClient object to access its operations. - * + * * @return the SnapshotsClient object. */ SnapshotsClient getSnapshots(); /** - * Gets the SnapshotOperationsClient object to access its operations. - * - * @return the SnapshotOperationsClient object. + * Gets the ScopingConfigurationsClient object to access its operations. + * + * @return the ScopingConfigurationsClient object. + */ + ScopingConfigurationsClient getScopingConfigurations(); + + /** + * Gets the EvidencesClient object to access its operations. + * + * @return the EvidencesClient object. + */ + EvidencesClient getEvidences(); + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + OperationsClient getOperations(); + + /** + * Gets the ProviderActionsClient object to access its operations. + * + * @return the ProviderActionsClient object. */ - SnapshotOperationsClient getSnapshotOperations(); + ProviderActionsClient getProviderActions(); } diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/EvidencesClient.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/EvidencesClient.java new file mode 100644 index 0000000000000..8f4858f7b21f7 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/EvidencesClient.java @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.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.appcomplianceautomation.fluent.models.EvidenceFileDownloadResponseInner; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.EvidenceResourceInner; +import com.azure.resourcemanager.appcomplianceautomation.models.EvidenceFileDownloadRequest; + +/** + * An instance of this class provides access to all the operations defined in EvidencesClient. + */ +public interface EvidencesClient { + /** + * Get the evidence metadata. + * + * @param reportName Report Name. + * @param evidenceName The evidence 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 evidence metadata along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String reportName, String evidenceName, Context context); + + /** + * Get the evidence metadata. + * + * @param reportName Report Name. + * @param evidenceName The evidence 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 evidence metadata. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EvidenceResourceInner get(String reportName, String evidenceName); + + /** + * Create or Update an evidence a specified report. + * + * @param reportName Report Name. + * @param evidenceName The evidence name. + * @param parameters Parameters for the create or update operation. + * @param offerGuid The offerGuid which mapping to the reports. + * @param reportCreatorTenantId The tenant id of the report creator. + * @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 class represent an AppComplianceAutomation evidence resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse(String reportName, String evidenceName, + EvidenceResourceInner parameters, String offerGuid, String reportCreatorTenantId, Context context); + + /** + * Create or Update an evidence a specified report. + * + * @param reportName Report Name. + * @param evidenceName The evidence name. + * @param parameters Parameters for the create or update 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 class represent an AppComplianceAutomation evidence resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EvidenceResourceInner createOrUpdate(String reportName, String evidenceName, EvidenceResourceInner parameters); + + /** + * Delete an existent evidence from a specified report. + * + * @param reportName Report Name. + * @param evidenceName The evidence 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 reportName, String evidenceName, Context context); + + /** + * Delete an existent evidence from a specified report. + * + * @param reportName Report Name. + * @param evidenceName The evidence 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 reportName, String evidenceName); + + /** + * Returns a paginated list of evidences for a specified report. + * + * @param reportName Report 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 response of a EvidenceResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByReportResource(String reportName); + + /** + * Returns a paginated list of evidences for a specified report. + * + * @param reportName Report Name. + * @param skipToken Skip over when retrieving results. + * @param top Number of elements to return when retrieving results. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. + * ?$select=reportName,id. + * @param filter The filter to apply on the operation. + * @param orderby OData order by query option. + * @param offerGuid The offerGuid which mapping to the reports. + * @param reportCreatorTenantId The tenant id of the report creator. + * @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 response of a EvidenceResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByReportResource(String reportName, String skipToken, Integer top, + String select, String filter, String orderby, String offerGuid, String reportCreatorTenantId, Context context); + + /** + * Download evidence file. + * + * @param reportName Report Name. + * @param evidenceName The evidence name. + * @param body Parameters for the query operation. + * @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 object that includes all the possible response for the evidence file download operation along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response downloadWithResponse(String reportName, String evidenceName, + EvidenceFileDownloadRequest body, Context context); + + /** + * Download evidence file. + * + * @param reportName Report Name. + * @param evidenceName The evidence name. + * @param body Parameters for the query 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 object that includes all the possible response for the evidence file download operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EvidenceFileDownloadResponseInner download(String reportName, String evidenceName, + EvidenceFileDownloadRequest body); +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/OperationsClient.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/OperationsClient.java index e98780d176ffd..2c7c6c0d1ed30 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/OperationsClient.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/OperationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.fluent; @@ -10,28 +10,30 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.appcomplianceautomation.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 { /** - * Lists all of the available REST API operations of the Microsoft.AppComplianceAutomation provider. - * + * List the operations for the provider. + * * @throws com.azure.core.management.exception.ManagementException 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 REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * Lists all of the available REST API operations of the Microsoft.AppComplianceAutomation provider. - * + * List the operations for the provider. + * * @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 REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/ProviderActionsClient.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/ProviderActionsClient.java new file mode 100644 index 0000000000000..9e35a3cb12d2d --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/ProviderActionsClient.java @@ -0,0 +1,233 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.CheckNameAvailabilityResponseInner; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.GetCollectionCountResponseInner; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.GetOverviewStatusResponseInner; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.ListInUseStorageAccountsResponseInner; +import com.azure.resourcemanager.appcomplianceautomation.models.CheckNameAvailabilityRequest; +import com.azure.resourcemanager.appcomplianceautomation.models.GetCollectionCountRequest; +import com.azure.resourcemanager.appcomplianceautomation.models.GetOverviewStatusRequest; +import com.azure.resourcemanager.appcomplianceautomation.models.ListInUseStorageAccountsRequest; +import com.azure.resourcemanager.appcomplianceautomation.models.OnboardRequest; +import com.azure.resourcemanager.appcomplianceautomation.models.TriggerEvaluationRequest; + +/** + * An instance of this class provides access to all the operations defined in ProviderActionsClient. + */ +public interface ProviderActionsClient { + /** + * Check if the given name is available for a report. + * + * @param body The content of the action request. + * @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 check availability result along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response checkNameAvailabilityWithResponse(CheckNameAvailabilityRequest body, + Context context); + + /** + * Check if the given name is available for a report. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 check availability result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CheckNameAvailabilityResponseInner checkNameAvailability(CheckNameAvailabilityRequest body); + + /** + * Get the count of reports. + * + * @param body The content of the action request. + * @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 count of reports along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getCollectionCountWithResponse(GetCollectionCountRequest body, + Context context); + + /** + * Get the count of reports. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 count of reports. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + GetCollectionCountResponseInner getCollectionCount(GetCollectionCountRequest body); + + /** + * Get the resource overview status. + * + * @param body The content of the action request. + * @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 overview status along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getOverviewStatusWithResponse(GetOverviewStatusRequest body, + Context context); + + /** + * Get the resource overview status. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 overview status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + GetOverviewStatusResponseInner getOverviewStatus(GetOverviewStatusRequest body); + + /** + * Onboard given subscriptions to Microsoft.AppComplianceAutomation provider. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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, ManagementError> beginOnboard(OnboardRequest body); + + /** + * Onboard given subscriptions to Microsoft.AppComplianceAutomation provider. + * + * @param body The content of the action request. + * @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, ManagementError> beginOnboard(OnboardRequest body, Context context); + + /** + * Onboard given subscriptions to Microsoft.AppComplianceAutomation provider. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagementError onboard(OnboardRequest body); + + /** + * Onboard given subscriptions to Microsoft.AppComplianceAutomation provider. + * + * @param body The content of the action request. + * @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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagementError onboard(OnboardRequest body, Context context); + + /** + * Trigger quick evaluation for the given subscriptions. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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, ManagementError> beginTriggerEvaluation(TriggerEvaluationRequest body); + + /** + * Trigger quick evaluation for the given subscriptions. + * + * @param body The content of the action request. + * @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, ManagementError> beginTriggerEvaluation(TriggerEvaluationRequest body, + Context context); + + /** + * Trigger quick evaluation for the given subscriptions. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagementError triggerEvaluation(TriggerEvaluationRequest body); + + /** + * Trigger quick evaluation for the given subscriptions. + * + * @param body The content of the action request. + * @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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagementError triggerEvaluation(TriggerEvaluationRequest body, Context context); + + /** + * List the storage accounts which are in use by related reports. + * + * @param body The content of the action request. + * @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 parameters for listing in use storage accounts operation along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response + listInUseStorageAccountsWithResponse(ListInUseStorageAccountsRequest body, Context context); + + /** + * List the storage accounts which are in use by related reports. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return parameters for listing in use storage accounts operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ListInUseStorageAccountsResponseInner listInUseStorageAccounts(ListInUseStorageAccountsRequest body); +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/ReportOperationsClient.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/ReportOperationsClient.java deleted file mode 100644 index c9300b3058b22..0000000000000 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/ReportOperationsClient.java +++ /dev/null @@ -1,202 +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.appcomplianceautomation.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -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.appcomplianceautomation.fluent.models.ReportResourceInner; -import com.azure.resourcemanager.appcomplianceautomation.models.ReportResourcePatch; - -/** An instance of this class provides access to all the operations defined in ReportOperationsClient. */ -public interface ReportOperationsClient { - /** - * Get the AppComplianceAutomation report and its properties. - * - * @param reportName Report 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 AppComplianceAutomation report and its properties along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String reportName, Context context); - - /** - * Get the AppComplianceAutomation report and its properties. - * - * @param reportName Report 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 AppComplianceAutomation report and its properties. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReportResourceInner get(String reportName); - - /** - * Create a new AppComplianceAutomation report or update an exiting AppComplianceAutomation report. - * - * @param reportName Report Name. - * @param parameters Parameters for the create or update 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 a class represent an AppComplianceAutomation report resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReportResourceInner> beginCreateOrUpdate( - String reportName, ReportResourceInner parameters); - - /** - * Create a new AppComplianceAutomation report or update an exiting AppComplianceAutomation report. - * - * @param reportName Report Name. - * @param parameters Parameters for the create or update operation. - * @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 a class represent an AppComplianceAutomation report resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReportResourceInner> beginCreateOrUpdate( - String reportName, ReportResourceInner parameters, Context context); - - /** - * Create a new AppComplianceAutomation report or update an exiting AppComplianceAutomation report. - * - * @param reportName Report Name. - * @param parameters Parameters for the create or update 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 class represent an AppComplianceAutomation report resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReportResourceInner createOrUpdate(String reportName, ReportResourceInner parameters); - - /** - * Create a new AppComplianceAutomation report or update an exiting AppComplianceAutomation report. - * - * @param reportName Report Name. - * @param parameters Parameters for the create or update operation. - * @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 class represent an AppComplianceAutomation report resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReportResourceInner createOrUpdate(String reportName, ReportResourceInner parameters, Context context); - - /** - * Update an exiting AppComplianceAutomation report. - * - * @param reportName Report Name. - * @param parameters Parameters for the create or update 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 a class represent an AppComplianceAutomation report resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReportResourceInner> beginUpdate( - String reportName, ReportResourcePatch parameters); - - /** - * Update an exiting AppComplianceAutomation report. - * - * @param reportName Report Name. - * @param parameters Parameters for the create or update operation. - * @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 a class represent an AppComplianceAutomation report resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReportResourceInner> beginUpdate( - String reportName, ReportResourcePatch parameters, Context context); - - /** - * Update an exiting AppComplianceAutomation report. - * - * @param reportName Report Name. - * @param parameters Parameters for the create or update 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 class represent an AppComplianceAutomation report resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReportResourceInner update(String reportName, ReportResourcePatch parameters); - - /** - * Update an exiting AppComplianceAutomation report. - * - * @param reportName Report Name. - * @param parameters Parameters for the create or update operation. - * @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 class represent an AppComplianceAutomation report resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReportResourceInner update(String reportName, ReportResourcePatch parameters, Context context); - - /** - * Delete an AppComplianceAutomation report. - * - * @param reportName Report 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 reportName); - - /** - * Delete an AppComplianceAutomation report. - * - * @param reportName Report 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 reportName, Context context); - - /** - * Delete an AppComplianceAutomation report. - * - * @param reportName Report 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 reportName); - - /** - * Delete an AppComplianceAutomation report. - * - * @param reportName Report 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 reportName, Context context); -} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/ReportsClient.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/ReportsClient.java index 5b44cb24c8625..974bddf6a9a25 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/ReportsClient.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/ReportsClient.java @@ -1,34 +1,232 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.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.exception.ManagementError; +import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.CheckNameAvailabilityResponseInner; import com.azure.resourcemanager.appcomplianceautomation.fluent.models.ReportResourceInner; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.ScopingQuestionsInner; +import com.azure.resourcemanager.appcomplianceautomation.models.CheckNameAvailabilityRequest; +import com.azure.resourcemanager.appcomplianceautomation.models.ReportResourcePatch; +import com.azure.resourcemanager.appcomplianceautomation.models.SyncCertRecordRequest; -/** An instance of this class provides access to all the operations defined in ReportsClient. */ +/** + * An instance of this class provides access to all the operations defined in ReportsClient. + */ public interface ReportsClient { + /** + * Get the AppComplianceAutomation report and its properties. + * + * @param reportName Report 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 AppComplianceAutomation report and its properties along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String reportName, Context context); + + /** + * Get the AppComplianceAutomation report and its properties. + * + * @param reportName Report 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 AppComplianceAutomation report and its properties. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ReportResourceInner get(String reportName); + + /** + * Create a new AppComplianceAutomation report or update an exiting AppComplianceAutomation report. + * + * @param reportName Report Name. + * @param parameters Parameters for the create or update 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 a class represent an AppComplianceAutomation report resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ReportResourceInner> beginCreateOrUpdate(String reportName, + ReportResourceInner parameters); + + /** + * Create a new AppComplianceAutomation report or update an exiting AppComplianceAutomation report. + * + * @param reportName Report Name. + * @param parameters Parameters for the create or update operation. + * @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 a class represent an AppComplianceAutomation report resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ReportResourceInner> beginCreateOrUpdate(String reportName, + ReportResourceInner parameters, Context context); + + /** + * Create a new AppComplianceAutomation report or update an exiting AppComplianceAutomation report. + * + * @param reportName Report Name. + * @param parameters Parameters for the create or update 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 class represent an AppComplianceAutomation report resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ReportResourceInner createOrUpdate(String reportName, ReportResourceInner parameters); + + /** + * Create a new AppComplianceAutomation report or update an exiting AppComplianceAutomation report. + * + * @param reportName Report Name. + * @param parameters Parameters for the create or update operation. + * @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 class represent an AppComplianceAutomation report resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ReportResourceInner createOrUpdate(String reportName, ReportResourceInner parameters, Context context); + + /** + * Update an exiting AppComplianceAutomation report. + * + * @param reportName Report Name. + * @param properties Parameters for the create or update 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 a class represent an AppComplianceAutomation report resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ReportResourceInner> beginUpdate(String reportName, + ReportResourcePatch properties); + + /** + * Update an exiting AppComplianceAutomation report. + * + * @param reportName Report Name. + * @param properties Parameters for the create or update operation. + * @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 a class represent an AppComplianceAutomation report resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ReportResourceInner> beginUpdate(String reportName, + ReportResourcePatch properties, Context context); + + /** + * Update an exiting AppComplianceAutomation report. + * + * @param reportName Report Name. + * @param properties Parameters for the create or update 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 class represent an AppComplianceAutomation report resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ReportResourceInner update(String reportName, ReportResourcePatch properties); + + /** + * Update an exiting AppComplianceAutomation report. + * + * @param reportName Report Name. + * @param properties Parameters for the create or update operation. + * @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 class represent an AppComplianceAutomation report resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ReportResourceInner update(String reportName, ReportResourcePatch properties, Context context); + + /** + * Delete an AppComplianceAutomation report. + * + * @param reportName Report 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 reportName); + + /** + * Delete an AppComplianceAutomation report. + * + * @param reportName Report 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 reportName, Context context); + + /** + * Delete an AppComplianceAutomation report. + * + * @param reportName Report 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 reportName); + + /** + * Delete an AppComplianceAutomation report. + * + * @param reportName Report 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 reportName, Context context); + /** * Get the AppComplianceAutomation report list for the tenant. - * + * * @throws com.azure.core.management.exception.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 AppComplianceAutomation report list for the tenant as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); + PagedIterable listByTenant(); /** * Get the AppComplianceAutomation report list for the tenant. - * + * * @param skipToken Skip over when retrieving results. * @param top Number of elements to return when retrieving results. * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. - * ?$select=reportName,id. + * ?$select=reportName,id. + * @param filter The filter to apply on the operation. + * @param orderby OData order by query option. * @param offerGuid The offerGuid which mapping to the reports. * @param reportCreatorTenantId The tenant id of the report creator. * @param context The context to associate with this operation. @@ -38,6 +236,221 @@ public interface ReportsClient { * @return the AppComplianceAutomation report list for the tenant as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String skipToken, Integer top, String select, String offerGuid, String reportCreatorTenantId, Context context); + PagedIterable listByTenant(String skipToken, Integer top, String select, String filter, + String orderby, String offerGuid, String reportCreatorTenantId, Context context); + + /** + * Synchronize attestation record from app compliance. + * + * @param reportName Report Name. + * @param body Parameters for synchronize certification record 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, ManagementError> beginSyncCertRecord(String reportName, + SyncCertRecordRequest body); + + /** + * Synchronize attestation record from app compliance. + * + * @param reportName Report Name. + * @param body Parameters for synchronize certification record operation. + * @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, ManagementError> beginSyncCertRecord(String reportName, + SyncCertRecordRequest body, Context context); + + /** + * Synchronize attestation record from app compliance. + * + * @param reportName Report Name. + * @param body Parameters for synchronize certification record 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagementError syncCertRecord(String reportName, SyncCertRecordRequest body); + + /** + * Synchronize attestation record from app compliance. + * + * @param reportName Report Name. + * @param body Parameters for synchronize certification record operation. + * @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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagementError syncCertRecord(String reportName, SyncCertRecordRequest body, Context context); + + /** + * Checks the report's nested resource name availability, e.g: Webhooks, Evidences, Snapshots. + * + * @param reportName Report Name. + * @param body NameAvailabilityRequest 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 the check availability result along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response checkNameAvailabilityWithResponse(String reportName, + CheckNameAvailabilityRequest body, Context context); + + /** + * Checks the report's nested resource name availability, e.g: Webhooks, Evidences, Snapshots. + * + * @param reportName Report Name. + * @param body NameAvailabilityRequest 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 the check availability result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CheckNameAvailabilityResponseInner checkNameAvailability(String reportName, CheckNameAvailabilityRequest body); + + /** + * Fix the AppComplianceAutomation report error. e.g: App Compliance Automation Tool service unregistered, + * automation removed. + * + * @param reportName Report 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, ManagementError> beginFix(String reportName); + + /** + * Fix the AppComplianceAutomation report error. e.g: App Compliance Automation Tool service unregistered, + * automation removed. + * + * @param reportName Report 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, ManagementError> beginFix(String reportName, Context context); + + /** + * Fix the AppComplianceAutomation report error. e.g: App Compliance Automation Tool service unregistered, + * automation removed. + * + * @param reportName Report 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagementError fix(String reportName); + + /** + * Fix the AppComplianceAutomation report error. e.g: App Compliance Automation Tool service unregistered, + * automation removed. + * + * @param reportName Report 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagementError fix(String reportName, Context context); + + /** + * Fix the AppComplianceAutomation report error. e.g: App Compliance Automation Tool service unregistered, + * automation removed. + * + * @param reportName Report 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 scoping question list along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getScopingQuestionsWithResponse(String reportName, Context context); + + /** + * Fix the AppComplianceAutomation report error. e.g: App Compliance Automation Tool service unregistered, + * automation removed. + * + * @param reportName Report 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 scoping question list. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ScopingQuestionsInner getScopingQuestions(String reportName); + + /** + * Verify the AppComplianceAutomation report health status. + * + * @param reportName Report 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, ManagementError> beginVerify(String reportName); + + /** + * Verify the AppComplianceAutomation report health status. + * + * @param reportName Report 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, ManagementError> beginVerify(String reportName, Context context); + + /** + * Verify the AppComplianceAutomation report health status. + * + * @param reportName Report 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagementError verify(String reportName); + + /** + * Verify the AppComplianceAutomation report health status. + * + * @param reportName Report 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagementError verify(String reportName, Context context); } diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/ScopingConfigurationsClient.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/ScopingConfigurationsClient.java new file mode 100644 index 0000000000000..066c9d3e5d823 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/ScopingConfigurationsClient.java @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.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.appcomplianceautomation.fluent.models.ScopingConfigurationResourceInner; + +/** + * An instance of this class provides access to all the operations defined in ScopingConfigurationsClient. + */ +public interface ScopingConfigurationsClient { + /** + * Get the AppComplianceAutomation scoping configuration of the specific report. + * + * @param reportName Report Name. + * @param scopingConfigurationName The scoping configuration of the specific report. + * @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 AppComplianceAutomation scoping configuration of the specific report along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String reportName, String scopingConfigurationName, + Context context); + + /** + * Get the AppComplianceAutomation scoping configuration of the specific report. + * + * @param reportName Report Name. + * @param scopingConfigurationName The scoping configuration of the specific report. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 AppComplianceAutomation scoping configuration of the specific report. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ScopingConfigurationResourceInner get(String reportName, String scopingConfigurationName); + + /** + * Get the AppComplianceAutomation scoping configuration of the specific report. + * + * @param reportName Report Name. + * @param scopingConfigurationName The scoping configuration of the specific report. + * @param parameters Parameters for the create or update operation, this is a singleton resource, so please make + * sure you're using 'default' as the 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 AppComplianceAutomation scoping configuration of the specific report along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse(String reportName, + String scopingConfigurationName, ScopingConfigurationResourceInner parameters, Context context); + + /** + * Get the AppComplianceAutomation scoping configuration of the specific report. + * + * @param reportName Report Name. + * @param scopingConfigurationName The scoping configuration of the specific report. + * @param parameters Parameters for the create or update operation, this is a singleton resource, so please make + * sure you're using 'default' as the 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 AppComplianceAutomation scoping configuration of the specific report. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ScopingConfigurationResourceInner createOrUpdate(String reportName, String scopingConfigurationName, + ScopingConfigurationResourceInner parameters); + + /** + * Clean the AppComplianceAutomation scoping configuration of the specific report. + * + * @param reportName Report Name. + * @param scopingConfigurationName The scoping configuration of the specific report. + * @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 reportName, String scopingConfigurationName, Context context); + + /** + * Clean the AppComplianceAutomation scoping configuration of the specific report. + * + * @param reportName Report Name. + * @param scopingConfigurationName The scoping configuration of the specific report. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 reportName, String scopingConfigurationName); + + /** + * Returns a list format of the singleton scopingConfiguration for a specified report. + * + * @param reportName Report 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 response of a ScopingConfigurationResource list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByReportResource(String reportName); + + /** + * Returns a list format of the singleton scopingConfiguration for a specified report. + * + * @param reportName Report 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 response of a ScopingConfigurationResource list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByReportResource(String reportName, Context context); +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/SnapshotOperationsClient.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/SnapshotOperationsClient.java deleted file mode 100644 index dbaa3df375c5d..0000000000000 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/SnapshotOperationsClient.java +++ /dev/null @@ -1,108 +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.appcomplianceautomation.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -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.appcomplianceautomation.fluent.models.DownloadResponseInner; -import com.azure.resourcemanager.appcomplianceautomation.fluent.models.SnapshotResourceInner; -import com.azure.resourcemanager.appcomplianceautomation.models.SnapshotDownloadRequest; - -/** An instance of this class provides access to all the operations defined in SnapshotOperationsClient. */ -public interface SnapshotOperationsClient { - /** - * Get the AppComplianceAutomation snapshot and its properties. - * - * @param reportName Report Name. - * @param snapshotName Snapshot 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 AppComplianceAutomation snapshot and its properties along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String reportName, String snapshotName, Context context); - - /** - * Get the AppComplianceAutomation snapshot and its properties. - * - * @param reportName Report Name. - * @param snapshotName Snapshot 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 AppComplianceAutomation snapshot and its properties. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SnapshotResourceInner get(String reportName, String snapshotName); - - /** - * Download compliance needs from snapshot, like: Compliance Report, Resource List. - * - * @param reportName Report Name. - * @param snapshotName Snapshot Name. - * @param parameters Parameters for the query 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 object that includes all the possible response for the download - * operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DownloadResponseInner> beginDownload( - String reportName, String snapshotName, SnapshotDownloadRequest parameters); - - /** - * Download compliance needs from snapshot, like: Compliance Report, Resource List. - * - * @param reportName Report Name. - * @param snapshotName Snapshot Name. - * @param parameters Parameters for the query operation. - * @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 object that includes all the possible response for the download - * operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DownloadResponseInner> beginDownload( - String reportName, String snapshotName, SnapshotDownloadRequest parameters, Context context); - - /** - * Download compliance needs from snapshot, like: Compliance Report, Resource List. - * - * @param reportName Report Name. - * @param snapshotName Snapshot Name. - * @param parameters Parameters for the query 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 object that includes all the possible response for the download operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DownloadResponseInner download(String reportName, String snapshotName, SnapshotDownloadRequest parameters); - - /** - * Download compliance needs from snapshot, like: Compliance Report, Resource List. - * - * @param reportName Report Name. - * @param snapshotName Snapshot Name. - * @param parameters Parameters for the query operation. - * @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 object that includes all the possible response for the download operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DownloadResponseInner download( - String reportName, String snapshotName, SnapshotDownloadRequest parameters, Context context); -} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/SnapshotsClient.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/SnapshotsClient.java index 030c833707400..ce448e1464e16 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/SnapshotsClient.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/SnapshotsClient.java @@ -1,20 +1,54 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.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.exception.ManagementError; +import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.appcomplianceautomation.fluent.models.SnapshotResourceInner; +import com.azure.resourcemanager.appcomplianceautomation.models.SnapshotDownloadRequest; -/** An instance of this class provides access to all the operations defined in SnapshotsClient. */ +/** + * An instance of this class provides access to all the operations defined in SnapshotsClient. + */ public interface SnapshotsClient { + /** + * Get the AppComplianceAutomation snapshot and its properties. + * + * @param reportName Report Name. + * @param snapshotName Snapshot 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 AppComplianceAutomation snapshot and its properties along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String reportName, String snapshotName, Context context); + + /** + * Get the AppComplianceAutomation snapshot and its properties. + * + * @param reportName Report Name. + * @param snapshotName Snapshot 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 AppComplianceAutomation snapshot and its properties. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SnapshotResourceInner get(String reportName, String snapshotName); + /** * Get the AppComplianceAutomation snapshot list. - * + * * @param reportName Report Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -22,18 +56,20 @@ public interface SnapshotsClient { * @return the AppComplianceAutomation snapshot list as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String reportName); + PagedIterable listByReportResource(String reportName); /** * Get the AppComplianceAutomation snapshot list. - * + * * @param reportName Report Name. * @param skipToken Skip over when retrieving results. * @param top Number of elements to return when retrieving results. * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. - * ?$select=reportName,id. - * @param reportCreatorTenantId The tenant id of the report creator. + * ?$select=reportName,id. + * @param filter The filter to apply on the operation. + * @param orderby OData order by query option. * @param offerGuid The offerGuid which mapping to the reports. + * @param reportCreatorTenantId The tenant id of the report creator. * @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,12 +77,66 @@ public interface SnapshotsClient { * @return the AppComplianceAutomation snapshot list as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String reportName, - String skipToken, - Integer top, - String select, - String reportCreatorTenantId, - String offerGuid, - Context context); + PagedIterable listByReportResource(String reportName, String skipToken, Integer top, + String select, String filter, String orderby, String offerGuid, String reportCreatorTenantId, Context context); + + /** + * Download compliance needs from snapshot, like: Compliance Report, Resource List. + * + * @param reportName Report Name. + * @param snapshotName Snapshot Name. + * @param body Parameters for the query 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, ManagementError> beginDownload(String reportName, String snapshotName, + SnapshotDownloadRequest body); + + /** + * Download compliance needs from snapshot, like: Compliance Report, Resource List. + * + * @param reportName Report Name. + * @param snapshotName Snapshot Name. + * @param body Parameters for the query operation. + * @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, ManagementError> beginDownload(String reportName, String snapshotName, + SnapshotDownloadRequest body, Context context); + + /** + * Download compliance needs from snapshot, like: Compliance Report, Resource List. + * + * @param reportName Report Name. + * @param snapshotName Snapshot Name. + * @param body Parameters for the query 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagementError download(String reportName, String snapshotName, SnapshotDownloadRequest body); + + /** + * Download compliance needs from snapshot, like: Compliance Report, Resource List. + * + * @param reportName Report Name. + * @param snapshotName Snapshot Name. + * @param body Parameters for the query operation. + * @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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagementError download(String reportName, String snapshotName, SnapshotDownloadRequest body, Context context); } diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/WebhooksClient.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/WebhooksClient.java new file mode 100644 index 0000000000000..291d45f6ea19a --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/WebhooksClient.java @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.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.appcomplianceautomation.fluent.models.WebhookResourceInner; +import com.azure.resourcemanager.appcomplianceautomation.models.WebhookResourcePatch; + +/** + * An instance of this class provides access to all the operations defined in WebhooksClient. + */ +public interface WebhooksClient { + /** + * Get the AppComplianceAutomation webhook and its properties. + * + * @param reportName Report Name. + * @param webhookName Webhook 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 AppComplianceAutomation webhook and its properties along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String reportName, String webhookName, Context context); + + /** + * Get the AppComplianceAutomation webhook and its properties. + * + * @param reportName Report Name. + * @param webhookName Webhook 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 AppComplianceAutomation webhook and its properties. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WebhookResourceInner get(String reportName, String webhookName); + + /** + * Create a new AppComplianceAutomation webhook or update an exiting AppComplianceAutomation webhook. + * + * @param reportName Report Name. + * @param webhookName Webhook Name. + * @param parameters Parameters for the create or update operation. + * @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 class represent an AppComplianceAutomation webhook resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse(String reportName, String webhookName, + WebhookResourceInner parameters, Context context); + + /** + * Create a new AppComplianceAutomation webhook or update an exiting AppComplianceAutomation webhook. + * + * @param reportName Report Name. + * @param webhookName Webhook Name. + * @param parameters Parameters for the create or update 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 class represent an AppComplianceAutomation webhook resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WebhookResourceInner createOrUpdate(String reportName, String webhookName, WebhookResourceInner parameters); + + /** + * Update an exiting AppComplianceAutomation webhook. + * + * @param reportName Report Name. + * @param webhookName Webhook Name. + * @param properties Parameters for the create or update operation. + * @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 class represent an AppComplianceAutomation webhook resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse(String reportName, String webhookName, + WebhookResourcePatch properties, Context context); + + /** + * Update an exiting AppComplianceAutomation webhook. + * + * @param reportName Report Name. + * @param webhookName Webhook Name. + * @param properties Parameters for the create or update 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 class represent an AppComplianceAutomation webhook resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WebhookResourceInner update(String reportName, String webhookName, WebhookResourcePatch properties); + + /** + * Delete an AppComplianceAutomation webhook. + * + * @param reportName Report Name. + * @param webhookName Webhook 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 reportName, String webhookName, Context context); + + /** + * Delete an AppComplianceAutomation webhook. + * + * @param reportName Report Name. + * @param webhookName Webhook 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 reportName, String webhookName); + + /** + * Get the AppComplianceAutomation webhook list. + * + * @param reportName Report 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 AppComplianceAutomation webhook list as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByReportResource(String reportName); + + /** + * Get the AppComplianceAutomation webhook list. + * + * @param reportName Report Name. + * @param skipToken Skip over when retrieving results. + * @param top Number of elements to return when retrieving results. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. + * ?$select=reportName,id. + * @param filter The filter to apply on the operation. + * @param orderby OData order by query option. + * @param offerGuid The offerGuid which mapping to the reports. + * @param reportCreatorTenantId The tenant id of the report creator. + * @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 AppComplianceAutomation webhook list as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByReportResource(String reportName, String skipToken, Integer top, + String select, String filter, String orderby, String offerGuid, String reportCreatorTenantId, Context context); +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/CheckNameAvailabilityResponseInner.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/CheckNameAvailabilityResponseInner.java new file mode 100644 index 0000000000000..ff60971b742bb --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/CheckNameAvailabilityResponseInner.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.appcomplianceautomation.models.CheckNameAvailabilityReason; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The check availability result. + */ +@Immutable +public final class CheckNameAvailabilityResponseInner { + /* + * Indicates if the resource name is available. + */ + @JsonProperty(value = "nameAvailable") + private Boolean nameAvailable; + + /* + * The reason why the given name is not available. + */ + @JsonProperty(value = "reason") + private CheckNameAvailabilityReason reason; + + /* + * Detailed reason why the given name is not available. + */ + @JsonProperty(value = "message") + private String message; + + /** + * Creates an instance of CheckNameAvailabilityResponseInner class. + */ + private CheckNameAvailabilityResponseInner() { + } + + /** + * Get the nameAvailable property: Indicates if the resource name is available. + * + * @return the nameAvailable value. + */ + public Boolean nameAvailable() { + return this.nameAvailable; + } + + /** + * Get the reason property: The reason why the given name is not available. + * + * @return the reason value. + */ + public CheckNameAvailabilityReason reason() { + return this.reason; + } + + /** + * Get the message property: Detailed reason why the given name is not available. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/DownloadResponseInner.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/DownloadResponseInner.java deleted file mode 100644 index 90cf7cab421cf..0000000000000 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/DownloadResponseInner.java +++ /dev/null @@ -1,101 +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.appcomplianceautomation.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.appcomplianceautomation.models.ComplianceReportItem; -import com.azure.resourcemanager.appcomplianceautomation.models.DownloadResponseComplianceDetailedPdfReport; -import com.azure.resourcemanager.appcomplianceautomation.models.DownloadResponseCompliancePdfReport; -import com.azure.resourcemanager.appcomplianceautomation.models.ResourceItem; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Object that includes all the possible response for the download operation. */ -@Immutable -public final class DownloadResponseInner { - /* - * List of the reports - */ - @JsonProperty(value = "resourceList", access = JsonProperty.Access.WRITE_ONLY) - private List resourceList; - - /* - * List of the compliance result - */ - @JsonProperty(value = "complianceReport", access = JsonProperty.Access.WRITE_ONLY) - private List complianceReport; - - /* - * compliance pdf report - */ - @JsonProperty(value = "compliancePdfReport", access = JsonProperty.Access.WRITE_ONLY) - private DownloadResponseCompliancePdfReport compliancePdfReport; - - /* - * compliance detailed pdf report - */ - @JsonProperty(value = "complianceDetailedPdfReport", access = JsonProperty.Access.WRITE_ONLY) - private DownloadResponseComplianceDetailedPdfReport complianceDetailedPdfReport; - - /** Creates an instance of DownloadResponseInner class. */ - public DownloadResponseInner() { - } - - /** - * Get the resourceList property: List of the reports. - * - * @return the resourceList value. - */ - public List resourceList() { - return this.resourceList; - } - - /** - * Get the complianceReport property: List of the compliance result. - * - * @return the complianceReport value. - */ - public List complianceReport() { - return this.complianceReport; - } - - /** - * Get the compliancePdfReport property: compliance pdf report. - * - * @return the compliancePdfReport value. - */ - public DownloadResponseCompliancePdfReport compliancePdfReport() { - return this.compliancePdfReport; - } - - /** - * Get the complianceDetailedPdfReport property: compliance detailed pdf report. - * - * @return the complianceDetailedPdfReport value. - */ - public DownloadResponseComplianceDetailedPdfReport complianceDetailedPdfReport() { - return this.complianceDetailedPdfReport; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (resourceList() != null) { - resourceList().forEach(e -> e.validate()); - } - if (complianceReport() != null) { - complianceReport().forEach(e -> e.validate()); - } - if (compliancePdfReport() != null) { - compliancePdfReport().validate(); - } - if (complianceDetailedPdfReport() != null) { - complianceDetailedPdfReport().validate(); - } - } -} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/EvidenceFileDownloadResponseInner.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/EvidenceFileDownloadResponseInner.java new file mode 100644 index 0000000000000..140120ae1bc21 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/EvidenceFileDownloadResponseInner.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.appcomplianceautomation.models.EvidenceFileDownloadResponseEvidenceFile; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Object that includes all the possible response for the evidence file download operation. + */ +@Immutable +public final class EvidenceFileDownloadResponseInner { + /* + * The uri of evidence file + */ + @JsonProperty(value = "evidenceFile", access = JsonProperty.Access.WRITE_ONLY) + private EvidenceFileDownloadResponseEvidenceFile evidenceFile; + + /** + * Creates an instance of EvidenceFileDownloadResponseInner class. + */ + private EvidenceFileDownloadResponseInner() { + } + + /** + * Get the evidenceFile property: The uri of evidence file. + * + * @return the evidenceFile value. + */ + public EvidenceFileDownloadResponseEvidenceFile evidenceFile() { + return this.evidenceFile; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (evidenceFile() != null) { + evidenceFile().validate(); + } + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/EvidenceResourceInner.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/EvidenceResourceInner.java new file mode 100644 index 0000000000000..135ef22c79267 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/EvidenceResourceInner.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcomplianceautomation.models.EvidenceProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A class represent an AppComplianceAutomation evidence resource. + */ +@Fluent +public final class EvidenceResourceInner extends ProxyResource { + /* + * Evidence property. + */ + @JsonProperty(value = "properties", required = true) + private EvidenceProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of EvidenceResourceInner class. + */ + public EvidenceResourceInner() { + } + + /** + * Get the properties property: Evidence property. + * + * @return the properties value. + */ + public EvidenceProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Evidence property. + * + * @param properties the properties value to set. + * @return the EvidenceResourceInner object itself. + */ + public EvidenceResourceInner withProperties(EvidenceProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property properties in model EvidenceResourceInner")); + } else { + properties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(EvidenceResourceInner.class); +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/GetCollectionCountResponseInner.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/GetCollectionCountResponseInner.java new file mode 100644 index 0000000000000..af918dc211df8 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/GetCollectionCountResponseInner.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The get collection count response. + */ +@Immutable +public final class GetCollectionCountResponseInner { + /* + * The count of the specified resource. + */ + @JsonProperty(value = "count") + private Integer count; + + /** + * Creates an instance of GetCollectionCountResponseInner class. + */ + private GetCollectionCountResponseInner() { + } + + /** + * Get the count property: The count of the specified resource. + * + * @return the count value. + */ + public Integer count() { + return this.count; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/GetOverviewStatusResponseInner.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/GetOverviewStatusResponseInner.java new file mode 100644 index 0000000000000..309943cc0b614 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/GetOverviewStatusResponseInner.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.appcomplianceautomation.models.StatusItem; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The get overview status response. + */ +@Immutable +public final class GetOverviewStatusResponseInner { + /* + * List of different status items. + */ + @JsonProperty(value = "statusList") + private List statusList; + + /** + * Creates an instance of GetOverviewStatusResponseInner class. + */ + private GetOverviewStatusResponseInner() { + } + + /** + * Get the statusList property: List of different status items. + * + * @return the statusList value. + */ + public List statusList() { + return this.statusList; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (statusList() != null) { + statusList().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/ListInUseStorageAccountsResponseInner.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/ListInUseStorageAccountsResponseInner.java new file mode 100644 index 0000000000000..fa7aff5b2d742 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/ListInUseStorageAccountsResponseInner.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.appcomplianceautomation.models.StorageInfo; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Parameters for listing in use storage accounts operation. If subscription list is null, it will check the user's all + * subscriptions. + */ +@Immutable +public final class ListInUseStorageAccountsResponseInner { + /* + * The storage account list which in use in related reports. + */ + @JsonProperty(value = "storageAccountList") + private List storageAccountList; + + /** + * Creates an instance of ListInUseStorageAccountsResponseInner class. + */ + private ListInUseStorageAccountsResponseInner() { + } + + /** + * Get the storageAccountList property: The storage account list which in use in related reports. + * + * @return the storageAccountList value. + */ + public List storageAccountList() { + return this.storageAccountList; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (storageAccountList() != null) { + storageAccountList().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/OperationInner.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/OperationInner.java index cf471df623720..6d5fb5b1cf15e 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/OperationInner.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/OperationInner.java @@ -1,21 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.appcomplianceautomation.models.ActionType; import com.azure.resourcemanager.appcomplianceautomation.models.OperationDisplay; import com.azure.resourcemanager.appcomplianceautomation.models.Origin; import com.fasterxml.jackson.annotation.JsonProperty; /** - * REST API Operation - * - *

Details of a REST API operation, returned from the Resource Provider Operations API. + * Details of a REST API operation, returned from the Resource Provider Operations API. */ -@Fluent +@Immutable public final class OperationInner { /* * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: @@ -25,8 +23,8 @@ public final class OperationInner { private String name; /* - * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for - * ARM/control-plane operations. + * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure + * Resource Manager/control-plane operations. */ @JsonProperty(value = "isDataAction", access = JsonProperty.Access.WRITE_ONLY) private Boolean isDataAction; @@ -45,19 +43,21 @@ public final class OperationInner { private Origin origin; /* - * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ - @JsonProperty(value = "actionType", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "actionType") private ActionType actionType; - /** Creates an instance of OperationInner class. */ - public OperationInner() { + /** + * Creates an instance of OperationInner class. + */ + private OperationInner() { } /** * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". - * + * * @return the name value. */ public String name() { @@ -66,8 +66,8 @@ public String name() { /** * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane - * operations and "false" for ARM/control-plane operations. - * + * operations and "false" for Azure Resource Manager/control-plane operations. + * * @return the isDataAction value. */ public Boolean isDataAction() { @@ -76,28 +76,17 @@ public Boolean isDataAction() { /** * Get the display property: Localized display information for this particular operation. - * + * * @return the display value. */ public OperationDisplay display() { return this.display; } - /** - * Set the display property: Localized display information for this particular operation. - * - * @param display the display value to set. - * @return the OperationInner object itself. - */ - public OperationInner withDisplay(OperationDisplay display) { - this.display = display; - return this; - } - /** * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and * audit logs UX. Default value is "user,system". - * + * * @return the origin value. */ public Origin origin() { @@ -105,9 +94,9 @@ public Origin origin() { } /** - * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal - * only APIs. - * + * Get the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are + * for internal only APIs. + * * @return the actionType value. */ public ActionType actionType() { @@ -116,7 +105,7 @@ public ActionType actionType() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/ReportResourceInner.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/ReportResourceInner.java index 53bfcde4b3115..6e40c9db932a5 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/ReportResourceInner.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/ReportResourceInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.fluent.models; @@ -11,7 +11,9 @@ import com.azure.resourcemanager.appcomplianceautomation.models.ReportProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** A class represent an AppComplianceAutomation report resource. */ +/** + * A class represent an AppComplianceAutomation report resource. + */ @Fluent public final class ReportResourceInner extends ProxyResource { /* @@ -26,13 +28,15 @@ public final class ReportResourceInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of ReportResourceInner class. */ + /** + * Creates an instance of ReportResourceInner class. + */ public ReportResourceInner() { } /** * Get the properties property: Report property. - * + * * @return the properties value. */ public ReportProperties properties() { @@ -41,7 +45,7 @@ public ReportProperties properties() { /** * Set the properties property: Report property. - * + * * @param properties the properties value to set. * @return the ReportResourceInner object itself. */ @@ -52,7 +56,7 @@ public ReportResourceInner withProperties(ReportProperties properties) { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -61,14 +65,13 @@ public SystemData systemData() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (properties() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property properties in model ReportResourceInner")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property properties in model ReportResourceInner")); } else { properties().validate(); } diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/ScopingConfigurationResourceInner.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/ScopingConfigurationResourceInner.java new file mode 100644 index 0000000000000..c8534b7c493e3 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/ScopingConfigurationResourceInner.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcomplianceautomation.models.ScopingConfigurationProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A class represent an AppComplianceAutomation scoping configuration resource. + */ +@Fluent +public final class ScopingConfigurationResourceInner extends ProxyResource { + /* + * ScopingConfiguration property. + */ + @JsonProperty(value = "properties", required = true) + private ScopingConfigurationProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of ScopingConfigurationResourceInner class. + */ + public ScopingConfigurationResourceInner() { + } + + /** + * Get the properties property: ScopingConfiguration property. + * + * @return the properties value. + */ + public ScopingConfigurationProperties properties() { + return this.properties; + } + + /** + * Set the properties property: ScopingConfiguration property. + * + * @param properties the properties value to set. + * @return the ScopingConfigurationResourceInner object itself. + */ + public ScopingConfigurationResourceInner withProperties(ScopingConfigurationProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property properties in model ScopingConfigurationResourceInner")); + } else { + properties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ScopingConfigurationResourceInner.class); +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/ScopingQuestionsInner.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/ScopingQuestionsInner.java new file mode 100644 index 0000000000000..05ee78e429999 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/ScopingQuestionsInner.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.appcomplianceautomation.models.ScopingQuestion; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Scoping question list. + */ +@Immutable +public final class ScopingQuestionsInner { + /* + * List of scoping questions. + */ + @JsonProperty(value = "questions") + private List questions; + + /** + * Creates an instance of ScopingQuestionsInner class. + */ + private ScopingQuestionsInner() { + } + + /** + * Get the questions property: List of scoping questions. + * + * @return the questions value. + */ + public List questions() { + return this.questions; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (questions() != null) { + questions().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/SnapshotResourceInner.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/SnapshotResourceInner.java index e062c02574412..e34f5a593fe59 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/SnapshotResourceInner.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/SnapshotResourceInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.fluent.models; @@ -10,13 +10,15 @@ import com.azure.resourcemanager.appcomplianceautomation.models.SnapshotProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** A class represent a AppComplianceAutomation snapshot resource. */ +/** + * A class represent a AppComplianceAutomation snapshot resource. + */ @Immutable public final class SnapshotResourceInner extends ProxyResource { /* - * Snapshot's property'. + * Snapshot's property. */ - @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties") private SnapshotProperties properties; /* @@ -25,13 +27,15 @@ public final class SnapshotResourceInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of SnapshotResourceInner class. */ - public SnapshotResourceInner() { + /** + * Creates an instance of SnapshotResourceInner class. + */ + private SnapshotResourceInner() { } /** - * Get the properties property: Snapshot's property'. - * + * Get the properties property: Snapshot's property. + * * @return the properties value. */ public SnapshotProperties properties() { @@ -40,7 +44,7 @@ public SnapshotProperties properties() { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -49,7 +53,7 @@ public SystemData systemData() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/WebhookResourceInner.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/WebhookResourceInner.java new file mode 100644 index 0000000000000..d7bd46d9b51fa --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/WebhookResourceInner.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcomplianceautomation.models.WebhookProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A class represent an AppComplianceAutomation webhook resource. + */ +@Fluent +public final class WebhookResourceInner extends ProxyResource { + /* + * Webhook property. + */ + @JsonProperty(value = "properties", required = true) + private WebhookProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of WebhookResourceInner class. + */ + public WebhookResourceInner() { + } + + /** + * Get the properties property: Webhook property. + * + * @return the properties value. + */ + public WebhookProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Webhook property. + * + * @param properties the properties value to set. + * @return the WebhookResourceInner object itself. + */ + public WebhookResourceInner withProperties(WebhookProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() == null) { + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property properties in model WebhookResourceInner")); + } else { + properties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WebhookResourceInner.class); +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/package-info.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/package-info.java index dac02049397ce..02fb03a146837 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/package-info.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/models/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the inner data models for AppComplianceAutomationToolForMicrosoft365. App Compliance Automation - * Tool for Microsoft 365 API spec. + * Package containing the inner data models for AppComplianceAutomation. + * App Compliance Automation Tool for Microsoft 365 API spec. */ package com.azure.resourcemanager.appcomplianceautomation.fluent.models; diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/package-info.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/package-info.java index a916d418a7291..746ccd441e630 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/package-info.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/fluent/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the service clients for AppComplianceAutomationToolForMicrosoft365. App Compliance Automation Tool - * for Microsoft 365 API spec. + * Package containing the service clients for AppComplianceAutomation. + * App Compliance Automation Tool for Microsoft 365 API spec. */ package com.azure.resourcemanager.appcomplianceautomation.fluent; diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/AppComplianceAutomationClientBuilder.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/AppComplianceAutomationClientBuilder.java new file mode 100644 index 0000000000000..3d9181ad8c928 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/AppComplianceAutomationClientBuilder.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.implementation; + +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerAdapter; +import java.time.Duration; + +/** + * A builder for creating a new instance of the AppComplianceAutomationClientImpl type. + */ +@ServiceClientBuilder(serviceClients = { AppComplianceAutomationClientImpl.class }) +public final class AppComplianceAutomationClientBuilder { + /* + * Server parameter + */ + private String endpoint; + + /** + * Sets Server parameter. + * + * @param endpoint the endpoint value. + * @return the AppComplianceAutomationClientBuilder. + */ + public AppComplianceAutomationClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * The environment to connect to + */ + private AzureEnvironment environment; + + /** + * Sets The environment to connect to. + * + * @param environment the environment value. + * @return the AppComplianceAutomationClientBuilder. + */ + public AppComplianceAutomationClientBuilder environment(AzureEnvironment environment) { + this.environment = environment; + return this; + } + + /* + * The HTTP pipeline to send requests through + */ + private HttpPipeline pipeline; + + /** + * Sets The HTTP pipeline to send requests through. + * + * @param pipeline the pipeline value. + * @return the AppComplianceAutomationClientBuilder. + */ + public AppComplianceAutomationClientBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; + return this; + } + + /* + * The default poll interval for long-running operation + */ + private Duration defaultPollInterval; + + /** + * Sets The default poll interval for long-running operation. + * + * @param defaultPollInterval the defaultPollInterval value. + * @return the AppComplianceAutomationClientBuilder. + */ + public AppComplianceAutomationClientBuilder defaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval = defaultPollInterval; + return this; + } + + /* + * The serializer to serialize an object into a string + */ + private SerializerAdapter serializerAdapter; + + /** + * Sets The serializer to serialize an object into a string. + * + * @param serializerAdapter the serializerAdapter value. + * @return the AppComplianceAutomationClientBuilder. + */ + public AppComplianceAutomationClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + this.serializerAdapter = serializerAdapter; + return this; + } + + /** + * Builds an instance of AppComplianceAutomationClientImpl with the provided parameters. + * + * @return an instance of AppComplianceAutomationClientImpl. + */ + public AppComplianceAutomationClientImpl buildClient() { + 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(); + AppComplianceAutomationClientImpl client = new AppComplianceAutomationClientImpl(localPipeline, + localSerializerAdapter, localDefaultPollInterval, localEnvironment, this.endpoint); + return client; + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/AppComplianceAutomationToolForMicrosoft365Impl.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/AppComplianceAutomationClientImpl.java similarity index 67% rename from sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/AppComplianceAutomationToolForMicrosoft365Impl.java rename to sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/AppComplianceAutomationClientImpl.java index 3cc206c9a8ab4..e6fe945e6b57b 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/AppComplianceAutomationToolForMicrosoft365Impl.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/AppComplianceAutomationClientImpl.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.implementation; import com.azure.core.annotation.ServiceClient; +import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpResponse; @@ -12,8 +13,8 @@ import com.azure.core.management.AzureEnvironment; import com.azure.core.management.exception.ManagementError; import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; import com.azure.core.management.polling.PollerFactory; +import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; @@ -22,12 +23,14 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.appcomplianceautomation.fluent.AppComplianceAutomationToolForMicrosoft365; +import com.azure.resourcemanager.appcomplianceautomation.fluent.AppComplianceAutomationClient; +import com.azure.resourcemanager.appcomplianceautomation.fluent.EvidencesClient; import com.azure.resourcemanager.appcomplianceautomation.fluent.OperationsClient; -import com.azure.resourcemanager.appcomplianceautomation.fluent.ReportOperationsClient; +import com.azure.resourcemanager.appcomplianceautomation.fluent.ProviderActionsClient; import com.azure.resourcemanager.appcomplianceautomation.fluent.ReportsClient; -import com.azure.resourcemanager.appcomplianceautomation.fluent.SnapshotOperationsClient; +import com.azure.resourcemanager.appcomplianceautomation.fluent.ScopingConfigurationsClient; import com.azure.resourcemanager.appcomplianceautomation.fluent.SnapshotsClient; +import com.azure.resourcemanager.appcomplianceautomation.fluent.WebhooksClient; import java.io.IOException; import java.lang.reflect.Type; import java.nio.ByteBuffer; @@ -37,160 +40,207 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** Initializes a new instance of the AppComplianceAutomationToolForMicrosoft365Impl type. */ -@ServiceClient(builder = AppComplianceAutomationToolForMicrosoft365Builder.class) -public final class AppComplianceAutomationToolForMicrosoft365Impl - implements AppComplianceAutomationToolForMicrosoft365 { - /** server parameter. */ +/** + * Initializes a new instance of the AppComplianceAutomationClientImpl type. + */ +@ServiceClient(builder = AppComplianceAutomationClientBuilder.class) +public final class AppComplianceAutomationClientImpl implements AppComplianceAutomationClient { + /** + * Server parameter. + */ private final String endpoint; /** - * Gets server parameter. - * + * Gets Server parameter. + * * @return the endpoint value. */ public String getEndpoint() { return this.endpoint; } - /** Api Version. */ + /** + * Version parameter. + */ private final String apiVersion; /** - * Gets Api Version. - * + * Gets Version parameter. + * * @return the apiVersion value. */ public String getApiVersion() { return this.apiVersion; } - /** 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 OperationsClient object to access its operations. */ - private final OperationsClient operations; - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. + * The ReportsClient object to access its operations. */ - public OperationsClient getOperations() { - return this.operations; - } - - /** The ReportsClient object to access its operations. */ private final ReportsClient reports; /** * Gets the ReportsClient object to access its operations. - * + * * @return the ReportsClient object. */ public ReportsClient getReports() { return this.reports; } - /** The ReportOperationsClient object to access its operations. */ - private final ReportOperationsClient reportOperations; + /** + * The WebhooksClient object to access its operations. + */ + private final WebhooksClient webhooks; /** - * Gets the ReportOperationsClient object to access its operations. - * - * @return the ReportOperationsClient object. + * Gets the WebhooksClient object to access its operations. + * + * @return the WebhooksClient object. */ - public ReportOperationsClient getReportOperations() { - return this.reportOperations; + public WebhooksClient getWebhooks() { + return this.webhooks; } - /** The SnapshotsClient object to access its operations. */ + /** + * The SnapshotsClient object to access its operations. + */ private final SnapshotsClient snapshots; /** * Gets the SnapshotsClient object to access its operations. - * + * * @return the SnapshotsClient object. */ public SnapshotsClient getSnapshots() { return this.snapshots; } - /** The SnapshotOperationsClient object to access its operations. */ - private final SnapshotOperationsClient snapshotOperations; + /** + * The ScopingConfigurationsClient object to access its operations. + */ + private final ScopingConfigurationsClient scopingConfigurations; + + /** + * Gets the ScopingConfigurationsClient object to access its operations. + * + * @return the ScopingConfigurationsClient object. + */ + public ScopingConfigurationsClient getScopingConfigurations() { + return this.scopingConfigurations; + } + + /** + * The EvidencesClient object to access its operations. + */ + private final EvidencesClient evidences; /** - * Gets the SnapshotOperationsClient object to access its operations. - * - * @return the SnapshotOperationsClient object. + * Gets the EvidencesClient object to access its operations. + * + * @return the EvidencesClient object. */ - public SnapshotOperationsClient getSnapshotOperations() { - return this.snapshotOperations; + public EvidencesClient getEvidences() { + return this.evidences; } /** - * Initializes an instance of AppComplianceAutomationToolForMicrosoft365 client. - * + * 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 ProviderActionsClient object to access its operations. + */ + private final ProviderActionsClient providerActions; + + /** + * Gets the ProviderActionsClient object to access its operations. + * + * @return the ProviderActionsClient object. + */ + public ProviderActionsClient getProviderActions() { + return this.providerActions; + } + + /** + * Initializes an instance of AppComplianceAutomationClient 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. * @param environment The Azure environment. - * @param endpoint server parameter. + * @param endpoint Server parameter. */ - AppComplianceAutomationToolForMicrosoft365Impl( - HttpPipeline httpPipeline, - SerializerAdapter serializerAdapter, - Duration defaultPollInterval, - AzureEnvironment environment, - String endpoint) { + AppComplianceAutomationClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, + Duration defaultPollInterval, AzureEnvironment environment, String endpoint) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; this.endpoint = endpoint; - this.apiVersion = "2022-11-16-preview"; - this.operations = new OperationsClientImpl(this); + this.apiVersion = "2024-06-27"; this.reports = new ReportsClientImpl(this); - this.reportOperations = new ReportOperationsClientImpl(this); + this.webhooks = new WebhooksClientImpl(this); this.snapshots = new SnapshotsClientImpl(this); - this.snapshotOperations = new SnapshotOperationsClientImpl(this); + this.scopingConfigurations = new ScopingConfigurationsClientImpl(this); + this.evidences = new EvidencesClientImpl(this); + this.operations = new OperationsClientImpl(this); + this.providerActions = new ProviderActionsClientImpl(this); } /** * Gets default client context. - * + * * @return the default client context. */ public Context getContext() { @@ -199,7 +249,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. */ @@ -209,7 +259,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. @@ -219,26 +269,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. @@ -251,19 +290,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; } @@ -304,7 +340,7 @@ public int getStatusCode() { } public String getHeaderValue(String s) { - return httpHeaders.getValue(s); + return httpHeaders.getValue(HttpHeaderName.fromString(s)); } public HttpHeaders getHeaders() { @@ -328,5 +364,5 @@ public Mono getBodyAsString(Charset charset) { } } - private static final ClientLogger LOGGER = new ClientLogger(AppComplianceAutomationToolForMicrosoft365Impl.class); + private static final ClientLogger LOGGER = new ClientLogger(AppComplianceAutomationClientImpl.class); } diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/AppComplianceAutomationToolForMicrosoft365Builder.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/AppComplianceAutomationToolForMicrosoft365Builder.java deleted file mode 100644 index 67c17ae34eed1..0000000000000 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/AppComplianceAutomationToolForMicrosoft365Builder.java +++ /dev/null @@ -1,123 +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.appcomplianceautomation.implementation; - -import com.azure.core.annotation.ServiceClientBuilder; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.RetryPolicy; -import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerAdapter; -import java.time.Duration; - -/** A builder for creating a new instance of the AppComplianceAutomationToolForMicrosoft365Impl type. */ -@ServiceClientBuilder(serviceClients = {AppComplianceAutomationToolForMicrosoft365Impl.class}) -public final class AppComplianceAutomationToolForMicrosoft365Builder { - /* - * server parameter - */ - private String endpoint; - - /** - * Sets server parameter. - * - * @param endpoint the endpoint value. - * @return the AppComplianceAutomationToolForMicrosoft365Builder. - */ - public AppComplianceAutomationToolForMicrosoft365Builder endpoint(String endpoint) { - this.endpoint = endpoint; - return this; - } - - /* - * The environment to connect to - */ - private AzureEnvironment environment; - - /** - * Sets The environment to connect to. - * - * @param environment the environment value. - * @return the AppComplianceAutomationToolForMicrosoft365Builder. - */ - public AppComplianceAutomationToolForMicrosoft365Builder environment(AzureEnvironment environment) { - this.environment = environment; - return this; - } - - /* - * The HTTP pipeline to send requests through - */ - private HttpPipeline pipeline; - - /** - * Sets The HTTP pipeline to send requests through. - * - * @param pipeline the pipeline value. - * @return the AppComplianceAutomationToolForMicrosoft365Builder. - */ - public AppComplianceAutomationToolForMicrosoft365Builder pipeline(HttpPipeline pipeline) { - this.pipeline = pipeline; - return this; - } - - /* - * The default poll interval for long-running operation - */ - private Duration defaultPollInterval; - - /** - * Sets The default poll interval for long-running operation. - * - * @param defaultPollInterval the defaultPollInterval value. - * @return the AppComplianceAutomationToolForMicrosoft365Builder. - */ - public AppComplianceAutomationToolForMicrosoft365Builder defaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = defaultPollInterval; - return this; - } - - /* - * The serializer to serialize an object into a string - */ - private SerializerAdapter serializerAdapter; - - /** - * Sets The serializer to serialize an object into a string. - * - * @param serializerAdapter the serializerAdapter value. - * @return the AppComplianceAutomationToolForMicrosoft365Builder. - */ - public AppComplianceAutomationToolForMicrosoft365Builder serializerAdapter(SerializerAdapter serializerAdapter) { - this.serializerAdapter = serializerAdapter; - return this; - } - - /** - * Builds an instance of AppComplianceAutomationToolForMicrosoft365Impl with the provided parameters. - * - * @return an instance of AppComplianceAutomationToolForMicrosoft365Impl. - */ - public AppComplianceAutomationToolForMicrosoft365Impl 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(); - AppComplianceAutomationToolForMicrosoft365Impl client = - new AppComplianceAutomationToolForMicrosoft365Impl( - localPipeline, localSerializerAdapter, localDefaultPollInterval, localEnvironment, localEndpoint); - return client; - } -} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/CheckNameAvailabilityResponseImpl.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/CheckNameAvailabilityResponseImpl.java new file mode 100644 index 0000000000000..7ba3925a4ed6a --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/CheckNameAvailabilityResponseImpl.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.implementation; + +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.CheckNameAvailabilityResponseInner; +import com.azure.resourcemanager.appcomplianceautomation.models.CheckNameAvailabilityReason; +import com.azure.resourcemanager.appcomplianceautomation.models.CheckNameAvailabilityResponse; + +public final class CheckNameAvailabilityResponseImpl implements CheckNameAvailabilityResponse { + private CheckNameAvailabilityResponseInner innerObject; + + private final com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager serviceManager; + + CheckNameAvailabilityResponseImpl(CheckNameAvailabilityResponseInner innerObject, + com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public Boolean nameAvailable() { + return this.innerModel().nameAvailable(); + } + + public CheckNameAvailabilityReason reason() { + return this.innerModel().reason(); + } + + public String message() { + return this.innerModel().message(); + } + + public CheckNameAvailabilityResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/DownloadResponseImpl.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/DownloadResponseImpl.java deleted file mode 100644 index 4653bee0f2b26..0000000000000 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/DownloadResponseImpl.java +++ /dev/null @@ -1,61 +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.appcomplianceautomation.implementation; - -import com.azure.resourcemanager.appcomplianceautomation.fluent.models.DownloadResponseInner; -import com.azure.resourcemanager.appcomplianceautomation.models.ComplianceReportItem; -import com.azure.resourcemanager.appcomplianceautomation.models.DownloadResponse; -import com.azure.resourcemanager.appcomplianceautomation.models.DownloadResponseComplianceDetailedPdfReport; -import com.azure.resourcemanager.appcomplianceautomation.models.DownloadResponseCompliancePdfReport; -import com.azure.resourcemanager.appcomplianceautomation.models.ResourceItem; -import java.util.Collections; -import java.util.List; - -public final class DownloadResponseImpl implements DownloadResponse { - private DownloadResponseInner innerObject; - - private final com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager serviceManager; - - DownloadResponseImpl( - DownloadResponseInner innerObject, - com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List resourceList() { - List inner = this.innerModel().resourceList(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List complianceReport() { - List inner = this.innerModel().complianceReport(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public DownloadResponseCompliancePdfReport compliancePdfReport() { - return this.innerModel().compliancePdfReport(); - } - - public DownloadResponseComplianceDetailedPdfReport complianceDetailedPdfReport() { - return this.innerModel().complianceDetailedPdfReport(); - } - - public DownloadResponseInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/EvidenceFileDownloadResponseImpl.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/EvidenceFileDownloadResponseImpl.java new file mode 100644 index 0000000000000..3105ce898a035 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/EvidenceFileDownloadResponseImpl.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.implementation; + +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.EvidenceFileDownloadResponseInner; +import com.azure.resourcemanager.appcomplianceautomation.models.EvidenceFileDownloadResponse; +import com.azure.resourcemanager.appcomplianceautomation.models.EvidenceFileDownloadResponseEvidenceFile; + +public final class EvidenceFileDownloadResponseImpl implements EvidenceFileDownloadResponse { + private EvidenceFileDownloadResponseInner innerObject; + + private final com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager serviceManager; + + EvidenceFileDownloadResponseImpl(EvidenceFileDownloadResponseInner innerObject, + com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public EvidenceFileDownloadResponseEvidenceFile evidenceFile() { + return this.innerModel().evidenceFile(); + } + + public EvidenceFileDownloadResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/EvidenceResourceImpl.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/EvidenceResourceImpl.java new file mode 100644 index 0000000000000..7c19a5e1ba4e6 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/EvidenceResourceImpl.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.EvidenceResourceInner; +import com.azure.resourcemanager.appcomplianceautomation.models.EvidenceProperties; +import com.azure.resourcemanager.appcomplianceautomation.models.EvidenceResource; + +public final class EvidenceResourceImpl implements EvidenceResource { + private EvidenceResourceInner innerObject; + + private final com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager serviceManager; + + EvidenceResourceImpl(EvidenceResourceInner innerObject, + com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager 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 EvidenceProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public EvidenceResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/EvidencesClientImpl.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/EvidencesClientImpl.java new file mode 100644 index 0000000000000..e970121a2d2aa --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/EvidencesClientImpl.java @@ -0,0 +1,856 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.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.appcomplianceautomation.fluent.EvidencesClient; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.EvidenceFileDownloadResponseInner; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.EvidenceResourceInner; +import com.azure.resourcemanager.appcomplianceautomation.implementation.models.EvidenceResourceListResult; +import com.azure.resourcemanager.appcomplianceautomation.models.EvidenceFileDownloadRequest; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in EvidencesClient. + */ +public final class EvidencesClientImpl implements EvidencesClient { + /** + * The proxy service used to perform REST calls. + */ + private final EvidencesService service; + + /** + * The service client containing this operation class. + */ + private final AppComplianceAutomationClientImpl client; + + /** + * Initializes an instance of EvidencesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + EvidencesClientImpl(AppComplianceAutomationClientImpl client) { + this.service + = RestProxy.create(EvidencesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AppComplianceAutomationClientEvidences to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "AppComplianceAutomat") + public interface EvidencesService { + @Headers({ "Content-Type: application/json" }) + @Get("/providers/Microsoft.AppComplianceAutomation/reports/{reportName}/evidences/{evidenceName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("reportName") String reportName, + @PathParam("evidenceName") String evidenceName, @HeaderParam("accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/providers/Microsoft.AppComplianceAutomation/reports/{reportName}/evidences/{evidenceName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @QueryParam("offerGuid") String offerGuid, + @QueryParam("reportCreatorTenantId") String reportCreatorTenantId, + @PathParam("reportName") String reportName, @PathParam("evidenceName") String evidenceName, + @HeaderParam("accept") String accept, @BodyParam("application/json") EvidenceResourceInner parameters, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/providers/Microsoft.AppComplianceAutomation/reports/{reportName}/evidences/{evidenceName}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("reportName") String reportName, + @PathParam("evidenceName") String evidenceName, @HeaderParam("accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/providers/Microsoft.AppComplianceAutomation/reports/{reportName}/evidences") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByReportResource(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @QueryParam("$skipToken") String skipToken, + @QueryParam("$top") Integer top, @QueryParam("$select") String select, @QueryParam("$filter") String filter, + @QueryParam("$orderby") String orderby, @QueryParam("offerGuid") String offerGuid, + @QueryParam("reportCreatorTenantId") String reportCreatorTenantId, + @PathParam("reportName") String reportName, @HeaderParam("accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/providers/Microsoft.AppComplianceAutomation/reports/{reportName}/evidences/{evidenceName}/download") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> download(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("reportName") String reportName, + @PathParam("evidenceName") String evidenceName, @HeaderParam("accept") String accept, + @BodyParam("application/json") EvidenceFileDownloadRequest body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByReportResourceNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("accept") String accept, Context context); + } + + /** + * Get the evidence metadata. + * + * @param reportName Report Name. + * @param evidenceName The evidence 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 evidence metadata along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String reportName, String evidenceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + if (evidenceName == null) { + return Mono.error(new IllegalArgumentException("Parameter evidenceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), reportName, + evidenceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the evidence metadata. + * + * @param reportName Report Name. + * @param evidenceName The evidence 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 evidence metadata along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String reportName, String evidenceName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + if (evidenceName == null) { + return Mono.error(new IllegalArgumentException("Parameter evidenceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), reportName, evidenceName, accept, + context); + } + + /** + * Get the evidence metadata. + * + * @param reportName Report Name. + * @param evidenceName The evidence 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 evidence metadata on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String reportName, String evidenceName) { + return getWithResponseAsync(reportName, evidenceName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the evidence metadata. + * + * @param reportName Report Name. + * @param evidenceName The evidence 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 evidence metadata along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String reportName, String evidenceName, Context context) { + return getWithResponseAsync(reportName, evidenceName, context).block(); + } + + /** + * Get the evidence metadata. + * + * @param reportName Report Name. + * @param evidenceName The evidence 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 evidence metadata. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EvidenceResourceInner get(String reportName, String evidenceName) { + return getWithResponse(reportName, evidenceName, Context.NONE).getValue(); + } + + /** + * Create or Update an evidence a specified report. + * + * @param reportName Report Name. + * @param evidenceName The evidence name. + * @param parameters Parameters for the create or update operation. + * @param offerGuid The offerGuid which mapping to the reports. + * @param reportCreatorTenantId The tenant id of the report creator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a class represent an AppComplianceAutomation evidence resource along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync(String reportName, + String evidenceName, EvidenceResourceInner parameters, String offerGuid, String reportCreatorTenantId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + if (evidenceName == null) { + return Mono.error(new IllegalArgumentException("Parameter evidenceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + offerGuid, reportCreatorTenantId, reportName, evidenceName, accept, parameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or Update an evidence a specified report. + * + * @param reportName Report Name. + * @param evidenceName The evidence name. + * @param parameters Parameters for the create or update operation. + * @param offerGuid The offerGuid which mapping to the reports. + * @param reportCreatorTenantId The tenant id of the report creator. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a class represent an AppComplianceAutomation evidence resource along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync(String reportName, + String evidenceName, EvidenceResourceInner parameters, String offerGuid, String reportCreatorTenantId, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + if (evidenceName == null) { + return Mono.error(new IllegalArgumentException("Parameter evidenceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), offerGuid, + reportCreatorTenantId, reportName, evidenceName, accept, parameters, context); + } + + /** + * Create or Update an evidence a specified report. + * + * @param reportName Report Name. + * @param evidenceName The evidence name. + * @param parameters Parameters for the create or update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a class represent an AppComplianceAutomation evidence resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String reportName, String evidenceName, + EvidenceResourceInner parameters) { + final String offerGuid = null; + final String reportCreatorTenantId = null; + return createOrUpdateWithResponseAsync(reportName, evidenceName, parameters, offerGuid, reportCreatorTenantId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Create or Update an evidence a specified report. + * + * @param reportName Report Name. + * @param evidenceName The evidence name. + * @param parameters Parameters for the create or update operation. + * @param offerGuid The offerGuid which mapping to the reports. + * @param reportCreatorTenantId The tenant id of the report creator. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a class represent an AppComplianceAutomation evidence resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String reportName, String evidenceName, + EvidenceResourceInner parameters, String offerGuid, String reportCreatorTenantId, Context context) { + return createOrUpdateWithResponseAsync(reportName, evidenceName, parameters, offerGuid, reportCreatorTenantId, + context).block(); + } + + /** + * Create or Update an evidence a specified report. + * + * @param reportName Report Name. + * @param evidenceName The evidence name. + * @param parameters Parameters for the create or update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a class represent an AppComplianceAutomation evidence resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EvidenceResourceInner createOrUpdate(String reportName, String evidenceName, + EvidenceResourceInner parameters) { + final String offerGuid = null; + final String reportCreatorTenantId = null; + return createOrUpdateWithResponse(reportName, evidenceName, parameters, offerGuid, reportCreatorTenantId, + Context.NONE).getValue(); + } + + /** + * Delete an existent evidence from a specified report. + * + * @param reportName Report Name. + * @param evidenceName The evidence 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 reportName, String evidenceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + if (evidenceName == null) { + return Mono.error(new IllegalArgumentException("Parameter evidenceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), reportName, + evidenceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete an existent evidence from a specified report. + * + * @param reportName Report Name. + * @param evidenceName The evidence 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 reportName, String evidenceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + if (evidenceName == null) { + return Mono.error(new IllegalArgumentException("Parameter evidenceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), reportName, evidenceName, accept, + context); + } + + /** + * Delete an existent evidence from a specified report. + * + * @param reportName Report Name. + * @param evidenceName The evidence 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 reportName, String evidenceName) { + return deleteWithResponseAsync(reportName, evidenceName).flatMap(ignored -> Mono.empty()); + } + + /** + * Delete an existent evidence from a specified report. + * + * @param reportName Report Name. + * @param evidenceName The evidence 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 reportName, String evidenceName, Context context) { + return deleteWithResponseAsync(reportName, evidenceName, context).block(); + } + + /** + * Delete an existent evidence from a specified report. + * + * @param reportName Report Name. + * @param evidenceName The evidence 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 reportName, String evidenceName) { + deleteWithResponse(reportName, evidenceName, Context.NONE); + } + + /** + * Returns a paginated list of evidences for a specified report. + * + * @param reportName Report Name. + * @param skipToken Skip over when retrieving results. + * @param top Number of elements to return when retrieving results. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. + * ?$select=reportName,id. + * @param filter The filter to apply on the operation. + * @param orderby OData order by query option. + * @param offerGuid The offerGuid which mapping to the reports. + * @param reportCreatorTenantId The tenant id of the report creator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of a EvidenceResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByReportResourceSinglePageAsync(String reportName, + String skipToken, Integer top, String select, String filter, String orderby, String offerGuid, + String reportCreatorTenantId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByReportResource(this.client.getEndpoint(), this.client.getApiVersion(), + skipToken, top, select, filter, orderby, offerGuid, reportCreatorTenantId, reportName, 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 paginated list of evidences for a specified report. + * + * @param reportName Report Name. + * @param skipToken Skip over when retrieving results. + * @param top Number of elements to return when retrieving results. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. + * ?$select=reportName,id. + * @param filter The filter to apply on the operation. + * @param orderby OData order by query option. + * @param offerGuid The offerGuid which mapping to the reports. + * @param reportCreatorTenantId The tenant id of the report creator. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of a EvidenceResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByReportResourceSinglePageAsync(String reportName, + String skipToken, Integer top, String select, String filter, String orderby, String offerGuid, + String reportCreatorTenantId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByReportResource(this.client.getEndpoint(), this.client.getApiVersion(), skipToken, top, select, + filter, orderby, offerGuid, reportCreatorTenantId, reportName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Returns a paginated list of evidences for a specified report. + * + * @param reportName Report Name. + * @param skipToken Skip over when retrieving results. + * @param top Number of elements to return when retrieving results. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. + * ?$select=reportName,id. + * @param filter The filter to apply on the operation. + * @param orderby OData order by query option. + * @param offerGuid The offerGuid which mapping to the reports. + * @param reportCreatorTenantId The tenant id of the report creator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of a EvidenceResource list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByReportResourceAsync(String reportName, String skipToken, Integer top, + String select, String filter, String orderby, String offerGuid, String reportCreatorTenantId) { + return new PagedFlux<>(() -> listByReportResourceSinglePageAsync(reportName, skipToken, top, select, filter, + orderby, offerGuid, reportCreatorTenantId), nextLink -> listByReportResourceNextSinglePageAsync(nextLink)); + } + + /** + * Returns a paginated list of evidences for a specified report. + * + * @param reportName Report 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 response of a EvidenceResource list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByReportResourceAsync(String reportName) { + final String skipToken = null; + final Integer top = null; + final String select = null; + final String filter = null; + final String orderby = null; + final String offerGuid = null; + final String reportCreatorTenantId = null; + return new PagedFlux<>(() -> listByReportResourceSinglePageAsync(reportName, skipToken, top, select, filter, + orderby, offerGuid, reportCreatorTenantId), nextLink -> listByReportResourceNextSinglePageAsync(nextLink)); + } + + /** + * Returns a paginated list of evidences for a specified report. + * + * @param reportName Report Name. + * @param skipToken Skip over when retrieving results. + * @param top Number of elements to return when retrieving results. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. + * ?$select=reportName,id. + * @param filter The filter to apply on the operation. + * @param orderby OData order by query option. + * @param offerGuid The offerGuid which mapping to the reports. + * @param reportCreatorTenantId The tenant id of the report creator. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of a EvidenceResource list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByReportResourceAsync(String reportName, String skipToken, Integer top, + String select, String filter, String orderby, String offerGuid, String reportCreatorTenantId, Context context) { + return new PagedFlux<>( + () -> listByReportResourceSinglePageAsync(reportName, skipToken, top, select, filter, orderby, offerGuid, + reportCreatorTenantId, context), + nextLink -> listByReportResourceNextSinglePageAsync(nextLink, context)); + } + + /** + * Returns a paginated list of evidences for a specified report. + * + * @param reportName Report 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 response of a EvidenceResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByReportResource(String reportName) { + final String skipToken = null; + final Integer top = null; + final String select = null; + final String filter = null; + final String orderby = null; + final String offerGuid = null; + final String reportCreatorTenantId = null; + return new PagedIterable<>(listByReportResourceAsync(reportName, skipToken, top, select, filter, orderby, + offerGuid, reportCreatorTenantId)); + } + + /** + * Returns a paginated list of evidences for a specified report. + * + * @param reportName Report Name. + * @param skipToken Skip over when retrieving results. + * @param top Number of elements to return when retrieving results. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. + * ?$select=reportName,id. + * @param filter The filter to apply on the operation. + * @param orderby OData order by query option. + * @param offerGuid The offerGuid which mapping to the reports. + * @param reportCreatorTenantId The tenant id of the report creator. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of a EvidenceResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByReportResource(String reportName, String skipToken, Integer top, + String select, String filter, String orderby, String offerGuid, String reportCreatorTenantId, Context context) { + return new PagedIterable<>(listByReportResourceAsync(reportName, skipToken, top, select, filter, orderby, + offerGuid, reportCreatorTenantId, context)); + } + + /** + * Download evidence file. + * + * @param reportName Report Name. + * @param evidenceName The evidence name. + * @param body Parameters for the query operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return object that includes all the possible response for the evidence file download operation along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> downloadWithResponseAsync(String reportName, + String evidenceName, EvidenceFileDownloadRequest body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + if (evidenceName == null) { + return Mono.error(new IllegalArgumentException("Parameter evidenceName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.download(this.client.getEndpoint(), this.client.getApiVersion(), reportName, + evidenceName, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Download evidence file. + * + * @param reportName Report Name. + * @param evidenceName The evidence name. + * @param body Parameters for the query operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return object that includes all the possible response for the evidence file download operation along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> downloadWithResponseAsync(String reportName, + String evidenceName, EvidenceFileDownloadRequest body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + if (evidenceName == null) { + return Mono.error(new IllegalArgumentException("Parameter evidenceName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.download(this.client.getEndpoint(), this.client.getApiVersion(), reportName, evidenceName, + accept, body, context); + } + + /** + * Download evidence file. + * + * @param reportName Report Name. + * @param evidenceName The evidence name. + * @param body Parameters for the query operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return object that includes all the possible response for the evidence file download operation on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono downloadAsync(String reportName, String evidenceName, + EvidenceFileDownloadRequest body) { + return downloadWithResponseAsync(reportName, evidenceName, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Download evidence file. + * + * @param reportName Report Name. + * @param evidenceName The evidence name. + * @param body Parameters for the query operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return object that includes all the possible response for the evidence file download operation along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response downloadWithResponse(String reportName, String evidenceName, + EvidenceFileDownloadRequest body, Context context) { + return downloadWithResponseAsync(reportName, evidenceName, body, context).block(); + } + + /** + * Download evidence file. + * + * @param reportName Report Name. + * @param evidenceName The evidence name. + * @param body Parameters for the query operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return object that includes all the possible response for the evidence file download operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EvidenceFileDownloadResponseInner download(String reportName, String evidenceName, + EvidenceFileDownloadRequest body) { + return downloadWithResponse(reportName, evidenceName, body, Context.NONE).getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of a EvidenceResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByReportResourceNextSinglePageAsync(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.listByReportResourceNext(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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of a EvidenceResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByReportResourceNextSinglePageAsync(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.listByReportResourceNext(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/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/EvidencesImpl.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/EvidencesImpl.java new file mode 100644 index 0000000000000..2e76c884d96b4 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/EvidencesImpl.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.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.appcomplianceautomation.fluent.EvidencesClient; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.EvidenceFileDownloadResponseInner; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.EvidenceResourceInner; +import com.azure.resourcemanager.appcomplianceautomation.models.EvidenceFileDownloadRequest; +import com.azure.resourcemanager.appcomplianceautomation.models.EvidenceFileDownloadResponse; +import com.azure.resourcemanager.appcomplianceautomation.models.EvidenceResource; +import com.azure.resourcemanager.appcomplianceautomation.models.Evidences; + +public final class EvidencesImpl implements Evidences { + private static final ClientLogger LOGGER = new ClientLogger(EvidencesImpl.class); + + private final EvidencesClient innerClient; + + private final com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager serviceManager; + + public EvidencesImpl(EvidencesClient innerClient, + com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String reportName, String evidenceName, Context context) { + Response inner = this.serviceClient().getWithResponse(reportName, evidenceName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new EvidenceResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public EvidenceResource get(String reportName, String evidenceName) { + EvidenceResourceInner inner = this.serviceClient().get(reportName, evidenceName); + if (inner != null) { + return new EvidenceResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response createOrUpdateWithResponse(String reportName, String evidenceName, + EvidenceResourceInner parameters, String offerGuid, String reportCreatorTenantId, Context context) { + Response inner = this.serviceClient() + .createOrUpdateWithResponse(reportName, evidenceName, parameters, offerGuid, reportCreatorTenantId, + context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new EvidenceResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public EvidenceResource createOrUpdate(String reportName, String evidenceName, EvidenceResourceInner parameters) { + EvidenceResourceInner inner = this.serviceClient().createOrUpdate(reportName, evidenceName, parameters); + if (inner != null) { + return new EvidenceResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response deleteByResourceGroupWithResponse(String reportName, String evidenceName, Context context) { + return this.serviceClient().deleteWithResponse(reportName, evidenceName, context); + } + + public void deleteByResourceGroup(String reportName, String evidenceName) { + this.serviceClient().delete(reportName, evidenceName); + } + + public PagedIterable listByReportResource(String reportName) { + PagedIterable inner = this.serviceClient().listByReportResource(reportName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EvidenceResourceImpl(inner1, this.manager())); + } + + public PagedIterable listByReportResource(String reportName, String skipToken, Integer top, + String select, String filter, String orderby, String offerGuid, String reportCreatorTenantId, Context context) { + PagedIterable inner = this.serviceClient() + .listByReportResource(reportName, skipToken, top, select, filter, orderby, offerGuid, reportCreatorTenantId, + context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EvidenceResourceImpl(inner1, this.manager())); + } + + public Response downloadWithResponse(String reportName, String evidenceName, + EvidenceFileDownloadRequest body, Context context) { + Response inner + = this.serviceClient().downloadWithResponse(reportName, evidenceName, body, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new EvidenceFileDownloadResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public EvidenceFileDownloadResponse download(String reportName, String evidenceName, + EvidenceFileDownloadRequest body) { + EvidenceFileDownloadResponseInner inner = this.serviceClient().download(reportName, evidenceName, body); + if (inner != null) { + return new EvidenceFileDownloadResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + private EvidencesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/GetCollectionCountResponseImpl.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/GetCollectionCountResponseImpl.java new file mode 100644 index 0000000000000..70614c5ecb211 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/GetCollectionCountResponseImpl.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.implementation; + +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.GetCollectionCountResponseInner; +import com.azure.resourcemanager.appcomplianceautomation.models.GetCollectionCountResponse; + +public final class GetCollectionCountResponseImpl implements GetCollectionCountResponse { + private GetCollectionCountResponseInner innerObject; + + private final com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager serviceManager; + + GetCollectionCountResponseImpl(GetCollectionCountResponseInner innerObject, + com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public Integer count() { + return this.innerModel().count(); + } + + public GetCollectionCountResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/GetOverviewStatusResponseImpl.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/GetOverviewStatusResponseImpl.java new file mode 100644 index 0000000000000..a7de40664d31b --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/GetOverviewStatusResponseImpl.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.implementation; + +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.GetOverviewStatusResponseInner; +import com.azure.resourcemanager.appcomplianceautomation.models.GetOverviewStatusResponse; +import com.azure.resourcemanager.appcomplianceautomation.models.StatusItem; +import java.util.Collections; +import java.util.List; + +public final class GetOverviewStatusResponseImpl implements GetOverviewStatusResponse { + private GetOverviewStatusResponseInner innerObject; + + private final com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager serviceManager; + + GetOverviewStatusResponseImpl(GetOverviewStatusResponseInner innerObject, + com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List statusList() { + List inner = this.innerModel().statusList(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public GetOverviewStatusResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ListInUseStorageAccountsResponseImpl.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ListInUseStorageAccountsResponseImpl.java new file mode 100644 index 0000000000000..03be3a8530ccf --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ListInUseStorageAccountsResponseImpl.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.implementation; + +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.ListInUseStorageAccountsResponseInner; +import com.azure.resourcemanager.appcomplianceautomation.models.ListInUseStorageAccountsResponse; +import com.azure.resourcemanager.appcomplianceautomation.models.StorageInfo; +import java.util.Collections; +import java.util.List; + +public final class ListInUseStorageAccountsResponseImpl implements ListInUseStorageAccountsResponse { + private ListInUseStorageAccountsResponseInner innerObject; + + private final com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager serviceManager; + + ListInUseStorageAccountsResponseImpl(ListInUseStorageAccountsResponseInner innerObject, + com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List storageAccountList() { + List inner = this.innerModel().storageAccountList(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public ListInUseStorageAccountsResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/OperationImpl.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/OperationImpl.java index 59912bb268b05..cfa94cfe3b0ec 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/OperationImpl.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/OperationImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.implementation; @@ -15,8 +15,7 @@ public final class OperationImpl implements Operation { private final com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager serviceManager; - OperationImpl( - OperationInner innerObject, + OperationImpl(OperationInner innerObject, com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/OperationsClientImpl.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/OperationsClientImpl.java index 0118176dbe2ef..23a3211d47dd8 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/OperationsClientImpl.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/OperationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.implementation; @@ -27,128 +27,109 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.appcomplianceautomation.fluent.OperationsClient; import com.azure.resourcemanager.appcomplianceautomation.fluent.models.OperationInner; -import com.azure.resourcemanager.appcomplianceautomation.models.OperationListResult; +import com.azure.resourcemanager.appcomplianceautomation.implementation.models.PagedOperation; 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. */ - private final AppComplianceAutomationToolForMicrosoft365Impl client; + /** + * The service client containing this operation class. + */ + private final AppComplianceAutomationClientImpl client; /** * Initializes an instance of OperationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ - OperationsClientImpl(AppComplianceAutomationToolForMicrosoft365Impl client) { - this.service = - RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + OperationsClientImpl(AppComplianceAutomationClientImpl client) { + this.service + = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AppComplianceAutomationToolForMicrosoft365Operations to be used by - * the proxy service to perform REST calls. + * The interface defining all the services for AppComplianceAutomationClientOperations to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "AppComplianceAutomat") public interface OperationsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.AppComplianceAutomation/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("endpoint") 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("endpoint") String endpoint, @HeaderParam("accept") String accept, Context context); } /** - * Lists all of the available REST API operations of the Microsoft.AppComplianceAutomation provider. - * + * List the operations for the provider. + * * @throws ManagementException 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 REST API operations supported by an Azure 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 accept = "application/json"; return FluxUtil .withContext( context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), 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())); } /** - * Lists all of the available REST API operations of the Microsoft.AppComplianceAutomation provider. - * + * List the operations for the provider. + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 REST API operations supported by an Azure 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 accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), 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.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Lists all of the available REST API operations of the Microsoft.AppComplianceAutomation provider. - * + * List the operations for the provider. + * * @throws ManagementException 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 REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedFlux}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -156,28 +137,28 @@ private PagedFlux listAsync() { } /** - * Lists all of the available REST API operations of the Microsoft.AppComplianceAutomation provider. - * + * List the operations for the provider. + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedFlux}. + * @return a list of REST API operations supported by an Azure 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)); } /** - * Lists all of the available REST API operations of the Microsoft.AppComplianceAutomation provider. - * + * List the operations for the provider. + * * @throws ManagementException 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 REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -185,14 +166,14 @@ public PagedIterable list() { } /** - * Lists all of the available REST API operations of the Microsoft.AppComplianceAutomation provider. - * + * List the operations for the provider. + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -201,14 +182,13 @@ 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. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 REST API operations supported by an Azure 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) { @@ -216,37 +196,26 @@ 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. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 REST API operations supported by an Azure 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) { @@ -254,23 +223,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/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/OperationsImpl.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/OperationsImpl.java index 8fd2d159ded0d..ebaffe55d5c33 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/OperationsImpl.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/OperationsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.implementation; @@ -19,8 +19,7 @@ public final class OperationsImpl implements Operations { private final com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager serviceManager; - public OperationsImpl( - OperationsClient innerClient, + public OperationsImpl(OperationsClient innerClient, com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -28,12 +27,12 @@ public OperationsImpl( 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/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ProviderActionsClientImpl.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ProviderActionsClientImpl.java new file mode 100644 index 0000000000000..0847a31b218d2 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ProviderActionsClientImpl.java @@ -0,0 +1,879 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.implementation; + +import com.azure.core.annotation.BodyParam; +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.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.ManagementError; +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.appcomplianceautomation.fluent.ProviderActionsClient; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.CheckNameAvailabilityResponseInner; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.GetCollectionCountResponseInner; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.GetOverviewStatusResponseInner; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.ListInUseStorageAccountsResponseInner; +import com.azure.resourcemanager.appcomplianceautomation.models.CheckNameAvailabilityRequest; +import com.azure.resourcemanager.appcomplianceautomation.models.GetCollectionCountRequest; +import com.azure.resourcemanager.appcomplianceautomation.models.GetOverviewStatusRequest; +import com.azure.resourcemanager.appcomplianceautomation.models.ListInUseStorageAccountsRequest; +import com.azure.resourcemanager.appcomplianceautomation.models.OnboardRequest; +import com.azure.resourcemanager.appcomplianceautomation.models.TriggerEvaluationRequest; +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 ProviderActionsClient. + */ +public final class ProviderActionsClientImpl implements ProviderActionsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ProviderActionsService service; + + /** + * The service client containing this operation class. + */ + private final AppComplianceAutomationClientImpl client; + + /** + * Initializes an instance of ProviderActionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ProviderActionsClientImpl(AppComplianceAutomationClientImpl client) { + this.service + = RestProxy.create(ProviderActionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AppComplianceAutomationClientProviderActions to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "AppComplianceAutomat") + public interface ProviderActionsService { + @Headers({ "Content-Type: application/json" }) + @Post("/providers/Microsoft.AppComplianceAutomation/checkNameAvailability") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> checkNameAvailability(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("accept") String accept, + @BodyParam("application/json") CheckNameAvailabilityRequest body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/providers/Microsoft.AppComplianceAutomation/getCollectionCount") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getCollectionCount(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("accept") String accept, + @BodyParam("application/json") GetCollectionCountRequest body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/providers/Microsoft.AppComplianceAutomation/getOverviewStatus") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getOverviewStatus(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("accept") String accept, + @BodyParam("application/json") GetOverviewStatusRequest body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/providers/Microsoft.AppComplianceAutomation/onboard") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> onboard(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("accept") String accept, + @BodyParam("application/json") OnboardRequest body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/providers/Microsoft.AppComplianceAutomation/triggerEvaluation") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> triggerEvaluation(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("accept") String accept, + @BodyParam("application/json") TriggerEvaluationRequest body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/providers/Microsoft.AppComplianceAutomation/listInUseStorageAccounts") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listInUseStorageAccounts( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @HeaderParam("accept") String accept, @BodyParam("application/json") ListInUseStorageAccountsRequest body, + Context context); + } + + /** + * Check if the given name is available for a report. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 check availability result along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + checkNameAvailabilityWithResponseAsync(CheckNameAvailabilityRequest body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.checkNameAvailability(this.client.getEndpoint(), + this.client.getApiVersion(), accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Check if the given name is available for a report. + * + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 check availability result along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + checkNameAvailabilityWithResponseAsync(CheckNameAvailabilityRequest body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.checkNameAvailability(this.client.getEndpoint(), this.client.getApiVersion(), accept, body, + context); + } + + /** + * Check if the given name is available for a report. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 check availability result on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono checkNameAvailabilityAsync(CheckNameAvailabilityRequest body) { + return checkNameAvailabilityWithResponseAsync(body).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Check if the given name is available for a report. + * + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 check availability result along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response + checkNameAvailabilityWithResponse(CheckNameAvailabilityRequest body, Context context) { + return checkNameAvailabilityWithResponseAsync(body, context).block(); + } + + /** + * Check if the given name is available for a report. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 check availability result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CheckNameAvailabilityResponseInner checkNameAvailability(CheckNameAvailabilityRequest body) { + return checkNameAvailabilityWithResponse(body, Context.NONE).getValue(); + } + + /** + * Get the count of reports. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 count of reports along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getCollectionCountWithResponseAsync(GetCollectionCountRequest body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getCollectionCount(this.client.getEndpoint(), this.client.getApiVersion(), + accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the count of reports. + * + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 count of reports along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getCollectionCountWithResponseAsync(GetCollectionCountRequest body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getCollectionCount(this.client.getEndpoint(), this.client.getApiVersion(), accept, body, + context); + } + + /** + * Get the count of reports. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 count of reports on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getCollectionCountAsync(GetCollectionCountRequest body) { + return getCollectionCountWithResponseAsync(body).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the count of reports. + * + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 count of reports along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getCollectionCountWithResponse(GetCollectionCountRequest body, + Context context) { + return getCollectionCountWithResponseAsync(body, context).block(); + } + + /** + * Get the count of reports. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 count of reports. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public GetCollectionCountResponseInner getCollectionCount(GetCollectionCountRequest body) { + return getCollectionCountWithResponse(body, Context.NONE).getValue(); + } + + /** + * Get the resource overview status. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 overview status along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getOverviewStatusWithResponseAsync(GetOverviewStatusRequest body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getOverviewStatus(this.client.getEndpoint(), this.client.getApiVersion(), + accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the resource overview status. + * + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 overview status along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getOverviewStatusWithResponseAsync(GetOverviewStatusRequest body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getOverviewStatus(this.client.getEndpoint(), this.client.getApiVersion(), accept, body, context); + } + + /** + * Get the resource overview status. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 overview status on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getOverviewStatusAsync(GetOverviewStatusRequest body) { + return getOverviewStatusWithResponseAsync(body).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the resource overview status. + * + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 overview status along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getOverviewStatusWithResponse(GetOverviewStatusRequest body, + Context context) { + return getOverviewStatusWithResponseAsync(body, context).block(); + } + + /** + * Get the resource overview status. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 overview status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public GetOverviewStatusResponseInner getOverviewStatus(GetOverviewStatusRequest body) { + return getOverviewStatusWithResponse(body, Context.NONE).getValue(); + } + + /** + * Onboard given subscriptions to Microsoft.AppComplianceAutomation provider. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> onboardWithResponseAsync(OnboardRequest body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil.withContext( + context -> service.onboard(this.client.getEndpoint(), this.client.getApiVersion(), accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Onboard given subscriptions to Microsoft.AppComplianceAutomation provider. + * + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> onboardWithResponseAsync(OnboardRequest body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.onboard(this.client.getEndpoint(), this.client.getApiVersion(), accept, body, context); + } + + /** + * Onboard given subscriptions to Microsoft.AppComplianceAutomation provider. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, ManagementError> beginOnboardAsync(OnboardRequest body) { + Mono>> mono = onboardWithResponseAsync(body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ManagementError.class, ManagementError.class, this.client.getContext()); + } + + /** + * Onboard given subscriptions to Microsoft.AppComplianceAutomation provider. + * + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, ManagementError> beginOnboardAsync(OnboardRequest body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = onboardWithResponseAsync(body, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ManagementError.class, ManagementError.class, context); + } + + /** + * Onboard given subscriptions to Microsoft.AppComplianceAutomation provider. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, ManagementError> beginOnboard(OnboardRequest body) { + return this.beginOnboardAsync(body).getSyncPoller(); + } + + /** + * Onboard given subscriptions to Microsoft.AppComplianceAutomation provider. + * + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, ManagementError> beginOnboard(OnboardRequest body, Context context) { + return this.beginOnboardAsync(body, context).getSyncPoller(); + } + + /** + * Onboard given subscriptions to Microsoft.AppComplianceAutomation provider. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono onboardAsync(OnboardRequest body) { + return beginOnboardAsync(body).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Onboard given subscriptions to Microsoft.AppComplianceAutomation provider. + * + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono onboardAsync(OnboardRequest body, Context context) { + return beginOnboardAsync(body, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Onboard given subscriptions to Microsoft.AppComplianceAutomation provider. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagementError onboard(OnboardRequest body) { + return onboardAsync(body).block(); + } + + /** + * Onboard given subscriptions to Microsoft.AppComplianceAutomation provider. + * + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagementError onboard(OnboardRequest body, Context context) { + return onboardAsync(body, context).block(); + } + + /** + * Trigger quick evaluation for the given subscriptions. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> triggerEvaluationWithResponseAsync(TriggerEvaluationRequest body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.triggerEvaluation(this.client.getEndpoint(), this.client.getApiVersion(), + accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Trigger quick evaluation for the given subscriptions. + * + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> triggerEvaluationWithResponseAsync(TriggerEvaluationRequest body, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.triggerEvaluation(this.client.getEndpoint(), this.client.getApiVersion(), accept, body, context); + } + + /** + * Trigger quick evaluation for the given subscriptions. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, ManagementError> + beginTriggerEvaluationAsync(TriggerEvaluationRequest body) { + Mono>> mono = triggerEvaluationWithResponseAsync(body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ManagementError.class, ManagementError.class, this.client.getContext()); + } + + /** + * Trigger quick evaluation for the given subscriptions. + * + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, ManagementError> + beginTriggerEvaluationAsync(TriggerEvaluationRequest body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = triggerEvaluationWithResponseAsync(body, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ManagementError.class, ManagementError.class, context); + } + + /** + * Trigger quick evaluation for the given subscriptions. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, ManagementError> + beginTriggerEvaluation(TriggerEvaluationRequest body) { + return this.beginTriggerEvaluationAsync(body).getSyncPoller(); + } + + /** + * Trigger quick evaluation for the given subscriptions. + * + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, ManagementError> + beginTriggerEvaluation(TriggerEvaluationRequest body, Context context) { + return this.beginTriggerEvaluationAsync(body, context).getSyncPoller(); + } + + /** + * Trigger quick evaluation for the given subscriptions. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono triggerEvaluationAsync(TriggerEvaluationRequest body) { + return beginTriggerEvaluationAsync(body).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Trigger quick evaluation for the given subscriptions. + * + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono triggerEvaluationAsync(TriggerEvaluationRequest body, Context context) { + return beginTriggerEvaluationAsync(body, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Trigger quick evaluation for the given subscriptions. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagementError triggerEvaluation(TriggerEvaluationRequest body) { + return triggerEvaluationAsync(body).block(); + } + + /** + * Trigger quick evaluation for the given subscriptions. + * + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagementError triggerEvaluation(TriggerEvaluationRequest body, Context context) { + return triggerEvaluationAsync(body, context).block(); + } + + /** + * List the storage accounts which are in use by related reports. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return parameters for listing in use storage accounts operation along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listInUseStorageAccountsWithResponseAsync(ListInUseStorageAccountsRequest body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listInUseStorageAccounts(this.client.getEndpoint(), + this.client.getApiVersion(), accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List the storage accounts which are in use by related reports. + * + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return parameters for listing in use storage accounts operation along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listInUseStorageAccountsWithResponseAsync(ListInUseStorageAccountsRequest body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listInUseStorageAccounts(this.client.getEndpoint(), this.client.getApiVersion(), accept, body, + context); + } + + /** + * List the storage accounts which are in use by related reports. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return parameters for listing in use storage accounts operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono + listInUseStorageAccountsAsync(ListInUseStorageAccountsRequest body) { + return listInUseStorageAccountsWithResponseAsync(body).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * List the storage accounts which are in use by related reports. + * + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return parameters for listing in use storage accounts operation along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response + listInUseStorageAccountsWithResponse(ListInUseStorageAccountsRequest body, Context context) { + return listInUseStorageAccountsWithResponseAsync(body, context).block(); + } + + /** + * List the storage accounts which are in use by related reports. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return parameters for listing in use storage accounts operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ListInUseStorageAccountsResponseInner listInUseStorageAccounts(ListInUseStorageAccountsRequest body) { + return listInUseStorageAccountsWithResponse(body, Context.NONE).getValue(); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ProviderActionsImpl.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ProviderActionsImpl.java new file mode 100644 index 0000000000000..2fb32f7178b81 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ProviderActionsImpl.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcomplianceautomation.fluent.ProviderActionsClient; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.CheckNameAvailabilityResponseInner; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.GetCollectionCountResponseInner; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.GetOverviewStatusResponseInner; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.ListInUseStorageAccountsResponseInner; +import com.azure.resourcemanager.appcomplianceautomation.models.CheckNameAvailabilityRequest; +import com.azure.resourcemanager.appcomplianceautomation.models.CheckNameAvailabilityResponse; +import com.azure.resourcemanager.appcomplianceautomation.models.GetCollectionCountRequest; +import com.azure.resourcemanager.appcomplianceautomation.models.GetCollectionCountResponse; +import com.azure.resourcemanager.appcomplianceautomation.models.GetOverviewStatusRequest; +import com.azure.resourcemanager.appcomplianceautomation.models.GetOverviewStatusResponse; +import com.azure.resourcemanager.appcomplianceautomation.models.ListInUseStorageAccountsRequest; +import com.azure.resourcemanager.appcomplianceautomation.models.ListInUseStorageAccountsResponse; +import com.azure.resourcemanager.appcomplianceautomation.models.OnboardRequest; +import com.azure.resourcemanager.appcomplianceautomation.models.ProviderActions; +import com.azure.resourcemanager.appcomplianceautomation.models.TriggerEvaluationRequest; + +public final class ProviderActionsImpl implements ProviderActions { + private static final ClientLogger LOGGER = new ClientLogger(ProviderActionsImpl.class); + + private final ProviderActionsClient innerClient; + + private final com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager serviceManager; + + public ProviderActionsImpl(ProviderActionsClient innerClient, + com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response checkNameAvailabilityWithResponse(CheckNameAvailabilityRequest body, + Context context) { + Response inner + = this.serviceClient().checkNameAvailabilityWithResponse(body, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new CheckNameAvailabilityResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public CheckNameAvailabilityResponse checkNameAvailability(CheckNameAvailabilityRequest body) { + CheckNameAvailabilityResponseInner inner = this.serviceClient().checkNameAvailability(body); + if (inner != null) { + return new CheckNameAvailabilityResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getCollectionCountWithResponse(GetCollectionCountRequest body, + Context context) { + Response inner + = this.serviceClient().getCollectionCountWithResponse(body, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new GetCollectionCountResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public GetCollectionCountResponse getCollectionCount(GetCollectionCountRequest body) { + GetCollectionCountResponseInner inner = this.serviceClient().getCollectionCount(body); + if (inner != null) { + return new GetCollectionCountResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getOverviewStatusWithResponse(GetOverviewStatusRequest body, + Context context) { + Response inner + = this.serviceClient().getOverviewStatusWithResponse(body, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new GetOverviewStatusResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public GetOverviewStatusResponse getOverviewStatus(GetOverviewStatusRequest body) { + GetOverviewStatusResponseInner inner = this.serviceClient().getOverviewStatus(body); + if (inner != null) { + return new GetOverviewStatusResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public ManagementError onboard(OnboardRequest body) { + return this.serviceClient().onboard(body); + } + + public ManagementError onboard(OnboardRequest body, Context context) { + return this.serviceClient().onboard(body, context); + } + + public ManagementError triggerEvaluation(TriggerEvaluationRequest body) { + return this.serviceClient().triggerEvaluation(body); + } + + public ManagementError triggerEvaluation(TriggerEvaluationRequest body, Context context) { + return this.serviceClient().triggerEvaluation(body, context); + } + + public Response + listInUseStorageAccountsWithResponse(ListInUseStorageAccountsRequest body, Context context) { + Response inner + = this.serviceClient().listInUseStorageAccountsWithResponse(body, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ListInUseStorageAccountsResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ListInUseStorageAccountsResponse listInUseStorageAccounts(ListInUseStorageAccountsRequest body) { + ListInUseStorageAccountsResponseInner inner = this.serviceClient().listInUseStorageAccounts(body); + if (inner != null) { + return new ListInUseStorageAccountsResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + private ProviderActionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ReportOperationsClientImpl.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ReportOperationsClientImpl.java deleted file mode 100644 index c2a55252c22cc..0000000000000 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ReportOperationsClientImpl.java +++ /dev/null @@ -1,827 +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.appcomplianceautomation.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.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.appcomplianceautomation.fluent.ReportOperationsClient; -import com.azure.resourcemanager.appcomplianceautomation.fluent.models.ReportResourceInner; -import com.azure.resourcemanager.appcomplianceautomation.models.ReportResourcePatch; -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 ReportOperationsClient. */ -public final class ReportOperationsClientImpl implements ReportOperationsClient { - /** The proxy service used to perform REST calls. */ - private final ReportOperationsService service; - - /** The service client containing this operation class. */ - private final AppComplianceAutomationToolForMicrosoft365Impl client; - - /** - * Initializes an instance of ReportOperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ReportOperationsClientImpl(AppComplianceAutomationToolForMicrosoft365Impl client) { - this.service = - RestProxy.create(ReportOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AppComplianceAutomationToolForMicrosoft365ReportOperations to be used - * by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AppComplianceAutomat") - public interface ReportOperationsService { - @Headers({"Content-Type: application/json"}) - @Get("/providers/Microsoft.AppComplianceAutomation/reports/{reportName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("reportName") String reportName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put("/providers/Microsoft.AppComplianceAutomation/reports/{reportName}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("reportName") String reportName, - @BodyParam("application/json") ReportResourceInner parameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch("/providers/Microsoft.AppComplianceAutomation/reports/{reportName}") - @ExpectedResponses({200, 201, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("reportName") String reportName, - @BodyParam("application/json") ReportResourcePatch parameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete("/providers/Microsoft.AppComplianceAutomation/reports/{reportName}") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("reportName") String reportName, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Get the AppComplianceAutomation report and its properties. - * - * @param reportName Report 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 AppComplianceAutomation report and its properties along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String reportName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (reportName == null) { - return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service.get(this.client.getEndpoint(), this.client.getApiVersion(), reportName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the AppComplianceAutomation report and its properties. - * - * @param reportName Report 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 AppComplianceAutomation report and its properties along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String reportName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (reportName == null) { - return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), reportName, accept, context); - } - - /** - * Get the AppComplianceAutomation report and its properties. - * - * @param reportName Report 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 AppComplianceAutomation report and its properties on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String reportName) { - return getWithResponseAsync(reportName).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get the AppComplianceAutomation report and its properties. - * - * @param reportName Report 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 AppComplianceAutomation report and its properties along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String reportName, Context context) { - return getWithResponseAsync(reportName, context).block(); - } - - /** - * Get the AppComplianceAutomation report and its properties. - * - * @param reportName Report 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 AppComplianceAutomation report and its properties. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReportResourceInner get(String reportName) { - return getWithResponse(reportName, Context.NONE).getValue(); - } - - /** - * Create a new AppComplianceAutomation report or update an exiting AppComplianceAutomation report. - * - * @param reportName Report Name. - * @param parameters Parameters for the create or update operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a class represent an AppComplianceAutomation report resource along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String reportName, ReportResourceInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (reportName == null) { - return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - reportName, - parameters, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a new AppComplianceAutomation report or update an exiting AppComplianceAutomation report. - * - * @param reportName Report Name. - * @param parameters Parameters for the create or update operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a class represent an AppComplianceAutomation report resource along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String reportName, ReportResourceInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (reportName == null) { - return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), this.client.getApiVersion(), reportName, parameters, accept, context); - } - - /** - * Create a new AppComplianceAutomation report or update an exiting AppComplianceAutomation report. - * - * @param reportName Report Name. - * @param parameters Parameters for the create or update operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a class represent an AppComplianceAutomation report resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ReportResourceInner> beginCreateOrUpdateAsync( - String reportName, ReportResourceInner parameters) { - Mono>> mono = createOrUpdateWithResponseAsync(reportName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ReportResourceInner.class, - ReportResourceInner.class, - this.client.getContext()); - } - - /** - * Create a new AppComplianceAutomation report or update an exiting AppComplianceAutomation report. - * - * @param reportName Report Name. - * @param parameters Parameters for the create or update operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a class represent an AppComplianceAutomation report resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ReportResourceInner> beginCreateOrUpdateAsync( - String reportName, ReportResourceInner parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createOrUpdateWithResponseAsync(reportName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ReportResourceInner.class, ReportResourceInner.class, context); - } - - /** - * Create a new AppComplianceAutomation report or update an exiting AppComplianceAutomation report. - * - * @param reportName Report Name. - * @param parameters Parameters for the create or update operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a class represent an AppComplianceAutomation report resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReportResourceInner> beginCreateOrUpdate( - String reportName, ReportResourceInner parameters) { - return beginCreateOrUpdateAsync(reportName, parameters).getSyncPoller(); - } - - /** - * Create a new AppComplianceAutomation report or update an exiting AppComplianceAutomation report. - * - * @param reportName Report Name. - * @param parameters Parameters for the create or update operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a class represent an AppComplianceAutomation report resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReportResourceInner> beginCreateOrUpdate( - String reportName, ReportResourceInner parameters, Context context) { - return beginCreateOrUpdateAsync(reportName, parameters, context).getSyncPoller(); - } - - /** - * Create a new AppComplianceAutomation report or update an exiting AppComplianceAutomation report. - * - * @param reportName Report Name. - * @param parameters Parameters for the create or update operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a class represent an AppComplianceAutomation report resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String reportName, ReportResourceInner parameters) { - return beginCreateOrUpdateAsync(reportName, parameters).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a new AppComplianceAutomation report or update an exiting AppComplianceAutomation report. - * - * @param reportName Report Name. - * @param parameters Parameters for the create or update operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a class represent an AppComplianceAutomation report resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String reportName, ReportResourceInner parameters, Context context) { - return beginCreateOrUpdateAsync(reportName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a new AppComplianceAutomation report or update an exiting AppComplianceAutomation report. - * - * @param reportName Report Name. - * @param parameters Parameters for the create or update operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a class represent an AppComplianceAutomation report resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReportResourceInner createOrUpdate(String reportName, ReportResourceInner parameters) { - return createOrUpdateAsync(reportName, parameters).block(); - } - - /** - * Create a new AppComplianceAutomation report or update an exiting AppComplianceAutomation report. - * - * @param reportName Report Name. - * @param parameters Parameters for the create or update operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a class represent an AppComplianceAutomation report resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReportResourceInner createOrUpdate(String reportName, ReportResourceInner parameters, Context context) { - return createOrUpdateAsync(reportName, parameters, context).block(); - } - - /** - * Update an exiting AppComplianceAutomation report. - * - * @param reportName Report Name. - * @param parameters Parameters for the create or update operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a class represent an AppComplianceAutomation report resource along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String reportName, ReportResourcePatch parameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (reportName == null) { - return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - reportName, - parameters, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update an exiting AppComplianceAutomation report. - * - * @param reportName Report Name. - * @param parameters Parameters for the create or update operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a class represent an AppComplianceAutomation report resource along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String reportName, ReportResourcePatch parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (reportName == null) { - return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .update(this.client.getEndpoint(), this.client.getApiVersion(), reportName, parameters, accept, context); - } - - /** - * Update an exiting AppComplianceAutomation report. - * - * @param reportName Report Name. - * @param parameters Parameters for the create or update operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a class represent an AppComplianceAutomation report resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ReportResourceInner> beginUpdateAsync( - String reportName, ReportResourcePatch parameters) { - Mono>> mono = updateWithResponseAsync(reportName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ReportResourceInner.class, - ReportResourceInner.class, - this.client.getContext()); - } - - /** - * Update an exiting AppComplianceAutomation report. - * - * @param reportName Report Name. - * @param parameters Parameters for the create or update operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a class represent an AppComplianceAutomation report resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ReportResourceInner> beginUpdateAsync( - String reportName, ReportResourcePatch parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = updateWithResponseAsync(reportName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ReportResourceInner.class, ReportResourceInner.class, context); - } - - /** - * Update an exiting AppComplianceAutomation report. - * - * @param reportName Report Name. - * @param parameters Parameters for the create or update operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a class represent an AppComplianceAutomation report resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReportResourceInner> beginUpdate( - String reportName, ReportResourcePatch parameters) { - return beginUpdateAsync(reportName, parameters).getSyncPoller(); - } - - /** - * Update an exiting AppComplianceAutomation report. - * - * @param reportName Report Name. - * @param parameters Parameters for the create or update operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a class represent an AppComplianceAutomation report resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReportResourceInner> beginUpdate( - String reportName, ReportResourcePatch parameters, Context context) { - return beginUpdateAsync(reportName, parameters, context).getSyncPoller(); - } - - /** - * Update an exiting AppComplianceAutomation report. - * - * @param reportName Report Name. - * @param parameters Parameters for the create or update operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a class represent an AppComplianceAutomation report resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String reportName, ReportResourcePatch parameters) { - return beginUpdateAsync(reportName, parameters).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update an exiting AppComplianceAutomation report. - * - * @param reportName Report Name. - * @param parameters Parameters for the create or update operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a class represent an AppComplianceAutomation report resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String reportName, ReportResourcePatch parameters, Context context) { - return beginUpdateAsync(reportName, parameters, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update an exiting AppComplianceAutomation report. - * - * @param reportName Report Name. - * @param parameters Parameters for the create or update operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a class represent an AppComplianceAutomation report resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReportResourceInner update(String reportName, ReportResourcePatch parameters) { - return updateAsync(reportName, parameters).block(); - } - - /** - * Update an exiting AppComplianceAutomation report. - * - * @param reportName Report Name. - * @param parameters Parameters for the create or update operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a class represent an AppComplianceAutomation report resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReportResourceInner update(String reportName, ReportResourcePatch parameters, Context context) { - return updateAsync(reportName, parameters, context).block(); - } - - /** - * Delete an AppComplianceAutomation report. - * - * @param reportName Report 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 reportName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (reportName == null) { - return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service.delete(this.client.getEndpoint(), this.client.getApiVersion(), reportName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete an AppComplianceAutomation report. - * - * @param reportName Report 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 reportName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (reportName == null) { - return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), reportName, accept, context); - } - - /** - * Delete an AppComplianceAutomation report. - * - * @param reportName Report 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 reportName) { - Mono>> mono = deleteWithResponseAsync(reportName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Delete an AppComplianceAutomation report. - * - * @param reportName Report 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 reportName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(reportName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Delete an AppComplianceAutomation report. - * - * @param reportName Report 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 reportName) { - return beginDeleteAsync(reportName).getSyncPoller(); - } - - /** - * Delete an AppComplianceAutomation report. - * - * @param reportName Report 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 reportName, Context context) { - return beginDeleteAsync(reportName, context).getSyncPoller(); - } - - /** - * Delete an AppComplianceAutomation report. - * - * @param reportName Report 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 reportName) { - return beginDeleteAsync(reportName).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete an AppComplianceAutomation report. - * - * @param reportName Report 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 reportName, Context context) { - return beginDeleteAsync(reportName, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete an AppComplianceAutomation report. - * - * @param reportName Report 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 reportName) { - deleteAsync(reportName).block(); - } - - /** - * Delete an AppComplianceAutomation report. - * - * @param reportName Report 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 reportName, Context context) { - deleteAsync(reportName, context).block(); - } -} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ReportOperationsImpl.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ReportOperationsImpl.java deleted file mode 100644 index 22d48ac874bb6..0000000000000 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ReportOperationsImpl.java +++ /dev/null @@ -1,104 +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.appcomplianceautomation.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.appcomplianceautomation.fluent.ReportOperationsClient; -import com.azure.resourcemanager.appcomplianceautomation.fluent.models.ReportResourceInner; -import com.azure.resourcemanager.appcomplianceautomation.models.ReportOperations; -import com.azure.resourcemanager.appcomplianceautomation.models.ReportResource; -import com.azure.resourcemanager.appcomplianceautomation.models.ReportResourcePatch; - -public final class ReportOperationsImpl implements ReportOperations { - private static final ClientLogger LOGGER = new ClientLogger(ReportOperationsImpl.class); - - private final ReportOperationsClient innerClient; - - private final com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager serviceManager; - - public ReportOperationsImpl( - ReportOperationsClient innerClient, - com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String reportName, Context context) { - Response inner = this.serviceClient().getWithResponse(reportName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ReportResourceImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ReportResource get(String reportName) { - ReportResourceInner inner = this.serviceClient().get(reportName); - if (inner != null) { - return new ReportResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public ReportResource createOrUpdate(String reportName, ReportResourceInner parameters) { - ReportResourceInner inner = this.serviceClient().createOrUpdate(reportName, parameters); - if (inner != null) { - return new ReportResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public ReportResource createOrUpdate(String reportName, ReportResourceInner parameters, Context context) { - ReportResourceInner inner = this.serviceClient().createOrUpdate(reportName, parameters, context); - if (inner != null) { - return new ReportResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public ReportResource update(String reportName, ReportResourcePatch parameters) { - ReportResourceInner inner = this.serviceClient().update(reportName, parameters); - if (inner != null) { - return new ReportResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public ReportResource update(String reportName, ReportResourcePatch parameters, Context context) { - ReportResourceInner inner = this.serviceClient().update(reportName, parameters, context); - if (inner != null) { - return new ReportResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String reportName) { - this.serviceClient().delete(reportName); - } - - public void delete(String reportName, Context context) { - this.serviceClient().delete(reportName, context); - } - - private ReportOperationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ReportResourceImpl.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ReportResourceImpl.java index 2c6f5382e706c..42924a766e5eb 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ReportResourceImpl.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ReportResourceImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.implementation; @@ -14,8 +14,7 @@ public final class ReportResourceImpl implements ReportResource { private final com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager serviceManager; - ReportResourceImpl( - ReportResourceInner innerObject, + ReportResourceImpl(ReportResourceInner innerObject, com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ReportsClientImpl.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ReportsClientImpl.java index 2ba2cc8b289ff..f45e386d84a33 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ReportsClientImpl.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ReportsClientImpl.java @@ -1,16 +1,21 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.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.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; @@ -22,339 +27,1803 @@ 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.ManagementError; 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.appcomplianceautomation.fluent.ReportsClient; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.CheckNameAvailabilityResponseInner; import com.azure.resourcemanager.appcomplianceautomation.fluent.models.ReportResourceInner; -import com.azure.resourcemanager.appcomplianceautomation.models.ReportResourceList; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.ScopingQuestionsInner; +import com.azure.resourcemanager.appcomplianceautomation.implementation.models.ReportResourceListResult; +import com.azure.resourcemanager.appcomplianceautomation.models.CheckNameAvailabilityRequest; +import com.azure.resourcemanager.appcomplianceautomation.models.ReportResourcePatch; +import com.azure.resourcemanager.appcomplianceautomation.models.SyncCertRecordRequest; +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 ReportsClient. */ +/** + * An instance of this class provides access to all the operations defined in ReportsClient. + */ public final class ReportsClientImpl implements ReportsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ReportsService service; - /** The service client containing this operation class. */ - private final AppComplianceAutomationToolForMicrosoft365Impl client; + /** + * The service client containing this operation class. + */ + private final AppComplianceAutomationClientImpl client; /** * Initializes an instance of ReportsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ - ReportsClientImpl(AppComplianceAutomationToolForMicrosoft365Impl client) { + ReportsClientImpl(AppComplianceAutomationClientImpl client) { this.service = RestProxy.create(ReportsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AppComplianceAutomationToolForMicrosoft365Reports to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for AppComplianceAutomationClientReports to be used by the proxy service + * to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "AppComplianceAutomat") public interface ReportsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) + @Get("/providers/Microsoft.AppComplianceAutomation/reports/{reportName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("reportName") String reportName, + @HeaderParam("accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/providers/Microsoft.AppComplianceAutomation/reports/{reportName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("reportName") String reportName, + @HeaderParam("accept") String accept, @BodyParam("application/json") ReportResourceInner parameters, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/providers/Microsoft.AppComplianceAutomation/reports/{reportName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("reportName") String reportName, + @HeaderParam("accept") String accept, @BodyParam("application/json") ReportResourcePatch properties, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/providers/Microsoft.AppComplianceAutomation/reports/{reportName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("reportName") String reportName, + @HeaderParam("accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.AppComplianceAutomation/reports") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @QueryParam("$skipToken") String skipToken, - @QueryParam("$top") Integer top, - @QueryParam("$select") String select, - @QueryParam("offerGuid") String offerGuid, - @QueryParam("reportCreatorTenantId") String reportCreatorTenantId, - @HeaderParam("Accept") String accept, + Mono> listByTenant(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @QueryParam("$skipToken") String skipToken, + @QueryParam("$top") Integer top, @QueryParam("$select") String select, @QueryParam("$filter") String filter, + @QueryParam("$orderby") String orderby, @QueryParam("offerGuid") String offerGuid, + @QueryParam("reportCreatorTenantId") String reportCreatorTenantId, @HeaderParam("accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/providers/Microsoft.AppComplianceAutomation/reports/{reportName}/syncCertRecord") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> syncCertRecord(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("reportName") String reportName, + @HeaderParam("accept") String accept, @BodyParam("application/json") SyncCertRecordRequest body, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/providers/Microsoft.AppComplianceAutomation/reports/{reportName}/checkNameAvailability") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, + Mono> checkNameAvailability(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("reportName") String reportName, + @HeaderParam("accept") String accept, @BodyParam("application/json") CheckNameAvailabilityRequest body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/providers/Microsoft.AppComplianceAutomation/reports/{reportName}/fix") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> fix(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("reportName") String reportName, + @HeaderParam("accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/providers/Microsoft.AppComplianceAutomation/reports/{reportName}/getScopingQuestions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getScopingQuestions(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("reportName") String reportName, + @HeaderParam("accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/providers/Microsoft.AppComplianceAutomation/reports/{reportName}/verify") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> verify(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("reportName") String reportName, + @HeaderParam("accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByTenantNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("accept") String accept, Context context); } /** - * Get the AppComplianceAutomation report list for the tenant. - * - * @param skipToken Skip over when retrieving results. - * @param top Number of elements to return when retrieving results. - * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. - * ?$select=reportName,id. - * @param offerGuid The offerGuid which mapping to the reports. - * @param reportCreatorTenantId The tenant id of the report creator. + * Get the AppComplianceAutomation report and its properties. + * + * @param reportName Report 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 AppComplianceAutomation report list for the tenant along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the AppComplianceAutomation report and its properties along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String reportName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext( + context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), reportName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the AppComplianceAutomation report and its properties. + * + * @param reportName Report 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 AppComplianceAutomation report and its properties along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String reportName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), reportName, accept, context); + } + + /** + * Get the AppComplianceAutomation report and its properties. + * + * @param reportName Report 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 AppComplianceAutomation report and its properties on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String reportName) { + return getWithResponseAsync(reportName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the AppComplianceAutomation report and its properties. + * + * @param reportName Report 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 AppComplianceAutomation report and its properties along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String reportName, Context context) { + return getWithResponseAsync(reportName, context).block(); + } + + /** + * Get the AppComplianceAutomation report and its properties. + * + * @param reportName Report 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 AppComplianceAutomation report and its properties. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ReportResourceInner get(String reportName) { + return getWithResponse(reportName, Context.NONE).getValue(); + } + + /** + * Create a new AppComplianceAutomation report or update an exiting AppComplianceAutomation report. + * + * @param reportName Report Name. + * @param parameters Parameters for the create or update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a class represent an AppComplianceAutomation report resource along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String skipToken, Integer top, String select, String offerGuid, String reportCreatorTenantId) { + private Mono>> createOrUpdateWithResponseAsync(String reportName, + ReportResourceInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - skipToken, - top, - select, - offerGuid, - reportCreatorTenantId, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + reportName, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get the AppComplianceAutomation report list for the tenant. - * - * @param skipToken Skip over when retrieving results. - * @param top Number of elements to return when retrieving results. - * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. - * ?$select=reportName,id. - * @param offerGuid The offerGuid which mapping to the reports. - * @param reportCreatorTenantId The tenant id of the report creator. + * Create a new AppComplianceAutomation report or update an exiting AppComplianceAutomation report. + * + * @param reportName Report Name. + * @param parameters Parameters for the create or update operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 AppComplianceAutomation report list for the tenant along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a class represent an AppComplianceAutomation report resource along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String skipToken, Integer top, String select, String offerGuid, String reportCreatorTenantId, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String reportName, + ReportResourceInner parameters, 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 (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - skipToken, - top, - select, - offerGuid, - reportCreatorTenantId, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), reportName, accept, + parameters, context); } /** - * Get the AppComplianceAutomation report list for the tenant. - * - * @param skipToken Skip over when retrieving results. - * @param top Number of elements to return when retrieving results. - * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. - * ?$select=reportName,id. - * @param offerGuid The offerGuid which mapping to the reports. - * @param reportCreatorTenantId The tenant id of the report creator. + * Create a new AppComplianceAutomation report or update an exiting AppComplianceAutomation report. + * + * @param reportName Report Name. + * @param parameters Parameters for the create or update operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 AppComplianceAutomation report list for the tenant as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of a class represent an AppComplianceAutomation report resource. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String skipToken, Integer top, String select, String offerGuid, String reportCreatorTenantId) { - return new PagedFlux<>( - () -> listSinglePageAsync(skipToken, top, select, offerGuid, reportCreatorTenantId), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ReportResourceInner> beginCreateOrUpdateAsync(String reportName, + ReportResourceInner parameters) { + Mono>> mono = createOrUpdateWithResponseAsync(reportName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ReportResourceInner.class, ReportResourceInner.class, this.client.getContext()); } /** - * Get the AppComplianceAutomation report list for the tenant. - * + * Create a new AppComplianceAutomation report or update an exiting AppComplianceAutomation report. + * + * @param reportName Report Name. + * @param parameters Parameters for the create or update operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 AppComplianceAutomation report list for the tenant as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of a class represent an AppComplianceAutomation report resource. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - final String skipToken = null; - final Integer top = null; - final String select = null; - final String offerGuid = null; - final String reportCreatorTenantId = null; - return new PagedFlux<>( - () -> listSinglePageAsync(skipToken, top, select, offerGuid, reportCreatorTenantId), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ReportResourceInner> beginCreateOrUpdateAsync(String reportName, + ReportResourceInner parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createOrUpdateWithResponseAsync(reportName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ReportResourceInner.class, ReportResourceInner.class, context); } /** - * Get the AppComplianceAutomation report list for the tenant. - * - * @param skipToken Skip over when retrieving results. - * @param top Number of elements to return when retrieving results. - * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. - * ?$select=reportName,id. - * @param offerGuid The offerGuid which mapping to the reports. - * @param reportCreatorTenantId The tenant id of the report creator. + * Create a new AppComplianceAutomation report or update an exiting AppComplianceAutomation report. + * + * @param reportName Report Name. + * @param parameters Parameters for the create or update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 a class represent an AppComplianceAutomation report resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ReportResourceInner> beginCreateOrUpdate(String reportName, + ReportResourceInner parameters) { + return this.beginCreateOrUpdateAsync(reportName, parameters).getSyncPoller(); + } + + /** + * Create a new AppComplianceAutomation report or update an exiting AppComplianceAutomation report. + * + * @param reportName Report Name. + * @param parameters Parameters for the create or update operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 AppComplianceAutomation report list for the tenant as paginated response with {@link PagedFlux}. + * @return the {@link SyncPoller} for polling of a class represent an AppComplianceAutomation report resource. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String skipToken, Integer top, String select, String offerGuid, String reportCreatorTenantId, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(skipToken, top, select, offerGuid, reportCreatorTenantId, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ReportResourceInner> beginCreateOrUpdate(String reportName, + ReportResourceInner parameters, Context context) { + return this.beginCreateOrUpdateAsync(reportName, parameters, context).getSyncPoller(); } /** - * Get the AppComplianceAutomation report list for the tenant. - * + * Create a new AppComplianceAutomation report or update an exiting AppComplianceAutomation report. + * + * @param reportName Report Name. + * @param parameters Parameters for the create or update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 AppComplianceAutomation report list for the tenant as paginated response with {@link PagedIterable}. + * @return a class represent an AppComplianceAutomation report resource on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - final String skipToken = null; - final Integer top = null; - final String select = null; - final String offerGuid = null; - final String reportCreatorTenantId = null; - return new PagedIterable<>(listAsync(skipToken, top, select, offerGuid, reportCreatorTenantId)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String reportName, ReportResourceInner parameters) { + return beginCreateOrUpdateAsync(reportName, parameters).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Get the AppComplianceAutomation report list for the tenant. - * - * @param skipToken Skip over when retrieving results. - * @param top Number of elements to return when retrieving results. - * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. - * ?$select=reportName,id. - * @param offerGuid The offerGuid which mapping to the reports. - * @param reportCreatorTenantId The tenant id of the report creator. + * Create a new AppComplianceAutomation report or update an exiting AppComplianceAutomation report. + * + * @param reportName Report Name. + * @param parameters Parameters for the create or update operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 AppComplianceAutomation report list for the tenant as paginated response with {@link PagedIterable}. + * @return a class represent an AppComplianceAutomation report resource on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String skipToken, Integer top, String select, String offerGuid, String reportCreatorTenantId, Context context) { - return new PagedIterable<>(listAsync(skipToken, top, select, offerGuid, reportCreatorTenantId, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String reportName, ReportResourceInner parameters, + Context context) { + return beginCreateOrUpdateAsync(reportName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * Create a new AppComplianceAutomation report or update an exiting AppComplianceAutomation report. + * + * @param reportName Report Name. + * @param parameters Parameters for the create or update operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object that includes an array of resources and a possible link for next set along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return a class represent an AppComplianceAutomation report resource. */ @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.")); - } + public ReportResourceInner createOrUpdate(String reportName, ReportResourceInner parameters) { + return createOrUpdateAsync(reportName, parameters).block(); + } + + /** + * Create a new AppComplianceAutomation report or update an exiting AppComplianceAutomation report. + * + * @param reportName Report Name. + * @param parameters Parameters for the create or update operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a class represent an AppComplianceAutomation report resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ReportResourceInner createOrUpdate(String reportName, ReportResourceInner parameters, Context context) { + return createOrUpdateAsync(reportName, parameters, context).block(); + } + + /** + * Update an exiting AppComplianceAutomation report. + * + * @param reportName Report Name. + * @param properties Parameters for the create or update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a class represent an AppComplianceAutomation report resource along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String reportName, + ReportResourcePatch properties) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); } 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.update(this.client.getEndpoint(), this.client.getApiVersion(), reportName, + accept, properties, context)) .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. + * Update an exiting AppComplianceAutomation report. + * + * @param reportName Report Name. + * @param properties Parameters for the create or update operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object that includes an array of resources and a possible link for next set along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return a class represent an AppComplianceAutomation report resource along with {@link Response} 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.")); - } + private Mono>> updateWithResponseAsync(String reportName, ReportResourcePatch properties, + 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 (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); } 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.update(this.client.getEndpoint(), this.client.getApiVersion(), reportName, accept, properties, + context); + } + + /** + * Update an exiting AppComplianceAutomation report. + * + * @param reportName Report Name. + * @param properties Parameters for the create or update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 a class represent an AppComplianceAutomation report resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ReportResourceInner> beginUpdateAsync(String reportName, + ReportResourcePatch properties) { + Mono>> mono = updateWithResponseAsync(reportName, properties); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ReportResourceInner.class, ReportResourceInner.class, this.client.getContext()); + } + + /** + * Update an exiting AppComplianceAutomation report. + * + * @param reportName Report Name. + * @param properties Parameters for the create or update operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 a class represent an AppComplianceAutomation report resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ReportResourceInner> beginUpdateAsync(String reportName, + ReportResourcePatch properties, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = updateWithResponseAsync(reportName, properties, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ReportResourceInner.class, ReportResourceInner.class, context); + } + + /** + * Update an exiting AppComplianceAutomation report. + * + * @param reportName Report Name. + * @param properties Parameters for the create or update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 a class represent an AppComplianceAutomation report resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ReportResourceInner> beginUpdate(String reportName, + ReportResourcePatch properties) { + return this.beginUpdateAsync(reportName, properties).getSyncPoller(); + } + + /** + * Update an exiting AppComplianceAutomation report. + * + * @param reportName Report Name. + * @param properties Parameters for the create or update operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 a class represent an AppComplianceAutomation report resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ReportResourceInner> beginUpdate(String reportName, + ReportResourcePatch properties, Context context) { + return this.beginUpdateAsync(reportName, properties, context).getSyncPoller(); + } + + /** + * Update an exiting AppComplianceAutomation report. + * + * @param reportName Report Name. + * @param properties Parameters for the create or update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a class represent an AppComplianceAutomation report resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String reportName, ReportResourcePatch properties) { + return beginUpdateAsync(reportName, properties).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update an exiting AppComplianceAutomation report. + * + * @param reportName Report Name. + * @param properties Parameters for the create or update operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a class represent an AppComplianceAutomation report resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String reportName, ReportResourcePatch properties, Context context) { + return beginUpdateAsync(reportName, properties, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update an exiting AppComplianceAutomation report. + * + * @param reportName Report Name. + * @param properties Parameters for the create or update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a class represent an AppComplianceAutomation report resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ReportResourceInner update(String reportName, ReportResourcePatch properties) { + return updateAsync(reportName, properties).block(); + } + + /** + * Update an exiting AppComplianceAutomation report. + * + * @param reportName Report Name. + * @param properties Parameters for the create or update operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a class represent an AppComplianceAutomation report resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ReportResourceInner update(String reportName, ReportResourcePatch properties, Context context) { + return updateAsync(reportName, properties, context).block(); + } + + /** + * Delete an AppComplianceAutomation report. + * + * @param reportName Report 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 reportName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), reportName, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete an AppComplianceAutomation report. + * + * @param reportName Report 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 reportName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), reportName, accept, context); + } + + /** + * Delete an AppComplianceAutomation report. + * + * @param reportName Report 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 reportName) { + Mono>> mono = deleteWithResponseAsync(reportName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete an AppComplianceAutomation report. + * + * @param reportName Report 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 reportName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(reportName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete an AppComplianceAutomation report. + * + * @param reportName Report 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 reportName) { + return this.beginDeleteAsync(reportName).getSyncPoller(); + } + + /** + * Delete an AppComplianceAutomation report. + * + * @param reportName Report 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 reportName, Context context) { + return this.beginDeleteAsync(reportName, context).getSyncPoller(); + } + + /** + * Delete an AppComplianceAutomation report. + * + * @param reportName Report 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 reportName) { + return beginDeleteAsync(reportName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete an AppComplianceAutomation report. + * + * @param reportName Report 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 reportName, Context context) { + return beginDeleteAsync(reportName, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete an AppComplianceAutomation report. + * + * @param reportName Report 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 reportName) { + deleteAsync(reportName).block(); + } + + /** + * Delete an AppComplianceAutomation report. + * + * @param reportName Report 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 reportName, Context context) { + deleteAsync(reportName, context).block(); + } + + /** + * Get the AppComplianceAutomation report list for the tenant. + * + * @param skipToken Skip over when retrieving results. + * @param top Number of elements to return when retrieving results. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. + * ?$select=reportName,id. + * @param filter The filter to apply on the operation. + * @param orderby OData order by query option. + * @param offerGuid The offerGuid which mapping to the reports. + * @param reportCreatorTenantId The tenant id of the report creator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 AppComplianceAutomation report list for the tenant along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByTenantSinglePageAsync(String skipToken, Integer top, + String select, String filter, String orderby, String offerGuid, String reportCreatorTenantId) { + 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.listByTenant(this.client.getEndpoint(), this.client.getApiVersion(), + skipToken, top, select, filter, orderby, offerGuid, reportCreatorTenantId, 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 AppComplianceAutomation report list for the tenant. + * + * @param skipToken Skip over when retrieving results. + * @param top Number of elements to return when retrieving results. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. + * ?$select=reportName,id. + * @param filter The filter to apply on the operation. + * @param orderby OData order by query option. + * @param offerGuid The offerGuid which mapping to the reports. + * @param reportCreatorTenantId The tenant id of the report creator. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 AppComplianceAutomation report list for the tenant along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByTenantSinglePageAsync(String skipToken, Integer top, + String select, String filter, String orderby, String offerGuid, String reportCreatorTenantId, Context context) { + 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 + .listByTenant(this.client.getEndpoint(), this.client.getApiVersion(), skipToken, top, select, filter, + orderby, offerGuid, reportCreatorTenantId, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the AppComplianceAutomation report list for the tenant. + * + * @param skipToken Skip over when retrieving results. + * @param top Number of elements to return when retrieving results. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. + * ?$select=reportName,id. + * @param filter The filter to apply on the operation. + * @param orderby OData order by query option. + * @param offerGuid The offerGuid which mapping to the reports. + * @param reportCreatorTenantId The tenant id of the report creator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 AppComplianceAutomation report list for the tenant as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByTenantAsync(String skipToken, Integer top, String select, + String filter, String orderby, String offerGuid, String reportCreatorTenantId) { + return new PagedFlux<>(() -> listByTenantSinglePageAsync(skipToken, top, select, filter, orderby, offerGuid, + reportCreatorTenantId), nextLink -> listByTenantNextSinglePageAsync(nextLink)); + } + + /** + * Get the AppComplianceAutomation report list for the tenant. + * + * @throws 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 AppComplianceAutomation report list for the tenant as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByTenantAsync() { + final String skipToken = null; + final Integer top = null; + final String select = null; + final String filter = null; + final String orderby = null; + final String offerGuid = null; + final String reportCreatorTenantId = null; + return new PagedFlux<>(() -> listByTenantSinglePageAsync(skipToken, top, select, filter, orderby, offerGuid, + reportCreatorTenantId), nextLink -> listByTenantNextSinglePageAsync(nextLink)); + } + + /** + * Get the AppComplianceAutomation report list for the tenant. + * + * @param skipToken Skip over when retrieving results. + * @param top Number of elements to return when retrieving results. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. + * ?$select=reportName,id. + * @param filter The filter to apply on the operation. + * @param orderby OData order by query option. + * @param offerGuid The offerGuid which mapping to the reports. + * @param reportCreatorTenantId The tenant id of the report creator. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 AppComplianceAutomation report list for the tenant as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByTenantAsync(String skipToken, Integer top, String select, + String filter, String orderby, String offerGuid, String reportCreatorTenantId, Context context) { + return new PagedFlux<>(() -> listByTenantSinglePageAsync(skipToken, top, select, filter, orderby, offerGuid, + reportCreatorTenantId, context), nextLink -> listByTenantNextSinglePageAsync(nextLink, context)); + } + + /** + * Get the AppComplianceAutomation report list for the tenant. + * + * @throws 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 AppComplianceAutomation report list for the tenant as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByTenant() { + final String skipToken = null; + final Integer top = null; + final String select = null; + final String filter = null; + final String orderby = null; + final String offerGuid = null; + final String reportCreatorTenantId = null; + return new PagedIterable<>( + listByTenantAsync(skipToken, top, select, filter, orderby, offerGuid, reportCreatorTenantId)); + } + + /** + * Get the AppComplianceAutomation report list for the tenant. + * + * @param skipToken Skip over when retrieving results. + * @param top Number of elements to return when retrieving results. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. + * ?$select=reportName,id. + * @param filter The filter to apply on the operation. + * @param orderby OData order by query option. + * @param offerGuid The offerGuid which mapping to the reports. + * @param reportCreatorTenantId The tenant id of the report creator. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 AppComplianceAutomation report list for the tenant as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByTenant(String skipToken, Integer top, String select, String filter, + String orderby, String offerGuid, String reportCreatorTenantId, Context context) { + return new PagedIterable<>( + listByTenantAsync(skipToken, top, select, filter, orderby, offerGuid, reportCreatorTenantId, context)); + } + + /** + * Synchronize attestation record from app compliance. + * + * @param reportName Report Name. + * @param body Parameters for synchronize certification record operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> syncCertRecordWithResponseAsync(String reportName, + SyncCertRecordRequest body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.syncCertRecord(this.client.getEndpoint(), this.client.getApiVersion(), + reportName, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Synchronize attestation record from app compliance. + * + * @param reportName Report Name. + * @param body Parameters for synchronize certification record operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> syncCertRecordWithResponseAsync(String reportName, + SyncCertRecordRequest body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.syncCertRecord(this.client.getEndpoint(), this.client.getApiVersion(), reportName, accept, body, + context); + } + + /** + * Synchronize attestation record from app compliance. + * + * @param reportName Report Name. + * @param body Parameters for synchronize certification record operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, ManagementError> beginSyncCertRecordAsync(String reportName, + SyncCertRecordRequest body) { + Mono>> mono = syncCertRecordWithResponseAsync(reportName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ManagementError.class, ManagementError.class, this.client.getContext()); + } + + /** + * Synchronize attestation record from app compliance. + * + * @param reportName Report Name. + * @param body Parameters for synchronize certification record operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, ManagementError> beginSyncCertRecordAsync(String reportName, + SyncCertRecordRequest body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = syncCertRecordWithResponseAsync(reportName, body, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ManagementError.class, ManagementError.class, context); + } + + /** + * Synchronize attestation record from app compliance. + * + * @param reportName Report Name. + * @param body Parameters for synchronize certification record operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, ManagementError> beginSyncCertRecord(String reportName, + SyncCertRecordRequest body) { + return this.beginSyncCertRecordAsync(reportName, body).getSyncPoller(); + } + + /** + * Synchronize attestation record from app compliance. + * + * @param reportName Report Name. + * @param body Parameters for synchronize certification record operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, ManagementError> beginSyncCertRecord(String reportName, + SyncCertRecordRequest body, Context context) { + return this.beginSyncCertRecordAsync(reportName, body, context).getSyncPoller(); + } + + /** + * Synchronize attestation record from app compliance. + * + * @param reportName Report Name. + * @param body Parameters for synchronize certification record operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono syncCertRecordAsync(String reportName, SyncCertRecordRequest body) { + return beginSyncCertRecordAsync(reportName, body).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Synchronize attestation record from app compliance. + * + * @param reportName Report Name. + * @param body Parameters for synchronize certification record operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono syncCertRecordAsync(String reportName, SyncCertRecordRequest body, Context context) { + return beginSyncCertRecordAsync(reportName, body, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Synchronize attestation record from app compliance. + * + * @param reportName Report Name. + * @param body Parameters for synchronize certification record operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagementError syncCertRecord(String reportName, SyncCertRecordRequest body) { + return syncCertRecordAsync(reportName, body).block(); + } + + /** + * Synchronize attestation record from app compliance. + * + * @param reportName Report Name. + * @param body Parameters for synchronize certification record operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagementError syncCertRecord(String reportName, SyncCertRecordRequest body, Context context) { + return syncCertRecordAsync(reportName, body, context).block(); + } + + /** + * Checks the report's nested resource name availability, e.g: Webhooks, Evidences, Snapshots. + * + * @param reportName Report Name. + * @param body NameAvailabilityRequest 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 the check availability result along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> checkNameAvailabilityWithResponseAsync(String reportName, + CheckNameAvailabilityRequest body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.checkNameAvailability(this.client.getEndpoint(), + this.client.getApiVersion(), reportName, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Checks the report's nested resource name availability, e.g: Webhooks, Evidences, Snapshots. + * + * @param reportName Report Name. + * @param body NameAvailabilityRequest 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 the check availability result along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> checkNameAvailabilityWithResponseAsync(String reportName, + CheckNameAvailabilityRequest body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.checkNameAvailability(this.client.getEndpoint(), this.client.getApiVersion(), reportName, accept, + body, context); + } + + /** + * Checks the report's nested resource name availability, e.g: Webhooks, Evidences, Snapshots. + * + * @param reportName Report Name. + * @param body NameAvailabilityRequest 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 the check availability result on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono checkNameAvailabilityAsync(String reportName, + CheckNameAvailabilityRequest body) { + return checkNameAvailabilityWithResponseAsync(reportName, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Checks the report's nested resource name availability, e.g: Webhooks, Evidences, Snapshots. + * + * @param reportName Report Name. + * @param body NameAvailabilityRequest 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 the check availability result along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response checkNameAvailabilityWithResponse(String reportName, + CheckNameAvailabilityRequest body, Context context) { + return checkNameAvailabilityWithResponseAsync(reportName, body, context).block(); + } + + /** + * Checks the report's nested resource name availability, e.g: Webhooks, Evidences, Snapshots. + * + * @param reportName Report Name. + * @param body NameAvailabilityRequest 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 the check availability result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CheckNameAvailabilityResponseInner checkNameAvailability(String reportName, + CheckNameAvailabilityRequest body) { + return checkNameAvailabilityWithResponse(reportName, body, Context.NONE).getValue(); + } + + /** + * Fix the AppComplianceAutomation report error. e.g: App Compliance Automation Tool service unregistered, + * automation removed. + * + * @param reportName Report 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 response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> fixWithResponseAsync(String reportName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext( + context -> service.fix(this.client.getEndpoint(), this.client.getApiVersion(), reportName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Fix the AppComplianceAutomation report error. e.g: App Compliance Automation Tool service unregistered, + * automation removed. + * + * @param reportName Report 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 response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> fixWithResponseAsync(String reportName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.fix(this.client.getEndpoint(), this.client.getApiVersion(), reportName, accept, context); + } + + /** + * Fix the AppComplianceAutomation report error. e.g: App Compliance Automation Tool service unregistered, + * automation removed. + * + * @param reportName Report 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, ManagementError> beginFixAsync(String reportName) { + Mono>> mono = fixWithResponseAsync(reportName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ManagementError.class, ManagementError.class, this.client.getContext()); + } + + /** + * Fix the AppComplianceAutomation report error. e.g: App Compliance Automation Tool service unregistered, + * automation removed. + * + * @param reportName Report 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, ManagementError> beginFixAsync(String reportName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = fixWithResponseAsync(reportName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ManagementError.class, ManagementError.class, context); + } + + /** + * Fix the AppComplianceAutomation report error. e.g: App Compliance Automation Tool service unregistered, + * automation removed. + * + * @param reportName Report 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, ManagementError> beginFix(String reportName) { + return this.beginFixAsync(reportName).getSyncPoller(); + } + + /** + * Fix the AppComplianceAutomation report error. e.g: App Compliance Automation Tool service unregistered, + * automation removed. + * + * @param reportName Report 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, ManagementError> beginFix(String reportName, Context context) { + return this.beginFixAsync(reportName, context).getSyncPoller(); + } + + /** + * Fix the AppComplianceAutomation report error. e.g: App Compliance Automation Tool service unregistered, + * automation removed. + * + * @param reportName Report 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 response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono fixAsync(String reportName) { + return beginFixAsync(reportName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Fix the AppComplianceAutomation report error. e.g: App Compliance Automation Tool service unregistered, + * automation removed. + * + * @param reportName Report 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 response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono fixAsync(String reportName, Context context) { + return beginFixAsync(reportName, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Fix the AppComplianceAutomation report error. e.g: App Compliance Automation Tool service unregistered, + * automation removed. + * + * @param reportName Report 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagementError fix(String reportName) { + return fixAsync(reportName).block(); + } + + /** + * Fix the AppComplianceAutomation report error. e.g: App Compliance Automation Tool service unregistered, + * automation removed. + * + * @param reportName Report 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagementError fix(String reportName, Context context) { + return fixAsync(reportName, context).block(); + } + + /** + * Fix the AppComplianceAutomation report error. e.g: App Compliance Automation Tool service unregistered, + * automation removed. + * + * @param reportName Report 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 scoping question list along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getScopingQuestionsWithResponseAsync(String reportName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getScopingQuestions(this.client.getEndpoint(), this.client.getApiVersion(), + reportName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Fix the AppComplianceAutomation report error. e.g: App Compliance Automation Tool service unregistered, + * automation removed. + * + * @param reportName Report 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 scoping question list along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getScopingQuestionsWithResponseAsync(String reportName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getScopingQuestions(this.client.getEndpoint(), this.client.getApiVersion(), reportName, accept, + context); + } + + /** + * Fix the AppComplianceAutomation report error. e.g: App Compliance Automation Tool service unregistered, + * automation removed. + * + * @param reportName Report 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 scoping question list on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getScopingQuestionsAsync(String reportName) { + return getScopingQuestionsWithResponseAsync(reportName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Fix the AppComplianceAutomation report error. e.g: App Compliance Automation Tool service unregistered, + * automation removed. + * + * @param reportName Report 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 scoping question list along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getScopingQuestionsWithResponse(String reportName, Context context) { + return getScopingQuestionsWithResponseAsync(reportName, context).block(); + } + + /** + * Fix the AppComplianceAutomation report error. e.g: App Compliance Automation Tool service unregistered, + * automation removed. + * + * @param reportName Report 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 scoping question list. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ScopingQuestionsInner getScopingQuestions(String reportName) { + return getScopingQuestionsWithResponse(reportName, Context.NONE).getValue(); + } + + /** + * Verify the AppComplianceAutomation report health status. + * + * @param reportName Report 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 response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> verifyWithResponseAsync(String reportName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.verify(this.client.getEndpoint(), this.client.getApiVersion(), reportName, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Verify the AppComplianceAutomation report health status. + * + * @param reportName Report 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 response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> verifyWithResponseAsync(String reportName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.verify(this.client.getEndpoint(), this.client.getApiVersion(), reportName, accept, context); + } + + /** + * Verify the AppComplianceAutomation report health status. + * + * @param reportName Report 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, ManagementError> beginVerifyAsync(String reportName) { + Mono>> mono = verifyWithResponseAsync(reportName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ManagementError.class, ManagementError.class, this.client.getContext()); + } + + /** + * Verify the AppComplianceAutomation report health status. + * + * @param reportName Report 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, ManagementError> beginVerifyAsync(String reportName, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = verifyWithResponseAsync(reportName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ManagementError.class, ManagementError.class, context); + } + + /** + * Verify the AppComplianceAutomation report health status. + * + * @param reportName Report 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, ManagementError> beginVerify(String reportName) { + return this.beginVerifyAsync(reportName).getSyncPoller(); + } + + /** + * Verify the AppComplianceAutomation report health status. + * + * @param reportName Report 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, ManagementError> beginVerify(String reportName, Context context) { + return this.beginVerifyAsync(reportName, context).getSyncPoller(); + } + + /** + * Verify the AppComplianceAutomation report health status. + * + * @param reportName Report 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 response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono verifyAsync(String reportName) { + return beginVerifyAsync(reportName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Verify the AppComplianceAutomation report health status. + * + * @param reportName Report 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 response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono verifyAsync(String reportName, Context context) { + return beginVerifyAsync(reportName, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Verify the AppComplianceAutomation report health status. + * + * @param reportName Report 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagementError verify(String reportName) { + return verifyAsync(reportName).block(); + } + + /** + * Verify the AppComplianceAutomation report health status. + * + * @param reportName Report 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagementError verify(String reportName, Context context) { + return verifyAsync(reportName, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of a ReportResource list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByTenantNextSinglePageAsync(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.listByTenantNext(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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of a ReportResource list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByTenantNextSinglePageAsync(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.listByTenantNext(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/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ReportsImpl.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ReportsImpl.java index fad3672dbb7e6..20981863736e8 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ReportsImpl.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ReportsImpl.java @@ -1,16 +1,26 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.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.management.exception.ManagementError; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.appcomplianceautomation.fluent.ReportsClient; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.CheckNameAvailabilityResponseInner; import com.azure.resourcemanager.appcomplianceautomation.fluent.models.ReportResourceInner; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.ScopingQuestionsInner; +import com.azure.resourcemanager.appcomplianceautomation.models.CheckNameAvailabilityRequest; +import com.azure.resourcemanager.appcomplianceautomation.models.CheckNameAvailabilityResponse; import com.azure.resourcemanager.appcomplianceautomation.models.ReportResource; +import com.azure.resourcemanager.appcomplianceautomation.models.ReportResourcePatch; import com.azure.resourcemanager.appcomplianceautomation.models.Reports; +import com.azure.resourcemanager.appcomplianceautomation.models.ScopingQuestions; +import com.azure.resourcemanager.appcomplianceautomation.models.SyncCertRecordRequest; public final class ReportsImpl implements Reports { private static final ClientLogger LOGGER = new ClientLogger(ReportsImpl.class); @@ -19,23 +29,150 @@ public final class ReportsImpl implements Reports { private final com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager serviceManager; - public ReportsImpl( - ReportsClient innerClient, + public ReportsImpl(ReportsClient innerClient, com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new ReportResourceImpl(inner1, this.manager())); + public Response getWithResponse(String reportName, Context context) { + Response inner = this.serviceClient().getWithResponse(reportName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ReportResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } } - public PagedIterable list( - String skipToken, Integer top, String select, String offerGuid, String reportCreatorTenantId, Context context) { - PagedIterable inner = - this.serviceClient().list(skipToken, top, select, offerGuid, reportCreatorTenantId, context); - return Utils.mapPage(inner, inner1 -> new ReportResourceImpl(inner1, this.manager())); + public ReportResource get(String reportName) { + ReportResourceInner inner = this.serviceClient().get(reportName); + if (inner != null) { + return new ReportResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public ReportResource createOrUpdate(String reportName, ReportResourceInner parameters) { + ReportResourceInner inner = this.serviceClient().createOrUpdate(reportName, parameters); + if (inner != null) { + return new ReportResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public ReportResource createOrUpdate(String reportName, ReportResourceInner parameters, Context context) { + ReportResourceInner inner = this.serviceClient().createOrUpdate(reportName, parameters, context); + if (inner != null) { + return new ReportResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public ReportResource update(String reportName, ReportResourcePatch properties) { + ReportResourceInner inner = this.serviceClient().update(reportName, properties); + if (inner != null) { + return new ReportResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public ReportResource update(String reportName, ReportResourcePatch properties, Context context) { + ReportResourceInner inner = this.serviceClient().update(reportName, properties, context); + if (inner != null) { + return new ReportResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String reportName) { + this.serviceClient().delete(reportName); + } + + public void delete(String reportName, Context context) { + this.serviceClient().delete(reportName, context); + } + + public PagedIterable listByTenant() { + PagedIterable inner = this.serviceClient().listByTenant(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ReportResourceImpl(inner1, this.manager())); + } + + public PagedIterable listByTenant(String skipToken, Integer top, String select, String filter, + String orderby, String offerGuid, String reportCreatorTenantId, Context context) { + PagedIterable inner = this.serviceClient() + .listByTenant(skipToken, top, select, filter, orderby, offerGuid, reportCreatorTenantId, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ReportResourceImpl(inner1, this.manager())); + } + + public ManagementError syncCertRecord(String reportName, SyncCertRecordRequest body) { + return this.serviceClient().syncCertRecord(reportName, body); + } + + public ManagementError syncCertRecord(String reportName, SyncCertRecordRequest body, Context context) { + return this.serviceClient().syncCertRecord(reportName, body, context); + } + + public Response checkNameAvailabilityWithResponse(String reportName, + CheckNameAvailabilityRequest body, Context context) { + Response inner + = this.serviceClient().checkNameAvailabilityWithResponse(reportName, body, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new CheckNameAvailabilityResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public CheckNameAvailabilityResponse checkNameAvailability(String reportName, CheckNameAvailabilityRequest body) { + CheckNameAvailabilityResponseInner inner = this.serviceClient().checkNameAvailability(reportName, body); + if (inner != null) { + return new CheckNameAvailabilityResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public ManagementError fix(String reportName) { + return this.serviceClient().fix(reportName); + } + + public ManagementError fix(String reportName, Context context) { + return this.serviceClient().fix(reportName, context); + } + + public Response getScopingQuestionsWithResponse(String reportName, Context context) { + Response inner + = this.serviceClient().getScopingQuestionsWithResponse(reportName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ScopingQuestionsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ScopingQuestions getScopingQuestions(String reportName) { + ScopingQuestionsInner inner = this.serviceClient().getScopingQuestions(reportName); + if (inner != null) { + return new ScopingQuestionsImpl(inner, this.manager()); + } else { + return null; + } + } + + public ManagementError verify(String reportName) { + return this.serviceClient().verify(reportName); + } + + public ManagementError verify(String reportName, Context context) { + return this.serviceClient().verify(reportName, context); } private ReportsClient serviceClient() { diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/Utils.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ResourceManagerUtils.java similarity index 79% rename from sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/Utils.java rename to sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ResourceManagerUtils.java index e2cd8aa75af58..a5a33e67bbcd6 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/Utils.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ResourceManagerUtils.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.implementation; @@ -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; @@ -60,7 +63,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); @@ -74,7 +77,7 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri } 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 +87,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 +127,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 +189,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/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ScopingConfigurationResourceImpl.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ScopingConfigurationResourceImpl.java new file mode 100644 index 0000000000000..415b8e9a6cb19 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ScopingConfigurationResourceImpl.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.ScopingConfigurationResourceInner; +import com.azure.resourcemanager.appcomplianceautomation.models.ScopingConfigurationProperties; +import com.azure.resourcemanager.appcomplianceautomation.models.ScopingConfigurationResource; + +public final class ScopingConfigurationResourceImpl implements ScopingConfigurationResource { + private ScopingConfigurationResourceInner innerObject; + + private final com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager serviceManager; + + ScopingConfigurationResourceImpl(ScopingConfigurationResourceInner innerObject, + com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager 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 ScopingConfigurationProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ScopingConfigurationResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ScopingConfigurationsClientImpl.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ScopingConfigurationsClientImpl.java new file mode 100644 index 0000000000000..10c6c0c461bd7 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ScopingConfigurationsClientImpl.java @@ -0,0 +1,645 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.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.appcomplianceautomation.fluent.ScopingConfigurationsClient; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.ScopingConfigurationResourceInner; +import com.azure.resourcemanager.appcomplianceautomation.implementation.models.ScopingConfigurationResourceListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ScopingConfigurationsClient. + */ +public final class ScopingConfigurationsClientImpl implements ScopingConfigurationsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ScopingConfigurationsService service; + + /** + * The service client containing this operation class. + */ + private final AppComplianceAutomationClientImpl client; + + /** + * Initializes an instance of ScopingConfigurationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ScopingConfigurationsClientImpl(AppComplianceAutomationClientImpl client) { + this.service = RestProxy.create(ScopingConfigurationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AppComplianceAutomationClientScopingConfigurations to be used by the + * proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "AppComplianceAutomat") + public interface ScopingConfigurationsService { + @Headers({ "Content-Type: application/json" }) + @Get("/providers/Microsoft.AppComplianceAutomation/reports/{reportName}/scopingConfigurations/{scopingConfigurationName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("reportName") String reportName, + @PathParam("scopingConfigurationName") String scopingConfigurationName, + @HeaderParam("accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/providers/Microsoft.AppComplianceAutomation/reports/{reportName}/scopingConfigurations/{scopingConfigurationName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("reportName") String reportName, + @PathParam("scopingConfigurationName") String scopingConfigurationName, + @HeaderParam("accept") String accept, + @BodyParam("application/json") ScopingConfigurationResourceInner parameters, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/providers/Microsoft.AppComplianceAutomation/reports/{reportName}/scopingConfigurations/{scopingConfigurationName}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("reportName") String reportName, + @PathParam("scopingConfigurationName") String scopingConfigurationName, + @HeaderParam("accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/providers/Microsoft.AppComplianceAutomation/reports/{reportName}/scopingConfigurations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByReportResource( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("reportName") String reportName, @HeaderParam("accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByReportResourceNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("accept") String accept, Context context); + } + + /** + * Get the AppComplianceAutomation scoping configuration of the specific report. + * + * @param reportName Report Name. + * @param scopingConfigurationName The scoping configuration of the specific report. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 AppComplianceAutomation scoping configuration of the specific report along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String reportName, + String scopingConfigurationName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + if (scopingConfigurationName == null) { + return Mono.error( + new IllegalArgumentException("Parameter scopingConfigurationName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), reportName, + scopingConfigurationName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the AppComplianceAutomation scoping configuration of the specific report. + * + * @param reportName Report Name. + * @param scopingConfigurationName The scoping configuration of the specific report. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 AppComplianceAutomation scoping configuration of the specific report along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String reportName, + String scopingConfigurationName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + if (scopingConfigurationName == null) { + return Mono.error( + new IllegalArgumentException("Parameter scopingConfigurationName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), reportName, scopingConfigurationName, + accept, context); + } + + /** + * Get the AppComplianceAutomation scoping configuration of the specific report. + * + * @param reportName Report Name. + * @param scopingConfigurationName The scoping configuration of the specific report. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 AppComplianceAutomation scoping configuration of the specific report on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String reportName, String scopingConfigurationName) { + return getWithResponseAsync(reportName, scopingConfigurationName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the AppComplianceAutomation scoping configuration of the specific report. + * + * @param reportName Report Name. + * @param scopingConfigurationName The scoping configuration of the specific report. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 AppComplianceAutomation scoping configuration of the specific report along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String reportName, + String scopingConfigurationName, Context context) { + return getWithResponseAsync(reportName, scopingConfigurationName, context).block(); + } + + /** + * Get the AppComplianceAutomation scoping configuration of the specific report. + * + * @param reportName Report Name. + * @param scopingConfigurationName The scoping configuration of the specific report. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 AppComplianceAutomation scoping configuration of the specific report. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ScopingConfigurationResourceInner get(String reportName, String scopingConfigurationName) { + return getWithResponse(reportName, scopingConfigurationName, Context.NONE).getValue(); + } + + /** + * Get the AppComplianceAutomation scoping configuration of the specific report. + * + * @param reportName Report Name. + * @param scopingConfigurationName The scoping configuration of the specific report. + * @param parameters Parameters for the create or update operation, this is a singleton resource, so please make + * sure you're using 'default' as the 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 AppComplianceAutomation scoping configuration of the specific report along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync(String reportName, + String scopingConfigurationName, ScopingConfigurationResourceInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + if (scopingConfigurationName == null) { + return Mono.error( + new IllegalArgumentException("Parameter scopingConfigurationName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + reportName, scopingConfigurationName, accept, parameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the AppComplianceAutomation scoping configuration of the specific report. + * + * @param reportName Report Name. + * @param scopingConfigurationName The scoping configuration of the specific report. + * @param parameters Parameters for the create or update operation, this is a singleton resource, so please make + * sure you're using 'default' as the 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 AppComplianceAutomation scoping configuration of the specific report along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync(String reportName, + String scopingConfigurationName, ScopingConfigurationResourceInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + if (scopingConfigurationName == null) { + return Mono.error( + new IllegalArgumentException("Parameter scopingConfigurationName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), reportName, + scopingConfigurationName, accept, parameters, context); + } + + /** + * Get the AppComplianceAutomation scoping configuration of the specific report. + * + * @param reportName Report Name. + * @param scopingConfigurationName The scoping configuration of the specific report. + * @param parameters Parameters for the create or update operation, this is a singleton resource, so please make + * sure you're using 'default' as the 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 AppComplianceAutomation scoping configuration of the specific report on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String reportName, + String scopingConfigurationName, ScopingConfigurationResourceInner parameters) { + return createOrUpdateWithResponseAsync(reportName, scopingConfigurationName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the AppComplianceAutomation scoping configuration of the specific report. + * + * @param reportName Report Name. + * @param scopingConfigurationName The scoping configuration of the specific report. + * @param parameters Parameters for the create or update operation, this is a singleton resource, so please make + * sure you're using 'default' as the 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 AppComplianceAutomation scoping configuration of the specific report along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String reportName, + String scopingConfigurationName, ScopingConfigurationResourceInner parameters, Context context) { + return createOrUpdateWithResponseAsync(reportName, scopingConfigurationName, parameters, context).block(); + } + + /** + * Get the AppComplianceAutomation scoping configuration of the specific report. + * + * @param reportName Report Name. + * @param scopingConfigurationName The scoping configuration of the specific report. + * @param parameters Parameters for the create or update operation, this is a singleton resource, so please make + * sure you're using 'default' as the 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 AppComplianceAutomation scoping configuration of the specific report. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ScopingConfigurationResourceInner createOrUpdate(String reportName, String scopingConfigurationName, + ScopingConfigurationResourceInner parameters) { + return createOrUpdateWithResponse(reportName, scopingConfigurationName, parameters, Context.NONE).getValue(); + } + + /** + * Clean the AppComplianceAutomation scoping configuration of the specific report. + * + * @param reportName Report Name. + * @param scopingConfigurationName The scoping configuration of the specific report. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 reportName, String scopingConfigurationName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + if (scopingConfigurationName == null) { + return Mono.error( + new IllegalArgumentException("Parameter scopingConfigurationName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), reportName, + scopingConfigurationName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Clean the AppComplianceAutomation scoping configuration of the specific report. + * + * @param reportName Report Name. + * @param scopingConfigurationName The scoping configuration of the specific report. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 reportName, String scopingConfigurationName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + if (scopingConfigurationName == null) { + return Mono.error( + new IllegalArgumentException("Parameter scopingConfigurationName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), reportName, + scopingConfigurationName, accept, context); + } + + /** + * Clean the AppComplianceAutomation scoping configuration of the specific report. + * + * @param reportName Report Name. + * @param scopingConfigurationName The scoping configuration of the specific report. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 reportName, String scopingConfigurationName) { + return deleteWithResponseAsync(reportName, scopingConfigurationName).flatMap(ignored -> Mono.empty()); + } + + /** + * Clean the AppComplianceAutomation scoping configuration of the specific report. + * + * @param reportName Report Name. + * @param scopingConfigurationName The scoping configuration of the specific report. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 reportName, String scopingConfigurationName, Context context) { + return deleteWithResponseAsync(reportName, scopingConfigurationName, context).block(); + } + + /** + * Clean the AppComplianceAutomation scoping configuration of the specific report. + * + * @param reportName Report Name. + * @param scopingConfigurationName The scoping configuration of the specific report. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 reportName, String scopingConfigurationName) { + deleteWithResponse(reportName, scopingConfigurationName, Context.NONE); + } + + /** + * Returns a list format of the singleton scopingConfiguration for a specified report. + * + * @param reportName Report 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 response of a ScopingConfigurationResource list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByReportResourceSinglePageAsync(String reportName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByReportResource(this.client.getEndpoint(), this.client.getApiVersion(), + reportName, 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 format of the singleton scopingConfiguration for a specified report. + * + * @param reportName Report 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 response of a ScopingConfigurationResource list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByReportResourceSinglePageAsync(String reportName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByReportResource(this.client.getEndpoint(), this.client.getApiVersion(), reportName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Returns a list format of the singleton scopingConfiguration for a specified report. + * + * @param reportName Report 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 response of a ScopingConfigurationResource list operation as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByReportResourceAsync(String reportName) { + return new PagedFlux<>(() -> listByReportResourceSinglePageAsync(reportName), + nextLink -> listByReportResourceNextSinglePageAsync(nextLink)); + } + + /** + * Returns a list format of the singleton scopingConfiguration for a specified report. + * + * @param reportName Report 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 response of a ScopingConfigurationResource list operation as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByReportResourceAsync(String reportName, Context context) { + return new PagedFlux<>(() -> listByReportResourceSinglePageAsync(reportName, context), + nextLink -> listByReportResourceNextSinglePageAsync(nextLink, context)); + } + + /** + * Returns a list format of the singleton scopingConfiguration for a specified report. + * + * @param reportName Report 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 response of a ScopingConfigurationResource list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByReportResource(String reportName) { + return new PagedIterable<>(listByReportResourceAsync(reportName)); + } + + /** + * Returns a list format of the singleton scopingConfiguration for a specified report. + * + * @param reportName Report 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 response of a ScopingConfigurationResource list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByReportResource(String reportName, Context context) { + return new PagedIterable<>(listByReportResourceAsync(reportName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of a ScopingConfigurationResource list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByReportResourceNextSinglePageAsync(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.listByReportResourceNext(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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of a ScopingConfigurationResource list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByReportResourceNextSinglePageAsync(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.listByReportResourceNext(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/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ScopingConfigurationsImpl.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ScopingConfigurationsImpl.java new file mode 100644 index 0000000000000..5f675f4b8f2d5 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ScopingConfigurationsImpl.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.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.appcomplianceautomation.fluent.ScopingConfigurationsClient; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.ScopingConfigurationResourceInner; +import com.azure.resourcemanager.appcomplianceautomation.models.ScopingConfigurationResource; +import com.azure.resourcemanager.appcomplianceautomation.models.ScopingConfigurations; + +public final class ScopingConfigurationsImpl implements ScopingConfigurations { + private static final ClientLogger LOGGER = new ClientLogger(ScopingConfigurationsImpl.class); + + private final ScopingConfigurationsClient innerClient; + + private final com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager serviceManager; + + public ScopingConfigurationsImpl(ScopingConfigurationsClient innerClient, + com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String reportName, String scopingConfigurationName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(reportName, scopingConfigurationName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ScopingConfigurationResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ScopingConfigurationResource get(String reportName, String scopingConfigurationName) { + ScopingConfigurationResourceInner inner = this.serviceClient().get(reportName, scopingConfigurationName); + if (inner != null) { + return new ScopingConfigurationResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response createOrUpdateWithResponse(String reportName, + String scopingConfigurationName, ScopingConfigurationResourceInner parameters, Context context) { + Response inner = this.serviceClient() + .createOrUpdateWithResponse(reportName, scopingConfigurationName, parameters, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ScopingConfigurationResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ScopingConfigurationResource createOrUpdate(String reportName, String scopingConfigurationName, + ScopingConfigurationResourceInner parameters) { + ScopingConfigurationResourceInner inner + = this.serviceClient().createOrUpdate(reportName, scopingConfigurationName, parameters); + if (inner != null) { + return new ScopingConfigurationResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response deleteByResourceGroupWithResponse(String reportName, String scopingConfigurationName, + Context context) { + return this.serviceClient().deleteWithResponse(reportName, scopingConfigurationName, context); + } + + public void deleteByResourceGroup(String reportName, String scopingConfigurationName) { + this.serviceClient().delete(reportName, scopingConfigurationName); + } + + public PagedIterable listByReportResource(String reportName) { + PagedIterable inner = this.serviceClient().listByReportResource(reportName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new ScopingConfigurationResourceImpl(inner1, this.manager())); + } + + public PagedIterable listByReportResource(String reportName, Context context) { + PagedIterable inner + = this.serviceClient().listByReportResource(reportName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new ScopingConfigurationResourceImpl(inner1, this.manager())); + } + + private ScopingConfigurationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ScopingQuestionsImpl.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ScopingQuestionsImpl.java new file mode 100644 index 0000000000000..f55c1e9f3ff9d --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/ScopingQuestionsImpl.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.implementation; + +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.ScopingQuestionsInner; +import com.azure.resourcemanager.appcomplianceautomation.models.ScopingQuestion; +import com.azure.resourcemanager.appcomplianceautomation.models.ScopingQuestions; +import java.util.Collections; +import java.util.List; + +public final class ScopingQuestionsImpl implements ScopingQuestions { + private ScopingQuestionsInner innerObject; + + private final com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager serviceManager; + + ScopingQuestionsImpl(ScopingQuestionsInner innerObject, + com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List questions() { + List inner = this.innerModel().questions(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public ScopingQuestionsInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/SnapshotOperationsClientImpl.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/SnapshotOperationsClientImpl.java deleted file mode 100644 index dfe4b1d0e924d..0000000000000 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/SnapshotOperationsClientImpl.java +++ /dev/null @@ -1,464 +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.appcomplianceautomation.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.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.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.appcomplianceautomation.fluent.SnapshotOperationsClient; -import com.azure.resourcemanager.appcomplianceautomation.fluent.models.DownloadResponseInner; -import com.azure.resourcemanager.appcomplianceautomation.fluent.models.SnapshotResourceInner; -import com.azure.resourcemanager.appcomplianceautomation.models.SnapshotDownloadRequest; -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 SnapshotOperationsClient. */ -public final class SnapshotOperationsClientImpl implements SnapshotOperationsClient { - /** The proxy service used to perform REST calls. */ - private final SnapshotOperationsService service; - - /** The service client containing this operation class. */ - private final AppComplianceAutomationToolForMicrosoft365Impl client; - - /** - * Initializes an instance of SnapshotOperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - SnapshotOperationsClientImpl(AppComplianceAutomationToolForMicrosoft365Impl client) { - this.service = - RestProxy.create(SnapshotOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AppComplianceAutomationToolForMicrosoft365SnapshotOperations to be - * used by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AppComplianceAutomat") - public interface SnapshotOperationsService { - @Headers({"Content-Type: application/json"}) - @Get("/providers/Microsoft.AppComplianceAutomation/reports/{reportName}/snapshots/{snapshotName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("reportName") String reportName, - @PathParam("snapshotName") String snapshotName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post("/providers/Microsoft.AppComplianceAutomation/reports/{reportName}/snapshots/{snapshotName}/download") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> download( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("reportName") String reportName, - @PathParam("snapshotName") String snapshotName, - @BodyParam("application/json") SnapshotDownloadRequest parameters, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Get the AppComplianceAutomation snapshot and its properties. - * - * @param reportName Report Name. - * @param snapshotName Snapshot 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 AppComplianceAutomation snapshot and its properties along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String reportName, String snapshotName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (reportName == null) { - return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); - } - if (snapshotName == null) { - return Mono.error(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - reportName, - snapshotName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the AppComplianceAutomation snapshot and its properties. - * - * @param reportName Report Name. - * @param snapshotName Snapshot 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 AppComplianceAutomation snapshot and its properties along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String reportName, String snapshotName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (reportName == null) { - return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); - } - if (snapshotName == null) { - return Mono.error(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get(this.client.getEndpoint(), this.client.getApiVersion(), reportName, snapshotName, accept, context); - } - - /** - * Get the AppComplianceAutomation snapshot and its properties. - * - * @param reportName Report Name. - * @param snapshotName Snapshot 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 AppComplianceAutomation snapshot and its properties on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String reportName, String snapshotName) { - return getWithResponseAsync(reportName, snapshotName).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get the AppComplianceAutomation snapshot and its properties. - * - * @param reportName Report Name. - * @param snapshotName Snapshot 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 AppComplianceAutomation snapshot and its properties along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String reportName, String snapshotName, Context context) { - return getWithResponseAsync(reportName, snapshotName, context).block(); - } - - /** - * Get the AppComplianceAutomation snapshot and its properties. - * - * @param reportName Report Name. - * @param snapshotName Snapshot 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 AppComplianceAutomation snapshot and its properties. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SnapshotResourceInner get(String reportName, String snapshotName) { - return getWithResponse(reportName, snapshotName, Context.NONE).getValue(); - } - - /** - * Download compliance needs from snapshot, like: Compliance Report, Resource List. - * - * @param reportName Report Name. - * @param snapshotName Snapshot Name. - * @param parameters Parameters for the query operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object that includes all the possible response for the download operation along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> downloadWithResponseAsync( - String reportName, String snapshotName, SnapshotDownloadRequest parameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (reportName == null) { - return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); - } - if (snapshotName == null) { - return Mono.error(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .download( - this.client.getEndpoint(), - this.client.getApiVersion(), - reportName, - snapshotName, - parameters, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Download compliance needs from snapshot, like: Compliance Report, Resource List. - * - * @param reportName Report Name. - * @param snapshotName Snapshot Name. - * @param parameters Parameters for the query operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object that includes all the possible response for the download operation along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> downloadWithResponseAsync( - String reportName, String snapshotName, SnapshotDownloadRequest parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (reportName == null) { - return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); - } - if (snapshotName == null) { - return Mono.error(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .download( - this.client.getEndpoint(), - this.client.getApiVersion(), - reportName, - snapshotName, - parameters, - accept, - context); - } - - /** - * Download compliance needs from snapshot, like: Compliance Report, Resource List. - * - * @param reportName Report Name. - * @param snapshotName Snapshot Name. - * @param parameters Parameters for the query operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 object that includes all the possible response for the download - * operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DownloadResponseInner> beginDownloadAsync( - String reportName, String snapshotName, SnapshotDownloadRequest parameters) { - Mono>> mono = downloadWithResponseAsync(reportName, snapshotName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - DownloadResponseInner.class, - DownloadResponseInner.class, - this.client.getContext()); - } - - /** - * Download compliance needs from snapshot, like: Compliance Report, Resource List. - * - * @param reportName Report Name. - * @param snapshotName Snapshot Name. - * @param parameters Parameters for the query operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 object that includes all the possible response for the download - * operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DownloadResponseInner> beginDownloadAsync( - String reportName, String snapshotName, SnapshotDownloadRequest parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - downloadWithResponseAsync(reportName, snapshotName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), DownloadResponseInner.class, DownloadResponseInner.class, context); - } - - /** - * Download compliance needs from snapshot, like: Compliance Report, Resource List. - * - * @param reportName Report Name. - * @param snapshotName Snapshot Name. - * @param parameters Parameters for the query operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 object that includes all the possible response for the download - * operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DownloadResponseInner> beginDownload( - String reportName, String snapshotName, SnapshotDownloadRequest parameters) { - return beginDownloadAsync(reportName, snapshotName, parameters).getSyncPoller(); - } - - /** - * Download compliance needs from snapshot, like: Compliance Report, Resource List. - * - * @param reportName Report Name. - * @param snapshotName Snapshot Name. - * @param parameters Parameters for the query operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 object that includes all the possible response for the download - * operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DownloadResponseInner> beginDownload( - String reportName, String snapshotName, SnapshotDownloadRequest parameters, Context context) { - return beginDownloadAsync(reportName, snapshotName, parameters, context).getSyncPoller(); - } - - /** - * Download compliance needs from snapshot, like: Compliance Report, Resource List. - * - * @param reportName Report Name. - * @param snapshotName Snapshot Name. - * @param parameters Parameters for the query operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object that includes all the possible response for the download operation on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono downloadAsync( - String reportName, String snapshotName, SnapshotDownloadRequest parameters) { - return beginDownloadAsync(reportName, snapshotName, parameters) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Download compliance needs from snapshot, like: Compliance Report, Resource List. - * - * @param reportName Report Name. - * @param snapshotName Snapshot Name. - * @param parameters Parameters for the query operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object that includes all the possible response for the download operation on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono downloadAsync( - String reportName, String snapshotName, SnapshotDownloadRequest parameters, Context context) { - return beginDownloadAsync(reportName, snapshotName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Download compliance needs from snapshot, like: Compliance Report, Resource List. - * - * @param reportName Report Name. - * @param snapshotName Snapshot Name. - * @param parameters Parameters for the query operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object that includes all the possible response for the download operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DownloadResponseInner download(String reportName, String snapshotName, SnapshotDownloadRequest parameters) { - return downloadAsync(reportName, snapshotName, parameters).block(); - } - - /** - * Download compliance needs from snapshot, like: Compliance Report, Resource List. - * - * @param reportName Report Name. - * @param snapshotName Snapshot Name. - * @param parameters Parameters for the query operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object that includes all the possible response for the download operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DownloadResponseInner download( - String reportName, String snapshotName, SnapshotDownloadRequest parameters, Context context) { - return downloadAsync(reportName, snapshotName, parameters, context).block(); - } -} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/SnapshotOperationsImpl.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/SnapshotOperationsImpl.java deleted file mode 100644 index 2dd5eac03c293..0000000000000 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/SnapshotOperationsImpl.java +++ /dev/null @@ -1,81 +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.appcomplianceautomation.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.appcomplianceautomation.fluent.SnapshotOperationsClient; -import com.azure.resourcemanager.appcomplianceautomation.fluent.models.DownloadResponseInner; -import com.azure.resourcemanager.appcomplianceautomation.fluent.models.SnapshotResourceInner; -import com.azure.resourcemanager.appcomplianceautomation.models.DownloadResponse; -import com.azure.resourcemanager.appcomplianceautomation.models.SnapshotDownloadRequest; -import com.azure.resourcemanager.appcomplianceautomation.models.SnapshotOperations; -import com.azure.resourcemanager.appcomplianceautomation.models.SnapshotResource; - -public final class SnapshotOperationsImpl implements SnapshotOperations { - private static final ClientLogger LOGGER = new ClientLogger(SnapshotOperationsImpl.class); - - private final SnapshotOperationsClient innerClient; - - private final com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager serviceManager; - - public SnapshotOperationsImpl( - SnapshotOperationsClient innerClient, - com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String reportName, String snapshotName, Context context) { - Response inner = this.serviceClient().getWithResponse(reportName, snapshotName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new SnapshotResourceImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public SnapshotResource get(String reportName, String snapshotName) { - SnapshotResourceInner inner = this.serviceClient().get(reportName, snapshotName); - if (inner != null) { - return new SnapshotResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public DownloadResponse download(String reportName, String snapshotName, SnapshotDownloadRequest parameters) { - DownloadResponseInner inner = this.serviceClient().download(reportName, snapshotName, parameters); - if (inner != null) { - return new DownloadResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public DownloadResponse download( - String reportName, String snapshotName, SnapshotDownloadRequest parameters, Context context) { - DownloadResponseInner inner = this.serviceClient().download(reportName, snapshotName, parameters, context); - if (inner != null) { - return new DownloadResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - private SnapshotOperationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/SnapshotResourceImpl.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/SnapshotResourceImpl.java index b0529eb778e18..5a559cbcc8cc4 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/SnapshotResourceImpl.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/SnapshotResourceImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.implementation; @@ -14,8 +14,7 @@ public final class SnapshotResourceImpl implements SnapshotResource { private final com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager serviceManager; - SnapshotResourceImpl( - SnapshotResourceInner innerObject, + SnapshotResourceImpl(SnapshotResourceInner innerObject, com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/SnapshotsClientImpl.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/SnapshotsClientImpl.java index 72a94f8c9182e..348377230b88e 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/SnapshotsClientImpl.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/SnapshotsClientImpl.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.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; @@ -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.Post; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceInterface; @@ -22,159 +24,261 @@ 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.ManagementError; 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.appcomplianceautomation.fluent.SnapshotsClient; import com.azure.resourcemanager.appcomplianceautomation.fluent.models.SnapshotResourceInner; -import com.azure.resourcemanager.appcomplianceautomation.models.SnapshotResourceList; +import com.azure.resourcemanager.appcomplianceautomation.implementation.models.SnapshotResourceListResult; +import com.azure.resourcemanager.appcomplianceautomation.models.SnapshotDownloadRequest; +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 SnapshotsClient. */ +/** + * An instance of this class provides access to all the operations defined in SnapshotsClient. + */ public final class SnapshotsClientImpl implements SnapshotsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final SnapshotsService service; - /** The service client containing this operation class. */ - private final AppComplianceAutomationToolForMicrosoft365Impl client; + /** + * The service client containing this operation class. + */ + private final AppComplianceAutomationClientImpl client; /** * Initializes an instance of SnapshotsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ - SnapshotsClientImpl(AppComplianceAutomationToolForMicrosoft365Impl client) { - this.service = - RestProxy.create(SnapshotsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + SnapshotsClientImpl(AppComplianceAutomationClientImpl client) { + this.service + = RestProxy.create(SnapshotsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AppComplianceAutomationToolForMicrosoft365Snapshots to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for AppComplianceAutomationClientSnapshots to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "AppComplianceAutomat") public interface SnapshotsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) + @Get("/providers/Microsoft.AppComplianceAutomation/reports/{reportName}/snapshots/{snapshotName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("reportName") String reportName, + @PathParam("snapshotName") String snapshotName, @HeaderParam("accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.AppComplianceAutomation/reports/{reportName}/snapshots") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("reportName") String reportName, - @QueryParam("$skipToken") String skipToken, - @QueryParam("$top") Integer top, - @QueryParam("$select") String select, + Mono> listByReportResource(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @QueryParam("$skipToken") String skipToken, + @QueryParam("$top") Integer top, @QueryParam("$select") String select, @QueryParam("$filter") String filter, + @QueryParam("$orderby") String orderby, @QueryParam("offerGuid") String offerGuid, @QueryParam("reportCreatorTenantId") String reportCreatorTenantId, - @QueryParam("offerGuid") String offerGuid, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("reportName") String reportName, @HeaderParam("accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) + @Post("/providers/Microsoft.AppComplianceAutomation/reports/{reportName}/snapshots/{snapshotName}/download") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> download(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("reportName") String reportName, + @PathParam("snapshotName") String snapshotName, @HeaderParam("accept") String accept, + @BodyParam("application/json") SnapshotDownloadRequest body, 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> listByReportResourceNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("accept") String accept, Context context); + } + + /** + * Get the AppComplianceAutomation snapshot and its properties. + * + * @param reportName Report Name. + * @param snapshotName Snapshot 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 AppComplianceAutomation snapshot and its properties along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String reportName, String snapshotName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + if (snapshotName == null) { + return Mono.error(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), reportName, + snapshotName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the AppComplianceAutomation snapshot and its properties. + * + * @param reportName Report Name. + * @param snapshotName Snapshot 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 AppComplianceAutomation snapshot and its properties along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String reportName, String snapshotName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + if (snapshotName == null) { + return Mono.error(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), reportName, snapshotName, accept, + context); + } + + /** + * Get the AppComplianceAutomation snapshot and its properties. + * + * @param reportName Report Name. + * @param snapshotName Snapshot 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 AppComplianceAutomation snapshot and its properties on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String reportName, String snapshotName) { + return getWithResponseAsync(reportName, snapshotName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the AppComplianceAutomation snapshot and its properties. + * + * @param reportName Report Name. + * @param snapshotName Snapshot 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 AppComplianceAutomation snapshot and its properties along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String reportName, String snapshotName, Context context) { + return getWithResponseAsync(reportName, snapshotName, context).block(); + } + + /** + * Get the AppComplianceAutomation snapshot and its properties. + * + * @param reportName Report Name. + * @param snapshotName Snapshot 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 AppComplianceAutomation snapshot and its properties. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SnapshotResourceInner get(String reportName, String snapshotName) { + return getWithResponse(reportName, snapshotName, Context.NONE).getValue(); } /** * Get the AppComplianceAutomation snapshot list. - * + * * @param reportName Report Name. * @param skipToken Skip over when retrieving results. * @param top Number of elements to return when retrieving results. * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. - * ?$select=reportName,id. - * @param reportCreatorTenantId The tenant id of the report creator. + * ?$select=reportName,id. + * @param filter The filter to apply on the operation. + * @param orderby OData order by query option. * @param offerGuid The offerGuid which mapping to the reports. + * @param reportCreatorTenantId The tenant id of the report creator. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 AppComplianceAutomation snapshot list along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String reportName, - String skipToken, - Integer top, - String select, - String reportCreatorTenantId, - String offerGuid) { + private Mono> listByReportResourceSinglePageAsync(String reportName, + String skipToken, Integer top, String select, String filter, String orderby, String offerGuid, + String reportCreatorTenantId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (reportName == null) { return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - reportName, - skipToken, - top, - select, - reportCreatorTenantId, - offerGuid, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByReportResource(this.client.getEndpoint(), this.client.getApiVersion(), + skipToken, top, select, filter, orderby, offerGuid, reportCreatorTenantId, reportName, 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 AppComplianceAutomation snapshot list. - * + * * @param reportName Report Name. * @param skipToken Skip over when retrieving results. * @param top Number of elements to return when retrieving results. * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. - * ?$select=reportName,id. - * @param reportCreatorTenantId The tenant id of the report creator. + * ?$select=reportName,id. + * @param filter The filter to apply on the operation. + * @param orderby OData order by query option. * @param offerGuid The offerGuid which mapping to the reports. + * @param reportCreatorTenantId The tenant id of the report creator. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 AppComplianceAutomation snapshot list along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String reportName, - String skipToken, - Integer top, - String select, - String reportCreatorTenantId, - String offerGuid, - Context context) { + private Mono> listByReportResourceSinglePageAsync(String reportName, + String skipToken, Integer top, String select, String filter, String orderby, String offerGuid, + String reportCreatorTenantId, 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 (reportName == null) { return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); @@ -182,59 +286,39 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - reportName, - skipToken, - top, - select, - reportCreatorTenantId, - offerGuid, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByReportResource(this.client.getEndpoint(), this.client.getApiVersion(), skipToken, top, select, + filter, orderby, offerGuid, reportCreatorTenantId, reportName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the AppComplianceAutomation snapshot list. - * + * * @param reportName Report Name. * @param skipToken Skip over when retrieving results. * @param top Number of elements to return when retrieving results. * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. - * ?$select=reportName,id. - * @param reportCreatorTenantId The tenant id of the report creator. + * ?$select=reportName,id. + * @param filter The filter to apply on the operation. + * @param orderby OData order by query option. * @param offerGuid The offerGuid which mapping to the reports. + * @param reportCreatorTenantId The tenant id of the report creator. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 AppComplianceAutomation snapshot list as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String reportName, - String skipToken, - Integer top, - String select, - String reportCreatorTenantId, - String offerGuid) { - return new PagedFlux<>( - () -> listSinglePageAsync(reportName, skipToken, top, select, reportCreatorTenantId, offerGuid), - nextLink -> listNextSinglePageAsync(nextLink)); + private PagedFlux listByReportResourceAsync(String reportName, String skipToken, Integer top, + String select, String filter, String orderby, String offerGuid, String reportCreatorTenantId) { + return new PagedFlux<>(() -> listByReportResourceSinglePageAsync(reportName, skipToken, top, select, filter, + orderby, offerGuid, reportCreatorTenantId), nextLink -> listByReportResourceNextSinglePageAsync(nextLink)); } /** * Get the AppComplianceAutomation snapshot list. - * + * * @param reportName Report Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -242,27 +326,30 @@ private PagedFlux listAsync( * @return the AppComplianceAutomation snapshot list as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String reportName) { + private PagedFlux listByReportResourceAsync(String reportName) { final String skipToken = null; final Integer top = null; final String select = null; - final String reportCreatorTenantId = null; + final String filter = null; + final String orderby = null; final String offerGuid = null; - return new PagedFlux<>( - () -> listSinglePageAsync(reportName, skipToken, top, select, reportCreatorTenantId, offerGuid), - nextLink -> listNextSinglePageAsync(nextLink)); + final String reportCreatorTenantId = null; + return new PagedFlux<>(() -> listByReportResourceSinglePageAsync(reportName, skipToken, top, select, filter, + orderby, offerGuid, reportCreatorTenantId), nextLink -> listByReportResourceNextSinglePageAsync(nextLink)); } /** * Get the AppComplianceAutomation snapshot list. - * + * * @param reportName Report Name. * @param skipToken Skip over when retrieving results. * @param top Number of elements to return when retrieving results. * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. - * ?$select=reportName,id. - * @param reportCreatorTenantId The tenant id of the report creator. + * ?$select=reportName,id. + * @param filter The filter to apply on the operation. + * @param orderby OData order by query option. * @param offerGuid The offerGuid which mapping to the reports. + * @param reportCreatorTenantId The tenant id of the report creator. * @param context The 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,22 +357,17 @@ private PagedFlux listAsync(String reportName) { * @return the AppComplianceAutomation snapshot list as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String reportName, - String skipToken, - Integer top, - String select, - String reportCreatorTenantId, - String offerGuid, - Context context) { + private PagedFlux listByReportResourceAsync(String reportName, String skipToken, Integer top, + String select, String filter, String orderby, String offerGuid, String reportCreatorTenantId, Context context) { return new PagedFlux<>( - () -> listSinglePageAsync(reportName, skipToken, top, select, reportCreatorTenantId, offerGuid, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + () -> listByReportResourceSinglePageAsync(reportName, skipToken, top, select, filter, orderby, offerGuid, + reportCreatorTenantId, context), + nextLink -> listByReportResourceNextSinglePageAsync(nextLink, context)); } /** * Get the AppComplianceAutomation snapshot list. - * + * * @param reportName Report Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -293,25 +375,30 @@ private PagedFlux listAsync( * @return the AppComplianceAutomation snapshot list as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String reportName) { + public PagedIterable listByReportResource(String reportName) { final String skipToken = null; final Integer top = null; final String select = null; - final String reportCreatorTenantId = null; + final String filter = null; + final String orderby = null; final String offerGuid = null; - return new PagedIterable<>(listAsync(reportName, skipToken, top, select, reportCreatorTenantId, offerGuid)); + final String reportCreatorTenantId = null; + return new PagedIterable<>(listByReportResourceAsync(reportName, skipToken, top, select, filter, orderby, + offerGuid, reportCreatorTenantId)); } /** * Get the AppComplianceAutomation snapshot list. - * + * * @param reportName Report Name. * @param skipToken Skip over when retrieving results. * @param top Number of elements to return when retrieving results. * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. - * ?$select=reportName,id. - * @param reportCreatorTenantId The tenant id of the report creator. + * ?$select=reportName,id. + * @param filter The filter to apply on the operation. + * @param orderby OData order by query option. * @param offerGuid The offerGuid which mapping to the reports. + * @param reportCreatorTenantId The tenant id of the report creator. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -319,90 +406,281 @@ public PagedIterable list(String reportName) { * @return the AppComplianceAutomation snapshot list as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String reportName, - String skipToken, - Integer top, - String select, - String reportCreatorTenantId, - String offerGuid, + public PagedIterable listByReportResource(String reportName, String skipToken, Integer top, + String select, String filter, String orderby, String offerGuid, String reportCreatorTenantId, Context context) { + return new PagedIterable<>(listByReportResourceAsync(reportName, skipToken, top, select, filter, orderby, + offerGuid, reportCreatorTenantId, context)); + } + + /** + * Download compliance needs from snapshot, like: Compliance Report, Resource List. + * + * @param reportName Report Name. + * @param snapshotName Snapshot Name. + * @param body Parameters for the query operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> downloadWithResponseAsync(String reportName, String snapshotName, + SnapshotDownloadRequest body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + if (snapshotName == null) { + return Mono.error(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.download(this.client.getEndpoint(), this.client.getApiVersion(), reportName, + snapshotName, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Download compliance needs from snapshot, like: Compliance Report, Resource List. + * + * @param reportName Report Name. + * @param snapshotName Snapshot Name. + * @param body Parameters for the query operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> downloadWithResponseAsync(String reportName, String snapshotName, + SnapshotDownloadRequest body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + if (snapshotName == null) { + return Mono.error(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.download(this.client.getEndpoint(), this.client.getApiVersion(), reportName, snapshotName, + accept, body, context); + } + + /** + * Download compliance needs from snapshot, like: Compliance Report, Resource List. + * + * @param reportName Report Name. + * @param snapshotName Snapshot Name. + * @param body Parameters for the query operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, ManagementError> beginDownloadAsync(String reportName, + String snapshotName, SnapshotDownloadRequest body) { + Mono>> mono = downloadWithResponseAsync(reportName, snapshotName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ManagementError.class, ManagementError.class, this.client.getContext()); + } + + /** + * Download compliance needs from snapshot, like: Compliance Report, Resource List. + * + * @param reportName Report Name. + * @param snapshotName Snapshot Name. + * @param body Parameters for the query operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, ManagementError> beginDownloadAsync(String reportName, + String snapshotName, SnapshotDownloadRequest body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = downloadWithResponseAsync(reportName, snapshotName, body, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ManagementError.class, ManagementError.class, context); + } + + /** + * Download compliance needs from snapshot, like: Compliance Report, Resource List. + * + * @param reportName Report Name. + * @param snapshotName Snapshot Name. + * @param body Parameters for the query operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, ManagementError> beginDownload(String reportName, + String snapshotName, SnapshotDownloadRequest body) { + return this.beginDownloadAsync(reportName, snapshotName, body).getSyncPoller(); + } + + /** + * Download compliance needs from snapshot, like: Compliance Report, Resource List. + * + * @param reportName Report Name. + * @param snapshotName Snapshot Name. + * @param body Parameters for the query operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, ManagementError> beginDownload(String reportName, + String snapshotName, SnapshotDownloadRequest body, Context context) { + return this.beginDownloadAsync(reportName, snapshotName, body, context).getSyncPoller(); + } + + /** + * Download compliance needs from snapshot, like: Compliance Report, Resource List. + * + * @param reportName Report Name. + * @param snapshotName Snapshot Name. + * @param body Parameters for the query operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono downloadAsync(String reportName, String snapshotName, SnapshotDownloadRequest body) { + return beginDownloadAsync(reportName, snapshotName, body).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Download compliance needs from snapshot, like: Compliance Report, Resource List. + * + * @param reportName Report Name. + * @param snapshotName Snapshot Name. + * @param body Parameters for the query operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono downloadAsync(String reportName, String snapshotName, SnapshotDownloadRequest body, Context context) { - return new PagedIterable<>( - listAsync(reportName, skipToken, top, select, reportCreatorTenantId, offerGuid, context)); + return beginDownloadAsync(reportName, snapshotName, body, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Download compliance needs from snapshot, like: Compliance Report, Resource List. + * + * @param reportName Report Name. + * @param snapshotName Snapshot Name. + * @param body Parameters for the query operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagementError download(String reportName, String snapshotName, SnapshotDownloadRequest body) { + return downloadAsync(reportName, snapshotName, body).block(); + } + + /** + * Download compliance needs from snapshot, like: Compliance Report, Resource List. + * + * @param reportName Report Name. + * @param snapshotName Snapshot Name. + * @param body Parameters for the query operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagementError download(String reportName, String snapshotName, SnapshotDownloadRequest body, + Context context) { + return downloadAsync(reportName, snapshotName, body, context).block(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object that includes an array of resources and a possible link for next set along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return the response of a SnapshotResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { + private Mono> listByReportResourceNextSinglePageAsync(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.listByReportResourceNext(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 nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object that includes an array of resources and a possible link for next set along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return the response of a SnapshotResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { + private Mono> listByReportResourceNextSinglePageAsync(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.listByReportResourceNext(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/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/SnapshotsImpl.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/SnapshotsImpl.java index 50a781ba96042..0b3d581225319 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/SnapshotsImpl.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/SnapshotsImpl.java @@ -1,14 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.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.management.exception.ManagementError; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.appcomplianceautomation.fluent.SnapshotsClient; import com.azure.resourcemanager.appcomplianceautomation.fluent.models.SnapshotResourceInner; +import com.azure.resourcemanager.appcomplianceautomation.models.SnapshotDownloadRequest; import com.azure.resourcemanager.appcomplianceautomation.models.SnapshotResource; import com.azure.resourcemanager.appcomplianceautomation.models.Snapshots; @@ -19,29 +23,51 @@ public final class SnapshotsImpl implements Snapshots { private final com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager serviceManager; - public SnapshotsImpl( - SnapshotsClient innerClient, + public SnapshotsImpl(SnapshotsClient innerClient, com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public PagedIterable list(String reportName) { - PagedIterable inner = this.serviceClient().list(reportName); - return Utils.mapPage(inner, inner1 -> new SnapshotResourceImpl(inner1, this.manager())); + public Response getWithResponse(String reportName, String snapshotName, Context context) { + Response inner = this.serviceClient().getWithResponse(reportName, snapshotName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new SnapshotResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } } - public PagedIterable list( - String reportName, - String skipToken, - Integer top, - String select, - String reportCreatorTenantId, - String offerGuid, + public SnapshotResource get(String reportName, String snapshotName) { + SnapshotResourceInner inner = this.serviceClient().get(reportName, snapshotName); + if (inner != null) { + return new SnapshotResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listByReportResource(String reportName) { + PagedIterable inner = this.serviceClient().listByReportResource(reportName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SnapshotResourceImpl(inner1, this.manager())); + } + + public PagedIterable listByReportResource(String reportName, String skipToken, Integer top, + String select, String filter, String orderby, String offerGuid, String reportCreatorTenantId, Context context) { + PagedIterable inner = this.serviceClient() + .listByReportResource(reportName, skipToken, top, select, filter, orderby, offerGuid, reportCreatorTenantId, + context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SnapshotResourceImpl(inner1, this.manager())); + } + + public ManagementError download(String reportName, String snapshotName, SnapshotDownloadRequest body) { + return this.serviceClient().download(reportName, snapshotName, body); + } + + public ManagementError download(String reportName, String snapshotName, SnapshotDownloadRequest body, Context context) { - PagedIterable inner = - this.serviceClient().list(reportName, skipToken, top, select, reportCreatorTenantId, offerGuid, context); - return Utils.mapPage(inner, inner1 -> new SnapshotResourceImpl(inner1, this.manager())); + return this.serviceClient().download(reportName, snapshotName, body, context); } private SnapshotsClient serviceClient() { diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/WebhookResourceImpl.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/WebhookResourceImpl.java new file mode 100644 index 0000000000000..a48660f07b762 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/WebhookResourceImpl.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.WebhookResourceInner; +import com.azure.resourcemanager.appcomplianceautomation.models.WebhookProperties; +import com.azure.resourcemanager.appcomplianceautomation.models.WebhookResource; + +public final class WebhookResourceImpl implements WebhookResource { + private WebhookResourceInner innerObject; + + private final com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager serviceManager; + + WebhookResourceImpl(WebhookResourceInner innerObject, + com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager 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 WebhookProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public WebhookResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/WebhooksClientImpl.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/WebhooksClientImpl.java new file mode 100644 index 0000000000000..ad9a42c5f7d49 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/WebhooksClientImpl.java @@ -0,0 +1,837 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.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.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.appcomplianceautomation.fluent.WebhooksClient; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.WebhookResourceInner; +import com.azure.resourcemanager.appcomplianceautomation.implementation.models.WebhookResourceListResult; +import com.azure.resourcemanager.appcomplianceautomation.models.WebhookResourcePatch; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in WebhooksClient. + */ +public final class WebhooksClientImpl implements WebhooksClient { + /** + * The proxy service used to perform REST calls. + */ + private final WebhooksService service; + + /** + * The service client containing this operation class. + */ + private final AppComplianceAutomationClientImpl client; + + /** + * Initializes an instance of WebhooksClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + WebhooksClientImpl(AppComplianceAutomationClientImpl client) { + this.service = RestProxy.create(WebhooksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AppComplianceAutomationClientWebhooks to be used by the proxy service + * to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "AppComplianceAutomat") + public interface WebhooksService { + @Headers({ "Content-Type: application/json" }) + @Get("/providers/Microsoft.AppComplianceAutomation/reports/{reportName}/webhooks/{webhookName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("reportName") String reportName, + @PathParam("webhookName") String webhookName, @HeaderParam("accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/providers/Microsoft.AppComplianceAutomation/reports/{reportName}/webhooks/{webhookName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("reportName") String reportName, + @PathParam("webhookName") String webhookName, @HeaderParam("accept") String accept, + @BodyParam("application/json") WebhookResourceInner parameters, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/providers/Microsoft.AppComplianceAutomation/reports/{reportName}/webhooks/{webhookName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("reportName") String reportName, + @PathParam("webhookName") String webhookName, @HeaderParam("accept") String accept, + @BodyParam("application/json") WebhookResourcePatch properties, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/providers/Microsoft.AppComplianceAutomation/reports/{reportName}/webhooks/{webhookName}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("reportName") String reportName, + @PathParam("webhookName") String webhookName, @HeaderParam("accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/providers/Microsoft.AppComplianceAutomation/reports/{reportName}/webhooks") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByReportResource(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @QueryParam("$skipToken") String skipToken, + @QueryParam("$top") Integer top, @QueryParam("$select") String select, @QueryParam("$filter") String filter, + @QueryParam("$orderby") String orderby, @QueryParam("offerGuid") String offerGuid, + @QueryParam("reportCreatorTenantId") String reportCreatorTenantId, + @PathParam("reportName") String reportName, @HeaderParam("accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByReportResourceNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("accept") String accept, Context context); + } + + /** + * Get the AppComplianceAutomation webhook and its properties. + * + * @param reportName Report Name. + * @param webhookName Webhook 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 AppComplianceAutomation webhook and its properties along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String reportName, String webhookName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + if (webhookName == null) { + return Mono.error(new IllegalArgumentException("Parameter webhookName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), reportName, + webhookName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the AppComplianceAutomation webhook and its properties. + * + * @param reportName Report Name. + * @param webhookName Webhook 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 AppComplianceAutomation webhook and its properties along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String reportName, String webhookName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + if (webhookName == null) { + return Mono.error(new IllegalArgumentException("Parameter webhookName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), reportName, webhookName, accept, + context); + } + + /** + * Get the AppComplianceAutomation webhook and its properties. + * + * @param reportName Report Name. + * @param webhookName Webhook 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 AppComplianceAutomation webhook and its properties on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String reportName, String webhookName) { + return getWithResponseAsync(reportName, webhookName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the AppComplianceAutomation webhook and its properties. + * + * @param reportName Report Name. + * @param webhookName Webhook 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 AppComplianceAutomation webhook and its properties along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String reportName, String webhookName, Context context) { + return getWithResponseAsync(reportName, webhookName, context).block(); + } + + /** + * Get the AppComplianceAutomation webhook and its properties. + * + * @param reportName Report Name. + * @param webhookName Webhook 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 AppComplianceAutomation webhook and its properties. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WebhookResourceInner get(String reportName, String webhookName) { + return getWithResponse(reportName, webhookName, Context.NONE).getValue(); + } + + /** + * Create a new AppComplianceAutomation webhook or update an exiting AppComplianceAutomation webhook. + * + * @param reportName Report Name. + * @param webhookName Webhook Name. + * @param parameters Parameters for the create or update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a class represent an AppComplianceAutomation webhook resource along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync(String reportName, String webhookName, + WebhookResourceInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + if (webhookName == null) { + return Mono.error(new IllegalArgumentException("Parameter webhookName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + reportName, webhookName, accept, parameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a new AppComplianceAutomation webhook or update an exiting AppComplianceAutomation webhook. + * + * @param reportName Report Name. + * @param webhookName Webhook Name. + * @param parameters Parameters for the create or update operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a class represent an AppComplianceAutomation webhook resource along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync(String reportName, String webhookName, + WebhookResourceInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + if (webhookName == null) { + return Mono.error(new IllegalArgumentException("Parameter webhookName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), reportName, webhookName, + accept, parameters, context); + } + + /** + * Create a new AppComplianceAutomation webhook or update an exiting AppComplianceAutomation webhook. + * + * @param reportName Report Name. + * @param webhookName Webhook Name. + * @param parameters Parameters for the create or update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a class represent an AppComplianceAutomation webhook resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String reportName, String webhookName, + WebhookResourceInner parameters) { + return createOrUpdateWithResponseAsync(reportName, webhookName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Create a new AppComplianceAutomation webhook or update an exiting AppComplianceAutomation webhook. + * + * @param reportName Report Name. + * @param webhookName Webhook Name. + * @param parameters Parameters for the create or update operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a class represent an AppComplianceAutomation webhook resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String reportName, String webhookName, + WebhookResourceInner parameters, Context context) { + return createOrUpdateWithResponseAsync(reportName, webhookName, parameters, context).block(); + } + + /** + * Create a new AppComplianceAutomation webhook or update an exiting AppComplianceAutomation webhook. + * + * @param reportName Report Name. + * @param webhookName Webhook Name. + * @param parameters Parameters for the create or update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a class represent an AppComplianceAutomation webhook resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WebhookResourceInner createOrUpdate(String reportName, String webhookName, WebhookResourceInner parameters) { + return createOrUpdateWithResponse(reportName, webhookName, parameters, Context.NONE).getValue(); + } + + /** + * Update an exiting AppComplianceAutomation webhook. + * + * @param reportName Report Name. + * @param webhookName Webhook Name. + * @param properties Parameters for the create or update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a class represent an AppComplianceAutomation webhook resource along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync(String reportName, String webhookName, + WebhookResourcePatch properties) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + if (webhookName == null) { + return Mono.error(new IllegalArgumentException("Parameter webhookName is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), reportName, + webhookName, accept, properties, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update an exiting AppComplianceAutomation webhook. + * + * @param reportName Report Name. + * @param webhookName Webhook Name. + * @param properties Parameters for the create or update operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a class represent an AppComplianceAutomation webhook resource along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync(String reportName, String webhookName, + WebhookResourcePatch properties, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + if (webhookName == null) { + return Mono.error(new IllegalArgumentException("Parameter webhookName is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), reportName, webhookName, accept, + properties, context); + } + + /** + * Update an exiting AppComplianceAutomation webhook. + * + * @param reportName Report Name. + * @param webhookName Webhook Name. + * @param properties Parameters for the create or update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a class represent an AppComplianceAutomation webhook resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String reportName, String webhookName, + WebhookResourcePatch properties) { + return updateWithResponseAsync(reportName, webhookName, properties) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Update an exiting AppComplianceAutomation webhook. + * + * @param reportName Report Name. + * @param webhookName Webhook Name. + * @param properties Parameters for the create or update operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a class represent an AppComplianceAutomation webhook resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse(String reportName, String webhookName, + WebhookResourcePatch properties, Context context) { + return updateWithResponseAsync(reportName, webhookName, properties, context).block(); + } + + /** + * Update an exiting AppComplianceAutomation webhook. + * + * @param reportName Report Name. + * @param webhookName Webhook Name. + * @param properties Parameters for the create or update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a class represent an AppComplianceAutomation webhook resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WebhookResourceInner update(String reportName, String webhookName, WebhookResourcePatch properties) { + return updateWithResponse(reportName, webhookName, properties, Context.NONE).getValue(); + } + + /** + * Delete an AppComplianceAutomation webhook. + * + * @param reportName Report Name. + * @param webhookName Webhook 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 reportName, String webhookName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + if (webhookName == null) { + return Mono.error(new IllegalArgumentException("Parameter webhookName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), reportName, + webhookName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete an AppComplianceAutomation webhook. + * + * @param reportName Report Name. + * @param webhookName Webhook 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 reportName, String webhookName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + if (webhookName == null) { + return Mono.error(new IllegalArgumentException("Parameter webhookName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), reportName, webhookName, accept, + context); + } + + /** + * Delete an AppComplianceAutomation webhook. + * + * @param reportName Report Name. + * @param webhookName Webhook 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 reportName, String webhookName) { + return deleteWithResponseAsync(reportName, webhookName).flatMap(ignored -> Mono.empty()); + } + + /** + * Delete an AppComplianceAutomation webhook. + * + * @param reportName Report Name. + * @param webhookName Webhook 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 reportName, String webhookName, Context context) { + return deleteWithResponseAsync(reportName, webhookName, context).block(); + } + + /** + * Delete an AppComplianceAutomation webhook. + * + * @param reportName Report Name. + * @param webhookName Webhook 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 reportName, String webhookName) { + deleteWithResponse(reportName, webhookName, Context.NONE); + } + + /** + * Get the AppComplianceAutomation webhook list. + * + * @param reportName Report Name. + * @param skipToken Skip over when retrieving results. + * @param top Number of elements to return when retrieving results. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. + * ?$select=reportName,id. + * @param filter The filter to apply on the operation. + * @param orderby OData order by query option. + * @param offerGuid The offerGuid which mapping to the reports. + * @param reportCreatorTenantId The tenant id of the report creator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 AppComplianceAutomation webhook list along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByReportResourceSinglePageAsync(String reportName, + String skipToken, Integer top, String select, String filter, String orderby, String offerGuid, + String reportCreatorTenantId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByReportResource(this.client.getEndpoint(), this.client.getApiVersion(), + skipToken, top, select, filter, orderby, offerGuid, reportCreatorTenantId, reportName, 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 AppComplianceAutomation webhook list. + * + * @param reportName Report Name. + * @param skipToken Skip over when retrieving results. + * @param top Number of elements to return when retrieving results. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. + * ?$select=reportName,id. + * @param filter The filter to apply on the operation. + * @param orderby OData order by query option. + * @param offerGuid The offerGuid which mapping to the reports. + * @param reportCreatorTenantId The tenant id of the report creator. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 AppComplianceAutomation webhook list along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByReportResourceSinglePageAsync(String reportName, + String skipToken, Integer top, String select, String filter, String orderby, String offerGuid, + String reportCreatorTenantId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (reportName == null) { + return Mono.error(new IllegalArgumentException("Parameter reportName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByReportResource(this.client.getEndpoint(), this.client.getApiVersion(), skipToken, top, select, + filter, orderby, offerGuid, reportCreatorTenantId, reportName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the AppComplianceAutomation webhook list. + * + * @param reportName Report Name. + * @param skipToken Skip over when retrieving results. + * @param top Number of elements to return when retrieving results. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. + * ?$select=reportName,id. + * @param filter The filter to apply on the operation. + * @param orderby OData order by query option. + * @param offerGuid The offerGuid which mapping to the reports. + * @param reportCreatorTenantId The tenant id of the report creator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 AppComplianceAutomation webhook list as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByReportResourceAsync(String reportName, String skipToken, Integer top, + String select, String filter, String orderby, String offerGuid, String reportCreatorTenantId) { + return new PagedFlux<>(() -> listByReportResourceSinglePageAsync(reportName, skipToken, top, select, filter, + orderby, offerGuid, reportCreatorTenantId), nextLink -> listByReportResourceNextSinglePageAsync(nextLink)); + } + + /** + * Get the AppComplianceAutomation webhook list. + * + * @param reportName Report 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 AppComplianceAutomation webhook list as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByReportResourceAsync(String reportName) { + final String skipToken = null; + final Integer top = null; + final String select = null; + final String filter = null; + final String orderby = null; + final String offerGuid = null; + final String reportCreatorTenantId = null; + return new PagedFlux<>(() -> listByReportResourceSinglePageAsync(reportName, skipToken, top, select, filter, + orderby, offerGuid, reportCreatorTenantId), nextLink -> listByReportResourceNextSinglePageAsync(nextLink)); + } + + /** + * Get the AppComplianceAutomation webhook list. + * + * @param reportName Report Name. + * @param skipToken Skip over when retrieving results. + * @param top Number of elements to return when retrieving results. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. + * ?$select=reportName,id. + * @param filter The filter to apply on the operation. + * @param orderby OData order by query option. + * @param offerGuid The offerGuid which mapping to the reports. + * @param reportCreatorTenantId The tenant id of the report creator. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 AppComplianceAutomation webhook list as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByReportResourceAsync(String reportName, String skipToken, Integer top, + String select, String filter, String orderby, String offerGuid, String reportCreatorTenantId, Context context) { + return new PagedFlux<>( + () -> listByReportResourceSinglePageAsync(reportName, skipToken, top, select, filter, orderby, offerGuid, + reportCreatorTenantId, context), + nextLink -> listByReportResourceNextSinglePageAsync(nextLink, context)); + } + + /** + * Get the AppComplianceAutomation webhook list. + * + * @param reportName Report 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 AppComplianceAutomation webhook list as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByReportResource(String reportName) { + final String skipToken = null; + final Integer top = null; + final String select = null; + final String filter = null; + final String orderby = null; + final String offerGuid = null; + final String reportCreatorTenantId = null; + return new PagedIterable<>(listByReportResourceAsync(reportName, skipToken, top, select, filter, orderby, + offerGuid, reportCreatorTenantId)); + } + + /** + * Get the AppComplianceAutomation webhook list. + * + * @param reportName Report Name. + * @param skipToken Skip over when retrieving results. + * @param top Number of elements to return when retrieving results. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. + * ?$select=reportName,id. + * @param filter The filter to apply on the operation. + * @param orderby OData order by query option. + * @param offerGuid The offerGuid which mapping to the reports. + * @param reportCreatorTenantId The tenant id of the report creator. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 AppComplianceAutomation webhook list as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByReportResource(String reportName, String skipToken, Integer top, + String select, String filter, String orderby, String offerGuid, String reportCreatorTenantId, Context context) { + return new PagedIterable<>(listByReportResourceAsync(reportName, skipToken, top, select, filter, orderby, + offerGuid, reportCreatorTenantId, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of a WebhookResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByReportResourceNextSinglePageAsync(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.listByReportResourceNext(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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of a WebhookResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByReportResourceNextSinglePageAsync(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.listByReportResourceNext(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/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/WebhooksImpl.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/WebhooksImpl.java new file mode 100644 index 0000000000000..53ec1100d05da --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/WebhooksImpl.java @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.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.appcomplianceautomation.fluent.WebhooksClient; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.WebhookResourceInner; +import com.azure.resourcemanager.appcomplianceautomation.models.WebhookResource; +import com.azure.resourcemanager.appcomplianceautomation.models.WebhookResourcePatch; +import com.azure.resourcemanager.appcomplianceautomation.models.Webhooks; + +public final class WebhooksImpl implements Webhooks { + private static final ClientLogger LOGGER = new ClientLogger(WebhooksImpl.class); + + private final WebhooksClient innerClient; + + private final com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager serviceManager; + + public WebhooksImpl(WebhooksClient innerClient, + com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String reportName, String webhookName, Context context) { + Response inner = this.serviceClient().getWithResponse(reportName, webhookName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new WebhookResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public WebhookResource get(String reportName, String webhookName) { + WebhookResourceInner inner = this.serviceClient().get(reportName, webhookName); + if (inner != null) { + return new WebhookResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response createOrUpdateWithResponse(String reportName, String webhookName, + WebhookResourceInner parameters, Context context) { + Response inner + = this.serviceClient().createOrUpdateWithResponse(reportName, webhookName, parameters, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new WebhookResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public WebhookResource createOrUpdate(String reportName, String webhookName, WebhookResourceInner parameters) { + WebhookResourceInner inner = this.serviceClient().createOrUpdate(reportName, webhookName, parameters); + if (inner != null) { + return new WebhookResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateWithResponse(String reportName, String webhookName, + WebhookResourcePatch properties, Context context) { + Response inner + = this.serviceClient().updateWithResponse(reportName, webhookName, properties, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new WebhookResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public WebhookResource update(String reportName, String webhookName, WebhookResourcePatch properties) { + WebhookResourceInner inner = this.serviceClient().update(reportName, webhookName, properties); + if (inner != null) { + return new WebhookResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response deleteByResourceGroupWithResponse(String reportName, String webhookName, Context context) { + return this.serviceClient().deleteWithResponse(reportName, webhookName, context); + } + + public void deleteByResourceGroup(String reportName, String webhookName) { + this.serviceClient().delete(reportName, webhookName); + } + + public PagedIterable listByReportResource(String reportName) { + PagedIterable inner = this.serviceClient().listByReportResource(reportName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WebhookResourceImpl(inner1, this.manager())); + } + + public PagedIterable listByReportResource(String reportName, String skipToken, Integer top, + String select, String filter, String orderby, String offerGuid, String reportCreatorTenantId, Context context) { + PagedIterable inner = this.serviceClient() + .listByReportResource(reportName, skipToken, top, select, filter, orderby, offerGuid, reportCreatorTenantId, + context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WebhookResourceImpl(inner1, this.manager())); + } + + private WebhooksClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/models/EvidenceResourceListResult.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/models/EvidenceResourceListResult.java new file mode 100644 index 0000000000000..711339948634a --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/models/EvidenceResourceListResult.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.EvidenceResourceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a EvidenceResource list operation. + */ +@Immutable +public final class EvidenceResourceListResult { + /* + * The EvidenceResource items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of EvidenceResourceListResult class. + */ + private EvidenceResourceListResult() { + } + + /** + * Get the value property: The EvidenceResource items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model EvidenceResourceListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(EvidenceResourceListResult.class); +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/OperationListResult.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/models/PagedOperation.java similarity index 52% rename from sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/OperationListResult.java rename to sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/models/PagedOperation.java index 5bc4c5e87df68..dd6dca09bed3a 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/OperationListResult.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/models/PagedOperation.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.appcomplianceautomation.models; +package com.azure.resourcemanager.appcomplianceautomation.implementation.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.appcomplianceautomation.fluent.models.OperationInner; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -14,26 +15,28 @@ * results. */ @Immutable -public final class OperationListResult { +public final class PagedOperation { /* - * List of operations supported by the resource provider + * The Operation items on this page */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "value", required = true) private List value; /* - * URL to get the next set of operation list results (if there are any). + * The link to the next page of items */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of OperationListResult class. */ - public OperationListResult() { + /** + * Creates an instance of PagedOperation class. + */ + private PagedOperation() { } /** - * Get the value property: List of operations supported by the resource provider. - * + * Get the value property: The Operation items on this page. + * * @return the value value. */ public List value() { @@ -41,8 +44,8 @@ public List value() { } /** - * Get the nextLink property: URL to get the next set of operation list results (if there are any). - * + * Get the nextLink property: The link to the next page of items. + * * @return the nextLink value. */ public String nextLink() { @@ -51,12 +54,17 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() != null) { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model PagedOperation")); + } else { value().forEach(e -> e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(PagedOperation.class); } diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/models/ReportResourceListResult.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/models/ReportResourceListResult.java new file mode 100644 index 0000000000000..5c41a54234bc5 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/models/ReportResourceListResult.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.ReportResourceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a ReportResource list operation. + */ +@Immutable +public final class ReportResourceListResult { + /* + * The ReportResource items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of ReportResourceListResult class. + */ + private ReportResourceListResult() { + } + + /** + * Get the value property: The ReportResource items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model ReportResourceListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ReportResourceListResult.class); +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/models/ScopingConfigurationResourceListResult.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/models/ScopingConfigurationResourceListResult.java new file mode 100644 index 0000000000000..f7547a12b47b7 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/models/ScopingConfigurationResourceListResult.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.ScopingConfigurationResourceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a ScopingConfigurationResource list operation. + */ +@Immutable +public final class ScopingConfigurationResourceListResult { + /* + * The ScopingConfigurationResource items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of ScopingConfigurationResourceListResult class. + */ + private ScopingConfigurationResourceListResult() { + } + + /** + * Get the value property: The ScopingConfigurationResource items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model ScopingConfigurationResourceListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ScopingConfigurationResourceListResult.class); +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/models/SnapshotResourceListResult.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/models/SnapshotResourceListResult.java new file mode 100644 index 0000000000000..77e9a93066416 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/models/SnapshotResourceListResult.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.SnapshotResourceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a SnapshotResource list operation. + */ +@Immutable +public final class SnapshotResourceListResult { + /* + * The SnapshotResource items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of SnapshotResourceListResult class. + */ + private SnapshotResourceListResult() { + } + + /** + * Get the value property: The SnapshotResource items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model SnapshotResourceListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SnapshotResourceListResult.class); +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/models/WebhookResourceListResult.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/models/WebhookResourceListResult.java new file mode 100644 index 0000000000000..bd113285f776f --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/models/WebhookResourceListResult.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.WebhookResourceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a WebhookResource list operation. + */ +@Immutable +public final class WebhookResourceListResult { + /* + * The WebhookResource items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of WebhookResourceListResult class. + */ + private WebhookResourceListResult() { + } + + /** + * Get the value property: The WebhookResource items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property value in model WebhookResourceListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WebhookResourceListResult.class); +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/package-info.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/package-info.java index 8020011a35c7d..4aba25f23d1bf 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/package-info.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/implementation/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the implementations for AppComplianceAutomationToolForMicrosoft365. App Compliance Automation Tool - * for Microsoft 365 API spec. + * Package containing the implementations for AppComplianceAutomation. + * App Compliance Automation Tool for Microsoft 365 API spec. */ package com.azure.resourcemanager.appcomplianceautomation.implementation; diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ActionType.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ActionType.java index 543c6f2ce8100..3fc79893803dc 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ActionType.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ActionType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.models; @@ -8,14 +8,27 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ +/** + * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + */ public final class ActionType extends ExpandableStringEnum { - /** Static value Internal for ActionType. */ + /** + * Static value Internal for ActionType. + */ public static final ActionType INTERNAL = fromString("Internal"); + /** + * Creates a new instance of ActionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ActionType() { + } + /** * Creates or finds a ActionType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ActionType. */ @@ -26,7 +39,7 @@ public static ActionType fromString(String name) { /** * Gets known ActionType values. - * + * * @return known ActionType values. */ public static Collection values() { diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Assessment.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Assessment.java deleted file mode 100644 index 6d940965c80d3..0000000000000 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Assessment.java +++ /dev/null @@ -1,133 +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.appcomplianceautomation.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A class represent the assessment. */ -@Immutable -public final class Assessment { - /* - * The name of the assessment. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /* - * The severity level of this assessment. - */ - @JsonProperty(value = "severity", access = JsonProperty.Access.WRITE_ONLY) - private AssessmentSeverity severity; - - /* - * The description of the assessment. - */ - @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) - private String description; - - /* - * The remediation of the assessment. - */ - @JsonProperty(value = "remediation", access = JsonProperty.Access.WRITE_ONLY) - private String remediation; - - /* - * Indicates whether all the resource(s) are compliant. - */ - @JsonProperty(value = "isPass", access = JsonProperty.Access.WRITE_ONLY) - private IsPass isPass; - - /* - * The policy id mapping to this assessment. - */ - @JsonProperty(value = "policyId", access = JsonProperty.Access.WRITE_ONLY) - private String policyId; - - /* - * List of resource assessments. - */ - @JsonProperty(value = "resourceList", access = JsonProperty.Access.WRITE_ONLY) - private List resourceList; - - /** Creates an instance of Assessment class. */ - public Assessment() { - } - - /** - * Get the name property: The name of the assessment. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the severity property: The severity level of this assessment. - * - * @return the severity value. - */ - public AssessmentSeverity severity() { - return this.severity; - } - - /** - * Get the description property: The description of the assessment. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Get the remediation property: The remediation of the assessment. - * - * @return the remediation value. - */ - public String remediation() { - return this.remediation; - } - - /** - * Get the isPass property: Indicates whether all the resource(s) are compliant. - * - * @return the isPass value. - */ - public IsPass isPass() { - return this.isPass; - } - - /** - * Get the policyId property: The policy id mapping to this assessment. - * - * @return the policyId value. - */ - public String policyId() { - return this.policyId; - } - - /** - * Get the resourceList property: List of resource assessments. - * - * @return the resourceList value. - */ - public List resourceList() { - return this.resourceList; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (resourceList() != null) { - resourceList().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/AssessmentResource.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/AssessmentResource.java deleted file mode 100644 index ad50177e7d587..0000000000000 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/AssessmentResource.java +++ /dev/null @@ -1,84 +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.appcomplianceautomation.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** A class represent the assessment resource. */ -@Immutable -public final class AssessmentResource { - /* - * The Id of the resource. - */ - @JsonProperty(value = "resourceId", access = JsonProperty.Access.WRITE_ONLY) - private String resourceId; - - /* - * Resource status. - */ - @JsonProperty(value = "resourceStatus", access = JsonProperty.Access.WRITE_ONLY) - private ResourceStatus resourceStatus; - - /* - * The reason for the N/A resource. - */ - @JsonProperty(value = "reason", access = JsonProperty.Access.WRITE_ONLY) - private String reason; - - /* - * The status change date for the resource. For unavailable date, set it as N/A. - */ - @JsonProperty(value = "statusChangeDate", access = JsonProperty.Access.WRITE_ONLY) - private String statusChangeDate; - - /** Creates an instance of AssessmentResource class. */ - public AssessmentResource() { - } - - /** - * Get the resourceId property: The Id of the resource. - * - * @return the resourceId value. - */ - public String resourceId() { - return this.resourceId; - } - - /** - * Get the resourceStatus property: Resource status. - * - * @return the resourceStatus value. - */ - public ResourceStatus resourceStatus() { - return this.resourceStatus; - } - - /** - * Get the reason property: The reason for the N/A resource. - * - * @return the reason value. - */ - public String reason() { - return this.reason; - } - - /** - * Get the statusChangeDate property: The status change date for the resource. For unavailable date, set it as N/A. - * - * @return the statusChangeDate value. - */ - public String statusChangeDate() { - return this.statusChangeDate; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/AssessmentSeverity.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/AssessmentSeverity.java deleted file mode 100644 index 8112c11b59d4d..0000000000000 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/AssessmentSeverity.java +++ /dev/null @@ -1,41 +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.appcomplianceautomation.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Indicates the assessment severity. */ -public final class AssessmentSeverity extends ExpandableStringEnum { - /** Static value High for AssessmentSeverity. */ - public static final AssessmentSeverity HIGH = fromString("High"); - - /** Static value Medium for AssessmentSeverity. */ - public static final AssessmentSeverity MEDIUM = fromString("Medium"); - - /** Static value Low for AssessmentSeverity. */ - public static final AssessmentSeverity LOW = fromString("Low"); - - /** - * Creates or finds a AssessmentSeverity from its string representation. - * - * @param name a name to look for. - * @return the corresponding AssessmentSeverity. - */ - @JsonCreator - public static AssessmentSeverity fromString(String name) { - return fromString(name, AssessmentSeverity.class); - } - - /** - * Gets known AssessmentSeverity values. - * - * @return known AssessmentSeverity values. - */ - public static Collection values() { - return values(AssessmentSeverity.class); - } -} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Category.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Category.java index 625a9c2fac413..dfd4491dac020 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Category.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Category.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.models; @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A class represent the compliance category. */ +/** + * A class represent the compliance category. + */ @Immutable public final class Category { /* @@ -17,12 +19,6 @@ public final class Category { @JsonProperty(value = "categoryName", access = JsonProperty.Access.WRITE_ONLY) private String categoryName; - /* - * The category type - */ - @JsonProperty(value = "categoryType", access = JsonProperty.Access.WRITE_ONLY) - private CategoryType categoryType; - /* * Category status. */ @@ -35,31 +31,24 @@ public final class Category { @JsonProperty(value = "controlFamilies", access = JsonProperty.Access.WRITE_ONLY) private List controlFamilies; - /** Creates an instance of Category class. */ - public Category() { + /** + * Creates an instance of Category class. + */ + private Category() { } /** * Get the categoryName property: The name of the compliance category. e.g. "Operational Security". - * + * * @return the categoryName value. */ public String categoryName() { return this.categoryName; } - /** - * Get the categoryType property: The category type. - * - * @return the categoryType value. - */ - public CategoryType categoryType() { - return this.categoryType; - } - /** * Get the categoryStatus property: Category status. - * + * * @return the categoryStatus value. */ public CategoryStatus categoryStatus() { @@ -68,7 +57,7 @@ public CategoryStatus categoryStatus() { /** * Get the controlFamilies property: List of control families. - * + * * @return the controlFamilies value. */ public List controlFamilies() { @@ -77,7 +66,7 @@ public List controlFamilies() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/CategoryStatus.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/CategoryStatus.java index 283c4e108b223..ee0890d63ea9d 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/CategoryStatus.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/CategoryStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.models; @@ -8,17 +8,42 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Indicates the category status. */ +/** + * Indicates the category status. + */ public final class CategoryStatus extends ExpandableStringEnum { - /** Static value Healthy for CategoryStatus. */ - public static final CategoryStatus HEALTHY = fromString("Healthy"); + /** + * Static value Passed for CategoryStatus. + */ + public static final CategoryStatus PASSED = fromString("Passed"); + + /** + * Static value Failed for CategoryStatus. + */ + public static final CategoryStatus FAILED = fromString("Failed"); + + /** + * Static value NotApplicable for CategoryStatus. + */ + public static final CategoryStatus NOT_APPLICABLE = fromString("NotApplicable"); + + /** + * Static value PendingApproval for CategoryStatus. + */ + public static final CategoryStatus PENDING_APPROVAL = fromString("PendingApproval"); - /** Static value Unhealthy for CategoryStatus. */ - public static final CategoryStatus UNHEALTHY = fromString("Unhealthy"); + /** + * Creates a new instance of CategoryStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CategoryStatus() { + } /** * Creates or finds a CategoryStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding CategoryStatus. */ @@ -29,7 +54,7 @@ public static CategoryStatus fromString(String name) { /** * Gets known CategoryStatus values. - * + * * @return known CategoryStatus values. */ public static Collection values() { diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/CategoryType.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/CategoryType.java deleted file mode 100644 index 9012651ca0c97..0000000000000 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/CategoryType.java +++ /dev/null @@ -1,41 +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.appcomplianceautomation.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Indicates the compliance category type. */ -public final class CategoryType extends ExpandableStringEnum { - /** Static value FullyAutomated for CategoryType. */ - public static final CategoryType FULLY_AUTOMATED = fromString("FullyAutomated"); - - /** Static value PartiallyAutomated for CategoryType. */ - public static final CategoryType PARTIALLY_AUTOMATED = fromString("PartiallyAutomated"); - - /** Static value Manual for CategoryType. */ - public static final CategoryType MANUAL = fromString("Manual"); - - /** - * Creates or finds a CategoryType from its string representation. - * - * @param name a name to look for. - * @return the corresponding CategoryType. - */ - @JsonCreator - public static CategoryType fromString(String name) { - return fromString(name, CategoryType.class); - } - - /** - * Gets known CategoryType values. - * - * @return known CategoryType values. - */ - public static Collection values() { - return values(CategoryType.class); - } -} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/CertSyncRecord.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/CertSyncRecord.java new file mode 100644 index 0000000000000..b0bef05b29e76 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/CertSyncRecord.java @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * A class represent the certification record synchronized from app compliance. + */ +@Fluent +public final class CertSyncRecord { + /* + * The offerGuid which mapping to the reports. + */ + @JsonProperty(value = "offerGuid") + private String offerGuid; + + /* + * Indicates the status of certification process. + */ + @JsonProperty(value = "certificationStatus") + private String certificationStatus; + + /* + * Indicates the status of compliance process. + */ + @JsonProperty(value = "ingestionStatus") + private String ingestionStatus; + + /* + * The control records list to be synchronized. + */ + @JsonProperty(value = "controls") + private List controls; + + /** + * Creates an instance of CertSyncRecord class. + */ + public CertSyncRecord() { + } + + /** + * Get the offerGuid property: The offerGuid which mapping to the reports. + * + * @return the offerGuid value. + */ + public String offerGuid() { + return this.offerGuid; + } + + /** + * Set the offerGuid property: The offerGuid which mapping to the reports. + * + * @param offerGuid the offerGuid value to set. + * @return the CertSyncRecord object itself. + */ + public CertSyncRecord withOfferGuid(String offerGuid) { + this.offerGuid = offerGuid; + return this; + } + + /** + * Get the certificationStatus property: Indicates the status of certification process. + * + * @return the certificationStatus value. + */ + public String certificationStatus() { + return this.certificationStatus; + } + + /** + * Set the certificationStatus property: Indicates the status of certification process. + * + * @param certificationStatus the certificationStatus value to set. + * @return the CertSyncRecord object itself. + */ + public CertSyncRecord withCertificationStatus(String certificationStatus) { + this.certificationStatus = certificationStatus; + return this; + } + + /** + * Get the ingestionStatus property: Indicates the status of compliance process. + * + * @return the ingestionStatus value. + */ + public String ingestionStatus() { + return this.ingestionStatus; + } + + /** + * Set the ingestionStatus property: Indicates the status of compliance process. + * + * @param ingestionStatus the ingestionStatus value to set. + * @return the CertSyncRecord object itself. + */ + public CertSyncRecord withIngestionStatus(String ingestionStatus) { + this.ingestionStatus = ingestionStatus; + return this; + } + + /** + * Get the controls property: The control records list to be synchronized. + * + * @return the controls value. + */ + public List controls() { + return this.controls; + } + + /** + * Set the controls property: The control records list to be synchronized. + * + * @param controls the controls value to set. + * @return the CertSyncRecord object itself. + */ + public CertSyncRecord withControls(List controls) { + this.controls = controls; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (controls() != null) { + controls().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/CheckNameAvailabilityReason.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/CheckNameAvailabilityReason.java new file mode 100644 index 0000000000000..b76ab7020b249 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/CheckNameAvailabilityReason.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Possible reasons for a name not being available. + */ +public final class CheckNameAvailabilityReason extends ExpandableStringEnum { + /** + * Static value Invalid for CheckNameAvailabilityReason. + */ + public static final CheckNameAvailabilityReason INVALID = fromString("Invalid"); + + /** + * Static value AlreadyExists for CheckNameAvailabilityReason. + */ + public static final CheckNameAvailabilityReason ALREADY_EXISTS = fromString("AlreadyExists"); + + /** + * Creates a new instance of CheckNameAvailabilityReason value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CheckNameAvailabilityReason() { + } + + /** + * Creates or finds a CheckNameAvailabilityReason from its string representation. + * + * @param name a name to look for. + * @return the corresponding CheckNameAvailabilityReason. + */ + @JsonCreator + public static CheckNameAvailabilityReason fromString(String name) { + return fromString(name, CheckNameAvailabilityReason.class); + } + + /** + * Gets known CheckNameAvailabilityReason values. + * + * @return known CheckNameAvailabilityReason values. + */ + public static Collection values() { + return values(CheckNameAvailabilityReason.class); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/CheckNameAvailabilityRequest.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/CheckNameAvailabilityRequest.java new file mode 100644 index 0000000000000..c3809bf87fcc8 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/CheckNameAvailabilityRequest.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The check availability request body. + */ +@Fluent +public final class CheckNameAvailabilityRequest { + /* + * The name of the resource for which availability needs to be checked. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The resource type. + */ + @JsonProperty(value = "type") + private String type; + + /** + * Creates an instance of CheckNameAvailabilityRequest class. + */ + public CheckNameAvailabilityRequest() { + } + + /** + * Get the name property: The name of the resource for which availability needs to be checked. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the resource for which availability needs to be checked. + * + * @param name the name value to set. + * @return the CheckNameAvailabilityRequest object itself. + */ + public CheckNameAvailabilityRequest withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type property: The resource type. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Set the type property: The resource type. + * + * @param type the type value to set. + * @return the CheckNameAvailabilityRequest object itself. + */ + public CheckNameAvailabilityRequest 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/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/CheckNameAvailabilityResponse.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/CheckNameAvailabilityResponse.java new file mode 100644 index 0000000000000..2daeb3638e714 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/CheckNameAvailabilityResponse.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.CheckNameAvailabilityResponseInner; + +/** + * An immutable client-side representation of CheckNameAvailabilityResponse. + */ +public interface CheckNameAvailabilityResponse { + /** + * Gets the nameAvailable property: Indicates if the resource name is available. + * + * @return the nameAvailable value. + */ + Boolean nameAvailable(); + + /** + * Gets the reason property: The reason why the given name is not available. + * + * @return the reason value. + */ + CheckNameAvailabilityReason reason(); + + /** + * Gets the message property: Detailed reason why the given name is not available. + * + * @return the message value. + */ + String message(); + + /** + * Gets the inner com.azure.resourcemanager.appcomplianceautomation.fluent.models.CheckNameAvailabilityResponseInner + * object. + * + * @return the inner object. + */ + CheckNameAvailabilityResponseInner innerModel(); +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ComplianceReportItem.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ComplianceReportItem.java deleted file mode 100644 index 0e1d473cd6b48..0000000000000 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ComplianceReportItem.java +++ /dev/null @@ -1,225 +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.appcomplianceautomation.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Object that includes all the content for single compliance result. */ -@Immutable -public final class ComplianceReportItem { - /* - * The category name. - */ - @JsonProperty(value = "categoryName", access = JsonProperty.Access.WRITE_ONLY) - private String categoryName; - - /* - * The control Id - e.g. "1". - */ - @JsonProperty(value = "controlId", access = JsonProperty.Access.WRITE_ONLY) - private String controlId; - - /* - * The control name. - */ - @JsonProperty(value = "controlName", access = JsonProperty.Access.WRITE_ONLY) - private String controlName; - - /* - * The control type. - */ - @JsonProperty(value = "controlType", access = JsonProperty.Access.WRITE_ONLY) - private ControlType controlType; - - /* - * The compliance result's status. - */ - @JsonProperty(value = "complianceState", access = JsonProperty.Access.WRITE_ONLY) - private ComplianceState complianceState; - - /* - * The compliance result mapped policy Id. - */ - @JsonProperty(value = "policyId", access = JsonProperty.Access.WRITE_ONLY) - private String policyId; - - /* - * The policy's display name. - */ - @JsonProperty(value = "policyDisplayName", access = JsonProperty.Access.WRITE_ONLY) - private String policyDisplayName; - - /* - * The policy's detail description. - */ - @JsonProperty(value = "policyDescription", access = JsonProperty.Access.WRITE_ONLY) - private String policyDescription; - - /* - * The compliance result mapped subscription Id. - */ - @JsonProperty(value = "subscriptionId", access = JsonProperty.Access.WRITE_ONLY) - private String subscriptionId; - - /* - * The compliance result mapped resource group. - */ - @JsonProperty(value = "resourceGroup", access = JsonProperty.Access.WRITE_ONLY) - private String resourceGroup; - - /* - * The compliance result mapped resource type. - */ - @JsonProperty(value = "resourceType", access = JsonProperty.Access.WRITE_ONLY) - private String resourceType; - - /* - * The compliance result mapped resource Id - e.g. - * "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute" - + "/virtualMachines/vm1". - */ - @JsonProperty(value = "resourceId", access = JsonProperty.Access.WRITE_ONLY) - private String resourceId; - - /* - * The compliance result last changed date - e.g. "2022-10-24T02:55:16.3274379Z". For unavailable date, set it as - * "N/A". - */ - @JsonProperty(value = "statusChangeDate", access = JsonProperty.Access.WRITE_ONLY) - private String statusChangeDate; - - /** Creates an instance of ComplianceReportItem class. */ - public ComplianceReportItem() { - } - - /** - * Get the categoryName property: The category name. - * - * @return the categoryName value. - */ - public String categoryName() { - return this.categoryName; - } - - /** - * Get the controlId property: The control Id - e.g. "1". - * - * @return the controlId value. - */ - public String controlId() { - return this.controlId; - } - - /** - * Get the controlName property: The control name. - * - * @return the controlName value. - */ - public String controlName() { - return this.controlName; - } - - /** - * Get the controlType property: The control type. - * - * @return the controlType value. - */ - public ControlType controlType() { - return this.controlType; - } - - /** - * Get the complianceState property: The compliance result's status. - * - * @return the complianceState value. - */ - public ComplianceState complianceState() { - return this.complianceState; - } - - /** - * Get the policyId property: The compliance result mapped policy Id. - * - * @return the policyId value. - */ - public String policyId() { - return this.policyId; - } - - /** - * Get the policyDisplayName property: The policy's display name. - * - * @return the policyDisplayName value. - */ - public String policyDisplayName() { - return this.policyDisplayName; - } - - /** - * Get the policyDescription property: The policy's detail description. - * - * @return the policyDescription value. - */ - public String policyDescription() { - return this.policyDescription; - } - - /** - * Get the subscriptionId property: The compliance result mapped subscription Id. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Get the resourceGroup property: The compliance result mapped resource group. - * - * @return the resourceGroup value. - */ - public String resourceGroup() { - return this.resourceGroup; - } - - /** - * Get the resourceType property: The compliance result mapped resource type. - * - * @return the resourceType value. - */ - public String resourceType() { - return this.resourceType; - } - - /** - * Get the resourceId property: The compliance result mapped resource Id - e.g. - * "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute" - + "/virtualMachines/vm1". - * - * @return the resourceId value. - */ - public String resourceId() { - return this.resourceId; - } - - /** - * Get the statusChangeDate property: The compliance result last changed date - e.g. "2022-10-24T02:55:16.3274379Z". - * For unavailable date, set it as "N/A". - * - * @return the statusChangeDate value. - */ - public String statusChangeDate() { - return this.statusChangeDate; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ComplianceResult.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ComplianceResult.java index a12033bc1e82b..eb804c4af5348 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ComplianceResult.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ComplianceResult.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.models; @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A class represent the compliance result. */ +/** + * A class represent the compliance result. + */ @Immutable public final class ComplianceResult { /* @@ -23,13 +25,15 @@ public final class ComplianceResult { @JsonProperty(value = "categories", access = JsonProperty.Access.WRITE_ONLY) private List categories; - /** Creates an instance of ComplianceResult class. */ - public ComplianceResult() { + /** + * Creates an instance of ComplianceResult class. + */ + private ComplianceResult() { } /** * Get the complianceName property: The name of the compliance. e.g. "M365". - * + * * @return the complianceName value. */ public String complianceName() { @@ -38,7 +42,7 @@ public String complianceName() { /** * Get the categories property: List of categories. - * + * * @return the categories value. */ public List categories() { @@ -47,7 +51,7 @@ public List categories() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ComplianceState.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ComplianceState.java deleted file mode 100644 index 326c44e059a99..0000000000000 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ComplianceState.java +++ /dev/null @@ -1,38 +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.appcomplianceautomation.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** The compliance result's status. */ -public final class ComplianceState extends ExpandableStringEnum { - /** Static value Healthy for ComplianceState. */ - public static final ComplianceState HEALTHY = fromString("Healthy"); - - /** Static value Unhealthy for ComplianceState. */ - public static final ComplianceState UNHEALTHY = fromString("Unhealthy"); - - /** - * Creates or finds a ComplianceState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ComplianceState. - */ - @JsonCreator - public static ComplianceState fromString(String name) { - return fromString(name, ComplianceState.class); - } - - /** - * Gets known ComplianceState values. - * - * @return known ComplianceState values. - */ - public static Collection values() { - return values(ComplianceState.class); - } -} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ContentType.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ContentType.java new file mode 100644 index 0000000000000..6cdefed7ac460 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ContentType.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * content type. + */ +public final class ContentType extends ExpandableStringEnum { + /** + * Static value application/json for ContentType. + */ + public static final ContentType APPLICATION_JSON = fromString("application/json"); + + /** + * Creates a new instance of ContentType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ContentType() { + } + + /** + * Creates or finds a ContentType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ContentType. + */ + @JsonCreator + public static ContentType fromString(String name) { + return fromString(name, ContentType.class); + } + + /** + * Gets known ContentType values. + * + * @return known ContentType values. + */ + public static Collection values() { + return values(ContentType.class); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Control.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Control.java index 4a419e355edfc..e0e3553a7a1e7 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Control.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Control.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.models; @@ -8,34 +8,30 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A class represent the control. */ +/** + * A class represent the control. + */ @Immutable public final class Control { /* - * The Id of the control. e.g. "Operational Security#10" + * The Id of the control. e.g. "Operational_Security_10" */ @JsonProperty(value = "controlId", access = JsonProperty.Access.WRITE_ONLY) private String controlId; /* - * The short name of the control. e.g. "Unsupported OS and Software." + * The name of the control. e.g. "Unsupported OS and Software." */ - @JsonProperty(value = "controlShortName", access = JsonProperty.Access.WRITE_ONLY) - private String controlShortName; + @JsonProperty(value = "controlName", access = JsonProperty.Access.WRITE_ONLY) + private String controlName; /* - * The full name of the control. e.g. "Validate that unsupported operating systems and software components are not - * in use." + * The full name of the control. e.g. + * "Validate that unsupported operating systems and software components are not in use." */ @JsonProperty(value = "controlFullName", access = JsonProperty.Access.WRITE_ONLY) private String controlFullName; - /* - * The control type - */ - @JsonProperty(value = "controlType", access = JsonProperty.Access.WRITE_ONLY) - private ControlType controlType; - /* * The control's description */ @@ -55,18 +51,20 @@ public final class Control { private ControlStatus controlStatus; /* - * List of assessments. + * List of customer responsibility. */ - @JsonProperty(value = "assessments", access = JsonProperty.Access.WRITE_ONLY) - private List assessments; + @JsonProperty(value = "responsibilities", access = JsonProperty.Access.WRITE_ONLY) + private List responsibilities; - /** Creates an instance of Control class. */ - public Control() { + /** + * Creates an instance of Control class. + */ + private Control() { } /** - * Get the controlId property: The Id of the control. e.g. "Operational Security#10". - * + * Get the controlId property: The Id of the control. e.g. "Operational_Security_10". + * * @return the controlId value. */ public String controlId() { @@ -74,36 +72,27 @@ public String controlId() { } /** - * Get the controlShortName property: The short name of the control. e.g. "Unsupported OS and Software.". - * - * @return the controlShortName value. + * Get the controlName property: The name of the control. e.g. "Unsupported OS and Software.". + * + * @return the controlName value. */ - public String controlShortName() { - return this.controlShortName; + public String controlName() { + return this.controlName; } /** * Get the controlFullName property: The full name of the control. e.g. "Validate that unsupported operating systems * and software components are not in use.". - * + * * @return the controlFullName value. */ public String controlFullName() { return this.controlFullName; } - /** - * Get the controlType property: The control type. - * - * @return the controlType value. - */ - public ControlType controlType() { - return this.controlType; - } - /** * Get the controlDescription property: The control's description. - * + * * @return the controlDescription value. */ public String controlDescription() { @@ -112,7 +101,7 @@ public String controlDescription() { /** * Get the controlDescriptionHyperLink property: The hyper link to the control's description'. - * + * * @return the controlDescriptionHyperLink value. */ public String controlDescriptionHyperLink() { @@ -121,7 +110,7 @@ public String controlDescriptionHyperLink() { /** * Get the controlStatus property: Control status. - * + * * @return the controlStatus value. */ public ControlStatus controlStatus() { @@ -129,22 +118,22 @@ public ControlStatus controlStatus() { } /** - * Get the assessments property: List of assessments. - * - * @return the assessments value. + * Get the responsibilities property: List of customer responsibility. + * + * @return the responsibilities value. */ - public List assessments() { - return this.assessments; + public List responsibilities() { + return this.responsibilities; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (assessments() != null) { - assessments().forEach(e -> e.validate()); + if (responsibilities() != null) { + responsibilities().forEach(e -> e.validate()); } } } diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ControlFamily.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ControlFamily.java index b0b0c40442a54..fc42233af0047 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ControlFamily.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ControlFamily.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.models; @@ -8,26 +8,22 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A class represent the control family. */ +/** + * A class represent the control family. + */ @Immutable public final class ControlFamily { /* * The name of the control family. e.g. "Malware Protection - Anti-Virus" */ - @JsonProperty(value = "familyName", access = JsonProperty.Access.WRITE_ONLY) - private String familyName; + @JsonProperty(value = "controlFamilyName", access = JsonProperty.Access.WRITE_ONLY) + private String controlFamilyName; /* - * The control family type + * The control family status */ - @JsonProperty(value = "familyType", access = JsonProperty.Access.WRITE_ONLY) - private ControlFamilyType familyType; - - /* - * Control family status. - */ - @JsonProperty(value = "familyStatus", access = JsonProperty.Access.WRITE_ONLY) - private ControlFamilyStatus familyStatus; + @JsonProperty(value = "controlFamilyStatus", access = JsonProperty.Access.WRITE_ONLY) + private ControlFamilyStatus controlFamilyStatus; /* * List of controls. @@ -35,40 +31,33 @@ public final class ControlFamily { @JsonProperty(value = "controls", access = JsonProperty.Access.WRITE_ONLY) private List controls; - /** Creates an instance of ControlFamily class. */ - public ControlFamily() { - } - /** - * Get the familyName property: The name of the control family. e.g. "Malware Protection - Anti-Virus". - * - * @return the familyName value. + * Creates an instance of ControlFamily class. */ - public String familyName() { - return this.familyName; + private ControlFamily() { } /** - * Get the familyType property: The control family type. - * - * @return the familyType value. + * Get the controlFamilyName property: The name of the control family. e.g. "Malware Protection - Anti-Virus". + * + * @return the controlFamilyName value. */ - public ControlFamilyType familyType() { - return this.familyType; + public String controlFamilyName() { + return this.controlFamilyName; } /** - * Get the familyStatus property: Control family status. - * - * @return the familyStatus value. + * Get the controlFamilyStatus property: The control family status. + * + * @return the controlFamilyStatus value. */ - public ControlFamilyStatus familyStatus() { - return this.familyStatus; + public ControlFamilyStatus controlFamilyStatus() { + return this.controlFamilyStatus; } /** * Get the controls property: List of controls. - * + * * @return the controls value. */ public List controls() { @@ -77,7 +66,7 @@ public List controls() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ControlFamilyStatus.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ControlFamilyStatus.java index c36af061c228c..5f7ec1574cc0c 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ControlFamilyStatus.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ControlFamilyStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.models; @@ -8,17 +8,42 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Indicates the control family status. */ +/** + * Indicates the control family status. + */ public final class ControlFamilyStatus extends ExpandableStringEnum { - /** Static value Healthy for ControlFamilyStatus. */ - public static final ControlFamilyStatus HEALTHY = fromString("Healthy"); + /** + * Static value Passed for ControlFamilyStatus. + */ + public static final ControlFamilyStatus PASSED = fromString("Passed"); + + /** + * Static value Failed for ControlFamilyStatus. + */ + public static final ControlFamilyStatus FAILED = fromString("Failed"); + + /** + * Static value NotApplicable for ControlFamilyStatus. + */ + public static final ControlFamilyStatus NOT_APPLICABLE = fromString("NotApplicable"); + + /** + * Static value PendingApproval for ControlFamilyStatus. + */ + public static final ControlFamilyStatus PENDING_APPROVAL = fromString("PendingApproval"); - /** Static value Unhealthy for ControlFamilyStatus. */ - public static final ControlFamilyStatus UNHEALTHY = fromString("Unhealthy"); + /** + * Creates a new instance of ControlFamilyStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ControlFamilyStatus() { + } /** * Creates or finds a ControlFamilyStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding ControlFamilyStatus. */ @@ -29,7 +54,7 @@ public static ControlFamilyStatus fromString(String name) { /** * Gets known ControlFamilyStatus values. - * + * * @return known ControlFamilyStatus values. */ public static Collection values() { diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ControlFamilyType.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ControlFamilyType.java deleted file mode 100644 index 31c2fb79908b9..0000000000000 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ControlFamilyType.java +++ /dev/null @@ -1,41 +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.appcomplianceautomation.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Indicates the control family type. */ -public final class ControlFamilyType extends ExpandableStringEnum { - /** Static value FullyAutomated for ControlFamilyType. */ - public static final ControlFamilyType FULLY_AUTOMATED = fromString("FullyAutomated"); - - /** Static value PartiallyAutomated for ControlFamilyType. */ - public static final ControlFamilyType PARTIALLY_AUTOMATED = fromString("PartiallyAutomated"); - - /** Static value Manual for ControlFamilyType. */ - public static final ControlFamilyType MANUAL = fromString("Manual"); - - /** - * Creates or finds a ControlFamilyType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ControlFamilyType. - */ - @JsonCreator - public static ControlFamilyType fromString(String name) { - return fromString(name, ControlFamilyType.class); - } - - /** - * Gets known ControlFamilyType values. - * - * @return known ControlFamilyType values. - */ - public static Collection values() { - return values(ControlFamilyType.class); - } -} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ControlStatus.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ControlStatus.java index 043dfb06e7da0..eb10a52c4a71d 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ControlStatus.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ControlStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.models; @@ -8,20 +8,42 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Indicates the control status. */ +/** + * Indicates the control status. + */ public final class ControlStatus extends ExpandableStringEnum { - /** Static value Passed for ControlStatus. */ + /** + * Static value Passed for ControlStatus. + */ public static final ControlStatus PASSED = fromString("Passed"); - /** Static value Failed for ControlStatus. */ + /** + * Static value Failed for ControlStatus. + */ public static final ControlStatus FAILED = fromString("Failed"); - /** Static value NotApplicable for ControlStatus. */ + /** + * Static value NotApplicable for ControlStatus. + */ public static final ControlStatus NOT_APPLICABLE = fromString("NotApplicable"); + /** + * Static value PendingApproval for ControlStatus. + */ + public static final ControlStatus PENDING_APPROVAL = fromString("PendingApproval"); + + /** + * Creates a new instance of ControlStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ControlStatus() { + } + /** * Creates or finds a ControlStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding ControlStatus. */ @@ -32,7 +54,7 @@ public static ControlStatus fromString(String name) { /** * Gets known ControlStatus values. - * + * * @return known ControlStatus values. */ public static Collection values() { diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ControlSyncRecord.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ControlSyncRecord.java new file mode 100644 index 0000000000000..8a63b11680eb2 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ControlSyncRecord.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A class represent the control record synchronized from app compliance. + */ +@Fluent +public final class ControlSyncRecord { + /* + * The Id of the control. e.g. "Operational_Security_10" + */ + @JsonProperty(value = "controlId") + private String controlId; + + /* + * Control status synchronized from app compliance. + */ + @JsonProperty(value = "controlStatus") + private String controlStatus; + + /** + * Creates an instance of ControlSyncRecord class. + */ + public ControlSyncRecord() { + } + + /** + * Get the controlId property: The Id of the control. e.g. "Operational_Security_10". + * + * @return the controlId value. + */ + public String controlId() { + return this.controlId; + } + + /** + * Set the controlId property: The Id of the control. e.g. "Operational_Security_10". + * + * @param controlId the controlId value to set. + * @return the ControlSyncRecord object itself. + */ + public ControlSyncRecord withControlId(String controlId) { + this.controlId = controlId; + return this; + } + + /** + * Get the controlStatus property: Control status synchronized from app compliance. + * + * @return the controlStatus value. + */ + public String controlStatus() { + return this.controlStatus; + } + + /** + * Set the controlStatus property: Control status synchronized from app compliance. + * + * @param controlStatus the controlStatus value to set. + * @return the ControlSyncRecord object itself. + */ + public ControlSyncRecord withControlStatus(String controlStatus) { + this.controlStatus = controlStatus; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ControlType.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ControlType.java deleted file mode 100644 index da4911ec0b298..0000000000000 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ControlType.java +++ /dev/null @@ -1,41 +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.appcomplianceautomation.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Indicates the control type. */ -public final class ControlType extends ExpandableStringEnum { - /** Static value FullyAutomated for ControlType. */ - public static final ControlType FULLY_AUTOMATED = fromString("FullyAutomated"); - - /** Static value PartiallyAutomated for ControlType. */ - public static final ControlType PARTIALLY_AUTOMATED = fromString("PartiallyAutomated"); - - /** Static value Manual for ControlType. */ - public static final ControlType MANUAL = fromString("Manual"); - - /** - * Creates or finds a ControlType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ControlType. - */ - @JsonCreator - public static ControlType fromString(String name) { - return fromString(name, ControlType.class); - } - - /** - * Gets known ControlType values. - * - * @return known ControlType values. - */ - public static Collection values() { - return values(ControlType.class); - } -} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/DeliveryStatus.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/DeliveryStatus.java new file mode 100644 index 0000000000000..99d3e28ceda55 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/DeliveryStatus.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * webhook deliveryStatus. + */ +public final class DeliveryStatus extends ExpandableStringEnum { + /** + * Static value Succeeded for DeliveryStatus. + */ + public static final DeliveryStatus SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for DeliveryStatus. + */ + public static final DeliveryStatus FAILED = fromString("Failed"); + + /** + * Static value NotStarted for DeliveryStatus. + */ + public static final DeliveryStatus NOT_STARTED = fromString("NotStarted"); + + /** + * Creates a new instance of DeliveryStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DeliveryStatus() { + } + + /** + * Creates or finds a DeliveryStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding DeliveryStatus. + */ + @JsonCreator + public static DeliveryStatus fromString(String name) { + return fromString(name, DeliveryStatus.class); + } + + /** + * Gets known DeliveryStatus values. + * + * @return known DeliveryStatus values. + */ + public static Collection values() { + return values(DeliveryStatus.class); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/DownloadResponse.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/DownloadResponse.java deleted file mode 100644 index ed88a05966291..0000000000000 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/DownloadResponse.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.appcomplianceautomation.models; - -import com.azure.resourcemanager.appcomplianceautomation.fluent.models.DownloadResponseInner; -import java.util.List; - -/** An immutable client-side representation of DownloadResponse. */ -public interface DownloadResponse { - /** - * Gets the resourceList property: List of the reports. - * - * @return the resourceList value. - */ - List resourceList(); - - /** - * Gets the complianceReport property: List of the compliance result. - * - * @return the complianceReport value. - */ - List complianceReport(); - - /** - * Gets the compliancePdfReport property: compliance pdf report. - * - * @return the compliancePdfReport value. - */ - DownloadResponseCompliancePdfReport compliancePdfReport(); - - /** - * Gets the complianceDetailedPdfReport property: compliance detailed pdf report. - * - * @return the complianceDetailedPdfReport value. - */ - DownloadResponseComplianceDetailedPdfReport complianceDetailedPdfReport(); - - /** - * Gets the inner com.azure.resourcemanager.appcomplianceautomation.fluent.models.DownloadResponseInner object. - * - * @return the inner object. - */ - DownloadResponseInner innerModel(); -} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/DownloadResponseComplianceDetailedPdfReport.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/DownloadResponseComplianceDetailedPdfReport.java deleted file mode 100644 index e953f70961510..0000000000000 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/DownloadResponseComplianceDetailedPdfReport.java +++ /dev/null @@ -1,39 +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.appcomplianceautomation.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** compliance detailed pdf report. */ -@Immutable -public final class DownloadResponseComplianceDetailedPdfReport { - /* - * uri of compliance detailed pdf report - */ - @JsonProperty(value = "sasUri", access = JsonProperty.Access.WRITE_ONLY) - private String sasUri; - - /** Creates an instance of DownloadResponseComplianceDetailedPdfReport class. */ - public DownloadResponseComplianceDetailedPdfReport() { - } - - /** - * Get the sasUri property: uri of compliance detailed pdf report. - * - * @return the sasUri value. - */ - public String sasUri() { - return this.sasUri; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/DownloadResponseCompliancePdfReport.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/DownloadResponseCompliancePdfReport.java deleted file mode 100644 index b0aee0e61f6a3..0000000000000 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/DownloadResponseCompliancePdfReport.java +++ /dev/null @@ -1,39 +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.appcomplianceautomation.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** compliance pdf report. */ -@Immutable -public final class DownloadResponseCompliancePdfReport { - /* - * uri of compliance pdf report - */ - @JsonProperty(value = "sasUri", access = JsonProperty.Access.WRITE_ONLY) - private String sasUri; - - /** Creates an instance of DownloadResponseCompliancePdfReport class. */ - public DownloadResponseCompliancePdfReport() { - } - - /** - * Get the sasUri property: uri of compliance pdf report. - * - * @return the sasUri value. - */ - public String sasUri() { - return this.sasUri; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/DownloadType.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/DownloadType.java index 5948009d5d146..0cc700b1d3444 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/DownloadType.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/DownloadType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.models; @@ -8,23 +8,42 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Indicates the download type. */ +/** + * Indicates the download type. + */ public final class DownloadType extends ExpandableStringEnum { - /** Static value ComplianceReport for DownloadType. */ + /** + * Static value ComplianceReport for DownloadType. + */ public static final DownloadType COMPLIANCE_REPORT = fromString("ComplianceReport"); - /** Static value CompliancePdfReport for DownloadType. */ + /** + * Static value CompliancePdfReport for DownloadType. + */ public static final DownloadType COMPLIANCE_PDF_REPORT = fromString("CompliancePdfReport"); - /** Static value ComplianceDetailedPdfReport for DownloadType. */ + /** + * Static value ComplianceDetailedPdfReport for DownloadType. + */ public static final DownloadType COMPLIANCE_DETAILED_PDF_REPORT = fromString("ComplianceDetailedPdfReport"); - /** Static value ResourceList for DownloadType. */ + /** + * Static value ResourceList for DownloadType. + */ public static final DownloadType RESOURCE_LIST = fromString("ResourceList"); + /** + * Creates a new instance of DownloadType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DownloadType() { + } + /** * Creates or finds a DownloadType from its string representation. - * + * * @param name a name to look for. * @return the corresponding DownloadType. */ @@ -35,7 +54,7 @@ public static DownloadType fromString(String name) { /** * Gets known DownloadType values. - * + * * @return known DownloadType values. */ public static Collection values() { diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/EnableSslVerification.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/EnableSslVerification.java new file mode 100644 index 0000000000000..981efa67c77bf --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/EnableSslVerification.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * whether to enable ssl verification. + */ +public final class EnableSslVerification extends ExpandableStringEnum { + /** + * Static value true for EnableSslVerification. + */ + public static final EnableSslVerification TRUE = fromString("true"); + + /** + * Static value false for EnableSslVerification. + */ + public static final EnableSslVerification FALSE = fromString("false"); + + /** + * Creates a new instance of EnableSslVerification value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EnableSslVerification() { + } + + /** + * Creates or finds a EnableSslVerification from its string representation. + * + * @param name a name to look for. + * @return the corresponding EnableSslVerification. + */ + @JsonCreator + public static EnableSslVerification fromString(String name) { + return fromString(name, EnableSslVerification.class); + } + + /** + * Gets known EnableSslVerification values. + * + * @return known EnableSslVerification values. + */ + public static Collection values() { + return values(EnableSslVerification.class); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/EvidenceFileDownloadRequest.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/EvidenceFileDownloadRequest.java new file mode 100644 index 0000000000000..b529f42fca323 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/EvidenceFileDownloadRequest.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Evidence file's download request. + */ +@Fluent +public final class EvidenceFileDownloadRequest { + /* + * Tenant id. + */ + @JsonProperty(value = "reportCreatorTenantId") + private String reportCreatorTenantId; + + /* + * The offerGuid which mapping to the reports. + */ + @JsonProperty(value = "offerGuid") + private String offerGuid; + + /** + * Creates an instance of EvidenceFileDownloadRequest class. + */ + public EvidenceFileDownloadRequest() { + } + + /** + * Get the reportCreatorTenantId property: Tenant id. + * + * @return the reportCreatorTenantId value. + */ + public String reportCreatorTenantId() { + return this.reportCreatorTenantId; + } + + /** + * Set the reportCreatorTenantId property: Tenant id. + * + * @param reportCreatorTenantId the reportCreatorTenantId value to set. + * @return the EvidenceFileDownloadRequest object itself. + */ + public EvidenceFileDownloadRequest withReportCreatorTenantId(String reportCreatorTenantId) { + this.reportCreatorTenantId = reportCreatorTenantId; + return this; + } + + /** + * Get the offerGuid property: The offerGuid which mapping to the reports. + * + * @return the offerGuid value. + */ + public String offerGuid() { + return this.offerGuid; + } + + /** + * Set the offerGuid property: The offerGuid which mapping to the reports. + * + * @param offerGuid the offerGuid value to set. + * @return the EvidenceFileDownloadRequest object itself. + */ + public EvidenceFileDownloadRequest withOfferGuid(String offerGuid) { + this.offerGuid = offerGuid; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/EvidenceFileDownloadResponse.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/EvidenceFileDownloadResponse.java new file mode 100644 index 0000000000000..7b4ecdd1600c7 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/EvidenceFileDownloadResponse.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.EvidenceFileDownloadResponseInner; + +/** + * An immutable client-side representation of EvidenceFileDownloadResponse. + */ +public interface EvidenceFileDownloadResponse { + /** + * Gets the evidenceFile property: The uri of evidence file. + * + * @return the evidenceFile value. + */ + EvidenceFileDownloadResponseEvidenceFile evidenceFile(); + + /** + * Gets the inner com.azure.resourcemanager.appcomplianceautomation.fluent.models.EvidenceFileDownloadResponseInner + * object. + * + * @return the inner object. + */ + EvidenceFileDownloadResponseInner innerModel(); +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/EvidenceFileDownloadResponseEvidenceFile.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/EvidenceFileDownloadResponseEvidenceFile.java new file mode 100644 index 0000000000000..2ef6d009b3953 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/EvidenceFileDownloadResponseEvidenceFile.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The uri of evidence file. + */ +@Immutable +public final class EvidenceFileDownloadResponseEvidenceFile { + /* + * The url of evidence file + */ + @JsonProperty(value = "url", access = JsonProperty.Access.WRITE_ONLY) + private String url; + + /** + * Creates an instance of EvidenceFileDownloadResponseEvidenceFile class. + */ + private EvidenceFileDownloadResponseEvidenceFile() { + } + + /** + * Get the url property: The url of evidence file. + * + * @return the url value. + */ + public String url() { + return this.url; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/EvidenceProperties.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/EvidenceProperties.java new file mode 100644 index 0000000000000..86b9442017183 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/EvidenceProperties.java @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Evidence's properties. + */ +@Fluent +public final class EvidenceProperties { + /* + * Evidence type. + */ + @JsonProperty(value = "evidenceType") + private EvidenceType evidenceType; + + /* + * The path of the file in storage. + */ + @JsonProperty(value = "filePath", required = true) + private String filePath; + + /* + * Extra data considered as evidence. + */ + @JsonProperty(value = "extraData") + private String extraData; + + /* + * Control id. + */ + @JsonProperty(value = "controlId") + private String controlId; + + /* + * Responsibility id. + */ + @JsonProperty(value = "responsibilityId") + private String responsibilityId; + + /* + * Azure lifecycle management + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Creates an instance of EvidenceProperties class. + */ + public EvidenceProperties() { + } + + /** + * Get the evidenceType property: Evidence type. + * + * @return the evidenceType value. + */ + public EvidenceType evidenceType() { + return this.evidenceType; + } + + /** + * Set the evidenceType property: Evidence type. + * + * @param evidenceType the evidenceType value to set. + * @return the EvidenceProperties object itself. + */ + public EvidenceProperties withEvidenceType(EvidenceType evidenceType) { + this.evidenceType = evidenceType; + return this; + } + + /** + * Get the filePath property: The path of the file in storage. + * + * @return the filePath value. + */ + public String filePath() { + return this.filePath; + } + + /** + * Set the filePath property: The path of the file in storage. + * + * @param filePath the filePath value to set. + * @return the EvidenceProperties object itself. + */ + public EvidenceProperties withFilePath(String filePath) { + this.filePath = filePath; + return this; + } + + /** + * Get the extraData property: Extra data considered as evidence. + * + * @return the extraData value. + */ + public String extraData() { + return this.extraData; + } + + /** + * Set the extraData property: Extra data considered as evidence. + * + * @param extraData the extraData value to set. + * @return the EvidenceProperties object itself. + */ + public EvidenceProperties withExtraData(String extraData) { + this.extraData = extraData; + return this; + } + + /** + * Get the controlId property: Control id. + * + * @return the controlId value. + */ + public String controlId() { + return this.controlId; + } + + /** + * Set the controlId property: Control id. + * + * @param controlId the controlId value to set. + * @return the EvidenceProperties object itself. + */ + public EvidenceProperties withControlId(String controlId) { + this.controlId = controlId; + return this; + } + + /** + * Get the responsibilityId property: Responsibility id. + * + * @return the responsibilityId value. + */ + public String responsibilityId() { + return this.responsibilityId; + } + + /** + * Set the responsibilityId property: Responsibility id. + * + * @param responsibilityId the responsibilityId value to set. + * @return the EvidenceProperties object itself. + */ + public EvidenceProperties withResponsibilityId(String responsibilityId) { + this.responsibilityId = responsibilityId; + return this; + } + + /** + * Get the provisioningState property: Azure lifecycle management. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (filePath() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property filePath in model EvidenceProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(EvidenceProperties.class); +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/EvidenceResource.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/EvidenceResource.java new file mode 100644 index 0000000000000..9f4b1b3fae5e5 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/EvidenceResource.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.EvidenceResourceInner; + +/** + * An immutable client-side representation of EvidenceResource. + */ +public interface EvidenceResource { + /** + * 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: Evidence property. + * + * @return the properties value. + */ + EvidenceProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.appcomplianceautomation.fluent.models.EvidenceResourceInner object. + * + * @return the inner object. + */ + EvidenceResourceInner innerModel(); +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/EvidenceType.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/EvidenceType.java new file mode 100644 index 0000000000000..6fafe9f2fb9e7 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/EvidenceType.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Evidence type. + */ +public final class EvidenceType extends ExpandableStringEnum { + /** + * Static value File for EvidenceType. + */ + public static final EvidenceType FILE = fromString("File"); + + /** + * Static value AutoCollectedEvidence for EvidenceType. + */ + public static final EvidenceType AUTO_COLLECTED_EVIDENCE = fromString("AutoCollectedEvidence"); + + /** + * Static value Data for EvidenceType. + */ + public static final EvidenceType DATA = fromString("Data"); + + /** + * Creates a new instance of EvidenceType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EvidenceType() { + } + + /** + * Creates or finds a EvidenceType from its string representation. + * + * @param name a name to look for. + * @return the corresponding EvidenceType. + */ + @JsonCreator + public static EvidenceType fromString(String name) { + return fromString(name, EvidenceType.class); + } + + /** + * Gets known EvidenceType values. + * + * @return known EvidenceType values. + */ + public static Collection values() { + return values(EvidenceType.class); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Evidences.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Evidences.java new file mode 100644 index 0000000000000..4189a4995b22c --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Evidences.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.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.appcomplianceautomation.fluent.models.EvidenceResourceInner; + +/** + * Resource collection API of Evidences. + */ +public interface Evidences { + /** + * Get the evidence metadata. + * + * @param reportName Report Name. + * @param evidenceName The evidence 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 evidence metadata along with {@link Response}. + */ + Response getWithResponse(String reportName, String evidenceName, Context context); + + /** + * Get the evidence metadata. + * + * @param reportName Report Name. + * @param evidenceName The evidence 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 evidence metadata. + */ + EvidenceResource get(String reportName, String evidenceName); + + /** + * Create or Update an evidence a specified report. + * + * @param reportName Report Name. + * @param evidenceName The evidence name. + * @param parameters Parameters for the create or update operation. + * @param offerGuid The offerGuid which mapping to the reports. + * @param reportCreatorTenantId The tenant id of the report creator. + * @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 class represent an AppComplianceAutomation evidence resource along with {@link Response}. + */ + Response createOrUpdateWithResponse(String reportName, String evidenceName, + EvidenceResourceInner parameters, String offerGuid, String reportCreatorTenantId, Context context); + + /** + * Create or Update an evidence a specified report. + * + * @param reportName Report Name. + * @param evidenceName The evidence name. + * @param parameters Parameters for the create or update 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 class represent an AppComplianceAutomation evidence resource. + */ + EvidenceResource createOrUpdate(String reportName, String evidenceName, EvidenceResourceInner parameters); + + /** + * Delete an existent evidence from a specified report. + * + * @param reportName Report Name. + * @param evidenceName The evidence 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 deleteByResourceGroupWithResponse(String reportName, String evidenceName, Context context); + + /** + * Delete an existent evidence from a specified report. + * + * @param reportName Report Name. + * @param evidenceName The evidence 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 reportName, String evidenceName); + + /** + * Returns a paginated list of evidences for a specified report. + * + * @param reportName Report 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 response of a EvidenceResource list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByReportResource(String reportName); + + /** + * Returns a paginated list of evidences for a specified report. + * + * @param reportName Report Name. + * @param skipToken Skip over when retrieving results. + * @param top Number of elements to return when retrieving results. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. + * ?$select=reportName,id. + * @param filter The filter to apply on the operation. + * @param orderby OData order by query option. + * @param offerGuid The offerGuid which mapping to the reports. + * @param reportCreatorTenantId The tenant id of the report creator. + * @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 response of a EvidenceResource list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByReportResource(String reportName, String skipToken, Integer top, + String select, String filter, String orderby, String offerGuid, String reportCreatorTenantId, Context context); + + /** + * Download evidence file. + * + * @param reportName Report Name. + * @param evidenceName The evidence name. + * @param body Parameters for the query operation. + * @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 object that includes all the possible response for the evidence file download operation along with + * {@link Response}. + */ + Response downloadWithResponse(String reportName, String evidenceName, + EvidenceFileDownloadRequest body, Context context); + + /** + * Download evidence file. + * + * @param reportName Report Name. + * @param evidenceName The evidence name. + * @param body Parameters for the query 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 object that includes all the possible response for the evidence file download operation. + */ + EvidenceFileDownloadResponse download(String reportName, String evidenceName, EvidenceFileDownloadRequest body); +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/GetCollectionCountRequest.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/GetCollectionCountRequest.java new file mode 100644 index 0000000000000..f0e38323cfb05 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/GetCollectionCountRequest.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Get collection count's request object. + */ +@Fluent +public final class GetCollectionCountRequest { + /* + * The resource type. + */ + @JsonProperty(value = "type") + private String type; + + /** + * Creates an instance of GetCollectionCountRequest class. + */ + public GetCollectionCountRequest() { + } + + /** + * Get the type property: The resource type. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Set the type property: The resource type. + * + * @param type the type value to set. + * @return the GetCollectionCountRequest object itself. + */ + public GetCollectionCountRequest 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/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/GetCollectionCountResponse.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/GetCollectionCountResponse.java new file mode 100644 index 0000000000000..639b574aa3ef4 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/GetCollectionCountResponse.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.GetCollectionCountResponseInner; + +/** + * An immutable client-side representation of GetCollectionCountResponse. + */ +public interface GetCollectionCountResponse { + /** + * Gets the count property: The count of the specified resource. + * + * @return the count value. + */ + Integer count(); + + /** + * Gets the inner com.azure.resourcemanager.appcomplianceautomation.fluent.models.GetCollectionCountResponseInner + * object. + * + * @return the inner object. + */ + GetCollectionCountResponseInner innerModel(); +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/GetOverviewStatusRequest.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/GetOverviewStatusRequest.java new file mode 100644 index 0000000000000..7529316a5cc18 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/GetOverviewStatusRequest.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Get overview status request object. + */ +@Fluent +public final class GetOverviewStatusRequest { + /* + * The resource type. + */ + @JsonProperty(value = "type") + private String type; + + /** + * Creates an instance of GetOverviewStatusRequest class. + */ + public GetOverviewStatusRequest() { + } + + /** + * Get the type property: The resource type. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Set the type property: The resource type. + * + * @param type the type value to set. + * @return the GetOverviewStatusRequest object itself. + */ + public GetOverviewStatusRequest 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/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/GetOverviewStatusResponse.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/GetOverviewStatusResponse.java new file mode 100644 index 0000000000000..211a173d10ed2 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/GetOverviewStatusResponse.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.GetOverviewStatusResponseInner; +import java.util.List; + +/** + * An immutable client-side representation of GetOverviewStatusResponse. + */ +public interface GetOverviewStatusResponse { + /** + * Gets the statusList property: List of different status items. + * + * @return the statusList value. + */ + List statusList(); + + /** + * Gets the inner com.azure.resourcemanager.appcomplianceautomation.fluent.models.GetOverviewStatusResponseInner + * object. + * + * @return the inner object. + */ + GetOverviewStatusResponseInner innerModel(); +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/InputType.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/InputType.java new file mode 100644 index 0000000000000..2ad9e0b1b8f24 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/InputType.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Question input type. + */ +public final class InputType extends ExpandableStringEnum { + /** + * Static value None for InputType. + */ + public static final InputType NONE = fromString("None"); + + /** + * Static value Text for InputType. + */ + public static final InputType TEXT = fromString("Text"); + + /** + * Static value Email for InputType. + */ + public static final InputType EMAIL = fromString("Email"); + + /** + * Static value MultilineText for InputType. + */ + public static final InputType MULTILINE_TEXT = fromString("MultilineText"); + + /** + * Static value Url for InputType. + */ + public static final InputType URL = fromString("Url"); + + /** + * Static value Number for InputType. + */ + public static final InputType NUMBER = fromString("Number"); + + /** + * Static value Boolean for InputType. + */ + public static final InputType BOOLEAN = fromString("Boolean"); + + /** + * Static value Telephone for InputType. + */ + public static final InputType TELEPHONE = fromString("Telephone"); + + /** + * Static value YesNoNa for InputType. + */ + public static final InputType YES_NO_NA = fromString("YesNoNa"); + + /** + * Static value Date for InputType. + */ + public static final InputType DATE = fromString("Date"); + + /** + * Static value YearPicker for InputType. + */ + public static final InputType YEAR_PICKER = fromString("YearPicker"); + + /** + * Static value SingleSelection for InputType. + */ + public static final InputType SINGLE_SELECTION = fromString("SingleSelection"); + + /** + * Static value SingleSelectDropdown for InputType. + */ + public static final InputType SINGLE_SELECT_DROPDOWN = fromString("SingleSelectDropdown"); + + /** + * Static value MultiSelectCheckbox for InputType. + */ + public static final InputType MULTI_SELECT_CHECKBOX = fromString("MultiSelectCheckbox"); + + /** + * Static value MultiSelectDropdown for InputType. + */ + public static final InputType MULTI_SELECT_DROPDOWN = fromString("MultiSelectDropdown"); + + /** + * Static value MultiSelectDropdownCustom for InputType. + */ + public static final InputType MULTI_SELECT_DROPDOWN_CUSTOM = fromString("MultiSelectDropdownCustom"); + + /** + * Static value Group for InputType. + */ + public static final InputType GROUP = fromString("Group"); + + /** + * Static value Upload for InputType. + */ + public static final InputType UPLOAD = fromString("Upload"); + + /** + * Creates a new instance of InputType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public InputType() { + } + + /** + * Creates or finds a InputType from its string representation. + * + * @param name a name to look for. + * @return the corresponding InputType. + */ + @JsonCreator + public static InputType fromString(String name) { + return fromString(name, InputType.class); + } + + /** + * Gets known InputType values. + * + * @return known InputType values. + */ + public static Collection values() { + return values(InputType.class); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/IsPass.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/IsPass.java deleted file mode 100644 index 3d02d8b57c77a..0000000000000 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/IsPass.java +++ /dev/null @@ -1,38 +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.appcomplianceautomation.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Indicates whether all the resource(s) are compliant. */ -public final class IsPass extends ExpandableStringEnum { - /** Static value True for IsPass. */ - public static final IsPass TRUE = fromString("True"); - - /** Static value False for IsPass. */ - public static final IsPass FALSE = fromString("False"); - - /** - * Creates or finds a IsPass from its string representation. - * - * @param name a name to look for. - * @return the corresponding IsPass. - */ - @JsonCreator - public static IsPass fromString(String name) { - return fromString(name, IsPass.class); - } - - /** - * Gets known IsPass values. - * - * @return known IsPass values. - */ - public static Collection values() { - return values(IsPass.class); - } -} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/IsRecommendSolution.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/IsRecommendSolution.java new file mode 100644 index 0000000000000..bf0b41402a8b2 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/IsRecommendSolution.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Indicates whether this solution is the recommended. + */ +public final class IsRecommendSolution extends ExpandableStringEnum { + /** + * Static value true for IsRecommendSolution. + */ + public static final IsRecommendSolution TRUE = fromString("true"); + + /** + * Static value false for IsRecommendSolution. + */ + public static final IsRecommendSolution FALSE = fromString("false"); + + /** + * Creates a new instance of IsRecommendSolution value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IsRecommendSolution() { + } + + /** + * Creates or finds a IsRecommendSolution from its string representation. + * + * @param name a name to look for. + * @return the corresponding IsRecommendSolution. + */ + @JsonCreator + public static IsRecommendSolution fromString(String name) { + return fromString(name, IsRecommendSolution.class); + } + + /** + * Gets known IsRecommendSolution values. + * + * @return known IsRecommendSolution values. + */ + public static Collection values() { + return values(IsRecommendSolution.class); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ListInUseStorageAccountsRequest.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ListInUseStorageAccountsRequest.java new file mode 100644 index 0000000000000..ed2d8ccc90cb4 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ListInUseStorageAccountsRequest.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Parameters for listing in use storage accounts operation. If subscription list is null, it will check the user's all + * subscriptions. + */ +@Fluent +public final class ListInUseStorageAccountsRequest { + /* + * List of subscription ids to be query. If the list is null or empty, the API will query all the subscriptions of + * the user. + */ + @JsonProperty(value = "subscriptionIds") + private List subscriptionIds; + + /** + * Creates an instance of ListInUseStorageAccountsRequest class. + */ + public ListInUseStorageAccountsRequest() { + } + + /** + * Get the subscriptionIds property: List of subscription ids to be query. If the list is null or empty, the API + * will query all the subscriptions of the user. + * + * @return the subscriptionIds value. + */ + public List subscriptionIds() { + return this.subscriptionIds; + } + + /** + * Set the subscriptionIds property: List of subscription ids to be query. If the list is null or empty, the API + * will query all the subscriptions of the user. + * + * @param subscriptionIds the subscriptionIds value to set. + * @return the ListInUseStorageAccountsRequest object itself. + */ + public ListInUseStorageAccountsRequest withSubscriptionIds(List subscriptionIds) { + this.subscriptionIds = subscriptionIds; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ListInUseStorageAccountsResponse.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ListInUseStorageAccountsResponse.java new file mode 100644 index 0000000000000..697d8881825d8 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ListInUseStorageAccountsResponse.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.ListInUseStorageAccountsResponseInner; +import java.util.List; + +/** + * An immutable client-side representation of ListInUseStorageAccountsResponse. + */ +public interface ListInUseStorageAccountsResponse { + /** + * Gets the storageAccountList property: The storage account list which in use in related reports. + * + * @return the storageAccountList value. + */ + List storageAccountList(); + + /** + * Gets the inner + * com.azure.resourcemanager.appcomplianceautomation.fluent.models.ListInUseStorageAccountsResponseInner object. + * + * @return the inner object. + */ + ListInUseStorageAccountsResponseInner innerModel(); +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/NotificationEvent.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/NotificationEvent.java new file mode 100644 index 0000000000000..e4c4e59e5065c --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/NotificationEvent.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * notification event. + */ +public final class NotificationEvent extends ExpandableStringEnum { + /** + * Static value generate_snapshot_success for NotificationEvent. + */ + public static final NotificationEvent GENERATE_SNAPSHOT_SUCCESS = fromString("generate_snapshot_success"); + + /** + * Static value generate_snapshot_failed for NotificationEvent. + */ + public static final NotificationEvent GENERATE_SNAPSHOT_FAILED = fromString("generate_snapshot_failed"); + + /** + * Static value assessment_failure for NotificationEvent. + */ + public static final NotificationEvent ASSESSMENT_FAILURE = fromString("assessment_failure"); + + /** + * Static value report_configuration_changes for NotificationEvent. + */ + public static final NotificationEvent REPORT_CONFIGURATION_CHANGES = fromString("report_configuration_changes"); + + /** + * Static value report_deletion for NotificationEvent. + */ + public static final NotificationEvent REPORT_DELETION = fromString("report_deletion"); + + /** + * Creates a new instance of NotificationEvent value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NotificationEvent() { + } + + /** + * Creates or finds a NotificationEvent from its string representation. + * + * @param name a name to look for. + * @return the corresponding NotificationEvent. + */ + @JsonCreator + public static NotificationEvent fromString(String name) { + return fromString(name, NotificationEvent.class); + } + + /** + * Gets known NotificationEvent values. + * + * @return known NotificationEvent values. + */ + public static Collection values() { + return values(NotificationEvent.class); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/OnboardRequest.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/OnboardRequest.java new file mode 100644 index 0000000000000..f3155be09a9b2 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/OnboardRequest.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Parameters for onboard operation. + */ +@Fluent +public final class OnboardRequest { + /* + * List of subscription ids to be onboarded + */ + @JsonProperty(value = "subscriptionIds", required = true) + private List subscriptionIds; + + /** + * Creates an instance of OnboardRequest class. + */ + public OnboardRequest() { + } + + /** + * Get the subscriptionIds property: List of subscription ids to be onboarded. + * + * @return the subscriptionIds value. + */ + public List subscriptionIds() { + return this.subscriptionIds; + } + + /** + * Set the subscriptionIds property: List of subscription ids to be onboarded. + * + * @param subscriptionIds the subscriptionIds value to set. + * @return the OnboardRequest object itself. + */ + public OnboardRequest withSubscriptionIds(List subscriptionIds) { + this.subscriptionIds = subscriptionIds; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (subscriptionIds() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property subscriptionIds in model OnboardRequest")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OnboardRequest.class); +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Operation.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Operation.java index 66931f24ba95e..2dbb0136ed501 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Operation.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Operation.java @@ -1,32 +1,34 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.models; import com.azure.resourcemanager.appcomplianceautomation.fluent.models.OperationInner; -/** An immutable client-side representation of Operation. */ +/** + * An immutable client-side representation of Operation. + */ public interface Operation { /** * Gets the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". - * + * * @return the name value. */ String name(); /** * Gets the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane - * operations and "false" for ARM/control-plane operations. - * + * operations and "false" for Azure Resource Manager/control-plane operations. + * * @return the isDataAction value. */ Boolean isDataAction(); /** * Gets the display property: Localized display information for this particular operation. - * + * * @return the display value. */ OperationDisplay display(); @@ -34,22 +36,22 @@ public interface Operation { /** * Gets the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and * audit logs UX. Default value is "user,system". - * + * * @return the origin value. */ Origin origin(); /** - * Gets the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal - * only APIs. - * + * Gets the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are + * for internal only APIs. + * * @return the actionType value. */ ActionType actionType(); /** * Gets the inner com.azure.resourcemanager.appcomplianceautomation.fluent.models.OperationInner object. - * + * * @return the inner object. */ OperationInner innerModel(); diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/OperationDisplay.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/OperationDisplay.java index 029a164d9dfba..f6b79b5fa36cb 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/OperationDisplay.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/OperationDisplay.java @@ -1,50 +1,54 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.models; import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Localized display information for this particular operation. */ +/** + * Localized display information for and operation. + */ @Immutable public final class OperationDisplay { /* - * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft - * Compute". + * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or + * "Microsoft Compute". */ - @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "provider") private String provider; /* - * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job - * Schedule Collections". + * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or + * "Job Schedule Collections". */ - @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "resource") private String resource; /* - * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual - * Machine", "Restart Virtual Machine". + * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. + * "Create or Update Virtual Machine", "Restart Virtual Machine". */ - @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "operation") private String operation; /* * The short, localized friendly description of the operation; suitable for tool tips and detailed views. */ - @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "description") private String description; - /** Creates an instance of OperationDisplay class. */ - public OperationDisplay() { + /** + * Creates an instance of OperationDisplay class. + */ + private OperationDisplay() { } /** * Get the provider property: The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring * Insights" or "Microsoft Compute". - * + * * @return the provider value. */ public String provider() { @@ -54,7 +58,7 @@ public String provider() { /** * Get the resource property: The localized friendly name of the resource type related to this operation. E.g. * "Virtual Machines" or "Job Schedule Collections". - * + * * @return the resource value. */ public String resource() { @@ -64,7 +68,7 @@ public String resource() { /** * Get the operation property: The concise, localized friendly name for the operation; suitable for dropdowns. E.g. * "Create or Update Virtual Machine", "Restart Virtual Machine". - * + * * @return the operation value. */ public String operation() { @@ -74,7 +78,7 @@ public String operation() { /** * Get the description property: The short, localized friendly description of the operation; suitable for tool tips * and detailed views. - * + * * @return the description value. */ public String description() { @@ -83,7 +87,7 @@ public String description() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Operations.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Operations.java index 1d6c7939c764e..81c09b8bd659e 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Operations.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Operations.java @@ -1,33 +1,35 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.models; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -/** Resource collection API of Operations. */ +/** + * Resource collection API of Operations. + */ public interface Operations { /** - * Lists all of the available REST API operations of the Microsoft.AppComplianceAutomation provider. - * + * List the operations for the provider. + * * @throws com.azure.core.management.exception.ManagementException 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 REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ PagedIterable list(); /** - * Lists all of the available REST API operations of the Microsoft.AppComplianceAutomation provider. - * + * List the operations for the provider. + * * @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 REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ PagedIterable list(Context context); } diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Origin.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Origin.java index 6224896318e6a..15e5f15c5220c 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Origin.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Origin.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.models; @@ -13,18 +13,33 @@ * is "user,system". */ public final class Origin extends ExpandableStringEnum { - /** Static value user for Origin. */ + /** + * Static value user for Origin. + */ public static final Origin USER = fromString("user"); - /** Static value system for Origin. */ + /** + * Static value system for Origin. + */ public static final Origin SYSTEM = fromString("system"); - /** Static value user,system for Origin. */ + /** + * Static value user,system for Origin. + */ public static final Origin USER_SYSTEM = fromString("user,system"); + /** + * Creates a new instance of Origin value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Origin() { + } + /** * Creates or finds a Origin from its string representation. - * + * * @param name a name to look for. * @return the corresponding Origin. */ @@ -35,7 +50,7 @@ public static Origin fromString(String name) { /** * Gets known Origin values. - * + * * @return known Origin values. */ public static Collection values() { diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/OverviewStatus.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/OverviewStatus.java index 25f5a77f8046f..e72437b88c050 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/OverviewStatus.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/OverviewStatus.java @@ -1,80 +1,74 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** The overview of the compliance result for one report. */ -@Fluent +/** + * The overview of the compliance result for one report. + */ +@Immutable public final class OverviewStatus { /* - * The count of all passed full automation control. + * The count of all passed control. */ - @JsonProperty(value = "passedCount") + @JsonProperty(value = "passedCount", access = JsonProperty.Access.WRITE_ONLY) private Integer passedCount; /* - * The count of all failed full automation control. + * The count of all failed control. */ - @JsonProperty(value = "failedCount") + @JsonProperty(value = "failedCount", access = JsonProperty.Access.WRITE_ONLY) private Integer failedCount; /* * The count of all manual control. */ - @JsonProperty(value = "manualCount") + @JsonProperty(value = "manualCount", access = JsonProperty.Access.WRITE_ONLY) private Integer manualCount; - /** Creates an instance of OverviewStatus class. */ - public OverviewStatus() { - } + /* + * The count of all not applicable control. + */ + @JsonProperty(value = "notApplicableCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer notApplicableCount; + + /* + * The count of all pending for approval control. + */ + @JsonProperty(value = "pendingCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer pendingCount; /** - * Get the passedCount property: The count of all passed full automation control. - * - * @return the passedCount value. + * Creates an instance of OverviewStatus class. */ - public Integer passedCount() { - return this.passedCount; + private OverviewStatus() { } /** - * Set the passedCount property: The count of all passed full automation control. - * - * @param passedCount the passedCount value to set. - * @return the OverviewStatus object itself. + * Get the passedCount property: The count of all passed control. + * + * @return the passedCount value. */ - public OverviewStatus withPassedCount(Integer passedCount) { - this.passedCount = passedCount; - return this; + public Integer passedCount() { + return this.passedCount; } /** - * Get the failedCount property: The count of all failed full automation control. - * + * Get the failedCount property: The count of all failed control. + * * @return the failedCount value. */ public Integer failedCount() { return this.failedCount; } - /** - * Set the failedCount property: The count of all failed full automation control. - * - * @param failedCount the failedCount value to set. - * @return the OverviewStatus object itself. - */ - public OverviewStatus withFailedCount(Integer failedCount) { - this.failedCount = failedCount; - return this; - } - /** * Get the manualCount property: The count of all manual control. - * + * * @return the manualCount value. */ public Integer manualCount() { @@ -82,19 +76,26 @@ public Integer manualCount() { } /** - * Set the manualCount property: The count of all manual control. - * - * @param manualCount the manualCount value to set. - * @return the OverviewStatus object itself. + * Get the notApplicableCount property: The count of all not applicable control. + * + * @return the notApplicableCount value. + */ + public Integer notApplicableCount() { + return this.notApplicableCount; + } + + /** + * Get the pendingCount property: The count of all pending for approval control. + * + * @return the pendingCount value. */ - public OverviewStatus withManualCount(Integer manualCount) { - this.manualCount = manualCount; - return this; + public Integer pendingCount() { + return this.pendingCount; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ProviderActions.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ProviderActions.java new file mode 100644 index 0000000000000..38092e8421de9 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ProviderActions.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.Context; + +/** + * Resource collection API of ProviderActions. + */ +public interface ProviderActions { + /** + * Check if the given name is available for a report. + * + * @param body The content of the action request. + * @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 check availability result along with {@link Response}. + */ + Response checkNameAvailabilityWithResponse(CheckNameAvailabilityRequest body, + Context context); + + /** + * Check if the given name is available for a report. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 check availability result. + */ + CheckNameAvailabilityResponse checkNameAvailability(CheckNameAvailabilityRequest body); + + /** + * Get the count of reports. + * + * @param body The content of the action request. + * @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 count of reports along with {@link Response}. + */ + Response getCollectionCountWithResponse(GetCollectionCountRequest body, + Context context); + + /** + * Get the count of reports. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 count of reports. + */ + GetCollectionCountResponse getCollectionCount(GetCollectionCountRequest body); + + /** + * Get the resource overview status. + * + * @param body The content of the action request. + * @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 overview status along with {@link Response}. + */ + Response getOverviewStatusWithResponse(GetOverviewStatusRequest body, Context context); + + /** + * Get the resource overview status. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 overview status. + */ + GetOverviewStatusResponse getOverviewStatus(GetOverviewStatusRequest body); + + /** + * Onboard given subscriptions to Microsoft.AppComplianceAutomation provider. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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. + */ + ManagementError onboard(OnboardRequest body); + + /** + * Onboard given subscriptions to Microsoft.AppComplianceAutomation provider. + * + * @param body The content of the action request. + * @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 response. + */ + ManagementError onboard(OnboardRequest body, Context context); + + /** + * Trigger quick evaluation for the given subscriptions. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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. + */ + ManagementError triggerEvaluation(TriggerEvaluationRequest body); + + /** + * Trigger quick evaluation for the given subscriptions. + * + * @param body The content of the action request. + * @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 response. + */ + ManagementError triggerEvaluation(TriggerEvaluationRequest body, Context context); + + /** + * List the storage accounts which are in use by related reports. + * + * @param body The content of the action request. + * @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 parameters for listing in use storage accounts operation along with {@link Response}. + */ + Response + listInUseStorageAccountsWithResponse(ListInUseStorageAccountsRequest body, Context context); + + /** + * List the storage accounts which are in use by related reports. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return parameters for listing in use storage accounts operation. + */ + ListInUseStorageAccountsResponse listInUseStorageAccounts(ListInUseStorageAccountsRequest body); +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ProvisioningState.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ProvisioningState.java index d6ca08c2e7f01..f77a843b21eab 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ProvisioningState.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.models; @@ -8,29 +8,62 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Resource provisioning states. */ +/** + * Resource provisioning states. + */ public final class ProvisioningState extends ExpandableStringEnum { - /** Static value Succeeded for ProvisioningState. */ + /** + * Static value Succeeded for ProvisioningState. + */ public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for ProvisioningState. */ + /** + * Static value Failed for ProvisioningState. + */ public static final ProvisioningState FAILED = fromString("Failed"); - /** Static value Canceled for ProvisioningState. */ + /** + * Static value Canceled for ProvisioningState. + */ public static final ProvisioningState CANCELED = fromString("Canceled"); - /** Static value Creating for ProvisioningState. */ + /** + * Static value Creating for ProvisioningState. + */ public static final ProvisioningState CREATING = fromString("Creating"); - /** Static value Deleting for ProvisioningState. */ + /** + * Static value Deleting for ProvisioningState. + */ public static final ProvisioningState DELETING = fromString("Deleting"); - /** Static value Updating for ProvisioningState. */ + /** + * Static value Fixing for ProvisioningState. + */ + public static final ProvisioningState FIXING = fromString("Fixing"); + + /** + * Static value Verifying for ProvisioningState. + */ + public static final ProvisioningState VERIFYING = fromString("Verifying"); + + /** + * Static value Updating for ProvisioningState. + */ public static final ProvisioningState UPDATING = fromString("Updating"); + /** + * Creates a new instance of ProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ProvisioningState() { + } + /** * Creates or finds a ProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding ProvisioningState. */ @@ -41,7 +74,7 @@ public static ProvisioningState fromString(String name) { /** * Gets known ProvisioningState values. - * + * * @return known ProvisioningState values. */ public static Collection values() { diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Recommendation.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Recommendation.java new file mode 100644 index 0000000000000..c99ecba14c4cd --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Recommendation.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * A class represent the recommendation. + */ +@Immutable +public final class Recommendation { + /* + * The Id of the recommendation. + */ + @JsonProperty(value = "recommendationId", access = JsonProperty.Access.WRITE_ONLY) + private String recommendationId; + + /* + * The short name of the recommendation. e.g. "Invalid TLS config" + */ + @JsonProperty(value = "recommendationShortName", access = JsonProperty.Access.WRITE_ONLY) + private String recommendationShortName; + + /* + * List of recommendation solutions. + */ + @JsonProperty(value = "recommendationSolutions", access = JsonProperty.Access.WRITE_ONLY) + private List recommendationSolutions; + + /** + * Creates an instance of Recommendation class. + */ + private Recommendation() { + } + + /** + * Get the recommendationId property: The Id of the recommendation. + * + * @return the recommendationId value. + */ + public String recommendationId() { + return this.recommendationId; + } + + /** + * Get the recommendationShortName property: The short name of the recommendation. e.g. "Invalid TLS config". + * + * @return the recommendationShortName value. + */ + public String recommendationShortName() { + return this.recommendationShortName; + } + + /** + * Get the recommendationSolutions property: List of recommendation solutions. + * + * @return the recommendationSolutions value. + */ + public List recommendationSolutions() { + return this.recommendationSolutions; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (recommendationSolutions() != null) { + recommendationSolutions().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/RecommendationSolution.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/RecommendationSolution.java new file mode 100644 index 0000000000000..31590c3dfbb56 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/RecommendationSolution.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A class represent the recommendation solution. + */ +@Immutable +public final class RecommendationSolution { + /* + * The index of the recommendation solution. + */ + @JsonProperty(value = "recommendationSolutionIndex", access = JsonProperty.Access.WRITE_ONLY) + private String recommendationSolutionIndex; + + /* + * The detail steps of the recommendation solution. + */ + @JsonProperty(value = "recommendationSolutionContent", access = JsonProperty.Access.WRITE_ONLY) + private String recommendationSolutionContent; + + /* + * Indicates whether this solution is the recommended. + */ + @JsonProperty(value = "isRecommendSolution", access = JsonProperty.Access.WRITE_ONLY) + private IsRecommendSolution isRecommendSolution; + + /** + * Creates an instance of RecommendationSolution class. + */ + private RecommendationSolution() { + } + + /** + * Get the recommendationSolutionIndex property: The index of the recommendation solution. + * + * @return the recommendationSolutionIndex value. + */ + public String recommendationSolutionIndex() { + return this.recommendationSolutionIndex; + } + + /** + * Get the recommendationSolutionContent property: The detail steps of the recommendation solution. + * + * @return the recommendationSolutionContent value. + */ + public String recommendationSolutionContent() { + return this.recommendationSolutionContent; + } + + /** + * Get the isRecommendSolution property: Indicates whether this solution is the recommended. + * + * @return the isRecommendSolution value. + */ + public IsRecommendSolution isRecommendSolution() { + return this.isRecommendSolution; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ReportComplianceStatus.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ReportComplianceStatus.java index 07e361d60f563..f6fcb7f2442b4 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ReportComplianceStatus.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ReportComplianceStatus.java @@ -1,48 +1,41 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** A list which includes all the compliance result for one report. */ -@Fluent +/** + * A list which includes all the compliance result for one report. + */ +@Immutable public final class ReportComplianceStatus { /* * The Microsoft 365 certification name. */ - @JsonProperty(value = "m365") + @JsonProperty(value = "m365", access = JsonProperty.Access.WRITE_ONLY) private OverviewStatus m365; - /** Creates an instance of ReportComplianceStatus class. */ - public ReportComplianceStatus() { + /** + * Creates an instance of ReportComplianceStatus class. + */ + private ReportComplianceStatus() { } /** * Get the m365 property: The Microsoft 365 certification name. - * + * * @return the m365 value. */ public OverviewStatus m365() { return this.m365; } - /** - * Set the m365 property: The Microsoft 365 certification name. - * - * @param m365 the m365 value to set. - * @return the ReportComplianceStatus object itself. - */ - public ReportComplianceStatus withM365(OverviewStatus m365) { - this.m365 = m365; - return this; - } - /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ReportPatchProperties.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ReportPatchProperties.java new file mode 100644 index 0000000000000..32b6933dee94d --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ReportPatchProperties.java @@ -0,0 +1,319 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * Patch Report's properties. + */ +@Fluent +public final class ReportPatchProperties { + /* + * Report collection trigger time. + */ + @JsonProperty(value = "triggerTime") + private OffsetDateTime triggerTime; + + /* + * Report collection trigger time's time zone, the available list can be obtained by executing + * "Get-TimeZone -ListAvailable" in PowerShell. + * An example of valid timezone id is "Pacific Standard Time". + */ + @JsonProperty(value = "timeZone") + private String timeZone; + + /* + * List of resource data. + */ + @JsonProperty(value = "resources") + private List resources; + + /* + * Report status. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private ReportStatus status; + + /* + * List of report error codes. + */ + @JsonProperty(value = "errors", access = JsonProperty.Access.WRITE_ONLY) + private List errors; + + /* + * Report's tenant id. + */ + @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) + private String tenantId; + + /* + * A list of comma-separated offerGuids indicates a series of offerGuids that map to the report. For example, + * "00000000-0000-0000-0000-000000000001,00000000-0000-0000-0000-000000000002" and + * "00000000-0000-0000-0000-000000000003". + */ + @JsonProperty(value = "offerGuid") + private String offerGuid; + + /* + * Report next collection trigger time. + */ + @JsonProperty(value = "nextTriggerTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime nextTriggerTime; + + /* + * Report last collection trigger time. + */ + @JsonProperty(value = "lastTriggerTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastTriggerTime; + + /* + * List of subscription Ids. + */ + @JsonProperty(value = "subscriptions", access = JsonProperty.Access.WRITE_ONLY) + private List subscriptions; + + /* + * Report compliance status. + */ + @JsonProperty(value = "complianceStatus", access = JsonProperty.Access.WRITE_ONLY) + private ReportComplianceStatus complianceStatus; + + /* + * The information of 'bring your own storage' binding to the report + */ + @JsonProperty(value = "storageInfo") + private StorageInfo storageInfo; + + /* + * List of synchronized certification records. + */ + @JsonProperty(value = "certRecords", access = JsonProperty.Access.WRITE_ONLY) + private List certRecords; + + /* + * Azure lifecycle management + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Creates an instance of ReportPatchProperties class. + */ + public ReportPatchProperties() { + } + + /** + * Get the triggerTime property: Report collection trigger time. + * + * @return the triggerTime value. + */ + public OffsetDateTime triggerTime() { + return this.triggerTime; + } + + /** + * Set the triggerTime property: Report collection trigger time. + * + * @param triggerTime the triggerTime value to set. + * @return the ReportPatchProperties object itself. + */ + public ReportPatchProperties withTriggerTime(OffsetDateTime triggerTime) { + this.triggerTime = triggerTime; + return this; + } + + /** + * Get the timeZone property: Report collection trigger time's time zone, the available list can be obtained by + * executing "Get-TimeZone -ListAvailable" in PowerShell. + * An example of valid timezone id is "Pacific Standard Time". + * + * @return the timeZone value. + */ + public String timeZone() { + return this.timeZone; + } + + /** + * Set the timeZone property: Report collection trigger time's time zone, the available list can be obtained by + * executing "Get-TimeZone -ListAvailable" in PowerShell. + * An example of valid timezone id is "Pacific Standard Time". + * + * @param timeZone the timeZone value to set. + * @return the ReportPatchProperties object itself. + */ + public ReportPatchProperties withTimeZone(String timeZone) { + this.timeZone = timeZone; + return this; + } + + /** + * Get the resources property: List of resource data. + * + * @return the resources value. + */ + public List resources() { + return this.resources; + } + + /** + * Set the resources property: List of resource data. + * + * @param resources the resources value to set. + * @return the ReportPatchProperties object itself. + */ + public ReportPatchProperties withResources(List resources) { + this.resources = resources; + return this; + } + + /** + * Get the status property: Report status. + * + * @return the status value. + */ + public ReportStatus status() { + return this.status; + } + + /** + * Get the errors property: List of report error codes. + * + * @return the errors value. + */ + public List errors() { + return this.errors; + } + + /** + * Get the tenantId property: Report's tenant id. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Get the offerGuid property: A list of comma-separated offerGuids indicates a series of offerGuids that map to the + * report. For example, "00000000-0000-0000-0000-000000000001,00000000-0000-0000-0000-000000000002" and + * "00000000-0000-0000-0000-000000000003". + * + * @return the offerGuid value. + */ + public String offerGuid() { + return this.offerGuid; + } + + /** + * Set the offerGuid property: A list of comma-separated offerGuids indicates a series of offerGuids that map to the + * report. For example, "00000000-0000-0000-0000-000000000001,00000000-0000-0000-0000-000000000002" and + * "00000000-0000-0000-0000-000000000003". + * + * @param offerGuid the offerGuid value to set. + * @return the ReportPatchProperties object itself. + */ + public ReportPatchProperties withOfferGuid(String offerGuid) { + this.offerGuid = offerGuid; + return this; + } + + /** + * Get the nextTriggerTime property: Report next collection trigger time. + * + * @return the nextTriggerTime value. + */ + public OffsetDateTime nextTriggerTime() { + return this.nextTriggerTime; + } + + /** + * Get the lastTriggerTime property: Report last collection trigger time. + * + * @return the lastTriggerTime value. + */ + public OffsetDateTime lastTriggerTime() { + return this.lastTriggerTime; + } + + /** + * Get the subscriptions property: List of subscription Ids. + * + * @return the subscriptions value. + */ + public List subscriptions() { + return this.subscriptions; + } + + /** + * Get the complianceStatus property: Report compliance status. + * + * @return the complianceStatus value. + */ + public ReportComplianceStatus complianceStatus() { + return this.complianceStatus; + } + + /** + * Get the storageInfo property: The information of 'bring your own storage' binding to the report. + * + * @return the storageInfo value. + */ + public StorageInfo storageInfo() { + return this.storageInfo; + } + + /** + * Set the storageInfo property: The information of 'bring your own storage' binding to the report. + * + * @param storageInfo the storageInfo value to set. + * @return the ReportPatchProperties object itself. + */ + public ReportPatchProperties withStorageInfo(StorageInfo storageInfo) { + this.storageInfo = storageInfo; + return this; + } + + /** + * Get the certRecords property: List of synchronized certification records. + * + * @return the certRecords value. + */ + public List certRecords() { + return this.certRecords; + } + + /** + * Get the provisioningState property: Azure lifecycle management. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (resources() != null) { + resources().forEach(e -> e.validate()); + } + if (complianceStatus() != null) { + complianceStatus().validate(); + } + if (storageInfo() != null) { + storageInfo().validate(); + } + if (certRecords() != null) { + certRecords().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ReportProperties.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ReportProperties.java index 866b14f6bb6ac..2b436adb00bba 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ReportProperties.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ReportProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.models; @@ -10,52 +10,56 @@ import java.time.OffsetDateTime; import java.util.List; -/** Report's properties. */ +/** + * Create Report's properties. + */ @Fluent public final class ReportProperties { /* - * Report id in database. + * Report collection trigger time. */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; + @JsonProperty(value = "triggerTime", required = true) + private OffsetDateTime triggerTime; /* - * Report status. + * Report collection trigger time's time zone, the available list can be obtained by executing + * "Get-TimeZone -ListAvailable" in PowerShell. + * An example of valid timezone id is "Pacific Standard Time". */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) - private ReportStatus status; + @JsonProperty(value = "timeZone", required = true) + private String timeZone; /* - * Report's tenant id. + * List of resource data. */ - @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) - private String tenantId; + @JsonProperty(value = "resources", required = true) + private List resources; /* - * Report name. + * Report status. */ - @JsonProperty(value = "reportName", access = JsonProperty.Access.WRITE_ONLY) - private String reportName; + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private ReportStatus status; /* - * Report offer Guid. + * List of report error codes. */ - @JsonProperty(value = "offerGuid") - private String offerGuid; + @JsonProperty(value = "errors", access = JsonProperty.Access.WRITE_ONLY) + private List errors; /* - * Report collection trigger time's time zone, the available list can be obtained by executing "Get-TimeZone - * -ListAvailable" in PowerShell. - * An example of valid timezone id is "Pacific Standard Time". + * Report's tenant id. */ - @JsonProperty(value = "timeZone", required = true) - private String timeZone; + @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) + private String tenantId; /* - * Report collection trigger time. + * A list of comma-separated offerGuids indicates a series of offerGuids that map to the report. For example, + * "00000000-0000-0000-0000-000000000001,00000000-0000-0000-0000-000000000002" and + * "00000000-0000-0000-0000-000000000003". */ - @JsonProperty(value = "triggerTime", required = true) - private OffsetDateTime triggerTime; + @JsonProperty(value = "offerGuid") + private String offerGuid; /* * Report next collection trigger time. @@ -75,131 +79,154 @@ public final class ReportProperties { @JsonProperty(value = "subscriptions", access = JsonProperty.Access.WRITE_ONLY) private List subscriptions; - /* - * List of resource data. - */ - @JsonProperty(value = "resources", required = true) - private List resources; - /* * Report compliance status. */ @JsonProperty(value = "complianceStatus", access = JsonProperty.Access.WRITE_ONLY) private ReportComplianceStatus complianceStatus; + /* + * The information of 'bring your own storage' binding to the report + */ + @JsonProperty(value = "storageInfo") + private StorageInfo storageInfo; + + /* + * List of synchronized certification records. + */ + @JsonProperty(value = "certRecords", access = JsonProperty.Access.WRITE_ONLY) + private List certRecords; + /* * Azure lifecycle management */ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ProvisioningState provisioningState; - /** Creates an instance of ReportProperties class. */ + /** + * Creates an instance of ReportProperties class. + */ public ReportProperties() { } /** - * Get the id property: Report id in database. - * - * @return the id value. + * Get the triggerTime property: Report collection trigger time. + * + * @return the triggerTime value. */ - public String id() { - return this.id; + public OffsetDateTime triggerTime() { + return this.triggerTime; } /** - * Get the status property: Report status. - * - * @return the status value. + * Set the triggerTime property: Report collection trigger time. + * + * @param triggerTime the triggerTime value to set. + * @return the ReportProperties object itself. */ - public ReportStatus status() { - return this.status; + public ReportProperties withTriggerTime(OffsetDateTime triggerTime) { + this.triggerTime = triggerTime; + return this; } /** - * Get the tenantId property: Report's tenant id. - * - * @return the tenantId value. + * Get the timeZone property: Report collection trigger time's time zone, the available list can be obtained by + * executing "Get-TimeZone -ListAvailable" in PowerShell. + * An example of valid timezone id is "Pacific Standard Time". + * + * @return the timeZone value. */ - public String tenantId() { - return this.tenantId; + public String timeZone() { + return this.timeZone; } /** - * Get the reportName property: Report name. - * - * @return the reportName value. + * Set the timeZone property: Report collection trigger time's time zone, the available list can be obtained by + * executing "Get-TimeZone -ListAvailable" in PowerShell. + * An example of valid timezone id is "Pacific Standard Time". + * + * @param timeZone the timeZone value to set. + * @return the ReportProperties object itself. */ - public String reportName() { - return this.reportName; + public ReportProperties withTimeZone(String timeZone) { + this.timeZone = timeZone; + return this; } /** - * Get the offerGuid property: Report offer Guid. - * - * @return the offerGuid value. + * Get the resources property: List of resource data. + * + * @return the resources value. */ - public String offerGuid() { - return this.offerGuid; + public List resources() { + return this.resources; } /** - * Set the offerGuid property: Report offer Guid. - * - * @param offerGuid the offerGuid value to set. + * Set the resources property: List of resource data. + * + * @param resources the resources value to set. * @return the ReportProperties object itself. */ - public ReportProperties withOfferGuid(String offerGuid) { - this.offerGuid = offerGuid; + public ReportProperties withResources(List resources) { + this.resources = resources; return this; } /** - * Get the timeZone property: Report collection trigger time's time zone, the available list can be obtained by - * executing "Get-TimeZone -ListAvailable" in PowerShell. An example of valid timezone id is "Pacific Standard - * Time". - * - * @return the timeZone value. + * Get the status property: Report status. + * + * @return the status value. */ - public String timeZone() { - return this.timeZone; + public ReportStatus status() { + return this.status; } /** - * Set the timeZone property: Report collection trigger time's time zone, the available list can be obtained by - * executing "Get-TimeZone -ListAvailable" in PowerShell. An example of valid timezone id is "Pacific Standard - * Time". - * - * @param timeZone the timeZone value to set. - * @return the ReportProperties object itself. + * Get the errors property: List of report error codes. + * + * @return the errors value. */ - public ReportProperties withTimeZone(String timeZone) { - this.timeZone = timeZone; - return this; + public List errors() { + return this.errors; } /** - * Get the triggerTime property: Report collection trigger time. - * - * @return the triggerTime value. + * Get the tenantId property: Report's tenant id. + * + * @return the tenantId value. */ - public OffsetDateTime triggerTime() { - return this.triggerTime; + public String tenantId() { + return this.tenantId; } /** - * Set the triggerTime property: Report collection trigger time. - * - * @param triggerTime the triggerTime value to set. + * Get the offerGuid property: A list of comma-separated offerGuids indicates a series of offerGuids that map to the + * report. For example, "00000000-0000-0000-0000-000000000001,00000000-0000-0000-0000-000000000002" and + * "00000000-0000-0000-0000-000000000003". + * + * @return the offerGuid value. + */ + public String offerGuid() { + return this.offerGuid; + } + + /** + * Set the offerGuid property: A list of comma-separated offerGuids indicates a series of offerGuids that map to the + * report. For example, "00000000-0000-0000-0000-000000000001,00000000-0000-0000-0000-000000000002" and + * "00000000-0000-0000-0000-000000000003". + * + * @param offerGuid the offerGuid value to set. * @return the ReportProperties object itself. */ - public ReportProperties withTriggerTime(OffsetDateTime triggerTime) { - this.triggerTime = triggerTime; + public ReportProperties withOfferGuid(String offerGuid) { + this.offerGuid = offerGuid; return this; } /** * Get the nextTriggerTime property: Report next collection trigger time. - * + * * @return the nextTriggerTime value. */ public OffsetDateTime nextTriggerTime() { @@ -208,7 +235,7 @@ public OffsetDateTime nextTriggerTime() { /** * Get the lastTriggerTime property: Report last collection trigger time. - * + * * @return the lastTriggerTime value. */ public OffsetDateTime lastTriggerTime() { @@ -217,7 +244,7 @@ public OffsetDateTime lastTriggerTime() { /** * Get the subscriptions property: List of subscription Ids. - * + * * @return the subscriptions value. */ public List subscriptions() { @@ -225,37 +252,46 @@ public List subscriptions() { } /** - * Get the resources property: List of resource data. - * - * @return the resources value. + * Get the complianceStatus property: Report compliance status. + * + * @return the complianceStatus value. */ - public List resources() { - return this.resources; + public ReportComplianceStatus complianceStatus() { + return this.complianceStatus; } /** - * Set the resources property: List of resource data. - * - * @param resources the resources value to set. + * Get the storageInfo property: The information of 'bring your own storage' binding to the report. + * + * @return the storageInfo value. + */ + public StorageInfo storageInfo() { + return this.storageInfo; + } + + /** + * Set the storageInfo property: The information of 'bring your own storage' binding to the report. + * + * @param storageInfo the storageInfo value to set. * @return the ReportProperties object itself. */ - public ReportProperties withResources(List resources) { - this.resources = resources; + public ReportProperties withStorageInfo(StorageInfo storageInfo) { + this.storageInfo = storageInfo; return this; } /** - * Get the complianceStatus property: Report compliance status. - * - * @return the complianceStatus value. + * Get the certRecords property: List of synchronized certification records. + * + * @return the certRecords value. */ - public ReportComplianceStatus complianceStatus() { - return this.complianceStatus; + public List certRecords() { + return this.certRecords; } /** * Get the provisioningState property: Azure lifecycle management. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -264,30 +300,33 @@ public ProvisioningState provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (timeZone() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property timeZone in model ReportProperties")); - } if (triggerTime() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property triggerTime in model ReportProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property triggerTime in model ReportProperties")); + } + if (timeZone() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property timeZone in model ReportProperties")); } if (resources() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property resources in model ReportProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property resources in model ReportProperties")); } else { resources().forEach(e -> e.validate()); } if (complianceStatus() != null) { complianceStatus().validate(); } + if (storageInfo() != null) { + storageInfo().validate(); + } + if (certRecords() != null) { + certRecords().forEach(e -> e.validate()); + } } private static final ClientLogger LOGGER = new ClientLogger(ReportProperties.class); diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ReportResource.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ReportResource.java index 47cbec6c0f890..1565891add586 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ReportResource.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ReportResource.java @@ -1,52 +1,54 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.models; import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcomplianceautomation.fluent.models.ReportResourceInner; -/** An immutable client-side representation of ReportResource. */ +/** + * An immutable client-side representation of ReportResource. + */ public interface ReportResource { /** * 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: Report property. - * + * * @return the properties value. */ ReportProperties properties(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the inner com.azure.resourcemanager.appcomplianceautomation.fluent.models.ReportResourceInner object. - * + * * @return the inner object. */ ReportResourceInner innerModel(); diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ReportResourceList.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ReportResourceList.java deleted file mode 100644 index 6e5013f326ccd..0000000000000 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ReportResourceList.java +++ /dev/null @@ -1,73 +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.appcomplianceautomation.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.appcomplianceautomation.fluent.models.ReportResourceInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Object that includes an array of resources and a possible link for next set. */ -@Fluent -public final class ReportResourceList { - /* - * List of the reports - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * The URL the client should use to fetch the next page (per server side paging). - * It's null for now, added for future use. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** Creates an instance of ReportResourceList class. */ - public ReportResourceList() { - } - - /** - * Get the value property: List of the reports. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The URL the client should use to fetch the next page (per server side paging). It's - * null for now, added for future use. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The URL the client should use to fetch the next page (per server side paging). It's - * null for now, added for future use. - * - * @param nextLink the nextLink value to set. - * @return the ReportResourceList object itself. - */ - public ReportResourceList 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/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ReportResourcePatch.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ReportResourcePatch.java index 2c90afa672f43..b06ff4858e41d 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ReportResourcePatch.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ReportResourcePatch.java @@ -1,48 +1,52 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.models; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** A class represent a AppComplianceAutomation report resource update properties. */ +/** + * A class represent a AppComplianceAutomation report resource update properties. + */ @Fluent public final class ReportResourcePatch { /* * Report property. */ @JsonProperty(value = "properties") - private ReportProperties properties; + private ReportPatchProperties properties; - /** Creates an instance of ReportResourcePatch class. */ + /** + * Creates an instance of ReportResourcePatch class. + */ public ReportResourcePatch() { } /** * Get the properties property: Report property. - * + * * @return the properties value. */ - public ReportProperties properties() { + public ReportPatchProperties properties() { return this.properties; } /** * Set the properties property: Report property. - * + * * @param properties the properties value to set. * @return the ReportResourcePatch object itself. */ - public ReportResourcePatch withProperties(ReportProperties properties) { + public ReportResourcePatch withProperties(ReportPatchProperties 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/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ReportStatus.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ReportStatus.java index 8ffc83c392468..151a492fec9f0 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ReportStatus.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ReportStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.models; @@ -8,20 +8,42 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Report status. */ +/** + * Report status. + */ public final class ReportStatus extends ExpandableStringEnum { - /** Static value Active for ReportStatus. */ + /** + * Static value Active for ReportStatus. + */ public static final ReportStatus ACTIVE = fromString("Active"); - /** Static value Failed for ReportStatus. */ + /** + * Static value Failed for ReportStatus. + */ public static final ReportStatus FAILED = fromString("Failed"); - /** Static value Disabled for ReportStatus. */ + /** + * Static value Reviewing for ReportStatus. + */ + public static final ReportStatus REVIEWING = fromString("Reviewing"); + + /** + * Static value Disabled for ReportStatus. + */ public static final ReportStatus DISABLED = fromString("Disabled"); + /** + * Creates a new instance of ReportStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ReportStatus() { + } + /** * Creates or finds a ReportStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding ReportStatus. */ @@ -32,7 +54,7 @@ public static ReportStatus fromString(String name) { /** * Gets known ReportStatus values. - * + * * @return known ReportStatus values. */ public static Collection values() { diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Reports.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Reports.java index 735d776e44ef5..fc55f29301bbd 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Reports.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Reports.java @@ -1,30 +1,131 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.models; import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.exception.ManagementError; import com.azure.core.util.Context; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.ReportResourceInner; -/** Resource collection API of Reports. */ +/** + * Resource collection API of Reports. + */ public interface Reports { + /** + * Get the AppComplianceAutomation report and its properties. + * + * @param reportName Report 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 AppComplianceAutomation report and its properties along with {@link Response}. + */ + Response getWithResponse(String reportName, Context context); + + /** + * Get the AppComplianceAutomation report and its properties. + * + * @param reportName Report 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 AppComplianceAutomation report and its properties. + */ + ReportResource get(String reportName); + + /** + * Create a new AppComplianceAutomation report or update an exiting AppComplianceAutomation report. + * + * @param reportName Report Name. + * @param parameters Parameters for the create or update 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 class represent an AppComplianceAutomation report resource. + */ + ReportResource createOrUpdate(String reportName, ReportResourceInner parameters); + + /** + * Create a new AppComplianceAutomation report or update an exiting AppComplianceAutomation report. + * + * @param reportName Report Name. + * @param parameters Parameters for the create or update operation. + * @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 class represent an AppComplianceAutomation report resource. + */ + ReportResource createOrUpdate(String reportName, ReportResourceInner parameters, Context context); + + /** + * Update an exiting AppComplianceAutomation report. + * + * @param reportName Report Name. + * @param properties Parameters for the create or update 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 class represent an AppComplianceAutomation report resource. + */ + ReportResource update(String reportName, ReportResourcePatch properties); + + /** + * Update an exiting AppComplianceAutomation report. + * + * @param reportName Report Name. + * @param properties Parameters for the create or update operation. + * @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 class represent an AppComplianceAutomation report resource. + */ + ReportResource update(String reportName, ReportResourcePatch properties, Context context); + + /** + * Delete an AppComplianceAutomation report. + * + * @param reportName Report 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 reportName); + + /** + * Delete an AppComplianceAutomation report. + * + * @param reportName Report 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 reportName, Context context); + /** * Get the AppComplianceAutomation report list for the tenant. - * + * * @throws com.azure.core.management.exception.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 AppComplianceAutomation report list for the tenant as paginated response with {@link PagedIterable}. */ - PagedIterable list(); + PagedIterable listByTenant(); /** * Get the AppComplianceAutomation report list for the tenant. - * + * * @param skipToken Skip over when retrieving results. * @param top Number of elements to return when retrieving results. * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. - * ?$select=reportName,id. + * ?$select=reportName,id. + * @param filter The filter to apply on the operation. + * @param orderby OData order by query option. * @param offerGuid The offerGuid which mapping to the reports. * @param reportCreatorTenantId The tenant id of the report creator. * @param context The context to associate with this operation. @@ -33,6 +134,130 @@ public interface Reports { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the AppComplianceAutomation report list for the tenant as paginated response with {@link PagedIterable}. */ - PagedIterable list( - String skipToken, Integer top, String select, String offerGuid, String reportCreatorTenantId, Context context); + PagedIterable listByTenant(String skipToken, Integer top, String select, String filter, + String orderby, String offerGuid, String reportCreatorTenantId, Context context); + + /** + * Synchronize attestation record from app compliance. + * + * @param reportName Report Name. + * @param body Parameters for synchronize certification record 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 response. + */ + ManagementError syncCertRecord(String reportName, SyncCertRecordRequest body); + + /** + * Synchronize attestation record from app compliance. + * + * @param reportName Report Name. + * @param body Parameters for synchronize certification record operation. + * @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 response. + */ + ManagementError syncCertRecord(String reportName, SyncCertRecordRequest body, Context context); + + /** + * Checks the report's nested resource name availability, e.g: Webhooks, Evidences, Snapshots. + * + * @param reportName Report Name. + * @param body NameAvailabilityRequest 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 the check availability result along with {@link Response}. + */ + Response checkNameAvailabilityWithResponse(String reportName, + CheckNameAvailabilityRequest body, Context context); + + /** + * Checks the report's nested resource name availability, e.g: Webhooks, Evidences, Snapshots. + * + * @param reportName Report Name. + * @param body NameAvailabilityRequest 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 the check availability result. + */ + CheckNameAvailabilityResponse checkNameAvailability(String reportName, CheckNameAvailabilityRequest body); + + /** + * Fix the AppComplianceAutomation report error. e.g: App Compliance Automation Tool service unregistered, + * automation removed. + * + * @param reportName Report 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 response. + */ + ManagementError fix(String reportName); + + /** + * Fix the AppComplianceAutomation report error. e.g: App Compliance Automation Tool service unregistered, + * automation removed. + * + * @param reportName Report 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 response. + */ + ManagementError fix(String reportName, Context context); + + /** + * Fix the AppComplianceAutomation report error. e.g: App Compliance Automation Tool service unregistered, + * automation removed. + * + * @param reportName Report 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 scoping question list along with {@link Response}. + */ + Response getScopingQuestionsWithResponse(String reportName, Context context); + + /** + * Fix the AppComplianceAutomation report error. e.g: App Compliance Automation Tool service unregistered, + * automation removed. + * + * @param reportName Report 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 scoping question list. + */ + ScopingQuestions getScopingQuestions(String reportName); + + /** + * Verify the AppComplianceAutomation report health status. + * + * @param reportName Report 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 response. + */ + ManagementError verify(String reportName); + + /** + * Verify the AppComplianceAutomation report health status. + * + * @param reportName Report 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 response. + */ + ManagementError verify(String reportName, Context context); } diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ResourceItem.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ResourceItem.java deleted file mode 100644 index f83eedd49d162..0000000000000 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ResourceItem.java +++ /dev/null @@ -1,88 +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.appcomplianceautomation.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Resource Id. */ -@Immutable -public final class ResourceItem { - /* - * The subscription Id of this resource. - */ - @JsonProperty(value = "subscriptionId", access = JsonProperty.Access.WRITE_ONLY) - private String subscriptionId; - - /* - * The resource group name of this resource. - */ - @JsonProperty(value = "resourceGroup", access = JsonProperty.Access.WRITE_ONLY) - private String resourceGroup; - - /* - * The resource type of this resource. - */ - @JsonProperty(value = "resourceType", access = JsonProperty.Access.WRITE_ONLY) - private String resourceType; - - /* - * The resource Id - e.g. - * "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute" - + "/virtualMachines/vm1". - */ - @JsonProperty(value = "resourceId", access = JsonProperty.Access.WRITE_ONLY) - private String resourceId; - - /** Creates an instance of ResourceItem class. */ - public ResourceItem() { - } - - /** - * Get the subscriptionId property: The subscription Id of this resource. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Get the resourceGroup property: The resource group name of this resource. - * - * @return the resourceGroup value. - */ - public String resourceGroup() { - return this.resourceGroup; - } - - /** - * Get the resourceType property: The resource type of this resource. - * - * @return the resourceType value. - */ - public String resourceType() { - return this.resourceType; - } - - /** - * Get the resourceId property: The resource Id - e.g. - * "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute" - + "/virtualMachines/vm1". - * - * @return the resourceId value. - */ - public String resourceId() { - return this.resourceId; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ResourceMetadata.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ResourceMetadata.java index 5d262aa112a91..baa2e33328b9c 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ResourceMetadata.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ResourceMetadata.java @@ -1,28 +1,27 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; -/** Single resource Id's metadata. */ +/** + * Single resource Id's metadata. + */ @Fluent public final class ResourceMetadata { /* * Resource Id - e.g. - * "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute" - + "/virtualMachines/vm1". + * "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/vm1". */ @JsonProperty(value = "resourceId", required = true) private String resourceId; /* - * Resource type. + * Resource type. e.g. "Microsoft.Compute/virtualMachines" */ @JsonProperty(value = "resourceType") private String resourceType; @@ -34,27 +33,27 @@ public final class ResourceMetadata { private String resourceKind; /* - * Resource name. + * Resource Origin. */ - @JsonProperty(value = "resourceName") - private String resourceName; + @JsonProperty(value = "resourceOrigin") + private ResourceOrigin resourceOrigin; /* - * Resource's tag type. + * Account Id. For example - the AWS account id. */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map tags; + @JsonProperty(value = "accountId") + private String accountId; - /** Creates an instance of ResourceMetadata class. */ + /** + * Creates an instance of ResourceMetadata class. + */ public ResourceMetadata() { } /** * Get the resourceId property: Resource Id - e.g. - * "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute" - + "/virtualMachines/vm1". - * + * "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/vm1". + * * @return the resourceId value. */ public String resourceId() { @@ -63,9 +62,8 @@ public String resourceId() { /** * Set the resourceId property: Resource Id - e.g. - * "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute" - + "/virtualMachines/vm1". - * + * "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/vm1". + * * @param resourceId the resourceId value to set. * @return the ResourceMetadata object itself. */ @@ -75,8 +73,8 @@ public ResourceMetadata withResourceId(String resourceId) { } /** - * Get the resourceType property: Resource type. - * + * Get the resourceType property: Resource type. e.g. "Microsoft.Compute/virtualMachines". + * * @return the resourceType value. */ public String resourceType() { @@ -84,8 +82,8 @@ public String resourceType() { } /** - * Set the resourceType property: Resource type. - * + * Set the resourceType property: Resource type. e.g. "Microsoft.Compute/virtualMachines". + * * @param resourceType the resourceType value to set. * @return the ResourceMetadata object itself. */ @@ -96,7 +94,7 @@ public ResourceMetadata withResourceType(String resourceType) { /** * Get the resourceKind property: Resource kind. - * + * * @return the resourceKind value. */ public String resourceKind() { @@ -105,7 +103,7 @@ public String resourceKind() { /** * Set the resourceKind property: Resource kind. - * + * * @param resourceKind the resourceKind value to set. * @return the ResourceMetadata object itself. */ @@ -115,55 +113,54 @@ public ResourceMetadata withResourceKind(String resourceKind) { } /** - * Get the resourceName property: Resource name. - * - * @return the resourceName value. + * Get the resourceOrigin property: Resource Origin. + * + * @return the resourceOrigin value. */ - public String resourceName() { - return this.resourceName; + public ResourceOrigin resourceOrigin() { + return this.resourceOrigin; } /** - * Set the resourceName property: Resource name. - * - * @param resourceName the resourceName value to set. + * Set the resourceOrigin property: Resource Origin. + * + * @param resourceOrigin the resourceOrigin value to set. * @return the ResourceMetadata object itself. */ - public ResourceMetadata withResourceName(String resourceName) { - this.resourceName = resourceName; + public ResourceMetadata withResourceOrigin(ResourceOrigin resourceOrigin) { + this.resourceOrigin = resourceOrigin; return this; } /** - * Get the tags property: Resource's tag type. - * - * @return the tags value. + * Get the accountId property: Account Id. For example - the AWS account id. + * + * @return the accountId value. */ - public Map tags() { - return this.tags; + public String accountId() { + return this.accountId; } /** - * Set the tags property: Resource's tag type. - * - * @param tags the tags value to set. + * Set the accountId property: Account Id. For example - the AWS account id. + * + * @param accountId the accountId value to set. * @return the ResourceMetadata object itself. */ - public ResourceMetadata withTags(Map tags) { - this.tags = tags; + public ResourceMetadata withAccountId(String accountId) { + this.accountId = accountId; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (resourceId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property resourceId in model ResourceMetadata")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property resourceId in model ResourceMetadata")); } } diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ResourceOrigin.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ResourceOrigin.java new file mode 100644 index 0000000000000..910f0627b4af2 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ResourceOrigin.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Resource Origin. + */ +public final class ResourceOrigin extends ExpandableStringEnum { + /** + * Static value Azure for ResourceOrigin. + */ + public static final ResourceOrigin AZURE = fromString("Azure"); + + /** + * Static value AWS for ResourceOrigin. + */ + public static final ResourceOrigin AWS = fromString("AWS"); + + /** + * Static value GCP for ResourceOrigin. + */ + public static final ResourceOrigin GCP = fromString("GCP"); + + /** + * Creates a new instance of ResourceOrigin value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ResourceOrigin() { + } + + /** + * Creates or finds a ResourceOrigin from its string representation. + * + * @param name a name to look for. + * @return the corresponding ResourceOrigin. + */ + @JsonCreator + public static ResourceOrigin fromString(String name) { + return fromString(name, ResourceOrigin.class); + } + + /** + * Gets known ResourceOrigin values. + * + * @return known ResourceOrigin values. + */ + public static Collection values() { + return values(ResourceOrigin.class); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ResourceStatus.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ResourceStatus.java index 526ce10f8d20e..8114c99f25222 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ResourceStatus.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ResourceStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.models; @@ -8,20 +8,32 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Indicates the resource status. */ +/** + * Indicates the resource status. + */ public final class ResourceStatus extends ExpandableStringEnum { - /** Static value Healthy for ResourceStatus. */ + /** + * Static value Healthy for ResourceStatus. + */ public static final ResourceStatus HEALTHY = fromString("Healthy"); - /** Static value Unhealthy for ResourceStatus. */ + /** + * Static value Unhealthy for ResourceStatus. + */ public static final ResourceStatus UNHEALTHY = fromString("Unhealthy"); - /** Static value NotApplicable for ResourceStatus. */ - public static final ResourceStatus NOT_APPLICABLE = fromString("NotApplicable"); + /** + * Creates a new instance of ResourceStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ResourceStatus() { + } /** * Creates or finds a ResourceStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding ResourceStatus. */ @@ -32,7 +44,7 @@ public static ResourceStatus fromString(String name) { /** * Gets known ResourceStatus values. - * + * * @return known ResourceStatus values. */ public static Collection values() { diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Responsibility.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Responsibility.java new file mode 100644 index 0000000000000..0b09f806da2e8 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Responsibility.java @@ -0,0 +1,245 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * A class represent the customer responsibility. + */ +@Immutable +public final class Responsibility { + /* + * The id of the customer responsibility. + */ + @JsonProperty(value = "responsibilityId", access = JsonProperty.Access.WRITE_ONLY) + private String responsibilityId; + + /* + * The title of the customer responsibility. + */ + @JsonProperty(value = "responsibilityTitle", access = JsonProperty.Access.WRITE_ONLY) + private String responsibilityTitle; + + /* + * The description of the customer responsibility. + */ + @JsonProperty(value = "responsibilityDescription", access = JsonProperty.Access.WRITE_ONLY) + private String responsibilityDescription; + + /* + * The type of customer responsibility. + */ + @JsonProperty(value = "responsibilityType", access = JsonProperty.Access.WRITE_ONLY) + private ResponsibilityType responsibilityType; + + /* + * The severity level of this customer responsibility. + */ + @JsonProperty(value = "responsibilitySeverity", access = JsonProperty.Access.WRITE_ONLY) + private ResponsibilitySeverity responsibilitySeverity; + + /* + * The status of this customer responsibility. + */ + @JsonProperty(value = "responsibilityStatus", access = JsonProperty.Access.WRITE_ONLY) + private ResponsibilityStatus responsibilityStatus; + + /* + * The supported cloud environment of this customer responsibility. + */ + @JsonProperty(value = "responsibilityEnvironment", access = JsonProperty.Access.WRITE_ONLY) + private ResponsibilityEnvironment responsibilityEnvironment; + + /* + * The count of all failed resources. + */ + @JsonProperty(value = "failedResourceCount") + private Integer failedResourceCount; + + /* + * The count of all resources. + */ + @JsonProperty(value = "totalResourceCount") + private Integer totalResourceCount; + + /* + * List of resource. + */ + @JsonProperty(value = "resourceList", access = JsonProperty.Access.WRITE_ONLY) + private List resourceList; + + /* + * List of recommendation. + */ + @JsonProperty(value = "recommendationList", access = JsonProperty.Access.WRITE_ONLY) + private List recommendationList; + + /* + * The evidence upload guidance description. + */ + @JsonProperty(value = "guidance", access = JsonProperty.Access.WRITE_ONLY) + private String guidance; + + /* + * The justification given by the user to clarify the reason. + */ + @JsonProperty(value = "justification", access = JsonProperty.Access.WRITE_ONLY) + private String justification; + + /* + * List of evidence file url. + */ + @JsonProperty(value = "evidenceFiles") + private List evidenceFiles; + + /** + * Creates an instance of Responsibility class. + */ + private Responsibility() { + } + + /** + * Get the responsibilityId property: The id of the customer responsibility. + * + * @return the responsibilityId value. + */ + public String responsibilityId() { + return this.responsibilityId; + } + + /** + * Get the responsibilityTitle property: The title of the customer responsibility. + * + * @return the responsibilityTitle value. + */ + public String responsibilityTitle() { + return this.responsibilityTitle; + } + + /** + * Get the responsibilityDescription property: The description of the customer responsibility. + * + * @return the responsibilityDescription value. + */ + public String responsibilityDescription() { + return this.responsibilityDescription; + } + + /** + * Get the responsibilityType property: The type of customer responsibility. + * + * @return the responsibilityType value. + */ + public ResponsibilityType responsibilityType() { + return this.responsibilityType; + } + + /** + * Get the responsibilitySeverity property: The severity level of this customer responsibility. + * + * @return the responsibilitySeverity value. + */ + public ResponsibilitySeverity responsibilitySeverity() { + return this.responsibilitySeverity; + } + + /** + * Get the responsibilityStatus property: The status of this customer responsibility. + * + * @return the responsibilityStatus value. + */ + public ResponsibilityStatus responsibilityStatus() { + return this.responsibilityStatus; + } + + /** + * Get the responsibilityEnvironment property: The supported cloud environment of this customer responsibility. + * + * @return the responsibilityEnvironment value. + */ + public ResponsibilityEnvironment responsibilityEnvironment() { + return this.responsibilityEnvironment; + } + + /** + * Get the failedResourceCount property: The count of all failed resources. + * + * @return the failedResourceCount value. + */ + public Integer failedResourceCount() { + return this.failedResourceCount; + } + + /** + * Get the totalResourceCount property: The count of all resources. + * + * @return the totalResourceCount value. + */ + public Integer totalResourceCount() { + return this.totalResourceCount; + } + + /** + * Get the resourceList property: List of resource. + * + * @return the resourceList value. + */ + public List resourceList() { + return this.resourceList; + } + + /** + * Get the recommendationList property: List of recommendation. + * + * @return the recommendationList value. + */ + public List recommendationList() { + return this.recommendationList; + } + + /** + * Get the guidance property: The evidence upload guidance description. + * + * @return the guidance value. + */ + public String guidance() { + return this.guidance; + } + + /** + * Get the justification property: The justification given by the user to clarify the reason. + * + * @return the justification value. + */ + public String justification() { + return this.justification; + } + + /** + * Get the evidenceFiles property: List of evidence file url. + * + * @return the evidenceFiles value. + */ + public List evidenceFiles() { + return this.evidenceFiles; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (resourceList() != null) { + resourceList().forEach(e -> e.validate()); + } + if (recommendationList() != null) { + recommendationList().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ResponsibilityEnvironment.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ResponsibilityEnvironment.java new file mode 100644 index 0000000000000..1d1139edcf3b8 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ResponsibilityEnvironment.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Indicates the customer responsibility supported cloud environment. + */ +public final class ResponsibilityEnvironment extends ExpandableStringEnum { + /** + * Static value Azure for ResponsibilityEnvironment. + */ + public static final ResponsibilityEnvironment AZURE = fromString("Azure"); + + /** + * Static value AWS for ResponsibilityEnvironment. + */ + public static final ResponsibilityEnvironment AWS = fromString("AWS"); + + /** + * Static value GCP for ResponsibilityEnvironment. + */ + public static final ResponsibilityEnvironment GCP = fromString("GCP"); + + /** + * Static value General for ResponsibilityEnvironment. + */ + public static final ResponsibilityEnvironment GENERAL = fromString("General"); + + /** + * Creates a new instance of ResponsibilityEnvironment value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ResponsibilityEnvironment() { + } + + /** + * Creates or finds a ResponsibilityEnvironment from its string representation. + * + * @param name a name to look for. + * @return the corresponding ResponsibilityEnvironment. + */ + @JsonCreator + public static ResponsibilityEnvironment fromString(String name) { + return fromString(name, ResponsibilityEnvironment.class); + } + + /** + * Gets known ResponsibilityEnvironment values. + * + * @return known ResponsibilityEnvironment values. + */ + public static Collection values() { + return values(ResponsibilityEnvironment.class); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ResponsibilityResource.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ResponsibilityResource.java new file mode 100644 index 0000000000000..0434c38f470ea --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ResponsibilityResource.java @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * A class represent the resource. + */ +@Immutable +public final class ResponsibilityResource { + /* + * The Id of the resource. + */ + @JsonProperty(value = "resourceId", access = JsonProperty.Access.WRITE_ONLY) + private String resourceId; + + /* + * Account Id. For example - AWS account Id. + */ + @JsonProperty(value = "accountId", access = JsonProperty.Access.WRITE_ONLY) + private String accountId; + + /* + * The type of the resource. e.g. "Microsoft.SignalRService/SignalR" + */ + @JsonProperty(value = "resourceType", access = JsonProperty.Access.WRITE_ONLY) + private String resourceType; + + /* + * Resource origin. + */ + @JsonProperty(value = "resourceOrigin", access = JsonProperty.Access.WRITE_ONLY) + private ResourceOrigin resourceOrigin; + + /* + * Resource status. + */ + @JsonProperty(value = "resourceStatus", access = JsonProperty.Access.WRITE_ONLY) + private ResourceStatus resourceStatus; + + /* + * The status change date for the resource. + */ + @JsonProperty(value = "resourceStatusChangeDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime resourceStatusChangeDate; + + /* + * List of recommendation id. + */ + @JsonProperty(value = "recommendationIds") + private List recommendationIds; + + /** + * Creates an instance of ResponsibilityResource class. + */ + private ResponsibilityResource() { + } + + /** + * Get the resourceId property: The Id of the resource. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Get the accountId property: Account Id. For example - AWS account Id. + * + * @return the accountId value. + */ + public String accountId() { + return this.accountId; + } + + /** + * Get the resourceType property: The type of the resource. e.g. "Microsoft.SignalRService/SignalR". + * + * @return the resourceType value. + */ + public String resourceType() { + return this.resourceType; + } + + /** + * Get the resourceOrigin property: Resource origin. + * + * @return the resourceOrigin value. + */ + public ResourceOrigin resourceOrigin() { + return this.resourceOrigin; + } + + /** + * Get the resourceStatus property: Resource status. + * + * @return the resourceStatus value. + */ + public ResourceStatus resourceStatus() { + return this.resourceStatus; + } + + /** + * Get the resourceStatusChangeDate property: The status change date for the resource. + * + * @return the resourceStatusChangeDate value. + */ + public OffsetDateTime resourceStatusChangeDate() { + return this.resourceStatusChangeDate; + } + + /** + * Get the recommendationIds property: List of recommendation id. + * + * @return the recommendationIds value. + */ + public List recommendationIds() { + return this.recommendationIds; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ResponsibilitySeverity.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ResponsibilitySeverity.java new file mode 100644 index 0000000000000..eaaa00fcb92f1 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ResponsibilitySeverity.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Indicates the customer responsibility severity. + */ +public final class ResponsibilitySeverity extends ExpandableStringEnum { + /** + * Static value High for ResponsibilitySeverity. + */ + public static final ResponsibilitySeverity HIGH = fromString("High"); + + /** + * Static value Medium for ResponsibilitySeverity. + */ + public static final ResponsibilitySeverity MEDIUM = fromString("Medium"); + + /** + * Static value Low for ResponsibilitySeverity. + */ + public static final ResponsibilitySeverity LOW = fromString("Low"); + + /** + * Creates a new instance of ResponsibilitySeverity value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ResponsibilitySeverity() { + } + + /** + * Creates or finds a ResponsibilitySeverity from its string representation. + * + * @param name a name to look for. + * @return the corresponding ResponsibilitySeverity. + */ + @JsonCreator + public static ResponsibilitySeverity fromString(String name) { + return fromString(name, ResponsibilitySeverity.class); + } + + /** + * Gets known ResponsibilitySeverity values. + * + * @return known ResponsibilitySeverity values. + */ + public static Collection values() { + return values(ResponsibilitySeverity.class); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ResponsibilityStatus.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ResponsibilityStatus.java new file mode 100644 index 0000000000000..74b79e072a0ed --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ResponsibilityStatus.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Indicates the customer responsibility status. + */ +public final class ResponsibilityStatus extends ExpandableStringEnum { + /** + * Static value Passed for ResponsibilityStatus. + */ + public static final ResponsibilityStatus PASSED = fromString("Passed"); + + /** + * Static value Failed for ResponsibilityStatus. + */ + public static final ResponsibilityStatus FAILED = fromString("Failed"); + + /** + * Static value NotApplicable for ResponsibilityStatus. + */ + public static final ResponsibilityStatus NOT_APPLICABLE = fromString("NotApplicable"); + + /** + * Static value PendingApproval for ResponsibilityStatus. + */ + public static final ResponsibilityStatus PENDING_APPROVAL = fromString("PendingApproval"); + + /** + * Creates a new instance of ResponsibilityStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ResponsibilityStatus() { + } + + /** + * Creates or finds a ResponsibilityStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding ResponsibilityStatus. + */ + @JsonCreator + public static ResponsibilityStatus fromString(String name) { + return fromString(name, ResponsibilityStatus.class); + } + + /** + * Gets known ResponsibilityStatus values. + * + * @return known ResponsibilityStatus values. + */ + public static Collection values() { + return values(ResponsibilityStatus.class); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ResponsibilityType.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ResponsibilityType.java new file mode 100644 index 0000000000000..878d032de178f --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ResponsibilityType.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Indicates the customer responsibility type. + */ +public final class ResponsibilityType extends ExpandableStringEnum { + /** + * Static value Automated for ResponsibilityType. + */ + public static final ResponsibilityType AUTOMATED = fromString("Automated"); + + /** + * Static value ScopedManual for ResponsibilityType. + */ + public static final ResponsibilityType SCOPED_MANUAL = fromString("ScopedManual"); + + /** + * Static value Manual for ResponsibilityType. + */ + public static final ResponsibilityType MANUAL = fromString("Manual"); + + /** + * Creates a new instance of ResponsibilityType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ResponsibilityType() { + } + + /** + * Creates or finds a ResponsibilityType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ResponsibilityType. + */ + @JsonCreator + public static ResponsibilityType fromString(String name) { + return fromString(name, ResponsibilityType.class); + } + + /** + * Gets known ResponsibilityType values. + * + * @return known ResponsibilityType values. + */ + public static Collection values() { + return values(ResponsibilityType.class); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Rule.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Rule.java new file mode 100644 index 0000000000000..d374bfe0815e0 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Rule.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Scoping question rule. + */ +public final class Rule extends ExpandableStringEnum { + /** + * Static value Required for Rule. + */ + public static final Rule REQUIRED = fromString("Required"); + + /** + * Static value CharLength for Rule. + */ + public static final Rule CHAR_LENGTH = fromString("CharLength"); + + /** + * Static value Url for Rule. + */ + public static final Rule URL = fromString("Url"); + + /** + * Static value Urls for Rule. + */ + public static final Rule URLS = fromString("Urls"); + + /** + * Static value Domains for Rule. + */ + public static final Rule DOMAINS = fromString("Domains"); + + /** + * Static value USPrivacyShield for Rule. + */ + public static final Rule USPRIVACY_SHIELD = fromString("USPrivacyShield"); + + /** + * Static value PublicSOX for Rule. + */ + public static final Rule PUBLIC_SOX = fromString("PublicSOX"); + + /** + * Static value CreditCardPCI for Rule. + */ + public static final Rule CREDIT_CARD_PCI = fromString("CreditCardPCI"); + + /** + * Static value AzureApplication for Rule. + */ + public static final Rule AZURE_APPLICATION = fromString("AzureApplication"); + + /** + * Static value ValidGuid for Rule. + */ + public static final Rule VALID_GUID = fromString("ValidGuid"); + + /** + * Static value PublisherVerification for Rule. + */ + public static final Rule PUBLISHER_VERIFICATION = fromString("PublisherVerification"); + + /** + * Static value DynamicDropdown for Rule. + */ + public static final Rule DYNAMIC_DROPDOWN = fromString("DynamicDropdown"); + + /** + * Static value PreventNonEnglishChar for Rule. + */ + public static final Rule PREVENT_NON_ENGLISH_CHAR = fromString("PreventNonEnglishChar"); + + /** + * Static value ValidEmail for Rule. + */ + public static final Rule VALID_EMAIL = fromString("ValidEmail"); + + /** + * Creates a new instance of Rule value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Rule() { + } + + /** + * Creates or finds a Rule from its string representation. + * + * @param name a name to look for. + * @return the corresponding Rule. + */ + @JsonCreator + public static Rule fromString(String name) { + return fromString(name, Rule.class); + } + + /** + * Gets known Rule values. + * + * @return known Rule values. + */ + public static Collection values() { + return values(Rule.class); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ScopingAnswer.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ScopingAnswer.java new file mode 100644 index 0000000000000..b9d33c6185471 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ScopingAnswer.java @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Scoping answer. + */ +@Fluent +public final class ScopingAnswer { + /* + * Question id. + */ + @JsonProperty(value = "questionId", required = true) + private String questionId; + + /* + * Question answer value list. + */ + @JsonProperty(value = "answers", required = true) + private List answers; + + /** + * Creates an instance of ScopingAnswer class. + */ + public ScopingAnswer() { + } + + /** + * Get the questionId property: Question id. + * + * @return the questionId value. + */ + public String questionId() { + return this.questionId; + } + + /** + * Set the questionId property: Question id. + * + * @param questionId the questionId value to set. + * @return the ScopingAnswer object itself. + */ + public ScopingAnswer withQuestionId(String questionId) { + this.questionId = questionId; + return this; + } + + /** + * Get the answers property: Question answer value list. + * + * @return the answers value. + */ + public List answers() { + return this.answers; + } + + /** + * Set the answers property: Question answer value list. + * + * @param answers the answers value to set. + * @return the ScopingAnswer object itself. + */ + public ScopingAnswer withAnswers(List answers) { + this.answers = answers; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (questionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property questionId in model ScopingAnswer")); + } + if (answers() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property answers in model ScopingAnswer")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ScopingAnswer.class); +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ScopingConfigurationProperties.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ScopingConfigurationProperties.java new file mode 100644 index 0000000000000..6d45d8d2eaf52 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ScopingConfigurationProperties.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * ScopingConfiguration's properties. + */ +@Fluent +public final class ScopingConfigurationProperties { + /* + * List of scoping question answers. + */ + @JsonProperty(value = "answers") + private List answers; + + /* + * Azure lifecycle management + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Creates an instance of ScopingConfigurationProperties class. + */ + public ScopingConfigurationProperties() { + } + + /** + * Get the answers property: List of scoping question answers. + * + * @return the answers value. + */ + public List answers() { + return this.answers; + } + + /** + * Set the answers property: List of scoping question answers. + * + * @param answers the answers value to set. + * @return the ScopingConfigurationProperties object itself. + */ + public ScopingConfigurationProperties withAnswers(List answers) { + this.answers = answers; + return this; + } + + /** + * Get the provisioningState property: Azure lifecycle management. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (answers() != null) { + answers().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ScopingConfigurationResource.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ScopingConfigurationResource.java new file mode 100644 index 0000000000000..b0096502e1972 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ScopingConfigurationResource.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.ScopingConfigurationResourceInner; + +/** + * An immutable client-side representation of ScopingConfigurationResource. + */ +public interface ScopingConfigurationResource { + /** + * 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: ScopingConfiguration property. + * + * @return the properties value. + */ + ScopingConfigurationProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.appcomplianceautomation.fluent.models.ScopingConfigurationResourceInner + * object. + * + * @return the inner object. + */ + ScopingConfigurationResourceInner innerModel(); +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ReportOperations.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ScopingConfigurations.java similarity index 50% rename from sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ReportOperations.java rename to sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ScopingConfigurations.java index 3f0b0bdfeeccd..b38e885bfcc46 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ReportOperations.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ScopingConfigurations.java @@ -1,106 +1,122 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.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.appcomplianceautomation.fluent.models.ReportResourceInner; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.ScopingConfigurationResourceInner; -/** Resource collection API of ReportOperations. */ -public interface ReportOperations { +/** + * Resource collection API of ScopingConfigurations. + */ +public interface ScopingConfigurations { /** - * Get the AppComplianceAutomation report and its properties. - * + * Get the AppComplianceAutomation scoping configuration of the specific report. + * * @param reportName Report Name. + * @param scopingConfigurationName The scoping configuration of the specific report. * @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 AppComplianceAutomation report and its properties along with {@link Response}. + * @return the AppComplianceAutomation scoping configuration of the specific report along with {@link Response}. */ - Response getWithResponse(String reportName, Context context); + Response getWithResponse(String reportName, String scopingConfigurationName, + Context context); /** - * Get the AppComplianceAutomation report and its properties. - * + * Get the AppComplianceAutomation scoping configuration of the specific report. + * * @param reportName Report Name. + * @param scopingConfigurationName The scoping configuration of the specific report. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 AppComplianceAutomation report and its properties. + * @return the AppComplianceAutomation scoping configuration of the specific report. */ - ReportResource get(String reportName); + ScopingConfigurationResource get(String reportName, String scopingConfigurationName); /** - * Create a new AppComplianceAutomation report or update an exiting AppComplianceAutomation report. - * + * Get the AppComplianceAutomation scoping configuration of the specific report. + * * @param reportName Report Name. - * @param parameters Parameters for the create or update operation. + * @param scopingConfigurationName The scoping configuration of the specific report. + * @param parameters Parameters for the create or update operation, this is a singleton resource, so please make + * sure you're using 'default' as the 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 class represent an AppComplianceAutomation report resource. + * @return the AppComplianceAutomation scoping configuration of the specific report along with {@link Response}. */ - ReportResource createOrUpdate(String reportName, ReportResourceInner parameters); + Response createOrUpdateWithResponse(String reportName, + String scopingConfigurationName, ScopingConfigurationResourceInner parameters, Context context); /** - * Create a new AppComplianceAutomation report or update an exiting AppComplianceAutomation report. - * + * Get the AppComplianceAutomation scoping configuration of the specific report. + * * @param reportName Report Name. - * @param parameters Parameters for the create or update operation. - * @param context The context to associate with this operation. + * @param scopingConfigurationName The scoping configuration of the specific report. + * @param parameters Parameters for the create or update operation, this is a singleton resource, so please make + * sure you're using 'default' as the 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 class represent an AppComplianceAutomation report resource. + * @return the AppComplianceAutomation scoping configuration of the specific report. */ - ReportResource createOrUpdate(String reportName, ReportResourceInner parameters, Context context); + ScopingConfigurationResource createOrUpdate(String reportName, String scopingConfigurationName, + ScopingConfigurationResourceInner parameters); /** - * Update an exiting AppComplianceAutomation report. - * + * Clean the AppComplianceAutomation scoping configuration of the specific report. + * * @param reportName Report Name. - * @param parameters Parameters for the create or update operation. + * @param scopingConfigurationName The scoping configuration of the specific report. + * @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 class represent an AppComplianceAutomation report resource. + * @return the {@link Response}. */ - ReportResource update(String reportName, ReportResourcePatch parameters); + Response deleteByResourceGroupWithResponse(String reportName, String scopingConfigurationName, + Context context); /** - * Update an exiting AppComplianceAutomation report. - * + * Clean the AppComplianceAutomation scoping configuration of the specific report. + * * @param reportName Report Name. - * @param parameters Parameters for the create or update operation. - * @param context The context to associate with this operation. + * @param scopingConfigurationName The scoping configuration of the specific report. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a class represent an AppComplianceAutomation report resource. */ - ReportResource update(String reportName, ReportResourcePatch parameters, Context context); + void deleteByResourceGroup(String reportName, String scopingConfigurationName); /** - * Delete an AppComplianceAutomation report. - * + * Returns a list format of the singleton scopingConfiguration for a specified report. + * * @param reportName Report 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 response of a ScopingConfigurationResource list operation as paginated response with + * {@link PagedIterable}. */ - void delete(String reportName); + PagedIterable listByReportResource(String reportName); /** - * Delete an AppComplianceAutomation report. - * + * Returns a list format of the singleton scopingConfiguration for a specified report. + * * @param reportName Report 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 response of a ScopingConfigurationResource list operation as paginated response with + * {@link PagedIterable}. */ - void delete(String reportName, Context context); + PagedIterable listByReportResource(String reportName, Context context); } diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ScopingQuestion.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ScopingQuestion.java new file mode 100644 index 0000000000000..2a57613631cb8 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ScopingQuestion.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The definition of a scoping question. + */ +@Immutable +public final class ScopingQuestion { + /* + * Question id. + */ + @JsonProperty(value = "questionId", required = true, access = JsonProperty.Access.WRITE_ONLY) + private String questionId; + + /* + * Superior question id. + */ + @JsonProperty(value = "superiorQuestionId", access = JsonProperty.Access.WRITE_ONLY) + private String superiorQuestionId; + + /* + * Input type of the question answer. + */ + @JsonProperty(value = "inputType", required = true, access = JsonProperty.Access.WRITE_ONLY) + private InputType inputType; + + /* + * Option id list. + */ + @JsonProperty(value = "optionIds", required = true, access = JsonProperty.Access.WRITE_ONLY) + private List optionIds; + + /* + * The rule of the question. + */ + @JsonProperty(value = "rules", required = true, access = JsonProperty.Access.WRITE_ONLY) + private List rules; + + /* + * The answer value to show the sub questions. + */ + @JsonProperty(value = "showSubQuestionsValue", access = JsonProperty.Access.WRITE_ONLY) + private String showSubQuestionsValue; + + /** + * Creates an instance of ScopingQuestion class. + */ + private ScopingQuestion() { + } + + /** + * Get the questionId property: Question id. + * + * @return the questionId value. + */ + public String questionId() { + return this.questionId; + } + + /** + * Get the superiorQuestionId property: Superior question id. + * + * @return the superiorQuestionId value. + */ + public String superiorQuestionId() { + return this.superiorQuestionId; + } + + /** + * Get the inputType property: Input type of the question answer. + * + * @return the inputType value. + */ + public InputType inputType() { + return this.inputType; + } + + /** + * Get the optionIds property: Option id list. + * + * @return the optionIds value. + */ + public List optionIds() { + return this.optionIds; + } + + /** + * Get the rules property: The rule of the question. + * + * @return the rules value. + */ + public List rules() { + return this.rules; + } + + /** + * Get the showSubQuestionsValue property: The answer value to show the sub questions. + * + * @return the showSubQuestionsValue value. + */ + public String showSubQuestionsValue() { + return this.showSubQuestionsValue; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ScopingQuestions.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ScopingQuestions.java new file mode 100644 index 0000000000000..d3f17ca637da0 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/ScopingQuestions.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.ScopingQuestionsInner; +import java.util.List; + +/** + * An immutable client-side representation of ScopingQuestions. + */ +public interface ScopingQuestions { + /** + * Gets the questions property: List of scoping questions. + * + * @return the questions value. + */ + List questions(); + + /** + * Gets the inner com.azure.resourcemanager.appcomplianceautomation.fluent.models.ScopingQuestionsInner object. + * + * @return the inner object. + */ + ScopingQuestionsInner innerModel(); +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/SendAllEvents.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/SendAllEvents.java new file mode 100644 index 0000000000000..6f064ace9b921 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/SendAllEvents.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * whether to send notification under any event. + */ +public final class SendAllEvents extends ExpandableStringEnum { + /** + * Static value true for SendAllEvents. + */ + public static final SendAllEvents TRUE = fromString("true"); + + /** + * Static value false for SendAllEvents. + */ + public static final SendAllEvents FALSE = fromString("false"); + + /** + * Creates a new instance of SendAllEvents value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SendAllEvents() { + } + + /** + * Creates or finds a SendAllEvents from its string representation. + * + * @param name a name to look for. + * @return the corresponding SendAllEvents. + */ + @JsonCreator + public static SendAllEvents fromString(String name) { + return fromString(name, SendAllEvents.class); + } + + /** + * Gets known SendAllEvents values. + * + * @return known SendAllEvents values. + */ + public static Collection values() { + return values(SendAllEvents.class); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/SnapshotDownloadRequest.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/SnapshotDownloadRequest.java index 4bc2b85640093..0da2f8be46222 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/SnapshotDownloadRequest.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/SnapshotDownloadRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.models; @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** Snapshot's download request. */ +/** + * Snapshot's download request. + */ @Fluent public final class SnapshotDownloadRequest { /* @@ -29,13 +31,15 @@ public final class SnapshotDownloadRequest { @JsonProperty(value = "offerGuid") private String offerGuid; - /** Creates an instance of SnapshotDownloadRequest class. */ + /** + * Creates an instance of SnapshotDownloadRequest class. + */ public SnapshotDownloadRequest() { } /** * Get the reportCreatorTenantId property: Tenant id. - * + * * @return the reportCreatorTenantId value. */ public String reportCreatorTenantId() { @@ -44,7 +48,7 @@ public String reportCreatorTenantId() { /** * Set the reportCreatorTenantId property: Tenant id. - * + * * @param reportCreatorTenantId the reportCreatorTenantId value to set. * @return the SnapshotDownloadRequest object itself. */ @@ -55,7 +59,7 @@ public SnapshotDownloadRequest withReportCreatorTenantId(String reportCreatorTen /** * Get the downloadType property: Indicates the download type. - * + * * @return the downloadType value. */ public DownloadType downloadType() { @@ -64,7 +68,7 @@ public DownloadType downloadType() { /** * Set the downloadType property: Indicates the download type. - * + * * @param downloadType the downloadType value to set. * @return the SnapshotDownloadRequest object itself. */ @@ -75,7 +79,7 @@ public SnapshotDownloadRequest withDownloadType(DownloadType downloadType) { /** * Get the offerGuid property: The offerGuid which mapping to the reports. - * + * * @return the offerGuid value. */ public String offerGuid() { @@ -84,7 +88,7 @@ public String offerGuid() { /** * Set the offerGuid property: The offerGuid which mapping to the reports. - * + * * @param offerGuid the offerGuid value to set. * @return the SnapshotDownloadRequest object itself. */ @@ -95,15 +99,14 @@ public SnapshotDownloadRequest withOfferGuid(String offerGuid) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (downloadType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property downloadType in model SnapshotDownloadRequest")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property downloadType in model SnapshotDownloadRequest")); } } diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/SnapshotOperations.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/SnapshotOperations.java deleted file mode 100644 index e4273c5ca1f58..0000000000000 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/SnapshotOperations.java +++ /dev/null @@ -1,64 +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.appcomplianceautomation.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of SnapshotOperations. */ -public interface SnapshotOperations { - /** - * Get the AppComplianceAutomation snapshot and its properties. - * - * @param reportName Report Name. - * @param snapshotName Snapshot 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 AppComplianceAutomation snapshot and its properties along with {@link Response}. - */ - Response getWithResponse(String reportName, String snapshotName, Context context); - - /** - * Get the AppComplianceAutomation snapshot and its properties. - * - * @param reportName Report Name. - * @param snapshotName Snapshot 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 AppComplianceAutomation snapshot and its properties. - */ - SnapshotResource get(String reportName, String snapshotName); - - /** - * Download compliance needs from snapshot, like: Compliance Report, Resource List. - * - * @param reportName Report Name. - * @param snapshotName Snapshot Name. - * @param parameters Parameters for the query 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 object that includes all the possible response for the download operation. - */ - DownloadResponse download(String reportName, String snapshotName, SnapshotDownloadRequest parameters); - - /** - * Download compliance needs from snapshot, like: Compliance Report, Resource List. - * - * @param reportName Report Name. - * @param snapshotName Snapshot Name. - * @param parameters Parameters for the query operation. - * @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 object that includes all the possible response for the download operation. - */ - DownloadResponse download( - String reportName, String snapshotName, SnapshotDownloadRequest parameters, Context context); -} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/SnapshotProperties.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/SnapshotProperties.java index 12ef90535e13e..ea5f8423a5426 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/SnapshotProperties.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/SnapshotProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.models; @@ -10,15 +10,11 @@ import java.time.OffsetDateTime; import java.util.List; -/** Snapshot's properties. */ +/** + * Snapshot's properties. + */ @Immutable public final class SnapshotProperties { - /* - * Snapshot id in the database. - */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; - /* * Snapshot name. */ @@ -55,22 +51,15 @@ public final class SnapshotProperties { @JsonProperty(value = "complianceResults", access = JsonProperty.Access.WRITE_ONLY) private List complianceResults; - /** Creates an instance of SnapshotProperties class. */ - public SnapshotProperties() { - } - /** - * Get the id property: Snapshot id in the database. - * - * @return the id value. + * Creates an instance of SnapshotProperties class. */ - public String id() { - return this.id; + private SnapshotProperties() { } /** * Get the snapshotName property: Snapshot name. - * + * * @return the snapshotName value. */ public String snapshotName() { @@ -79,7 +68,7 @@ public String snapshotName() { /** * Get the createdAt property: The timestamp of resource creation (UTC). - * + * * @return the createdAt value. */ public OffsetDateTime createdAt() { @@ -88,7 +77,7 @@ public OffsetDateTime createdAt() { /** * Get the provisioningState property: Azure lifecycle management. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -97,7 +86,7 @@ public ProvisioningState provisioningState() { /** * Get the reportProperties property: The report essential info. - * + * * @return the reportProperties value. */ public ReportProperties reportProperties() { @@ -106,7 +95,7 @@ public ReportProperties reportProperties() { /** * Get the reportSystemData property: Metadata pertaining to creation and last modification of the resource. - * + * * @return the reportSystemData value. */ public SystemData reportSystemData() { @@ -115,7 +104,7 @@ public SystemData reportSystemData() { /** * Get the complianceResults property: List of compliance results. - * + * * @return the complianceResults value. */ public List complianceResults() { @@ -124,7 +113,7 @@ public List complianceResults() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/SnapshotResource.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/SnapshotResource.java index b30e5585fde06..2b2c297c0f288 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/SnapshotResource.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/SnapshotResource.java @@ -1,52 +1,54 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.models; import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcomplianceautomation.fluent.models.SnapshotResourceInner; -/** An immutable client-side representation of SnapshotResource. */ +/** + * An immutable client-side representation of SnapshotResource. + */ public interface SnapshotResource { /** * 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: Snapshot's property'. - * + * Gets the properties property: Snapshot's property. + * * @return the properties value. */ SnapshotProperties properties(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the inner com.azure.resourcemanager.appcomplianceautomation.fluent.models.SnapshotResourceInner object. - * + * * @return the inner object. */ SnapshotResourceInner innerModel(); diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/SnapshotResourceList.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/SnapshotResourceList.java deleted file mode 100644 index 53f46c172b666..0000000000000 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/SnapshotResourceList.java +++ /dev/null @@ -1,73 +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.appcomplianceautomation.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.appcomplianceautomation.fluent.models.SnapshotResourceInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Object that includes an array of resources and a possible link for next set. */ -@Fluent -public final class SnapshotResourceList { - /* - * List of the snapshots - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * The URL the client should use to fetch the next page (per server side paging). - * It's null for now, added for future use. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** Creates an instance of SnapshotResourceList class. */ - public SnapshotResourceList() { - } - - /** - * Get the value property: List of the snapshots. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The URL the client should use to fetch the next page (per server side paging). It's - * null for now, added for future use. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The URL the client should use to fetch the next page (per server side paging). It's - * null for now, added for future use. - * - * @param nextLink the nextLink value to set. - * @return the SnapshotResourceList object itself. - */ - public SnapshotResourceList 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/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Snapshots.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Snapshots.java index 6c887f3d1606d..c8044c4aae019 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Snapshots.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Snapshots.java @@ -1,47 +1,99 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.models; import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.exception.ManagementError; import com.azure.core.util.Context; -/** Resource collection API of Snapshots. */ +/** + * Resource collection API of Snapshots. + */ public interface Snapshots { + /** + * Get the AppComplianceAutomation snapshot and its properties. + * + * @param reportName Report Name. + * @param snapshotName Snapshot 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 AppComplianceAutomation snapshot and its properties along with {@link Response}. + */ + Response getWithResponse(String reportName, String snapshotName, Context context); + + /** + * Get the AppComplianceAutomation snapshot and its properties. + * + * @param reportName Report Name. + * @param snapshotName Snapshot 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 AppComplianceAutomation snapshot and its properties. + */ + SnapshotResource get(String reportName, String snapshotName); + /** * Get the AppComplianceAutomation snapshot list. - * + * * @param reportName Report 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 AppComplianceAutomation snapshot list as paginated response with {@link PagedIterable}. */ - PagedIterable list(String reportName); + PagedIterable listByReportResource(String reportName); /** * Get the AppComplianceAutomation snapshot list. - * + * * @param reportName Report Name. * @param skipToken Skip over when retrieving results. * @param top Number of elements to return when retrieving results. * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. - * ?$select=reportName,id. - * @param reportCreatorTenantId The tenant id of the report creator. + * ?$select=reportName,id. + * @param filter The filter to apply on the operation. + * @param orderby OData order by query option. * @param offerGuid The offerGuid which mapping to the reports. + * @param reportCreatorTenantId The tenant id of the report creator. * @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 AppComplianceAutomation snapshot list as paginated response with {@link PagedIterable}. */ - PagedIterable list( - String reportName, - String skipToken, - Integer top, - String select, - String reportCreatorTenantId, - String offerGuid, - Context context); + PagedIterable listByReportResource(String reportName, String skipToken, Integer top, + String select, String filter, String orderby, String offerGuid, String reportCreatorTenantId, Context context); + + /** + * Download compliance needs from snapshot, like: Compliance Report, Resource List. + * + * @param reportName Report Name. + * @param snapshotName Snapshot Name. + * @param body Parameters for the query 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 response. + */ + ManagementError download(String reportName, String snapshotName, SnapshotDownloadRequest body); + + /** + * Download compliance needs from snapshot, like: Compliance Report, Resource List. + * + * @param reportName Report Name. + * @param snapshotName Snapshot Name. + * @param body Parameters for the query operation. + * @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 response. + */ + ManagementError download(String reportName, String snapshotName, SnapshotDownloadRequest body, Context context); } diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/StatusItem.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/StatusItem.java new file mode 100644 index 0000000000000..6706fc8124f24 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/StatusItem.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Single status. + */ +@Immutable +public final class StatusItem { + /* + * Status name - e.g. "Active", "Failed". + */ + @JsonProperty(value = "statusName") + private String statusName; + + /* + * Status value. e.g. "100", or "100%". + */ + @JsonProperty(value = "statusValue") + private String statusValue; + + /** + * Creates an instance of StatusItem class. + */ + private StatusItem() { + } + + /** + * Get the statusName property: Status name - e.g. "Active", "Failed". + * + * @return the statusName value. + */ + public String statusName() { + return this.statusName; + } + + /** + * Get the statusValue property: Status value. e.g. "100", or "100%". + * + * @return the statusValue value. + */ + public String statusValue() { + return this.statusValue; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/StorageInfo.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/StorageInfo.java new file mode 100644 index 0000000000000..88e43d37357a0 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/StorageInfo.java @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The information of 'bring your own storage' account binding to the report. + */ +@Fluent +public final class StorageInfo { + /* + * The subscription id which 'bring your own storage' account belongs to + */ + @JsonProperty(value = "subscriptionId") + private String subscriptionId; + + /* + * The resourceGroup which 'bring your own storage' account belongs to + */ + @JsonProperty(value = "resourceGroup") + private String resourceGroup; + + /* + * 'bring your own storage' account name + */ + @JsonProperty(value = "accountName") + private String accountName; + + /* + * The region of 'bring your own storage' account + */ + @JsonProperty(value = "location") + private String location; + + /** + * Creates an instance of StorageInfo class. + */ + public StorageInfo() { + } + + /** + * Get the subscriptionId property: The subscription id which 'bring your own storage' account belongs to. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Set the subscriptionId property: The subscription id which 'bring your own storage' account belongs to. + * + * @param subscriptionId the subscriptionId value to set. + * @return the StorageInfo object itself. + */ + public StorageInfo withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** + * Get the resourceGroup property: The resourceGroup which 'bring your own storage' account belongs to. + * + * @return the resourceGroup value. + */ + public String resourceGroup() { + return this.resourceGroup; + } + + /** + * Set the resourceGroup property: The resourceGroup which 'bring your own storage' account belongs to. + * + * @param resourceGroup the resourceGroup value to set. + * @return the StorageInfo object itself. + */ + public StorageInfo withResourceGroup(String resourceGroup) { + this.resourceGroup = resourceGroup; + return this; + } + + /** + * Get the accountName property: 'bring your own storage' account name. + * + * @return the accountName value. + */ + public String accountName() { + return this.accountName; + } + + /** + * Set the accountName property: 'bring your own storage' account name. + * + * @param accountName the accountName value to set. + * @return the StorageInfo object itself. + */ + public StorageInfo withAccountName(String accountName) { + this.accountName = accountName; + return this; + } + + /** + * Get the location property: The region of 'bring your own storage' account. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The region of 'bring your own storage' account. + * + * @param location the location value to set. + * @return the StorageInfo object itself. + */ + public StorageInfo withLocation(String location) { + this.location = location; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/SyncCertRecordRequest.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/SyncCertRecordRequest.java new file mode 100644 index 0000000000000..68dbfcd35ed61 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/SyncCertRecordRequest.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Synchronize certification record request. + */ +@Fluent +public final class SyncCertRecordRequest { + /* + * certification record to be synchronized. + */ + @JsonProperty(value = "certRecord", required = true) + private CertSyncRecord certRecord; + + /** + * Creates an instance of SyncCertRecordRequest class. + */ + public SyncCertRecordRequest() { + } + + /** + * Get the certRecord property: certification record to be synchronized. + * + * @return the certRecord value. + */ + public CertSyncRecord certRecord() { + return this.certRecord; + } + + /** + * Set the certRecord property: certification record to be synchronized. + * + * @param certRecord the certRecord value to set. + * @return the SyncCertRecordRequest object itself. + */ + public SyncCertRecordRequest withCertRecord(CertSyncRecord certRecord) { + this.certRecord = certRecord; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (certRecord() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property certRecord in model SyncCertRecordRequest")); + } else { + certRecord().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SyncCertRecordRequest.class); +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/TriggerEvaluationRequest.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/TriggerEvaluationRequest.java new file mode 100644 index 0000000000000..e3f27347c3a15 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/TriggerEvaluationRequest.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Trigger evaluation request. + */ +@Fluent +public final class TriggerEvaluationRequest { + /* + * List of resource ids to be evaluated + */ + @JsonProperty(value = "resourceIds", required = true) + private List resourceIds; + + /** + * Creates an instance of TriggerEvaluationRequest class. + */ + public TriggerEvaluationRequest() { + } + + /** + * Get the resourceIds property: List of resource ids to be evaluated. + * + * @return the resourceIds value. + */ + public List resourceIds() { + return this.resourceIds; + } + + /** + * Set the resourceIds property: List of resource ids to be evaluated. + * + * @param resourceIds the resourceIds value to set. + * @return the TriggerEvaluationRequest object itself. + */ + public TriggerEvaluationRequest withResourceIds(List resourceIds) { + this.resourceIds = resourceIds; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (resourceIds() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property resourceIds in model TriggerEvaluationRequest")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(TriggerEvaluationRequest.class); +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/UpdateWebhookKey.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/UpdateWebhookKey.java new file mode 100644 index 0000000000000..1feab773e395e --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/UpdateWebhookKey.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * whether to update webhookKey. + */ +public final class UpdateWebhookKey extends ExpandableStringEnum { + /** + * Static value true for UpdateWebhookKey. + */ + public static final UpdateWebhookKey TRUE = fromString("true"); + + /** + * Static value false for UpdateWebhookKey. + */ + public static final UpdateWebhookKey FALSE = fromString("false"); + + /** + * Creates a new instance of UpdateWebhookKey value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public UpdateWebhookKey() { + } + + /** + * Creates or finds a UpdateWebhookKey from its string representation. + * + * @param name a name to look for. + * @return the corresponding UpdateWebhookKey. + */ + @JsonCreator + public static UpdateWebhookKey fromString(String name) { + return fromString(name, UpdateWebhookKey.class); + } + + /** + * Gets known UpdateWebhookKey values. + * + * @return known UpdateWebhookKey values. + */ + public static Collection values() { + return values(UpdateWebhookKey.class); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/WebhookKeyEnabled.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/WebhookKeyEnabled.java new file mode 100644 index 0000000000000..58d7d9888101b --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/WebhookKeyEnabled.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * whether webhookKey is enabled. + */ +public final class WebhookKeyEnabled extends ExpandableStringEnum { + /** + * Static value true for WebhookKeyEnabled. + */ + public static final WebhookKeyEnabled TRUE = fromString("true"); + + /** + * Static value false for WebhookKeyEnabled. + */ + public static final WebhookKeyEnabled FALSE = fromString("false"); + + /** + * Creates a new instance of WebhookKeyEnabled value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public WebhookKeyEnabled() { + } + + /** + * Creates or finds a WebhookKeyEnabled from its string representation. + * + * @param name a name to look for. + * @return the corresponding WebhookKeyEnabled. + */ + @JsonCreator + public static WebhookKeyEnabled fromString(String name) { + return fromString(name, WebhookKeyEnabled.class); + } + + /** + * Gets known WebhookKeyEnabled values. + * + * @return known WebhookKeyEnabled values. + */ + public static Collection values() { + return values(WebhookKeyEnabled.class); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/WebhookProperties.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/WebhookProperties.java new file mode 100644 index 0000000000000..20cf03546ed65 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/WebhookProperties.java @@ -0,0 +1,314 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Webhook properties. + */ +@Fluent +public final class WebhookProperties { + /* + * Webhook id in database. + */ + @JsonProperty(value = "webhookId", access = JsonProperty.Access.WRITE_ONLY) + private String webhookId; + + /* + * Webhook status. + */ + @JsonProperty(value = "status") + private WebhookStatus status; + + /* + * Tenant id. + */ + @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) + private String tenantId; + + /* + * whether to send notification under any event. + */ + @JsonProperty(value = "sendAllEvents") + private SendAllEvents sendAllEvents; + + /* + * under which event notification should be sent. + */ + @JsonProperty(value = "events") + private List events; + + /* + * webhook payload url + */ + @JsonProperty(value = "payloadUrl") + private String payloadUrl; + + /* + * content type + */ + @JsonProperty(value = "contentType") + private ContentType contentType; + + /* + * webhook secret token. If not set, this field value is null; otherwise, please set a string value. + */ + @JsonProperty(value = "webhookKey") + private String webhookKey; + + /* + * whether to update webhookKey. + */ + @JsonProperty(value = "updateWebhookKey") + private UpdateWebhookKey updateWebhookKey; + + /* + * whether webhookKey is enabled. + */ + @JsonProperty(value = "webhookKeyEnabled", access = JsonProperty.Access.WRITE_ONLY) + private WebhookKeyEnabled webhookKeyEnabled; + + /* + * whether to enable ssl verification + */ + @JsonProperty(value = "enableSslVerification") + private EnableSslVerification enableSslVerification; + + /* + * webhook deliveryStatus + */ + @JsonProperty(value = "deliveryStatus", access = JsonProperty.Access.WRITE_ONLY) + private DeliveryStatus deliveryStatus; + + /* + * Azure Resource Provisioning State + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Creates an instance of WebhookProperties class. + */ + public WebhookProperties() { + } + + /** + * Get the webhookId property: Webhook id in database. + * + * @return the webhookId value. + */ + public String webhookId() { + return this.webhookId; + } + + /** + * Get the status property: Webhook status. + * + * @return the status value. + */ + public WebhookStatus status() { + return this.status; + } + + /** + * Set the status property: Webhook status. + * + * @param status the status value to set. + * @return the WebhookProperties object itself. + */ + public WebhookProperties withStatus(WebhookStatus status) { + this.status = status; + return this; + } + + /** + * Get the tenantId property: Tenant id. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Get the sendAllEvents property: whether to send notification under any event. + * + * @return the sendAllEvents value. + */ + public SendAllEvents sendAllEvents() { + return this.sendAllEvents; + } + + /** + * Set the sendAllEvents property: whether to send notification under any event. + * + * @param sendAllEvents the sendAllEvents value to set. + * @return the WebhookProperties object itself. + */ + public WebhookProperties withSendAllEvents(SendAllEvents sendAllEvents) { + this.sendAllEvents = sendAllEvents; + return this; + } + + /** + * Get the events property: under which event notification should be sent. + * + * @return the events value. + */ + public List events() { + return this.events; + } + + /** + * Set the events property: under which event notification should be sent. + * + * @param events the events value to set. + * @return the WebhookProperties object itself. + */ + public WebhookProperties withEvents(List events) { + this.events = events; + return this; + } + + /** + * Get the payloadUrl property: webhook payload url. + * + * @return the payloadUrl value. + */ + public String payloadUrl() { + return this.payloadUrl; + } + + /** + * Set the payloadUrl property: webhook payload url. + * + * @param payloadUrl the payloadUrl value to set. + * @return the WebhookProperties object itself. + */ + public WebhookProperties withPayloadUrl(String payloadUrl) { + this.payloadUrl = payloadUrl; + return this; + } + + /** + * Get the contentType property: content type. + * + * @return the contentType value. + */ + public ContentType contentType() { + return this.contentType; + } + + /** + * Set the contentType property: content type. + * + * @param contentType the contentType value to set. + * @return the WebhookProperties object itself. + */ + public WebhookProperties withContentType(ContentType contentType) { + this.contentType = contentType; + return this; + } + + /** + * Get the webhookKey property: webhook secret token. If not set, this field value is null; otherwise, please set a + * string value. + * + * @return the webhookKey value. + */ + public String webhookKey() { + return this.webhookKey; + } + + /** + * Set the webhookKey property: webhook secret token. If not set, this field value is null; otherwise, please set a + * string value. + * + * @param webhookKey the webhookKey value to set. + * @return the WebhookProperties object itself. + */ + public WebhookProperties withWebhookKey(String webhookKey) { + this.webhookKey = webhookKey; + return this; + } + + /** + * Get the updateWebhookKey property: whether to update webhookKey. + * + * @return the updateWebhookKey value. + */ + public UpdateWebhookKey updateWebhookKey() { + return this.updateWebhookKey; + } + + /** + * Set the updateWebhookKey property: whether to update webhookKey. + * + * @param updateWebhookKey the updateWebhookKey value to set. + * @return the WebhookProperties object itself. + */ + public WebhookProperties withUpdateWebhookKey(UpdateWebhookKey updateWebhookKey) { + this.updateWebhookKey = updateWebhookKey; + return this; + } + + /** + * Get the webhookKeyEnabled property: whether webhookKey is enabled. + * + * @return the webhookKeyEnabled value. + */ + public WebhookKeyEnabled webhookKeyEnabled() { + return this.webhookKeyEnabled; + } + + /** + * Get the enableSslVerification property: whether to enable ssl verification. + * + * @return the enableSslVerification value. + */ + public EnableSslVerification enableSslVerification() { + return this.enableSslVerification; + } + + /** + * Set the enableSslVerification property: whether to enable ssl verification. + * + * @param enableSslVerification the enableSslVerification value to set. + * @return the WebhookProperties object itself. + */ + public WebhookProperties withEnableSslVerification(EnableSslVerification enableSslVerification) { + this.enableSslVerification = enableSslVerification; + return this; + } + + /** + * Get the deliveryStatus property: webhook deliveryStatus. + * + * @return the deliveryStatus value. + */ + public DeliveryStatus deliveryStatus() { + return this.deliveryStatus; + } + + /** + * Get the provisioningState property: Azure Resource Provisioning State. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/WebhookResource.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/WebhookResource.java new file mode 100644 index 0000000000000..ab50fe67d1cbd --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/WebhookResource.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.WebhookResourceInner; + +/** + * An immutable client-side representation of WebhookResource. + */ +public interface WebhookResource { + /** + * 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: Webhook property. + * + * @return the properties value. + */ + WebhookProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.appcomplianceautomation.fluent.models.WebhookResourceInner object. + * + * @return the inner object. + */ + WebhookResourceInner innerModel(); +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/WebhookResourcePatch.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/WebhookResourcePatch.java new file mode 100644 index 0000000000000..bc2a050fde125 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/WebhookResourcePatch.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A class represent a AppComplianceAutomation webhook resource update properties. + */ +@Fluent +public final class WebhookResourcePatch { + /* + * Webhook property. + */ + @JsonProperty(value = "properties") + private WebhookProperties properties; + + /** + * Creates an instance of WebhookResourcePatch class. + */ + public WebhookResourcePatch() { + } + + /** + * Get the properties property: Webhook property. + * + * @return the properties value. + */ + public WebhookProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Webhook property. + * + * @param properties the properties value to set. + * @return the WebhookResourcePatch object itself. + */ + public WebhookResourcePatch withProperties(WebhookProperties 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/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/WebhookStatus.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/WebhookStatus.java new file mode 100644 index 0000000000000..6677f61d38eec --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/WebhookStatus.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Webhook status. + */ +public final class WebhookStatus extends ExpandableStringEnum { + /** + * Static value Enabled for WebhookStatus. + */ + public static final WebhookStatus ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for WebhookStatus. + */ + public static final WebhookStatus DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of WebhookStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public WebhookStatus() { + } + + /** + * Creates or finds a WebhookStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding WebhookStatus. + */ + @JsonCreator + public static WebhookStatus fromString(String name) { + return fromString(name, WebhookStatus.class); + } + + /** + * Gets known WebhookStatus values. + * + * @return known WebhookStatus values. + */ + public static Collection values() { + return values(WebhookStatus.class); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Webhooks.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Webhooks.java new file mode 100644 index 0000000000000..34b47608430fb --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/Webhooks.java @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.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.appcomplianceautomation.fluent.models.WebhookResourceInner; + +/** + * Resource collection API of Webhooks. + */ +public interface Webhooks { + /** + * Get the AppComplianceAutomation webhook and its properties. + * + * @param reportName Report Name. + * @param webhookName Webhook 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 AppComplianceAutomation webhook and its properties along with {@link Response}. + */ + Response getWithResponse(String reportName, String webhookName, Context context); + + /** + * Get the AppComplianceAutomation webhook and its properties. + * + * @param reportName Report Name. + * @param webhookName Webhook 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 AppComplianceAutomation webhook and its properties. + */ + WebhookResource get(String reportName, String webhookName); + + /** + * Create a new AppComplianceAutomation webhook or update an exiting AppComplianceAutomation webhook. + * + * @param reportName Report Name. + * @param webhookName Webhook Name. + * @param parameters Parameters for the create or update operation. + * @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 class represent an AppComplianceAutomation webhook resource along with {@link Response}. + */ + Response createOrUpdateWithResponse(String reportName, String webhookName, + WebhookResourceInner parameters, Context context); + + /** + * Create a new AppComplianceAutomation webhook or update an exiting AppComplianceAutomation webhook. + * + * @param reportName Report Name. + * @param webhookName Webhook Name. + * @param parameters Parameters for the create or update 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 class represent an AppComplianceAutomation webhook resource. + */ + WebhookResource createOrUpdate(String reportName, String webhookName, WebhookResourceInner parameters); + + /** + * Update an exiting AppComplianceAutomation webhook. + * + * @param reportName Report Name. + * @param webhookName Webhook Name. + * @param properties Parameters for the create or update operation. + * @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 class represent an AppComplianceAutomation webhook resource along with {@link Response}. + */ + Response updateWithResponse(String reportName, String webhookName, WebhookResourcePatch properties, + Context context); + + /** + * Update an exiting AppComplianceAutomation webhook. + * + * @param reportName Report Name. + * @param webhookName Webhook Name. + * @param properties Parameters for the create or update 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 class represent an AppComplianceAutomation webhook resource. + */ + WebhookResource update(String reportName, String webhookName, WebhookResourcePatch properties); + + /** + * Delete an AppComplianceAutomation webhook. + * + * @param reportName Report Name. + * @param webhookName Webhook 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 deleteByResourceGroupWithResponse(String reportName, String webhookName, Context context); + + /** + * Delete an AppComplianceAutomation webhook. + * + * @param reportName Report Name. + * @param webhookName Webhook 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 reportName, String webhookName); + + /** + * Get the AppComplianceAutomation webhook list. + * + * @param reportName Report 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 AppComplianceAutomation webhook list as paginated response with {@link PagedIterable}. + */ + PagedIterable listByReportResource(String reportName); + + /** + * Get the AppComplianceAutomation webhook list. + * + * @param reportName Report Name. + * @param skipToken Skip over when retrieving results. + * @param top Number of elements to return when retrieving results. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. + * ?$select=reportName,id. + * @param filter The filter to apply on the operation. + * @param orderby OData order by query option. + * @param offerGuid The offerGuid which mapping to the reports. + * @param reportCreatorTenantId The tenant id of the report creator. + * @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 AppComplianceAutomation webhook list as paginated response with {@link PagedIterable}. + */ + PagedIterable listByReportResource(String reportName, String skipToken, Integer top, String select, + String filter, String orderby, String offerGuid, String reportCreatorTenantId, Context context); +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/package-info.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/package-info.java index 937cc350cde4f..d2332f8d8fd28 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/package-info.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/models/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the data models for AppComplianceAutomationToolForMicrosoft365. App Compliance Automation Tool for - * Microsoft 365 API spec. + * Package containing the data models for AppComplianceAutomation. + * App Compliance Automation Tool for Microsoft 365 API spec. */ package com.azure.resourcemanager.appcomplianceautomation.models; diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/package-info.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/package-info.java index 47126915caf7e..5a10f6d10aa3e 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/package-info.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/com/azure/resourcemanager/appcomplianceautomation/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the classes for AppComplianceAutomationToolForMicrosoft365. App Compliance Automation Tool for - * Microsoft 365 API spec. + * Package containing the classes for AppComplianceAutomation. + * App Compliance Automation Tool for Microsoft 365 API spec. */ package com.azure.resourcemanager.appcomplianceautomation; diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/module-info.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/module-info.java index 1d96563d5476b..6d690f0567b65 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/module-info.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/java/module-info.java @@ -1,19 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. module com.azure.resourcemanager.appcomplianceautomation { requires transitive com.azure.core.management; - exports com.azure.resourcemanager.appcomplianceautomation; exports com.azure.resourcemanager.appcomplianceautomation.fluent; exports com.azure.resourcemanager.appcomplianceautomation.fluent.models; exports com.azure.resourcemanager.appcomplianceautomation.models; - - opens com.azure.resourcemanager.appcomplianceautomation.fluent.models to - com.azure.core, - com.fasterxml.jackson.databind; - opens com.azure.resourcemanager.appcomplianceautomation.models to - com.azure.core, - com.fasterxml.jackson.databind; -} + opens com.azure.resourcemanager.appcomplianceautomation.fluent.models to com.azure.core, com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.appcomplianceautomation.models to com.azure.core, com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.appcomplianceautomation.implementation.models to com.azure.core, com.fasterxml.jackson.databind; +} \ No newline at end of file diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-appcomplianceautomation/proxy-config.json b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-appcomplianceautomation/proxy-config.json new file mode 100644 index 0000000000000..21dfa6c3f3bc6 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-appcomplianceautomation/proxy-config.json @@ -0,0 +1 @@ +[ [ "com.azure.resourcemanager.appcomplianceautomation.implementation.EvidencesClientImpl$EvidencesService" ], [ "com.azure.resourcemanager.appcomplianceautomation.implementation.OperationsClientImpl$OperationsService" ], [ "com.azure.resourcemanager.appcomplianceautomation.implementation.ProviderActionsClientImpl$ProviderActionsService" ], [ "com.azure.resourcemanager.appcomplianceautomation.implementation.ReportsClientImpl$ReportsService" ], [ "com.azure.resourcemanager.appcomplianceautomation.implementation.ScopingConfigurationsClientImpl$ScopingConfigurationsService" ], [ "com.azure.resourcemanager.appcomplianceautomation.implementation.SnapshotsClientImpl$SnapshotsService" ], [ "com.azure.resourcemanager.appcomplianceautomation.implementation.WebhooksClientImpl$WebhooksService" ] ] \ No newline at end of file diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-appcomplianceautomation/reflect-config.json b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-appcomplianceautomation/reflect-config.json new file mode 100644 index 0000000000000..2d5a99b87f50c --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-appcomplianceautomation/reflect-config.json @@ -0,0 +1,406 @@ +[ { + "name" : "com.azure.resourcemanager.appcomplianceautomation.fluent.models.CheckNameAvailabilityResponseInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.fluent.models.EvidenceFileDownloadResponseInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.fluent.models.EvidenceResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.fluent.models.GetCollectionCountResponseInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.fluent.models.GetOverviewStatusResponseInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.fluent.models.ListInUseStorageAccountsResponseInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.fluent.models.OperationInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.fluent.models.ReportResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.fluent.models.ScopingConfigurationResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.fluent.models.ScopingQuestionsInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.fluent.models.SnapshotResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.fluent.models.WebhookResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.implementation.models.EvidenceResourceListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.implementation.models.PagedOperation", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.implementation.models.ReportResourceListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.implementation.models.ScopingConfigurationResourceListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.implementation.models.SnapshotResourceListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.implementation.models.WebhookResourceListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.ActionType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.Category", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.CategoryStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.CertSyncRecord", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.CheckNameAvailabilityReason", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.CheckNameAvailabilityRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.ComplianceResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.ContentType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.Control", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.ControlFamily", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.ControlFamilyStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.ControlStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.ControlSyncRecord", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.DeliveryStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.DownloadType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.EnableSslVerification", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.EvidenceFileDownloadRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.EvidenceFileDownloadResponseEvidenceFile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.EvidenceProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.EvidenceType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.GetCollectionCountRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.GetOverviewStatusRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.InputType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.IsRecommendSolution", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.ListInUseStorageAccountsRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.NotificationEvent", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.OnboardRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.OperationDisplay", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.Origin", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.OverviewStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.ProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.Recommendation", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.RecommendationSolution", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.ReportComplianceStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.ReportPatchProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.ReportProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.ReportResourcePatch", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.ReportStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.ResourceMetadata", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.ResourceOrigin", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.ResourceStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.Responsibility", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.ResponsibilityEnvironment", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.ResponsibilityResource", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.ResponsibilitySeverity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.ResponsibilityStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.ResponsibilityType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.Rule", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.ScopingAnswer", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.ScopingConfigurationProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.ScopingQuestion", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.SendAllEvents", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.SnapshotDownloadRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.SnapshotProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.StatusItem", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.StorageInfo", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.SyncCertRecordRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.TriggerEvaluationRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.UpdateWebhookKey", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.WebhookKeyEnabled", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.WebhookProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.WebhookResourcePatch", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcomplianceautomation.models.WebhookStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +} ] \ No newline at end of file diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/CategoryTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/CategoryTests.java index 8cf7973ac07f8..b4239094d1ea6 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/CategoryTests.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/CategoryTests.java @@ -1,26 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.appcomplianceautomation.models.Category; -import org.junit.jupiter.api.Test; public final class CategoryTests { - @Test - public void testDeserialize() { - Category model = - BinaryData - .fromString( - "{\"categoryName\":\"tgrhpdjpjumas\",\"categoryType\":\"FullyAutomated\",\"categoryStatus\":\"Unhealthy\",\"controlFamilies\":[{\"familyName\":\"gual\",\"familyType\":\"FullyAutomated\",\"familyStatus\":\"Healthy\",\"controls\":[]}]}") - .toObject(Category.class); - } - - @Test - public void testSerialize() { - Category model = new Category(); - model = BinaryData.fromObject(model).toObject(Category.class); + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Category model = BinaryData.fromString( + "{\"categoryName\":\"ncblylpst\",\"categoryStatus\":\"Passed\",\"controlFamilies\":[{\"controlFamilyName\":\"rzdzucerscdnt\",\"controlFamilyStatus\":\"NotApplicable\",\"controls\":[{\"controlId\":\"jmygtdsslswtmwer\",\"controlName\":\"fzp\",\"controlFullName\":\"semwabnet\",\"controlDescription\":\"hszhedplvwiwu\",\"controlDescriptionHyperLink\":\"wmbesldnkw\",\"controlStatus\":\"Passed\",\"responsibilities\":[{},{}]},{\"controlId\":\"lcxog\",\"controlName\":\"konzmnsik\",\"controlFullName\":\"kqze\",\"controlDescription\":\"kdltfzxmhhvhg\",\"controlDescriptionHyperLink\":\"eodkwobda\",\"controlStatus\":\"NotApplicable\",\"responsibilities\":[{},{}]},{\"controlId\":\"dxbx\",\"controlName\":\"kbogqxndlkzgx\",\"controlFullName\":\"ripl\",\"controlDescription\":\"odxun\",\"controlDescriptionHyperLink\":\"ebxmubyynt\",\"controlStatus\":\"Failed\",\"responsibilities\":[{},{}]}]}]}") + .toObject(Category.class); } } diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/CertSyncRecordTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/CertSyncRecordTests.java new file mode 100644 index 0000000000000..ff40c8ef471e7 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/CertSyncRecordTests.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.appcomplianceautomation.models.CertSyncRecord; +import com.azure.resourcemanager.appcomplianceautomation.models.ControlSyncRecord; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class CertSyncRecordTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CertSyncRecord model = BinaryData.fromString( + "{\"offerGuid\":\"bybkzgcwrwclxx\",\"certificationStatus\":\"ljdousk\",\"ingestionStatus\":\"vkocrcjdkwtn\",\"controls\":[{\"controlId\":\"jbiksqrglssai\",\"controlStatus\":\"p\"},{\"controlId\":\"nzl\",\"controlStatus\":\"fmppe\"},{\"controlId\":\"vmgxsab\",\"controlStatus\":\"qduujitcjczdz\"},{\"controlId\":\"ndhkrw\",\"controlStatus\":\"appd\"}]}") + .toObject(CertSyncRecord.class); + Assertions.assertEquals("bybkzgcwrwclxx", model.offerGuid()); + Assertions.assertEquals("ljdousk", model.certificationStatus()); + Assertions.assertEquals("vkocrcjdkwtn", model.ingestionStatus()); + Assertions.assertEquals("jbiksqrglssai", model.controls().get(0).controlId()); + Assertions.assertEquals("p", model.controls().get(0).controlStatus()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CertSyncRecord model = new CertSyncRecord().withOfferGuid("bybkzgcwrwclxx") + .withCertificationStatus("ljdousk") + .withIngestionStatus("vkocrcjdkwtn") + .withControls(Arrays.asList(new ControlSyncRecord().withControlId("jbiksqrglssai").withControlStatus("p"), + new ControlSyncRecord().withControlId("nzl").withControlStatus("fmppe"), + new ControlSyncRecord().withControlId("vmgxsab").withControlStatus("qduujitcjczdz"), + new ControlSyncRecord().withControlId("ndhkrw").withControlStatus("appd"))); + model = BinaryData.fromObject(model).toObject(CertSyncRecord.class); + Assertions.assertEquals("bybkzgcwrwclxx", model.offerGuid()); + Assertions.assertEquals("ljdousk", model.certificationStatus()); + Assertions.assertEquals("vkocrcjdkwtn", model.ingestionStatus()); + Assertions.assertEquals("jbiksqrglssai", model.controls().get(0).controlId()); + Assertions.assertEquals("p", model.controls().get(0).controlStatus()); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/CheckNameAvailabilityRequestTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/CheckNameAvailabilityRequestTests.java new file mode 100644 index 0000000000000..419050a4e719e --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/CheckNameAvailabilityRequestTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.appcomplianceautomation.models.CheckNameAvailabilityRequest; +import org.junit.jupiter.api.Assertions; + +public final class CheckNameAvailabilityRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CheckNameAvailabilityRequest model + = BinaryData.fromString("{\"name\":\"debfqkkrbmpukgri\",\"type\":\"lzlfbxzpuz\"}") + .toObject(CheckNameAvailabilityRequest.class); + Assertions.assertEquals("debfqkkrbmpukgri", model.name()); + Assertions.assertEquals("lzlfbxzpuz", model.type()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CheckNameAvailabilityRequest model + = new CheckNameAvailabilityRequest().withName("debfqkkrbmpukgri").withType("lzlfbxzpuz"); + model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityRequest.class); + Assertions.assertEquals("debfqkkrbmpukgri", model.name()); + Assertions.assertEquals("lzlfbxzpuz", model.type()); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/CheckNameAvailabilityResponseInnerTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/CheckNameAvailabilityResponseInnerTests.java new file mode 100644 index 0000000000000..d6b5c7ebec3ad --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/CheckNameAvailabilityResponseInnerTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.CheckNameAvailabilityResponseInner; +import com.azure.resourcemanager.appcomplianceautomation.models.CheckNameAvailabilityReason; +import org.junit.jupiter.api.Assertions; + +public final class CheckNameAvailabilityResponseInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CheckNameAvailabilityResponseInner model + = BinaryData.fromString("{\"nameAvailable\":true,\"reason\":\"Invalid\",\"message\":\"qzahmgkbrp\"}") + .toObject(CheckNameAvailabilityResponseInner.class); + Assertions.assertEquals(true, model.nameAvailable()); + Assertions.assertEquals(CheckNameAvailabilityReason.INVALID, model.reason()); + Assertions.assertEquals("qzahmgkbrp", model.message()); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ComplianceResultTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ComplianceResultTests.java index c3d838622faa6..07e4e0ec10a13 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ComplianceResultTests.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ComplianceResultTests.java @@ -1,26 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.appcomplianceautomation.models.ComplianceResult; -import org.junit.jupiter.api.Test; public final class ComplianceResultTests { - @Test - public void testDeserialize() { - ComplianceResult model = - BinaryData - .fromString( - "{\"complianceName\":\"qwoochcbon\",\"categories\":[{\"categoryName\":\"vlrxnjeaseiph\",\"categoryType\":\"FullyAutomated\",\"categoryStatus\":\"Unhealthy\",\"controlFamilies\":[]},{\"categoryName\":\"y\",\"categoryType\":\"Manual\",\"categoryStatus\":\"Unhealthy\",\"controlFamilies\":[]}]}") - .toObject(ComplianceResult.class); - } - - @Test - public void testSerialize() { - ComplianceResult model = new ComplianceResult(); - model = BinaryData.fromObject(model).toObject(ComplianceResult.class); + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ComplianceResult model = BinaryData.fromString( + "{\"complianceName\":\"srfbjfdtwss\",\"categories\":[{\"categoryName\":\"pvjzbe\",\"categoryStatus\":\"Passed\",\"controlFamilies\":[{\"controlFamilyName\":\"fqqnvwpmqtaruo\",\"controlFamilyStatus\":\"PendingApproval\",\"controls\":[{},{}]},{\"controlFamilyName\":\"hwqytj\",\"controlFamilyStatus\":\"Passed\",\"controls\":[{}]},{\"controlFamilyName\":\"ewgdrjervn\",\"controlFamilyStatus\":\"Failed\",\"controls\":[{},{},{}]},{\"controlFamilyName\":\"hin\",\"controlFamilyStatus\":\"Passed\",\"controls\":[{},{},{}]}]},{\"categoryName\":\"fthnzdn\",\"categoryStatus\":\"Passed\",\"controlFamilies\":[{\"controlFamilyName\":\"yq\",\"controlFamilyStatus\":\"Failed\",\"controls\":[{},{},{}]},{\"controlFamilyName\":\"havhqlkthumaqolb\",\"controlFamilyStatus\":\"Passed\",\"controls\":[{}]}]},{\"categoryName\":\"ertgccymva\",\"categoryStatus\":\"NotApplicable\",\"controlFamilies\":[{\"controlFamilyName\":\"qlfmmdnbb\",\"controlFamilyStatus\":\"NotApplicable\",\"controls\":[{},{},{},{}]},{\"controlFamilyName\":\"iydmcwyhzdxs\",\"controlFamilyStatus\":\"Passed\",\"controls\":[{},{},{},{}]},{\"controlFamilyName\":\"nvdfznuda\",\"controlFamilyStatus\":\"Failed\",\"controls\":[{}]}]}]}") + .toObject(ComplianceResult.class); } } diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ControlFamilyTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ControlFamilyTests.java index 4f1babb67b623..db826496379a6 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ControlFamilyTests.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ControlFamilyTests.java @@ -1,26 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.appcomplianceautomation.models.ControlFamily; -import org.junit.jupiter.api.Test; public final class ControlFamilyTests { - @Test - public void testDeserialize() { - ControlFamily model = - BinaryData - .fromString( - "{\"familyName\":\"zzvdudgwds\",\"familyType\":\"Manual\",\"familyStatus\":\"Unhealthy\",\"controls\":[{\"controlId\":\"ynpwlbj\",\"controlShortName\":\"gacftadeh\",\"controlFullName\":\"ltyfsop\",\"controlType\":\"Manual\",\"controlDescription\":\"esnzwde\",\"controlDescriptionHyperLink\":\"avo\",\"controlStatus\":\"Passed\",\"assessments\":[]}]}") - .toObject(ControlFamily.class); - } - - @Test - public void testSerialize() { - ControlFamily model = new ControlFamily(); - model = BinaryData.fromObject(model).toObject(ControlFamily.class); + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ControlFamily model = BinaryData.fromString( + "{\"controlFamilyName\":\"koievseo\",\"controlFamilyStatus\":\"Passed\",\"controls\":[{\"controlId\":\"tmuwlauwzi\",\"controlName\":\"bm\",\"controlFullName\":\"cjefuzmu\",\"controlDescription\":\"bttdumorppxe\",\"controlDescriptionHyperLink\":\"nzbtbhj\",\"controlStatus\":\"Passed\",\"responsibilities\":[{\"responsibilityId\":\"ohdneuel\",\"responsibilityTitle\":\"hsd\",\"responsibilityDescription\":\"t\",\"responsibilityType\":\"ScopedManual\",\"responsibilitySeverity\":\"Low\",\"responsibilityStatus\":\"NotApplicable\",\"responsibilityEnvironment\":\"Azure\",\"failedResourceCount\":1185627072,\"totalResourceCount\":180318621,\"resourceList\":[{}],\"recommendationList\":[{},{}],\"guidance\":\"vithh\",\"justification\":\"o\",\"evidenceFiles\":[\"ggbhcohfwds\"]},{\"responsibilityId\":\"ka\",\"responsibilityTitle\":\"utiiswacf\",\"responsibilityDescription\":\"dkzzewkfvhqcrail\",\"responsibilityType\":\"Automated\",\"responsibilitySeverity\":\"Low\",\"responsibilityStatus\":\"Failed\",\"responsibilityEnvironment\":\"GCP\",\"failedResourceCount\":888986239,\"totalResourceCount\":395833055,\"resourceList\":[{},{}],\"recommendationList\":[{},{},{},{}],\"guidance\":\"jrxs\",\"justification\":\"afcnih\",\"evidenceFiles\":[\"apnedgfbcvkc\",\"q\",\"pkeqdcvdrhvoo\"]},{\"responsibilityId\":\"otbobzdopcj\",\"responsibilityTitle\":\"nhdldwmgxcx\",\"responsibilityDescription\":\"lpmutwuoegrpkhj\",\"responsibilityType\":\"ScopedManual\",\"responsibilitySeverity\":\"Low\",\"responsibilityStatus\":\"PendingApproval\",\"responsibilityEnvironment\":\"Azure\",\"failedResourceCount\":351540832,\"totalResourceCount\":1043474675,\"resourceList\":[{},{},{},{}],\"recommendationList\":[{}],\"guidance\":\"vmbmp\",\"justification\":\"modfvuefywsbpfvm\",\"evidenceFiles\":[\"rfouyftaakcpw\",\"yzvqt\"]},{\"responsibilityId\":\"ubex\",\"responsibilityTitle\":\"zksmondj\",\"responsibilityDescription\":\"uxvypomgkopkwh\",\"responsibilityType\":\"Automated\",\"responsibilitySeverity\":\"Low\",\"responsibilityStatus\":\"Passed\",\"responsibilityEnvironment\":\"AWS\",\"failedResourceCount\":1647253865,\"totalResourceCount\":1746293745,\"resourceList\":[{},{}],\"recommendationList\":[{},{}],\"guidance\":\"qvmkcxo\",\"justification\":\"pvhelxprg\",\"evidenceFiles\":[\"tddckcb\",\"uejrjxgc\"]}]}]}") + .toObject(ControlFamily.class); } } diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ControlSyncRecordTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ControlSyncRecordTests.java new file mode 100644 index 0000000000000..4c19e0420ecfd --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ControlSyncRecordTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.appcomplianceautomation.models.ControlSyncRecord; +import org.junit.jupiter.api.Assertions; + +public final class ControlSyncRecordTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ControlSyncRecord model + = BinaryData.fromString("{\"controlId\":\"dkvwrwjfe\",\"controlStatus\":\"nhutjeltmrldhugj\"}") + .toObject(ControlSyncRecord.class); + Assertions.assertEquals("dkvwrwjfe", model.controlId()); + Assertions.assertEquals("nhutjeltmrldhugj", model.controlStatus()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ControlSyncRecord model + = new ControlSyncRecord().withControlId("dkvwrwjfe").withControlStatus("nhutjeltmrldhugj"); + model = BinaryData.fromObject(model).toObject(ControlSyncRecord.class); + Assertions.assertEquals("dkvwrwjfe", model.controlId()); + Assertions.assertEquals("nhutjeltmrldhugj", model.controlStatus()); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ControlTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ControlTests.java index bf074bed1a399..d5e5e00e2ca34 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ControlTests.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ControlTests.java @@ -1,26 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.appcomplianceautomation.models.Control; -import org.junit.jupiter.api.Test; public final class ControlTests { - @Test - public void testDeserialize() { - Control model = - BinaryData - .fromString( - "{\"controlId\":\"hctbqvudwxdn\",\"controlShortName\":\"vo\",\"controlFullName\":\"ujjugwdkcglh\",\"controlType\":\"Manual\",\"controlDescription\":\"jdyggdtji\",\"controlDescriptionHyperLink\":\"b\",\"controlStatus\":\"NotApplicable\",\"assessments\":[{\"name\":\"e\",\"severity\":\"Low\",\"description\":\"enevfyexfwhybci\",\"remediation\":\"yvdcsitynnaa\",\"isPass\":\"True\",\"policyId\":\"tehfiqscjeypvh\",\"resourceList\":[]},{\"name\":\"gqhcjrefovg\",\"severity\":\"Medium\",\"description\":\"leyyvx\",\"remediation\":\"jpkcattpng\",\"isPass\":\"False\",\"policyId\":\"czsqpjhvm\",\"resourceList\":[]},{\"name\":\"nysounqe\",\"severity\":\"Low\",\"description\":\"ae\",\"remediation\":\"fhyhltrpmopjmcma\",\"isPass\":\"True\",\"policyId\":\"thfuiuaodsfcpkvx\",\"resourceList\":[]}]}") - .toObject(Control.class); - } - - @Test - public void testSerialize() { - Control model = new Control(); - model = BinaryData.fromObject(model).toObject(Control.class); + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Control model = BinaryData.fromString( + "{\"controlId\":\"ibrhosxsdqr\",\"controlName\":\"o\",\"controlFullName\":\"i\",\"controlDescription\":\"rq\",\"controlDescriptionHyperLink\":\"bahwfl\",\"controlStatus\":\"NotApplicable\",\"responsibilities\":[{\"responsibilityId\":\"hrkwo\",\"responsibilityTitle\":\"yvoqa\",\"responsibilityDescription\":\"iexpbtgiwbwo\",\"responsibilityType\":\"Automated\",\"responsibilitySeverity\":\"Medium\",\"responsibilityStatus\":\"NotApplicable\",\"responsibilityEnvironment\":\"General\",\"failedResourceCount\":268126054,\"totalResourceCount\":1525827841,\"resourceList\":[{\"resourceId\":\"bpokulpiujwaasip\",\"accountId\":\"iobyu\",\"resourceType\":\"rpqlp\",\"resourceOrigin\":\"GCP\",\"resourceStatus\":\"Unhealthy\",\"resourceStatusChangeDate\":\"2021-07-27T22:28:32Z\",\"recommendationIds\":[\"dbutauvfbtkuwhh\",\"hykojoxafnndlpic\",\"koymkcd\"]},{\"resourceId\":\"bpkkpwdre\",\"accountId\":\"ovvqfovljxywsu\",\"resourceType\":\"yrs\",\"resourceOrigin\":\"AWS\",\"resourceStatus\":\"Unhealthy\",\"resourceStatusChangeDate\":\"2021-04-23T19:08:20Z\",\"recommendationIds\":[\"vraeaeneq\",\"zar\"]},{\"resourceId\":\"lquuijfqkacewii\",\"accountId\":\"pubjibw\",\"resourceType\":\"f\",\"resourceOrigin\":\"GCP\",\"resourceStatus\":\"Unhealthy\",\"resourceStatusChangeDate\":\"2021-07-20T01:17:39Z\",\"recommendationIds\":[\"ksgplsa\",\"nynfsynljphuo\",\"xodlqiyntorzih\",\"eosjswsr\"]}],\"recommendationList\":[{\"recommendationId\":\"zrpzb\",\"recommendationShortName\":\"ckqqzqioxiysui\",\"recommendationSolutions\":[{},{},{},{}]},{\"recommendationId\":\"ked\",\"recommendationShortName\":\"trwyhqmib\",\"recommendationSolutions\":[{}]},{\"recommendationId\":\"itsmypyyn\",\"recommendationShortName\":\"dpumnzgmw\",\"recommendationSolutions\":[{},{},{},{}]},{\"recommendationId\":\"biknsorgjhxbld\",\"recommendationShortName\":\"wwrlkdmtncv\",\"recommendationSolutions\":[{},{},{}]}],\"guidance\":\"llxdyhgs\",\"justification\":\"cogjltdtbn\",\"evidenceFiles\":[\"d\",\"ocrkvcikh\",\"vpa\"]},{\"responsibilityId\":\"gxqquezik\",\"responsibilityTitle\":\"ggxkallatmelwuip\",\"responsibilityDescription\":\"cjzkzivgvvcna\",\"responsibilityType\":\"Automated\",\"responsibilitySeverity\":\"High\",\"responsibilityStatus\":\"Failed\",\"responsibilityEnvironment\":\"General\",\"failedResourceCount\":1895502820,\"totalResourceCount\":2127430069,\"resourceList\":[{\"resourceId\":\"dvstkw\",\"accountId\":\"tchealmf\",\"resourceType\":\"d\",\"resourceOrigin\":\"Azure\",\"resourceStatus\":\"Healthy\",\"resourceStatusChangeDate\":\"2021-08-04T08:19:13Z\",\"recommendationIds\":[\"piohgwxrtfu\",\"xepxgyqagvrvmn\",\"k\",\"kghimdblxgwimfnj\"]}],\"recommendationList\":[{\"recommendationId\":\"wmszkk\",\"recommendationShortName\":\"qreyfkzi\",\"recommendationSolutions\":[{},{}]}],\"guidance\":\"wneaiv\",\"justification\":\"czelpcirel\",\"evidenceFiles\":[\"aenwabf\"]},{\"responsibilityId\":\"kl\",\"responsibilityTitle\":\"xbjhwuaanozjosph\",\"responsibilityDescription\":\"ulpjr\",\"responsibilityType\":\"Automated\",\"responsibilitySeverity\":\"Low\",\"responsibilityStatus\":\"Failed\",\"responsibilityEnvironment\":\"AWS\",\"failedResourceCount\":865448266,\"totalResourceCount\":1951928736,\"resourceList\":[{\"resourceId\":\"itc\",\"accountId\":\"fcktqumiekke\",\"resourceType\":\"ikh\",\"resourceOrigin\":\"AWS\",\"resourceStatus\":\"Healthy\",\"resourceStatusChangeDate\":\"2021-06-13T17:28:05Z\",\"recommendationIds\":[\"gebdunygaeq\"]}],\"recommendationList\":[{\"recommendationId\":\"fatpxllrxcyjmoa\",\"recommendationShortName\":\"uvarmywdmjsjq\",\"recommendationSolutions\":[{},{}]},{\"recommendationId\":\"yxxrwlycoduh\",\"recommendationShortName\":\"xkgymareqnajxqu\",\"recommendationSolutions\":[{}]},{\"recommendationId\":\"ycubeddgs\",\"recommendationShortName\":\"fwqmzqalkrmn\",\"recommendationSolutions\":[{},{}]},{\"recommendationId\":\"xacqqudfnbyx\",\"recommendationShortName\":\"aabjyvayffimrz\",\"recommendationSolutions\":[{},{},{}]}],\"guidance\":\"qogsexnevfd\",\"justification\":\"nw\",\"evidenceFiles\":[\"zsyyceuzso\",\"bjudpfrxtrthzv\",\"ytdw\"]},{\"responsibilityId\":\"brqubp\",\"responsibilityTitle\":\"h\",\"responsibilityDescription\":\"iilivpdtiirqtd\",\"responsibilityType\":\"Automated\",\"responsibilitySeverity\":\"Medium\",\"responsibilityStatus\":\"Passed\",\"responsibilityEnvironment\":\"AWS\",\"failedResourceCount\":1061692620,\"totalResourceCount\":2005280896,\"resourceList\":[{\"resourceId\":\"rxxle\",\"accountId\":\"ramxjezwlwnw\",\"resourceType\":\"qlcvydy\",\"resourceOrigin\":\"Azure\",\"resourceStatus\":\"Unhealthy\",\"resourceStatusChangeDate\":\"2021-10-15T00:40:10Z\",\"recommendationIds\":[\"kniod\",\"oo\"]},{\"resourceId\":\"wnujhemmsbvdk\",\"accountId\":\"odtji\",\"resourceType\":\"wj\",\"resourceOrigin\":\"Azure\",\"resourceStatus\":\"Unhealthy\",\"resourceStatusChangeDate\":\"2021-03-04T23:31:16Z\",\"recommendationIds\":[\"efkdlf\",\"akggkfpag\",\"owpulpq\",\"lyls\"]}],\"recommendationList\":[{\"recommendationId\":\"jnsjervtiagxsd\",\"recommendationShortName\":\"uem\",\"recommendationSolutions\":[{},{},{}]}],\"guidance\":\"kfzbeyvpnqicvi\",\"justification\":\"kjj\",\"evidenceFiles\":[\"rbuukzclewyhmlwp\",\"ztzp\",\"fn\"]}]}") + .toObject(Control.class); } } diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/EvidenceFileDownloadRequestTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/EvidenceFileDownloadRequestTests.java new file mode 100644 index 0000000000000..c7f152954dc53 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/EvidenceFileDownloadRequestTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.appcomplianceautomation.models.EvidenceFileDownloadRequest; +import org.junit.jupiter.api.Assertions; + +public final class EvidenceFileDownloadRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + EvidenceFileDownloadRequest model + = BinaryData.fromString("{\"reportCreatorTenantId\":\"mwctondzjluudfd\",\"offerGuid\":\"gg\"}") + .toObject(EvidenceFileDownloadRequest.class); + Assertions.assertEquals("mwctondzjluudfd", model.reportCreatorTenantId()); + Assertions.assertEquals("gg", model.offerGuid()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + EvidenceFileDownloadRequest model + = new EvidenceFileDownloadRequest().withReportCreatorTenantId("mwctondzjluudfd").withOfferGuid("gg"); + model = BinaryData.fromObject(model).toObject(EvidenceFileDownloadRequest.class); + Assertions.assertEquals("mwctondzjluudfd", model.reportCreatorTenantId()); + Assertions.assertEquals("gg", model.offerGuid()); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/EvidenceFileDownloadResponseEvidenceFileTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/EvidenceFileDownloadResponseEvidenceFileTests.java new file mode 100644 index 0000000000000..3fc31b1fc05d8 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/EvidenceFileDownloadResponseEvidenceFileTests.java @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.appcomplianceautomation.models.EvidenceFileDownloadResponseEvidenceFile; + +public final class EvidenceFileDownloadResponseEvidenceFileTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + EvidenceFileDownloadResponseEvidenceFile model = BinaryData.fromString("{\"url\":\"fxqknpirgneptt\"}") + .toObject(EvidenceFileDownloadResponseEvidenceFile.class); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/EvidenceFileDownloadResponseInnerTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/EvidenceFileDownloadResponseInnerTests.java new file mode 100644 index 0000000000000..5c0b05d1d2609 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/EvidenceFileDownloadResponseInnerTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.EvidenceFileDownloadResponseInner; + +public final class EvidenceFileDownloadResponseInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + EvidenceFileDownloadResponseInner model + = BinaryData.fromString("{\"evidenceFile\":{\"url\":\"bwtovvtgseinqf\"}}") + .toObject(EvidenceFileDownloadResponseInner.class); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/EvidencePropertiesTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/EvidencePropertiesTests.java new file mode 100644 index 0000000000000..954b3377948b0 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/EvidencePropertiesTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.appcomplianceautomation.models.EvidenceProperties; +import com.azure.resourcemanager.appcomplianceautomation.models.EvidenceType; +import org.junit.jupiter.api.Assertions; + +public final class EvidencePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + EvidenceProperties model = BinaryData.fromString( + "{\"evidenceType\":\"Data\",\"filePath\":\"znoigbrn\",\"extraData\":\"mw\",\"controlId\":\"nbsazejjoqkag\",\"responsibilityId\":\"sxtta\",\"provisioningState\":\"Creating\"}") + .toObject(EvidenceProperties.class); + Assertions.assertEquals(EvidenceType.DATA, model.evidenceType()); + Assertions.assertEquals("znoigbrn", model.filePath()); + Assertions.assertEquals("mw", model.extraData()); + Assertions.assertEquals("nbsazejjoqkag", model.controlId()); + Assertions.assertEquals("sxtta", model.responsibilityId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + EvidenceProperties model = new EvidenceProperties().withEvidenceType(EvidenceType.DATA) + .withFilePath("znoigbrn") + .withExtraData("mw") + .withControlId("nbsazejjoqkag") + .withResponsibilityId("sxtta"); + model = BinaryData.fromObject(model).toObject(EvidenceProperties.class); + Assertions.assertEquals(EvidenceType.DATA, model.evidenceType()); + Assertions.assertEquals("znoigbrn", model.filePath()); + Assertions.assertEquals("mw", model.extraData()); + Assertions.assertEquals("nbsazejjoqkag", model.controlId()); + Assertions.assertEquals("sxtta", model.responsibilityId()); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/EvidenceResourceInnerTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/EvidenceResourceInnerTests.java new file mode 100644 index 0000000000000..5724f125085c6 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/EvidenceResourceInnerTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.EvidenceResourceInner; +import com.azure.resourcemanager.appcomplianceautomation.models.EvidenceProperties; +import com.azure.resourcemanager.appcomplianceautomation.models.EvidenceType; +import org.junit.jupiter.api.Assertions; + +public final class EvidenceResourceInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + EvidenceResourceInner model = BinaryData.fromString( + "{\"properties\":{\"evidenceType\":\"File\",\"filePath\":\"hgfipnsxkmcw\",\"extraData\":\"krrjrea\",\"controlId\":\"tsgumhj\",\"responsibilityId\":\"ikkx\",\"provisioningState\":\"Succeeded\"},\"id\":\"lbqpvuzlmvfelf\",\"name\":\"tgp\",\"type\":\"crpw\"}") + .toObject(EvidenceResourceInner.class); + Assertions.assertEquals(EvidenceType.FILE, model.properties().evidenceType()); + Assertions.assertEquals("hgfipnsxkmcw", model.properties().filePath()); + Assertions.assertEquals("krrjrea", model.properties().extraData()); + Assertions.assertEquals("tsgumhj", model.properties().controlId()); + Assertions.assertEquals("ikkx", model.properties().responsibilityId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + EvidenceResourceInner model + = new EvidenceResourceInner().withProperties(new EvidenceProperties().withEvidenceType(EvidenceType.FILE) + .withFilePath("hgfipnsxkmcw") + .withExtraData("krrjrea") + .withControlId("tsgumhj") + .withResponsibilityId("ikkx")); + model = BinaryData.fromObject(model).toObject(EvidenceResourceInner.class); + Assertions.assertEquals(EvidenceType.FILE, model.properties().evidenceType()); + Assertions.assertEquals("hgfipnsxkmcw", model.properties().filePath()); + Assertions.assertEquals("krrjrea", model.properties().extraData()); + Assertions.assertEquals("tsgumhj", model.properties().controlId()); + Assertions.assertEquals("ikkx", model.properties().responsibilityId()); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/EvidenceResourceListResultTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/EvidenceResourceListResultTests.java new file mode 100644 index 0000000000000..c815c2e7baa59 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/EvidenceResourceListResultTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.appcomplianceautomation.implementation.models.EvidenceResourceListResult; +import com.azure.resourcemanager.appcomplianceautomation.models.EvidenceType; +import org.junit.jupiter.api.Assertions; + +public final class EvidenceResourceListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + EvidenceResourceListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"evidenceType\":\"AutoCollectedEvidence\",\"filePath\":\"aa\",\"extraData\":\"xdtnkdmkqjjlw\",\"controlId\":\"nvrk\",\"responsibilityId\":\"ou\",\"provisioningState\":\"Failed\"},\"id\":\"ebqaaysjkixqtnq\",\"name\":\"tezlwff\",\"type\":\"iakp\"},{\"properties\":{\"evidenceType\":\"AutoCollectedEvidence\",\"filePath\":\"qmt\",\"extraData\":\"ltmm\",\"controlId\":\"hyeozphvwau\",\"responsibilityId\":\"ncyg\",\"provisioningState\":\"Failed\"},\"id\":\"ipmdscwx\",\"name\":\"upev\",\"type\":\"hfstotxhojujbyp\"},{\"properties\":{\"evidenceType\":\"AutoCollectedEvidence\",\"filePath\":\"c\",\"extraData\":\"hixbjxyfwnyl\",\"controlId\":\"ool\",\"responsibilityId\":\"tpkiwkkbnujry\",\"provisioningState\":\"Verifying\"},\"id\":\"lbfpncurd\",\"name\":\"iwii\",\"type\":\"htywubxcbihwq\"}],\"nextLink\":\"fdntwjchrdgoih\"}") + .toObject(EvidenceResourceListResult.class); + Assertions.assertEquals(EvidenceType.AUTO_COLLECTED_EVIDENCE, model.value().get(0).properties().evidenceType()); + Assertions.assertEquals("aa", model.value().get(0).properties().filePath()); + Assertions.assertEquals("xdtnkdmkqjjlw", model.value().get(0).properties().extraData()); + Assertions.assertEquals("nvrk", model.value().get(0).properties().controlId()); + Assertions.assertEquals("ou", model.value().get(0).properties().responsibilityId()); + Assertions.assertEquals("fdntwjchrdgoih", model.nextLink()); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/GetCollectionCountRequestTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/GetCollectionCountRequestTests.java new file mode 100644 index 0000000000000..216c326d5122b --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/GetCollectionCountRequestTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.appcomplianceautomation.models.GetCollectionCountRequest; +import org.junit.jupiter.api.Assertions; + +public final class GetCollectionCountRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + GetCollectionCountRequest model + = BinaryData.fromString("{\"type\":\"pqjlihhyusps\"}").toObject(GetCollectionCountRequest.class); + Assertions.assertEquals("pqjlihhyusps", model.type()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + GetCollectionCountRequest model = new GetCollectionCountRequest().withType("pqjlihhyusps"); + model = BinaryData.fromObject(model).toObject(GetCollectionCountRequest.class); + Assertions.assertEquals("pqjlihhyusps", model.type()); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/GetCollectionCountResponseInnerTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/GetCollectionCountResponseInnerTests.java new file mode 100644 index 0000000000000..e14d25c08a464 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/GetCollectionCountResponseInnerTests.java @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.GetCollectionCountResponseInner; +import org.junit.jupiter.api.Assertions; + +public final class GetCollectionCountResponseInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + GetCollectionCountResponseInner model + = BinaryData.fromString("{\"count\":2005898157}").toObject(GetCollectionCountResponseInner.class); + Assertions.assertEquals(2005898157, model.count()); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/GetOverviewStatusRequestTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/GetOverviewStatusRequestTests.java new file mode 100644 index 0000000000000..bece4a964bd8d --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/GetOverviewStatusRequestTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.appcomplianceautomation.models.GetOverviewStatusRequest; +import org.junit.jupiter.api.Assertions; + +public final class GetOverviewStatusRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + GetOverviewStatusRequest model + = BinaryData.fromString("{\"type\":\"vlmfwdgzxulucv\"}").toObject(GetOverviewStatusRequest.class); + Assertions.assertEquals("vlmfwdgzxulucv", model.type()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + GetOverviewStatusRequest model = new GetOverviewStatusRequest().withType("vlmfwdgzxulucv"); + model = BinaryData.fromObject(model).toObject(GetOverviewStatusRequest.class); + Assertions.assertEquals("vlmfwdgzxulucv", model.type()); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/GetOverviewStatusResponseInnerTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/GetOverviewStatusResponseInnerTests.java new file mode 100644 index 0000000000000..e859298ec186c --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/GetOverviewStatusResponseInnerTests.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.GetOverviewStatusResponseInner; +import org.junit.jupiter.api.Assertions; + +public final class GetOverviewStatusResponseInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + GetOverviewStatusResponseInner model = BinaryData.fromString( + "{\"statusList\":[{\"statusName\":\"sreuzvxurisjnh\",\"statusValue\":\"txifqj\"},{\"statusName\":\"xmrhu\",\"statusValue\":\"wp\"},{\"statusName\":\"sutrgjup\",\"statusValue\":\"utpwoqhihejqgw\"},{\"statusName\":\"nfqn\",\"statusValue\":\"ypsxjvfoim\"}]}") + .toObject(GetOverviewStatusResponseInner.class); + Assertions.assertEquals("sreuzvxurisjnh", model.statusList().get(0).statusName()); + Assertions.assertEquals("txifqj", model.statusList().get(0).statusValue()); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ListInUseStorageAccountsRequestTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ListInUseStorageAccountsRequestTests.java new file mode 100644 index 0000000000000..dd60c3c34ca63 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ListInUseStorageAccountsRequestTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.appcomplianceautomation.models.ListInUseStorageAccountsRequest; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ListInUseStorageAccountsRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ListInUseStorageAccountsRequest model + = BinaryData.fromString("{\"subscriptionIds\":[\"qphchqnrnrpxehuw\",\"ykqgaifmvik\",\"bydvkhbejdz\"]}") + .toObject(ListInUseStorageAccountsRequest.class); + Assertions.assertEquals("qphchqnrnrpxehuw", model.subscriptionIds().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ListInUseStorageAccountsRequest model = new ListInUseStorageAccountsRequest() + .withSubscriptionIds(Arrays.asList("qphchqnrnrpxehuw", "ykqgaifmvik", "bydvkhbejdz")); + model = BinaryData.fromObject(model).toObject(ListInUseStorageAccountsRequest.class); + Assertions.assertEquals("qphchqnrnrpxehuw", model.subscriptionIds().get(0)); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ListInUseStorageAccountsResponseInnerTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ListInUseStorageAccountsResponseInnerTests.java new file mode 100644 index 0000000000000..e77e70dea9de2 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ListInUseStorageAccountsResponseInnerTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.ListInUseStorageAccountsResponseInner; +import org.junit.jupiter.api.Assertions; + +public final class ListInUseStorageAccountsResponseInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ListInUseStorageAccountsResponseInner model = BinaryData.fromString( + "{\"storageAccountList\":[{\"subscriptionId\":\"dsrhnjiv\",\"resourceGroup\":\"v\",\"accountName\":\"ovqfzge\",\"location\":\"dftuljltduce\"},{\"subscriptionId\":\"tmczuomejwcwwqi\",\"resourceGroup\":\"nssxmojmsvpk\",\"accountName\":\"rvkwc\",\"location\":\"ql\"}]}") + .toObject(ListInUseStorageAccountsResponseInner.class); + Assertions.assertEquals("dsrhnjiv", model.storageAccountList().get(0).subscriptionId()); + Assertions.assertEquals("v", model.storageAccountList().get(0).resourceGroup()); + Assertions.assertEquals("ovqfzge", model.storageAccountList().get(0).accountName()); + Assertions.assertEquals("dftuljltduce", model.storageAccountList().get(0).location()); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/OnboardRequestTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/OnboardRequestTests.java new file mode 100644 index 0000000000000..0a15998cc3f7f --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/OnboardRequestTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.appcomplianceautomation.models.OnboardRequest; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class OnboardRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OnboardRequest model + = BinaryData.fromString("{\"subscriptionIds\":[\"umrtwnawjsl\"]}").toObject(OnboardRequest.class); + Assertions.assertEquals("umrtwnawjsl", model.subscriptionIds().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + OnboardRequest model = new OnboardRequest().withSubscriptionIds(Arrays.asList("umrtwnawjsl")); + model = BinaryData.fromObject(model).toObject(OnboardRequest.class); + Assertions.assertEquals("umrtwnawjsl", model.subscriptionIds().get(0)); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/OperationDisplayTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/OperationDisplayTests.java index 4978ac8ed30a3..95ec9cd181b81 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/OperationDisplayTests.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/OperationDisplayTests.java @@ -1,26 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.appcomplianceautomation.models.OperationDisplay; -import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Assertions; public final class OperationDisplayTests { - @Test - public void testDeserialize() { - OperationDisplay model = - BinaryData - .fromString( - "{\"provider\":\"yrtih\",\"resource\":\"tijbpzvgnwzsymgl\",\"operation\":\"fcyzkohdbihanufh\",\"description\":\"bj\"}") - .toObject(OperationDisplay.class); - } - - @Test - public void testSerialize() { - OperationDisplay model = new OperationDisplay(); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OperationDisplay model = BinaryData.fromString( + "{\"provider\":\"gaojf\",\"resource\":\"nc\",\"operation\":\"mrfhirctymox\",\"description\":\"tpipiwyczuhx\"}") + .toObject(OperationDisplay.class); + Assertions.assertEquals("gaojf", model.provider()); + Assertions.assertEquals("nc", model.resource()); + Assertions.assertEquals("mrfhirctymox", model.operation()); + Assertions.assertEquals("tpipiwyczuhx", model.description()); } } diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/OperationInnerTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/OperationInnerTests.java index 5d8b1b2dba4b0..dc6be9ca50812 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/OperationInnerTests.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/OperationInnerTests.java @@ -1,27 +1,24 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.appcomplianceautomation.fluent.models.OperationInner; -import com.azure.resourcemanager.appcomplianceautomation.models.OperationDisplay; -import org.junit.jupiter.api.Test; +import com.azure.resourcemanager.appcomplianceautomation.models.ActionType; +import org.junit.jupiter.api.Assertions; public final class OperationInnerTests { - @Test - public void testDeserialize() { - OperationInner model = - BinaryData - .fromString( - "{\"name\":\"usarhmofc\",\"isDataAction\":false,\"display\":{\"provider\":\"urkdtmlx\",\"resource\":\"kuksjtxukcdm\",\"operation\":\"rcryuanzwuxzdxta\",\"description\":\"lhmwhfpmrqobm\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}") - .toObject(OperationInner.class); - } - - @Test - public void testSerialize() { - OperationInner model = new OperationInner().withDisplay(new OperationDisplay()); - model = BinaryData.fromObject(model).toObject(OperationInner.class); + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OperationInner model = BinaryData.fromString( + "{\"name\":\"xscyhwzdgirujbz\",\"isDataAction\":true,\"display\":{\"provider\":\"zbtd\",\"resource\":\"vp\",\"operation\":\"yujviylwdshfssn\",\"description\":\"gy\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}") + .toObject(OperationInner.class); + Assertions.assertEquals("zbtd", model.display().provider()); + Assertions.assertEquals("vp", model.display().resource()); + Assertions.assertEquals("yujviylwdshfssn", model.display().operation()); + Assertions.assertEquals("gy", model.display().description()); + Assertions.assertEquals(ActionType.INTERNAL, model.actionType()); } } diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/OverviewStatusTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/OverviewStatusTests.java index 5de01de5c7bf0..f1c32b796eaa1 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/OverviewStatusTests.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/OverviewStatusTests.java @@ -1,33 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.appcomplianceautomation.models.OverviewStatus; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; public final class OverviewStatusTests { - @Test - public void testDeserialize() { - OverviewStatus model = - BinaryData - .fromString("{\"passedCount\":1951665736,\"failedCount\":542784283,\"manualCount\":2110455897}") - .toObject(OverviewStatus.class); - Assertions.assertEquals(1951665736, model.passedCount()); - Assertions.assertEquals(542784283, model.failedCount()); - Assertions.assertEquals(2110455897, model.manualCount()); - } - - @Test - public void testSerialize() { - OverviewStatus model = - new OverviewStatus().withPassedCount(1951665736).withFailedCount(542784283).withManualCount(2110455897); - model = BinaryData.fromObject(model).toObject(OverviewStatus.class); - Assertions.assertEquals(1951665736, model.passedCount()); - Assertions.assertEquals(542784283, model.failedCount()); - Assertions.assertEquals(2110455897, model.manualCount()); + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OverviewStatus model = BinaryData.fromString( + "{\"passedCount\":408868757,\"failedCount\":234245718,\"manualCount\":1938175770,\"notApplicableCount\":1277339929,\"pendingCount\":77118274}") + .toObject(OverviewStatus.class); } } diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/PagedOperationTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/PagedOperationTests.java new file mode 100644 index 0000000000000..09198f8a4bf1f --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/PagedOperationTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.appcomplianceautomation.implementation.models.PagedOperation; +import com.azure.resourcemanager.appcomplianceautomation.models.ActionType; +import org.junit.jupiter.api.Assertions; + +public final class PagedOperationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PagedOperation model = BinaryData.fromString( + "{\"value\":[{\"name\":\"sniffc\",\"isDataAction\":true,\"display\":{\"provider\":\"ojlpijnkrxf\",\"resource\":\"dhcrati\",\"operation\":\"ronasxift\",\"description\":\"qyzhf\"},\"origin\":\"user\",\"actionType\":\"Internal\"},{\"name\":\"gc\",\"isDataAction\":true,\"display\":{\"provider\":\"xkr\",\"resource\":\"nyhmossxkkgthr\",\"operation\":\"hxjbdhqxvc\",\"description\":\"frpdsofbshrns\"},\"origin\":\"system\",\"actionType\":\"Internal\"},{\"name\":\"vz\",\"isDataAction\":true,\"display\":{\"provider\":\"nu\",\"resource\":\"jsrtk\",\"operation\":\"wnopqgikyzirtx\",\"description\":\"uxzejntpsew\"},\"origin\":\"user\",\"actionType\":\"Internal\"},{\"name\":\"ukry\",\"isDataAction\":false,\"display\":{\"provider\":\"ieoxorggufhyaomt\",\"resource\":\"hhavgrvkffovjz\",\"operation\":\"jbibg\",\"description\":\"fxumv\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}],\"nextLink\":\"vwxnbkfe\"}") + .toObject(PagedOperation.class); + Assertions.assertEquals("ojlpijnkrxf", model.value().get(0).display().provider()); + Assertions.assertEquals("dhcrati", model.value().get(0).display().resource()); + Assertions.assertEquals("ronasxift", model.value().get(0).display().operation()); + Assertions.assertEquals("qyzhf", model.value().get(0).display().description()); + Assertions.assertEquals(ActionType.INTERNAL, model.value().get(0).actionType()); + Assertions.assertEquals("vwxnbkfe", model.nextLink()); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/RecommendationSolutionTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/RecommendationSolutionTests.java new file mode 100644 index 0000000000000..69f7c6efe9513 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/RecommendationSolutionTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.appcomplianceautomation.models.RecommendationSolution; + +public final class RecommendationSolutionTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RecommendationSolution model = BinaryData.fromString( + "{\"recommendationSolutionIndex\":\"hejhzisx\",\"recommendationSolutionContent\":\"pelol\",\"isRecommendSolution\":\"true\"}") + .toObject(RecommendationSolution.class); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/RecommendationTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/RecommendationTests.java new file mode 100644 index 0000000000000..6f4de5cf49702 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/RecommendationTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.appcomplianceautomation.models.Recommendation; + +public final class RecommendationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Recommendation model = BinaryData.fromString( + "{\"recommendationId\":\"aivwitqscywu\",\"recommendationShortName\":\"woluhczbwemhair\",\"recommendationSolutions\":[{\"recommendationSolutionIndex\":\"z\",\"recommendationSolutionContent\":\"msweypqwdxggicc\",\"isRecommendSolution\":\"true\"},{\"recommendationSolutionIndex\":\"huexmk\",\"recommendationSolutionContent\":\"lstvlzywe\",\"isRecommendSolution\":\"true\"},{\"recommendationSolutionIndex\":\"ncsdtclusiyp\",\"recommendationSolutionContent\":\"fgytguslfeadcyg\",\"isRecommendSolution\":\"false\"}]}") + .toObject(Recommendation.class); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ReportComplianceStatusTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ReportComplianceStatusTests.java index 13fa3264ad474..edf7c9431b2c8 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ReportComplianceStatusTests.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ReportComplianceStatusTests.java @@ -1,40 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcomplianceautomation.models.OverviewStatus; import com.azure.resourcemanager.appcomplianceautomation.models.ReportComplianceStatus; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; public final class ReportComplianceStatusTests { - @Test - public void testDeserialize() { - ReportComplianceStatus model = - BinaryData - .fromString( - "{\"m365\":{\"passedCount\":2128722098,\"failedCount\":186461097,\"manualCount\":173170794}}") - .toObject(ReportComplianceStatus.class); - Assertions.assertEquals(2128722098, model.m365().passedCount()); - Assertions.assertEquals(186461097, model.m365().failedCount()); - Assertions.assertEquals(173170794, model.m365().manualCount()); - } - - @Test - public void testSerialize() { - ReportComplianceStatus model = - new ReportComplianceStatus() - .withM365( - new OverviewStatus() - .withPassedCount(2128722098) - .withFailedCount(186461097) - .withManualCount(173170794)); - model = BinaryData.fromObject(model).toObject(ReportComplianceStatus.class); - Assertions.assertEquals(2128722098, model.m365().passedCount()); - Assertions.assertEquals(186461097, model.m365().failedCount()); - Assertions.assertEquals(173170794, model.m365().manualCount()); + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ReportComplianceStatus model = BinaryData.fromString( + "{\"m365\":{\"passedCount\":1547644863,\"failedCount\":1055539147,\"manualCount\":1847576577,\"notApplicableCount\":826094164,\"pendingCount\":2093374464}}") + .toObject(ReportComplianceStatus.class); } } diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ReportPatchPropertiesTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ReportPatchPropertiesTests.java new file mode 100644 index 0000000000000..d2bdb9a067ec7 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ReportPatchPropertiesTests.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.appcomplianceautomation.models.ReportPatchProperties; +import com.azure.resourcemanager.appcomplianceautomation.models.ResourceMetadata; +import com.azure.resourcemanager.appcomplianceautomation.models.ResourceOrigin; +import com.azure.resourcemanager.appcomplianceautomation.models.StorageInfo; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ReportPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ReportPatchProperties model = BinaryData.fromString( + "{\"triggerTime\":\"2021-10-30T06:34:46Z\",\"timeZone\":\"rpymzidnsez\",\"resources\":[{\"resourceId\":\"bzsgfyccsne\",\"resourceType\":\"dwzjeiach\",\"resourceKind\":\"osfln\",\"resourceOrigin\":\"AWS\",\"accountId\":\"qpteeh\"},{\"resourceId\":\"zvypyqrimzinp\",\"resourceType\":\"wjdk\",\"resourceKind\":\"soodqxhcrmnoh\",\"resourceOrigin\":\"AWS\",\"accountId\":\"whdsoifiyip\"},{\"resourceId\":\"xsqwpgrjbznorc\",\"resourceType\":\"vsnb\",\"resourceKind\":\"qabnmoc\",\"resourceOrigin\":\"GCP\",\"accountId\":\"hurzafblj\"}],\"status\":\"Reviewing\",\"errors\":[\"oq\",\"jmkljavbqidtqajz\",\"ulpkudjkrl\"],\"tenantId\":\"bzhfepgzgqexz\",\"offerGuid\":\"c\",\"nextTriggerTime\":\"2021-05-23T12:30:08Z\",\"lastTriggerTime\":\"2021-11-18T07:05:01Z\",\"subscriptions\":[\"rhhbcs\",\"l\",\"mmajtjaodx\"],\"complianceStatus\":{\"m365\":{\"passedCount\":1455975978,\"failedCount\":64161547,\"manualCount\":372100049,\"notApplicableCount\":948601207,\"pendingCount\":1684749712}},\"storageInfo\":{\"subscriptionId\":\"onpimexgstxg\",\"resourceGroup\":\"odgmaajrmvdjwz\",\"accountName\":\"ovmclwhijcoejct\",\"location\":\"aqsqsycbkbfk\"},\"certRecords\":[{\"offerGuid\":\"kexxppof\",\"certificationStatus\":\"axcfjpgddtocjjx\",\"ingestionStatus\":\"pmouexhdz\",\"controls\":[{\"controlId\":\"eojnxqbzvddn\",\"controlStatus\":\"ndei\"}]},{\"offerGuid\":\"twnpzaoqvuhrhcf\",\"certificationStatus\":\"yd\",\"ingestionStatus\":\"lmjthjq\",\"controls\":[{\"controlId\":\"eicxmqciwqvhkhi\",\"controlStatus\":\"igdtopbob\"},{\"controlId\":\"ghmewuam\",\"controlStatus\":\"hrzayvvtpgvdf\"}]}],\"provisioningState\":\"Verifying\"}") + .toObject(ReportPatchProperties.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-30T06:34:46Z"), model.triggerTime()); + Assertions.assertEquals("rpymzidnsez", model.timeZone()); + Assertions.assertEquals("bzsgfyccsne", model.resources().get(0).resourceId()); + Assertions.assertEquals("dwzjeiach", model.resources().get(0).resourceType()); + Assertions.assertEquals("osfln", model.resources().get(0).resourceKind()); + Assertions.assertEquals(ResourceOrigin.AWS, model.resources().get(0).resourceOrigin()); + Assertions.assertEquals("qpteeh", model.resources().get(0).accountId()); + Assertions.assertEquals("c", model.offerGuid()); + Assertions.assertEquals("onpimexgstxg", model.storageInfo().subscriptionId()); + Assertions.assertEquals("odgmaajrmvdjwz", model.storageInfo().resourceGroup()); + Assertions.assertEquals("ovmclwhijcoejct", model.storageInfo().accountName()); + Assertions.assertEquals("aqsqsycbkbfk", model.storageInfo().location()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ReportPatchProperties model + = new ReportPatchProperties().withTriggerTime(OffsetDateTime.parse("2021-10-30T06:34:46Z")) + .withTimeZone("rpymzidnsez") + .withResources(Arrays.asList( + new ResourceMetadata().withResourceId("bzsgfyccsne") + .withResourceType("dwzjeiach") + .withResourceKind("osfln") + .withResourceOrigin(ResourceOrigin.AWS) + .withAccountId("qpteeh"), + new ResourceMetadata().withResourceId("zvypyqrimzinp") + .withResourceType("wjdk") + .withResourceKind("soodqxhcrmnoh") + .withResourceOrigin(ResourceOrigin.AWS) + .withAccountId("whdsoifiyip"), + new ResourceMetadata().withResourceId("xsqwpgrjbznorc") + .withResourceType("vsnb") + .withResourceKind("qabnmoc") + .withResourceOrigin(ResourceOrigin.GCP) + .withAccountId("hurzafblj"))) + .withOfferGuid("c") + .withStorageInfo(new StorageInfo().withSubscriptionId("onpimexgstxg") + .withResourceGroup("odgmaajrmvdjwz") + .withAccountName("ovmclwhijcoejct") + .withLocation("aqsqsycbkbfk")); + model = BinaryData.fromObject(model).toObject(ReportPatchProperties.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-30T06:34:46Z"), model.triggerTime()); + Assertions.assertEquals("rpymzidnsez", model.timeZone()); + Assertions.assertEquals("bzsgfyccsne", model.resources().get(0).resourceId()); + Assertions.assertEquals("dwzjeiach", model.resources().get(0).resourceType()); + Assertions.assertEquals("osfln", model.resources().get(0).resourceKind()); + Assertions.assertEquals(ResourceOrigin.AWS, model.resources().get(0).resourceOrigin()); + Assertions.assertEquals("qpteeh", model.resources().get(0).accountId()); + Assertions.assertEquals("c", model.offerGuid()); + Assertions.assertEquals("onpimexgstxg", model.storageInfo().subscriptionId()); + Assertions.assertEquals("odgmaajrmvdjwz", model.storageInfo().resourceGroup()); + Assertions.assertEquals("ovmclwhijcoejct", model.storageInfo().accountName()); + Assertions.assertEquals("aqsqsycbkbfk", model.storageInfo().location()); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ReportPropertiesTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ReportPropertiesTests.java index 1682f3093e8df..8dc7fe412b209 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ReportPropertiesTests.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ReportPropertiesTests.java @@ -1,80 +1,70 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.appcomplianceautomation.models.ReportProperties; import com.azure.resourcemanager.appcomplianceautomation.models.ResourceMetadata; +import com.azure.resourcemanager.appcomplianceautomation.models.ResourceOrigin; +import com.azure.resourcemanager.appcomplianceautomation.models.StorageInfo; import java.time.OffsetDateTime; import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; public final class ReportPropertiesTests { - @Test - public void testDeserialize() { - ReportProperties model = - BinaryData - .fromString( - "{\"id\":\"ginuvamih\",\"status\":\"Active\",\"tenantId\":\"arxzxtheot\",\"reportName\":\"ivyevcciqihnhun\",\"offerGuid\":\"wjzrnfygxgisp\",\"timeZone\":\"mvtzfkufub\",\"triggerTime\":\"2021-04-27T12:55:33Z\",\"nextTriggerTime\":\"2021-02-25T05:54:32Z\",\"lastTriggerTime\":\"2021-07-07T00:34:51Z\",\"subscriptions\":[\"fjaeq\",\"hqjbasvmsmj\",\"ulngsntn\"],\"resources\":[{\"resourceId\":\"bkzgcwrwclx\",\"resourceType\":\"rljdouskcqv\",\"resourceKind\":\"cr\",\"resourceName\":\"dkwt\",\"tags\":{\"p\":\"bnjbiksqrglssain\",\"mgxsab\":\"wnzlljfmppeeb\",\"jczdzevndh\":\"yqduujit\"}},{\"resourceId\":\"rwpdappdsbdkvwrw\",\"resourceType\":\"eusnhutj\",\"resourceKind\":\"tmrldhugjzzdatq\",\"resourceName\":\"oc\",\"tags\":{\"ozwyiftyhxhuro\":\"ablgphuticndvk\",\"wcukjfkgiawxk\":\"ftyxolniw\"}}],\"complianceStatus\":{\"m365\":{\"passedCount\":1861456902,\"failedCount\":727805488,\"manualCount\":1249241365}},\"provisioningState\":\"Deleting\"}") - .toObject(ReportProperties.class); - Assertions.assertEquals("wjzrnfygxgisp", model.offerGuid()); - Assertions.assertEquals("mvtzfkufub", model.timeZone()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-27T12:55:33Z"), model.triggerTime()); - Assertions.assertEquals("bkzgcwrwclx", model.resources().get(0).resourceId()); - Assertions.assertEquals("rljdouskcqv", model.resources().get(0).resourceType()); - Assertions.assertEquals("cr", model.resources().get(0).resourceKind()); - Assertions.assertEquals("dkwt", model.resources().get(0).resourceName()); - Assertions.assertEquals("bnjbiksqrglssain", model.resources().get(0).tags().get("p")); + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ReportProperties model = BinaryData.fromString( + "{\"triggerTime\":\"2021-01-28T09:29:32Z\",\"timeZone\":\"zk\",\"resources\":[{\"resourceId\":\"dbihanufhfcbj\",\"resourceType\":\"a\",\"resourceKind\":\"th\",\"resourceOrigin\":\"GCP\",\"accountId\":\"bifpikxwczb\"},{\"resourceId\":\"scnpqxuhivy\",\"resourceType\":\"iwbybrkxvdumjg\",\"resourceKind\":\"fwvuk\",\"resourceOrigin\":\"Azure\",\"accountId\":\"dcc\"}],\"status\":\"Active\",\"errors\":[\"cnyejhkryhtnapcz\"],\"tenantId\":\"okjye\",\"offerGuid\":\"kvnipjoxz\",\"nextTriggerTime\":\"2021-09-07T17:28:25Z\",\"lastTriggerTime\":\"2021-08-30T22:34:51Z\",\"subscriptions\":[\"spodmail\",\"ydehoj\",\"yahux\",\"npmqnjaqwixjspro\"],\"complianceStatus\":{\"m365\":{\"passedCount\":1146923499,\"failedCount\":409698731,\"manualCount\":1721756309,\"notApplicableCount\":1903590590,\"pendingCount\":1508437812}},\"storageInfo\":{\"subscriptionId\":\"t\",\"resourceGroup\":\"mdvpjhulsu\",\"accountName\":\"mkjozkrwf\",\"location\":\"iodjp\"},\"certRecords\":[{\"offerGuid\":\"jdpvwryo\",\"certificationStatus\":\"soacctazakl\",\"ingestionStatus\":\"ahbc\",\"controls\":[{\"controlId\":\"dfdosygexp\",\"controlStatus\":\"jakhmsbzjh\"},{\"controlId\":\"zevdphlx\",\"controlStatus\":\"lthqtrgqjbp\"},{\"controlId\":\"fsinzgvfcjrwzoxx\",\"controlStatus\":\"felluwfzitonpe\"},{\"controlId\":\"pjkjlxofpdv\",\"controlStatus\":\"fxxypininmayhuy\"}]}],\"provisioningState\":\"Canceled\"}") + .toObject(ReportProperties.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-28T09:29:32Z"), model.triggerTime()); + Assertions.assertEquals("zk", model.timeZone()); + Assertions.assertEquals("dbihanufhfcbj", model.resources().get(0).resourceId()); + Assertions.assertEquals("a", model.resources().get(0).resourceType()); + Assertions.assertEquals("th", model.resources().get(0).resourceKind()); + Assertions.assertEquals(ResourceOrigin.GCP, model.resources().get(0).resourceOrigin()); + Assertions.assertEquals("bifpikxwczb", model.resources().get(0).accountId()); + Assertions.assertEquals("kvnipjoxz", model.offerGuid()); + Assertions.assertEquals("t", model.storageInfo().subscriptionId()); + Assertions.assertEquals("mdvpjhulsu", model.storageInfo().resourceGroup()); + Assertions.assertEquals("mkjozkrwf", model.storageInfo().accountName()); + Assertions.assertEquals("iodjp", model.storageInfo().location()); } - @Test - public void testSerialize() { - ReportProperties model = - new ReportProperties() - .withOfferGuid("wjzrnfygxgisp") - .withTimeZone("mvtzfkufub") - .withTriggerTime(OffsetDateTime.parse("2021-04-27T12:55:33Z")) - .withResources( - Arrays - .asList( - new ResourceMetadata() - .withResourceId("bkzgcwrwclx") - .withResourceType("rljdouskcqv") - .withResourceKind("cr") - .withResourceName("dkwt") - .withTags( - mapOf( - "p", "bnjbiksqrglssain", "mgxsab", "wnzlljfmppeeb", "jczdzevndh", "yqduujit")), - new ResourceMetadata() - .withResourceId("rwpdappdsbdkvwrw") - .withResourceType("eusnhutj") - .withResourceKind("tmrldhugjzzdatq") - .withResourceName("oc") - .withTags(mapOf("ozwyiftyhxhuro", "ablgphuticndvk", "wcukjfkgiawxk", "ftyxolniw")))); + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ReportProperties model = new ReportProperties().withTriggerTime(OffsetDateTime.parse("2021-01-28T09:29:32Z")) + .withTimeZone("zk") + .withResources(Arrays.asList( + new ResourceMetadata().withResourceId("dbihanufhfcbj") + .withResourceType("a") + .withResourceKind("th") + .withResourceOrigin(ResourceOrigin.GCP) + .withAccountId("bifpikxwczb"), + new ResourceMetadata().withResourceId("scnpqxuhivy") + .withResourceType("iwbybrkxvdumjg") + .withResourceKind("fwvuk") + .withResourceOrigin(ResourceOrigin.AZURE) + .withAccountId("dcc"))) + .withOfferGuid("kvnipjoxz") + .withStorageInfo(new StorageInfo().withSubscriptionId("t") + .withResourceGroup("mdvpjhulsu") + .withAccountName("mkjozkrwf") + .withLocation("iodjp")); model = BinaryData.fromObject(model).toObject(ReportProperties.class); - Assertions.assertEquals("wjzrnfygxgisp", model.offerGuid()); - Assertions.assertEquals("mvtzfkufub", model.timeZone()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-27T12:55:33Z"), model.triggerTime()); - Assertions.assertEquals("bkzgcwrwclx", model.resources().get(0).resourceId()); - Assertions.assertEquals("rljdouskcqv", model.resources().get(0).resourceType()); - Assertions.assertEquals("cr", model.resources().get(0).resourceKind()); - Assertions.assertEquals("dkwt", model.resources().get(0).resourceName()); - Assertions.assertEquals("bnjbiksqrglssain", model.resources().get(0).tags().get("p")); - } - - @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; + Assertions.assertEquals(OffsetDateTime.parse("2021-01-28T09:29:32Z"), model.triggerTime()); + Assertions.assertEquals("zk", model.timeZone()); + Assertions.assertEquals("dbihanufhfcbj", model.resources().get(0).resourceId()); + Assertions.assertEquals("a", model.resources().get(0).resourceType()); + Assertions.assertEquals("th", model.resources().get(0).resourceKind()); + Assertions.assertEquals(ResourceOrigin.GCP, model.resources().get(0).resourceOrigin()); + Assertions.assertEquals("bifpikxwczb", model.resources().get(0).accountId()); + Assertions.assertEquals("kvnipjoxz", model.offerGuid()); + Assertions.assertEquals("t", model.storageInfo().subscriptionId()); + Assertions.assertEquals("mdvpjhulsu", model.storageInfo().resourceGroup()); + Assertions.assertEquals("mkjozkrwf", model.storageInfo().accountName()); + Assertions.assertEquals("iodjp", model.storageInfo().location()); } } diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ReportResourceInnerTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ReportResourceInnerTests.java index 28da2b949270a..c8bc2310ecf98 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ReportResourceInnerTests.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ReportResourceInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.generated; @@ -8,84 +8,65 @@ import com.azure.resourcemanager.appcomplianceautomation.fluent.models.ReportResourceInner; import com.azure.resourcemanager.appcomplianceautomation.models.ReportProperties; import com.azure.resourcemanager.appcomplianceautomation.models.ResourceMetadata; +import com.azure.resourcemanager.appcomplianceautomation.models.ResourceOrigin; +import com.azure.resourcemanager.appcomplianceautomation.models.StorageInfo; import java.time.OffsetDateTime; import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; public final class ReportResourceInnerTests { - @Test - public void testDeserialize() { - ReportResourceInner model = - BinaryData - .fromString( - "{\"properties\":{\"id\":\"czwlokjyem\",\"status\":\"Disabled\",\"tenantId\":\"ipjoxzjnchgejs\",\"reportName\":\"dmailzydehojw\",\"offerGuid\":\"huxinpmqnj\",\"timeZone\":\"qwixjspro\",\"triggerTime\":\"2021-09-07T15:56:43Z\",\"nextTriggerTime\":\"2021-01-29T23:00:34Z\",\"lastTriggerTime\":\"2021-04-27T04:38:08Z\",\"subscriptions\":[\"jvwmfda\"],\"resources\":[{\"resourceId\":\"cmdv\",\"resourceType\":\"hulsuuvmkjozkrwf\",\"resourceKind\":\"iodjp\",\"resourceName\":\"w\",\"tags\":{}},{\"resourceId\":\"dpvwryoqpsoaccta\",\"resourceType\":\"kljla\",\"resourceKind\":\"cr\",\"resourceName\":\"fdfdosygexpa\",\"tags\":{}},{\"resourceId\":\"akhmsbzjhcrz\",\"resourceType\":\"dphlxaolt\",\"resourceKind\":\"trg\",\"resourceName\":\"bpf\",\"tags\":{}},{\"resourceId\":\"s\",\"resourceType\":\"zgvfcjrwz\",\"resourceKind\":\"xjtfelluwfzit\",\"resourceName\":\"peqfpjkjl\",\"tags\":{}}],\"complianceStatus\":{},\"provisioningState\":\"Creating\"},\"id\":\"pfxxy\",\"name\":\"ininmay\",\"type\":\"uybbkpodep\"}") - .toObject(ReportResourceInner.class); - Assertions.assertEquals("huxinpmqnj", model.properties().offerGuid()); - Assertions.assertEquals("qwixjspro", model.properties().timeZone()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-07T15:56:43Z"), model.properties().triggerTime()); - Assertions.assertEquals("cmdv", model.properties().resources().get(0).resourceId()); - Assertions.assertEquals("hulsuuvmkjozkrwf", model.properties().resources().get(0).resourceType()); - Assertions.assertEquals("iodjp", model.properties().resources().get(0).resourceKind()); - Assertions.assertEquals("w", model.properties().resources().get(0).resourceName()); + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ReportResourceInner model = BinaryData.fromString( + "{\"properties\":{\"triggerTime\":\"2021-01-03T12:42:14Z\",\"timeZone\":\"mhquvgjxp\",\"resources\":[{\"resourceId\":\"czmehmtzopbsp\",\"resourceType\":\"upi\",\"resourceKind\":\"sybbejhph\",\"resourceOrigin\":\"AWS\",\"accountId\":\"sx\"},{\"resourceId\":\"obhdxbmtqioqjze\",\"resourceType\":\"bmufpown\",\"resourceKind\":\"zhwlrxy\",\"resourceOrigin\":\"AWS\",\"accountId\":\"qijgkd\"}],\"status\":\"Reviewing\",\"errors\":[\"lobcufpdznrbtcq\",\"jnqglhqgnu\",\"ooojywifsqe\"],\"tenantId\":\"agdfmglzlh\",\"offerGuid\":\"rifkwm\",\"nextTriggerTime\":\"2021-08-23T15:37:33Z\",\"lastTriggerTime\":\"2021-09-06T10:19:53Z\",\"subscriptions\":[\"nt\",\"cipaouaj\",\"s\",\"ucmpoyfd\"],\"complianceStatus\":{\"m365\":{\"passedCount\":934276292,\"failedCount\":2026517402,\"manualCount\":1139572680,\"notApplicableCount\":1727300200,\"pendingCount\":1891405510}},\"storageInfo\":{\"subscriptionId\":\"qs\",\"resourceGroup\":\"eupewnwreitjz\",\"accountName\":\"lusarh\",\"location\":\"fcqhsmyurkd\"},\"certRecords\":[{\"offerGuid\":\"he\",\"certificationStatus\":\"k\",\"ingestionStatus\":\"txukcdmp\",\"controls\":[{\"controlId\":\"y\",\"controlStatus\":\"nzwuxzd\"},{\"controlId\":\"a\",\"controlStatus\":\"lhmwhfpmrqobm\"}]}],\"provisioningState\":\"Deleting\"},\"id\":\"nryrtihf\",\"name\":\"tijbpzvgnwzsymgl\",\"type\":\"uf\"}") + .toObject(ReportResourceInner.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-03T12:42:14Z"), model.properties().triggerTime()); + Assertions.assertEquals("mhquvgjxp", model.properties().timeZone()); + Assertions.assertEquals("czmehmtzopbsp", model.properties().resources().get(0).resourceId()); + Assertions.assertEquals("upi", model.properties().resources().get(0).resourceType()); + Assertions.assertEquals("sybbejhph", model.properties().resources().get(0).resourceKind()); + Assertions.assertEquals(ResourceOrigin.AWS, model.properties().resources().get(0).resourceOrigin()); + Assertions.assertEquals("sx", model.properties().resources().get(0).accountId()); + Assertions.assertEquals("rifkwm", model.properties().offerGuid()); + Assertions.assertEquals("qs", model.properties().storageInfo().subscriptionId()); + Assertions.assertEquals("eupewnwreitjz", model.properties().storageInfo().resourceGroup()); + Assertions.assertEquals("lusarh", model.properties().storageInfo().accountName()); + Assertions.assertEquals("fcqhsmyurkd", model.properties().storageInfo().location()); } - @Test - public void testSerialize() { - ReportResourceInner model = - new ReportResourceInner() - .withProperties( - new ReportProperties() - .withOfferGuid("huxinpmqnj") - .withTimeZone("qwixjspro") - .withTriggerTime(OffsetDateTime.parse("2021-09-07T15:56:43Z")) - .withResources( - Arrays - .asList( - new ResourceMetadata() - .withResourceId("cmdv") - .withResourceType("hulsuuvmkjozkrwf") - .withResourceKind("iodjp") - .withResourceName("w") - .withTags(mapOf()), - new ResourceMetadata() - .withResourceId("dpvwryoqpsoaccta") - .withResourceType("kljla") - .withResourceKind("cr") - .withResourceName("fdfdosygexpa") - .withTags(mapOf()), - new ResourceMetadata() - .withResourceId("akhmsbzjhcrz") - .withResourceType("dphlxaolt") - .withResourceKind("trg") - .withResourceName("bpf") - .withTags(mapOf()), - new ResourceMetadata() - .withResourceId("s") - .withResourceType("zgvfcjrwz") - .withResourceKind("xjtfelluwfzit") - .withResourceName("peqfpjkjl") - .withTags(mapOf())))); + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ReportResourceInner model = new ReportResourceInner() + .withProperties(new ReportProperties().withTriggerTime(OffsetDateTime.parse("2021-01-03T12:42:14Z")) + .withTimeZone("mhquvgjxp") + .withResources(Arrays.asList( + new ResourceMetadata().withResourceId("czmehmtzopbsp") + .withResourceType("upi") + .withResourceKind("sybbejhph") + .withResourceOrigin(ResourceOrigin.AWS) + .withAccountId("sx"), + new ResourceMetadata().withResourceId("obhdxbmtqioqjze") + .withResourceType("bmufpown") + .withResourceKind("zhwlrxy") + .withResourceOrigin(ResourceOrigin.AWS) + .withAccountId("qijgkd"))) + .withOfferGuid("rifkwm") + .withStorageInfo(new StorageInfo().withSubscriptionId("qs") + .withResourceGroup("eupewnwreitjz") + .withAccountName("lusarh") + .withLocation("fcqhsmyurkd"))); model = BinaryData.fromObject(model).toObject(ReportResourceInner.class); - Assertions.assertEquals("huxinpmqnj", model.properties().offerGuid()); - Assertions.assertEquals("qwixjspro", model.properties().timeZone()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-07T15:56:43Z"), model.properties().triggerTime()); - Assertions.assertEquals("cmdv", model.properties().resources().get(0).resourceId()); - Assertions.assertEquals("hulsuuvmkjozkrwf", model.properties().resources().get(0).resourceType()); - Assertions.assertEquals("iodjp", model.properties().resources().get(0).resourceKind()); - Assertions.assertEquals("w", model.properties().resources().get(0).resourceName()); - } - - @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; + Assertions.assertEquals(OffsetDateTime.parse("2021-01-03T12:42:14Z"), model.properties().triggerTime()); + Assertions.assertEquals("mhquvgjxp", model.properties().timeZone()); + Assertions.assertEquals("czmehmtzopbsp", model.properties().resources().get(0).resourceId()); + Assertions.assertEquals("upi", model.properties().resources().get(0).resourceType()); + Assertions.assertEquals("sybbejhph", model.properties().resources().get(0).resourceKind()); + Assertions.assertEquals(ResourceOrigin.AWS, model.properties().resources().get(0).resourceOrigin()); + Assertions.assertEquals("sx", model.properties().resources().get(0).accountId()); + Assertions.assertEquals("rifkwm", model.properties().offerGuid()); + Assertions.assertEquals("qs", model.properties().storageInfo().subscriptionId()); + Assertions.assertEquals("eupewnwreitjz", model.properties().storageInfo().resourceGroup()); + Assertions.assertEquals("lusarh", model.properties().storageInfo().accountName()); + Assertions.assertEquals("fcqhsmyurkd", model.properties().storageInfo().location()); } } diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ReportResourceListResultTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ReportResourceListResultTests.java new file mode 100644 index 0000000000000..1bf4fd0b4d65f --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ReportResourceListResultTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.appcomplianceautomation.implementation.models.ReportResourceListResult; +import com.azure.resourcemanager.appcomplianceautomation.models.ResourceOrigin; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class ReportResourceListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ReportResourceListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"triggerTime\":\"2021-08-06T16:31:09Z\",\"timeZone\":\"ftutqxlngxlefgu\",\"resources\":[{\"resourceId\":\"xkrxdqmi\",\"resourceType\":\"thz\",\"resourceKind\":\"qdrabhjybigehoqf\",\"resourceOrigin\":\"AWS\",\"accountId\":\"kanyktzlcuiywg\"},{\"resourceId\":\"ywgndrv\",\"resourceType\":\"hzgpphrcgyncocpe\",\"resourceKind\":\"vmmcoofs\",\"resourceOrigin\":\"Azure\",\"accountId\":\"v\"}],\"status\":\"Active\",\"errors\":[\"qabcypm\",\"vkwlzuvccfwnf\",\"bacfionlebxetq\",\"tzxdpnqbqqwx\"],\"tenantId\":\"feallnwsu\",\"offerGuid\":\"snjampmng\",\"nextTriggerTime\":\"2021-10-17T15:10:59Z\",\"lastTriggerTime\":\"2021-08-06T20:55:26Z\",\"subscriptions\":[\"wooc\",\"cbonqvpk\",\"lrxnjeaseiphe\"],\"complianceStatus\":{\"m365\":{\"passedCount\":1111118193,\"failedCount\":1242878165,\"manualCount\":674171704,\"notApplicableCount\":354708232,\"pendingCount\":1285754335}},\"storageInfo\":{\"subscriptionId\":\"wtgrhpdjpj\",\"resourceGroup\":\"asxazjpqyegualhb\",\"accountName\":\"hejjz\",\"location\":\"dudgwdslfhot\"},\"certRecords\":[{\"offerGuid\":\"npwlbjnpg\",\"certificationStatus\":\"ftadehxnltyfs\",\"ingestionStatus\":\"pusuesn\",\"controls\":[{},{}]},{\"offerGuid\":\"jbavorxzdm\",\"certificationStatus\":\"ctbqvudwx\",\"ingestionStatus\":\"dnvowg\",\"controls\":[{},{},{}]},{\"offerGuid\":\"gwdkcglhsl\",\"certificationStatus\":\"jdyggdtji\",\"ingestionStatus\":\"b\",\"controls\":[{},{},{},{}]}],\"provisioningState\":\"Fixing\"},\"id\":\"e\",\"name\":\"kh\",\"type\":\"enevfyexfwhybci\"},{\"properties\":{\"triggerTime\":\"2021-02-12T00:37:49Z\",\"timeZone\":\"yvdcsitynnaa\",\"resources\":[{\"resourceId\":\"ectehf\",\"resourceType\":\"scjeypv\",\"resourceKind\":\"zrkgqhcjrefovg\",\"resourceOrigin\":\"AWS\",\"accountId\":\"leyyvx\"},{\"resourceId\":\"qjpkcattpngjcrc\",\"resourceType\":\"sqpjhvmdajvn\",\"resourceKind\":\"ounqecano\",\"resourceOrigin\":\"GCP\",\"accountId\":\"fhyhltrpmopjmcma\"},{\"resourceId\":\"u\",\"resourceType\":\"thfuiuaodsfcpkvx\",\"resourceKind\":\"puozmyzydag\",\"resourceOrigin\":\"AWS\",\"accountId\":\"bezy\"}],\"status\":\"Reviewing\",\"errors\":[\"twhrdxwzywqsm\"],\"tenantId\":\"ureximoryocfs\",\"offerGuid\":\"s\",\"nextTriggerTime\":\"2021-06-13T04:15:30Z\",\"lastTriggerTime\":\"2021-01-31T18:49:05Z\",\"subscriptions\":[\"kiiuxhqyudxor\"],\"complianceStatus\":{\"m365\":{\"passedCount\":2107942439,\"failedCount\":1747091504,\"manualCount\":1085417867,\"notApplicableCount\":93101784,\"pendingCount\":1447081543}},\"storageInfo\":{\"subscriptionId\":\"kdvjsll\",\"resourceGroup\":\"vvdfwatkpnpul\",\"accountName\":\"xbczwtruwiqz\",\"location\":\"j\"},\"certRecords\":[{\"offerGuid\":\"myokacspkwlh\",\"certificationStatus\":\"obpxjmflbvvn\",\"ingestionStatus\":\"rkcciwwzjuqk\",\"controls\":[{}]}],\"provisioningState\":\"Updating\"},\"id\":\"wkuofoskghsauu\",\"name\":\"mjmvxieduugidyjr\",\"type\":\"f\"},{\"properties\":{\"triggerTime\":\"2021-04-30T20:35:21Z\",\"timeZone\":\"aos\",\"resources\":[{\"resourceId\":\"xc\",\"resourceType\":\"npc\",\"resourceKind\":\"ocohslkevleg\",\"resourceOrigin\":\"Azure\",\"accountId\":\"u\"}],\"status\":\"Disabled\",\"errors\":[\"axkffei\",\"th\",\"vmezy\"],\"tenantId\":\"hxmzsbbzoggig\",\"offerGuid\":\"wburvjxxjnspydpt\",\"nextTriggerTime\":\"2021-09-24T03:08Z\",\"lastTriggerTime\":\"2021-12-01T07:03:23Z\",\"subscriptions\":[\"knvudwtiukb\",\"dng\",\"pocipazyxoegu\"],\"complianceStatus\":{\"m365\":{\"passedCount\":642461794,\"failedCount\":244069221,\"manualCount\":1142457061,\"notApplicableCount\":2112033193,\"pendingCount\":2000492920}},\"storageInfo\":{\"subscriptionId\":\"ntypmrbpizcdrqj\",\"resourceGroup\":\"pyd\",\"accountName\":\"yhxdeoejzicwi\",\"location\":\"jttgzf\"},\"certRecords\":[{\"offerGuid\":\"cbkhajdeyeamdph\",\"certificationStatus\":\"alpbuxwgipwhon\",\"ingestionStatus\":\"kgshwa\",\"controls\":[{},{},{},{}]},{\"offerGuid\":\"zbinjeputtm\",\"certificationStatus\":\"wnuzoqftiyqzrnkc\",\"ingestionStatus\":\"yx\",\"controls\":[{}]},{\"offerGuid\":\"lsicohoqqnwv\",\"certificationStatus\":\"yav\",\"ingestionStatus\":\"heun\",\"controls\":[{},{},{},{}]},{\"offerGuid\":\"gyxzk\",\"certificationStatus\":\"ocukoklyax\",\"ingestionStatus\":\"onuq\",\"controls\":[{},{}]}],\"provisioningState\":\"Fixing\"},\"id\":\"ypewrmjmwvvjekt\",\"name\":\"xsenhwlr\",\"type\":\"ffrzpwvlqdqgbiqy\"}],\"nextLink\":\"hkaetcktvfc\"}") + .toObject(ReportResourceListResult.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-06T16:31:09Z"), + model.value().get(0).properties().triggerTime()); + Assertions.assertEquals("ftutqxlngxlefgu", model.value().get(0).properties().timeZone()); + Assertions.assertEquals("xkrxdqmi", model.value().get(0).properties().resources().get(0).resourceId()); + Assertions.assertEquals("thz", model.value().get(0).properties().resources().get(0).resourceType()); + Assertions.assertEquals("qdrabhjybigehoqf", + model.value().get(0).properties().resources().get(0).resourceKind()); + Assertions.assertEquals(ResourceOrigin.AWS, + model.value().get(0).properties().resources().get(0).resourceOrigin()); + Assertions.assertEquals("kanyktzlcuiywg", model.value().get(0).properties().resources().get(0).accountId()); + Assertions.assertEquals("snjampmng", model.value().get(0).properties().offerGuid()); + Assertions.assertEquals("wtgrhpdjpj", model.value().get(0).properties().storageInfo().subscriptionId()); + Assertions.assertEquals("asxazjpqyegualhb", model.value().get(0).properties().storageInfo().resourceGroup()); + Assertions.assertEquals("hejjz", model.value().get(0).properties().storageInfo().accountName()); + Assertions.assertEquals("dudgwdslfhot", model.value().get(0).properties().storageInfo().location()); + Assertions.assertEquals("hkaetcktvfc", model.nextLink()); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ReportResourcePatchTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ReportResourcePatchTests.java index b9b62a21480ca..781e41e750dd5 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ReportResourcePatchTests.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ReportResourcePatchTests.java @@ -1,79 +1,66 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcomplianceautomation.models.ReportProperties; +import com.azure.resourcemanager.appcomplianceautomation.models.ReportPatchProperties; import com.azure.resourcemanager.appcomplianceautomation.models.ReportResourcePatch; import com.azure.resourcemanager.appcomplianceautomation.models.ResourceMetadata; +import com.azure.resourcemanager.appcomplianceautomation.models.ResourceOrigin; +import com.azure.resourcemanager.appcomplianceautomation.models.StorageInfo; import java.time.OffsetDateTime; import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; public final class ReportResourcePatchTests { - @Test - public void testDeserialize() { - ReportResourcePatch model = - BinaryData - .fromString( - "{\"properties\":{\"id\":\"qktapspwgcuert\",\"status\":\"Failed\",\"tenantId\":\"o\",\"reportName\":\"qw\",\"offerGuid\":\"mdgbbjfdd\",\"timeZone\":\"mbmbexppbh\",\"triggerTime\":\"2021-05-23T22:50:57Z\",\"nextTriggerTime\":\"2021-10-16T18:25:20Z\",\"lastTriggerTime\":\"2021-06-19T01:51:06Z\",\"subscriptions\":[\"fpsalgbqu\"],\"resources\":[{\"resourceId\":\"gjyjgzjaoyfhrtxi\",\"resourceType\":\"erkujys\",\"resourceKind\":\"eju\",\"resourceName\":\"qawrlyxwj\",\"tags\":{}},{\"resourceId\":\"prbnwbxgjvtbv\",\"resourceType\":\"sszdnru\",\"resourceKind\":\"guhmuouqfpr\",\"resourceName\":\"wbnguitnwui\",\"tags\":{}}],\"complianceStatus\":{},\"provisioningState\":\"Failed\"}}") - .toObject(ReportResourcePatch.class); - Assertions.assertEquals("mdgbbjfdd", model.properties().offerGuid()); - Assertions.assertEquals("mbmbexppbh", model.properties().timeZone()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-23T22:50:57Z"), model.properties().triggerTime()); - Assertions.assertEquals("gjyjgzjaoyfhrtxi", model.properties().resources().get(0).resourceId()); - Assertions.assertEquals("erkujys", model.properties().resources().get(0).resourceType()); - Assertions.assertEquals("eju", model.properties().resources().get(0).resourceKind()); - Assertions.assertEquals("qawrlyxwj", model.properties().resources().get(0).resourceName()); + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ReportResourcePatch model = BinaryData.fromString( + "{\"properties\":{\"triggerTime\":\"2021-06-25T18:50:31Z\",\"timeZone\":\"qxhocdgeablgphut\",\"resources\":[{\"resourceId\":\"dvkaozw\",\"resourceType\":\"ftyhxhurokf\",\"resourceKind\":\"xolniwpwcukjfk\",\"resourceOrigin\":\"AWS\",\"accountId\":\"xklrypl\"}],\"status\":\"Failed\",\"errors\":[\"syyp\"],\"tenantId\":\"dhsgcba\",\"offerGuid\":\"hejkotynqgou\",\"nextTriggerTime\":\"2021-01-30T20:47:53Z\",\"lastTriggerTime\":\"2021-03-19T07:27:19Z\",\"subscriptions\":[\"wyqkgfgibm\"],\"complianceStatus\":{\"m365\":{\"passedCount\":1464742216,\"failedCount\":712813176,\"manualCount\":1093417192,\"notApplicableCount\":384573586,\"pendingCount\":1438808958}},\"storageInfo\":{\"subscriptionId\":\"e\",\"resourceGroup\":\"ytb\",\"accountName\":\"qfou\",\"location\":\"mmnkzsmodmgl\"},\"certRecords\":[{\"offerGuid\":\"b\",\"certificationStatus\":\"tmut\",\"ingestionStatus\":\"qktapspwgcuert\",\"controls\":[{\"controlId\":\"o\",\"controlStatus\":\"qw\"},{\"controlId\":\"mdgbbjfdd\",\"controlStatus\":\"bmbexppbhtqqro\"}]},{\"offerGuid\":\"p\",\"certificationStatus\":\"s\",\"ingestionStatus\":\"gbquxigj\",\"controls\":[{\"controlId\":\"jaoyfhrtx\",\"controlStatus\":\"n\"},{\"controlId\":\"kujysvlejuvfq\",\"controlStatus\":\"rlyxwjkcprbnw\"},{\"controlId\":\"gjvtbv\",\"controlStatus\":\"sszdnru\"},{\"controlId\":\"guhmuouqfpr\",\"controlStatus\":\"wbnguitnwui\"}]},{\"offerGuid\":\"a\",\"certificationStatus\":\"ufizuckyf\",\"ingestionStatus\":\"rfidfvzwdz\",\"controls\":[{\"controlId\":\"mwisdkfthwxmnt\",\"controlStatus\":\"waopvkmijcmmxd\"}]}],\"provisioningState\":\"Deleting\"}}") + .toObject(ReportResourcePatch.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-25T18:50:31Z"), model.properties().triggerTime()); + Assertions.assertEquals("qxhocdgeablgphut", model.properties().timeZone()); + Assertions.assertEquals("dvkaozw", model.properties().resources().get(0).resourceId()); + Assertions.assertEquals("ftyhxhurokf", model.properties().resources().get(0).resourceType()); + Assertions.assertEquals("xolniwpwcukjfk", model.properties().resources().get(0).resourceKind()); + Assertions.assertEquals(ResourceOrigin.AWS, model.properties().resources().get(0).resourceOrigin()); + Assertions.assertEquals("xklrypl", model.properties().resources().get(0).accountId()); + Assertions.assertEquals("hejkotynqgou", model.properties().offerGuid()); + Assertions.assertEquals("e", model.properties().storageInfo().subscriptionId()); + Assertions.assertEquals("ytb", model.properties().storageInfo().resourceGroup()); + Assertions.assertEquals("qfou", model.properties().storageInfo().accountName()); + Assertions.assertEquals("mmnkzsmodmgl", model.properties().storageInfo().location()); } - @Test - public void testSerialize() { - ReportResourcePatch model = - new ReportResourcePatch() - .withProperties( - new ReportProperties() - .withOfferGuid("mdgbbjfdd") - .withTimeZone("mbmbexppbh") - .withTriggerTime(OffsetDateTime.parse("2021-05-23T22:50:57Z")) - .withResources( - Arrays - .asList( - new ResourceMetadata() - .withResourceId("gjyjgzjaoyfhrtxi") - .withResourceType("erkujys") - .withResourceKind("eju") - .withResourceName("qawrlyxwj") - .withTags(mapOf()), - new ResourceMetadata() - .withResourceId("prbnwbxgjvtbv") - .withResourceType("sszdnru") - .withResourceKind("guhmuouqfpr") - .withResourceName("wbnguitnwui") - .withTags(mapOf())))); + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ReportResourcePatch model = new ReportResourcePatch() + .withProperties(new ReportPatchProperties().withTriggerTime(OffsetDateTime.parse("2021-06-25T18:50:31Z")) + .withTimeZone("qxhocdgeablgphut") + .withResources(Arrays.asList(new ResourceMetadata().withResourceId("dvkaozw") + .withResourceType("ftyhxhurokf") + .withResourceKind("xolniwpwcukjfk") + .withResourceOrigin(ResourceOrigin.AWS) + .withAccountId("xklrypl"))) + .withOfferGuid("hejkotynqgou") + .withStorageInfo(new StorageInfo().withSubscriptionId("e") + .withResourceGroup("ytb") + .withAccountName("qfou") + .withLocation("mmnkzsmodmgl"))); model = BinaryData.fromObject(model).toObject(ReportResourcePatch.class); - Assertions.assertEquals("mdgbbjfdd", model.properties().offerGuid()); - Assertions.assertEquals("mbmbexppbh", model.properties().timeZone()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-23T22:50:57Z"), model.properties().triggerTime()); - Assertions.assertEquals("gjyjgzjaoyfhrtxi", model.properties().resources().get(0).resourceId()); - Assertions.assertEquals("erkujys", model.properties().resources().get(0).resourceType()); - Assertions.assertEquals("eju", model.properties().resources().get(0).resourceKind()); - Assertions.assertEquals("qawrlyxwj", model.properties().resources().get(0).resourceName()); - } - - @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; + Assertions.assertEquals(OffsetDateTime.parse("2021-06-25T18:50:31Z"), model.properties().triggerTime()); + Assertions.assertEquals("qxhocdgeablgphut", model.properties().timeZone()); + Assertions.assertEquals("dvkaozw", model.properties().resources().get(0).resourceId()); + Assertions.assertEquals("ftyhxhurokf", model.properties().resources().get(0).resourceType()); + Assertions.assertEquals("xolniwpwcukjfk", model.properties().resources().get(0).resourceKind()); + Assertions.assertEquals(ResourceOrigin.AWS, model.properties().resources().get(0).resourceOrigin()); + Assertions.assertEquals("xklrypl", model.properties().resources().get(0).accountId()); + Assertions.assertEquals("hejkotynqgou", model.properties().offerGuid()); + Assertions.assertEquals("e", model.properties().storageInfo().subscriptionId()); + Assertions.assertEquals("ytb", model.properties().storageInfo().resourceGroup()); + Assertions.assertEquals("qfou", model.properties().storageInfo().accountName()); + Assertions.assertEquals("mmnkzsmodmgl", model.properties().storageInfo().location()); } } diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ResourceMetadataTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ResourceMetadataTests.java index 1a86733106122..4f67ebb0cea5f 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ResourceMetadataTests.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ResourceMetadataTests.java @@ -1,56 +1,39 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.appcomplianceautomation.models.ResourceMetadata; -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.appcomplianceautomation.models.ResourceOrigin; import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; public final class ResourceMetadataTests { - @Test - public void testDeserialize() { - ResourceMetadata model = - BinaryData - .fromString( - "{\"resourceId\":\"yypnddhsgcbacphe\",\"resourceType\":\"ot\",\"resourceKind\":\"qgoulznd\",\"resourceName\":\"kwy\",\"tags\":{\"rxybz\":\"fgibmadgakeq\",\"mnkzsmod\":\"qedqytbciqfoufl\"}}") - .toObject(ResourceMetadata.class); - Assertions.assertEquals("yypnddhsgcbacphe", model.resourceId()); - Assertions.assertEquals("ot", model.resourceType()); - Assertions.assertEquals("qgoulznd", model.resourceKind()); - Assertions.assertEquals("kwy", model.resourceName()); - Assertions.assertEquals("fgibmadgakeq", model.tags().get("rxybz")); + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ResourceMetadata model = BinaryData.fromString( + "{\"resourceId\":\"podepoo\",\"resourceType\":\"nuvamiheogna\",\"resourceKind\":\"zxtheotusivyevcc\",\"resourceOrigin\":\"Azure\",\"accountId\":\"nhungbw\"}") + .toObject(ResourceMetadata.class); + Assertions.assertEquals("podepoo", model.resourceId()); + Assertions.assertEquals("nuvamiheogna", model.resourceType()); + Assertions.assertEquals("zxtheotusivyevcc", model.resourceKind()); + Assertions.assertEquals(ResourceOrigin.AZURE, model.resourceOrigin()); + Assertions.assertEquals("nhungbw", model.accountId()); } - @Test - public void testSerialize() { - ResourceMetadata model = - new ResourceMetadata() - .withResourceId("yypnddhsgcbacphe") - .withResourceType("ot") - .withResourceKind("qgoulznd") - .withResourceName("kwy") - .withTags(mapOf("rxybz", "fgibmadgakeq", "mnkzsmod", "qedqytbciqfoufl")); + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ResourceMetadata model = new ResourceMetadata().withResourceId("podepoo") + .withResourceType("nuvamiheogna") + .withResourceKind("zxtheotusivyevcc") + .withResourceOrigin(ResourceOrigin.AZURE) + .withAccountId("nhungbw"); model = BinaryData.fromObject(model).toObject(ResourceMetadata.class); - Assertions.assertEquals("yypnddhsgcbacphe", model.resourceId()); - Assertions.assertEquals("ot", model.resourceType()); - Assertions.assertEquals("qgoulznd", model.resourceKind()); - Assertions.assertEquals("kwy", model.resourceName()); - Assertions.assertEquals("fgibmadgakeq", model.tags().get("rxybz")); - } - - @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; + Assertions.assertEquals("podepoo", model.resourceId()); + Assertions.assertEquals("nuvamiheogna", model.resourceType()); + Assertions.assertEquals("zxtheotusivyevcc", model.resourceKind()); + Assertions.assertEquals(ResourceOrigin.AZURE, model.resourceOrigin()); + Assertions.assertEquals("nhungbw", model.accountId()); } } diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ResponsibilityResourceTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ResponsibilityResourceTests.java new file mode 100644 index 0000000000000..add0ce10cee08 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ResponsibilityResourceTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.appcomplianceautomation.models.ResponsibilityResource; +import org.junit.jupiter.api.Assertions; + +public final class ResponsibilityResourceTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ResponsibilityResource model = BinaryData.fromString( + "{\"resourceId\":\"ziuiefozbhdm\",\"accountId\":\"l\",\"resourceType\":\"qhoftrmaequiah\",\"resourceOrigin\":\"AWS\",\"resourceStatus\":\"Unhealthy\",\"resourceStatusChangeDate\":\"2021-08-02T03:13:09Z\",\"recommendationIds\":[\"z\",\"iyylhalnswhccsp\"]}") + .toObject(ResponsibilityResource.class); + Assertions.assertEquals("z", model.recommendationIds().get(0)); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ResponsibilityTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ResponsibilityTests.java new file mode 100644 index 0000000000000..791fd7c0c4d86 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ResponsibilityTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.appcomplianceautomation.models.Responsibility; +import org.junit.jupiter.api.Assertions; + +public final class ResponsibilityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Responsibility model = BinaryData.fromString( + "{\"responsibilityId\":\"kwyfzqwhxxbuyqax\",\"responsibilityTitle\":\"eqz\",\"responsibilityDescription\":\"priolx\",\"responsibilityType\":\"Manual\",\"responsibilitySeverity\":\"Low\",\"responsibilityStatus\":\"PendingApproval\",\"responsibilityEnvironment\":\"General\",\"failedResourceCount\":136991246,\"totalResourceCount\":1283351152,\"resourceList\":[{\"resourceId\":\"wcsdbnwdcfhucq\",\"accountId\":\"fuvglsbjjca\",\"resourceType\":\"xbvtvudu\",\"resourceOrigin\":\"AWS\",\"resourceStatus\":\"Unhealthy\",\"resourceStatusChangeDate\":\"2021-10-18T10:35:02Z\",\"recommendationIds\":[\"qtvcofudflvkgj\",\"bgdknnqv\"]},{\"resourceId\":\"znqntoru\",\"accountId\":\"gsahmkycgrauw\",\"resourceType\":\"etaebu\",\"resourceOrigin\":\"GCP\",\"resourceStatus\":\"Unhealthy\",\"resourceStatusChangeDate\":\"2021-01-16T01:35:10Z\",\"recommendationIds\":[\"zlxwabmqoefkifr\"]},{\"resourceId\":\"puqujmqlgkfbtn\",\"accountId\":\"aongbj\",\"resourceType\":\"tujitcjedft\",\"resourceOrigin\":\"Azure\",\"resourceStatus\":\"Healthy\",\"resourceStatusChangeDate\":\"2021-01-22T13:54:08Z\",\"recommendationIds\":[\"dcpzfoqo\"]}],\"recommendationList\":[{\"recommendationId\":\"bxarzgszufoxci\",\"recommendationShortName\":\"p\",\"recommendationSolutions\":[{\"recommendationSolutionIndex\":\"mciodhkhazxkhn\",\"recommendationSolutionContent\":\"onlwntoeg\",\"isRecommendSolution\":\"false\"},{\"recommendationSolutionIndex\":\"bwh\",\"recommendationSolutionContent\":\"z\",\"isRecommendSolution\":\"true\"}]},{\"recommendationId\":\"vexztvbtqgs\",\"recommendationShortName\":\"aoyzkoow\",\"recommendationSolutions\":[{\"recommendationSolutionIndex\":\"guxawqaldsyuuxi\",\"recommendationSolutionContent\":\"rqf\",\"isRecommendSolution\":\"false\"},{\"recommendationSolutionIndex\":\"znkbykutwpfhpagm\",\"recommendationSolutionContent\":\"skdsnfdsdoakg\",\"isRecommendSolution\":\"true\"},{\"recommendationSolutionIndex\":\"kkze\",\"recommendationSolutionContent\":\"l\",\"isRecommendSolution\":\"false\"},{\"recommendationSolutionIndex\":\"usdsttwv\",\"recommendationSolutionContent\":\"vbbejdcng\",\"isRecommendSolution\":\"true\"}]}],\"guidance\":\"akufgmjz\",\"justification\":\"rdgrtw\",\"evidenceFiles\":[\"u\",\"zkopb\",\"inrfdwoyu\"]}") + .toObject(Responsibility.class); + Assertions.assertEquals(136991246, model.failedResourceCount()); + Assertions.assertEquals(1283351152, model.totalResourceCount()); + Assertions.assertEquals("u", model.evidenceFiles().get(0)); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ScopingAnswerTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ScopingAnswerTests.java new file mode 100644 index 0000000000000..09b3c92a87c69 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ScopingAnswerTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.appcomplianceautomation.models.ScopingAnswer; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ScopingAnswerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ScopingAnswer model = BinaryData + .fromString("{\"questionId\":\"a\",\"answers\":[\"gvvs\",\"cyajguqf\",\"wygzlvdnkfxusem\",\"wzrmuh\"]}") + .toObject(ScopingAnswer.class); + Assertions.assertEquals("a", model.questionId()); + Assertions.assertEquals("gvvs", model.answers().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ScopingAnswer model = new ScopingAnswer().withQuestionId("a") + .withAnswers(Arrays.asList("gvvs", "cyajguqf", "wygzlvdnkfxusem", "wzrmuh")); + model = BinaryData.fromObject(model).toObject(ScopingAnswer.class); + Assertions.assertEquals("a", model.questionId()); + Assertions.assertEquals("gvvs", model.answers().get(0)); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ScopingConfigurationPropertiesTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ScopingConfigurationPropertiesTests.java new file mode 100644 index 0000000000000..7980fb405d71d --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ScopingConfigurationPropertiesTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.appcomplianceautomation.models.ScopingAnswer; +import com.azure.resourcemanager.appcomplianceautomation.models.ScopingConfigurationProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ScopingConfigurationPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ScopingConfigurationProperties model = BinaryData.fromString( + "{\"answers\":[{\"questionId\":\"qtfihwhbotzinga\",\"answers\":[\"pph\",\"szqzudphqamv\"]},{\"questionId\":\"kfwynw\",\"answers\":[\"tbvkayhmtnvyq\",\"atkzwpcnpw\"]}],\"provisioningState\":\"Fixing\"}") + .toObject(ScopingConfigurationProperties.class); + Assertions.assertEquals("qtfihwhbotzinga", model.answers().get(0).questionId()); + Assertions.assertEquals("pph", model.answers().get(0).answers().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ScopingConfigurationProperties model = new ScopingConfigurationProperties().withAnswers(Arrays.asList( + new ScopingAnswer().withQuestionId("qtfihwhbotzinga").withAnswers(Arrays.asList("pph", "szqzudphqamv")), + new ScopingAnswer().withQuestionId("kfwynw").withAnswers(Arrays.asList("tbvkayhmtnvyq", "atkzwpcnpw")))); + model = BinaryData.fromObject(model).toObject(ScopingConfigurationProperties.class); + Assertions.assertEquals("qtfihwhbotzinga", model.answers().get(0).questionId()); + Assertions.assertEquals("pph", model.answers().get(0).answers().get(0)); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ScopingConfigurationResourceInnerTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ScopingConfigurationResourceInnerTests.java new file mode 100644 index 0000000000000..0c2c9c9c0be3a --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ScopingConfigurationResourceInnerTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.ScopingConfigurationResourceInner; +import com.azure.resourcemanager.appcomplianceautomation.models.ScopingAnswer; +import com.azure.resourcemanager.appcomplianceautomation.models.ScopingConfigurationProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ScopingConfigurationResourceInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ScopingConfigurationResourceInner model = BinaryData.fromString( + "{\"properties\":{\"answers\":[{\"questionId\":\"luqhhahhxv\",\"answers\":[\"mzkwpjg\"]}],\"provisioningState\":\"Fixing\"},\"id\":\"ughftqsx\",\"name\":\"qxujxukndxd\",\"type\":\"grjguufzd\"}") + .toObject(ScopingConfigurationResourceInner.class); + Assertions.assertEquals("luqhhahhxv", model.properties().answers().get(0).questionId()); + Assertions.assertEquals("mzkwpjg", model.properties().answers().get(0).answers().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ScopingConfigurationResourceInner model + = new ScopingConfigurationResourceInner().withProperties(new ScopingConfigurationProperties().withAnswers( + Arrays.asList(new ScopingAnswer().withQuestionId("luqhhahhxv").withAnswers(Arrays.asList("mzkwpjg"))))); + model = BinaryData.fromObject(model).toObject(ScopingConfigurationResourceInner.class); + Assertions.assertEquals("luqhhahhxv", model.properties().answers().get(0).questionId()); + Assertions.assertEquals("mzkwpjg", model.properties().answers().get(0).answers().get(0)); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ScopingConfigurationResourceListResultTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ScopingConfigurationResourceListResultTests.java new file mode 100644 index 0000000000000..924c1442d02da --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ScopingConfigurationResourceListResultTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.appcomplianceautomation.implementation.models.ScopingConfigurationResourceListResult; +import org.junit.jupiter.api.Assertions; + +public final class ScopingConfigurationResourceListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ScopingConfigurationResourceListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"answers\":[{\"questionId\":\"qdpsqxqvpsvu\",\"answers\":[\"mgccelvezrypq\"]},{\"questionId\":\"mfe\",\"answers\":[\"erqwkyhkobopg\",\"edkowepbqpcrfk\"]},{\"questionId\":\"wccsnjvcdwxlpqek\",\"answers\":[\"nkhtjsyingw\"]},{\"questionId\":\"qatmtdhtmdvy\",\"answers\":[\"ikdgszywkbir\",\"yuzhlhkjoqrvq\"]}],\"provisioningState\":\"Updating\"},\"id\":\"jinrvgoupmfiibfg\",\"name\":\"jioolvrwxk\",\"type\":\"tkkgllqwjy\"},{\"properties\":{\"answers\":[{\"questionId\":\"ayvblmhvkzuhbx\",\"answers\":[\"yhgsopbyrqufe\",\"xuvw\"]},{\"questionId\":\"fbn\",\"answers\":[\"mctlpdngitv\",\"bmhrixkwmyijejv\"]},{\"questionId\":\"grhbpn\",\"answers\":[\"xexccbdreaxhcexd\",\"rvqahqkghtpwi\"]}],\"provisioningState\":\"Deleting\"},\"id\":\"jsvfycxzbfvoowv\",\"name\":\"vmtgjqppy\",\"type\":\"s\"}],\"nextLink\":\"on\"}") + .toObject(ScopingConfigurationResourceListResult.class); + Assertions.assertEquals("qdpsqxqvpsvu", model.value().get(0).properties().answers().get(0).questionId()); + Assertions.assertEquals("mgccelvezrypq", model.value().get(0).properties().answers().get(0).answers().get(0)); + Assertions.assertEquals("on", model.nextLink()); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ScopingQuestionTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ScopingQuestionTests.java new file mode 100644 index 0000000000000..dc61fd09601f1 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ScopingQuestionTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.appcomplianceautomation.models.ScopingQuestion; + +public final class ScopingQuestionTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ScopingQuestion model = BinaryData.fromString( + "{\"questionId\":\"lwrq\",\"superiorQuestionId\":\"ktsthsucocmny\",\"inputType\":\"YesNoNa\",\"optionIds\":[\"t\"],\"rules\":[\"ValidEmail\"],\"showSubQuestionsValue\":\"wrqpue\"}") + .toObject(ScopingQuestion.class); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ScopingQuestionsInnerTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ScopingQuestionsInnerTests.java new file mode 100644 index 0000000000000..2121497c95bca --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/ScopingQuestionsInnerTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.appcomplianceautomation.fluent.models.ScopingQuestionsInner; + +public final class ScopingQuestionsInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ScopingQuestionsInner model = BinaryData.fromString( + "{\"questions\":[{\"questionId\":\"hibnuqqkpika\",\"superiorQuestionId\":\"gvtqagnbuynh\",\"inputType\":\"Email\",\"optionIds\":[\"gmebfsiarbutrcv\"],\"rules\":[\"Urls\"],\"showSubQuestionsValue\":\"zmhjrunmp\"},{\"questionId\":\"ttdbhrbnl\",\"superiorQuestionId\":\"kx\",\"inputType\":\"YesNoNa\",\"optionIds\":[\"k\",\"bhenbtkcxywnyt\",\"rsyn\",\"qidybyx\"],\"rules\":[\"ValidGuid\"],\"showSubQuestionsValue\":\"lhaaxdbabp\"}]}") + .toObject(ScopingQuestionsInner.class); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/SnapshotDownloadRequestTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/SnapshotDownloadRequestTests.java index cc9ce6792be02..90e90798eca89 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/SnapshotDownloadRequestTests.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/SnapshotDownloadRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.generated; @@ -8,31 +8,26 @@ import com.azure.resourcemanager.appcomplianceautomation.models.DownloadType; import com.azure.resourcemanager.appcomplianceautomation.models.SnapshotDownloadRequest; import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; public final class SnapshotDownloadRequestTests { - @Test - public void testDeserialize() { - SnapshotDownloadRequest model = - BinaryData - .fromString( - "{\"reportCreatorTenantId\":\"qzbqjvsov\",\"downloadType\":\"ComplianceDetailedPdfReport\",\"offerGuid\":\"kacspkw\"}") - .toObject(SnapshotDownloadRequest.class); - Assertions.assertEquals("qzbqjvsov", model.reportCreatorTenantId()); + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SnapshotDownloadRequest model = BinaryData.fromString( + "{\"reportCreatorTenantId\":\"fk\",\"downloadType\":\"ComplianceDetailedPdfReport\",\"offerGuid\":\"sexso\"}") + .toObject(SnapshotDownloadRequest.class); + Assertions.assertEquals("fk", model.reportCreatorTenantId()); Assertions.assertEquals(DownloadType.COMPLIANCE_DETAILED_PDF_REPORT, model.downloadType()); - Assertions.assertEquals("kacspkw", model.offerGuid()); + Assertions.assertEquals("sexso", model.offerGuid()); } - @Test - public void testSerialize() { - SnapshotDownloadRequest model = - new SnapshotDownloadRequest() - .withReportCreatorTenantId("qzbqjvsov") - .withDownloadType(DownloadType.COMPLIANCE_DETAILED_PDF_REPORT) - .withOfferGuid("kacspkw"); + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SnapshotDownloadRequest model = new SnapshotDownloadRequest().withReportCreatorTenantId("fk") + .withDownloadType(DownloadType.COMPLIANCE_DETAILED_PDF_REPORT) + .withOfferGuid("sexso"); model = BinaryData.fromObject(model).toObject(SnapshotDownloadRequest.class); - Assertions.assertEquals("qzbqjvsov", model.reportCreatorTenantId()); + Assertions.assertEquals("fk", model.reportCreatorTenantId()); Assertions.assertEquals(DownloadType.COMPLIANCE_DETAILED_PDF_REPORT, model.downloadType()); - Assertions.assertEquals("kacspkw", model.offerGuid()); + Assertions.assertEquals("sexso", model.offerGuid()); } } diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/SnapshotPropertiesTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/SnapshotPropertiesTests.java index fb36c6c31c971..1fa03de860954 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/SnapshotPropertiesTests.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/SnapshotPropertiesTests.java @@ -1,26 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.appcomplianceautomation.models.SnapshotProperties; -import org.junit.jupiter.api.Test; public final class SnapshotPropertiesTests { - @Test - public void testDeserialize() { - SnapshotProperties model = - BinaryData - .fromString( - "{\"id\":\"xhvpmoue\",\"snapshotName\":\"dzxibqeojnxqbzvd\",\"createdAt\":\"2021-01-10T12:02:15Z\",\"provisioningState\":\"Succeeded\",\"reportProperties\":{\"id\":\"icbtwnpzao\",\"status\":\"Active\",\"tenantId\":\"rhcffcydd\",\"reportName\":\"mjthjqkwp\",\"offerGuid\":\"icxm\",\"timeZone\":\"ciwqvhk\",\"triggerTime\":\"2021-03-25T23:46:11Z\",\"nextTriggerTime\":\"2021-04-08T23:48:15Z\",\"lastTriggerTime\":\"2021-04-28T05:58:26Z\",\"subscriptions\":[\"opbobj\",\"ghmewuam\",\"uhrzayvvt\"],\"resources\":[{\"resourceId\":\"vdfgiotk\",\"resourceType\":\"utqxlngx\",\"resourceKind\":\"fgugnxkrxdqmid\",\"resourceName\":\"hzrvqd\",\"tags\":{}},{\"resourceId\":\"bhj\",\"resourceType\":\"igeho\",\"resourceKind\":\"bowsk\",\"resourceName\":\"yktz\",\"tags\":{}},{\"resourceId\":\"u\",\"resourceType\":\"wgqyw\",\"resourceKind\":\"drvyn\",\"resourceName\":\"gpphrcgyn\",\"tags\":{}},{\"resourceId\":\"cpecfvmmcoofs\",\"resourceType\":\"zevgb\",\"resourceKind\":\"jqabcypmivkwlzuv\",\"resourceName\":\"fwnfnb\",\"tags\":{}}],\"complianceStatus\":{},\"provisioningState\":\"Deleting\"},\"complianceResults\":[{\"complianceName\":\"etqgtzxdpnq\",\"categories\":[]},{\"complianceName\":\"xrjfeallnwsub\",\"categories\":[]},{\"complianceName\":\"ampmngnz\",\"categories\":[]}]}") - .toObject(SnapshotProperties.class); - } - - @Test - public void testSerialize() { - SnapshotProperties model = new SnapshotProperties(); - model = BinaryData.fromObject(model).toObject(SnapshotProperties.class); + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SnapshotProperties model = BinaryData.fromString( + "{\"snapshotName\":\"oayqc\",\"createdAt\":\"2021-09-09T06:40:06Z\",\"provisioningState\":\"Creating\",\"reportProperties\":{\"triggerTime\":\"2021-07-21T21:53:41Z\",\"timeZone\":\"zg\",\"resources\":[{\"resourceId\":\"zmh\",\"resourceType\":\"ongmtsa\",\"resourceKind\":\"cbpwxqpsrknft\",\"resourceOrigin\":\"Azure\",\"accountId\":\"iuhprwmdyvxqta\"}],\"status\":\"Disabled\",\"errors\":[\"ro\",\"qbex\",\"mcqibycnojv\"],\"tenantId\":\"mefqsgzvahapjyzh\",\"offerGuid\":\"gqzcjr\",\"nextTriggerTime\":\"2021-04-03T19:52:37Z\",\"lastTriggerTime\":\"2021-06-05T18:59:27Z\",\"subscriptions\":[\"wlxkvugfhzovaw\",\"vzunluthnnprnxi\"],\"complianceStatus\":{\"m365\":{\"passedCount\":1073043267,\"failedCount\":1819249918,\"manualCount\":1074564233,\"notApplicableCount\":1779312897,\"pendingCount\":1754120882}},\"storageInfo\":{\"subscriptionId\":\"tskzbbtdzumveek\",\"resourceGroup\":\"wozuhkf\",\"accountName\":\"sjyofdx\",\"location\":\"us\"},\"certRecords\":[{\"offerGuid\":\"uwaboekqvke\",\"certificationStatus\":\"smv\",\"ingestionStatus\":\"wyjsflhhcaalnjix\",\"controls\":[{\"controlId\":\"awjoyaqcslyjp\",\"controlStatus\":\"idzyexznelixhnr\"},{\"controlId\":\"folhbnxknal\",\"controlStatus\":\"lp\"}]},{\"offerGuid\":\"gdtpnapnyiro\",\"certificationStatus\":\"hpigv\",\"ingestionStatus\":\"ylgqgitxmedjvcsl\",\"controls\":[{\"controlId\":\"wncwzzhxgktrmg\",\"controlStatus\":\"napkteoellw\"},{\"controlId\":\"fdygpfqbuaceopz\",\"controlStatus\":\"rhhuaopppcqeqx\"}]},{\"offerGuid\":\"z\",\"certificationStatus\":\"hzxct\",\"ingestionStatus\":\"gbkdmoizpos\",\"controls\":[{\"controlId\":\"cfbu\",\"controlStatus\":\"mfqjhhkxbp\"},{\"controlId\":\"ymjhxxjyngudivkr\",\"controlStatus\":\"wbxqzvszjfau\"}]}],\"provisioningState\":\"Updating\"},\"complianceResults\":[{\"complianceName\":\"vetvt\",\"categories\":[{\"categoryName\":\"tdo\",\"categoryStatus\":\"PendingApproval\",\"controlFamilies\":[{}]},{\"categoryName\":\"wvxysl\",\"categoryStatus\":\"NotApplicable\",\"controlFamilies\":[{},{},{}]},{\"categoryName\":\"obl\",\"categoryStatus\":\"Passed\",\"controlFamilies\":[{},{},{}]}]},{\"complianceName\":\"pe\",\"categories\":[{\"categoryName\":\"bkrvrnsvshqj\",\"categoryStatus\":\"Passed\",\"controlFamilies\":[{},{},{},{}]},{\"categoryName\":\"bfovasrruvwbhsq\",\"categoryStatus\":\"NotApplicable\",\"controlFamilies\":[{},{},{}]},{\"categoryName\":\"jbi\",\"categoryStatus\":\"NotApplicable\",\"controlFamilies\":[{},{},{},{}]}]}]}") + .toObject(SnapshotProperties.class); } } diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/SnapshotResourceInnerTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/SnapshotResourceInnerTests.java index 0beb69d4524ad..8cb832ed236ae 100644 --- a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/SnapshotResourceInnerTests.java +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/SnapshotResourceInnerTests.java @@ -1,26 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.appcomplianceautomation.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.appcomplianceautomation.fluent.models.SnapshotResourceInner; -import org.junit.jupiter.api.Test; public final class SnapshotResourceInnerTests { - @Test - public void testDeserialize() { - SnapshotResourceInner model = - BinaryData - .fromString( - "{\"properties\":{\"id\":\"z\",\"snapshotName\":\"epgzgqexz\",\"createdAt\":\"2021-05-08T18:49:34Z\",\"provisioningState\":\"Updating\",\"reportProperties\":{\"id\":\"aierhhb\",\"status\":\"Failed\",\"tenantId\":\"ummajtjaod\",\"reportName\":\"bnbdxkqpxokajion\",\"offerGuid\":\"mexgstxgcp\",\"timeZone\":\"dg\",\"triggerTime\":\"2020-12-20T13:07:36Z\",\"nextTriggerTime\":\"2021-08-14T01:03:38Z\",\"lastTriggerTime\":\"2021-03-19T19:19:25Z\",\"subscriptions\":[\"jwzrl\",\"vmclw\"],\"resources\":[],\"provisioningState\":\"Canceled\"},\"complianceResults\":[{\"complianceName\":\"bzaqsqsycbkbfk\",\"categories\":[]},{\"complianceName\":\"dkexxppofm\",\"categories\":[]}]},\"id\":\"c\",\"name\":\"jpgd\",\"type\":\"toc\"}") - .toObject(SnapshotResourceInner.class); - } - - @Test - public void testSerialize() { - SnapshotResourceInner model = new SnapshotResourceInner(); - model = BinaryData.fromObject(model).toObject(SnapshotResourceInner.class); + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SnapshotResourceInner model = BinaryData.fromString( + "{\"properties\":{\"snapshotName\":\"dqmh\",\"createdAt\":\"2021-02-01T09:58:47Z\",\"provisioningState\":\"Fixing\",\"reportProperties\":{\"triggerTime\":\"2021-10-14T11:42:47Z\",\"timeZone\":\"wky\",\"resources\":[{\"resourceId\":\"uutkncw\",\"resourceType\":\"wsvlxotogtwrupqs\",\"resourceKind\":\"nmic\",\"resourceOrigin\":\"GCP\",\"accountId\":\"eoveilovnotyf\"},{\"resourceId\":\"fcnj\",\"resourceType\":\"cn\",\"resourceKind\":\"hbttkphyw\",\"resourceOrigin\":\"GCP\",\"accountId\":\"t\"},{\"resourceId\":\"qnermclfplphoxu\",\"resourceType\":\"rpabg\",\"resourceKind\":\"psbjta\",\"resourceOrigin\":\"GCP\",\"accountId\":\"xywpmueefjzwfqkq\"},{\"resourceId\":\"jidsuyonobglaoc\",\"resourceType\":\"tcc\",\"resourceKind\":\"yudxytlmoy\",\"resourceOrigin\":\"Azure\",\"accountId\":\"fudwpznt\"}],\"status\":\"Failed\",\"errors\":[\"lrqjbhckfr\"],\"tenantId\":\"rxsbkyvp\",\"offerGuid\":\"anuzbpzkafkuw\",\"nextTriggerTime\":\"2021-02-12T18:02:16Z\",\"lastTriggerTime\":\"2021-05-07T17:14:51Z\",\"subscriptions\":[\"ehhseyvjusrts\",\"hspkdeemao\",\"mx\",\"gkvtmelmqkrhah\"],\"complianceStatus\":{\"m365\":{\"passedCount\":1468596781,\"failedCount\":1935710102,\"manualCount\":1520620796,\"notApplicableCount\":27642330,\"pendingCount\":1312333731}},\"storageInfo\":{\"subscriptionId\":\"ualaexqpvfadmw\",\"resourceGroup\":\"crgvxpvgom\",\"accountName\":\"fmisg\",\"location\":\"nbbelda\"},\"certRecords\":[{\"offerGuid\":\"ali\",\"certificationStatus\":\"rqhakauha\",\"ingestionStatus\":\"sfwxosowzxc\",\"controls\":[{}]},{\"offerGuid\":\"jooxdjebw\",\"certificationStatus\":\"cwwfvovbvme\",\"ingestionStatus\":\"civyhzceuo\",\"controls\":[{},{},{}]},{\"offerGuid\":\"wjue\",\"certificationStatus\":\"twm\",\"ingestionStatus\":\"ytdxwit\",\"controls\":[{}]}],\"provisioningState\":\"Deleting\"},\"complianceResults\":[{\"complianceName\":\"gxhnisk\",\"categories\":[{\"categoryName\":\"py\",\"categoryStatus\":\"PendingApproval\",\"controlFamilies\":[{},{}]},{\"categoryName\":\"dnhjdauwhvylw\",\"categoryStatus\":\"PendingApproval\",\"controlFamilies\":[{}]}]},{\"complianceName\":\"ujznb\",\"categories\":[{\"categoryName\":\"uwprzql\",\"categoryStatus\":\"NotApplicable\",\"controlFamilies\":[{}]}]},{\"complianceName\":\"pjmkhfxobbc\",\"categories\":[{\"categoryName\":\"tjrip\",\"categoryStatus\":\"NotApplicable\",\"controlFamilies\":[{},{}]}]}]},\"id\":\"wtgh\",\"name\":\"gblcgwxzvlvq\",\"type\":\"jkbegibtnmxiebww\"}") + .toObject(SnapshotResourceInner.class); } } diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/SnapshotResourceListResultTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/SnapshotResourceListResultTests.java new file mode 100644 index 0000000000000..b40cdb13debcd --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/SnapshotResourceListResultTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.appcomplianceautomation.implementation.models.SnapshotResourceListResult; +import org.junit.jupiter.api.Assertions; + +public final class SnapshotResourceListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SnapshotResourceListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"snapshotName\":\"pqvujzraehtwdwrf\",\"createdAt\":\"2021-04-27T23:35:26Z\",\"provisioningState\":\"Verifying\",\"reportProperties\":{\"triggerTime\":\"2021-04-18T05:55:24Z\",\"timeZone\":\"cdl\",\"resources\":[{\"resourceId\":\"shfwpracstwity\"}],\"status\":\"Reviewing\",\"errors\":[\"c\",\"edcpnmdyodnwzxl\",\"jc\",\"nhltiugcxn\"],\"tenantId\":\"vwxqibyqunyo\",\"offerGuid\":\"wlmdjrkv\",\"nextTriggerTime\":\"2021-11-11T06:04:24Z\",\"lastTriggerTime\":\"2021-11-13T18:34:35Z\",\"subscriptions\":[\"dbodacizsjqlhkrr\"],\"complianceStatus\":{\"m365\":{}},\"storageInfo\":{\"subscriptionId\":\"b\",\"resourceGroup\":\"p\",\"accountName\":\"ghvxndzwmkrefa\",\"location\":\"jorwkqnyhgbij\"},\"certRecords\":[{},{},{},{}],\"provisioningState\":\"Verifying\"},\"complianceResults\":[{\"complianceName\":\"ab\",\"categories\":[{},{},{}]},{\"complianceName\":\"stawfsdjpvkv\",\"categories\":[{},{},{}]}]},\"id\":\"bkzbzkd\",\"name\":\"ncj\",\"type\":\"budurgkakmo\"},{\"properties\":{\"snapshotName\":\"jjklff\",\"createdAt\":\"2021-09-10T08:05:34Z\",\"provisioningState\":\"Creating\",\"reportProperties\":{\"triggerTime\":\"2021-09-10T08:27:42Z\",\"timeZone\":\"gzrf\",\"resources\":[{\"resourceId\":\"eyebizikayuhql\"},{\"resourceId\":\"jbsybbqw\"}],\"status\":\"Active\",\"errors\":[\"gmfpgvmp\",\"paslthaqfxssmwu\",\"wbdsr\",\"zpdrhneu\"],\"tenantId\":\"wqkdwytisibi\",\"offerGuid\":\"gpikpzimejza\",\"nextTriggerTime\":\"2021-08-16T12:50:07Z\",\"lastTriggerTime\":\"2021-04-29T09:22:09Z\",\"subscriptions\":[\"vrmbzono\"],\"complianceStatus\":{\"m365\":{}},\"storageInfo\":{\"subscriptionId\":\"q\",\"resourceGroup\":\"rgz\",\"accountName\":\"rlazszrnw\",\"location\":\"indfpwpjyl\"},\"certRecords\":[{},{},{},{}],\"provisioningState\":\"Succeeded\"},\"complianceResults\":[{\"complianceName\":\"cdhszf\",\"categories\":[{},{},{},{}]}]},\"id\":\"gofel\",\"name\":\"a\",\"type\":\"rqmq\"}],\"nextLink\":\"dvriiiojnal\"}") + .toObject(SnapshotResourceListResult.class); + Assertions.assertEquals("dvriiiojnal", model.nextLink()); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/StatusItemTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/StatusItemTests.java new file mode 100644 index 0000000000000..35d5cf6aa4f0e --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/StatusItemTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.appcomplianceautomation.models.StatusItem; +import org.junit.jupiter.api.Assertions; + +public final class StatusItemTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + StatusItem model = BinaryData.fromString("{\"statusName\":\"slirciz\",\"statusValue\":\"vydfceacvlhvygdy\"}") + .toObject(StatusItem.class); + Assertions.assertEquals("slirciz", model.statusName()); + Assertions.assertEquals("vydfceacvlhvygdy", model.statusValue()); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/StorageInfoTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/StorageInfoTests.java new file mode 100644 index 0000000000000..bfc676a895533 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/StorageInfoTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.appcomplianceautomation.models.StorageInfo; +import org.junit.jupiter.api.Assertions; + +public final class StorageInfoTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + StorageInfo model = BinaryData.fromString( + "{\"subscriptionId\":\"ljofxqeofjaeqjh\",\"resourceGroup\":\"b\",\"accountName\":\"v\",\"location\":\"mjqulngsn\"}") + .toObject(StorageInfo.class); + Assertions.assertEquals("ljofxqeofjaeqjh", model.subscriptionId()); + Assertions.assertEquals("b", model.resourceGroup()); + Assertions.assertEquals("v", model.accountName()); + Assertions.assertEquals("mjqulngsn", model.location()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + StorageInfo model = new StorageInfo().withSubscriptionId("ljofxqeofjaeqjh") + .withResourceGroup("b") + .withAccountName("v") + .withLocation("mjqulngsn"); + model = BinaryData.fromObject(model).toObject(StorageInfo.class); + Assertions.assertEquals("ljofxqeofjaeqjh", model.subscriptionId()); + Assertions.assertEquals("b", model.resourceGroup()); + Assertions.assertEquals("v", model.accountName()); + Assertions.assertEquals("mjqulngsn", model.location()); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/SyncCertRecordRequestTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/SyncCertRecordRequestTests.java new file mode 100644 index 0000000000000..5ddd525668c30 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/SyncCertRecordRequestTests.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.appcomplianceautomation.models.CertSyncRecord; +import com.azure.resourcemanager.appcomplianceautomation.models.ControlSyncRecord; +import com.azure.resourcemanager.appcomplianceautomation.models.SyncCertRecordRequest; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class SyncCertRecordRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SyncCertRecordRequest model = BinaryData.fromString( + "{\"certRecord\":{\"offerGuid\":\"fsnkymuctq\",\"certificationStatus\":\"fbebrjcxer\",\"ingestionStatus\":\"wutttxfvjrbi\",\"controls\":[{\"controlId\":\"epcyvahfnlj\",\"controlStatus\":\"qxj\"},{\"controlId\":\"ujqgidok\",\"controlStatus\":\"ljyoxgvcltb\"},{\"controlId\":\"ncghkje\",\"controlStatus\":\"zhbijhtxfv\"},{\"controlId\":\"bfs\",\"controlStatus\":\"nehmpvecx\"}]}}") + .toObject(SyncCertRecordRequest.class); + Assertions.assertEquals("fsnkymuctq", model.certRecord().offerGuid()); + Assertions.assertEquals("fbebrjcxer", model.certRecord().certificationStatus()); + Assertions.assertEquals("wutttxfvjrbi", model.certRecord().ingestionStatus()); + Assertions.assertEquals("epcyvahfnlj", model.certRecord().controls().get(0).controlId()); + Assertions.assertEquals("qxj", model.certRecord().controls().get(0).controlStatus()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SyncCertRecordRequest model = new SyncCertRecordRequest().withCertRecord(new CertSyncRecord() + .withOfferGuid("fsnkymuctq") + .withCertificationStatus("fbebrjcxer") + .withIngestionStatus("wutttxfvjrbi") + .withControls(Arrays.asList(new ControlSyncRecord().withControlId("epcyvahfnlj").withControlStatus("qxj"), + new ControlSyncRecord().withControlId("ujqgidok").withControlStatus("ljyoxgvcltb"), + new ControlSyncRecord().withControlId("ncghkje").withControlStatus("zhbijhtxfv"), + new ControlSyncRecord().withControlId("bfs").withControlStatus("nehmpvecx")))); + model = BinaryData.fromObject(model).toObject(SyncCertRecordRequest.class); + Assertions.assertEquals("fsnkymuctq", model.certRecord().offerGuid()); + Assertions.assertEquals("fbebrjcxer", model.certRecord().certificationStatus()); + Assertions.assertEquals("wutttxfvjrbi", model.certRecord().ingestionStatus()); + Assertions.assertEquals("epcyvahfnlj", model.certRecord().controls().get(0).controlId()); + Assertions.assertEquals("qxj", model.certRecord().controls().get(0).controlStatus()); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/TriggerEvaluationRequestTests.java b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/TriggerEvaluationRequestTests.java new file mode 100644 index 0000000000000..d578c8304b350 --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/src/test/java/com/azure/resourcemanager/appcomplianceautomation/generated/TriggerEvaluationRequestTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.appcomplianceautomation.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.appcomplianceautomation.models.TriggerEvaluationRequest; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class TriggerEvaluationRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + TriggerEvaluationRequest model + = BinaryData.fromString("{\"resourceIds\":[\"wkojgcyztsfmzn\"]}").toObject(TriggerEvaluationRequest.class); + Assertions.assertEquals("wkojgcyztsfmzn", model.resourceIds().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + TriggerEvaluationRequest model + = new TriggerEvaluationRequest().withResourceIds(Arrays.asList("wkojgcyztsfmzn")); + model = BinaryData.fromObject(model).toObject(TriggerEvaluationRequest.class); + Assertions.assertEquals("wkojgcyztsfmzn", model.resourceIds().get(0)); + } +} diff --git a/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/tsp-location.yaml b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/tsp-location.yaml new file mode 100644 index 0000000000000..4acd222bf3fcb --- /dev/null +++ b/sdk/appcomplianceautomation/azure-resourcemanager-appcomplianceautomation/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/appcomplianceautomation/AppComplianceAutomation.Management +commit: 3ef3ac06e211849aa8363cabc5812deb584b8e76 +repo: Azure/azure-rest-api-specs +additionalDirectories: