From 01bebc2db49d8c34f2cb1ff283bb5e12e65a6aec Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Sun, 1 Aug 2021 08:56:15 +0000 Subject: [PATCH] CodeGen from PR 15434 in Azure/azure-rest-api-specs Merge ae69611f684b25acebed23df98be2605d3bb1240 into d2183715d380084ff04313a73c8803d042fe91b9 --- .../CHANGELOG.md | 3 +- .../azure-resourcemanager-security/README.md | 3 +- .../security/SecurityManager.java | 134 --- .../security/fluent/DevicesClient.java | 41 - .../security/fluent/DevicesForHubsClient.java | 44 - .../fluent/DevicesForSubscriptionsClient.java | 41 - .../security/fluent/IotAlertTypesClient.java | 62 - .../security/fluent/IotAlertsClient.java | 88 -- .../fluent/IotDefenderSettingsClient.java | 153 --- .../fluent/IotRecommendationTypesClient.java | 62 - .../fluent/IotRecommendationsClient.java | 76 -- .../security/fluent/IotSensorsClient.java | 209 ---- .../security/fluent/IotSitesClient.java | 117 -- .../fluent/OnPremiseIotSensorsClient.java | 167 --- .../security/fluent/SecurityCenter.java | 77 -- .../security/fluent/models/AlertInner.java | 2 + .../security/fluent/models/DeviceInner.java | 493 -------- .../InformationProtectionPolicyInner.java | 3 + .../IoTSecurityAggregatedAlertInner.java | 2 + ...SecurityAggregatedRecommendationInner.java | 2 + .../models/IoTSecuritySolutionModelInner.java | 2 + .../fluent/models/IotAlertModelInner.java | 161 --- .../fluent/models/IotAlertTypeInner.java | 167 --- .../fluent/models/IotAlertTypeListInner.java | 54 - .../models/IotDefenderSettingsListInner.java | 43 - .../models/IotDefenderSettingsModelInner.java | 126 -- .../models/IotRecommendationModelInner.java | 98 -- .../models/IotRecommendationTypeInner.java | 166 --- .../IotRecommendationTypeListInner.java | 54 - .../fluent/models/IotSensorsListInner.java | 43 - .../fluent/models/IotSensorsModelInner.java | 228 ---- .../fluent/models/IotSitesListInner.java | 43 - .../fluent/models/IotSitesModelInner.java | 80 -- .../models/OnPremiseIotSensorInner.java | 51 - .../models/OnPremiseIotSensorsListInner.java | 43 - .../fluent/models/PackageDownloadsInner.java | 154 --- .../models/SecurityAssessmentInner.java | 2 + .../security/implementation/DeviceImpl.java | 170 --- .../implementation/DevicesClientImpl.java | 185 --- .../DevicesForHubsClientImpl.java | 354 ------ .../implementation/DevicesForHubsImpl.java | 49 - .../DevicesForSubscriptionsClientImpl.java | 351 ------ .../DevicesForSubscriptionsImpl.java | 48 - .../security/implementation/DevicesImpl.java | 58 - .../implementation/IotAlertModelImpl.java | 75 -- .../implementation/IotAlertTypeImpl.java | 84 -- .../implementation/IotAlertTypeListImpl.java | 47 - .../IotAlertTypesClientImpl.java | 322 ------ .../implementation/IotAlertTypesImpl.java | 83 -- .../implementation/IotAlertsClientImpl.java | 620 ---------- .../implementation/IotAlertsImpl.java | 92 -- .../IotDefenderSettingsClientImpl.java | 819 ------------- .../IotDefenderSettingsImpl.java | 149 --- .../IotDefenderSettingsListImpl.java | 47 - .../IotDefenderSettingsModelImpl.java | 65 -- .../IotRecommendationModelImpl.java | 56 - .../IotRecommendationTypeImpl.java | 84 -- .../IotRecommendationTypeListImpl.java | 47 - .../IotRecommendationTypesClientImpl.java | 330 ------ .../IotRecommendationTypesImpl.java | 84 -- .../IotRecommendationsClientImpl.java | 509 -------- .../IotRecommendationsImpl.java | 73 -- .../implementation/IotSensorsClientImpl.java | 1026 ----------------- .../implementation/IotSensorsImpl.java | 219 ---- .../implementation/IotSensorsListImpl.java | 47 - .../implementation/IotSensorsModelImpl.java | 216 ---- .../implementation/IotSitesClientImpl.java | 537 --------- .../security/implementation/IotSitesImpl.java | 114 -- .../implementation/IotSitesListImpl.java | 46 - .../implementation/IotSitesModelImpl.java | 55 - .../OnPremiseIotSensorImpl.java | 44 - .../OnPremiseIotSensorsClientImpl.java | 971 ---------------- .../OnPremiseIotSensorsImpl.java | 134 --- .../OnPremiseIotSensorsListImpl.java | 47 - .../implementation/PackageDownloadsImpl.java | 86 -- .../implementation/SecurityCenterImpl.java | 154 --- .../implementation/SettingsClientImpl.java | 12 +- .../security/models/AlertIntent.java | 76 -- .../security/models/AuthorizationState.java | 34 - ...tainerRegistryVulnerabilityProperties.java | 2 + .../security/models/Device.java | 208 ---- .../security/models/DeviceCriticality.java | 34 - .../security/models/DeviceList.java | 75 -- .../security/models/DeviceStatus.java | 34 - .../security/models/Devices.java | 36 - .../security/models/DevicesForHubs.java | 38 - .../models/DevicesForSubscriptions.java | 34 - .../security/models/Firmware.java | 129 --- .../security/models/IotAlertListModel.java | 59 - .../security/models/IotAlertModel.java | 91 -- .../security/models/IotAlertType.java | 103 -- .../security/models/IotAlertTypeList.java | 25 - .../security/models/IotAlertTypes.java | 54 - .../security/models/IotAlerts.java | 80 -- .../security/models/IotDefenderSettings.java | 137 --- .../models/IotDefenderSettingsList.java | 25 - .../models/IotDefenderSettingsModel.java | 69 -- .../models/IotRecommendationListModel.java | 59 - .../models/IotRecommendationModel.java | 66 -- .../models/IotRecommendationType.java | 103 -- .../models/IotRecommendationTypeList.java | 25 - .../models/IotRecommendationTypes.java | 54 - .../security/models/IotRecommendations.java | 69 -- .../security/models/IotSensors.java | 215 ---- .../security/models/IotSensorsList.java | 25 - .../security/models/IotSensorsModel.java | 325 ------ .../security/models/IotSites.java | 105 -- .../security/models/IotSitesList.java | 25 - .../security/models/IotSitesModel.java | 53 - .../security/models/IpAddress.java | 100 -- .../models/JitNetworkAccessPortRule.java | 6 +- .../security/models/MacAddress.java | 88 -- .../security/models/MacSignificance.java | 34 - .../security/models/ManagementState.java | 34 - .../security/models/NetworkInterface.java | 98 -- .../security/models/OnPremiseIotSensor.java | 45 - .../security/models/OnPremiseIotSensors.java | 150 --- .../models/OnPremiseIotSensorsList.java | 25 - .../security/models/OnboardingKind.java | 40 - .../security/models/PackageDownloadInfo.java | 69 -- .../security/models/PackageDownloads.java | 67 -- .../PackageDownloadsCentralManager.java | 61 - .../PackageDownloadsCentralManagerFull.java | 61 - ...PackageDownloadsCentralManagerFullOvf.java | 97 -- .../models/PackageDownloadsSensor.java | 72 -- .../models/PackageDownloadsSensorFull.java | 72 -- .../models/PackageDownloadsSensorFullOvf.java | 79 -- .../security/models/ProgrammingState.java | 34 - .../security/models/Protocol.java | 68 +- .../security/models/ProtocolValue.java | 37 - .../security/models/PurdueLevel.java | 37 - .../models/RecommendationSeverity.java | 49 - .../security/models/RelationToIpStatus.java | 34 - .../security/models/ResetPasswordInput.java | 50 - .../security/models/RulesResultsInput.java | 2 + .../models/ScanningFunctionality.java | 34 - .../security/models/Sensor.java | 54 - .../security/models/SensorStatus.java | 37 - .../security/models/SensorType.java | 34 - .../models/ServerVulnerabilityProperties.java | 2 + .../security/models/SettingsSettingName.java | 4 + .../resourcemanager/security/models/Site.java | 39 - .../resourcemanager/security/models/Tags.java | 2 + .../security/models/TagsResource.java | 2 + .../security/models/TiStatus.java | 40 - .../security/models/TrackedResource.java | 2 + .../models/UpgradePackageDownloadInfo.java | 41 - .../security/models/VersionKind.java | 37 - 148 files changed, 61 insertions(+), 16046 deletions(-) delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/DevicesClient.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/DevicesForHubsClient.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/DevicesForSubscriptionsClient.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IotAlertTypesClient.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IotAlertsClient.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IotDefenderSettingsClient.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IotRecommendationTypesClient.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IotRecommendationsClient.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IotSensorsClient.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IotSitesClient.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/OnPremiseIotSensorsClient.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/DeviceInner.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotAlertModelInner.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotAlertTypeInner.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotAlertTypeListInner.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotDefenderSettingsListInner.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotDefenderSettingsModelInner.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotRecommendationModelInner.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotRecommendationTypeInner.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotRecommendationTypeListInner.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotSensorsListInner.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotSensorsModelInner.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotSitesListInner.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotSitesModelInner.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/OnPremiseIotSensorInner.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/OnPremiseIotSensorsListInner.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/PackageDownloadsInner.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DeviceImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DevicesClientImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DevicesForHubsClientImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DevicesForHubsImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DevicesForSubscriptionsClientImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DevicesForSubscriptionsImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DevicesImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotAlertModelImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotAlertTypeImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotAlertTypeListImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotAlertTypesClientImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotAlertTypesImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotAlertsClientImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotAlertsImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotDefenderSettingsClientImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotDefenderSettingsImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotDefenderSettingsListImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotDefenderSettingsModelImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotRecommendationModelImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotRecommendationTypeImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotRecommendationTypeListImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotRecommendationTypesClientImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotRecommendationTypesImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotRecommendationsClientImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotRecommendationsImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSensorsClientImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSensorsImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSensorsListImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSensorsModelImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSitesClientImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSitesImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSitesListImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSitesModelImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/OnPremiseIotSensorImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/OnPremiseIotSensorsClientImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/OnPremiseIotSensorsImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/OnPremiseIotSensorsListImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/PackageDownloadsImpl.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertIntent.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AuthorizationState.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Device.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DeviceCriticality.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DeviceList.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DeviceStatus.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Devices.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DevicesForHubs.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DevicesForSubscriptions.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Firmware.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotAlertListModel.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotAlertModel.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotAlertType.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotAlertTypeList.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotAlertTypes.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotAlerts.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotDefenderSettings.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotDefenderSettingsList.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotDefenderSettingsModel.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotRecommendationListModel.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotRecommendationModel.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotRecommendationType.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotRecommendationTypeList.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotRecommendationTypes.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotRecommendations.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotSensors.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotSensorsList.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotSensorsModel.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotSites.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotSitesList.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotSitesModel.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IpAddress.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/MacAddress.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/MacSignificance.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ManagementState.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/NetworkInterface.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/OnPremiseIotSensor.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/OnPremiseIotSensors.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/OnPremiseIotSensorsList.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/OnboardingKind.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/PackageDownloadInfo.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/PackageDownloads.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/PackageDownloadsCentralManager.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/PackageDownloadsCentralManagerFull.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/PackageDownloadsCentralManagerFullOvf.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/PackageDownloadsSensor.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/PackageDownloadsSensorFull.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/PackageDownloadsSensorFullOvf.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ProgrammingState.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ProtocolValue.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/PurdueLevel.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/RecommendationSeverity.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/RelationToIpStatus.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ResetPasswordInput.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ScanningFunctionality.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Sensor.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/SensorStatus.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/SensorType.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Site.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/TiStatus.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/UpgradePackageDownloadInfo.java delete mode 100644 sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/VersionKind.java diff --git a/sdk/security/azure-resourcemanager-security/CHANGELOG.md b/sdk/security/azure-resourcemanager-security/CHANGELOG.md index 33b7843e8f5ec..c69aa0cc38fd6 100644 --- a/sdk/security/azure-resourcemanager-security/CHANGELOG.md +++ b/sdk/security/azure-resourcemanager-security/CHANGELOG.md @@ -1,7 +1,8 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0-beta.1 (2021-08-01) +- Azure Resource Manager Security client library for Java. This package contains Microsoft Azure SDK for Security Management SDK. API spec for Microsoft.Security (Azure Security Center) resource provider. Package tag package-composite-v3. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## 1.0.0-beta.1 (2021-07-14) diff --git a/sdk/security/azure-resourcemanager-security/README.md b/sdk/security/azure-resourcemanager-security/README.md index dae5056f7c71c..538f15f09116d 100644 --- a/sdk/security/azure-resourcemanager-security/README.md +++ b/sdk/security/azure-resourcemanager-security/README.md @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-security - 1.0.0-beta.1 + 1.0.0-beta.2 ``` [//]: # ({x-version-update-end}) @@ -74,7 +74,6 @@ See [API design][design] for general introduction on design and key concepts on ## Examples -[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/security/azure-resourcemanager-security/SAMPLE.md) ## Troubleshooting diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/SecurityManager.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/SecurityManager.java index cdcf2fc45d004..5fd5fd3641db9 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/SecurityManager.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/SecurityManager.java @@ -35,27 +35,16 @@ import com.azure.resourcemanager.security.implementation.CompliancesImpl; import com.azure.resourcemanager.security.implementation.ConnectorsImpl; import com.azure.resourcemanager.security.implementation.DeviceSecurityGroupsImpl; -import com.azure.resourcemanager.security.implementation.DevicesForHubsImpl; -import com.azure.resourcemanager.security.implementation.DevicesForSubscriptionsImpl; -import com.azure.resourcemanager.security.implementation.DevicesImpl; import com.azure.resourcemanager.security.implementation.DiscoveredSecuritySolutionsImpl; import com.azure.resourcemanager.security.implementation.ExternalSecuritySolutionsImpl; import com.azure.resourcemanager.security.implementation.InformationProtectionPoliciesImpl; import com.azure.resourcemanager.security.implementation.IngestionSettingsImpl; -import com.azure.resourcemanager.security.implementation.IotAlertTypesImpl; -import com.azure.resourcemanager.security.implementation.IotAlertsImpl; -import com.azure.resourcemanager.security.implementation.IotDefenderSettingsImpl; -import com.azure.resourcemanager.security.implementation.IotRecommendationTypesImpl; -import com.azure.resourcemanager.security.implementation.IotRecommendationsImpl; import com.azure.resourcemanager.security.implementation.IotSecuritySolutionAnalyticsImpl; import com.azure.resourcemanager.security.implementation.IotSecuritySolutionsAnalyticsAggregatedAlertsImpl; import com.azure.resourcemanager.security.implementation.IotSecuritySolutionsAnalyticsRecommendationsImpl; import com.azure.resourcemanager.security.implementation.IotSecuritySolutionsImpl; -import com.azure.resourcemanager.security.implementation.IotSensorsImpl; -import com.azure.resourcemanager.security.implementation.IotSitesImpl; import com.azure.resourcemanager.security.implementation.JitNetworkAccessPoliciesImpl; import com.azure.resourcemanager.security.implementation.LocationsImpl; -import com.azure.resourcemanager.security.implementation.OnPremiseIotSensorsImpl; import com.azure.resourcemanager.security.implementation.OperationsImpl; import com.azure.resourcemanager.security.implementation.PricingsImpl; import com.azure.resourcemanager.security.implementation.RegulatoryComplianceAssessmentsImpl; @@ -92,27 +81,16 @@ import com.azure.resourcemanager.security.models.Compliances; import com.azure.resourcemanager.security.models.Connectors; import com.azure.resourcemanager.security.models.DeviceSecurityGroups; -import com.azure.resourcemanager.security.models.Devices; -import com.azure.resourcemanager.security.models.DevicesForHubs; -import com.azure.resourcemanager.security.models.DevicesForSubscriptions; import com.azure.resourcemanager.security.models.DiscoveredSecuritySolutions; import com.azure.resourcemanager.security.models.ExternalSecuritySolutions; import com.azure.resourcemanager.security.models.InformationProtectionPolicies; import com.azure.resourcemanager.security.models.IngestionSettings; -import com.azure.resourcemanager.security.models.IotAlertTypes; -import com.azure.resourcemanager.security.models.IotAlerts; -import com.azure.resourcemanager.security.models.IotDefenderSettings; -import com.azure.resourcemanager.security.models.IotRecommendationTypes; -import com.azure.resourcemanager.security.models.IotRecommendations; import com.azure.resourcemanager.security.models.IotSecuritySolutionAnalytics; import com.azure.resourcemanager.security.models.IotSecuritySolutions; import com.azure.resourcemanager.security.models.IotSecuritySolutionsAnalyticsAggregatedAlerts; import com.azure.resourcemanager.security.models.IotSecuritySolutionsAnalyticsRecommendations; -import com.azure.resourcemanager.security.models.IotSensors; -import com.azure.resourcemanager.security.models.IotSites; import com.azure.resourcemanager.security.models.JitNetworkAccessPolicies; import com.azure.resourcemanager.security.models.Locations; -import com.azure.resourcemanager.security.models.OnPremiseIotSensors; import com.azure.resourcemanager.security.models.Operations; import com.azure.resourcemanager.security.models.Pricings; import com.azure.resourcemanager.security.models.RegulatoryComplianceAssessments; @@ -224,28 +202,6 @@ public final class SecurityManager { private SqlVulnerabilityAssessmentBaselineRules sqlVulnerabilityAssessmentBaselineRules; - private IotDefenderSettings iotDefenderSettings; - - private IotSensors iotSensors; - - private DevicesForSubscriptions devicesForSubscriptions; - - private DevicesForHubs devicesForHubs; - - private Devices devices; - - private OnPremiseIotSensors onPremiseIotSensors; - - private IotSites iotSites; - - private IotAlerts iotAlerts; - - private IotAlertTypes iotAlertTypes; - - private IotRecommendations iotRecommendations; - - private IotRecommendationTypes iotRecommendationTypes; - private Alerts alerts; private Settings settings; @@ -782,96 +738,6 @@ public SqlVulnerabilityAssessmentBaselineRules sqlVulnerabilityAssessmentBaselin return sqlVulnerabilityAssessmentBaselineRules; } - /** @return Resource collection API of IotDefenderSettings. */ - public IotDefenderSettings iotDefenderSettings() { - if (this.iotDefenderSettings == null) { - this.iotDefenderSettings = new IotDefenderSettingsImpl(clientObject.getIotDefenderSettings(), this); - } - return iotDefenderSettings; - } - - /** @return Resource collection API of IotSensors. */ - public IotSensors iotSensors() { - if (this.iotSensors == null) { - this.iotSensors = new IotSensorsImpl(clientObject.getIotSensors(), this); - } - return iotSensors; - } - - /** @return Resource collection API of DevicesForSubscriptions. */ - public DevicesForSubscriptions devicesForSubscriptions() { - if (this.devicesForSubscriptions == null) { - this.devicesForSubscriptions = - new DevicesForSubscriptionsImpl(clientObject.getDevicesForSubscriptions(), this); - } - return devicesForSubscriptions; - } - - /** @return Resource collection API of DevicesForHubs. */ - public DevicesForHubs devicesForHubs() { - if (this.devicesForHubs == null) { - this.devicesForHubs = new DevicesForHubsImpl(clientObject.getDevicesForHubs(), this); - } - return devicesForHubs; - } - - /** @return Resource collection API of Devices. */ - public Devices devices() { - if (this.devices == null) { - this.devices = new DevicesImpl(clientObject.getDevices(), this); - } - return devices; - } - - /** @return Resource collection API of OnPremiseIotSensors. */ - public OnPremiseIotSensors onPremiseIotSensors() { - if (this.onPremiseIotSensors == null) { - this.onPremiseIotSensors = new OnPremiseIotSensorsImpl(clientObject.getOnPremiseIotSensors(), this); - } - return onPremiseIotSensors; - } - - /** @return Resource collection API of IotSites. */ - public IotSites iotSites() { - if (this.iotSites == null) { - this.iotSites = new IotSitesImpl(clientObject.getIotSites(), this); - } - return iotSites; - } - - /** @return Resource collection API of IotAlerts. */ - public IotAlerts iotAlerts() { - if (this.iotAlerts == null) { - this.iotAlerts = new IotAlertsImpl(clientObject.getIotAlerts(), this); - } - return iotAlerts; - } - - /** @return Resource collection API of IotAlertTypes. */ - public IotAlertTypes iotAlertTypes() { - if (this.iotAlertTypes == null) { - this.iotAlertTypes = new IotAlertTypesImpl(clientObject.getIotAlertTypes(), this); - } - return iotAlertTypes; - } - - /** @return Resource collection API of IotRecommendations. */ - public IotRecommendations iotRecommendations() { - if (this.iotRecommendations == null) { - this.iotRecommendations = new IotRecommendationsImpl(clientObject.getIotRecommendations(), this); - } - return iotRecommendations; - } - - /** @return Resource collection API of IotRecommendationTypes. */ - public IotRecommendationTypes iotRecommendationTypes() { - if (this.iotRecommendationTypes == null) { - this.iotRecommendationTypes = - new IotRecommendationTypesImpl(clientObject.getIotRecommendationTypes(), this); - } - return iotRecommendationTypes; - } - /** @return Resource collection API of Alerts. */ public Alerts alerts() { if (this.alerts == null) { diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/DevicesClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/DevicesClient.java deleted file mode 100644 index 90532443f9ff6..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/DevicesClient.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.security.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.security.fluent.models.DeviceInner; - -/** An instance of this class provides access to all the operations defined in DevicesClient. */ -public interface DevicesClient { - /** - * Get device. - * - * @param resourceId The identifier of the resource. - * @param deviceId Identifier of the device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return device. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DeviceInner get(String resourceId, String deviceId); - - /** - * Get device. - * - * @param resourceId The identifier of the resource. - * @param deviceId Identifier of the device. - * @param context The context to associate with this 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 device. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceId, String deviceId, Context context); -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/DevicesForHubsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/DevicesForHubsClient.java deleted file mode 100644 index 69f002544a435..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/DevicesForHubsClient.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.security.fluent.models.DeviceInner; -import com.azure.resourcemanager.security.models.ManagementState; - -/** An instance of this class provides access to all the operations defined in DevicesForHubsClient. */ -public interface DevicesForHubsClient { - /** - * Get list of the devices for the specified IoT Hub resource. - * - * @param resourceId The identifier of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of the devices for the specified IoT Hub resource. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceId); - - /** - * Get list of the devices for the specified IoT Hub resource. - * - * @param resourceId The identifier of the resource. - * @param limit Limit the number of items returned in a single page. - * @param skipToken Skip token used for pagination. - * @param deviceManagementType Get devices only from specific type, Managed or Unmanaged. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of the devices for the specified IoT Hub resource. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceId, Integer limit, String skipToken, ManagementState deviceManagementType, Context context); -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/DevicesForSubscriptionsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/DevicesForSubscriptionsClient.java deleted file mode 100644 index 155c79771103f..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/DevicesForSubscriptionsClient.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.security.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.security.fluent.models.DeviceInner; -import com.azure.resourcemanager.security.models.ManagementState; - -/** An instance of this class provides access to all the operations defined in DevicesForSubscriptionsClient. */ -public interface DevicesForSubscriptionsClient { - /** - * Get list of the devices by their subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of the devices by their subscription. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Get list of the devices by their subscription. - * - * @param limit Limit the number of items returned in a single page. - * @param skipToken Skip token used for pagination. - * @param deviceManagementType Get devices only from specific type, Managed or Unmanaged. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of the devices by their subscription. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - Integer limit, String skipToken, ManagementState deviceManagementType, Context context); -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IotAlertTypesClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IotAlertTypesClient.java deleted file mode 100644 index c61e6ae4bc962..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IotAlertTypesClient.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.security.fluent.models.IotAlertTypeInner; -import com.azure.resourcemanager.security.fluent.models.IotAlertTypeListInner; - -/** An instance of this class provides access to all the operations defined in IotAlertTypesClient. */ -public interface IotAlertTypesClient { - /** - * List IoT alert types. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of alert types. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - IotAlertTypeListInner list(); - - /** - * List IoT alert types. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of alert types. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse(Context context); - - /** - * Get IoT alert type. - * - * @param iotAlertTypeName Name of the alert type. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT alert type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - IotAlertTypeInner get(String iotAlertTypeName); - - /** - * Get IoT alert type. - * - * @param iotAlertTypeName Name of the alert type. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT alert type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String iotAlertTypeName, Context context); -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IotAlertsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IotAlertsClient.java deleted file mode 100644 index add204e53a99b..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IotAlertsClient.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.security.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.security.fluent.models.IotAlertModelInner; -import com.azure.resourcemanager.security.models.ManagementState; - -/** An instance of this class provides access to all the operations defined in IotAlertsClient. */ -public interface IotAlertsClient { - /** - * List IoT alerts. - * - * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT alerts. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String scope); - - /** - * List IoT alerts. - * - * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}). - * @param minStartTimeUtc Filter by minimum startTimeUtc (ISO 8601 format). - * @param maxStartTimeUtc Filter by maximum startTimeUtc (ISO 8601 format). - * @param alertType Filter by alert type. - * @param deviceManagementType Get devices only from specific type, Managed or Unmanaged. - * @param compromisedEntity Filter by compromised device. - * @param limit Limit the number of items returned in a single page. - * @param skipToken Skip token used for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT alerts. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String scope, - String minStartTimeUtc, - String maxStartTimeUtc, - String alertType, - ManagementState deviceManagementType, - String compromisedEntity, - Integer limit, - String skipToken, - Context context); - - /** - * Get IoT alert. - * - * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}). - * @param iotAlertId Id of the alert. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT alert. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - IotAlertModelInner get(String scope, String iotAlertId); - - /** - * Get IoT alert. - * - * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}). - * @param iotAlertId Id of the alert. - * @param context The context to associate with this 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 ioT alert. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String scope, String iotAlertId, Context context); -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IotDefenderSettingsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IotDefenderSettingsClient.java deleted file mode 100644 index 2fc29dca00933..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IotDefenderSettingsClient.java +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.StreamResponse; -import com.azure.core.util.Context; -import com.azure.resourcemanager.security.fluent.models.IotDefenderSettingsListInner; -import com.azure.resourcemanager.security.fluent.models.IotDefenderSettingsModelInner; -import com.azure.resourcemanager.security.fluent.models.PackageDownloadsInner; -import java.io.InputStream; - -/** An instance of this class provides access to all the operations defined in IotDefenderSettingsClient. */ -public interface IotDefenderSettingsClient { - /** - * List IoT Defender Settings. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT Defender settings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - IotDefenderSettingsListInner list(); - - /** - * List IoT Defender Settings. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT Defender settings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse(Context context); - - /** - * Get IoT Defender Settings. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT Defender Settings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - IotDefenderSettingsModelInner get(); - - /** - * Get IoT Defender Settings. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT Defender Settings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(Context context); - - /** - * Create or update IoT Defender settings. - * - * @param iotDefenderSettingsModel The IoT defender settings model. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT Defender settings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - IotDefenderSettingsModelInner createOrUpdate(IotDefenderSettingsModelInner iotDefenderSettingsModel); - - /** - * Create or update IoT Defender settings. - * - * @param iotDefenderSettingsModel The IoT defender settings model. - * @param context The context to associate with this 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 ioT Defender settings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - IotDefenderSettingsModelInner iotDefenderSettingsModel, Context context); - - /** - * Delete IoT Defender settings. - * - * @throws com.azure.core.management.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(); - - /** - * Delete IoT Defender settings. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(Context context); - - /** - * Information about downloadable packages. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about package downloads. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PackageDownloadsInner packageDownloads(); - - /** - * Information about downloadable packages. - * - * @param context The context to associate with this 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 information about package downloads. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response packageDownloadsWithResponse(Context context); - - /** - * Download manager activation data defined for this subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - InputStream downloadManagerActivation(); - - /** - * Download manager activation data defined for this subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - StreamResponse downloadManagerActivationWithResponse(Context context); -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IotRecommendationTypesClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IotRecommendationTypesClient.java deleted file mode 100644 index 73ef2991f597f..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IotRecommendationTypesClient.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.security.fluent.models.IotRecommendationTypeInner; -import com.azure.resourcemanager.security.fluent.models.IotRecommendationTypeListInner; - -/** An instance of this class provides access to all the operations defined in IotRecommendationTypesClient. */ -public interface IotRecommendationTypesClient { - /** - * List IoT recommendation types. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of recommendation types. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - IotRecommendationTypeListInner list(); - - /** - * List IoT recommendation types. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of recommendation types. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse(Context context); - - /** - * Get IoT recommendation type. - * - * @param iotRecommendationTypeName Name of the recommendation type. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT recommendation type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - IotRecommendationTypeInner get(String iotRecommendationTypeName); - - /** - * Get IoT recommendation type. - * - * @param iotRecommendationTypeName Name of the recommendation type. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT recommendation type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String iotRecommendationTypeName, Context context); -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IotRecommendationsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IotRecommendationsClient.java deleted file mode 100644 index 8d800d83f3197..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IotRecommendationsClient.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.security.fluent.models.IotRecommendationModelInner; - -/** An instance of this class provides access to all the operations defined in IotRecommendationsClient. */ -public interface IotRecommendationsClient { - /** - * List IoT recommendations. - * - * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT recommendations. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String scope); - - /** - * List IoT recommendations. - * - * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}). - * @param recommendationType Filter by recommendation type. - * @param deviceId Filter by device id. - * @param limit Limit the number of items returned in a single page. - * @param skipToken Skip token used for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT recommendations. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String scope, String recommendationType, String deviceId, Integer limit, String skipToken, Context context); - - /** - * Get IoT recommendation. - * - * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}). - * @param iotRecommendationId Id of the recommendation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT recommendation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - IotRecommendationModelInner get(String scope, String iotRecommendationId); - - /** - * Get IoT recommendation. - * - * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}). - * @param iotRecommendationId Id of the recommendation. - * @param context The context to associate with this 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 ioT recommendation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String scope, String iotRecommendationId, Context context); -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IotSensorsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IotSensorsClient.java deleted file mode 100644 index 6ea5cb5022dc3..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IotSensorsClient.java +++ /dev/null @@ -1,209 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.StreamResponse; -import com.azure.core.util.Context; -import com.azure.resourcemanager.security.fluent.models.IotSensorsListInner; -import com.azure.resourcemanager.security.fluent.models.IotSensorsModelInner; -import com.azure.resourcemanager.security.models.ResetPasswordInput; -import java.io.InputStream; - -/** An instance of this class provides access to all the operations defined in IotSensorsClient. */ -public interface IotSensorsClient { - /** - * List IoT sensors. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT sensors. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - IotSensorsListInner list(String scope); - - /** - * List IoT sensors. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT sensors. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse(String scope, Context context); - - /** - * Get IoT sensor. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT sensor. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - IotSensorsModelInner get(String scope, String iotSensorName); - - /** - * Get IoT sensor. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @param context The context to associate with this 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 ioT sensor. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String scope, String iotSensorName, Context context); - - /** - * Create or update IoT sensor. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @param iotSensorsModel The IoT sensor model. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT sensor model. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - IotSensorsModelInner createOrUpdate(String scope, String iotSensorName, IotSensorsModelInner iotSensorsModel); - - /** - * Create or update IoT sensor. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @param iotSensorsModel The IoT sensor model. - * @param context The context to associate with this 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 ioT sensor model. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String scope, String iotSensorName, IotSensorsModelInner iotSensorsModel, Context context); - - /** - * Delete IoT sensor. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 scope, String iotSensorName); - - /** - * Delete IoT sensor. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @param context The context to associate with this 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) - Response deleteWithResponse(String scope, String iotSensorName, Context context); - - /** - * Download sensor activation file. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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) - InputStream downloadActivation(String scope, String iotSensorName); - - /** - * Download sensor activation file. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @param context The context to associate with this 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) - StreamResponse downloadActivationWithResponse(String scope, String iotSensorName, Context context); - - /** - * Download file for reset password of the sensor. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @param body The reset password input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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) - InputStream downloadResetPassword(String scope, String iotSensorName, ResetPasswordInput body); - - /** - * Download file for reset password of the sensor. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @param body The reset password input. - * @param context The context to associate with this 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) - StreamResponse downloadResetPasswordWithResponse( - String scope, String iotSensorName, ResetPasswordInput body, Context context); - - /** - * Trigger threat intelligence package update. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 triggerTiPackageUpdate(String scope, String iotSensorName); - - /** - * Trigger threat intelligence package update. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @param context The context to associate with this 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) - Response triggerTiPackageUpdateWithResponse(String scope, String iotSensorName, Context context); -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IotSitesClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IotSitesClient.java deleted file mode 100644 index 4945f8bc0f1df..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/IotSitesClient.java +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.security.fluent.models.IotSitesListInner; -import com.azure.resourcemanager.security.fluent.models.IotSitesModelInner; - -/** An instance of this class provides access to all the operations defined in IotSitesClient. */ -public interface IotSitesClient { - /** - * List IoT sites. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT sites. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - IotSitesListInner list(String scope); - - /** - * List IoT sites. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT sites. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse(String scope, Context context); - - /** - * Get IoT site. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT site. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - IotSitesModelInner get(String scope); - - /** - * Get IoT site. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param context The context to associate with this 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 ioT site. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String scope, Context context); - - /** - * Create or update IoT site. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSitesModel The IoT sites model. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT site model. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - IotSitesModelInner createOrUpdate(String scope, IotSitesModelInner iotSitesModel); - - /** - * Create or update IoT site. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSitesModel The IoT sites model. - * @param context The context to associate with this 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 ioT site model. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String scope, IotSitesModelInner iotSitesModel, Context context); - - /** - * Delete IoT site. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 scope); - - /** - * Delete IoT site. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param context The context to associate with this 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) - Response deleteWithResponse(String scope, Context context); -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/OnPremiseIotSensorsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/OnPremiseIotSensorsClient.java deleted file mode 100644 index 726cda7fbdbd9..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/OnPremiseIotSensorsClient.java +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.StreamResponse; -import com.azure.core.util.Context; -import com.azure.resourcemanager.security.fluent.models.OnPremiseIotSensorInner; -import com.azure.resourcemanager.security.fluent.models.OnPremiseIotSensorsListInner; -import com.azure.resourcemanager.security.models.ResetPasswordInput; -import java.io.InputStream; - -/** An instance of this class provides access to all the operations defined in OnPremiseIotSensorsClient. */ -public interface OnPremiseIotSensorsClient { - /** - * List on-premise IoT sensors. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of on-premise IoT sensors. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OnPremiseIotSensorsListInner list(); - - /** - * List on-premise IoT sensors. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of on-premise IoT sensors. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse(Context context); - - /** - * Get on-premise IoT sensor. - * - * @param onPremiseIotSensorName Name of the on-premise IoT sensor. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return on-premise IoT sensor. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OnPremiseIotSensorInner get(String onPremiseIotSensorName); - - /** - * Get on-premise IoT sensor. - * - * @param onPremiseIotSensorName Name of the on-premise IoT sensor. - * @param context The context to associate with this 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 on-premise IoT sensor. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String onPremiseIotSensorName, Context context); - - /** - * Create or update on-premise IoT sensor. - * - * @param onPremiseIotSensorName Name of the on-premise IoT sensor. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return on-premise IoT sensor. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OnPremiseIotSensorInner createOrUpdate(String onPremiseIotSensorName); - - /** - * Create or update on-premise IoT sensor. - * - * @param onPremiseIotSensorName Name of the on-premise IoT sensor. - * @param context The context to associate with this 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 on-premise IoT sensor. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String onPremiseIotSensorName, Context context); - - /** - * Delete on-premise IoT sensor. - * - * @param onPremiseIotSensorName Name of the on-premise IoT sensor. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 onPremiseIotSensorName); - - /** - * Delete on-premise IoT sensor. - * - * @param onPremiseIotSensorName Name of the on-premise IoT sensor. - * @param context The context to associate with this 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) - Response deleteWithResponse(String onPremiseIotSensorName, Context context); - - /** - * Download sensor activation file. - * - * @param onPremiseIotSensorName Name of the on-premise IoT sensor. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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) - InputStream downloadActivation(String onPremiseIotSensorName); - - /** - * Download sensor activation file. - * - * @param onPremiseIotSensorName Name of the on-premise IoT sensor. - * @param context The context to associate with this 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) - StreamResponse downloadActivationWithResponse(String onPremiseIotSensorName, Context context); - - /** - * Download file for reset password of the sensor. - * - * @param onPremiseIotSensorName Name of the on-premise IoT sensor. - * @param body Input for reset password. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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) - InputStream downloadResetPassword(String onPremiseIotSensorName, ResetPasswordInput body); - - /** - * Download file for reset password of the sensor. - * - * @param onPremiseIotSensorName Name of the on-premise IoT sensor. - * @param body Input for reset password. - * @param context The context to associate with this 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) - StreamResponse downloadResetPasswordWithResponse( - String onPremiseIotSensorName, ResetPasswordInput body, Context context); -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecurityCenter.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecurityCenter.java index ed8d21449d3ab..e1752b9791bc4 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecurityCenter.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecurityCenter.java @@ -324,83 +324,6 @@ public interface SecurityCenter { */ SqlVulnerabilityAssessmentBaselineRulesClient getSqlVulnerabilityAssessmentBaselineRules(); - /** - * Gets the IotDefenderSettingsClient object to access its operations. - * - * @return the IotDefenderSettingsClient object. - */ - IotDefenderSettingsClient getIotDefenderSettings(); - - /** - * Gets the IotSensorsClient object to access its operations. - * - * @return the IotSensorsClient object. - */ - IotSensorsClient getIotSensors(); - - /** - * Gets the DevicesForSubscriptionsClient object to access its operations. - * - * @return the DevicesForSubscriptionsClient object. - */ - DevicesForSubscriptionsClient getDevicesForSubscriptions(); - - /** - * Gets the DevicesForHubsClient object to access its operations. - * - * @return the DevicesForHubsClient object. - */ - DevicesForHubsClient getDevicesForHubs(); - - /** - * Gets the DevicesClient object to access its operations. - * - * @return the DevicesClient object. - */ - DevicesClient getDevices(); - - /** - * Gets the OnPremiseIotSensorsClient object to access its operations. - * - * @return the OnPremiseIotSensorsClient object. - */ - OnPremiseIotSensorsClient getOnPremiseIotSensors(); - - /** - * Gets the IotSitesClient object to access its operations. - * - * @return the IotSitesClient object. - */ - IotSitesClient getIotSites(); - - /** - * Gets the IotAlertsClient object to access its operations. - * - * @return the IotAlertsClient object. - */ - IotAlertsClient getIotAlerts(); - - /** - * Gets the IotAlertTypesClient object to access its operations. - * - * @return the IotAlertTypesClient object. - */ - IotAlertTypesClient getIotAlertTypes(); - - /** - * Gets the IotRecommendationsClient object to access its operations. - * - * @return the IotRecommendationsClient object. - */ - IotRecommendationsClient getIotRecommendations(); - - /** - * Gets the IotRecommendationTypesClient object to access its operations. - * - * @return the IotRecommendationTypesClient object. - */ - IotRecommendationTypesClient getIotRecommendationTypes(); - /** * Gets the AlertsClient object to access its operations. * diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AlertInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AlertInner.java index ad7e64021e14a..21a9bb42db86f 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AlertInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/AlertInner.java @@ -14,6 +14,7 @@ import com.azure.resourcemanager.security.models.Intent; import com.azure.resourcemanager.security.models.ResourceIdentifier; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; @@ -168,6 +169,7 @@ public class AlertInner extends ProxyResource { * Custom properties for the alert. */ @JsonProperty(value = "properties.extendedProperties") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map extendedProperties; /* diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/DeviceInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/DeviceInner.java deleted file mode 100644 index 7c2676265df72..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/DeviceInner.java +++ /dev/null @@ -1,493 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.security.models.AuthorizationState; -import com.azure.resourcemanager.security.models.DeviceCriticality; -import com.azure.resourcemanager.security.models.DeviceStatus; -import com.azure.resourcemanager.security.models.Firmware; -import com.azure.resourcemanager.security.models.ManagementState; -import com.azure.resourcemanager.security.models.NetworkInterface; -import com.azure.resourcemanager.security.models.ProgrammingState; -import com.azure.resourcemanager.security.models.Protocol; -import com.azure.resourcemanager.security.models.PurdueLevel; -import com.azure.resourcemanager.security.models.ScanningFunctionality; -import com.azure.resourcemanager.security.models.Sensor; -import com.azure.resourcemanager.security.models.Site; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** Device model. */ -@JsonFlatten -@Fluent -public class DeviceInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DeviceInner.class); - - /* - * Device display name given by the collector - */ - @JsonProperty(value = "properties.displayName") - private String displayName; - - /* - * Device type. - */ - @JsonProperty(value = "properties.deviceType") - private String deviceType; - - /* - * The source that created the device - */ - @JsonProperty(value = "properties.sourceName", access = JsonProperty.Access.WRITE_ONLY) - private String sourceName; - - /* - * List of network interfaces. - */ - @JsonProperty(value = "properties.networkInterfaces", access = JsonProperty.Access.WRITE_ONLY) - private List networkInterfaces; - - /* - * Device vendor - */ - @JsonProperty(value = "properties.vendor", access = JsonProperty.Access.WRITE_ONLY) - private String vendor; - - /* - * Device operating system name. - */ - @JsonProperty(value = "properties.osName") - private String osName; - - /* - * List of protocols. - */ - @JsonProperty(value = "properties.protocols", access = JsonProperty.Access.WRITE_ONLY) - private List protocols; - - /* - * last time the device was active in the network - */ - @JsonProperty(value = "properties.lastActiveTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastActiveTime; - - /* - * last time the device was updated - */ - @JsonProperty(value = "properties.lastUpdateTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastUpdateTime; - - /* - * Managed state of the device. - */ - @JsonProperty(value = "properties.managementState", access = JsonProperty.Access.WRITE_ONLY) - private ManagementState managementState; - - /* - * Authorized state of the device. - */ - @JsonProperty(value = "properties.authorizationState") - private AuthorizationState authorizationState; - - /* - * Device criticality. - */ - @JsonProperty(value = "properties.deviceCriticality") - private DeviceCriticality deviceCriticality; - - /* - * Purdue level of the device. - */ - @JsonProperty(value = "properties.purdueLevel") - private PurdueLevel purdueLevel; - - /* - * user notes for the device, up to 300 characters. - */ - @JsonProperty(value = "properties.notes") - private String notes; - - /* - * List of device firmwares. - */ - @JsonProperty(value = "properties.firmwares", access = JsonProperty.Access.WRITE_ONLY) - private List firmwares; - - /* - * Discovered time of the device. - */ - @JsonProperty(value = "properties.discoveryTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime discoveryTime; - - /* - * Indicates whether this device is programming - */ - @JsonProperty(value = "properties.programmingState", access = JsonProperty.Access.WRITE_ONLY) - private ProgrammingState programmingState; - - /* - * last time the device was programming or programed. - */ - @JsonProperty(value = "properties.lastProgrammingTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastProgrammingTime; - - /* - * Indicates whether the device is a scanner - */ - @JsonProperty(value = "properties.scanningFunctionality", access = JsonProperty.Access.WRITE_ONLY) - private ScanningFunctionality scanningFunctionality; - - /* - * last time the device was scanning. - */ - @JsonProperty(value = "properties.lastScanTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastScanTime; - - /* - * risk score of the device. - */ - @JsonProperty(value = "properties.riskScore", access = JsonProperty.Access.WRITE_ONLY) - private Integer riskScore; - - /* - * List of sensors that scanned this device. - */ - @JsonProperty(value = "properties.sensors", access = JsonProperty.Access.WRITE_ONLY) - private List sensors; - - /* - * Site data - */ - @JsonProperty(value = "properties.site", access = JsonProperty.Access.WRITE_ONLY) - private Site site; - - /* - * Device status. - */ - @JsonProperty(value = "properties.deviceStatus", access = JsonProperty.Access.WRITE_ONLY) - private DeviceStatus deviceStatus; - - /** - * Get the displayName property: Device display name given by the collector. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: Device display name given by the collector. - * - * @param displayName the displayName value to set. - * @return the DeviceInner object itself. - */ - public DeviceInner withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the deviceType property: Device type. - * - * @return the deviceType value. - */ - public String deviceType() { - return this.deviceType; - } - - /** - * Set the deviceType property: Device type. - * - * @param deviceType the deviceType value to set. - * @return the DeviceInner object itself. - */ - public DeviceInner withDeviceType(String deviceType) { - this.deviceType = deviceType; - return this; - } - - /** - * Get the sourceName property: The source that created the device. - * - * @return the sourceName value. - */ - public String sourceName() { - return this.sourceName; - } - - /** - * Get the networkInterfaces property: List of network interfaces. - * - * @return the networkInterfaces value. - */ - public List networkInterfaces() { - return this.networkInterfaces; - } - - /** - * Get the vendor property: Device vendor. - * - * @return the vendor value. - */ - public String vendor() { - return this.vendor; - } - - /** - * Get the osName property: Device operating system name. - * - * @return the osName value. - */ - public String osName() { - return this.osName; - } - - /** - * Set the osName property: Device operating system name. - * - * @param osName the osName value to set. - * @return the DeviceInner object itself. - */ - public DeviceInner withOsName(String osName) { - this.osName = osName; - return this; - } - - /** - * Get the protocols property: List of protocols. - * - * @return the protocols value. - */ - public List protocols() { - return this.protocols; - } - - /** - * Get the lastActiveTime property: last time the device was active in the network. - * - * @return the lastActiveTime value. - */ - public OffsetDateTime lastActiveTime() { - return this.lastActiveTime; - } - - /** - * Get the lastUpdateTime property: last time the device was updated. - * - * @return the lastUpdateTime value. - */ - public OffsetDateTime lastUpdateTime() { - return this.lastUpdateTime; - } - - /** - * Get the managementState property: Managed state of the device. - * - * @return the managementState value. - */ - public ManagementState managementState() { - return this.managementState; - } - - /** - * Get the authorizationState property: Authorized state of the device. - * - * @return the authorizationState value. - */ - public AuthorizationState authorizationState() { - return this.authorizationState; - } - - /** - * Set the authorizationState property: Authorized state of the device. - * - * @param authorizationState the authorizationState value to set. - * @return the DeviceInner object itself. - */ - public DeviceInner withAuthorizationState(AuthorizationState authorizationState) { - this.authorizationState = authorizationState; - return this; - } - - /** - * Get the deviceCriticality property: Device criticality. - * - * @return the deviceCriticality value. - */ - public DeviceCriticality deviceCriticality() { - return this.deviceCriticality; - } - - /** - * Set the deviceCriticality property: Device criticality. - * - * @param deviceCriticality the deviceCriticality value to set. - * @return the DeviceInner object itself. - */ - public DeviceInner withDeviceCriticality(DeviceCriticality deviceCriticality) { - this.deviceCriticality = deviceCriticality; - return this; - } - - /** - * Get the purdueLevel property: Purdue level of the device. - * - * @return the purdueLevel value. - */ - public PurdueLevel purdueLevel() { - return this.purdueLevel; - } - - /** - * Set the purdueLevel property: Purdue level of the device. - * - * @param purdueLevel the purdueLevel value to set. - * @return the DeviceInner object itself. - */ - public DeviceInner withPurdueLevel(PurdueLevel purdueLevel) { - this.purdueLevel = purdueLevel; - return this; - } - - /** - * Get the notes property: user notes for the device, up to 300 characters. - * - * @return the notes value. - */ - public String notes() { - return this.notes; - } - - /** - * Set the notes property: user notes for the device, up to 300 characters. - * - * @param notes the notes value to set. - * @return the DeviceInner object itself. - */ - public DeviceInner withNotes(String notes) { - this.notes = notes; - return this; - } - - /** - * Get the firmwares property: List of device firmwares. - * - * @return the firmwares value. - */ - public List firmwares() { - return this.firmwares; - } - - /** - * Get the discoveryTime property: Discovered time of the device. - * - * @return the discoveryTime value. - */ - public OffsetDateTime discoveryTime() { - return this.discoveryTime; - } - - /** - * Get the programmingState property: Indicates whether this device is programming. - * - * @return the programmingState value. - */ - public ProgrammingState programmingState() { - return this.programmingState; - } - - /** - * Get the lastProgrammingTime property: last time the device was programming or programed. - * - * @return the lastProgrammingTime value. - */ - public OffsetDateTime lastProgrammingTime() { - return this.lastProgrammingTime; - } - - /** - * Get the scanningFunctionality property: Indicates whether the device is a scanner. - * - * @return the scanningFunctionality value. - */ - public ScanningFunctionality scanningFunctionality() { - return this.scanningFunctionality; - } - - /** - * Get the lastScanTime property: last time the device was scanning. - * - * @return the lastScanTime value. - */ - public OffsetDateTime lastScanTime() { - return this.lastScanTime; - } - - /** - * Get the riskScore property: risk score of the device. - * - * @return the riskScore value. - */ - public Integer riskScore() { - return this.riskScore; - } - - /** - * Get the sensors property: List of sensors that scanned this device. - * - * @return the sensors value. - */ - public List sensors() { - return this.sensors; - } - - /** - * Get the site property: Site data. - * - * @return the site value. - */ - public Site site() { - return this.site; - } - - /** - * Get the deviceStatus property: Device status. - * - * @return the deviceStatus value. - */ - public DeviceStatus deviceStatus() { - return this.deviceStatus; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (networkInterfaces() != null) { - networkInterfaces().forEach(e -> e.validate()); - } - if (protocols() != null) { - protocols().forEach(e -> e.validate()); - } - if (firmwares() != null) { - firmwares().forEach(e -> e.validate()); - } - if (sensors() != null) { - sensors().forEach(e -> e.validate()); - } - if (site() != null) { - site().validate(); - } - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/InformationProtectionPolicyInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/InformationProtectionPolicyInner.java index 58ffc98ba14fa..bbe9867c2875f 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/InformationProtectionPolicyInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/InformationProtectionPolicyInner.java @@ -11,6 +11,7 @@ import com.azure.resourcemanager.security.models.InformationType; import com.azure.resourcemanager.security.models.SensitivityLabel; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.Map; @@ -37,12 +38,14 @@ public class InformationProtectionPolicyInner extends ProxyResource { * Dictionary of sensitivity labels. */ @JsonProperty(value = "properties.labels") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map labels; /* * The sensitivity information types. */ @JsonProperty(value = "properties.informationTypes") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map informationTypes; /** diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecurityAggregatedAlertInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecurityAggregatedAlertInner.java index e63895b8af854..8255a4e1658f0 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecurityAggregatedAlertInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecurityAggregatedAlertInner.java @@ -11,6 +11,7 @@ import com.azure.resourcemanager.security.models.IoTSecurityAggregatedAlertPropertiesTopDevicesListItem; import com.azure.resourcemanager.security.models.ReportedSeverity; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.LocalDate; import java.util.List; @@ -105,6 +106,7 @@ public class IoTSecurityAggregatedAlertInner extends ProxyResource { * Resource tags */ @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /** diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecurityAggregatedRecommendationInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecurityAggregatedRecommendationInner.java index c75f4c6ded38d..5e0b6d7b3388a 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecurityAggregatedRecommendationInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecurityAggregatedRecommendationInner.java @@ -10,6 +10,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.security.models.ReportedSeverity; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -83,6 +84,7 @@ public class IoTSecurityAggregatedRecommendationInner extends ProxyResource { * Resource tags */ @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /** diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecuritySolutionModelInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecuritySolutionModelInner.java index b4fba2e83a4b8..35f4bc16dab73 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecuritySolutionModelInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IoTSecuritySolutionModelInner.java @@ -17,6 +17,7 @@ import com.azure.resourcemanager.security.models.UnmaskedIpLoggingStatus; import com.azure.resourcemanager.security.models.UserDefinedResourcesProperties; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Map; @@ -112,6 +113,7 @@ public class IoTSecuritySolutionModelInner extends ProxyResource { * Resource tags */ @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /** diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotAlertModelInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotAlertModelInner.java deleted file mode 100644 index f6fe3964e991c..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotAlertModelInner.java +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** IoT alert. */ -@JsonFlatten -@Fluent -public class IotAlertModelInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IotAlertModelInner.class); - - /* - * Holds the product canonical identifier of the alert within the scope of - * a product - */ - @JsonProperty(value = "properties.systemAlertId", access = JsonProperty.Access.WRITE_ONLY) - private String systemAlertId; - - /* - * Display name of the main entity being reported on - */ - @JsonProperty(value = "properties.compromisedEntity", access = JsonProperty.Access.WRITE_ONLY) - private String compromisedEntity; - - /* - * The type name of the alert - */ - @JsonProperty(value = "properties.alertType", access = JsonProperty.Access.WRITE_ONLY) - private String alertType; - - /* - * The impact start time of the alert (the time of the first event or - * activity included in the alert) - */ - @JsonProperty(value = "properties.startTimeUtc", access = JsonProperty.Access.WRITE_ONLY) - private String startTimeUtc; - - /* - * The impact end time of the alert (the time of the last event or activity - * included in the alert) - */ - @JsonProperty(value = "properties.endTimeUtc", access = JsonProperty.Access.WRITE_ONLY) - private String endTimeUtc; - - /* - * A list of entities related to the alert - */ - @JsonProperty(value = "properties.entities") - private List entities; - - /* - * A bag of fields which extends the alert information - */ - @JsonProperty(value = "properties.extendedProperties") - private Object extendedProperties; - - /** - * Get the systemAlertId property: Holds the product canonical identifier of the alert within the scope of a - * product. - * - * @return the systemAlertId value. - */ - public String systemAlertId() { - return this.systemAlertId; - } - - /** - * Get the compromisedEntity property: Display name of the main entity being reported on. - * - * @return the compromisedEntity value. - */ - public String compromisedEntity() { - return this.compromisedEntity; - } - - /** - * Get the alertType property: The type name of the alert. - * - * @return the alertType value. - */ - public String alertType() { - return this.alertType; - } - - /** - * Get the startTimeUtc property: The impact start time of the alert (the time of the first event or activity - * included in the alert). - * - * @return the startTimeUtc value. - */ - public String startTimeUtc() { - return this.startTimeUtc; - } - - /** - * Get the endTimeUtc property: The impact end time of the alert (the time of the last event or activity included in - * the alert). - * - * @return the endTimeUtc value. - */ - public String endTimeUtc() { - return this.endTimeUtc; - } - - /** - * Get the entities property: A list of entities related to the alert. - * - * @return the entities value. - */ - public List entities() { - return this.entities; - } - - /** - * Set the entities property: A list of entities related to the alert. - * - * @param entities the entities value to set. - * @return the IotAlertModelInner object itself. - */ - public IotAlertModelInner withEntities(List entities) { - this.entities = entities; - return this; - } - - /** - * Get the extendedProperties property: A bag of fields which extends the alert information. - * - * @return the extendedProperties value. - */ - public Object extendedProperties() { - return this.extendedProperties; - } - - /** - * Set the extendedProperties property: A bag of fields which extends the alert information. - * - * @param extendedProperties the extendedProperties value to set. - * @return the IotAlertModelInner object itself. - */ - public IotAlertModelInner withExtendedProperties(Object extendedProperties) { - this.extendedProperties = extendedProperties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotAlertTypeInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotAlertTypeInner.java deleted file mode 100644 index 180a9cf7a0bbf..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotAlertTypeInner.java +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.security.models.AlertIntent; -import com.azure.resourcemanager.security.models.AlertSeverity; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** IoT alert type. */ -@JsonFlatten -@Immutable -public class IotAlertTypeInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IotAlertTypeInner.class); - - /* - * The display name of the alert - */ - @JsonProperty(value = "properties.alertDisplayName", access = JsonProperty.Access.WRITE_ONLY) - private String alertDisplayName; - - /* - * The severity of the alert - */ - @JsonProperty(value = "properties.severity", access = JsonProperty.Access.WRITE_ONLY) - private AlertSeverity severity; - - /* - * Description of the suspected vulnerability and meaning. - */ - @JsonProperty(value = "properties.description", access = JsonProperty.Access.WRITE_ONLY) - private String description; - - /* - * The name of the alert provider or internal partner - */ - @JsonProperty(value = "properties.providerName", access = JsonProperty.Access.WRITE_ONLY) - private String providerName; - - /* - * The name of the product which published this alert - */ - @JsonProperty(value = "properties.productName", access = JsonProperty.Access.WRITE_ONLY) - private String productName; - - /* - * The name of a component inside the product which generated the alert - */ - @JsonProperty(value = "properties.productComponentName", access = JsonProperty.Access.WRITE_ONLY) - private String productComponentName; - - /* - * The name of the vendor that raise the alert - */ - @JsonProperty(value = "properties.vendorName", access = JsonProperty.Access.WRITE_ONLY) - private String vendorName; - - /* - * Kill chain related intent behind the alert. Could contain multiple enum - * values (separated by commas) - */ - @JsonProperty(value = "properties.intent", access = JsonProperty.Access.WRITE_ONLY) - private AlertIntent intent; - - /* - * Manual action items to take to remediate the alert - */ - @JsonProperty(value = "properties.remediationSteps", access = JsonProperty.Access.WRITE_ONLY) - private List remediationSteps; - - /** - * Get the alertDisplayName property: The display name of the alert. - * - * @return the alertDisplayName value. - */ - public String alertDisplayName() { - return this.alertDisplayName; - } - - /** - * Get the severity property: The severity of the alert. - * - * @return the severity value. - */ - public AlertSeverity severity() { - return this.severity; - } - - /** - * Get the description property: Description of the suspected vulnerability and meaning. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Get the providerName property: The name of the alert provider or internal partner. - * - * @return the providerName value. - */ - public String providerName() { - return this.providerName; - } - - /** - * Get the productName property: The name of the product which published this alert. - * - * @return the productName value. - */ - public String productName() { - return this.productName; - } - - /** - * Get the productComponentName property: The name of a component inside the product which generated the alert. - * - * @return the productComponentName value. - */ - public String productComponentName() { - return this.productComponentName; - } - - /** - * Get the vendorName property: The name of the vendor that raise the alert. - * - * @return the vendorName value. - */ - public String vendorName() { - return this.vendorName; - } - - /** - * Get the intent property: Kill chain related intent behind the alert. Could contain multiple enum values - * (separated by commas). - * - * @return the intent value. - */ - public AlertIntent intent() { - return this.intent; - } - - /** - * Get the remediationSteps property: Manual action items to take to remediate the alert. - * - * @return the remediationSteps value. - */ - public List remediationSteps() { - return this.remediationSteps; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotAlertTypeListInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotAlertTypeListInner.java deleted file mode 100644 index d428d8283f9a5..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotAlertTypeListInner.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List of alert types. */ -@Fluent -public final class IotAlertTypeListInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IotAlertTypeListInner.class); - - /* - * List data - */ - @JsonProperty(value = "value") - private List value; - - /** - * Get the value property: List data. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: List data. - * - * @param value the value value to set. - * @return the IotAlertTypeListInner object itself. - */ - public IotAlertTypeListInner withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotDefenderSettingsListInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotDefenderSettingsListInner.java deleted file mode 100644 index 26fb0a90bee16..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotDefenderSettingsListInner.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List of IoT Defender settings. */ -@Immutable -public final class IotDefenderSettingsListInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IotDefenderSettingsListInner.class); - - /* - * List data - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /** - * Get the value property: List data. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotDefenderSettingsModelInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotDefenderSettingsModelInner.java deleted file mode 100644 index 0619dc3c8394b..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotDefenderSettingsModelInner.java +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.security.models.OnboardingKind; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** IoT Defender settings. */ -@JsonFlatten -@Fluent -public class IotDefenderSettingsModelInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IotDefenderSettingsModelInner.class); - - /* - * Size of the device quota (as a opposed to a Pay as You Go billing - * model). Value is required to be in multiples of 1000. - */ - @JsonProperty(value = "properties.deviceQuota") - private Integer deviceQuota; - - /* - * Sentinel Workspace Resource Ids - */ - @JsonProperty(value = "properties.sentinelWorkspaceResourceIds") - private List sentinelWorkspaceResourceIds; - - /* - * The kind of onboarding for the subscription - */ - @JsonProperty(value = "properties.onboardingKind") - private OnboardingKind onboardingKind; - - /* - * End time of the evaluation period, if such exist - */ - @JsonProperty(value = "properties.evaluationEndTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime evaluationEndTime; - - /** - * Get the deviceQuota property: Size of the device quota (as a opposed to a Pay as You Go billing model). Value is - * required to be in multiples of 1000. - * - * @return the deviceQuota value. - */ - public Integer deviceQuota() { - return this.deviceQuota; - } - - /** - * Set the deviceQuota property: Size of the device quota (as a opposed to a Pay as You Go billing model). Value is - * required to be in multiples of 1000. - * - * @param deviceQuota the deviceQuota value to set. - * @return the IotDefenderSettingsModelInner object itself. - */ - public IotDefenderSettingsModelInner withDeviceQuota(Integer deviceQuota) { - this.deviceQuota = deviceQuota; - return this; - } - - /** - * Get the sentinelWorkspaceResourceIds property: Sentinel Workspace Resource Ids. - * - * @return the sentinelWorkspaceResourceIds value. - */ - public List sentinelWorkspaceResourceIds() { - return this.sentinelWorkspaceResourceIds; - } - - /** - * Set the sentinelWorkspaceResourceIds property: Sentinel Workspace Resource Ids. - * - * @param sentinelWorkspaceResourceIds the sentinelWorkspaceResourceIds value to set. - * @return the IotDefenderSettingsModelInner object itself. - */ - public IotDefenderSettingsModelInner withSentinelWorkspaceResourceIds(List sentinelWorkspaceResourceIds) { - this.sentinelWorkspaceResourceIds = sentinelWorkspaceResourceIds; - return this; - } - - /** - * Get the onboardingKind property: The kind of onboarding for the subscription. - * - * @return the onboardingKind value. - */ - public OnboardingKind onboardingKind() { - return this.onboardingKind; - } - - /** - * Set the onboardingKind property: The kind of onboarding for the subscription. - * - * @param onboardingKind the onboardingKind value to set. - * @return the IotDefenderSettingsModelInner object itself. - */ - public IotDefenderSettingsModelInner withOnboardingKind(OnboardingKind onboardingKind) { - this.onboardingKind = onboardingKind; - return this; - } - - /** - * Get the evaluationEndTime property: End time of the evaluation period, if such exist. - * - * @return the evaluationEndTime value. - */ - public OffsetDateTime evaluationEndTime() { - return this.evaluationEndTime; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotRecommendationModelInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotRecommendationModelInner.java deleted file mode 100644 index b094b7940c0cd..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotRecommendationModelInner.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** IoT recommendation. */ -@JsonFlatten -@Fluent -public class IotRecommendationModelInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IotRecommendationModelInner.class); - - /* - * Identifier of the device being reported on - */ - @JsonProperty(value = "properties.deviceId", access = JsonProperty.Access.WRITE_ONLY) - private String deviceId; - - /* - * The type name of the recommendation - */ - @JsonProperty(value = "properties.recommendationType", access = JsonProperty.Access.WRITE_ONLY) - private String recommendationType; - - /* - * The discovery time of the recommendation - */ - @JsonProperty(value = "properties.discoveredTimeUtc", access = JsonProperty.Access.WRITE_ONLY) - private String discoveredTimeUtc; - - /* - * A bag of fields which extends the recommendation information - */ - @JsonProperty(value = "properties.recommendationAdditionalData") - private Object recommendationAdditionalData; - - /** - * Get the deviceId property: Identifier of the device being reported on. - * - * @return the deviceId value. - */ - public String deviceId() { - return this.deviceId; - } - - /** - * Get the recommendationType property: The type name of the recommendation. - * - * @return the recommendationType value. - */ - public String recommendationType() { - return this.recommendationType; - } - - /** - * Get the discoveredTimeUtc property: The discovery time of the recommendation. - * - * @return the discoveredTimeUtc value. - */ - public String discoveredTimeUtc() { - return this.discoveredTimeUtc; - } - - /** - * Get the recommendationAdditionalData property: A bag of fields which extends the recommendation information. - * - * @return the recommendationAdditionalData value. - */ - public Object recommendationAdditionalData() { - return this.recommendationAdditionalData; - } - - /** - * Set the recommendationAdditionalData property: A bag of fields which extends the recommendation information. - * - * @param recommendationAdditionalData the recommendationAdditionalData value to set. - * @return the IotRecommendationModelInner object itself. - */ - public IotRecommendationModelInner withRecommendationAdditionalData(Object recommendationAdditionalData) { - this.recommendationAdditionalData = recommendationAdditionalData; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotRecommendationTypeInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotRecommendationTypeInner.java deleted file mode 100644 index eaca53fa1320b..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotRecommendationTypeInner.java +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.security.models.RecommendationSeverity; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** IoT recommendation type. */ -@JsonFlatten -@Immutable -public class IotRecommendationTypeInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IotRecommendationTypeInner.class); - - /* - * The display name of the recommendation - */ - @JsonProperty(value = "properties.recommendationDisplayName", access = JsonProperty.Access.WRITE_ONLY) - private String recommendationDisplayName; - - /* - * The severity of the recommendation - */ - @JsonProperty(value = "properties.severity", access = JsonProperty.Access.WRITE_ONLY) - private RecommendationSeverity severity; - - /* - * Description of the suspected vulnerability and meaning. - */ - @JsonProperty(value = "properties.description", access = JsonProperty.Access.WRITE_ONLY) - private String description; - - /* - * The name of the product which published this recommendation - */ - @JsonProperty(value = "properties.productName", access = JsonProperty.Access.WRITE_ONLY) - private String productName; - - /* - * The name of a component inside the product which generated the - * recommendation - */ - @JsonProperty(value = "properties.productComponentName", access = JsonProperty.Access.WRITE_ONLY) - private String productComponentName; - - /* - * The name of the vendor that raised the recommendation - */ - @JsonProperty(value = "properties.vendorName", access = JsonProperty.Access.WRITE_ONLY) - private String vendorName; - - /* - * The name of the recommendation's control category - */ - @JsonProperty(value = "properties.control", access = JsonProperty.Access.WRITE_ONLY) - private String control; - - /* - * Manual action items to take to resolve the recommendation - */ - @JsonProperty(value = "properties.remediationSteps", access = JsonProperty.Access.WRITE_ONLY) - private List remediationSteps; - - /* - * The alert's data source - */ - @JsonProperty(value = "properties.dataSource", access = JsonProperty.Access.WRITE_ONLY) - private String dataSource; - - /** - * Get the recommendationDisplayName property: The display name of the recommendation. - * - * @return the recommendationDisplayName value. - */ - public String recommendationDisplayName() { - return this.recommendationDisplayName; - } - - /** - * Get the severity property: The severity of the recommendation. - * - * @return the severity value. - */ - public RecommendationSeverity severity() { - return this.severity; - } - - /** - * Get the description property: Description of the suspected vulnerability and meaning. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Get the productName property: The name of the product which published this recommendation. - * - * @return the productName value. - */ - public String productName() { - return this.productName; - } - - /** - * Get the productComponentName property: The name of a component inside the product which generated the - * recommendation. - * - * @return the productComponentName value. - */ - public String productComponentName() { - return this.productComponentName; - } - - /** - * Get the vendorName property: The name of the vendor that raised the recommendation. - * - * @return the vendorName value. - */ - public String vendorName() { - return this.vendorName; - } - - /** - * Get the control property: The name of the recommendation's control category. - * - * @return the control value. - */ - public String control() { - return this.control; - } - - /** - * Get the remediationSteps property: Manual action items to take to resolve the recommendation. - * - * @return the remediationSteps value. - */ - public List remediationSteps() { - return this.remediationSteps; - } - - /** - * Get the dataSource property: The alert's data source. - * - * @return the dataSource value. - */ - public String dataSource() { - return this.dataSource; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotRecommendationTypeListInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotRecommendationTypeListInner.java deleted file mode 100644 index 72028c184a28a..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotRecommendationTypeListInner.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List of recommendation types. */ -@Fluent -public final class IotRecommendationTypeListInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IotRecommendationTypeListInner.class); - - /* - * List data - */ - @JsonProperty(value = "value") - private List value; - - /** - * Get the value property: List data. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: List data. - * - * @param value the value value to set. - * @return the IotRecommendationTypeListInner object itself. - */ - public IotRecommendationTypeListInner withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotSensorsListInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotSensorsListInner.java deleted file mode 100644 index 94c2c0fe00ed6..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotSensorsListInner.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List of IoT sensors. */ -@Immutable -public final class IotSensorsListInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IotSensorsListInner.class); - - /* - * List data - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /** - * Get the value property: List data. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotSensorsModelInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotSensorsModelInner.java deleted file mode 100644 index b29eeacb9c94f..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotSensorsModelInner.java +++ /dev/null @@ -1,228 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.security.models.SensorStatus; -import com.azure.resourcemanager.security.models.SensorType; -import com.azure.resourcemanager.security.models.TiStatus; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** IoT sensor model. */ -@JsonFlatten -@Fluent -public class IotSensorsModelInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IotSensorsModelInner.class); - - /* - * Last connectivity time of the IoT sensor - */ - @JsonProperty(value = "properties.connectivityTime", access = JsonProperty.Access.WRITE_ONLY) - private String connectivityTime; - - /* - * Creation time of the IoT sensor - */ - @JsonProperty(value = "properties.creationTime", access = JsonProperty.Access.WRITE_ONLY) - private String creationTime; - - /* - * Dynamic mode status of the IoT sensor - */ - @JsonProperty(value = "properties.dynamicLearning", access = JsonProperty.Access.WRITE_ONLY) - private Boolean dynamicLearning; - - /* - * Learning mode status of the IoT sensor - */ - @JsonProperty(value = "properties.learningMode", access = JsonProperty.Access.WRITE_ONLY) - private Boolean learningMode; - - /* - * Status of the IoT sensor - */ - @JsonProperty(value = "properties.sensorStatus", access = JsonProperty.Access.WRITE_ONLY) - private SensorStatus sensorStatus; - - /* - * Version of the IoT sensor - */ - @JsonProperty(value = "properties.sensorVersion", access = JsonProperty.Access.WRITE_ONLY) - private String sensorVersion; - - /* - * TI Automatic mode status of the IoT sensor - */ - @JsonProperty(value = "properties.tiAutomaticUpdates") - private Boolean tiAutomaticUpdates; - - /* - * TI Status of the IoT sensor - */ - @JsonProperty(value = "properties.tiStatus", access = JsonProperty.Access.WRITE_ONLY) - private TiStatus tiStatus; - - /* - * TI Version of the IoT sensor - */ - @JsonProperty(value = "properties.tiVersion", access = JsonProperty.Access.WRITE_ONLY) - private String tiVersion; - - /* - * Zone of the IoT sensor - */ - @JsonProperty(value = "properties.zone") - private String zone; - - /* - * Type of sensor - */ - @JsonProperty(value = "properties.sensorType") - private SensorType sensorType; - - /** - * Get the connectivityTime property: Last connectivity time of the IoT sensor. - * - * @return the connectivityTime value. - */ - public String connectivityTime() { - return this.connectivityTime; - } - - /** - * Get the creationTime property: Creation time of the IoT sensor. - * - * @return the creationTime value. - */ - public String creationTime() { - return this.creationTime; - } - - /** - * Get the dynamicLearning property: Dynamic mode status of the IoT sensor. - * - * @return the dynamicLearning value. - */ - public Boolean dynamicLearning() { - return this.dynamicLearning; - } - - /** - * Get the learningMode property: Learning mode status of the IoT sensor. - * - * @return the learningMode value. - */ - public Boolean learningMode() { - return this.learningMode; - } - - /** - * Get the sensorStatus property: Status of the IoT sensor. - * - * @return the sensorStatus value. - */ - public SensorStatus sensorStatus() { - return this.sensorStatus; - } - - /** - * Get the sensorVersion property: Version of the IoT sensor. - * - * @return the sensorVersion value. - */ - public String sensorVersion() { - return this.sensorVersion; - } - - /** - * Get the tiAutomaticUpdates property: TI Automatic mode status of the IoT sensor. - * - * @return the tiAutomaticUpdates value. - */ - public Boolean tiAutomaticUpdates() { - return this.tiAutomaticUpdates; - } - - /** - * Set the tiAutomaticUpdates property: TI Automatic mode status of the IoT sensor. - * - * @param tiAutomaticUpdates the tiAutomaticUpdates value to set. - * @return the IotSensorsModelInner object itself. - */ - public IotSensorsModelInner withTiAutomaticUpdates(Boolean tiAutomaticUpdates) { - this.tiAutomaticUpdates = tiAutomaticUpdates; - return this; - } - - /** - * Get the tiStatus property: TI Status of the IoT sensor. - * - * @return the tiStatus value. - */ - public TiStatus tiStatus() { - return this.tiStatus; - } - - /** - * Get the tiVersion property: TI Version of the IoT sensor. - * - * @return the tiVersion value. - */ - public String tiVersion() { - return this.tiVersion; - } - - /** - * Get the zone property: Zone of the IoT sensor. - * - * @return the zone value. - */ - public String zone() { - return this.zone; - } - - /** - * Set the zone property: Zone of the IoT sensor. - * - * @param zone the zone value to set. - * @return the IotSensorsModelInner object itself. - */ - public IotSensorsModelInner withZone(String zone) { - this.zone = zone; - return this; - } - - /** - * Get the sensorType property: Type of sensor. - * - * @return the sensorType value. - */ - public SensorType sensorType() { - return this.sensorType; - } - - /** - * Set the sensorType property: Type of sensor. - * - * @param sensorType the sensorType value to set. - * @return the IotSensorsModelInner object itself. - */ - public IotSensorsModelInner withSensorType(SensorType sensorType) { - this.sensorType = sensorType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotSitesListInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotSitesListInner.java deleted file mode 100644 index d2a2937205952..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotSitesListInner.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List of IoT sites. */ -@Immutable -public final class IotSitesListInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IotSitesListInner.class); - - /* - * List data - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /** - * Get the value property: List data. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotSitesModelInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotSitesModelInner.java deleted file mode 100644 index d9b9d727f3d2e..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotSitesModelInner.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** IoT site model. */ -@JsonFlatten -@Fluent -public class IotSitesModelInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IotSitesModelInner.class); - - /* - * Display name of the IoT site - */ - @JsonProperty(value = "properties.displayName") - private String displayName; - - /* - * Tags of the IoT site - */ - @JsonProperty(value = "properties.tags") - private Map tags; - - /** - * Get the displayName property: Display name of the IoT site. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: Display name of the IoT site. - * - * @param displayName the displayName value to set. - * @return the IotSitesModelInner object itself. - */ - public IotSitesModelInner withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the tags property: Tags of the IoT site. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Tags of the IoT site. - * - * @param tags the tags value to set. - * @return the IotSitesModelInner object itself. - */ - public IotSitesModelInner withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/OnPremiseIotSensorInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/OnPremiseIotSensorInner.java deleted file mode 100644 index fd611d7dcc160..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/OnPremiseIotSensorInner.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** On-premise IoT sensor. */ -@Fluent -public final class OnPremiseIotSensorInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OnPremiseIotSensorInner.class); - - /* - * On-premise IoT sensor properties - */ - @JsonProperty(value = "properties") - private Object properties; - - /** - * Get the properties property: On-premise IoT sensor properties. - * - * @return the properties value. - */ - public Object properties() { - return this.properties; - } - - /** - * Set the properties property: On-premise IoT sensor properties. - * - * @param properties the properties value to set. - * @return the OnPremiseIotSensorInner object itself. - */ - public OnPremiseIotSensorInner withProperties(Object properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/OnPremiseIotSensorsListInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/OnPremiseIotSensorsListInner.java deleted file mode 100644 index a1b2eae47e53b..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/OnPremiseIotSensorsListInner.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List of on-premise IoT sensors. */ -@Immutable -public final class OnPremiseIotSensorsListInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OnPremiseIotSensorsListInner.class); - - /* - * List data - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /** - * Get the value property: List data. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/PackageDownloadsInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/PackageDownloadsInner.java deleted file mode 100644 index 63aa43ea9fd58..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/PackageDownloadsInner.java +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.security.models.PackageDownloadInfo; -import com.azure.resourcemanager.security.models.PackageDownloadsCentralManager; -import com.azure.resourcemanager.security.models.PackageDownloadsSensor; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Information about package downloads. */ -@Immutable -public final class PackageDownloadsInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PackageDownloadsInner.class); - - /* - * Contains all Sensor binary downloads - */ - @JsonProperty(value = "sensor", access = JsonProperty.Access.WRITE_ONLY) - private PackageDownloadsSensor sensor; - - /* - * All downloads for Central Manager - */ - @JsonProperty(value = "centralManager", access = JsonProperty.Access.WRITE_ONLY) - private PackageDownloadsCentralManager centralManager; - - /* - * All downloads for threat intelligence - */ - @JsonProperty(value = "threatIntelligence", access = JsonProperty.Access.WRITE_ONLY) - private List threatIntelligence; - - /* - * SNMP Server file - */ - @JsonProperty(value = "snmp", access = JsonProperty.Access.WRITE_ONLY) - private List snmp; - - /* - * Used for local configuration export - */ - @JsonProperty(value = "wmiTool", access = JsonProperty.Access.WRITE_ONLY) - private List wmiTool; - - /* - * Authorized devices import template - */ - @JsonProperty(value = "authorizedDevicesImportTemplate", access = JsonProperty.Access.WRITE_ONLY) - private List authorizedDevicesImportTemplate; - - /* - * Authorized devices import template - */ - @JsonProperty(value = "deviceInformationUpdateImportTemplate", access = JsonProperty.Access.WRITE_ONLY) - private List deviceInformationUpdateImportTemplate; - - /** - * Get the sensor property: Contains all Sensor binary downloads. - * - * @return the sensor value. - */ - public PackageDownloadsSensor sensor() { - return this.sensor; - } - - /** - * Get the centralManager property: All downloads for Central Manager. - * - * @return the centralManager value. - */ - public PackageDownloadsCentralManager centralManager() { - return this.centralManager; - } - - /** - * Get the threatIntelligence property: All downloads for threat intelligence. - * - * @return the threatIntelligence value. - */ - public List threatIntelligence() { - return this.threatIntelligence; - } - - /** - * Get the snmp property: SNMP Server file. - * - * @return the snmp value. - */ - public List snmp() { - return this.snmp; - } - - /** - * Get the wmiTool property: Used for local configuration export. - * - * @return the wmiTool value. - */ - public List wmiTool() { - return this.wmiTool; - } - - /** - * Get the authorizedDevicesImportTemplate property: Authorized devices import template. - * - * @return the authorizedDevicesImportTemplate value. - */ - public List authorizedDevicesImportTemplate() { - return this.authorizedDevicesImportTemplate; - } - - /** - * Get the deviceInformationUpdateImportTemplate property: Authorized devices import template. - * - * @return the deviceInformationUpdateImportTemplate value. - */ - public List deviceInformationUpdateImportTemplate() { - return this.deviceInformationUpdateImportTemplate; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sensor() != null) { - sensor().validate(); - } - if (centralManager() != null) { - centralManager().validate(); - } - if (threatIntelligence() != null) { - threatIntelligence().forEach(e -> e.validate()); - } - if (snmp() != null) { - snmp().forEach(e -> e.validate()); - } - if (wmiTool() != null) { - wmiTool().forEach(e -> e.validate()); - } - if (authorizedDevicesImportTemplate() != null) { - authorizedDevicesImportTemplate().forEach(e -> e.validate()); - } - if (deviceInformationUpdateImportTemplate() != null) { - deviceInformationUpdateImportTemplate().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityAssessmentInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityAssessmentInner.java index c053d6cb76b97..954018ed8e393 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityAssessmentInner.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityAssessmentInner.java @@ -14,6 +14,7 @@ import com.azure.resourcemanager.security.models.SecurityAssessmentMetadataProperties; import com.azure.resourcemanager.security.models.SecurityAssessmentPartnerData; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -45,6 +46,7 @@ public class SecurityAssessmentInner extends ProxyResource { * Additional data regarding the assessment */ @JsonProperty(value = "properties.additionalData") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map additionalData; /* diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DeviceImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DeviceImpl.java deleted file mode 100644 index bd7d057a552e3..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DeviceImpl.java +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.implementation; - -import com.azure.resourcemanager.security.fluent.models.DeviceInner; -import com.azure.resourcemanager.security.models.AuthorizationState; -import com.azure.resourcemanager.security.models.Device; -import com.azure.resourcemanager.security.models.DeviceCriticality; -import com.azure.resourcemanager.security.models.DeviceStatus; -import com.azure.resourcemanager.security.models.Firmware; -import com.azure.resourcemanager.security.models.ManagementState; -import com.azure.resourcemanager.security.models.NetworkInterface; -import com.azure.resourcemanager.security.models.ProgrammingState; -import com.azure.resourcemanager.security.models.Protocol; -import com.azure.resourcemanager.security.models.PurdueLevel; -import com.azure.resourcemanager.security.models.ScanningFunctionality; -import com.azure.resourcemanager.security.models.Sensor; -import com.azure.resourcemanager.security.models.Site; -import java.time.OffsetDateTime; -import java.util.Collections; -import java.util.List; - -public final class DeviceImpl implements Device { - private DeviceInner innerObject; - - private final com.azure.resourcemanager.security.SecurityManager serviceManager; - - DeviceImpl(DeviceInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String displayName() { - return this.innerModel().displayName(); - } - - public String deviceType() { - return this.innerModel().deviceType(); - } - - public String sourceName() { - return this.innerModel().sourceName(); - } - - public List networkInterfaces() { - List inner = this.innerModel().networkInterfaces(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public String vendor() { - return this.innerModel().vendor(); - } - - public String osName() { - return this.innerModel().osName(); - } - - public List protocols() { - List inner = this.innerModel().protocols(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public OffsetDateTime lastActiveTime() { - return this.innerModel().lastActiveTime(); - } - - public OffsetDateTime lastUpdateTime() { - return this.innerModel().lastUpdateTime(); - } - - public ManagementState managementState() { - return this.innerModel().managementState(); - } - - public AuthorizationState authorizationState() { - return this.innerModel().authorizationState(); - } - - public DeviceCriticality deviceCriticality() { - return this.innerModel().deviceCriticality(); - } - - public PurdueLevel purdueLevel() { - return this.innerModel().purdueLevel(); - } - - public String notes() { - return this.innerModel().notes(); - } - - public List firmwares() { - List inner = this.innerModel().firmwares(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public OffsetDateTime discoveryTime() { - return this.innerModel().discoveryTime(); - } - - public ProgrammingState programmingState() { - return this.innerModel().programmingState(); - } - - public OffsetDateTime lastProgrammingTime() { - return this.innerModel().lastProgrammingTime(); - } - - public ScanningFunctionality scanningFunctionality() { - return this.innerModel().scanningFunctionality(); - } - - public OffsetDateTime lastScanTime() { - return this.innerModel().lastScanTime(); - } - - public Integer riskScore() { - return this.innerModel().riskScore(); - } - - public List sensors() { - List inner = this.innerModel().sensors(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public Site site() { - return this.innerModel().site(); - } - - public DeviceStatus deviceStatus() { - return this.innerModel().deviceStatus(); - } - - public DeviceInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.security.SecurityManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DevicesClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DevicesClientImpl.java deleted file mode 100644 index d34756166cace..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DevicesClientImpl.java +++ /dev/null @@ -1,185 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.security.fluent.DevicesClient; -import com.azure.resourcemanager.security.fluent.models.DeviceInner; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in DevicesClient. */ -public final class DevicesClientImpl implements DevicesClient { - private final ClientLogger logger = new ClientLogger(DevicesClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final DevicesService service; - - /** The service client containing this operation class. */ - private final SecurityCenterImpl client; - - /** - * Initializes an instance of DevicesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - DevicesClientImpl(SecurityCenterImpl client) { - this.service = RestProxy.create(DevicesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityCenterDevices to be used by the proxy service to perform REST - * calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityCenterDevice") - private interface DevicesService { - @Headers({"Content-Type: application/json"}) - @Get("/{resourceId}/providers/Microsoft.Security/devices/{deviceId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "resourceId", encoded = true) String resourceId, - @PathParam("deviceId") String deviceId, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Get device. - * - * @param resourceId The identifier of the resource. - * @param deviceId Identifier of the device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return device. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceId, String deviceId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceId == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null.")); - } - if (deviceId == null) { - return Mono.error(new IllegalArgumentException("Parameter deviceId is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.get(this.client.getEndpoint(), apiVersion, resourceId, deviceId, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get device. - * - * @param resourceId The identifier of the resource. - * @param deviceId Identifier of the device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return device. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceId, String deviceId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceId == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null.")); - } - if (deviceId == null) { - return Mono.error(new IllegalArgumentException("Parameter deviceId is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), apiVersion, resourceId, deviceId, accept, context); - } - - /** - * Get device. - * - * @param resourceId The identifier of the resource. - * @param deviceId Identifier of the device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return device. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceId, String deviceId) { - return getWithResponseAsync(resourceId, deviceId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Get device. - * - * @param resourceId The identifier of the resource. - * @param deviceId Identifier of the device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return device. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DeviceInner get(String resourceId, String deviceId) { - return getAsync(resourceId, deviceId).block(); - } - - /** - * Get device. - * - * @param resourceId The identifier of the resource. - * @param deviceId Identifier of the device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return device. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceId, String deviceId, Context context) { - return getWithResponseAsync(resourceId, deviceId, context).block(); - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DevicesForHubsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DevicesForHubsClientImpl.java deleted file mode 100644 index ddee689ac4ae6..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DevicesForHubsClientImpl.java +++ /dev/null @@ -1,354 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.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.core.util.logging.ClientLogger; -import com.azure.resourcemanager.security.fluent.DevicesForHubsClient; -import com.azure.resourcemanager.security.fluent.models.DeviceInner; -import com.azure.resourcemanager.security.models.DeviceList; -import com.azure.resourcemanager.security.models.ManagementState; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in DevicesForHubsClient. */ -public final class DevicesForHubsClientImpl implements DevicesForHubsClient { - private final ClientLogger logger = new ClientLogger(DevicesForHubsClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final DevicesForHubsService service; - - /** The service client containing this operation class. */ - private final SecurityCenterImpl client; - - /** - * Initializes an instance of DevicesForHubsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - DevicesForHubsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy.create(DevicesForHubsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityCenterDevicesForHubs to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityCenterDevice") - private interface DevicesForHubsService { - @Headers({"Content-Type: application/json"}) - @Get("/{resourceId}/providers/Microsoft.Security/devices") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "resourceId", encoded = true) String resourceId, - @QueryParam("$limit") Integer limit, - @QueryParam("$skipToken") String skipToken, - @QueryParam("deviceManagementType") ManagementState deviceManagementType, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Get list of the devices for the specified IoT Hub resource. - * - * @param resourceId The identifier of the resource. - * @param limit Limit the number of items returned in a single page. - * @param skipToken Skip token used for pagination. - * @param deviceManagementType Get devices only from specific type, Managed or Unmanaged. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of the devices for the specified IoT Hub resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceId, Integer limit, String skipToken, ManagementState deviceManagementType) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceId == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - apiVersion, - resourceId, - limit, - skipToken, - deviceManagementType, - 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 list of the devices for the specified IoT Hub resource. - * - * @param resourceId The identifier of the resource. - * @param limit Limit the number of items returned in a single page. - * @param skipToken Skip token used for pagination. - * @param deviceManagementType Get devices only from specific type, Managed or Unmanaged. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of the devices for the specified IoT Hub resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceId, Integer limit, String skipToken, ManagementState deviceManagementType, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceId == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - apiVersion, - resourceId, - limit, - skipToken, - deviceManagementType, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get list of the devices for the specified IoT Hub resource. - * - * @param resourceId The identifier of the resource. - * @param limit Limit the number of items returned in a single page. - * @param skipToken Skip token used for pagination. - * @param deviceManagementType Get devices only from specific type, Managed or Unmanaged. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of the devices for the specified IoT Hub resource. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceId, Integer limit, String skipToken, ManagementState deviceManagementType) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceId, limit, skipToken, deviceManagementType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Get list of the devices for the specified IoT Hub resource. - * - * @param resourceId The identifier of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of the devices for the specified IoT Hub resource. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceId) { - final Integer limit = null; - final String skipToken = null; - final ManagementState deviceManagementType = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceId, limit, skipToken, deviceManagementType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Get list of the devices for the specified IoT Hub resource. - * - * @param resourceId The identifier of the resource. - * @param limit Limit the number of items returned in a single page. - * @param skipToken Skip token used for pagination. - * @param deviceManagementType Get devices only from specific type, Managed or Unmanaged. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of the devices for the specified IoT Hub resource. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceId, Integer limit, String skipToken, ManagementState deviceManagementType, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceId, limit, skipToken, deviceManagementType, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Get list of the devices for the specified IoT Hub resource. - * - * @param resourceId The identifier of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of the devices for the specified IoT Hub resource. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceId) { - final Integer limit = null; - final String skipToken = null; - final ManagementState deviceManagementType = null; - return new PagedIterable<>(listAsync(resourceId, limit, skipToken, deviceManagementType)); - } - - /** - * Get list of the devices for the specified IoT Hub resource. - * - * @param resourceId The identifier of the resource. - * @param limit Limit the number of items returned in a single page. - * @param skipToken Skip token used for pagination. - * @param deviceManagementType Get devices only from specific type, Managed or Unmanaged. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of the devices for the specified IoT Hub resource. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceId, Integer limit, String skipToken, ManagementState deviceManagementType, Context context) { - return new PagedIterable<>(listAsync(resourceId, limit, skipToken, deviceManagementType, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Devices. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Devices. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DevicesForHubsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DevicesForHubsImpl.java deleted file mode 100644 index c767b26ae7912..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DevicesForHubsImpl.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.security.fluent.DevicesForHubsClient; -import com.azure.resourcemanager.security.fluent.models.DeviceInner; -import com.azure.resourcemanager.security.models.Device; -import com.azure.resourcemanager.security.models.DevicesForHubs; -import com.azure.resourcemanager.security.models.ManagementState; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class DevicesForHubsImpl implements DevicesForHubs { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DevicesForHubsImpl.class); - - private final DevicesForHubsClient innerClient; - - private final com.azure.resourcemanager.security.SecurityManager serviceManager; - - public DevicesForHubsImpl( - DevicesForHubsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceId) { - PagedIterable inner = this.serviceClient().list(resourceId); - return Utils.mapPage(inner, inner1 -> new DeviceImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceId, Integer limit, String skipToken, ManagementState deviceManagementType, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceId, limit, skipToken, deviceManagementType, context); - return Utils.mapPage(inner, inner1 -> new DeviceImpl(inner1, this.manager())); - } - - private DevicesForHubsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.security.SecurityManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DevicesForSubscriptionsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DevicesForSubscriptionsClientImpl.java deleted file mode 100644 index 11c37fd3a56d7..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DevicesForSubscriptionsClientImpl.java +++ /dev/null @@ -1,351 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.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.core.util.logging.ClientLogger; -import com.azure.resourcemanager.security.fluent.DevicesForSubscriptionsClient; -import com.azure.resourcemanager.security.fluent.models.DeviceInner; -import com.azure.resourcemanager.security.models.DeviceList; -import com.azure.resourcemanager.security.models.ManagementState; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in DevicesForSubscriptionsClient. */ -public final class DevicesForSubscriptionsClientImpl implements DevicesForSubscriptionsClient { - private final ClientLogger logger = new ClientLogger(DevicesForSubscriptionsClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final DevicesForSubscriptionsService service; - - /** The service client containing this operation class. */ - private final SecurityCenterImpl client; - - /** - * Initializes an instance of DevicesForSubscriptionsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - DevicesForSubscriptionsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy - .create(DevicesForSubscriptionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityCenterDevicesForSubscriptions to be used by the proxy service - * to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityCenterDevice") - private interface DevicesForSubscriptionsService { - @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/devices") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("$limit") Integer limit, - @QueryParam("$skipToken") String skipToken, - @QueryParam("deviceManagementType") ManagementState deviceManagementType, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Get list of the devices by their subscription. - * - * @param limit Limit the number of items returned in a single page. - * @param skipToken Skip token used for pagination. - * @param deviceManagementType Get devices only from specific type, Managed or Unmanaged. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of the devices by their subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - Integer limit, String skipToken, ManagementState deviceManagementType) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - limit, - skipToken, - deviceManagementType, - 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 list of the devices by their subscription. - * - * @param limit Limit the number of items returned in a single page. - * @param skipToken Skip token used for pagination. - * @param deviceManagementType Get devices only from specific type, Managed or Unmanaged. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of the devices by their subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - Integer limit, String skipToken, ManagementState deviceManagementType, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - limit, - skipToken, - deviceManagementType, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get list of the devices by their subscription. - * - * @param limit Limit the number of items returned in a single page. - * @param skipToken Skip token used for pagination. - * @param deviceManagementType Get devices only from specific type, Managed or Unmanaged. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of the devices by their subscription. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Integer limit, String skipToken, ManagementState deviceManagementType) { - return new PagedFlux<>( - () -> listSinglePageAsync(limit, skipToken, deviceManagementType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Get list of the devices by their subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of the devices by their subscription. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - final Integer limit = null; - final String skipToken = null; - final ManagementState deviceManagementType = null; - return new PagedFlux<>( - () -> listSinglePageAsync(limit, skipToken, deviceManagementType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Get list of the devices by their subscription. - * - * @param limit Limit the number of items returned in a single page. - * @param skipToken Skip token used for pagination. - * @param deviceManagementType Get devices only from specific type, Managed or Unmanaged. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of the devices by their subscription. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - Integer limit, String skipToken, ManagementState deviceManagementType, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(limit, skipToken, deviceManagementType, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Get list of the devices by their subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of the devices by their subscription. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - final Integer limit = null; - final String skipToken = null; - final ManagementState deviceManagementType = null; - return new PagedIterable<>(listAsync(limit, skipToken, deviceManagementType)); - } - - /** - * Get list of the devices by their subscription. - * - * @param limit Limit the number of items returned in a single page. - * @param skipToken Skip token used for pagination. - * @param deviceManagementType Get devices only from specific type, Managed or Unmanaged. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of the devices by their subscription. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - Integer limit, String skipToken, ManagementState deviceManagementType, Context context) { - return new PagedIterable<>(listAsync(limit, skipToken, deviceManagementType, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Devices. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Devices. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DevicesForSubscriptionsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DevicesForSubscriptionsImpl.java deleted file mode 100644 index 8bf12d31599f1..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DevicesForSubscriptionsImpl.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.security.fluent.DevicesForSubscriptionsClient; -import com.azure.resourcemanager.security.fluent.models.DeviceInner; -import com.azure.resourcemanager.security.models.Device; -import com.azure.resourcemanager.security.models.DevicesForSubscriptions; -import com.azure.resourcemanager.security.models.ManagementState; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class DevicesForSubscriptionsImpl implements DevicesForSubscriptions { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DevicesForSubscriptionsImpl.class); - - private final DevicesForSubscriptionsClient innerClient; - - private final com.azure.resourcemanager.security.SecurityManager serviceManager; - - public DevicesForSubscriptionsImpl( - DevicesForSubscriptionsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new DeviceImpl(inner1, this.manager())); - } - - public PagedIterable list( - Integer limit, String skipToken, ManagementState deviceManagementType, Context context) { - PagedIterable inner = this.serviceClient().list(limit, skipToken, deviceManagementType, context); - return Utils.mapPage(inner, inner1 -> new DeviceImpl(inner1, this.manager())); - } - - private DevicesForSubscriptionsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.security.SecurityManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DevicesImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DevicesImpl.java deleted file mode 100644 index f3391fbd664d3..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DevicesImpl.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.security.fluent.DevicesClient; -import com.azure.resourcemanager.security.fluent.models.DeviceInner; -import com.azure.resourcemanager.security.models.Device; -import com.azure.resourcemanager.security.models.Devices; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class DevicesImpl implements Devices { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DevicesImpl.class); - - private final DevicesClient innerClient; - - private final com.azure.resourcemanager.security.SecurityManager serviceManager; - - public DevicesImpl(DevicesClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Device get(String resourceId, String deviceId) { - DeviceInner inner = this.serviceClient().get(resourceId, deviceId); - if (inner != null) { - return new DeviceImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse(String resourceId, String deviceId, Context context) { - Response inner = this.serviceClient().getWithResponse(resourceId, deviceId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new DeviceImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private DevicesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.security.SecurityManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotAlertModelImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotAlertModelImpl.java deleted file mode 100644 index c236b0feb0a4e..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotAlertModelImpl.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.implementation; - -import com.azure.resourcemanager.security.fluent.models.IotAlertModelInner; -import com.azure.resourcemanager.security.models.IotAlertModel; -import java.util.Collections; -import java.util.List; - -public final class IotAlertModelImpl implements IotAlertModel { - private IotAlertModelInner innerObject; - - private final com.azure.resourcemanager.security.SecurityManager serviceManager; - - IotAlertModelImpl( - IotAlertModelInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String systemAlertId() { - return this.innerModel().systemAlertId(); - } - - public String compromisedEntity() { - return this.innerModel().compromisedEntity(); - } - - public String alertType() { - return this.innerModel().alertType(); - } - - public String startTimeUtc() { - return this.innerModel().startTimeUtc(); - } - - public String endTimeUtc() { - return this.innerModel().endTimeUtc(); - } - - public List entities() { - List inner = this.innerModel().entities(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public Object extendedProperties() { - return this.innerModel().extendedProperties(); - } - - public IotAlertModelInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.security.SecurityManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotAlertTypeImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotAlertTypeImpl.java deleted file mode 100644 index 2a3af4367be5e..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotAlertTypeImpl.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.security.implementation; - -import com.azure.resourcemanager.security.fluent.models.IotAlertTypeInner; -import com.azure.resourcemanager.security.models.AlertIntent; -import com.azure.resourcemanager.security.models.AlertSeverity; -import com.azure.resourcemanager.security.models.IotAlertType; -import java.util.Collections; -import java.util.List; - -public final class IotAlertTypeImpl implements IotAlertType { - private IotAlertTypeInner innerObject; - - private final com.azure.resourcemanager.security.SecurityManager serviceManager; - - IotAlertTypeImpl(IotAlertTypeInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String alertDisplayName() { - return this.innerModel().alertDisplayName(); - } - - public AlertSeverity severity() { - return this.innerModel().severity(); - } - - public String description() { - return this.innerModel().description(); - } - - public String providerName() { - return this.innerModel().providerName(); - } - - public String productName() { - return this.innerModel().productName(); - } - - public String productComponentName() { - return this.innerModel().productComponentName(); - } - - public String vendorName() { - return this.innerModel().vendorName(); - } - - public AlertIntent intent() { - return this.innerModel().intent(); - } - - public List remediationSteps() { - List inner = this.innerModel().remediationSteps(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public IotAlertTypeInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.security.SecurityManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotAlertTypeListImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotAlertTypeListImpl.java deleted file mode 100644 index 70c5b894a55df..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotAlertTypeListImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.implementation; - -import com.azure.resourcemanager.security.fluent.models.IotAlertTypeInner; -import com.azure.resourcemanager.security.fluent.models.IotAlertTypeListInner; -import com.azure.resourcemanager.security.models.IotAlertType; -import com.azure.resourcemanager.security.models.IotAlertTypeList; -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; - -public final class IotAlertTypeListImpl implements IotAlertTypeList { - private IotAlertTypeListInner innerObject; - - private final com.azure.resourcemanager.security.SecurityManager serviceManager; - - IotAlertTypeListImpl( - IotAlertTypeListInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new IotAlertTypeImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - - public IotAlertTypeListInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.security.SecurityManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotAlertTypesClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotAlertTypesClientImpl.java deleted file mode 100644 index ac01b45500fb8..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotAlertTypesClientImpl.java +++ /dev/null @@ -1,322 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.security.fluent.IotAlertTypesClient; -import com.azure.resourcemanager.security.fluent.models.IotAlertTypeInner; -import com.azure.resourcemanager.security.fluent.models.IotAlertTypeListInner; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in IotAlertTypesClient. */ -public final class IotAlertTypesClientImpl implements IotAlertTypesClient { - private final ClientLogger logger = new ClientLogger(IotAlertTypesClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final IotAlertTypesService service; - - /** The service client containing this operation class. */ - private final SecurityCenterImpl client; - - /** - * Initializes an instance of IotAlertTypesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - IotAlertTypesClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy.create(IotAlertTypesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityCenterIotAlertTypes to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityCenterIotAle") - private interface IotAlertTypesService { - @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/iotAlertTypes") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/iotAlertTypes/{iotAlertTypeName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("iotAlertTypeName") String iotAlertTypeName, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * List IoT alert types. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of alert types. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync() { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List IoT alert types. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of alert types. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context); - } - - /** - * List IoT alert types. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of alert types. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listAsync() { - return listWithResponseAsync() - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * List IoT alert types. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of alert types. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public IotAlertTypeListInner list() { - return listAsync().block(); - } - - /** - * List IoT alert types. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of alert types. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse(Context context) { - return listWithResponseAsync(context).block(); - } - - /** - * Get IoT alert type. - * - * @param iotAlertTypeName Name of the alert type. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT alert type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String iotAlertTypeName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (iotAlertTypeName == null) { - return Mono - .error(new IllegalArgumentException("Parameter iotAlertTypeName is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - iotAlertTypeName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get IoT alert type. - * - * @param iotAlertTypeName Name of the alert type. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT alert type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String iotAlertTypeName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (iotAlertTypeName == null) { - return Mono - .error(new IllegalArgumentException("Parameter iotAlertTypeName is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - iotAlertTypeName, - accept, - context); - } - - /** - * Get IoT alert type. - * - * @param iotAlertTypeName Name of the alert type. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT alert type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String iotAlertTypeName) { - return getWithResponseAsync(iotAlertTypeName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Get IoT alert type. - * - * @param iotAlertTypeName Name of the alert type. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT alert type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public IotAlertTypeInner get(String iotAlertTypeName) { - return getAsync(iotAlertTypeName).block(); - } - - /** - * Get IoT alert type. - * - * @param iotAlertTypeName Name of the alert type. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT alert type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String iotAlertTypeName, Context context) { - return getWithResponseAsync(iotAlertTypeName, context).block(); - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotAlertTypesImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotAlertTypesImpl.java deleted file mode 100644 index e60002db92f38..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotAlertTypesImpl.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.security.fluent.IotAlertTypesClient; -import com.azure.resourcemanager.security.fluent.models.IotAlertTypeInner; -import com.azure.resourcemanager.security.fluent.models.IotAlertTypeListInner; -import com.azure.resourcemanager.security.models.IotAlertType; -import com.azure.resourcemanager.security.models.IotAlertTypeList; -import com.azure.resourcemanager.security.models.IotAlertTypes; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class IotAlertTypesImpl implements IotAlertTypes { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IotAlertTypesImpl.class); - - private final IotAlertTypesClient innerClient; - - private final com.azure.resourcemanager.security.SecurityManager serviceManager; - - public IotAlertTypesImpl( - IotAlertTypesClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public IotAlertTypeList list() { - IotAlertTypeListInner inner = this.serviceClient().list(); - if (inner != null) { - return new IotAlertTypeListImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listWithResponse(Context context) { - Response inner = this.serviceClient().listWithResponse(context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new IotAlertTypeListImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public IotAlertType get(String iotAlertTypeName) { - IotAlertTypeInner inner = this.serviceClient().get(iotAlertTypeName); - if (inner != null) { - return new IotAlertTypeImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse(String iotAlertTypeName, Context context) { - Response inner = this.serviceClient().getWithResponse(iotAlertTypeName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new IotAlertTypeImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private IotAlertTypesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.security.SecurityManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotAlertsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotAlertsClientImpl.java deleted file mode 100644 index 1ee5d3f55bafd..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotAlertsClientImpl.java +++ /dev/null @@ -1,620 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.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.core.util.logging.ClientLogger; -import com.azure.resourcemanager.security.fluent.IotAlertsClient; -import com.azure.resourcemanager.security.fluent.models.IotAlertModelInner; -import com.azure.resourcemanager.security.models.IotAlertListModel; -import com.azure.resourcemanager.security.models.ManagementState; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in IotAlertsClient. */ -public final class IotAlertsClientImpl implements IotAlertsClient { - private final ClientLogger logger = new ClientLogger(IotAlertsClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final IotAlertsService service; - - /** The service client containing this operation class. */ - private final SecurityCenterImpl client; - - /** - * Initializes an instance of IotAlertsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - IotAlertsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy.create(IotAlertsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityCenterIotAlerts to be used by the proxy service to perform - * REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityCenterIotAle") - private interface IotAlertsService { - @Headers({"Content-Type: application/json"}) - @Get("/{scope}/providers/Microsoft.Security/iotAlerts") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "scope", encoded = true) String scope, - @QueryParam("startTimeUtc>") String minStartTimeUtc, - @QueryParam("startTimeUtc<") String maxStartTimeUtc, - @QueryParam("alertType") String alertType, - @QueryParam("deviceManagementType") ManagementState deviceManagementType, - @QueryParam("compromisedEntity") String compromisedEntity, - @QueryParam("$limit") Integer limit, - @QueryParam("$skipToken") String skipToken, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("/{scope}/providers/Microsoft.Security/iotAlerts/{iotAlertId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "scope", encoded = true) String scope, - @PathParam("iotAlertId") String iotAlertId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * List IoT alerts. - * - * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}). - * @param minStartTimeUtc Filter by minimum startTimeUtc (ISO 8601 format). - * @param maxStartTimeUtc Filter by maximum startTimeUtc (ISO 8601 format). - * @param alertType Filter by alert type. - * @param deviceManagementType Get devices only from specific type, Managed or Unmanaged. - * @param compromisedEntity Filter by compromised device. - * @param limit Limit the number of items returned in a single page. - * @param skipToken Skip token used for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT alerts. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String scope, - String minStartTimeUtc, - String maxStartTimeUtc, - String alertType, - ManagementState deviceManagementType, - String compromisedEntity, - Integer limit, - String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - apiVersion, - scope, - minStartTimeUtc, - maxStartTimeUtc, - alertType, - deviceManagementType, - compromisedEntity, - limit, - skipToken, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List IoT alerts. - * - * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}). - * @param minStartTimeUtc Filter by minimum startTimeUtc (ISO 8601 format). - * @param maxStartTimeUtc Filter by maximum startTimeUtc (ISO 8601 format). - * @param alertType Filter by alert type. - * @param deviceManagementType Get devices only from specific type, Managed or Unmanaged. - * @param compromisedEntity Filter by compromised device. - * @param limit Limit the number of items returned in a single page. - * @param skipToken Skip token used for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT alerts. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String scope, - String minStartTimeUtc, - String maxStartTimeUtc, - String alertType, - ManagementState deviceManagementType, - String compromisedEntity, - Integer limit, - String skipToken, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - apiVersion, - scope, - minStartTimeUtc, - maxStartTimeUtc, - alertType, - deviceManagementType, - compromisedEntity, - limit, - skipToken, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * List IoT alerts. - * - * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}). - * @param minStartTimeUtc Filter by minimum startTimeUtc (ISO 8601 format). - * @param maxStartTimeUtc Filter by maximum startTimeUtc (ISO 8601 format). - * @param alertType Filter by alert type. - * @param deviceManagementType Get devices only from specific type, Managed or Unmanaged. - * @param compromisedEntity Filter by compromised device. - * @param limit Limit the number of items returned in a single page. - * @param skipToken Skip token used for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT alerts. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String scope, - String minStartTimeUtc, - String maxStartTimeUtc, - String alertType, - ManagementState deviceManagementType, - String compromisedEntity, - Integer limit, - String skipToken) { - return new PagedFlux<>( - () -> - listSinglePageAsync( - scope, - minStartTimeUtc, - maxStartTimeUtc, - alertType, - deviceManagementType, - compromisedEntity, - limit, - skipToken), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List IoT alerts. - * - * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT alerts. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String scope) { - final String minStartTimeUtc = null; - final String maxStartTimeUtc = null; - final String alertType = null; - final ManagementState deviceManagementType = null; - final String compromisedEntity = null; - final Integer limit = null; - final String skipToken = null; - return new PagedFlux<>( - () -> - listSinglePageAsync( - scope, - minStartTimeUtc, - maxStartTimeUtc, - alertType, - deviceManagementType, - compromisedEntity, - limit, - skipToken), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List IoT alerts. - * - * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}). - * @param minStartTimeUtc Filter by minimum startTimeUtc (ISO 8601 format). - * @param maxStartTimeUtc Filter by maximum startTimeUtc (ISO 8601 format). - * @param alertType Filter by alert type. - * @param deviceManagementType Get devices only from specific type, Managed or Unmanaged. - * @param compromisedEntity Filter by compromised device. - * @param limit Limit the number of items returned in a single page. - * @param skipToken Skip token used for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT alerts. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String scope, - String minStartTimeUtc, - String maxStartTimeUtc, - String alertType, - ManagementState deviceManagementType, - String compromisedEntity, - Integer limit, - String skipToken, - Context context) { - return new PagedFlux<>( - () -> - listSinglePageAsync( - scope, - minStartTimeUtc, - maxStartTimeUtc, - alertType, - deviceManagementType, - compromisedEntity, - limit, - skipToken, - context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List IoT alerts. - * - * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT alerts. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String scope) { - final String minStartTimeUtc = null; - final String maxStartTimeUtc = null; - final String alertType = null; - final ManagementState deviceManagementType = null; - final String compromisedEntity = null; - final Integer limit = null; - final String skipToken = null; - return new PagedIterable<>( - listAsync( - scope, - minStartTimeUtc, - maxStartTimeUtc, - alertType, - deviceManagementType, - compromisedEntity, - limit, - skipToken)); - } - - /** - * List IoT alerts. - * - * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}). - * @param minStartTimeUtc Filter by minimum startTimeUtc (ISO 8601 format). - * @param maxStartTimeUtc Filter by maximum startTimeUtc (ISO 8601 format). - * @param alertType Filter by alert type. - * @param deviceManagementType Get devices only from specific type, Managed or Unmanaged. - * @param compromisedEntity Filter by compromised device. - * @param limit Limit the number of items returned in a single page. - * @param skipToken Skip token used for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT alerts. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String scope, - String minStartTimeUtc, - String maxStartTimeUtc, - String alertType, - ManagementState deviceManagementType, - String compromisedEntity, - Integer limit, - String skipToken, - Context context) { - return new PagedIterable<>( - listAsync( - scope, - minStartTimeUtc, - maxStartTimeUtc, - alertType, - deviceManagementType, - compromisedEntity, - limit, - skipToken, - context)); - } - - /** - * Get IoT alert. - * - * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}). - * @param iotAlertId Id of the alert. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT alert. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String scope, String iotAlertId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - if (iotAlertId == null) { - return Mono.error(new IllegalArgumentException("Parameter iotAlertId is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.get(this.client.getEndpoint(), apiVersion, scope, iotAlertId, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get IoT alert. - * - * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}). - * @param iotAlertId Id of the alert. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT alert. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String scope, String iotAlertId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - if (iotAlertId == null) { - return Mono.error(new IllegalArgumentException("Parameter iotAlertId is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), apiVersion, scope, iotAlertId, accept, context); - } - - /** - * Get IoT alert. - * - * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}). - * @param iotAlertId Id of the alert. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT alert. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String scope, String iotAlertId) { - return getWithResponseAsync(scope, iotAlertId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Get IoT alert. - * - * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}). - * @param iotAlertId Id of the alert. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT alert. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public IotAlertModelInner get(String scope, String iotAlertId) { - return getAsync(scope, iotAlertId).block(); - } - - /** - * Get IoT alert. - * - * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}). - * @param iotAlertId Id of the alert. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT alert. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String scope, String iotAlertId, Context context) { - return getWithResponseAsync(scope, iotAlertId, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT alerts. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT alerts. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotAlertsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotAlertsImpl.java deleted file mode 100644 index 95150c29779e2..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotAlertsImpl.java +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.security.fluent.IotAlertsClient; -import com.azure.resourcemanager.security.fluent.models.IotAlertModelInner; -import com.azure.resourcemanager.security.models.IotAlertModel; -import com.azure.resourcemanager.security.models.IotAlerts; -import com.azure.resourcemanager.security.models.ManagementState; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class IotAlertsImpl implements IotAlerts { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IotAlertsImpl.class); - - private final IotAlertsClient innerClient; - - private final com.azure.resourcemanager.security.SecurityManager serviceManager; - - public IotAlertsImpl( - IotAlertsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String scope) { - PagedIterable inner = this.serviceClient().list(scope); - return Utils.mapPage(inner, inner1 -> new IotAlertModelImpl(inner1, this.manager())); - } - - public PagedIterable list( - String scope, - String minStartTimeUtc, - String maxStartTimeUtc, - String alertType, - ManagementState deviceManagementType, - String compromisedEntity, - Integer limit, - String skipToken, - Context context) { - PagedIterable inner = - this - .serviceClient() - .list( - scope, - minStartTimeUtc, - maxStartTimeUtc, - alertType, - deviceManagementType, - compromisedEntity, - limit, - skipToken, - context); - return Utils.mapPage(inner, inner1 -> new IotAlertModelImpl(inner1, this.manager())); - } - - public IotAlertModel get(String scope, String iotAlertId) { - IotAlertModelInner inner = this.serviceClient().get(scope, iotAlertId); - if (inner != null) { - return new IotAlertModelImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse(String scope, String iotAlertId, Context context) { - Response inner = this.serviceClient().getWithResponse(scope, iotAlertId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new IotAlertModelImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private IotAlertsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.security.SecurityManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotDefenderSettingsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotDefenderSettingsClientImpl.java deleted file mode 100644 index 0adb99c46e36c..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotDefenderSettingsClientImpl.java +++ /dev/null @@ -1,819 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.http.rest.StreamResponse; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.security.fluent.IotDefenderSettingsClient; -import com.azure.resourcemanager.security.fluent.models.IotDefenderSettingsListInner; -import com.azure.resourcemanager.security.fluent.models.IotDefenderSettingsModelInner; -import com.azure.resourcemanager.security.fluent.models.PackageDownloadsInner; -import com.fasterxml.jackson.databind.util.ByteBufferBackedInputStream; -import java.io.InputStream; -import java.io.SequenceInputStream; -import java.nio.ByteBuffer; -import java.util.Enumeration; -import java.util.Iterator; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in IotDefenderSettingsClient. */ -public final class IotDefenderSettingsClientImpl implements IotDefenderSettingsClient { - private final ClientLogger logger = new ClientLogger(IotDefenderSettingsClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final IotDefenderSettingsService service; - - /** The service client containing this operation class. */ - private final SecurityCenterImpl client; - - /** - * Initializes an instance of IotDefenderSettingsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - IotDefenderSettingsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy.create(IotDefenderSettingsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityCenterIotDefenderSettings to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityCenterIotDef") - private interface IotDefenderSettingsService { - @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/iotDefenderSettings") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/iotDefenderSettings/default") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put("/subscriptions/{subscriptionId}/providers/Microsoft.Security/iotDefenderSettings/default") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") IotDefenderSettingsModelInner iotDefenderSettingsModel, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete("/subscriptions/{subscriptionId}/providers/Microsoft.Security/iotDefenderSettings/default") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/providers/Microsoft.Security/iotDefenderSettings/default/packageDownloads") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> packageDownloads( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/providers/Microsoft.Security/iotDefenderSettings/default" - + "/downloadManagerActivation") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono downloadManagerActivation( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * List IoT Defender Settings. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT Defender settings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync() { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List IoT Defender Settings. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT Defender settings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context); - } - - /** - * List IoT Defender Settings. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT Defender settings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listAsync() { - return listWithResponseAsync() - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * List IoT Defender Settings. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT Defender settings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public IotDefenderSettingsListInner list() { - return listAsync().block(); - } - - /** - * List IoT Defender Settings. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT Defender settings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse(Context context) { - return listWithResponseAsync(context).block(); - } - - /** - * Get IoT Defender Settings. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT Defender Settings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync() { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get IoT Defender Settings. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT Defender Settings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context); - } - - /** - * Get IoT Defender Settings. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT Defender Settings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync() { - return getWithResponseAsync() - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Get IoT Defender Settings. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT Defender Settings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public IotDefenderSettingsModelInner get() { - return getAsync().block(); - } - - /** - * Get IoT Defender Settings. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT Defender Settings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(Context context) { - return getWithResponseAsync(context).block(); - } - - /** - * Create or update IoT Defender settings. - * - * @param iotDefenderSettingsModel The IoT defender settings model. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT Defender settings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - IotDefenderSettingsModelInner iotDefenderSettingsModel) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (iotDefenderSettingsModel == null) { - return Mono - .error( - new IllegalArgumentException("Parameter iotDefenderSettingsModel is required and cannot be null.")); - } else { - iotDefenderSettingsModel.validate(); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - iotDefenderSettingsModel, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update IoT Defender settings. - * - * @param iotDefenderSettingsModel The IoT defender settings model. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT Defender settings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - IotDefenderSettingsModelInner iotDefenderSettingsModel, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (iotDefenderSettingsModel == null) { - return Mono - .error( - new IllegalArgumentException("Parameter iotDefenderSettingsModel is required and cannot be null.")); - } else { - iotDefenderSettingsModel.validate(); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - iotDefenderSettingsModel, - accept, - context); - } - - /** - * Create or update IoT Defender settings. - * - * @param iotDefenderSettingsModel The IoT defender settings model. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT Defender settings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - IotDefenderSettingsModelInner iotDefenderSettingsModel) { - return createOrUpdateWithResponseAsync(iotDefenderSettingsModel) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Create or update IoT Defender settings. - * - * @param iotDefenderSettingsModel The IoT defender settings model. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT Defender settings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public IotDefenderSettingsModelInner createOrUpdate(IotDefenderSettingsModelInner iotDefenderSettingsModel) { - return createOrUpdateAsync(iotDefenderSettingsModel).block(); - } - - /** - * Create or update IoT Defender settings. - * - * @param iotDefenderSettingsModel The IoT defender settings model. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT Defender settings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - IotDefenderSettingsModelInner iotDefenderSettingsModel, Context context) { - return createOrUpdateWithResponseAsync(iotDefenderSettingsModel, context).block(); - } - - /** - * Delete IoT Defender settings. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync() { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete IoT Defender settings. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context); - } - - /** - * Delete IoT Defender settings. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync() { - return deleteWithResponseAsync().flatMap((Response res) -> Mono.empty()); - } - - /** - * Delete IoT Defender settings. - * - * @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() { - deleteAsync().block(); - } - - /** - * Delete IoT Defender settings. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(Context context) { - return deleteWithResponseAsync(context).block(); - } - - /** - * Information about downloadable packages. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about package downloads. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> packageDownloadsWithResponseAsync() { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .packageDownloads( - this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Information about downloadable packages. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about package downloads. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> packageDownloadsWithResponseAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .packageDownloads(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context); - } - - /** - * Information about downloadable packages. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about package downloads. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono packageDownloadsAsync() { - return packageDownloadsWithResponseAsync() - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Information about downloadable packages. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about package downloads. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PackageDownloadsInner packageDownloads() { - return packageDownloadsAsync().block(); - } - - /** - * Information about downloadable packages. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about package downloads. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response packageDownloadsWithResponse(Context context) { - return packageDownloadsWithResponseAsync(context).block(); - } - - /** - * Download manager activation data defined for this subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono downloadManagerActivationWithResponseAsync() { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/zip"; - return FluxUtil - .withContext( - context -> - service - .downloadManagerActivation( - this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Download manager activation data defined for this subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono downloadManagerActivationWithResponseAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/zip"; - context = this.client.mergeContext(context); - return service - .downloadManagerActivation( - this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context); - } - - /** - * Download manager activation data defined for this subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Flux downloadManagerActivationAsync() { - return downloadManagerActivationWithResponseAsync().flatMapMany(StreamResponse::getValue); - } - - /** - * Download manager activation data defined for this subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public InputStream downloadManagerActivation() { - Iterator iterator = - downloadManagerActivationAsync().map(ByteBufferBackedInputStream::new).toStream().iterator(); - Enumeration enumeration = - new Enumeration() { - @Override - public boolean hasMoreElements() { - return iterator.hasNext(); - } - - @Override - public InputStream nextElement() { - return iterator.next(); - } - }; - return new SequenceInputStream(enumeration); - } - - /** - * Download manager activation data defined for this subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public StreamResponse downloadManagerActivationWithResponse(Context context) { - return downloadManagerActivationWithResponseAsync(context).block(); - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotDefenderSettingsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotDefenderSettingsImpl.java deleted file mode 100644 index 506af402e27fb..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotDefenderSettingsImpl.java +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.http.rest.StreamResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.security.fluent.IotDefenderSettingsClient; -import com.azure.resourcemanager.security.fluent.models.IotDefenderSettingsListInner; -import com.azure.resourcemanager.security.fluent.models.IotDefenderSettingsModelInner; -import com.azure.resourcemanager.security.fluent.models.PackageDownloadsInner; -import com.azure.resourcemanager.security.models.IotDefenderSettings; -import com.azure.resourcemanager.security.models.IotDefenderSettingsList; -import com.azure.resourcemanager.security.models.IotDefenderSettingsModel; -import com.azure.resourcemanager.security.models.PackageDownloads; -import com.fasterxml.jackson.annotation.JsonIgnore; -import java.io.InputStream; - -public final class IotDefenderSettingsImpl implements IotDefenderSettings { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IotDefenderSettingsImpl.class); - - private final IotDefenderSettingsClient innerClient; - - private final com.azure.resourcemanager.security.SecurityManager serviceManager; - - public IotDefenderSettingsImpl( - IotDefenderSettingsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public IotDefenderSettingsList list() { - IotDefenderSettingsListInner inner = this.serviceClient().list(); - if (inner != null) { - return new IotDefenderSettingsListImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listWithResponse(Context context) { - Response inner = this.serviceClient().listWithResponse(context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new IotDefenderSettingsListImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public IotDefenderSettingsModel get() { - IotDefenderSettingsModelInner inner = this.serviceClient().get(); - if (inner != null) { - return new IotDefenderSettingsModelImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse(Context context) { - Response inner = this.serviceClient().getWithResponse(context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new IotDefenderSettingsModelImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public IotDefenderSettingsModel createOrUpdate(IotDefenderSettingsModelInner iotDefenderSettingsModel) { - IotDefenderSettingsModelInner inner = this.serviceClient().createOrUpdate(iotDefenderSettingsModel); - if (inner != null) { - return new IotDefenderSettingsModelImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response createOrUpdateWithResponse( - IotDefenderSettingsModelInner iotDefenderSettingsModel, Context context) { - Response inner = - this.serviceClient().createOrUpdateWithResponse(iotDefenderSettingsModel, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new IotDefenderSettingsModelImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete() { - this.serviceClient().delete(); - } - - public Response deleteWithResponse(Context context) { - return this.serviceClient().deleteWithResponse(context); - } - - public PackageDownloads packageDownloads() { - PackageDownloadsInner inner = this.serviceClient().packageDownloads(); - if (inner != null) { - return new PackageDownloadsImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response packageDownloadsWithResponse(Context context) { - Response inner = this.serviceClient().packageDownloadsWithResponse(context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new PackageDownloadsImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public InputStream downloadManagerActivation() { - return this.serviceClient().downloadManagerActivation(); - } - - public StreamResponse downloadManagerActivationWithResponse(Context context) { - return this.serviceClient().downloadManagerActivationWithResponse(context); - } - - private IotDefenderSettingsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.security.SecurityManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotDefenderSettingsListImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotDefenderSettingsListImpl.java deleted file mode 100644 index 07b65d4755b7e..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotDefenderSettingsListImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.implementation; - -import com.azure.resourcemanager.security.fluent.models.IotDefenderSettingsListInner; -import com.azure.resourcemanager.security.fluent.models.IotDefenderSettingsModelInner; -import com.azure.resourcemanager.security.models.IotDefenderSettingsList; -import com.azure.resourcemanager.security.models.IotDefenderSettingsModel; -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; - -public final class IotDefenderSettingsListImpl implements IotDefenderSettingsList { - private IotDefenderSettingsListInner innerObject; - - private final com.azure.resourcemanager.security.SecurityManager serviceManager; - - IotDefenderSettingsListImpl( - IotDefenderSettingsListInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new IotDefenderSettingsModelImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - - public IotDefenderSettingsListInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.security.SecurityManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotDefenderSettingsModelImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotDefenderSettingsModelImpl.java deleted file mode 100644 index 62417551af920..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotDefenderSettingsModelImpl.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.implementation; - -import com.azure.resourcemanager.security.fluent.models.IotDefenderSettingsModelInner; -import com.azure.resourcemanager.security.models.IotDefenderSettingsModel; -import com.azure.resourcemanager.security.models.OnboardingKind; -import java.time.OffsetDateTime; -import java.util.Collections; -import java.util.List; - -public final class IotDefenderSettingsModelImpl implements IotDefenderSettingsModel { - private IotDefenderSettingsModelInner innerObject; - - private final com.azure.resourcemanager.security.SecurityManager serviceManager; - - IotDefenderSettingsModelImpl( - IotDefenderSettingsModelInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public Integer deviceQuota() { - return this.innerModel().deviceQuota(); - } - - public List sentinelWorkspaceResourceIds() { - List inner = this.innerModel().sentinelWorkspaceResourceIds(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public OnboardingKind onboardingKind() { - return this.innerModel().onboardingKind(); - } - - public OffsetDateTime evaluationEndTime() { - return this.innerModel().evaluationEndTime(); - } - - public IotDefenderSettingsModelInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.security.SecurityManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotRecommendationModelImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotRecommendationModelImpl.java deleted file mode 100644 index 74ff6238816d3..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotRecommendationModelImpl.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.implementation; - -import com.azure.resourcemanager.security.fluent.models.IotRecommendationModelInner; -import com.azure.resourcemanager.security.models.IotRecommendationModel; - -public final class IotRecommendationModelImpl implements IotRecommendationModel { - private IotRecommendationModelInner innerObject; - - private final com.azure.resourcemanager.security.SecurityManager serviceManager; - - IotRecommendationModelImpl( - IotRecommendationModelInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String deviceId() { - return this.innerModel().deviceId(); - } - - public String recommendationType() { - return this.innerModel().recommendationType(); - } - - public String discoveredTimeUtc() { - return this.innerModel().discoveredTimeUtc(); - } - - public Object recommendationAdditionalData() { - return this.innerModel().recommendationAdditionalData(); - } - - public IotRecommendationModelInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.security.SecurityManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotRecommendationTypeImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotRecommendationTypeImpl.java deleted file mode 100644 index 1620c9ef55374..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotRecommendationTypeImpl.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.security.implementation; - -import com.azure.resourcemanager.security.fluent.models.IotRecommendationTypeInner; -import com.azure.resourcemanager.security.models.IotRecommendationType; -import com.azure.resourcemanager.security.models.RecommendationSeverity; -import java.util.Collections; -import java.util.List; - -public final class IotRecommendationTypeImpl implements IotRecommendationType { - private IotRecommendationTypeInner innerObject; - - private final com.azure.resourcemanager.security.SecurityManager serviceManager; - - IotRecommendationTypeImpl( - IotRecommendationTypeInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String recommendationDisplayName() { - return this.innerModel().recommendationDisplayName(); - } - - public RecommendationSeverity severity() { - return this.innerModel().severity(); - } - - public String description() { - return this.innerModel().description(); - } - - public String productName() { - return this.innerModel().productName(); - } - - public String productComponentName() { - return this.innerModel().productComponentName(); - } - - public String vendorName() { - return this.innerModel().vendorName(); - } - - public String control() { - return this.innerModel().control(); - } - - public List remediationSteps() { - List inner = this.innerModel().remediationSteps(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public String dataSource() { - return this.innerModel().dataSource(); - } - - public IotRecommendationTypeInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.security.SecurityManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotRecommendationTypeListImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotRecommendationTypeListImpl.java deleted file mode 100644 index b5df59664d331..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotRecommendationTypeListImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.implementation; - -import com.azure.resourcemanager.security.fluent.models.IotRecommendationTypeInner; -import com.azure.resourcemanager.security.fluent.models.IotRecommendationTypeListInner; -import com.azure.resourcemanager.security.models.IotRecommendationType; -import com.azure.resourcemanager.security.models.IotRecommendationTypeList; -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; - -public final class IotRecommendationTypeListImpl implements IotRecommendationTypeList { - private IotRecommendationTypeListInner innerObject; - - private final com.azure.resourcemanager.security.SecurityManager serviceManager; - - IotRecommendationTypeListImpl( - IotRecommendationTypeListInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new IotRecommendationTypeImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - - public IotRecommendationTypeListInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.security.SecurityManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotRecommendationTypesClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotRecommendationTypesClientImpl.java deleted file mode 100644 index 1072304d9bca3..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotRecommendationTypesClientImpl.java +++ /dev/null @@ -1,330 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.security.fluent.IotRecommendationTypesClient; -import com.azure.resourcemanager.security.fluent.models.IotRecommendationTypeInner; -import com.azure.resourcemanager.security.fluent.models.IotRecommendationTypeListInner; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in IotRecommendationTypesClient. */ -public final class IotRecommendationTypesClientImpl implements IotRecommendationTypesClient { - private final ClientLogger logger = new ClientLogger(IotRecommendationTypesClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final IotRecommendationTypesService service; - - /** The service client containing this operation class. */ - private final SecurityCenterImpl client; - - /** - * Initializes an instance of IotRecommendationTypesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - IotRecommendationTypesClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy - .create(IotRecommendationTypesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityCenterIotRecommendationTypes to be used by the proxy service - * to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityCenterIotRec") - private interface IotRecommendationTypesService { - @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/iotRecommendationTypes") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/providers/Microsoft.Security/iotRecommendationTypes" - + "/{iotRecommendationTypeName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("iotRecommendationTypeName") String iotRecommendationTypeName, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * List IoT recommendation types. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of recommendation types. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync() { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List IoT recommendation types. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of recommendation types. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context); - } - - /** - * List IoT recommendation types. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of recommendation types. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listAsync() { - return listWithResponseAsync() - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * List IoT recommendation types. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of recommendation types. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public IotRecommendationTypeListInner list() { - return listAsync().block(); - } - - /** - * List IoT recommendation types. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of recommendation types. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse(Context context) { - return listWithResponseAsync(context).block(); - } - - /** - * Get IoT recommendation type. - * - * @param iotRecommendationTypeName Name of the recommendation type. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT recommendation type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String iotRecommendationTypeName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (iotRecommendationTypeName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter iotRecommendationTypeName is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - iotRecommendationTypeName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get IoT recommendation type. - * - * @param iotRecommendationTypeName Name of the recommendation type. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT recommendation type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String iotRecommendationTypeName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (iotRecommendationTypeName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter iotRecommendationTypeName is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - iotRecommendationTypeName, - accept, - context); - } - - /** - * Get IoT recommendation type. - * - * @param iotRecommendationTypeName Name of the recommendation type. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT recommendation type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String iotRecommendationTypeName) { - return getWithResponseAsync(iotRecommendationTypeName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Get IoT recommendation type. - * - * @param iotRecommendationTypeName Name of the recommendation type. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT recommendation type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public IotRecommendationTypeInner get(String iotRecommendationTypeName) { - return getAsync(iotRecommendationTypeName).block(); - } - - /** - * Get IoT recommendation type. - * - * @param iotRecommendationTypeName Name of the recommendation type. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT recommendation type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String iotRecommendationTypeName, Context context) { - return getWithResponseAsync(iotRecommendationTypeName, context).block(); - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotRecommendationTypesImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotRecommendationTypesImpl.java deleted file mode 100644 index 6954641f9605c..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotRecommendationTypesImpl.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.security.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.security.fluent.IotRecommendationTypesClient; -import com.azure.resourcemanager.security.fluent.models.IotRecommendationTypeInner; -import com.azure.resourcemanager.security.fluent.models.IotRecommendationTypeListInner; -import com.azure.resourcemanager.security.models.IotRecommendationType; -import com.azure.resourcemanager.security.models.IotRecommendationTypeList; -import com.azure.resourcemanager.security.models.IotRecommendationTypes; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class IotRecommendationTypesImpl implements IotRecommendationTypes { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IotRecommendationTypesImpl.class); - - private final IotRecommendationTypesClient innerClient; - - private final com.azure.resourcemanager.security.SecurityManager serviceManager; - - public IotRecommendationTypesImpl( - IotRecommendationTypesClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public IotRecommendationTypeList list() { - IotRecommendationTypeListInner inner = this.serviceClient().list(); - if (inner != null) { - return new IotRecommendationTypeListImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listWithResponse(Context context) { - Response inner = this.serviceClient().listWithResponse(context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new IotRecommendationTypeListImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public IotRecommendationType get(String iotRecommendationTypeName) { - IotRecommendationTypeInner inner = this.serviceClient().get(iotRecommendationTypeName); - if (inner != null) { - return new IotRecommendationTypeImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse(String iotRecommendationTypeName, Context context) { - Response inner = - this.serviceClient().getWithResponse(iotRecommendationTypeName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new IotRecommendationTypeImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private IotRecommendationTypesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.security.SecurityManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotRecommendationsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotRecommendationsClientImpl.java deleted file mode 100644 index a18eeacf9bf85..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotRecommendationsClientImpl.java +++ /dev/null @@ -1,509 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.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.core.util.logging.ClientLogger; -import com.azure.resourcemanager.security.fluent.IotRecommendationsClient; -import com.azure.resourcemanager.security.fluent.models.IotRecommendationModelInner; -import com.azure.resourcemanager.security.models.IotRecommendationListModel; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in IotRecommendationsClient. */ -public final class IotRecommendationsClientImpl implements IotRecommendationsClient { - private final ClientLogger logger = new ClientLogger(IotRecommendationsClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final IotRecommendationsService service; - - /** The service client containing this operation class. */ - private final SecurityCenterImpl client; - - /** - * Initializes an instance of IotRecommendationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - IotRecommendationsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy.create(IotRecommendationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityCenterIotRecommendations to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityCenterIotRec") - private interface IotRecommendationsService { - @Headers({"Content-Type: application/json"}) - @Get("/{scope}/providers/Microsoft.Security/iotRecommendations") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "scope", encoded = true) String scope, - @QueryParam("recommendationType") String recommendationType, - @QueryParam("deviceId") String deviceId, - @QueryParam("$limit") Integer limit, - @QueryParam("$skipToken") String skipToken, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("/{scope}/providers/Microsoft.Security/iotRecommendations/{iotRecommendationId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "scope", encoded = true) String scope, - @PathParam("iotRecommendationId") String iotRecommendationId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * List IoT recommendations. - * - * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}). - * @param recommendationType Filter by recommendation type. - * @param deviceId Filter by device id. - * @param limit Limit the number of items returned in a single page. - * @param skipToken Skip token used for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT recommendations. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String scope, String recommendationType, String deviceId, Integer limit, String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - apiVersion, - scope, - recommendationType, - deviceId, - limit, - skipToken, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List IoT recommendations. - * - * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}). - * @param recommendationType Filter by recommendation type. - * @param deviceId Filter by device id. - * @param limit Limit the number of items returned in a single page. - * @param skipToken Skip token used for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT recommendations. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String scope, String recommendationType, String deviceId, Integer limit, String skipToken, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - apiVersion, - scope, - recommendationType, - deviceId, - limit, - skipToken, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * List IoT recommendations. - * - * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}). - * @param recommendationType Filter by recommendation type. - * @param deviceId Filter by device id. - * @param limit Limit the number of items returned in a single page. - * @param skipToken Skip token used for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT recommendations. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String scope, String recommendationType, String deviceId, Integer limit, String skipToken) { - return new PagedFlux<>( - () -> listSinglePageAsync(scope, recommendationType, deviceId, limit, skipToken), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List IoT recommendations. - * - * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT recommendations. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String scope) { - final String recommendationType = null; - final String deviceId = null; - final Integer limit = null; - final String skipToken = null; - return new PagedFlux<>( - () -> listSinglePageAsync(scope, recommendationType, deviceId, limit, skipToken), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List IoT recommendations. - * - * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}). - * @param recommendationType Filter by recommendation type. - * @param deviceId Filter by device id. - * @param limit Limit the number of items returned in a single page. - * @param skipToken Skip token used for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT recommendations. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String scope, String recommendationType, String deviceId, Integer limit, String skipToken, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(scope, recommendationType, deviceId, limit, skipToken, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List IoT recommendations. - * - * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT recommendations. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String scope) { - final String recommendationType = null; - final String deviceId = null; - final Integer limit = null; - final String skipToken = null; - return new PagedIterable<>(listAsync(scope, recommendationType, deviceId, limit, skipToken)); - } - - /** - * List IoT recommendations. - * - * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}). - * @param recommendationType Filter by recommendation type. - * @param deviceId Filter by device id. - * @param limit Limit the number of items returned in a single page. - * @param skipToken Skip token used for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT recommendations. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String scope, String recommendationType, String deviceId, Integer limit, String skipToken, Context context) { - return new PagedIterable<>(listAsync(scope, recommendationType, deviceId, limit, skipToken, context)); - } - - /** - * Get IoT recommendation. - * - * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}). - * @param iotRecommendationId Id of the recommendation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT recommendation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String scope, String iotRecommendationId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - if (iotRecommendationId == null) { - return Mono - .error(new IllegalArgumentException("Parameter iotRecommendationId is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service.get(this.client.getEndpoint(), apiVersion, scope, iotRecommendationId, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get IoT recommendation. - * - * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}). - * @param iotRecommendationId Id of the recommendation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT recommendation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String scope, String iotRecommendationId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - if (iotRecommendationId == null) { - return Mono - .error(new IllegalArgumentException("Parameter iotRecommendationId is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), apiVersion, scope, iotRecommendationId, accept, context); - } - - /** - * Get IoT recommendation. - * - * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}). - * @param iotRecommendationId Id of the recommendation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT recommendation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String scope, String iotRecommendationId) { - return getWithResponseAsync(scope, iotRecommendationId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Get IoT recommendation. - * - * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}). - * @param iotRecommendationId Id of the recommendation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT recommendation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public IotRecommendationModelInner get(String scope, String iotRecommendationId) { - return getAsync(scope, iotRecommendationId).block(); - } - - /** - * Get IoT recommendation. - * - * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}). - * @param iotRecommendationId Id of the recommendation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT recommendation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String scope, String iotRecommendationId, Context context) { - return getWithResponseAsync(scope, iotRecommendationId, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT recommendations. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT recommendations. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotRecommendationsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotRecommendationsImpl.java deleted file mode 100644 index 838a95d636896..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotRecommendationsImpl.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.security.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.security.fluent.IotRecommendationsClient; -import com.azure.resourcemanager.security.fluent.models.IotRecommendationModelInner; -import com.azure.resourcemanager.security.models.IotRecommendationModel; -import com.azure.resourcemanager.security.models.IotRecommendations; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class IotRecommendationsImpl implements IotRecommendations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IotRecommendationsImpl.class); - - private final IotRecommendationsClient innerClient; - - private final com.azure.resourcemanager.security.SecurityManager serviceManager; - - public IotRecommendationsImpl( - IotRecommendationsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String scope) { - PagedIterable inner = this.serviceClient().list(scope); - return Utils.mapPage(inner, inner1 -> new IotRecommendationModelImpl(inner1, this.manager())); - } - - public PagedIterable list( - String scope, String recommendationType, String deviceId, Integer limit, String skipToken, Context context) { - PagedIterable inner = - this.serviceClient().list(scope, recommendationType, deviceId, limit, skipToken, context); - return Utils.mapPage(inner, inner1 -> new IotRecommendationModelImpl(inner1, this.manager())); - } - - public IotRecommendationModel get(String scope, String iotRecommendationId) { - IotRecommendationModelInner inner = this.serviceClient().get(scope, iotRecommendationId); - if (inner != null) { - return new IotRecommendationModelImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse(String scope, String iotRecommendationId, Context context) { - Response inner = - this.serviceClient().getWithResponse(scope, iotRecommendationId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new IotRecommendationModelImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private IotRecommendationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.security.SecurityManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSensorsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSensorsClientImpl.java deleted file mode 100644 index edde9f94c091a..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSensorsClientImpl.java +++ /dev/null @@ -1,1026 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.http.rest.StreamResponse; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.security.fluent.IotSensorsClient; -import com.azure.resourcemanager.security.fluent.models.IotSensorsListInner; -import com.azure.resourcemanager.security.fluent.models.IotSensorsModelInner; -import com.azure.resourcemanager.security.models.ResetPasswordInput; -import com.fasterxml.jackson.databind.util.ByteBufferBackedInputStream; -import java.io.InputStream; -import java.io.SequenceInputStream; -import java.nio.ByteBuffer; -import java.util.Enumeration; -import java.util.Iterator; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in IotSensorsClient. */ -public final class IotSensorsClientImpl implements IotSensorsClient { - private final ClientLogger logger = new ClientLogger(IotSensorsClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final IotSensorsService service; - - /** The service client containing this operation class. */ - private final SecurityCenterImpl client; - - /** - * Initializes an instance of IotSensorsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - IotSensorsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy.create(IotSensorsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityCenterIotSensors to be used by the proxy service to perform - * REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityCenterIotSen") - private interface IotSensorsService { - @Headers({"Content-Type: application/json"}) - @Get("/{scope}/providers/Microsoft.Security/iotSensors") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "scope", encoded = true) String scope, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("/{scope}/providers/Microsoft.Security/iotSensors/{iotSensorName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "scope", encoded = true) String scope, - @PathParam("iotSensorName") String iotSensorName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put("/{scope}/providers/Microsoft.Security/iotSensors/{iotSensorName}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "scope", encoded = true) String scope, - @PathParam("iotSensorName") String iotSensorName, - @BodyParam("application/json") IotSensorsModelInner iotSensorsModel, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete("/{scope}/providers/Microsoft.Security/iotSensors/{iotSensorName}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "scope", encoded = true) String scope, - @PathParam("iotSensorName") String iotSensorName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post("/{scope}/providers/Microsoft.Security/iotSensors/{iotSensorName}/downloadActivation") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono downloadActivation( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "scope", encoded = true) String scope, - @PathParam("iotSensorName") String iotSensorName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post("/{scope}/providers/Microsoft.Security/iotSensors/{iotSensorName}/downloadResetPassword") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono downloadResetPassword( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "scope", encoded = true) String scope, - @PathParam("iotSensorName") String iotSensorName, - @BodyParam("application/json") ResetPasswordInput body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post("/{scope}/providers/Microsoft.Security/iotSensors/{iotSensorName}/triggerTiPackageUpdate") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> triggerTiPackageUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "scope", encoded = true) String scope, - @PathParam("iotSensorName") String iotSensorName, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * List IoT sensors. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT sensors. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync(String scope) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, scope, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List IoT sensors. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT sensors. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync(String scope, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), apiVersion, scope, accept, context); - } - - /** - * List IoT sensors. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT sensors. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listAsync(String scope) { - return listWithResponseAsync(scope) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * List IoT sensors. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT sensors. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public IotSensorsListInner list(String scope) { - return listAsync(scope).block(); - } - - /** - * List IoT sensors. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT sensors. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse(String scope, Context context) { - return listWithResponseAsync(scope, context).block(); - } - - /** - * Get IoT sensor. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT sensor. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String scope, String iotSensorName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - if (iotSensorName == null) { - return Mono.error(new IllegalArgumentException("Parameter iotSensorName is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.get(this.client.getEndpoint(), apiVersion, scope, iotSensorName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get IoT sensor. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT sensor. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String scope, String iotSensorName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - if (iotSensorName == null) { - return Mono.error(new IllegalArgumentException("Parameter iotSensorName is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), apiVersion, scope, iotSensorName, accept, context); - } - - /** - * Get IoT sensor. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT sensor. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String scope, String iotSensorName) { - return getWithResponseAsync(scope, iotSensorName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Get IoT sensor. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT sensor. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public IotSensorsModelInner get(String scope, String iotSensorName) { - return getAsync(scope, iotSensorName).block(); - } - - /** - * Get IoT sensor. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT sensor. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String scope, String iotSensorName, Context context) { - return getWithResponseAsync(scope, iotSensorName, context).block(); - } - - /** - * Create or update IoT sensor. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @param iotSensorsModel The IoT sensor model. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT sensor model. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String scope, String iotSensorName, IotSensorsModelInner iotSensorsModel) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - if (iotSensorName == null) { - return Mono.error(new IllegalArgumentException("Parameter iotSensorName is required and cannot be null.")); - } - if (iotSensorsModel == null) { - return Mono - .error(new IllegalArgumentException("Parameter iotSensorsModel is required and cannot be null.")); - } else { - iotSensorsModel.validate(); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - apiVersion, - scope, - iotSensorName, - iotSensorsModel, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update IoT sensor. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @param iotSensorsModel The IoT sensor model. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT sensor model. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String scope, String iotSensorName, IotSensorsModelInner iotSensorsModel, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - if (iotSensorName == null) { - return Mono.error(new IllegalArgumentException("Parameter iotSensorName is required and cannot be null.")); - } - if (iotSensorsModel == null) { - return Mono - .error(new IllegalArgumentException("Parameter iotSensorsModel is required and cannot be null.")); - } else { - iotSensorsModel.validate(); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), apiVersion, scope, iotSensorName, iotSensorsModel, accept, context); - } - - /** - * Create or update IoT sensor. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @param iotSensorsModel The IoT sensor model. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT sensor model. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String scope, String iotSensorName, IotSensorsModelInner iotSensorsModel) { - return createOrUpdateWithResponseAsync(scope, iotSensorName, iotSensorsModel) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Create or update IoT sensor. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @param iotSensorsModel The IoT sensor model. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT sensor model. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public IotSensorsModelInner createOrUpdate( - String scope, String iotSensorName, IotSensorsModelInner iotSensorsModel) { - return createOrUpdateAsync(scope, iotSensorName, iotSensorsModel).block(); - } - - /** - * Create or update IoT sensor. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @param iotSensorsModel The IoT sensor model. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT sensor model. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String scope, String iotSensorName, IotSensorsModelInner iotSensorsModel, Context context) { - return createOrUpdateWithResponseAsync(scope, iotSensorName, iotSensorsModel, context).block(); - } - - /** - * Delete IoT sensor. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String scope, String iotSensorName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - if (iotSensorName == null) { - return Mono.error(new IllegalArgumentException("Parameter iotSensorName is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), apiVersion, scope, iotSensorName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete IoT sensor. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String scope, String iotSensorName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - if (iotSensorName == null) { - return Mono.error(new IllegalArgumentException("Parameter iotSensorName is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), apiVersion, scope, iotSensorName, accept, context); - } - - /** - * Delete IoT sensor. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String scope, String iotSensorName) { - return deleteWithResponseAsync(scope, iotSensorName).flatMap((Response res) -> Mono.empty()); - } - - /** - * Delete IoT sensor. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 scope, String iotSensorName) { - deleteAsync(scope, iotSensorName).block(); - } - - /** - * Delete IoT sensor. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 Response deleteWithResponse(String scope, String iotSensorName, Context context) { - return deleteWithResponseAsync(scope, iotSensorName, context).block(); - } - - /** - * Download sensor activation file. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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) - private Mono downloadActivationWithResponseAsync(String scope, String iotSensorName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - if (iotSensorName == null) { - return Mono.error(new IllegalArgumentException("Parameter iotSensorName is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/zip"; - return FluxUtil - .withContext( - context -> - service - .downloadActivation( - this.client.getEndpoint(), apiVersion, scope, iotSensorName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Download sensor activation file. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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) - private Mono downloadActivationWithResponseAsync( - String scope, String iotSensorName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - if (iotSensorName == null) { - return Mono.error(new IllegalArgumentException("Parameter iotSensorName is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/zip"; - context = this.client.mergeContext(context); - return service.downloadActivation(this.client.getEndpoint(), apiVersion, scope, iotSensorName, accept, context); - } - - /** - * Download sensor activation file. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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) - private Flux downloadActivationAsync(String scope, String iotSensorName) { - return downloadActivationWithResponseAsync(scope, iotSensorName).flatMapMany(StreamResponse::getValue); - } - - /** - * Download sensor activation file. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 InputStream downloadActivation(String scope, String iotSensorName) { - Iterator iterator = - downloadActivationAsync(scope, iotSensorName).map(ByteBufferBackedInputStream::new).toStream().iterator(); - Enumeration enumeration = - new Enumeration() { - @Override - public boolean hasMoreElements() { - return iterator.hasNext(); - } - - @Override - public InputStream nextElement() { - return iterator.next(); - } - }; - return new SequenceInputStream(enumeration); - } - - /** - * Download sensor activation file. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 StreamResponse downloadActivationWithResponse(String scope, String iotSensorName, Context context) { - return downloadActivationWithResponseAsync(scope, iotSensorName, context).block(); - } - - /** - * Download file for reset password of the sensor. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @param body The reset password input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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) - private Mono downloadResetPasswordWithResponseAsync( - String scope, String iotSensorName, ResetPasswordInput body) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - if (iotSensorName == null) { - return Mono.error(new IllegalArgumentException("Parameter iotSensorName 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 apiVersion = "2020-08-06-preview"; - final String accept = "application/zip"; - return FluxUtil - .withContext( - context -> - service - .downloadResetPassword( - this.client.getEndpoint(), apiVersion, scope, iotSensorName, body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Download file for reset password of the sensor. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @param body The reset password input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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) - private Mono downloadResetPasswordWithResponseAsync( - String scope, String iotSensorName, ResetPasswordInput body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - if (iotSensorName == null) { - return Mono.error(new IllegalArgumentException("Parameter iotSensorName 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 apiVersion = "2020-08-06-preview"; - final String accept = "application/zip"; - context = this.client.mergeContext(context); - return service - .downloadResetPassword(this.client.getEndpoint(), apiVersion, scope, iotSensorName, body, accept, context); - } - - /** - * Download file for reset password of the sensor. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @param body The reset password input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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) - private Flux downloadResetPasswordAsync(String scope, String iotSensorName, ResetPasswordInput body) { - return downloadResetPasswordWithResponseAsync(scope, iotSensorName, body).flatMapMany(StreamResponse::getValue); - } - - /** - * Download file for reset password of the sensor. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @param body The reset password input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 InputStream downloadResetPassword(String scope, String iotSensorName, ResetPasswordInput body) { - Iterator iterator = - downloadResetPasswordAsync(scope, iotSensorName, body) - .map(ByteBufferBackedInputStream::new) - .toStream() - .iterator(); - Enumeration enumeration = - new Enumeration() { - @Override - public boolean hasMoreElements() { - return iterator.hasNext(); - } - - @Override - public InputStream nextElement() { - return iterator.next(); - } - }; - return new SequenceInputStream(enumeration); - } - - /** - * Download file for reset password of the sensor. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @param body The reset password input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 StreamResponse downloadResetPasswordWithResponse( - String scope, String iotSensorName, ResetPasswordInput body, Context context) { - return downloadResetPasswordWithResponseAsync(scope, iotSensorName, body, context).block(); - } - - /** - * Trigger threat intelligence package update. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> triggerTiPackageUpdateWithResponseAsync(String scope, String iotSensorName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - if (iotSensorName == null) { - return Mono.error(new IllegalArgumentException("Parameter iotSensorName is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .triggerTiPackageUpdate( - this.client.getEndpoint(), apiVersion, scope, iotSensorName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Trigger threat intelligence package update. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> triggerTiPackageUpdateWithResponseAsync( - String scope, String iotSensorName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - if (iotSensorName == null) { - return Mono.error(new IllegalArgumentException("Parameter iotSensorName is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .triggerTiPackageUpdate(this.client.getEndpoint(), apiVersion, scope, iotSensorName, accept, context); - } - - /** - * Trigger threat intelligence package update. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono triggerTiPackageUpdateAsync(String scope, String iotSensorName) { - return triggerTiPackageUpdateWithResponseAsync(scope, iotSensorName) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Trigger threat intelligence package update. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 triggerTiPackageUpdate(String scope, String iotSensorName) { - triggerTiPackageUpdateAsync(scope, iotSensorName).block(); - } - - /** - * Trigger threat intelligence package update. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 Response triggerTiPackageUpdateWithResponse(String scope, String iotSensorName, Context context) { - return triggerTiPackageUpdateWithResponseAsync(scope, iotSensorName, context).block(); - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSensorsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSensorsImpl.java deleted file mode 100644 index 73997c7903a5f..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSensorsImpl.java +++ /dev/null @@ -1,219 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.http.rest.StreamResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.security.fluent.IotSensorsClient; -import com.azure.resourcemanager.security.fluent.models.IotSensorsListInner; -import com.azure.resourcemanager.security.fluent.models.IotSensorsModelInner; -import com.azure.resourcemanager.security.models.IotSensors; -import com.azure.resourcemanager.security.models.IotSensorsList; -import com.azure.resourcemanager.security.models.IotSensorsModel; -import com.azure.resourcemanager.security.models.ResetPasswordInput; -import com.fasterxml.jackson.annotation.JsonIgnore; -import java.io.InputStream; - -public final class IotSensorsImpl implements IotSensors { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IotSensorsImpl.class); - - private final IotSensorsClient innerClient; - - private final com.azure.resourcemanager.security.SecurityManager serviceManager; - - public IotSensorsImpl( - IotSensorsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public IotSensorsList list(String scope) { - IotSensorsListInner inner = this.serviceClient().list(scope); - if (inner != null) { - return new IotSensorsListImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listWithResponse(String scope, Context context) { - Response inner = this.serviceClient().listWithResponse(scope, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new IotSensorsListImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public IotSensorsModel get(String scope, String iotSensorName) { - IotSensorsModelInner inner = this.serviceClient().get(scope, iotSensorName); - if (inner != null) { - return new IotSensorsModelImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse(String scope, String iotSensorName, Context context) { - Response inner = this.serviceClient().getWithResponse(scope, iotSensorName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new IotSensorsModelImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void deleteByResourceGroup(String scope, String iotSensorName) { - this.serviceClient().delete(scope, iotSensorName); - } - - public Response deleteWithResponse(String scope, String iotSensorName, Context context) { - return this.serviceClient().deleteWithResponse(scope, iotSensorName, context); - } - - public InputStream downloadActivation(String scope, String iotSensorName) { - return this.serviceClient().downloadActivation(scope, iotSensorName); - } - - public StreamResponse downloadActivationWithResponse(String scope, String iotSensorName, Context context) { - return this.serviceClient().downloadActivationWithResponse(scope, iotSensorName, context); - } - - public InputStream downloadResetPassword(String scope, String iotSensorName, ResetPasswordInput body) { - return this.serviceClient().downloadResetPassword(scope, iotSensorName, body); - } - - public StreamResponse downloadResetPasswordWithResponse( - String scope, String iotSensorName, ResetPasswordInput body, Context context) { - return this.serviceClient().downloadResetPasswordWithResponse(scope, iotSensorName, body, context); - } - - public void triggerTiPackageUpdate(String scope, String iotSensorName) { - this.serviceClient().triggerTiPackageUpdate(scope, iotSensorName); - } - - public Response triggerTiPackageUpdateWithResponse(String scope, String iotSensorName, Context context) { - return this.serviceClient().triggerTiPackageUpdateWithResponse(scope, iotSensorName, context); - } - - public IotSensorsModel getById(String id) { - String scope = - Utils - .getValueFromIdByParameterName( - id, "/{scope}/providers/Microsoft.Security/iotSensors/{iotSensorName}", "scope"); - if (scope == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id))); - } - String iotSensorName = - Utils - .getValueFromIdByParameterName( - id, "/{scope}/providers/Microsoft.Security/iotSensors/{iotSensorName}", "iotSensorName"); - if (iotSensorName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'iotSensors'.", id))); - } - return this.getWithResponse(scope, iotSensorName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String scope = - Utils - .getValueFromIdByParameterName( - id, "/{scope}/providers/Microsoft.Security/iotSensors/{iotSensorName}", "scope"); - if (scope == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id))); - } - String iotSensorName = - Utils - .getValueFromIdByParameterName( - id, "/{scope}/providers/Microsoft.Security/iotSensors/{iotSensorName}", "iotSensorName"); - if (iotSensorName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'iotSensors'.", id))); - } - return this.getWithResponse(scope, iotSensorName, context); - } - - public void deleteById(String id) { - String scope = - Utils - .getValueFromIdByParameterName( - id, "/{scope}/providers/Microsoft.Security/iotSensors/{iotSensorName}", "scope"); - if (scope == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id))); - } - String iotSensorName = - Utils - .getValueFromIdByParameterName( - id, "/{scope}/providers/Microsoft.Security/iotSensors/{iotSensorName}", "iotSensorName"); - if (iotSensorName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'iotSensors'.", id))); - } - this.deleteWithResponse(scope, iotSensorName, Context.NONE).getValue(); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String scope = - Utils - .getValueFromIdByParameterName( - id, "/{scope}/providers/Microsoft.Security/iotSensors/{iotSensorName}", "scope"); - if (scope == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id))); - } - String iotSensorName = - Utils - .getValueFromIdByParameterName( - id, "/{scope}/providers/Microsoft.Security/iotSensors/{iotSensorName}", "iotSensorName"); - if (iotSensorName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'iotSensors'.", id))); - } - return this.deleteWithResponse(scope, iotSensorName, context); - } - - private IotSensorsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.security.SecurityManager manager() { - return this.serviceManager; - } - - public IotSensorsModelImpl define(String name) { - return new IotSensorsModelImpl(name, this.manager()); - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSensorsListImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSensorsListImpl.java deleted file mode 100644 index dffae09845d2c..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSensorsListImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.implementation; - -import com.azure.resourcemanager.security.fluent.models.IotSensorsListInner; -import com.azure.resourcemanager.security.fluent.models.IotSensorsModelInner; -import com.azure.resourcemanager.security.models.IotSensorsList; -import com.azure.resourcemanager.security.models.IotSensorsModel; -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; - -public final class IotSensorsListImpl implements IotSensorsList { - private IotSensorsListInner innerObject; - - private final com.azure.resourcemanager.security.SecurityManager serviceManager; - - IotSensorsListImpl( - IotSensorsListInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new IotSensorsModelImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - - public IotSensorsListInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.security.SecurityManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSensorsModelImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSensorsModelImpl.java deleted file mode 100644 index 75cbf9d345a2c..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSensorsModelImpl.java +++ /dev/null @@ -1,216 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.StreamResponse; -import com.azure.core.util.Context; -import com.azure.resourcemanager.security.fluent.models.IotSensorsModelInner; -import com.azure.resourcemanager.security.models.IotSensorsModel; -import com.azure.resourcemanager.security.models.ResetPasswordInput; -import com.azure.resourcemanager.security.models.SensorStatus; -import com.azure.resourcemanager.security.models.SensorType; -import com.azure.resourcemanager.security.models.TiStatus; -import java.io.InputStream; - -public final class IotSensorsModelImpl implements IotSensorsModel, IotSensorsModel.Definition, IotSensorsModel.Update { - private IotSensorsModelInner innerObject; - - private final com.azure.resourcemanager.security.SecurityManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String connectivityTime() { - return this.innerModel().connectivityTime(); - } - - public String creationTime() { - return this.innerModel().creationTime(); - } - - public Boolean dynamicLearning() { - return this.innerModel().dynamicLearning(); - } - - public Boolean learningMode() { - return this.innerModel().learningMode(); - } - - public SensorStatus sensorStatus() { - return this.innerModel().sensorStatus(); - } - - public String sensorVersion() { - return this.innerModel().sensorVersion(); - } - - public Boolean tiAutomaticUpdates() { - return this.innerModel().tiAutomaticUpdates(); - } - - public TiStatus tiStatus() { - return this.innerModel().tiStatus(); - } - - public String tiVersion() { - return this.innerModel().tiVersion(); - } - - public String zone() { - return this.innerModel().zone(); - } - - public SensorType sensorType() { - return this.innerModel().sensorType(); - } - - public IotSensorsModelInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.security.SecurityManager manager() { - return this.serviceManager; - } - - private String scope; - - private String iotSensorName; - - public IotSensorsModelImpl withExistingScope(String scope) { - this.scope = scope; - return this; - } - - public IotSensorsModel create() { - this.innerObject = - serviceManager - .serviceClient() - .getIotSensors() - .createOrUpdateWithResponse(scope, iotSensorName, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public IotSensorsModel create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getIotSensors() - .createOrUpdateWithResponse(scope, iotSensorName, this.innerModel(), context) - .getValue(); - return this; - } - - IotSensorsModelImpl(String name, com.azure.resourcemanager.security.SecurityManager serviceManager) { - this.innerObject = new IotSensorsModelInner(); - this.serviceManager = serviceManager; - this.iotSensorName = name; - } - - public IotSensorsModelImpl update() { - return this; - } - - public IotSensorsModel apply() { - this.innerObject = - serviceManager - .serviceClient() - .getIotSensors() - .createOrUpdateWithResponse(scope, iotSensorName, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public IotSensorsModel apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getIotSensors() - .createOrUpdateWithResponse(scope, iotSensorName, this.innerModel(), context) - .getValue(); - return this; - } - - IotSensorsModelImpl( - IotSensorsModelInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.scope = - Utils - .getValueFromIdByParameterName( - innerObject.id(), "/{scope}/providers/Microsoft.Security/iotSensors/{iotSensorName}", "scope"); - this.iotSensorName = - Utils - .getValueFromIdByParameterName( - innerObject.id(), - "/{scope}/providers/Microsoft.Security/iotSensors/{iotSensorName}", - "iotSensorName"); - } - - public IotSensorsModel refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getIotSensors() - .getWithResponse(scope, iotSensorName, Context.NONE) - .getValue(); - return this; - } - - public IotSensorsModel refresh(Context context) { - this.innerObject = - serviceManager.serviceClient().getIotSensors().getWithResponse(scope, iotSensorName, context).getValue(); - return this; - } - - public InputStream downloadActivation() { - return serviceManager.iotSensors().downloadActivation(scope, iotSensorName); - } - - public StreamResponse downloadActivationWithResponse(Context context) { - return serviceManager.iotSensors().downloadActivationWithResponse(scope, iotSensorName, context); - } - - public InputStream downloadResetPassword(ResetPasswordInput body) { - return serviceManager.iotSensors().downloadResetPassword(scope, iotSensorName, body); - } - - public StreamResponse downloadResetPasswordWithResponse(ResetPasswordInput body, Context context) { - return serviceManager.iotSensors().downloadResetPasswordWithResponse(scope, iotSensorName, body, context); - } - - public void triggerTiPackageUpdate() { - serviceManager.iotSensors().triggerTiPackageUpdate(scope, iotSensorName); - } - - public Response triggerTiPackageUpdateWithResponse(Context context) { - return serviceManager.iotSensors().triggerTiPackageUpdateWithResponse(scope, iotSensorName, context); - } - - public IotSensorsModelImpl withTiAutomaticUpdates(Boolean tiAutomaticUpdates) { - this.innerModel().withTiAutomaticUpdates(tiAutomaticUpdates); - return this; - } - - public IotSensorsModelImpl withZone(String zone) { - this.innerModel().withZone(zone); - return this; - } - - public IotSensorsModelImpl withSensorType(SensorType sensorType) { - this.innerModel().withSensorType(sensorType); - return this; - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSitesClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSitesClientImpl.java deleted file mode 100644 index 47c040539e41a..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSitesClientImpl.java +++ /dev/null @@ -1,537 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.security.fluent.IotSitesClient; -import com.azure.resourcemanager.security.fluent.models.IotSitesListInner; -import com.azure.resourcemanager.security.fluent.models.IotSitesModelInner; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in IotSitesClient. */ -public final class IotSitesClientImpl implements IotSitesClient { - private final ClientLogger logger = new ClientLogger(IotSitesClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final IotSitesService service; - - /** The service client containing this operation class. */ - private final SecurityCenterImpl client; - - /** - * Initializes an instance of IotSitesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - IotSitesClientImpl(SecurityCenterImpl client) { - this.service = RestProxy.create(IotSitesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityCenterIotSites to be used by the proxy service to perform - * REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityCenterIotSit") - private interface IotSitesService { - @Headers({"Content-Type: application/json"}) - @Get("/{scope}/providers/Microsoft.Security/iotSites") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "scope", encoded = true) String scope, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("/{scope}/providers/Microsoft.Security/iotSites/default") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "scope", encoded = true) String scope, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put("/{scope}/providers/Microsoft.Security/iotSites/default") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "scope", encoded = true) String scope, - @BodyParam("application/json") IotSitesModelInner iotSitesModel, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete("/{scope}/providers/Microsoft.Security/iotSites/default") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "scope", encoded = true) String scope, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * List IoT sites. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT sites. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync(String scope) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, scope, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List IoT sites. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT sites. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync(String scope, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), apiVersion, scope, accept, context); - } - - /** - * List IoT sites. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT sites. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listAsync(String scope) { - return listWithResponseAsync(scope) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * List IoT sites. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT sites. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public IotSitesListInner list(String scope) { - return listAsync(scope).block(); - } - - /** - * List IoT sites. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT sites. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse(String scope, Context context) { - return listWithResponseAsync(scope, context).block(); - } - - /** - * Get IoT site. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT site. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String scope) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, scope, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get IoT site. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT site. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String scope, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), apiVersion, scope, accept, context); - } - - /** - * Get IoT site. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT site. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String scope) { - return getWithResponseAsync(scope) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Get IoT site. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT site. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public IotSitesModelInner get(String scope) { - return getAsync(scope).block(); - } - - /** - * Get IoT site. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT site. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String scope, Context context) { - return getWithResponseAsync(scope, context).block(); - } - - /** - * Create or update IoT site. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSitesModel The IoT sites model. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT site model. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String scope, IotSitesModelInner iotSitesModel) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - if (iotSitesModel == null) { - return Mono.error(new IllegalArgumentException("Parameter iotSitesModel is required and cannot be null.")); - } else { - iotSitesModel.validate(); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate(this.client.getEndpoint(), apiVersion, scope, iotSitesModel, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update IoT site. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSitesModel The IoT sites model. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT site model. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String scope, IotSitesModelInner iotSitesModel, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - if (iotSitesModel == null) { - return Mono.error(new IllegalArgumentException("Parameter iotSitesModel is required and cannot be null.")); - } else { - iotSitesModel.validate(); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), apiVersion, scope, iotSitesModel, accept, context); - } - - /** - * Create or update IoT site. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSitesModel The IoT sites model. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT site model. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String scope, IotSitesModelInner iotSitesModel) { - return createOrUpdateWithResponseAsync(scope, iotSitesModel) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Create or update IoT site. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSitesModel The IoT sites model. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT site model. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public IotSitesModelInner createOrUpdate(String scope, IotSitesModelInner iotSitesModel) { - return createOrUpdateAsync(scope, iotSitesModel).block(); - } - - /** - * Create or update IoT site. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSitesModel The IoT sites model. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT site model. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String scope, IotSitesModelInner iotSitesModel, Context context) { - return createOrUpdateWithResponseAsync(scope, iotSitesModel, context).block(); - } - - /** - * Delete IoT site. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String scope) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, scope, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete IoT site. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String scope, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), apiVersion, scope, accept, context); - } - - /** - * Delete IoT site. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String scope) { - return deleteWithResponseAsync(scope).flatMap((Response res) -> Mono.empty()); - } - - /** - * Delete IoT site. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 scope) { - deleteAsync(scope).block(); - } - - /** - * Delete IoT site. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 Response deleteWithResponse(String scope, Context context) { - return deleteWithResponseAsync(scope, context).block(); - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSitesImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSitesImpl.java deleted file mode 100644 index 4b705e75ad666..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSitesImpl.java +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.security.fluent.IotSitesClient; -import com.azure.resourcemanager.security.fluent.models.IotSitesListInner; -import com.azure.resourcemanager.security.fluent.models.IotSitesModelInner; -import com.azure.resourcemanager.security.models.IotSites; -import com.azure.resourcemanager.security.models.IotSitesList; -import com.azure.resourcemanager.security.models.IotSitesModel; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class IotSitesImpl implements IotSites { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IotSitesImpl.class); - - private final IotSitesClient innerClient; - - private final com.azure.resourcemanager.security.SecurityManager serviceManager; - - public IotSitesImpl(IotSitesClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public IotSitesList list(String scope) { - IotSitesListInner inner = this.serviceClient().list(scope); - if (inner != null) { - return new IotSitesListImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listWithResponse(String scope, Context context) { - Response inner = this.serviceClient().listWithResponse(scope, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new IotSitesListImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public IotSitesModel get(String scope) { - IotSitesModelInner inner = this.serviceClient().get(scope); - if (inner != null) { - return new IotSitesModelImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse(String scope, Context context) { - Response inner = this.serviceClient().getWithResponse(scope, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new IotSitesModelImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public IotSitesModel createOrUpdate(String scope, IotSitesModelInner iotSitesModel) { - IotSitesModelInner inner = this.serviceClient().createOrUpdate(scope, iotSitesModel); - if (inner != null) { - return new IotSitesModelImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response createOrUpdateWithResponse( - String scope, IotSitesModelInner iotSitesModel, Context context) { - Response inner = - this.serviceClient().createOrUpdateWithResponse(scope, iotSitesModel, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new IotSitesModelImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String scope) { - this.serviceClient().delete(scope); - } - - public Response deleteWithResponse(String scope, Context context) { - return this.serviceClient().deleteWithResponse(scope, context); - } - - private IotSitesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.security.SecurityManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSitesListImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSitesListImpl.java deleted file mode 100644 index a4c09713ae5f5..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSitesListImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.implementation; - -import com.azure.resourcemanager.security.fluent.models.IotSitesListInner; -import com.azure.resourcemanager.security.fluent.models.IotSitesModelInner; -import com.azure.resourcemanager.security.models.IotSitesList; -import com.azure.resourcemanager.security.models.IotSitesModel; -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; - -public final class IotSitesListImpl implements IotSitesList { - private IotSitesListInner innerObject; - - private final com.azure.resourcemanager.security.SecurityManager serviceManager; - - IotSitesListImpl(IotSitesListInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new IotSitesModelImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - - public IotSitesListInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.security.SecurityManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSitesModelImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSitesModelImpl.java deleted file mode 100644 index 93d7305087cd4..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSitesModelImpl.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.implementation; - -import com.azure.resourcemanager.security.fluent.models.IotSitesModelInner; -import com.azure.resourcemanager.security.models.IotSitesModel; -import java.util.Collections; -import java.util.Map; - -public final class IotSitesModelImpl implements IotSitesModel { - private IotSitesModelInner innerObject; - - private final com.azure.resourcemanager.security.SecurityManager serviceManager; - - IotSitesModelImpl( - IotSitesModelInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String displayName() { - return this.innerModel().displayName(); - } - - public Map tags() { - Map inner = this.innerModel().tags(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public IotSitesModelInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.security.SecurityManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/OnPremiseIotSensorImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/OnPremiseIotSensorImpl.java deleted file mode 100644 index 0e90e7e569cbb..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/OnPremiseIotSensorImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.implementation; - -import com.azure.resourcemanager.security.fluent.models.OnPremiseIotSensorInner; -import com.azure.resourcemanager.security.models.OnPremiseIotSensor; - -public final class OnPremiseIotSensorImpl implements OnPremiseIotSensor { - private OnPremiseIotSensorInner innerObject; - - private final com.azure.resourcemanager.security.SecurityManager serviceManager; - - OnPremiseIotSensorImpl( - OnPremiseIotSensorInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public Object properties() { - return this.innerModel().properties(); - } - - public OnPremiseIotSensorInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.security.SecurityManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/OnPremiseIotSensorsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/OnPremiseIotSensorsClientImpl.java deleted file mode 100644 index baab7b119bdbe..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/OnPremiseIotSensorsClientImpl.java +++ /dev/null @@ -1,971 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.http.rest.StreamResponse; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.security.fluent.OnPremiseIotSensorsClient; -import com.azure.resourcemanager.security.fluent.models.OnPremiseIotSensorInner; -import com.azure.resourcemanager.security.fluent.models.OnPremiseIotSensorsListInner; -import com.azure.resourcemanager.security.models.ResetPasswordInput; -import com.fasterxml.jackson.databind.util.ByteBufferBackedInputStream; -import java.io.InputStream; -import java.io.SequenceInputStream; -import java.nio.ByteBuffer; -import java.util.Enumeration; -import java.util.Iterator; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in OnPremiseIotSensorsClient. */ -public final class OnPremiseIotSensorsClientImpl implements OnPremiseIotSensorsClient { - private final ClientLogger logger = new ClientLogger(OnPremiseIotSensorsClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final OnPremiseIotSensorsService service; - - /** The service client containing this operation class. */ - private final SecurityCenterImpl client; - - /** - * Initializes an instance of OnPremiseIotSensorsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OnPremiseIotSensorsClientImpl(SecurityCenterImpl client) { - this.service = - RestProxy.create(OnPremiseIotSensorsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityCenterOnPremiseIotSensors to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityCenterOnPrem") - private interface OnPremiseIotSensorsService { - @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/onPremiseIotSensors") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/providers/Microsoft.Security/onPremiseIotSensors/{onPremiseIotSensorName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("onPremiseIotSensorName") String onPremiseIotSensorName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/providers/Microsoft.Security/onPremiseIotSensors/{onPremiseIotSensorName}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("onPremiseIotSensorName") String onPremiseIotSensorName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/providers/Microsoft.Security/onPremiseIotSensors/{onPremiseIotSensorName}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("onPremiseIotSensorName") String onPremiseIotSensorName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/providers/Microsoft.Security/onPremiseIotSensors/{onPremiseIotSensorName}" - + "/downloadActivation") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono downloadActivation( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("onPremiseIotSensorName") String onPremiseIotSensorName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/providers/Microsoft.Security/onPremiseIotSensors/{onPremiseIotSensorName}" - + "/downloadResetPassword") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono downloadResetPassword( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("onPremiseIotSensorName") String onPremiseIotSensorName, - @BodyParam("application/json") ResetPasswordInput body, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * List on-premise IoT sensors. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of on-premise IoT sensors. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync() { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List on-premise IoT sensors. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of on-premise IoT sensors. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context); - } - - /** - * List on-premise IoT sensors. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of on-premise IoT sensors. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listAsync() { - return listWithResponseAsync() - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * List on-premise IoT sensors. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of on-premise IoT sensors. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OnPremiseIotSensorsListInner list() { - return listAsync().block(); - } - - /** - * List on-premise IoT sensors. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of on-premise IoT sensors. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse(Context context) { - return listWithResponseAsync(context).block(); - } - - /** - * Get on-premise IoT sensor. - * - * @param onPremiseIotSensorName Name of the on-premise IoT sensor. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return on-premise IoT sensor. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String onPremiseIotSensorName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (onPremiseIotSensorName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter onPremiseIotSensorName is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - onPremiseIotSensorName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get on-premise IoT sensor. - * - * @param onPremiseIotSensorName Name of the on-premise IoT sensor. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return on-premise IoT sensor. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String onPremiseIotSensorName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (onPremiseIotSensorName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter onPremiseIotSensorName is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - onPremiseIotSensorName, - accept, - context); - } - - /** - * Get on-premise IoT sensor. - * - * @param onPremiseIotSensorName Name of the on-premise IoT sensor. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return on-premise IoT sensor. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String onPremiseIotSensorName) { - return getWithResponseAsync(onPremiseIotSensorName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Get on-premise IoT sensor. - * - * @param onPremiseIotSensorName Name of the on-premise IoT sensor. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return on-premise IoT sensor. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OnPremiseIotSensorInner get(String onPremiseIotSensorName) { - return getAsync(onPremiseIotSensorName).block(); - } - - /** - * Get on-premise IoT sensor. - * - * @param onPremiseIotSensorName Name of the on-premise IoT sensor. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return on-premise IoT sensor. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String onPremiseIotSensorName, Context context) { - return getWithResponseAsync(onPremiseIotSensorName, context).block(); - } - - /** - * Create or update on-premise IoT sensor. - * - * @param onPremiseIotSensorName Name of the on-premise IoT sensor. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return on-premise IoT sensor. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String onPremiseIotSensorName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (onPremiseIotSensorName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter onPremiseIotSensorName is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - onPremiseIotSensorName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update on-premise IoT sensor. - * - * @param onPremiseIotSensorName Name of the on-premise IoT sensor. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return on-premise IoT sensor. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String onPremiseIotSensorName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (onPremiseIotSensorName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter onPremiseIotSensorName is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - onPremiseIotSensorName, - accept, - context); - } - - /** - * Create or update on-premise IoT sensor. - * - * @param onPremiseIotSensorName Name of the on-premise IoT sensor. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return on-premise IoT sensor. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String onPremiseIotSensorName) { - return createOrUpdateWithResponseAsync(onPremiseIotSensorName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Create or update on-premise IoT sensor. - * - * @param onPremiseIotSensorName Name of the on-premise IoT sensor. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return on-premise IoT sensor. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OnPremiseIotSensorInner createOrUpdate(String onPremiseIotSensorName) { - return createOrUpdateAsync(onPremiseIotSensorName).block(); - } - - /** - * Create or update on-premise IoT sensor. - * - * @param onPremiseIotSensorName Name of the on-premise IoT sensor. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return on-premise IoT sensor. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String onPremiseIotSensorName, Context context) { - return createOrUpdateWithResponseAsync(onPremiseIotSensorName, context).block(); - } - - /** - * Delete on-premise IoT sensor. - * - * @param onPremiseIotSensorName Name of the on-premise IoT sensor. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String onPremiseIotSensorName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (onPremiseIotSensorName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter onPremiseIotSensorName is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - onPremiseIotSensorName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete on-premise IoT sensor. - * - * @param onPremiseIotSensorName Name of the on-premise IoT sensor. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String onPremiseIotSensorName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (onPremiseIotSensorName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter onPremiseIotSensorName is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - onPremiseIotSensorName, - accept, - context); - } - - /** - * Delete on-premise IoT sensor. - * - * @param onPremiseIotSensorName Name of the on-premise IoT sensor. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String onPremiseIotSensorName) { - return deleteWithResponseAsync(onPremiseIotSensorName).flatMap((Response res) -> Mono.empty()); - } - - /** - * Delete on-premise IoT sensor. - * - * @param onPremiseIotSensorName Name of the on-premise IoT sensor. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 onPremiseIotSensorName) { - deleteAsync(onPremiseIotSensorName).block(); - } - - /** - * Delete on-premise IoT sensor. - * - * @param onPremiseIotSensorName Name of the on-premise IoT sensor. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 Response deleteWithResponse(String onPremiseIotSensorName, Context context) { - return deleteWithResponseAsync(onPremiseIotSensorName, context).block(); - } - - /** - * Download sensor activation file. - * - * @param onPremiseIotSensorName Name of the on-premise IoT sensor. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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) - private Mono downloadActivationWithResponseAsync(String onPremiseIotSensorName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (onPremiseIotSensorName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter onPremiseIotSensorName is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/zip"; - return FluxUtil - .withContext( - context -> - service - .downloadActivation( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - onPremiseIotSensorName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Download sensor activation file. - * - * @param onPremiseIotSensorName Name of the on-premise IoT sensor. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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) - private Mono downloadActivationWithResponseAsync(String onPremiseIotSensorName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (onPremiseIotSensorName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter onPremiseIotSensorName is required and cannot be null.")); - } - final String apiVersion = "2020-08-06-preview"; - final String accept = "application/zip"; - context = this.client.mergeContext(context); - return service - .downloadActivation( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - onPremiseIotSensorName, - accept, - context); - } - - /** - * Download sensor activation file. - * - * @param onPremiseIotSensorName Name of the on-premise IoT sensor. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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) - private Flux downloadActivationAsync(String onPremiseIotSensorName) { - return downloadActivationWithResponseAsync(onPremiseIotSensorName).flatMapMany(StreamResponse::getValue); - } - - /** - * Download sensor activation file. - * - * @param onPremiseIotSensorName Name of the on-premise IoT sensor. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 InputStream downloadActivation(String onPremiseIotSensorName) { - Iterator iterator = - downloadActivationAsync(onPremiseIotSensorName).map(ByteBufferBackedInputStream::new).toStream().iterator(); - Enumeration enumeration = - new Enumeration() { - @Override - public boolean hasMoreElements() { - return iterator.hasNext(); - } - - @Override - public InputStream nextElement() { - return iterator.next(); - } - }; - return new SequenceInputStream(enumeration); - } - - /** - * Download sensor activation file. - * - * @param onPremiseIotSensorName Name of the on-premise IoT sensor. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 StreamResponse downloadActivationWithResponse(String onPremiseIotSensorName, Context context) { - return downloadActivationWithResponseAsync(onPremiseIotSensorName, context).block(); - } - - /** - * Download file for reset password of the sensor. - * - * @param onPremiseIotSensorName Name of the on-premise IoT sensor. - * @param body Input for reset password. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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) - private Mono downloadResetPasswordWithResponseAsync( - String onPremiseIotSensorName, ResetPasswordInput body) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (onPremiseIotSensorName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter onPremiseIotSensorName 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 apiVersion = "2020-08-06-preview"; - final String accept = "application/zip"; - return FluxUtil - .withContext( - context -> - service - .downloadResetPassword( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - onPremiseIotSensorName, - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Download file for reset password of the sensor. - * - * @param onPremiseIotSensorName Name of the on-premise IoT sensor. - * @param body Input for reset password. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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) - private Mono downloadResetPasswordWithResponseAsync( - String onPremiseIotSensorName, ResetPasswordInput body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (onPremiseIotSensorName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter onPremiseIotSensorName 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 apiVersion = "2020-08-06-preview"; - final String accept = "application/zip"; - context = this.client.mergeContext(context); - return service - .downloadResetPassword( - this.client.getEndpoint(), - apiVersion, - this.client.getSubscriptionId(), - onPremiseIotSensorName, - body, - accept, - context); - } - - /** - * Download file for reset password of the sensor. - * - * @param onPremiseIotSensorName Name of the on-premise IoT sensor. - * @param body Input for reset password. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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) - private Flux downloadResetPasswordAsync(String onPremiseIotSensorName, ResetPasswordInput body) { - return downloadResetPasswordWithResponseAsync(onPremiseIotSensorName, body) - .flatMapMany(StreamResponse::getValue); - } - - /** - * Download file for reset password of the sensor. - * - * @param onPremiseIotSensorName Name of the on-premise IoT sensor. - * @param body Input for reset password. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 InputStream downloadResetPassword(String onPremiseIotSensorName, ResetPasswordInput body) { - Iterator iterator = - downloadResetPasswordAsync(onPremiseIotSensorName, body) - .map(ByteBufferBackedInputStream::new) - .toStream() - .iterator(); - Enumeration enumeration = - new Enumeration() { - @Override - public boolean hasMoreElements() { - return iterator.hasNext(); - } - - @Override - public InputStream nextElement() { - return iterator.next(); - } - }; - return new SequenceInputStream(enumeration); - } - - /** - * Download file for reset password of the sensor. - * - * @param onPremiseIotSensorName Name of the on-premise IoT sensor. - * @param body Input for reset password. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 StreamResponse downloadResetPasswordWithResponse( - String onPremiseIotSensorName, ResetPasswordInput body, Context context) { - return downloadResetPasswordWithResponseAsync(onPremiseIotSensorName, body, context).block(); - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/OnPremiseIotSensorsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/OnPremiseIotSensorsImpl.java deleted file mode 100644 index 74df09ca6ff53..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/OnPremiseIotSensorsImpl.java +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.http.rest.StreamResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.security.fluent.OnPremiseIotSensorsClient; -import com.azure.resourcemanager.security.fluent.models.OnPremiseIotSensorInner; -import com.azure.resourcemanager.security.fluent.models.OnPremiseIotSensorsListInner; -import com.azure.resourcemanager.security.models.OnPremiseIotSensor; -import com.azure.resourcemanager.security.models.OnPremiseIotSensors; -import com.azure.resourcemanager.security.models.OnPremiseIotSensorsList; -import com.azure.resourcemanager.security.models.ResetPasswordInput; -import com.fasterxml.jackson.annotation.JsonIgnore; -import java.io.InputStream; - -public final class OnPremiseIotSensorsImpl implements OnPremiseIotSensors { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OnPremiseIotSensorsImpl.class); - - private final OnPremiseIotSensorsClient innerClient; - - private final com.azure.resourcemanager.security.SecurityManager serviceManager; - - public OnPremiseIotSensorsImpl( - OnPremiseIotSensorsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public OnPremiseIotSensorsList list() { - OnPremiseIotSensorsListInner inner = this.serviceClient().list(); - if (inner != null) { - return new OnPremiseIotSensorsListImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listWithResponse(Context context) { - Response inner = this.serviceClient().listWithResponse(context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new OnPremiseIotSensorsListImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public OnPremiseIotSensor get(String onPremiseIotSensorName) { - OnPremiseIotSensorInner inner = this.serviceClient().get(onPremiseIotSensorName); - if (inner != null) { - return new OnPremiseIotSensorImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse(String onPremiseIotSensorName, Context context) { - Response inner = this.serviceClient().getWithResponse(onPremiseIotSensorName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new OnPremiseIotSensorImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public OnPremiseIotSensor createOrUpdate(String onPremiseIotSensorName) { - OnPremiseIotSensorInner inner = this.serviceClient().createOrUpdate(onPremiseIotSensorName); - if (inner != null) { - return new OnPremiseIotSensorImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response createOrUpdateWithResponse(String onPremiseIotSensorName, Context context) { - Response inner = - this.serviceClient().createOrUpdateWithResponse(onPremiseIotSensorName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new OnPremiseIotSensorImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String onPremiseIotSensorName) { - this.serviceClient().delete(onPremiseIotSensorName); - } - - public Response deleteWithResponse(String onPremiseIotSensorName, Context context) { - return this.serviceClient().deleteWithResponse(onPremiseIotSensorName, context); - } - - public InputStream downloadActivation(String onPremiseIotSensorName) { - return this.serviceClient().downloadActivation(onPremiseIotSensorName); - } - - public StreamResponse downloadActivationWithResponse(String onPremiseIotSensorName, Context context) { - return this.serviceClient().downloadActivationWithResponse(onPremiseIotSensorName, context); - } - - public InputStream downloadResetPassword(String onPremiseIotSensorName, ResetPasswordInput body) { - return this.serviceClient().downloadResetPassword(onPremiseIotSensorName, body); - } - - public StreamResponse downloadResetPasswordWithResponse( - String onPremiseIotSensorName, ResetPasswordInput body, Context context) { - return this.serviceClient().downloadResetPasswordWithResponse(onPremiseIotSensorName, body, context); - } - - private OnPremiseIotSensorsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.security.SecurityManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/OnPremiseIotSensorsListImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/OnPremiseIotSensorsListImpl.java deleted file mode 100644 index 2a4b774c145ca..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/OnPremiseIotSensorsListImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.implementation; - -import com.azure.resourcemanager.security.fluent.models.OnPremiseIotSensorInner; -import com.azure.resourcemanager.security.fluent.models.OnPremiseIotSensorsListInner; -import com.azure.resourcemanager.security.models.OnPremiseIotSensor; -import com.azure.resourcemanager.security.models.OnPremiseIotSensorsList; -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; - -public final class OnPremiseIotSensorsListImpl implements OnPremiseIotSensorsList { - private OnPremiseIotSensorsListInner innerObject; - - private final com.azure.resourcemanager.security.SecurityManager serviceManager; - - OnPremiseIotSensorsListImpl( - OnPremiseIotSensorsListInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new OnPremiseIotSensorImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - - public OnPremiseIotSensorsListInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.security.SecurityManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/PackageDownloadsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/PackageDownloadsImpl.java deleted file mode 100644 index 41263da35fe82..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/PackageDownloadsImpl.java +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.implementation; - -import com.azure.resourcemanager.security.fluent.models.PackageDownloadsInner; -import com.azure.resourcemanager.security.models.PackageDownloadInfo; -import com.azure.resourcemanager.security.models.PackageDownloads; -import com.azure.resourcemanager.security.models.PackageDownloadsCentralManager; -import com.azure.resourcemanager.security.models.PackageDownloadsSensor; -import java.util.Collections; -import java.util.List; - -public final class PackageDownloadsImpl implements PackageDownloads { - private PackageDownloadsInner innerObject; - - private final com.azure.resourcemanager.security.SecurityManager serviceManager; - - PackageDownloadsImpl( - PackageDownloadsInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public PackageDownloadsSensor sensor() { - return this.innerModel().sensor(); - } - - public PackageDownloadsCentralManager centralManager() { - return this.innerModel().centralManager(); - } - - public List threatIntelligence() { - List inner = this.innerModel().threatIntelligence(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List snmp() { - List inner = this.innerModel().snmp(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List wmiTool() { - List inner = this.innerModel().wmiTool(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List authorizedDevicesImportTemplate() { - List inner = this.innerModel().authorizedDevicesImportTemplate(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List deviceInformationUpdateImportTemplate() { - List inner = this.innerModel().deviceInformationUpdateImportTemplate(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public PackageDownloadsInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.security.SecurityManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityCenterImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityCenterImpl.java index 7501c30676cfc..f1214b138448c 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityCenterImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityCenterImpl.java @@ -35,27 +35,16 @@ import com.azure.resourcemanager.security.fluent.CompliancesClient; import com.azure.resourcemanager.security.fluent.ConnectorsClient; import com.azure.resourcemanager.security.fluent.DeviceSecurityGroupsClient; -import com.azure.resourcemanager.security.fluent.DevicesClient; -import com.azure.resourcemanager.security.fluent.DevicesForHubsClient; -import com.azure.resourcemanager.security.fluent.DevicesForSubscriptionsClient; import com.azure.resourcemanager.security.fluent.DiscoveredSecuritySolutionsClient; import com.azure.resourcemanager.security.fluent.ExternalSecuritySolutionsClient; import com.azure.resourcemanager.security.fluent.InformationProtectionPoliciesClient; import com.azure.resourcemanager.security.fluent.IngestionSettingsClient; -import com.azure.resourcemanager.security.fluent.IotAlertTypesClient; -import com.azure.resourcemanager.security.fluent.IotAlertsClient; -import com.azure.resourcemanager.security.fluent.IotDefenderSettingsClient; -import com.azure.resourcemanager.security.fluent.IotRecommendationTypesClient; -import com.azure.resourcemanager.security.fluent.IotRecommendationsClient; import com.azure.resourcemanager.security.fluent.IotSecuritySolutionAnalyticsClient; import com.azure.resourcemanager.security.fluent.IotSecuritySolutionsAnalyticsAggregatedAlertsClient; import com.azure.resourcemanager.security.fluent.IotSecuritySolutionsAnalyticsRecommendationsClient; import com.azure.resourcemanager.security.fluent.IotSecuritySolutionsClient; -import com.azure.resourcemanager.security.fluent.IotSensorsClient; -import com.azure.resourcemanager.security.fluent.IotSitesClient; import com.azure.resourcemanager.security.fluent.JitNetworkAccessPoliciesClient; import com.azure.resourcemanager.security.fluent.LocationsClient; -import com.azure.resourcemanager.security.fluent.OnPremiseIotSensorsClient; import com.azure.resourcemanager.security.fluent.OperationsClient; import com.azure.resourcemanager.security.fluent.PricingsClient; import com.azure.resourcemanager.security.fluent.RegulatoryComplianceAssessmentsClient; @@ -645,138 +634,6 @@ public SqlVulnerabilityAssessmentBaselineRulesClient getSqlVulnerabilityAssessme return this.sqlVulnerabilityAssessmentBaselineRules; } - /** The IotDefenderSettingsClient object to access its operations. */ - private final IotDefenderSettingsClient iotDefenderSettings; - - /** - * Gets the IotDefenderSettingsClient object to access its operations. - * - * @return the IotDefenderSettingsClient object. - */ - public IotDefenderSettingsClient getIotDefenderSettings() { - return this.iotDefenderSettings; - } - - /** The IotSensorsClient object to access its operations. */ - private final IotSensorsClient iotSensors; - - /** - * Gets the IotSensorsClient object to access its operations. - * - * @return the IotSensorsClient object. - */ - public IotSensorsClient getIotSensors() { - return this.iotSensors; - } - - /** The DevicesForSubscriptionsClient object to access its operations. */ - private final DevicesForSubscriptionsClient devicesForSubscriptions; - - /** - * Gets the DevicesForSubscriptionsClient object to access its operations. - * - * @return the DevicesForSubscriptionsClient object. - */ - public DevicesForSubscriptionsClient getDevicesForSubscriptions() { - return this.devicesForSubscriptions; - } - - /** The DevicesForHubsClient object to access its operations. */ - private final DevicesForHubsClient devicesForHubs; - - /** - * Gets the DevicesForHubsClient object to access its operations. - * - * @return the DevicesForHubsClient object. - */ - public DevicesForHubsClient getDevicesForHubs() { - return this.devicesForHubs; - } - - /** The DevicesClient object to access its operations. */ - private final DevicesClient devices; - - /** - * Gets the DevicesClient object to access its operations. - * - * @return the DevicesClient object. - */ - public DevicesClient getDevices() { - return this.devices; - } - - /** The OnPremiseIotSensorsClient object to access its operations. */ - private final OnPremiseIotSensorsClient onPremiseIotSensors; - - /** - * Gets the OnPremiseIotSensorsClient object to access its operations. - * - * @return the OnPremiseIotSensorsClient object. - */ - public OnPremiseIotSensorsClient getOnPremiseIotSensors() { - return this.onPremiseIotSensors; - } - - /** The IotSitesClient object to access its operations. */ - private final IotSitesClient iotSites; - - /** - * Gets the IotSitesClient object to access its operations. - * - * @return the IotSitesClient object. - */ - public IotSitesClient getIotSites() { - return this.iotSites; - } - - /** The IotAlertsClient object to access its operations. */ - private final IotAlertsClient iotAlerts; - - /** - * Gets the IotAlertsClient object to access its operations. - * - * @return the IotAlertsClient object. - */ - public IotAlertsClient getIotAlerts() { - return this.iotAlerts; - } - - /** The IotAlertTypesClient object to access its operations. */ - private final IotAlertTypesClient iotAlertTypes; - - /** - * Gets the IotAlertTypesClient object to access its operations. - * - * @return the IotAlertTypesClient object. - */ - public IotAlertTypesClient getIotAlertTypes() { - return this.iotAlertTypes; - } - - /** The IotRecommendationsClient object to access its operations. */ - private final IotRecommendationsClient iotRecommendations; - - /** - * Gets the IotRecommendationsClient object to access its operations. - * - * @return the IotRecommendationsClient object. - */ - public IotRecommendationsClient getIotRecommendations() { - return this.iotRecommendations; - } - - /** The IotRecommendationTypesClient object to access its operations. */ - private final IotRecommendationTypesClient iotRecommendationTypes; - - /** - * Gets the IotRecommendationTypesClient object to access its operations. - * - * @return the IotRecommendationTypesClient object. - */ - public IotRecommendationTypesClient getIotRecommendationTypes() { - return this.iotRecommendationTypes; - } - /** The AlertsClient object to access its operations. */ private final AlertsClient alerts; @@ -890,17 +747,6 @@ public SoftwareInventoriesClient getSoftwareInventories() { this.sqlVulnerabilityAssessmentScans = new SqlVulnerabilityAssessmentScansClientImpl(this); this.sqlVulnerabilityAssessmentScanResults = new SqlVulnerabilityAssessmentScanResultsClientImpl(this); this.sqlVulnerabilityAssessmentBaselineRules = new SqlVulnerabilityAssessmentBaselineRulesClientImpl(this); - this.iotDefenderSettings = new IotDefenderSettingsClientImpl(this); - this.iotSensors = new IotSensorsClientImpl(this); - this.devicesForSubscriptions = new DevicesForSubscriptionsClientImpl(this); - this.devicesForHubs = new DevicesForHubsClientImpl(this); - this.devices = new DevicesClientImpl(this); - this.onPremiseIotSensors = new OnPremiseIotSensorsClientImpl(this); - this.iotSites = new IotSitesClientImpl(this); - this.iotAlerts = new IotAlertsClientImpl(this); - this.iotAlertTypes = new IotAlertTypesClientImpl(this); - this.iotRecommendations = new IotRecommendationsClientImpl(this); - this.iotRecommendationTypes = new IotRecommendationTypesClientImpl(this); this.alerts = new AlertsClientImpl(this); this.settings = new SettingsClientImpl(this); this.ingestionSettings = new IngestionSettingsClientImpl(this); diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SettingsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SettingsClientImpl.java index 03354fdad88f6..af6c5969124c6 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SettingsClientImpl.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SettingsClientImpl.java @@ -129,7 +129,7 @@ private Mono> listSinglePageAsync() { new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2021-06-01"; + final String apiVersion = "2021-07-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -171,7 +171,7 @@ private Mono> listSinglePageAsync(Context context) { new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2021-06-01"; + final String apiVersion = "2021-07-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -266,7 +266,7 @@ private Mono> getWithResponseAsync(SettingsSettingName se if (settingName == null) { return Mono.error(new IllegalArgumentException("Parameter settingName is required and cannot be null.")); } - final String apiVersion = "2021-06-01"; + final String apiVersion = "2021-07-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -309,7 +309,7 @@ private Mono> getWithResponseAsync(SettingsSettingName se if (settingName == null) { return Mono.error(new IllegalArgumentException("Parameter settingName is required and cannot be null.")); } - final String apiVersion = "2021-06-01"; + final String apiVersion = "2021-07-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -400,7 +400,7 @@ private Mono> updateWithResponseAsync( } else { setting.validate(); } - final String apiVersion = "2021-06-01"; + final String apiVersion = "2021-07-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -451,7 +451,7 @@ private Mono> updateWithResponseAsync( } else { setting.validate(); } - final String apiVersion = "2021-06-01"; + final String apiVersion = "2021-07-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertIntent.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertIntent.java deleted file mode 100644 index 9e01ef809a19c..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AlertIntent.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for AlertIntent. */ -public final class AlertIntent extends ExpandableStringEnum { - /** Static value Unknown for AlertIntent. */ - public static final AlertIntent UNKNOWN = fromString("Unknown"); - - /** Static value PreAttack for AlertIntent. */ - public static final AlertIntent PRE_ATTACK = fromString("PreAttack"); - - /** Static value InitialAccess for AlertIntent. */ - public static final AlertIntent INITIAL_ACCESS = fromString("InitialAccess"); - - /** Static value Persistence for AlertIntent. */ - public static final AlertIntent PERSISTENCE = fromString("Persistence"); - - /** Static value PrivilegeEscalation for AlertIntent. */ - public static final AlertIntent PRIVILEGE_ESCALATION = fromString("PrivilegeEscalation"); - - /** Static value DefenseEvasion for AlertIntent. */ - public static final AlertIntent DEFENSE_EVASION = fromString("DefenseEvasion"); - - /** Static value CredentialAccess for AlertIntent. */ - public static final AlertIntent CREDENTIAL_ACCESS = fromString("CredentialAccess"); - - /** Static value Discovery for AlertIntent. */ - public static final AlertIntent DISCOVERY = fromString("Discovery"); - - /** Static value LateralMovement for AlertIntent. */ - public static final AlertIntent LATERAL_MOVEMENT = fromString("LateralMovement"); - - /** Static value Execution for AlertIntent. */ - public static final AlertIntent EXECUTION = fromString("Execution"); - - /** Static value Collection for AlertIntent. */ - public static final AlertIntent COLLECTION = fromString("Collection"); - - /** Static value Exfiltration for AlertIntent. */ - public static final AlertIntent EXFILTRATION = fromString("Exfiltration"); - - /** Static value CommandAndControl for AlertIntent. */ - public static final AlertIntent COMMAND_AND_CONTROL = fromString("CommandAndControl"); - - /** Static value Impact for AlertIntent. */ - public static final AlertIntent IMPACT = fromString("Impact"); - - /** Static value Probing for AlertIntent. */ - public static final AlertIntent PROBING = fromString("Probing"); - - /** Static value Exploitation for AlertIntent. */ - public static final AlertIntent EXPLOITATION = fromString("Exploitation"); - - /** - * Creates or finds a AlertIntent from its string representation. - * - * @param name a name to look for. - * @return the corresponding AlertIntent. - */ - @JsonCreator - public static AlertIntent fromString(String name) { - return fromString(name, AlertIntent.class); - } - - /** @return known AlertIntent values. */ - public static Collection values() { - return values(AlertIntent.class); - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AuthorizationState.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AuthorizationState.java deleted file mode 100644 index 9d668debfd2a3..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AuthorizationState.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for AuthorizationState. */ -public final class AuthorizationState extends ExpandableStringEnum { - /** Static value Authorized for AuthorizationState. */ - public static final AuthorizationState AUTHORIZED = fromString("Authorized"); - - /** Static value Unauthorized for AuthorizationState. */ - public static final AuthorizationState UNAUTHORIZED = fromString("Unauthorized"); - - /** - * Creates or finds a AuthorizationState from its string representation. - * - * @param name a name to look for. - * @return the corresponding AuthorizationState. - */ - @JsonCreator - public static AuthorizationState fromString(String name) { - return fromString(name, AuthorizationState.class); - } - - /** @return known AuthorizationState values. */ - public static Collection values() { - return values(AuthorizationState.class); - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ContainerRegistryVulnerabilityProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ContainerRegistryVulnerabilityProperties.java index f55e744440752..31c33d484a123 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ContainerRegistryVulnerabilityProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ContainerRegistryVulnerabilityProperties.java @@ -7,6 +7,7 @@ import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -32,6 +33,7 @@ public final class ContainerRegistryVulnerabilityProperties extends AdditionalDa * Dictionary from cvss version to cvss details object */ @JsonProperty(value = "cvss", access = JsonProperty.Access.WRITE_ONLY) + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map cvss; /* diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Device.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Device.java deleted file mode 100644 index 71d5333cfed3a..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Device.java +++ /dev/null @@ -1,208 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.resourcemanager.security.fluent.models.DeviceInner; -import java.time.OffsetDateTime; -import java.util.List; - -/** An immutable client-side representation of Device. */ -public interface Device { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the displayName property: Device display name given by the collector. - * - * @return the displayName value. - */ - String displayName(); - - /** - * Gets the deviceType property: Device type. - * - * @return the deviceType value. - */ - String deviceType(); - - /** - * Gets the sourceName property: The source that created the device. - * - * @return the sourceName value. - */ - String sourceName(); - - /** - * Gets the networkInterfaces property: List of network interfaces. - * - * @return the networkInterfaces value. - */ - List networkInterfaces(); - - /** - * Gets the vendor property: Device vendor. - * - * @return the vendor value. - */ - String vendor(); - - /** - * Gets the osName property: Device operating system name. - * - * @return the osName value. - */ - String osName(); - - /** - * Gets the protocols property: List of protocols. - * - * @return the protocols value. - */ - List protocols(); - - /** - * Gets the lastActiveTime property: last time the device was active in the network. - * - * @return the lastActiveTime value. - */ - OffsetDateTime lastActiveTime(); - - /** - * Gets the lastUpdateTime property: last time the device was updated. - * - * @return the lastUpdateTime value. - */ - OffsetDateTime lastUpdateTime(); - - /** - * Gets the managementState property: Managed state of the device. - * - * @return the managementState value. - */ - ManagementState managementState(); - - /** - * Gets the authorizationState property: Authorized state of the device. - * - * @return the authorizationState value. - */ - AuthorizationState authorizationState(); - - /** - * Gets the deviceCriticality property: Device criticality. - * - * @return the deviceCriticality value. - */ - DeviceCriticality deviceCriticality(); - - /** - * Gets the purdueLevel property: Purdue level of the device. - * - * @return the purdueLevel value. - */ - PurdueLevel purdueLevel(); - - /** - * Gets the notes property: user notes for the device, up to 300 characters. - * - * @return the notes value. - */ - String notes(); - - /** - * Gets the firmwares property: List of device firmwares. - * - * @return the firmwares value. - */ - List firmwares(); - - /** - * Gets the discoveryTime property: Discovered time of the device. - * - * @return the discoveryTime value. - */ - OffsetDateTime discoveryTime(); - - /** - * Gets the programmingState property: Indicates whether this device is programming. - * - * @return the programmingState value. - */ - ProgrammingState programmingState(); - - /** - * Gets the lastProgrammingTime property: last time the device was programming or programed. - * - * @return the lastProgrammingTime value. - */ - OffsetDateTime lastProgrammingTime(); - - /** - * Gets the scanningFunctionality property: Indicates whether the device is a scanner. - * - * @return the scanningFunctionality value. - */ - ScanningFunctionality scanningFunctionality(); - - /** - * Gets the lastScanTime property: last time the device was scanning. - * - * @return the lastScanTime value. - */ - OffsetDateTime lastScanTime(); - - /** - * Gets the riskScore property: risk score of the device. - * - * @return the riskScore value. - */ - Integer riskScore(); - - /** - * Gets the sensors property: List of sensors that scanned this device. - * - * @return the sensors value. - */ - List sensors(); - - /** - * Gets the site property: Site data. - * - * @return the site value. - */ - Site site(); - - /** - * Gets the deviceStatus property: Device status. - * - * @return the deviceStatus value. - */ - DeviceStatus deviceStatus(); - - /** - * Gets the inner com.azure.resourcemanager.security.fluent.models.DeviceInner object. - * - * @return the inner object. - */ - DeviceInner innerModel(); -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DeviceCriticality.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DeviceCriticality.java deleted file mode 100644 index 0ad8a0d59c092..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DeviceCriticality.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for DeviceCriticality. */ -public final class DeviceCriticality extends ExpandableStringEnum { - /** Static value Important for DeviceCriticality. */ - public static final DeviceCriticality IMPORTANT = fromString("Important"); - - /** Static value Standard for DeviceCriticality. */ - public static final DeviceCriticality STANDARD = fromString("Standard"); - - /** - * Creates or finds a DeviceCriticality from its string representation. - * - * @param name a name to look for. - * @return the corresponding DeviceCriticality. - */ - @JsonCreator - public static DeviceCriticality fromString(String name) { - return fromString(name, DeviceCriticality.class); - } - - /** @return known DeviceCriticality values. */ - public static Collection values() { - return values(DeviceCriticality.class); - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DeviceList.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DeviceList.java deleted file mode 100644 index 24fd4db7ce11e..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DeviceList.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.security.fluent.models.DeviceInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List of Devices. */ -@Fluent -public final class DeviceList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DeviceList.class); - - /* - * List of devices - */ - @JsonProperty(value = "value", required = true) - private List value; - - /* - * When there are too many devices for one page, use this URI to fetch the - * next page. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** - * Get the value property: List of devices. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: List of devices. - * - * @param value the value value to set. - * @return the DeviceList object itself. - */ - public DeviceList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: When there are too many devices for one page, use this URI to fetch the next page. - * - * @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 - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model DeviceList")); - } else { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DeviceStatus.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DeviceStatus.java deleted file mode 100644 index e45e5661f745a..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DeviceStatus.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for DeviceStatus. */ -public final class DeviceStatus extends ExpandableStringEnum { - /** Static value Active for DeviceStatus. */ - public static final DeviceStatus ACTIVE = fromString("Active"); - - /** Static value Removed for DeviceStatus. */ - public static final DeviceStatus REMOVED = fromString("Removed"); - - /** - * Creates or finds a DeviceStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding DeviceStatus. - */ - @JsonCreator - public static DeviceStatus fromString(String name) { - return fromString(name, DeviceStatus.class); - } - - /** @return known DeviceStatus values. */ - public static Collection values() { - return values(DeviceStatus.class); - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Devices.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Devices.java deleted file mode 100644 index 202f64be237ea..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Devices.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of Devices. */ -public interface Devices { - /** - * Get device. - * - * @param resourceId The identifier of the resource. - * @param deviceId Identifier of the device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return device. - */ - Device get(String resourceId, String deviceId); - - /** - * Get device. - * - * @param resourceId The identifier of the resource. - * @param deviceId Identifier of the device. - * @param context The context to associate with this 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 device. - */ - Response getWithResponse(String resourceId, String deviceId, Context context); -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DevicesForHubs.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DevicesForHubs.java deleted file mode 100644 index f2da70879d186..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DevicesForHubs.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.security.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** Resource collection API of DevicesForHubs. */ -public interface DevicesForHubs { - /** - * Get list of the devices for the specified IoT Hub resource. - * - * @param resourceId The identifier of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of the devices for the specified IoT Hub resource. - */ - PagedIterable list(String resourceId); - - /** - * Get list of the devices for the specified IoT Hub resource. - * - * @param resourceId The identifier of the resource. - * @param limit Limit the number of items returned in a single page. - * @param skipToken Skip token used for pagination. - * @param deviceManagementType Get devices only from specific type, Managed or Unmanaged. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of the devices for the specified IoT Hub resource. - */ - PagedIterable list( - String resourceId, Integer limit, String skipToken, ManagementState deviceManagementType, Context context); -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DevicesForSubscriptions.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DevicesForSubscriptions.java deleted file mode 100644 index b53f278dc088c..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DevicesForSubscriptions.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** Resource collection API of DevicesForSubscriptions. */ -public interface DevicesForSubscriptions { - /** - * Get list of the devices by their subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of the devices by their subscription. - */ - PagedIterable list(); - - /** - * Get list of the devices by their subscription. - * - * @param limit Limit the number of items returned in a single page. - * @param skipToken Skip token used for pagination. - * @param deviceManagementType Get devices only from specific type, Managed or Unmanaged. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of the devices by their subscription. - */ - PagedIterable list(Integer limit, String skipToken, ManagementState deviceManagementType, Context context); -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Firmware.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Firmware.java deleted file mode 100644 index d1fa6bff32643..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Firmware.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Firmware information. */ -@Immutable -public final class Firmware { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Firmware.class); - - /* - * Address of the specific module a firmware is related to - */ - @JsonProperty(value = "moduleAddress", access = JsonProperty.Access.WRITE_ONLY) - private String moduleAddress; - - /* - * Rack number of the module a firmware is related to. - */ - @JsonProperty(value = "rack", access = JsonProperty.Access.WRITE_ONLY) - private String rack; - - /* - * Slot number in the rack of the module a firmware is related to - */ - @JsonProperty(value = "slot", access = JsonProperty.Access.WRITE_ONLY) - private String slot; - - /* - * Serial of the firmware - */ - @JsonProperty(value = "serial", access = JsonProperty.Access.WRITE_ONLY) - private String serial; - - /* - * Firmware model - */ - @JsonProperty(value = "model", access = JsonProperty.Access.WRITE_ONLY) - private String model; - - /* - * Firmware version - */ - @JsonProperty(value = "version", access = JsonProperty.Access.WRITE_ONLY) - private String version; - - /* - * A bag of fields which extends the firmware information. - */ - @JsonProperty(value = "additionalData", access = JsonProperty.Access.WRITE_ONLY) - private Object additionalData; - - /** - * Get the moduleAddress property: Address of the specific module a firmware is related to. - * - * @return the moduleAddress value. - */ - public String moduleAddress() { - return this.moduleAddress; - } - - /** - * Get the rack property: Rack number of the module a firmware is related to. - * - * @return the rack value. - */ - public String rack() { - return this.rack; - } - - /** - * Get the slot property: Slot number in the rack of the module a firmware is related to. - * - * @return the slot value. - */ - public String slot() { - return this.slot; - } - - /** - * Get the serial property: Serial of the firmware. - * - * @return the serial value. - */ - public String serial() { - return this.serial; - } - - /** - * Get the model property: Firmware model. - * - * @return the model value. - */ - public String model() { - return this.model; - } - - /** - * Get the version property: Firmware version. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Get the additionalData property: A bag of fields which extends the firmware information. - * - * @return the additionalData value. - */ - public Object additionalData() { - return this.additionalData; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotAlertListModel.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotAlertListModel.java deleted file mode 100644 index b28c3830e14f7..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotAlertListModel.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.security.fluent.models.IotAlertModelInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List of IoT alerts. */ -@Immutable -public final class IotAlertListModel { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IotAlertListModel.class); - - /* - * List data - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * When available, follow the URI to get the next page of data - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** - * Get the value property: List data. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: When available, follow the URI to get the next page of data. - * - * @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) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotAlertModel.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotAlertModel.java deleted file mode 100644 index fec18e0dabcc1..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotAlertModel.java +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.resourcemanager.security.fluent.models.IotAlertModelInner; -import java.util.List; - -/** An immutable client-side representation of IotAlertModel. */ -public interface IotAlertModel { - /** - * 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 systemAlertId property: Holds the product canonical identifier of the alert within the scope of a - * product. - * - * @return the systemAlertId value. - */ - String systemAlertId(); - - /** - * Gets the compromisedEntity property: Display name of the main entity being reported on. - * - * @return the compromisedEntity value. - */ - String compromisedEntity(); - - /** - * Gets the alertType property: The type name of the alert. - * - * @return the alertType value. - */ - String alertType(); - - /** - * Gets the startTimeUtc property: The impact start time of the alert (the time of the first event or activity - * included in the alert). - * - * @return the startTimeUtc value. - */ - String startTimeUtc(); - - /** - * Gets the endTimeUtc property: The impact end time of the alert (the time of the last event or activity included - * in the alert). - * - * @return the endTimeUtc value. - */ - String endTimeUtc(); - - /** - * Gets the entities property: A list of entities related to the alert. - * - * @return the entities value. - */ - List entities(); - - /** - * Gets the extendedProperties property: A bag of fields which extends the alert information. - * - * @return the extendedProperties value. - */ - Object extendedProperties(); - - /** - * Gets the inner com.azure.resourcemanager.security.fluent.models.IotAlertModelInner object. - * - * @return the inner object. - */ - IotAlertModelInner innerModel(); -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotAlertType.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotAlertType.java deleted file mode 100644 index 8a685cd60ccf1..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotAlertType.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.resourcemanager.security.fluent.models.IotAlertTypeInner; -import java.util.List; - -/** An immutable client-side representation of IotAlertType. */ -public interface IotAlertType { - /** - * 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 alertDisplayName property: The display name of the alert. - * - * @return the alertDisplayName value. - */ - String alertDisplayName(); - - /** - * Gets the severity property: The severity of the alert. - * - * @return the severity value. - */ - AlertSeverity severity(); - - /** - * Gets the description property: Description of the suspected vulnerability and meaning. - * - * @return the description value. - */ - String description(); - - /** - * Gets the providerName property: The name of the alert provider or internal partner. - * - * @return the providerName value. - */ - String providerName(); - - /** - * Gets the productName property: The name of the product which published this alert. - * - * @return the productName value. - */ - String productName(); - - /** - * Gets the productComponentName property: The name of a component inside the product which generated the alert. - * - * @return the productComponentName value. - */ - String productComponentName(); - - /** - * Gets the vendorName property: The name of the vendor that raise the alert. - * - * @return the vendorName value. - */ - String vendorName(); - - /** - * Gets the intent property: Kill chain related intent behind the alert. Could contain multiple enum values - * (separated by commas). - * - * @return the intent value. - */ - AlertIntent intent(); - - /** - * Gets the remediationSteps property: Manual action items to take to remediate the alert. - * - * @return the remediationSteps value. - */ - List remediationSteps(); - - /** - * Gets the inner com.azure.resourcemanager.security.fluent.models.IotAlertTypeInner object. - * - * @return the inner object. - */ - IotAlertTypeInner innerModel(); -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotAlertTypeList.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotAlertTypeList.java deleted file mode 100644 index da62daaa422c8..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotAlertTypeList.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.resourcemanager.security.fluent.models.IotAlertTypeListInner; -import java.util.List; - -/** An immutable client-side representation of IotAlertTypeList. */ -public interface IotAlertTypeList { - /** - * Gets the value property: List data. - * - * @return the value value. - */ - List value(); - - /** - * Gets the inner com.azure.resourcemanager.security.fluent.models.IotAlertTypeListInner object. - * - * @return the inner object. - */ - IotAlertTypeListInner innerModel(); -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotAlertTypes.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotAlertTypes.java deleted file mode 100644 index a7a8ee28a7d60..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotAlertTypes.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of IotAlertTypes. */ -public interface IotAlertTypes { - /** - * List IoT alert types. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of alert types. - */ - IotAlertTypeList list(); - - /** - * List IoT alert types. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of alert types. - */ - Response listWithResponse(Context context); - - /** - * Get IoT alert type. - * - * @param iotAlertTypeName Name of the alert type. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT alert type. - */ - IotAlertType get(String iotAlertTypeName); - - /** - * Get IoT alert type. - * - * @param iotAlertTypeName Name of the alert type. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT alert type. - */ - Response getWithResponse(String iotAlertTypeName, Context context); -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotAlerts.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotAlerts.java deleted file mode 100644 index 66911a0a93f88..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotAlerts.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of IotAlerts. */ -public interface IotAlerts { - /** - * List IoT alerts. - * - * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT alerts. - */ - PagedIterable list(String scope); - - /** - * List IoT alerts. - * - * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}). - * @param minStartTimeUtc Filter by minimum startTimeUtc (ISO 8601 format). - * @param maxStartTimeUtc Filter by maximum startTimeUtc (ISO 8601 format). - * @param alertType Filter by alert type. - * @param deviceManagementType Get devices only from specific type, Managed or Unmanaged. - * @param compromisedEntity Filter by compromised device. - * @param limit Limit the number of items returned in a single page. - * @param skipToken Skip token used for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT alerts. - */ - PagedIterable list( - String scope, - String minStartTimeUtc, - String maxStartTimeUtc, - String alertType, - ManagementState deviceManagementType, - String compromisedEntity, - Integer limit, - String skipToken, - Context context); - - /** - * Get IoT alert. - * - * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}). - * @param iotAlertId Id of the alert. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT alert. - */ - IotAlertModel get(String scope, String iotAlertId); - - /** - * Get IoT alert. - * - * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}). - * @param iotAlertId Id of the alert. - * @param context The context to associate with this 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 ioT alert. - */ - Response getWithResponse(String scope, String iotAlertId, Context context); -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotDefenderSettings.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotDefenderSettings.java deleted file mode 100644 index 3d65b1674e48b..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotDefenderSettings.java +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.StreamResponse; -import com.azure.core.util.Context; -import com.azure.resourcemanager.security.fluent.models.IotDefenderSettingsModelInner; -import java.io.InputStream; - -/** Resource collection API of IotDefenderSettings. */ -public interface IotDefenderSettings { - /** - * List IoT Defender Settings. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT Defender settings. - */ - IotDefenderSettingsList list(); - - /** - * List IoT Defender Settings. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT Defender settings. - */ - Response listWithResponse(Context context); - - /** - * Get IoT Defender Settings. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT Defender Settings. - */ - IotDefenderSettingsModel get(); - - /** - * Get IoT Defender Settings. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT Defender Settings. - */ - Response getWithResponse(Context context); - - /** - * Create or update IoT Defender settings. - * - * @param iotDefenderSettingsModel The IoT defender settings model. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT Defender settings. - */ - IotDefenderSettingsModel createOrUpdate(IotDefenderSettingsModelInner iotDefenderSettingsModel); - - /** - * Create or update IoT Defender settings. - * - * @param iotDefenderSettingsModel The IoT defender settings model. - * @param context The context to associate with this 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 ioT Defender settings. - */ - Response createOrUpdateWithResponse( - IotDefenderSettingsModelInner iotDefenderSettingsModel, Context context); - - /** - * Delete IoT Defender settings. - * - * @throws com.azure.core.management.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(); - - /** - * Delete IoT Defender settings. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - Response deleteWithResponse(Context context); - - /** - * Information about downloadable packages. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about package downloads. - */ - PackageDownloads packageDownloads(); - - /** - * Information about downloadable packages. - * - * @param context The context to associate with this 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 information about package downloads. - */ - Response packageDownloadsWithResponse(Context context); - - /** - * Download manager activation data defined for this subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - InputStream downloadManagerActivation(); - - /** - * Download manager activation data defined for this subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - StreamResponse downloadManagerActivationWithResponse(Context context); -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotDefenderSettingsList.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotDefenderSettingsList.java deleted file mode 100644 index 5c6269219dfbc..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotDefenderSettingsList.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.resourcemanager.security.fluent.models.IotDefenderSettingsListInner; -import java.util.List; - -/** An immutable client-side representation of IotDefenderSettingsList. */ -public interface IotDefenderSettingsList { - /** - * Gets the value property: List data. - * - * @return the value value. - */ - List value(); - - /** - * Gets the inner com.azure.resourcemanager.security.fluent.models.IotDefenderSettingsListInner object. - * - * @return the inner object. - */ - IotDefenderSettingsListInner innerModel(); -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotDefenderSettingsModel.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotDefenderSettingsModel.java deleted file mode 100644 index 0ea1211c20223..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotDefenderSettingsModel.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.resourcemanager.security.fluent.models.IotDefenderSettingsModelInner; -import java.time.OffsetDateTime; -import java.util.List; - -/** An immutable client-side representation of IotDefenderSettingsModel. */ -public interface IotDefenderSettingsModel { - /** - * 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 deviceQuota property: Size of the device quota (as a opposed to a Pay as You Go billing model). Value is - * required to be in multiples of 1000. - * - * @return the deviceQuota value. - */ - Integer deviceQuota(); - - /** - * Gets the sentinelWorkspaceResourceIds property: Sentinel Workspace Resource Ids. - * - * @return the sentinelWorkspaceResourceIds value. - */ - List sentinelWorkspaceResourceIds(); - - /** - * Gets the onboardingKind property: The kind of onboarding for the subscription. - * - * @return the onboardingKind value. - */ - OnboardingKind onboardingKind(); - - /** - * Gets the evaluationEndTime property: End time of the evaluation period, if such exist. - * - * @return the evaluationEndTime value. - */ - OffsetDateTime evaluationEndTime(); - - /** - * Gets the inner com.azure.resourcemanager.security.fluent.models.IotDefenderSettingsModelInner object. - * - * @return the inner object. - */ - IotDefenderSettingsModelInner innerModel(); -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotRecommendationListModel.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotRecommendationListModel.java deleted file mode 100644 index d4120658d8756..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotRecommendationListModel.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.security.fluent.models.IotRecommendationModelInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List of IoT recommendations. */ -@Immutable -public final class IotRecommendationListModel { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IotRecommendationListModel.class); - - /* - * List data - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * When available, follow the URI to get the next page of data - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** - * Get the value property: List data. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: When available, follow the URI to get the next page of data. - * - * @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) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotRecommendationModel.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotRecommendationModel.java deleted file mode 100644 index b9d958d5f5b78..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotRecommendationModel.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.resourcemanager.security.fluent.models.IotRecommendationModelInner; - -/** An immutable client-side representation of IotRecommendationModel. */ -public interface IotRecommendationModel { - /** - * 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 deviceId property: Identifier of the device being reported on. - * - * @return the deviceId value. - */ - String deviceId(); - - /** - * Gets the recommendationType property: The type name of the recommendation. - * - * @return the recommendationType value. - */ - String recommendationType(); - - /** - * Gets the discoveredTimeUtc property: The discovery time of the recommendation. - * - * @return the discoveredTimeUtc value. - */ - String discoveredTimeUtc(); - - /** - * Gets the recommendationAdditionalData property: A bag of fields which extends the recommendation information. - * - * @return the recommendationAdditionalData value. - */ - Object recommendationAdditionalData(); - - /** - * Gets the inner com.azure.resourcemanager.security.fluent.models.IotRecommendationModelInner object. - * - * @return the inner object. - */ - IotRecommendationModelInner innerModel(); -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotRecommendationType.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotRecommendationType.java deleted file mode 100644 index 62d8be131c2d3..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotRecommendationType.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.resourcemanager.security.fluent.models.IotRecommendationTypeInner; -import java.util.List; - -/** An immutable client-side representation of IotRecommendationType. */ -public interface IotRecommendationType { - /** - * 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 recommendationDisplayName property: The display name of the recommendation. - * - * @return the recommendationDisplayName value. - */ - String recommendationDisplayName(); - - /** - * Gets the severity property: The severity of the recommendation. - * - * @return the severity value. - */ - RecommendationSeverity severity(); - - /** - * Gets the description property: Description of the suspected vulnerability and meaning. - * - * @return the description value. - */ - String description(); - - /** - * Gets the productName property: The name of the product which published this recommendation. - * - * @return the productName value. - */ - String productName(); - - /** - * Gets the productComponentName property: The name of a component inside the product which generated the - * recommendation. - * - * @return the productComponentName value. - */ - String productComponentName(); - - /** - * Gets the vendorName property: The name of the vendor that raised the recommendation. - * - * @return the vendorName value. - */ - String vendorName(); - - /** - * Gets the control property: The name of the recommendation's control category. - * - * @return the control value. - */ - String control(); - - /** - * Gets the remediationSteps property: Manual action items to take to resolve the recommendation. - * - * @return the remediationSteps value. - */ - List remediationSteps(); - - /** - * Gets the dataSource property: The alert's data source. - * - * @return the dataSource value. - */ - String dataSource(); - - /** - * Gets the inner com.azure.resourcemanager.security.fluent.models.IotRecommendationTypeInner object. - * - * @return the inner object. - */ - IotRecommendationTypeInner innerModel(); -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotRecommendationTypeList.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotRecommendationTypeList.java deleted file mode 100644 index 40e74c69e017c..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotRecommendationTypeList.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.resourcemanager.security.fluent.models.IotRecommendationTypeListInner; -import java.util.List; - -/** An immutable client-side representation of IotRecommendationTypeList. */ -public interface IotRecommendationTypeList { - /** - * Gets the value property: List data. - * - * @return the value value. - */ - List value(); - - /** - * Gets the inner com.azure.resourcemanager.security.fluent.models.IotRecommendationTypeListInner object. - * - * @return the inner object. - */ - IotRecommendationTypeListInner innerModel(); -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotRecommendationTypes.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotRecommendationTypes.java deleted file mode 100644 index e0fb570ca48ce..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotRecommendationTypes.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of IotRecommendationTypes. */ -public interface IotRecommendationTypes { - /** - * List IoT recommendation types. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of recommendation types. - */ - IotRecommendationTypeList list(); - - /** - * List IoT recommendation types. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of recommendation types. - */ - Response listWithResponse(Context context); - - /** - * Get IoT recommendation type. - * - * @param iotRecommendationTypeName Name of the recommendation type. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT recommendation type. - */ - IotRecommendationType get(String iotRecommendationTypeName); - - /** - * Get IoT recommendation type. - * - * @param iotRecommendationTypeName Name of the recommendation type. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT recommendation type. - */ - Response getWithResponse(String iotRecommendationTypeName, Context context); -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotRecommendations.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotRecommendations.java deleted file mode 100644 index f0769d010d28f..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotRecommendations.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of IotRecommendations. */ -public interface IotRecommendations { - /** - * List IoT recommendations. - * - * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT recommendations. - */ - PagedIterable list(String scope); - - /** - * List IoT recommendations. - * - * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}). - * @param recommendationType Filter by recommendation type. - * @param deviceId Filter by device id. - * @param limit Limit the number of items returned in a single page. - * @param skipToken Skip token used for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT recommendations. - */ - PagedIterable list( - String scope, String recommendationType, String deviceId, Integer limit, String skipToken, Context context); - - /** - * Get IoT recommendation. - * - * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}). - * @param iotRecommendationId Id of the recommendation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT recommendation. - */ - IotRecommendationModel get(String scope, String iotRecommendationId); - - /** - * Get IoT recommendation. - * - * @param scope Scope of the query: Subscription (i.e. /subscriptions/{subscriptionId}) or IoT Hub (i.e. - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Devices/iotHubs/{iotHubName}). - * @param iotRecommendationId Id of the recommendation. - * @param context The context to associate with this 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 ioT recommendation. - */ - Response getWithResponse(String scope, String iotRecommendationId, Context context); -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotSensors.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotSensors.java deleted file mode 100644 index 917b57deb6b43..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotSensors.java +++ /dev/null @@ -1,215 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.StreamResponse; -import com.azure.core.util.Context; -import java.io.InputStream; - -/** Resource collection API of IotSensors. */ -public interface IotSensors { - /** - * List IoT sensors. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT sensors. - */ - IotSensorsList list(String scope); - - /** - * List IoT sensors. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT sensors. - */ - Response listWithResponse(String scope, Context context); - - /** - * Get IoT sensor. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT sensor. - */ - IotSensorsModel get(String scope, String iotSensorName); - - /** - * Get IoT sensor. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @param context The context to associate with this 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 ioT sensor. - */ - Response getWithResponse(String scope, String iotSensorName, Context context); - - /** - * Delete IoT sensor. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 scope, String iotSensorName); - - /** - * Delete IoT sensor. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @param context The context to associate with this 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. - */ - Response deleteWithResponse(String scope, String iotSensorName, Context context); - - /** - * Download sensor activation file. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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. - */ - InputStream downloadActivation(String scope, String iotSensorName); - - /** - * Download sensor activation file. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @param context The context to associate with this 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. - */ - StreamResponse downloadActivationWithResponse(String scope, String iotSensorName, Context context); - - /** - * Download file for reset password of the sensor. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @param body The reset password input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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. - */ - InputStream downloadResetPassword(String scope, String iotSensorName, ResetPasswordInput body); - - /** - * Download file for reset password of the sensor. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @param body The reset password input. - * @param context The context to associate with this 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. - */ - StreamResponse downloadResetPasswordWithResponse( - String scope, String iotSensorName, ResetPasswordInput body, Context context); - - /** - * Trigger threat intelligence package update. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 triggerTiPackageUpdate(String scope, String iotSensorName); - - /** - * Trigger threat intelligence package update. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSensorName Name of the IoT sensor. - * @param context The context to associate with this 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. - */ - Response triggerTiPackageUpdateWithResponse(String scope, String iotSensorName, Context context); - - /** - * Get IoT sensor. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT sensor. - */ - IotSensorsModel getById(String id); - - /** - * Get IoT sensor. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT sensor. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete IoT sensor. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete IoT sensor. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new IotSensorsModel resource. - * - * @param name resource name. - * @return the first stage of the new IotSensorsModel definition. - */ - IotSensorsModel.DefinitionStages.Blank define(String name); -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotSensorsList.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotSensorsList.java deleted file mode 100644 index 90434ffaf7d64..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotSensorsList.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.resourcemanager.security.fluent.models.IotSensorsListInner; -import java.util.List; - -/** An immutable client-side representation of IotSensorsList. */ -public interface IotSensorsList { - /** - * Gets the value property: List data. - * - * @return the value value. - */ - List value(); - - /** - * Gets the inner com.azure.resourcemanager.security.fluent.models.IotSensorsListInner object. - * - * @return the inner object. - */ - IotSensorsListInner innerModel(); -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotSensorsModel.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotSensorsModel.java deleted file mode 100644 index 866e912fe7f1a..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotSensorsModel.java +++ /dev/null @@ -1,325 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.StreamResponse; -import com.azure.core.util.Context; -import com.azure.resourcemanager.security.fluent.models.IotSensorsModelInner; -import java.io.InputStream; - -/** An immutable client-side representation of IotSensorsModel. */ -public interface IotSensorsModel { - /** - * 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 connectivityTime property: Last connectivity time of the IoT sensor. - * - * @return the connectivityTime value. - */ - String connectivityTime(); - - /** - * Gets the creationTime property: Creation time of the IoT sensor. - * - * @return the creationTime value. - */ - String creationTime(); - - /** - * Gets the dynamicLearning property: Dynamic mode status of the IoT sensor. - * - * @return the dynamicLearning value. - */ - Boolean dynamicLearning(); - - /** - * Gets the learningMode property: Learning mode status of the IoT sensor. - * - * @return the learningMode value. - */ - Boolean learningMode(); - - /** - * Gets the sensorStatus property: Status of the IoT sensor. - * - * @return the sensorStatus value. - */ - SensorStatus sensorStatus(); - - /** - * Gets the sensorVersion property: Version of the IoT sensor. - * - * @return the sensorVersion value. - */ - String sensorVersion(); - - /** - * Gets the tiAutomaticUpdates property: TI Automatic mode status of the IoT sensor. - * - * @return the tiAutomaticUpdates value. - */ - Boolean tiAutomaticUpdates(); - - /** - * Gets the tiStatus property: TI Status of the IoT sensor. - * - * @return the tiStatus value. - */ - TiStatus tiStatus(); - - /** - * Gets the tiVersion property: TI Version of the IoT sensor. - * - * @return the tiVersion value. - */ - String tiVersion(); - - /** - * Gets the zone property: Zone of the IoT sensor. - * - * @return the zone value. - */ - String zone(); - - /** - * Gets the sensorType property: Type of sensor. - * - * @return the sensorType value. - */ - SensorType sensorType(); - - /** - * Gets the inner com.azure.resourcemanager.security.fluent.models.IotSensorsModelInner object. - * - * @return the inner object. - */ - IotSensorsModelInner innerModel(); - - /** The entirety of the IotSensorsModel definition. */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithScope, DefinitionStages.WithCreate { - } - /** The IotSensorsModel definition stages. */ - interface DefinitionStages { - /** The first stage of the IotSensorsModel definition. */ - interface Blank extends WithScope { - } - /** The stage of the IotSensorsModel definition allowing to specify parent resource. */ - interface WithScope { - /** - * Specifies scope. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @return the next definition stage. - */ - WithCreate withExistingScope(String scope); - } - /** - * The stage of the IotSensorsModel definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithTiAutomaticUpdates, - DefinitionStages.WithZone, - DefinitionStages.WithSensorType { - /** - * Executes the create request. - * - * @return the created resource. - */ - IotSensorsModel create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - IotSensorsModel create(Context context); - } - /** The stage of the IotSensorsModel definition allowing to specify tiAutomaticUpdates. */ - interface WithTiAutomaticUpdates { - /** - * Specifies the tiAutomaticUpdates property: TI Automatic mode status of the IoT sensor. - * - * @param tiAutomaticUpdates TI Automatic mode status of the IoT sensor. - * @return the next definition stage. - */ - WithCreate withTiAutomaticUpdates(Boolean tiAutomaticUpdates); - } - /** The stage of the IotSensorsModel definition allowing to specify zone. */ - interface WithZone { - /** - * Specifies the zone property: Zone of the IoT sensor. - * - * @param zone Zone of the IoT sensor. - * @return the next definition stage. - */ - WithCreate withZone(String zone); - } - /** The stage of the IotSensorsModel definition allowing to specify sensorType. */ - interface WithSensorType { - /** - * Specifies the sensorType property: Type of sensor. - * - * @param sensorType Type of sensor. - * @return the next definition stage. - */ - WithCreate withSensorType(SensorType sensorType); - } - } - /** - * Begins update for the IotSensorsModel resource. - * - * @return the stage of resource update. - */ - IotSensorsModel.Update update(); - - /** The template for IotSensorsModel update. */ - interface Update extends UpdateStages.WithTiAutomaticUpdates, UpdateStages.WithZone, UpdateStages.WithSensorType { - /** - * Executes the update request. - * - * @return the updated resource. - */ - IotSensorsModel apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - IotSensorsModel apply(Context context); - } - /** The IotSensorsModel update stages. */ - interface UpdateStages { - /** The stage of the IotSensorsModel update allowing to specify tiAutomaticUpdates. */ - interface WithTiAutomaticUpdates { - /** - * Specifies the tiAutomaticUpdates property: TI Automatic mode status of the IoT sensor. - * - * @param tiAutomaticUpdates TI Automatic mode status of the IoT sensor. - * @return the next definition stage. - */ - Update withTiAutomaticUpdates(Boolean tiAutomaticUpdates); - } - /** The stage of the IotSensorsModel update allowing to specify zone. */ - interface WithZone { - /** - * Specifies the zone property: Zone of the IoT sensor. - * - * @param zone Zone of the IoT sensor. - * @return the next definition stage. - */ - Update withZone(String zone); - } - /** The stage of the IotSensorsModel update allowing to specify sensorType. */ - interface WithSensorType { - /** - * Specifies the sensorType property: Type of sensor. - * - * @param sensorType Type of sensor. - * @return the next definition stage. - */ - Update withSensorType(SensorType sensorType); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - IotSensorsModel refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - IotSensorsModel refresh(Context context); - - /** - * Download sensor activation file. - * - * @throws com.azure.core.management.exception.ManagementException 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. - */ - InputStream downloadActivation(); - - /** - * Download sensor activation file. - * - * @param context The context to associate with this 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. - */ - StreamResponse downloadActivationWithResponse(Context context); - - /** - * Download file for reset password of the sensor. - * - * @param body The reset password input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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. - */ - InputStream downloadResetPassword(ResetPasswordInput body); - - /** - * Download file for reset password of the sensor. - * - * @param body The reset password input. - * @param context The context to associate with this 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. - */ - StreamResponse downloadResetPasswordWithResponse(ResetPasswordInput body, Context context); - - /** - * Trigger threat intelligence package update. - * - * @throws com.azure.core.management.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 triggerTiPackageUpdate(); - - /** - * Trigger threat intelligence package update. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - Response triggerTiPackageUpdateWithResponse(Context context); -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotSites.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotSites.java deleted file mode 100644 index e2328a0f13a4d..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotSites.java +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.security.fluent.models.IotSitesModelInner; - -/** Resource collection API of IotSites. */ -public interface IotSites { - /** - * List IoT sites. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT sites. - */ - IotSitesList list(String scope); - - /** - * List IoT sites. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IoT sites. - */ - Response listWithResponse(String scope, Context context); - - /** - * Get IoT site. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT site. - */ - IotSitesModel get(String scope); - - /** - * Get IoT site. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param context The context to associate with this 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 ioT site. - */ - Response getWithResponse(String scope, Context context); - - /** - * Create or update IoT site. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSitesModel The IoT sites model. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return ioT site model. - */ - IotSitesModel createOrUpdate(String scope, IotSitesModelInner iotSitesModel); - - /** - * Create or update IoT site. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param iotSitesModel The IoT sites model. - * @param context The context to associate with this 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 ioT site model. - */ - Response createOrUpdateWithResponse(String scope, IotSitesModelInner iotSitesModel, Context context); - - /** - * Delete IoT site. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 scope); - - /** - * Delete IoT site. - * - * @param scope Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub). - * @param context The context to associate with this 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. - */ - Response deleteWithResponse(String scope, Context context); -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotSitesList.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotSitesList.java deleted file mode 100644 index f21b8fa269034..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotSitesList.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.resourcemanager.security.fluent.models.IotSitesListInner; -import java.util.List; - -/** An immutable client-side representation of IotSitesList. */ -public interface IotSitesList { - /** - * Gets the value property: List data. - * - * @return the value value. - */ - List value(); - - /** - * Gets the inner com.azure.resourcemanager.security.fluent.models.IotSitesListInner object. - * - * @return the inner object. - */ - IotSitesListInner innerModel(); -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotSitesModel.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotSitesModel.java deleted file mode 100644 index 395e7a66b7479..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IotSitesModel.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.resourcemanager.security.fluent.models.IotSitesModelInner; -import java.util.Map; - -/** An immutable client-side representation of IotSitesModel. */ -public interface IotSitesModel { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the displayName property: Display name of the IoT site. - * - * @return the displayName value. - */ - String displayName(); - - /** - * Gets the tags property: Tags of the IoT site. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the inner com.azure.resourcemanager.security.fluent.models.IotSitesModelInner object. - * - * @return the inner object. - */ - IotSitesModelInner innerModel(); -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IpAddress.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IpAddress.java deleted file mode 100644 index c784e22160186..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IpAddress.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** IP Address information. */ -@Immutable -public final class IpAddress { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IpAddress.class); - - /* - * IPV4 address - */ - @JsonProperty(value = "v4Address", access = JsonProperty.Access.WRITE_ONLY) - private String v4Address; - - /* - * Detection time of the ip address. - */ - @JsonProperty(value = "detectionTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime detectionTime; - - /* - * Subnet Classless Inter-Domain Routing - */ - @JsonProperty(value = "subnetCidr", access = JsonProperty.Access.WRITE_ONLY) - private String subnetCidr; - - /* - * Fully qualified domain name - */ - @JsonProperty(value = "fqdn", access = JsonProperty.Access.WRITE_ONLY) - private String fqdn; - - /* - * FQDN last lookup time. - */ - @JsonProperty(value = "fqdnLastLookupTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime fqdnLastLookupTime; - - /** - * Get the v4Address property: IPV4 address. - * - * @return the v4Address value. - */ - public String v4Address() { - return this.v4Address; - } - - /** - * Get the detectionTime property: Detection time of the ip address. - * - * @return the detectionTime value. - */ - public OffsetDateTime detectionTime() { - return this.detectionTime; - } - - /** - * Get the subnetCidr property: Subnet Classless Inter-Domain Routing. - * - * @return the subnetCidr value. - */ - public String subnetCidr() { - return this.subnetCidr; - } - - /** - * Get the fqdn property: Fully qualified domain name. - * - * @return the fqdn value. - */ - public String fqdn() { - return this.fqdn; - } - - /** - * Get the fqdnLastLookupTime property: FQDN last lookup time. - * - * @return the fqdnLastLookupTime value. - */ - public OffsetDateTime fqdnLastLookupTime() { - return this.fqdnLastLookupTime; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/JitNetworkAccessPortRule.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/JitNetworkAccessPortRule.java index 37ef46d6e1e96..9b43e6ac7a280 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/JitNetworkAccessPortRule.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/JitNetworkAccessPortRule.java @@ -25,7 +25,7 @@ public final class JitNetworkAccessPortRule { * The protocol property. */ @JsonProperty(value = "protocol", required = true) - private ProtocolValue protocol; + private Protocol protocol; /* * Mutually exclusive with the "allowedSourceAddressPrefixes" parameter. @@ -73,7 +73,7 @@ public JitNetworkAccessPortRule withNumber(int number) { * * @return the protocol value. */ - public ProtocolValue protocol() { + public Protocol protocol() { return this.protocol; } @@ -83,7 +83,7 @@ public ProtocolValue protocol() { * @param protocol the protocol value to set. * @return the JitNetworkAccessPortRule object itself. */ - public JitNetworkAccessPortRule withProtocol(ProtocolValue protocol) { + public JitNetworkAccessPortRule withProtocol(Protocol protocol) { this.protocol = protocol; return this; } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/MacAddress.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/MacAddress.java deleted file mode 100644 index 037adcaea6028..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/MacAddress.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.security.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** MAC Address information. */ -@Immutable -public final class MacAddress { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MacAddress.class); - - /* - * MAC address - */ - @JsonProperty(value = "address", access = JsonProperty.Access.WRITE_ONLY) - private String address; - - /* - * Detection time of the mac address. - */ - @JsonProperty(value = "detectionTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime detectionTime; - - /* - * Indicates whether this is the primary secondary MAC address of the - * device - */ - @JsonProperty(value = "significance", access = JsonProperty.Access.WRITE_ONLY) - private MacSignificance significance; - - /* - * Indicates whether the relation of the mac to the ip address is certain - * or a guess - */ - @JsonProperty(value = "relationToIpStatus", access = JsonProperty.Access.WRITE_ONLY) - private RelationToIpStatus relationToIpStatus; - - /** - * Get the address property: MAC address. - * - * @return the address value. - */ - public String address() { - return this.address; - } - - /** - * Get the detectionTime property: Detection time of the mac address. - * - * @return the detectionTime value. - */ - public OffsetDateTime detectionTime() { - return this.detectionTime; - } - - /** - * Get the significance property: Indicates whether this is the primary secondary MAC address of the device. - * - * @return the significance value. - */ - public MacSignificance significance() { - return this.significance; - } - - /** - * Get the relationToIpStatus property: Indicates whether the relation of the mac to the ip address is certain or a - * guess. - * - * @return the relationToIpStatus value. - */ - public RelationToIpStatus relationToIpStatus() { - return this.relationToIpStatus; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/MacSignificance.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/MacSignificance.java deleted file mode 100644 index 9c3aebd6eb0a6..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/MacSignificance.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for MacSignificance. */ -public final class MacSignificance extends ExpandableStringEnum { - /** Static value Primary for MacSignificance. */ - public static final MacSignificance PRIMARY = fromString("Primary"); - - /** Static value Secondary for MacSignificance. */ - public static final MacSignificance SECONDARY = fromString("Secondary"); - - /** - * Creates or finds a MacSignificance from its string representation. - * - * @param name a name to look for. - * @return the corresponding MacSignificance. - */ - @JsonCreator - public static MacSignificance fromString(String name) { - return fromString(name, MacSignificance.class); - } - - /** @return known MacSignificance values. */ - public static Collection values() { - return values(MacSignificance.class); - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ManagementState.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ManagementState.java deleted file mode 100644 index eb5b3508b35e3..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ManagementState.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ManagementState. */ -public final class ManagementState extends ExpandableStringEnum { - /** Static value Managed for ManagementState. */ - public static final ManagementState MANAGED = fromString("Managed"); - - /** Static value Unmanaged for ManagementState. */ - public static final ManagementState UNMANAGED = fromString("Unmanaged"); - - /** - * Creates or finds a ManagementState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ManagementState. - */ - @JsonCreator - public static ManagementState fromString(String name) { - return fromString(name, ManagementState.class); - } - - /** @return known ManagementState values. */ - public static Collection values() { - return values(ManagementState.class); - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/NetworkInterface.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/NetworkInterface.java deleted file mode 100644 index 6670a53f57fe5..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/NetworkInterface.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Network interface. */ -@Fluent -public final class NetworkInterface { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NetworkInterface.class); - - /* - * IP Address information - */ - @JsonProperty(value = "ipAddress") - private IpAddress ipAddress; - - /* - * MAC Address information - */ - @JsonProperty(value = "macAddress") - private MacAddress macAddress; - - /* - * List of device vlans. - */ - @JsonProperty(value = "vlans", access = JsonProperty.Access.WRITE_ONLY) - private List vlans; - - /** - * Get the ipAddress property: IP Address information. - * - * @return the ipAddress value. - */ - public IpAddress ipAddress() { - return this.ipAddress; - } - - /** - * Set the ipAddress property: IP Address information. - * - * @param ipAddress the ipAddress value to set. - * @return the NetworkInterface object itself. - */ - public NetworkInterface withIpAddress(IpAddress ipAddress) { - this.ipAddress = ipAddress; - return this; - } - - /** - * Get the macAddress property: MAC Address information. - * - * @return the macAddress value. - */ - public MacAddress macAddress() { - return this.macAddress; - } - - /** - * Set the macAddress property: MAC Address information. - * - * @param macAddress the macAddress value to set. - * @return the NetworkInterface object itself. - */ - public NetworkInterface withMacAddress(MacAddress macAddress) { - this.macAddress = macAddress; - return this; - } - - /** - * Get the vlans property: List of device vlans. - * - * @return the vlans value. - */ - public List vlans() { - return this.vlans; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (ipAddress() != null) { - ipAddress().validate(); - } - if (macAddress() != null) { - macAddress().validate(); - } - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/OnPremiseIotSensor.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/OnPremiseIotSensor.java deleted file mode 100644 index 235c298fe0ee0..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/OnPremiseIotSensor.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.resourcemanager.security.fluent.models.OnPremiseIotSensorInner; - -/** An immutable client-side representation of OnPremiseIotSensor. */ -public interface OnPremiseIotSensor { - /** - * 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: On-premise IoT sensor properties. - * - * @return the properties value. - */ - Object properties(); - - /** - * Gets the inner com.azure.resourcemanager.security.fluent.models.OnPremiseIotSensorInner object. - * - * @return the inner object. - */ - OnPremiseIotSensorInner innerModel(); -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/OnPremiseIotSensors.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/OnPremiseIotSensors.java deleted file mode 100644 index faa8fa3c2ee1c..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/OnPremiseIotSensors.java +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.StreamResponse; -import com.azure.core.util.Context; -import java.io.InputStream; - -/** Resource collection API of OnPremiseIotSensors. */ -public interface OnPremiseIotSensors { - /** - * List on-premise IoT sensors. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of on-premise IoT sensors. - */ - OnPremiseIotSensorsList list(); - - /** - * List on-premise IoT sensors. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of on-premise IoT sensors. - */ - Response listWithResponse(Context context); - - /** - * Get on-premise IoT sensor. - * - * @param onPremiseIotSensorName Name of the on-premise IoT sensor. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return on-premise IoT sensor. - */ - OnPremiseIotSensor get(String onPremiseIotSensorName); - - /** - * Get on-premise IoT sensor. - * - * @param onPremiseIotSensorName Name of the on-premise IoT sensor. - * @param context The context to associate with this 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 on-premise IoT sensor. - */ - Response getWithResponse(String onPremiseIotSensorName, Context context); - - /** - * Create or update on-premise IoT sensor. - * - * @param onPremiseIotSensorName Name of the on-premise IoT sensor. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return on-premise IoT sensor. - */ - OnPremiseIotSensor createOrUpdate(String onPremiseIotSensorName); - - /** - * Create or update on-premise IoT sensor. - * - * @param onPremiseIotSensorName Name of the on-premise IoT sensor. - * @param context The context to associate with this 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 on-premise IoT sensor. - */ - Response createOrUpdateWithResponse(String onPremiseIotSensorName, Context context); - - /** - * Delete on-premise IoT sensor. - * - * @param onPremiseIotSensorName Name of the on-premise IoT sensor. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 onPremiseIotSensorName); - - /** - * Delete on-premise IoT sensor. - * - * @param onPremiseIotSensorName Name of the on-premise IoT sensor. - * @param context The context to associate with this 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. - */ - Response deleteWithResponse(String onPremiseIotSensorName, Context context); - - /** - * Download sensor activation file. - * - * @param onPremiseIotSensorName Name of the on-premise IoT sensor. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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. - */ - InputStream downloadActivation(String onPremiseIotSensorName); - - /** - * Download sensor activation file. - * - * @param onPremiseIotSensorName Name of the on-premise IoT sensor. - * @param context The context to associate with this 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. - */ - StreamResponse downloadActivationWithResponse(String onPremiseIotSensorName, Context context); - - /** - * Download file for reset password of the sensor. - * - * @param onPremiseIotSensorName Name of the on-premise IoT sensor. - * @param body Input for reset password. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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. - */ - InputStream downloadResetPassword(String onPremiseIotSensorName, ResetPasswordInput body); - - /** - * Download file for reset password of the sensor. - * - * @param onPremiseIotSensorName Name of the on-premise IoT sensor. - * @param body Input for reset password. - * @param context The context to associate with this 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. - */ - StreamResponse downloadResetPasswordWithResponse( - String onPremiseIotSensorName, ResetPasswordInput body, Context context); -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/OnPremiseIotSensorsList.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/OnPremiseIotSensorsList.java deleted file mode 100644 index 4df50b2a05211..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/OnPremiseIotSensorsList.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.resourcemanager.security.fluent.models.OnPremiseIotSensorsListInner; -import java.util.List; - -/** An immutable client-side representation of OnPremiseIotSensorsList. */ -public interface OnPremiseIotSensorsList { - /** - * Gets the value property: List data. - * - * @return the value value. - */ - List value(); - - /** - * Gets the inner com.azure.resourcemanager.security.fluent.models.OnPremiseIotSensorsListInner object. - * - * @return the inner object. - */ - OnPremiseIotSensorsListInner innerModel(); -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/OnboardingKind.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/OnboardingKind.java deleted file mode 100644 index c055259f0cf19..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/OnboardingKind.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for OnboardingKind. */ -public final class OnboardingKind extends ExpandableStringEnum { - /** Static value Default for OnboardingKind. */ - public static final OnboardingKind DEFAULT = fromString("Default"); - - /** Static value MigratedToAzure for OnboardingKind. */ - public static final OnboardingKind MIGRATED_TO_AZURE = fromString("MigratedToAzure"); - - /** Static value Evaluation for OnboardingKind. */ - public static final OnboardingKind EVALUATION = fromString("Evaluation"); - - /** Static value Purchased for OnboardingKind. */ - public static final OnboardingKind PURCHASED = fromString("Purchased"); - - /** - * Creates or finds a OnboardingKind from its string representation. - * - * @param name a name to look for. - * @return the corresponding OnboardingKind. - */ - @JsonCreator - public static OnboardingKind fromString(String name) { - return fromString(name, OnboardingKind.class); - } - - /** @return known OnboardingKind values. */ - public static Collection values() { - return values(OnboardingKind.class); - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/PackageDownloadInfo.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/PackageDownloadInfo.java deleted file mode 100644 index ea84ae157a646..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/PackageDownloadInfo.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Information on a specific package download. */ -@Immutable -public class PackageDownloadInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PackageDownloadInfo.class); - - /* - * Version number - */ - @JsonProperty(value = "version", access = JsonProperty.Access.WRITE_ONLY) - private String version; - - /* - * Download link - */ - @JsonProperty(value = "link", access = JsonProperty.Access.WRITE_ONLY) - private String link; - - /* - * Kind of the version - */ - @JsonProperty(value = "versionKind", access = JsonProperty.Access.WRITE_ONLY) - private VersionKind versionKind; - - /** - * Get the version property: Version number. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Get the link property: Download link. - * - * @return the link value. - */ - public String link() { - return this.link; - } - - /** - * Get the versionKind property: Kind of the version. - * - * @return the versionKind value. - */ - public VersionKind versionKind() { - return this.versionKind; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/PackageDownloads.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/PackageDownloads.java deleted file mode 100644 index f74d259320724..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/PackageDownloads.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.resourcemanager.security.fluent.models.PackageDownloadsInner; -import java.util.List; - -/** An immutable client-side representation of PackageDownloads. */ -public interface PackageDownloads { - /** - * Gets the sensor property: Contains all Sensor binary downloads. - * - * @return the sensor value. - */ - PackageDownloadsSensor sensor(); - - /** - * Gets the centralManager property: All downloads for Central Manager. - * - * @return the centralManager value. - */ - PackageDownloadsCentralManager centralManager(); - - /** - * Gets the threatIntelligence property: All downloads for threat intelligence. - * - * @return the threatIntelligence value. - */ - List threatIntelligence(); - - /** - * Gets the snmp property: SNMP Server file. - * - * @return the snmp value. - */ - List snmp(); - - /** - * Gets the wmiTool property: Used for local configuration export. - * - * @return the wmiTool value. - */ - List wmiTool(); - - /** - * Gets the authorizedDevicesImportTemplate property: Authorized devices import template. - * - * @return the authorizedDevicesImportTemplate value. - */ - List authorizedDevicesImportTemplate(); - - /** - * Gets the deviceInformationUpdateImportTemplate property: Authorized devices import template. - * - * @return the deviceInformationUpdateImportTemplate value. - */ - List deviceInformationUpdateImportTemplate(); - - /** - * Gets the inner com.azure.resourcemanager.security.fluent.models.PackageDownloadsInner object. - * - * @return the inner object. - */ - PackageDownloadsInner innerModel(); -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/PackageDownloadsCentralManager.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/PackageDownloadsCentralManager.java deleted file mode 100644 index 0a86e9478fec6..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/PackageDownloadsCentralManager.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.security.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** All downloads for Central Manager. */ -@Immutable -public final class PackageDownloadsCentralManager { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PackageDownloadsCentralManager.class); - - /* - * Contains full package downloads - */ - @JsonProperty(value = "full", access = JsonProperty.Access.WRITE_ONLY) - private PackageDownloadsCentralManagerFull full; - - /* - * Central Manager upgrade package downloads (on existing installations) - */ - @JsonProperty(value = "upgrade", access = JsonProperty.Access.WRITE_ONLY) - private List upgrade; - - /** - * Get the full property: Contains full package downloads. - * - * @return the full value. - */ - public PackageDownloadsCentralManagerFull full() { - return this.full; - } - - /** - * Get the upgrade property: Central Manager upgrade package downloads (on existing installations). - * - * @return the upgrade value. - */ - public List upgrade() { - return this.upgrade; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (full() != null) { - full().validate(); - } - if (upgrade() != null) { - upgrade().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/PackageDownloadsCentralManagerFull.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/PackageDownloadsCentralManagerFull.java deleted file mode 100644 index 523de3fdd59d0..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/PackageDownloadsCentralManagerFull.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.security.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Contains full package downloads. */ -@Immutable -public final class PackageDownloadsCentralManagerFull { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PackageDownloadsCentralManagerFull.class); - - /* - * Contains all ISO full versions of the Central Manager - */ - @JsonProperty(value = "iso", access = JsonProperty.Access.WRITE_ONLY) - private List iso; - - /* - * Contains all OVF (virtual machine) full versions of the Central Manager - */ - @JsonProperty(value = "ovf", access = JsonProperty.Access.WRITE_ONLY) - private PackageDownloadsCentralManagerFullOvf ovf; - - /** - * Get the iso property: Contains all ISO full versions of the Central Manager. - * - * @return the iso value. - */ - public List iso() { - return this.iso; - } - - /** - * Get the ovf property: Contains all OVF (virtual machine) full versions of the Central Manager. - * - * @return the ovf value. - */ - public PackageDownloadsCentralManagerFullOvf ovf() { - return this.ovf; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (iso() != null) { - iso().forEach(e -> e.validate()); - } - if (ovf() != null) { - ovf().validate(); - } - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/PackageDownloadsCentralManagerFullOvf.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/PackageDownloadsCentralManagerFullOvf.java deleted file mode 100644 index 662451d2b3867..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/PackageDownloadsCentralManagerFullOvf.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Contains all OVF (virtual machine) full versions of the Central Manager. */ -@Immutable -public final class PackageDownloadsCentralManagerFullOvf { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PackageDownloadsCentralManagerFullOvf.class); - - /* - * The Enterprise package type - */ - @JsonProperty(value = "enterprise", access = JsonProperty.Access.WRITE_ONLY) - private List enterprise; - - /* - * The EnterpriseHighAvailability package type - */ - @JsonProperty(value = "enterpriseHighAvailability", access = JsonProperty.Access.WRITE_ONLY) - private List enterpriseHighAvailability; - - /* - * The Medium package type - */ - @JsonProperty(value = "medium", access = JsonProperty.Access.WRITE_ONLY) - private List medium; - - /* - * The MediumHighAvailability package type - */ - @JsonProperty(value = "mediumHighAvailability", access = JsonProperty.Access.WRITE_ONLY) - private List mediumHighAvailability; - - /** - * Get the enterprise property: The Enterprise package type. - * - * @return the enterprise value. - */ - public List enterprise() { - return this.enterprise; - } - - /** - * Get the enterpriseHighAvailability property: The EnterpriseHighAvailability package type. - * - * @return the enterpriseHighAvailability value. - */ - public List enterpriseHighAvailability() { - return this.enterpriseHighAvailability; - } - - /** - * Get the medium property: The Medium package type. - * - * @return the medium value. - */ - public List medium() { - return this.medium; - } - - /** - * Get the mediumHighAvailability property: The MediumHighAvailability package type. - * - * @return the mediumHighAvailability value. - */ - public List mediumHighAvailability() { - return this.mediumHighAvailability; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (enterprise() != null) { - enterprise().forEach(e -> e.validate()); - } - if (enterpriseHighAvailability() != null) { - enterpriseHighAvailability().forEach(e -> e.validate()); - } - if (medium() != null) { - medium().forEach(e -> e.validate()); - } - if (mediumHighAvailability() != null) { - mediumHighAvailability().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/PackageDownloadsSensor.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/PackageDownloadsSensor.java deleted file mode 100644 index 4e02e43b72a0e..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/PackageDownloadsSensor.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Contains all Sensor binary downloads. */ -@Fluent -public final class PackageDownloadsSensor { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PackageDownloadsSensor.class); - - /* - * Contains full package downloads - */ - @JsonProperty(value = "full", access = JsonProperty.Access.WRITE_ONLY) - private PackageDownloadsSensorFull full; - - /* - * Sensor upgrade package downloads (on existing installations) - */ - @JsonProperty(value = "upgrade") - private List upgrade; - - /** - * Get the full property: Contains full package downloads. - * - * @return the full value. - */ - public PackageDownloadsSensorFull full() { - return this.full; - } - - /** - * Get the upgrade property: Sensor upgrade package downloads (on existing installations). - * - * @return the upgrade value. - */ - public List upgrade() { - return this.upgrade; - } - - /** - * Set the upgrade property: Sensor upgrade package downloads (on existing installations). - * - * @param upgrade the upgrade value to set. - * @return the PackageDownloadsSensor object itself. - */ - public PackageDownloadsSensor withUpgrade(List upgrade) { - this.upgrade = upgrade; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (full() != null) { - full().validate(); - } - if (upgrade() != null) { - upgrade().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/PackageDownloadsSensorFull.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/PackageDownloadsSensorFull.java deleted file mode 100644 index 3860b435ea80a..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/PackageDownloadsSensorFull.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Contains full package downloads. */ -@Fluent -public final class PackageDownloadsSensorFull { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PackageDownloadsSensorFull.class); - - /* - * Contains all ISO full versions for the sensor - */ - @JsonProperty(value = "iso", access = JsonProperty.Access.WRITE_ONLY) - private List iso; - - /* - * Contains all OVF (virtual machine) full versions for the sensor - */ - @JsonProperty(value = "ovf") - private PackageDownloadsSensorFullOvf ovf; - - /** - * Get the iso property: Contains all ISO full versions for the sensor. - * - * @return the iso value. - */ - public List iso() { - return this.iso; - } - - /** - * Get the ovf property: Contains all OVF (virtual machine) full versions for the sensor. - * - * @return the ovf value. - */ - public PackageDownloadsSensorFullOvf ovf() { - return this.ovf; - } - - /** - * Set the ovf property: Contains all OVF (virtual machine) full versions for the sensor. - * - * @param ovf the ovf value to set. - * @return the PackageDownloadsSensorFull object itself. - */ - public PackageDownloadsSensorFull withOvf(PackageDownloadsSensorFullOvf ovf) { - this.ovf = ovf; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (iso() != null) { - iso().forEach(e -> e.validate()); - } - if (ovf() != null) { - ovf().validate(); - } - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/PackageDownloadsSensorFullOvf.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/PackageDownloadsSensorFullOvf.java deleted file mode 100644 index a002194a8de95..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/PackageDownloadsSensorFullOvf.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Contains all OVF (virtual machine) full versions for the sensor. */ -@Immutable -public final class PackageDownloadsSensorFullOvf { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PackageDownloadsSensorFullOvf.class); - - /* - * Enterprise package type - */ - @JsonProperty(value = "enterprise", access = JsonProperty.Access.WRITE_ONLY) - private List enterprise; - - /* - * Medium package type - */ - @JsonProperty(value = "medium", access = JsonProperty.Access.WRITE_ONLY) - private List medium; - - /* - * Line package type - */ - @JsonProperty(value = "line", access = JsonProperty.Access.WRITE_ONLY) - private List line; - - /** - * Get the enterprise property: Enterprise package type. - * - * @return the enterprise value. - */ - public List enterprise() { - return this.enterprise; - } - - /** - * Get the medium property: Medium package type. - * - * @return the medium value. - */ - public List medium() { - return this.medium; - } - - /** - * Get the line property: Line package type. - * - * @return the line value. - */ - public List line() { - return this.line; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (enterprise() != null) { - enterprise().forEach(e -> e.validate()); - } - if (medium() != null) { - medium().forEach(e -> e.validate()); - } - if (line() != null) { - line().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ProgrammingState.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ProgrammingState.java deleted file mode 100644 index fac05da58c0cf..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ProgrammingState.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ProgrammingState. */ -public final class ProgrammingState extends ExpandableStringEnum { - /** Static value ProgrammingDevice for ProgrammingState. */ - public static final ProgrammingState PROGRAMMING_DEVICE = fromString("ProgrammingDevice"); - - /** Static value NotProgrammingDevice for ProgrammingState. */ - public static final ProgrammingState NOT_PROGRAMMING_DEVICE = fromString("NotProgrammingDevice"); - - /** - * Creates or finds a ProgrammingState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ProgrammingState. - */ - @JsonCreator - public static ProgrammingState fromString(String name) { - return fromString(name, ProgrammingState.class); - } - - /** @return known ProgrammingState values. */ - public static Collection values() { - return values(ProgrammingState.class); - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Protocol.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Protocol.java index 497e6a32c476b..73479667a1f8a 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Protocol.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Protocol.java @@ -4,62 +4,34 @@ package com.azure.resourcemanager.security.models; -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; -/** Protocol data. */ -@Fluent -public final class Protocol { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Protocol.class); +/** Defines values for Protocol. */ +public final class Protocol extends ExpandableStringEnum { + /** Static value TCP for Protocol. */ + public static final Protocol TCP = fromString("TCP"); - /* - * Protocol name - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /* - * list of protocol identifiers. - */ - @JsonProperty(value = "identifiers") - private String identifiers; + /** Static value UDP for Protocol. */ + public static final Protocol UDP = fromString("UDP"); - /** - * Get the name property: Protocol name. - * - * @return the name value. - */ - public String name() { - return this.name; - } + /** Static value * for Protocol. */ + public static final Protocol ASTERISK = fromString("*"); /** - * Get the identifiers property: list of protocol identifiers. + * Creates or finds a Protocol from its string representation. * - * @return the identifiers value. + * @param name a name to look for. + * @return the corresponding Protocol. */ - public String identifiers() { - return this.identifiers; + @JsonCreator + public static Protocol fromString(String name) { + return fromString(name, Protocol.class); } - /** - * Set the identifiers property: list of protocol identifiers. - * - * @param identifiers the identifiers value to set. - * @return the Protocol object itself. - */ - public Protocol withIdentifiers(String identifiers) { - this.identifiers = identifiers; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { + /** @return known Protocol values. */ + public static Collection values() { + return values(Protocol.class); } } diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ProtocolValue.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ProtocolValue.java deleted file mode 100644 index 2aa321e30d7fd..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ProtocolValue.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ProtocolValue. */ -public final class ProtocolValue extends ExpandableStringEnum { - /** Static value TCP for ProtocolValue. */ - public static final ProtocolValue TCP = fromString("TCP"); - - /** Static value UDP for ProtocolValue. */ - public static final ProtocolValue UDP = fromString("UDP"); - - /** Static value * for ProtocolValue. */ - public static final ProtocolValue ASTERISK = fromString("*"); - - /** - * Creates or finds a ProtocolValue from its string representation. - * - * @param name a name to look for. - * @return the corresponding ProtocolValue. - */ - @JsonCreator - public static ProtocolValue fromString(String name) { - return fromString(name, ProtocolValue.class); - } - - /** @return known ProtocolValue values. */ - public static Collection values() { - return values(ProtocolValue.class); - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/PurdueLevel.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/PurdueLevel.java deleted file mode 100644 index 5a076100d3a30..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/PurdueLevel.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for PurdueLevel. */ -public final class PurdueLevel extends ExpandableStringEnum { - /** Static value ProcessControl for PurdueLevel. */ - public static final PurdueLevel PROCESS_CONTROL = fromString("ProcessControl"); - - /** Static value Supervisory for PurdueLevel. */ - public static final PurdueLevel SUPERVISORY = fromString("Supervisory"); - - /** Static value Enterprise for PurdueLevel. */ - public static final PurdueLevel ENTERPRISE = fromString("Enterprise"); - - /** - * Creates or finds a PurdueLevel from its string representation. - * - * @param name a name to look for. - * @return the corresponding PurdueLevel. - */ - @JsonCreator - public static PurdueLevel fromString(String name) { - return fromString(name, PurdueLevel.class); - } - - /** @return known PurdueLevel values. */ - public static Collection values() { - return values(PurdueLevel.class); - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/RecommendationSeverity.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/RecommendationSeverity.java deleted file mode 100644 index fb8f347708037..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/RecommendationSeverity.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for RecommendationSeverity. */ -public final class RecommendationSeverity extends ExpandableStringEnum { - /** Static value Unknown for RecommendationSeverity. */ - public static final RecommendationSeverity UNKNOWN = fromString("Unknown"); - - /** Static value NotApplicable for RecommendationSeverity. */ - public static final RecommendationSeverity NOT_APPLICABLE = fromString("NotApplicable"); - - /** Static value Healthy for RecommendationSeverity. */ - public static final RecommendationSeverity HEALTHY = fromString("Healthy"); - - /** Static value OffByPolicy for RecommendationSeverity. */ - public static final RecommendationSeverity OFF_BY_POLICY = fromString("OffByPolicy"); - - /** Static value Low for RecommendationSeverity. */ - public static final RecommendationSeverity LOW = fromString("Low"); - - /** Static value Medium for RecommendationSeverity. */ - public static final RecommendationSeverity MEDIUM = fromString("Medium"); - - /** Static value High for RecommendationSeverity. */ - public static final RecommendationSeverity HIGH = fromString("High"); - - /** - * Creates or finds a RecommendationSeverity from its string representation. - * - * @param name a name to look for. - * @return the corresponding RecommendationSeverity. - */ - @JsonCreator - public static RecommendationSeverity fromString(String name) { - return fromString(name, RecommendationSeverity.class); - } - - /** @return known RecommendationSeverity values. */ - public static Collection values() { - return values(RecommendationSeverity.class); - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/RelationToIpStatus.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/RelationToIpStatus.java deleted file mode 100644 index 947a32eabacd1..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/RelationToIpStatus.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for RelationToIpStatus. */ -public final class RelationToIpStatus extends ExpandableStringEnum { - /** Static value Guess for RelationToIpStatus. */ - public static final RelationToIpStatus GUESS = fromString("Guess"); - - /** Static value Certain for RelationToIpStatus. */ - public static final RelationToIpStatus CERTAIN = fromString("Certain"); - - /** - * Creates or finds a RelationToIpStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding RelationToIpStatus. - */ - @JsonCreator - public static RelationToIpStatus fromString(String name) { - return fromString(name, RelationToIpStatus.class); - } - - /** @return known RelationToIpStatus values. */ - public static Collection values() { - return values(RelationToIpStatus.class); - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ResetPasswordInput.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ResetPasswordInput.java deleted file mode 100644 index f2cab92fffb67..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ResetPasswordInput.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Reset password input. */ -@Fluent -public final class ResetPasswordInput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResetPasswordInput.class); - - /* - * The appliance id of the sensor. - */ - @JsonProperty(value = "applianceId") - private String applianceId; - - /** - * Get the applianceId property: The appliance id of the sensor. - * - * @return the applianceId value. - */ - public String applianceId() { - return this.applianceId; - } - - /** - * Set the applianceId property: The appliance id of the sensor. - * - * @param applianceId the applianceId value to set. - * @return the ResetPasswordInput object itself. - */ - public ResetPasswordInput withApplianceId(String applianceId) { - this.applianceId = applianceId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/RulesResultsInput.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/RulesResultsInput.java index d147f9e7e6bb2..2781a213080ba 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/RulesResultsInput.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/RulesResultsInput.java @@ -7,6 +7,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Map; @@ -27,6 +28,7 @@ public final class RulesResultsInput { * Leave this field empty it LatestScan == true. */ @JsonProperty(value = "results") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map>> results; /** diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ScanningFunctionality.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ScanningFunctionality.java deleted file mode 100644 index ffbca2bb17501..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ScanningFunctionality.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ScanningFunctionality. */ -public final class ScanningFunctionality extends ExpandableStringEnum { - /** Static value ScannerDevice for ScanningFunctionality. */ - public static final ScanningFunctionality SCANNER_DEVICE = fromString("ScannerDevice"); - - /** Static value NotScannerDevice for ScanningFunctionality. */ - public static final ScanningFunctionality NOT_SCANNER_DEVICE = fromString("NotScannerDevice"); - - /** - * Creates or finds a ScanningFunctionality from its string representation. - * - * @param name a name to look for. - * @return the corresponding ScanningFunctionality. - */ - @JsonCreator - public static ScanningFunctionality fromString(String name) { - return fromString(name, ScanningFunctionality.class); - } - - /** @return known ScanningFunctionality values. */ - public static Collection values() { - return values(ScanningFunctionality.class); - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Sensor.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Sensor.java deleted file mode 100644 index 466b9593cf6a5..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Sensor.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Sensor data. */ -@Immutable -public final class Sensor { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Sensor.class); - - /* - * Sensor name - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /* - * Zone Name. - */ - @JsonProperty(value = "zone", access = JsonProperty.Access.WRITE_ONLY) - private String zone; - - /** - * Get the name property: Sensor name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the zone property: Zone Name. - * - * @return the zone value. - */ - public String zone() { - return this.zone; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/SensorStatus.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/SensorStatus.java deleted file mode 100644 index bfddff37d516d..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/SensorStatus.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for SensorStatus. */ -public final class SensorStatus extends ExpandableStringEnum { - /** Static value Ok for SensorStatus. */ - public static final SensorStatus OK = fromString("Ok"); - - /** Static value Disconnected for SensorStatus. */ - public static final SensorStatus DISCONNECTED = fromString("Disconnected"); - - /** Static value Unavailable for SensorStatus. */ - public static final SensorStatus UNAVAILABLE = fromString("Unavailable"); - - /** - * Creates or finds a SensorStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding SensorStatus. - */ - @JsonCreator - public static SensorStatus fromString(String name) { - return fromString(name, SensorStatus.class); - } - - /** @return known SensorStatus values. */ - public static Collection values() { - return values(SensorStatus.class); - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/SensorType.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/SensorType.java deleted file mode 100644 index b500d0c1bd7bd..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/SensorType.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for SensorType. */ -public final class SensorType extends ExpandableStringEnum { - /** Static value Ot for SensorType. */ - public static final SensorType OT = fromString("Ot"); - - /** Static value Enterprise for SensorType. */ - public static final SensorType ENTERPRISE = fromString("Enterprise"); - - /** - * Creates or finds a SensorType from its string representation. - * - * @param name a name to look for. - * @return the corresponding SensorType. - */ - @JsonCreator - public static SensorType fromString(String name) { - return fromString(name, SensorType.class); - } - - /** @return known SensorType values. */ - public static Collection values() { - return values(SensorType.class); - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ServerVulnerabilityProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ServerVulnerabilityProperties.java index 8ff2556b12839..d2d1eaf1ba990 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ServerVulnerabilityProperties.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ServerVulnerabilityProperties.java @@ -7,6 +7,7 @@ import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -32,6 +33,7 @@ public final class ServerVulnerabilityProperties extends AdditionalData { * Dictionary from cvss version to cvss details object */ @JsonProperty(value = "cvss", access = JsonProperty.Access.WRITE_ONLY) + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map cvss; /* diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/SettingsSettingName.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/SettingsSettingName.java index 4660a0cb49d9f..fa367d46a61a7 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/SettingsSettingName.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/SettingsSettingName.java @@ -16,6 +16,10 @@ public final class SettingsSettingName extends ExpandableStringEnum tags; /** diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/TagsResource.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/TagsResource.java index e9d9dedf0fe32..eabc7a645a52e 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/TagsResource.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/TagsResource.java @@ -7,6 +7,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -19,6 +20,7 @@ public class TagsResource { * Resource tags */ @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /** diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/TiStatus.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/TiStatus.java deleted file mode 100644 index 0d32231488780..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/TiStatus.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for TiStatus. */ -public final class TiStatus extends ExpandableStringEnum { - /** Static value Ok for TiStatus. */ - public static final TiStatus OK = fromString("Ok"); - - /** Static value Failed for TiStatus. */ - public static final TiStatus FAILED = fromString("Failed"); - - /** Static value InProgress for TiStatus. */ - public static final TiStatus IN_PROGRESS = fromString("InProgress"); - - /** Static value UpdateAvailable for TiStatus. */ - public static final TiStatus UPDATE_AVAILABLE = fromString("UpdateAvailable"); - - /** - * Creates or finds a TiStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding TiStatus. - */ - @JsonCreator - public static TiStatus fromString(String name) { - return fromString(name, TiStatus.class); - } - - /** @return known TiStatus values. */ - public static Collection values() { - return values(TiStatus.class); - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/TrackedResource.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/TrackedResource.java index 4d48619621c0d..25f7bb80f8131 100644 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/TrackedResource.java +++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/TrackedResource.java @@ -8,6 +8,7 @@ import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -39,6 +40,7 @@ public final class TrackedResource extends ProxyResource { * A list of key value pairs that describe the resource. */ @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /** diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/UpgradePackageDownloadInfo.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/UpgradePackageDownloadInfo.java deleted file mode 100644 index db2cd7bf0f18b..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/UpgradePackageDownloadInfo.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.security.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Information on a specific package upgrade download. */ -@Immutable -public final class UpgradePackageDownloadInfo extends PackageDownloadInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UpgradePackageDownloadInfo.class); - - /* - * Minimum base version for upgrade - */ - @JsonProperty(value = "fromVersion", access = JsonProperty.Access.WRITE_ONLY) - private String fromVersion; - - /** - * Get the fromVersion property: Minimum base version for upgrade. - * - * @return the fromVersion value. - */ - public String fromVersion() { - return this.fromVersion; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/VersionKind.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/VersionKind.java deleted file mode 100644 index d367dff7a6284..0000000000000 --- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/VersionKind.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.security.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for VersionKind. */ -public final class VersionKind extends ExpandableStringEnum { - /** Static value Latest for VersionKind. */ - public static final VersionKind LATEST = fromString("Latest"); - - /** Static value Previous for VersionKind. */ - public static final VersionKind PREVIOUS = fromString("Previous"); - - /** Static value Preview for VersionKind. */ - public static final VersionKind PREVIEW = fromString("Preview"); - - /** - * Creates or finds a VersionKind from its string representation. - * - * @param name a name to look for. - * @return the corresponding VersionKind. - */ - @JsonCreator - public static VersionKind fromString(String name) { - return fromString(name, VersionKind.class); - } - - /** @return known VersionKind values. */ - public static Collection values() { - return values(VersionKind.class); - } -}