From a276c51a5ed05cefb340e4bedcd63c7163a49971 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Mon, 18 Mar 2024 03:26:19 +0000 Subject: [PATCH 1/2] [Automation] External Change --- eng/versioning/version_client.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 9a13937e1fdb9..bf04bcfd15e6a 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -433,7 +433,7 @@ com.azure.resourcemanager:azure-resourcemanager-networkcloud;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-cosmosdbforpostgresql;1.0.0;1.1.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-managementgroups;1.0.0-beta.1;1.0.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-managednetworkfabric;1.0.0;1.1.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-iotfirmwaredefense;1.0.0-beta.1;1.0.0-beta.2 +com.azure.resourcemanager:azure-resourcemanager-iotfirmwaredefense;1.0.0-beta.1;1.0.0 com.azure.resourcemanager:azure-resourcemanager-quantum;1.0.0-beta.2;1.0.0-beta.3 com.azure.resourcemanager:azure-resourcemanager-sphere;1.0.0-beta.1;1.0.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-chaos;1.1.0;1.2.0-beta.1 From 8f23eb6be8b17a4508339cdbc04198d34191c847 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Mon, 18 Mar 2024 03:26:24 +0000 Subject: [PATCH 2/2] [Automation] Generate Fluent Lite from fist#package-2024-01-10 --- .../CHANGELOG.md | 236 +- .../README.md | 8 +- .../SAMPLE.md | 1107 ++--- .../pom.xml | 6 +- .../IoTFirmwareDefenseManager.java | 234 +- .../fluent/BinaryHardeningsClient.java | 47 + .../fluent/CryptoCertificatesClient.java | 47 + .../fluent/CryptoKeysClient.java | 47 + .../iotfirmwaredefense/fluent/CvesClient.java | 46 + .../fluent/FirmwaresClient.java | 477 +- .../iotfirmwaredefense/fluent/Fist.java | 67 - .../fluent/IoTFirmwareDefense.java | 118 + .../fluent/OperationsClient.java | 16 +- .../fluent/PasswordHashesClient.java | 47 + .../fluent/SbomComponentsClient.java | 47 + .../fluent/SummariesClient.java | 82 + .../fluent/WorkspacesClient.java | 52 +- .../models/BinaryHardeningFeatures.java | 89 +- .../models/BinaryHardeningResourceInner.java | 316 ++ ...gInner.java => BinaryHardeningResult.java} | 161 +- .../fluent/models/ComponentInner.java | 209 - ...icateInner.java => CryptoCertificate.java} | 204 +- .../CryptoCertificateResourceInner.java | 515 +++ .../{CryptoKeyInner.java => CryptoKey.java} | 87 +- .../fluent/models/CryptoKeyResourceInner.java | 235 + .../fluent/models/CveResourceInner.java | 284 ++ .../models/{CveInner.java => CveResult.java} | 203 +- .../fluent/models/CveSummaryInner.java | 180 - .../fluent/models/FirmwareInner.java | 53 +- .../fluent/models/FirmwareProperties.java | 54 +- .../fluent/models/FirmwareSummaryInner.java | 206 - .../fluent/models/OperationInner.java | 22 +- ...sswordHashInner.java => PasswordHash.java} | 70 +- .../models/PasswordHashResourceInner.java | 224 + .../fluent/models/SbomComponent.java | 159 + .../models/SbomComponentResourceInner.java | 179 + .../fluent/models/SummaryResourceInner.java | 64 + .../fluent/models/UrlTokenInner.java | 25 +- .../fluent/models/WorkspaceInner.java | 24 +- .../fluent/models/WorkspaceProperties.java | 12 +- .../fluent/models/package-info.java | 4 +- .../fluent/package-info.java | 4 +- ....java => BinaryHardeningResourceImpl.java} | 49 +- .../BinaryHardeningSummaryImpl.java | 53 - .../BinaryHardeningsClientImpl.java | 300 ++ .../implementation/BinaryHardeningsImpl.java | 49 + ...ava => CryptoCertificateResourceImpl.java} | 46 +- .../CryptoCertificateSummaryImpl.java | 57 - .../CryptoCertificatesClientImpl.java | 296 ++ .../CryptoCertificatesImpl.java | 49 + ...eyImpl.java => CryptoKeyResourceImpl.java} | 33 +- .../implementation/CryptoKeySummaryImpl.java | 49 - .../implementation/CryptoKeysClientImpl.java | 296 ++ .../implementation/CryptoKeysImpl.java | 49 + .../{CveImpl.java => CveResourceImpl.java} | 47 +- .../implementation/CveSummaryImpl.java | 53 - .../implementation/CvesClientImpl.java | 293 ++ .../implementation/CvesImpl.java | 49 + .../implementation/FirmwareImpl.java | 219 +- .../implementation/FirmwareSummaryImpl.java | 57 - .../implementation/FirmwaresClientImpl.java | 3860 ++--------------- .../implementation/FirmwaresImpl.java | 454 +- ...er.java => IoTFirmwareDefenseBuilder.java} | 82 +- ...tImpl.java => IoTFirmwareDefenseImpl.java} | 253 +- .../implementation/OperationImpl.java | 3 +- .../implementation/OperationsClientImpl.java | 176 +- .../implementation/OperationsImpl.java | 7 +- ...mpl.java => PasswordHashResourceImpl.java} | 30 +- .../PasswordHashesClientImpl.java | 296 ++ .../implementation/PasswordHashesImpl.java | 49 + .../{Utils.java => ResourceManagerUtils.java} | 45 +- ...pl.java => SbomComponentResourceImpl.java} | 44 +- .../SbomComponentsClientImpl.java | 296 ++ .../implementation/SbomComponentsImpl.java | 49 + .../implementation/SummariesClientImpl.java | 452 ++ .../implementation/SummariesImpl.java | 75 + .../implementation/SummaryResourceImpl.java | 50 + .../implementation/UrlTokenImpl.java | 7 +- .../implementation/WorkspaceImpl.java | 64 +- .../implementation/WorkspacesClientImpl.java | 813 ++-- .../implementation/WorkspacesImpl.java | 119 +- .../implementation/package-info.java | 4 +- .../iotfirmwaredefense/models/ActionType.java | 14 +- .../models/BinaryHardening.java | 94 - ...st.java => BinaryHardeningListResult.java} | 36 +- .../models/BinaryHardeningResource.java | 125 + .../models/BinaryHardeningSummary.java | 59 - .../BinaryHardeningSummaryResource.java} | 72 +- .../models/BinaryHardenings.java | 42 + .../iotfirmwaredefense/models/CanaryFlag.java | 47 - .../iotfirmwaredefense/models/Component.java | 68 - .../models/CryptoCertificateEntity.java | 30 +- .../models/CryptoCertificateListResult.java | 74 + ...te.java => CryptoCertificateResource.java} | 103 +- .../models/CryptoCertificateSummary.java | 67 - .../CryptoCertificateSummaryResource.java} | 80 +- .../models/CryptoCertificates.java | 42 + ...nentList.java => CryptoKeyListResult.java} | 40 +- ...{CryptoKey.java => CryptoKeyResource.java} | 65 +- .../models/CryptoKeySummary.java | 52 - .../CryptoKeySummaryResource.java} | 64 +- .../iotfirmwaredefense/models/CryptoKeys.java | 41 + .../iotfirmwaredefense/models/Cve.java | 104 - .../models/CveComponent.java | 106 + .../iotfirmwaredefense/models/CveLink.java | 30 +- .../{CveList.java => CveListResult.java} | 36 +- .../models/CveResource.java | 120 + .../iotfirmwaredefense/models/CveSummary.java | 157 +- .../iotfirmwaredefense/models/Cves.java | 41 + .../iotfirmwaredefense/models/Firmware.java | 473 +- .../models/FirmwareList.java | 16 +- .../models/FirmwareSummary.java | 206 +- .../models/FirmwareUpdateDefinition.java | 50 +- .../iotfirmwaredefense/models/Firmwares.java | 425 +- .../models/GenerateUploadUrlRequest.java | 14 +- .../iotfirmwaredefense/models/IsExpired.java | 47 - .../models/IsSelfSigned.java | 47 - .../models/IsShortKeySize.java | 47 - .../models/IsUpdateAvailable.java | 47 - .../models/IsWeakSignature.java | 47 - .../iotfirmwaredefense/models/NxFlag.java | 47 - .../iotfirmwaredefense/models/Operation.java | 16 +- .../models/OperationDisplay.java | 18 +- .../models/OperationListResult.java | 14 +- .../iotfirmwaredefense/models/Operations.java | 16 +- .../iotfirmwaredefense/models/Origin.java | 18 +- .../iotfirmwaredefense/models/PairedKey.java | 42 +- .../models/PasswordHashList.java | 70 - .../models/PasswordHashListResult.java | 74 + ...ordHash.java => PasswordHashResource.java} | 57 +- .../models/PasswordHashes.java | 42 + .../iotfirmwaredefense/models/PieFlag.java | 47 - .../models/ProvisioningState.java | 26 +- .../iotfirmwaredefense/models/RelroFlag.java | 47 - ...List.java => SbomComponentListResult.java} | 40 +- .../models/SbomComponentResource.java | 84 + .../models/SbomComponents.java | 42 + .../iotfirmwaredefense/models/Status.java | 30 +- .../models/StatusMessage.java | 80 + .../models/StrippedFlag.java | 47 - .../iotfirmwaredefense/models/Summaries.java | 72 + ...ficateList.java => SummaryListResult.java} | 40 +- .../models/SummaryName.java | 68 + .../models/SummaryResource.java | 55 + .../models/SummaryResourceProperties.java | 42 + .../models/SummaryType.java | 68 + .../iotfirmwaredefense/models/UrlToken.java | 15 +- .../iotfirmwaredefense/models/Workspace.java | 91 +- .../models/WorkspaceList.java | 16 +- .../models/WorkspaceUpdateDefinition.java | 14 +- .../iotfirmwaredefense/models/Workspaces.java | 42 +- .../models/package-info.java | 4 +- .../iotfirmwaredefense/package-info.java | 4 +- .../src/main/java/module-info.java | 10 +- .../proxy-config.json | 1 + .../reflect-config.json | 256 ++ .../BinaryHardeningListByFirmwareSamples.java | 40 + ...yptoCertificatesListByFirmwareSamples.java | 40 + .../CryptoKeysListByFirmwareSamples.java | 40 + .../generated/CvesListByFirmwareSamples.java | 40 + .../generated/FirmwareCreateSamples.java | 58 - .../generated/FirmwareDeleteSamples.java | 38 - ...GenerateBinaryHardeningDetailsSamples.java | 40 - ...GenerateBinaryHardeningSummarySamples.java | 40 - ...rmwareGenerateComponentDetailsSamples.java | 40 - ...nerateCryptoCertificateSummarySamples.java | 43 - ...rmwareGenerateCryptoKeySummarySamples.java | 43 - .../FirmwareGenerateCveSummarySamples.java | 40 - .../FirmwareGenerateDownloadUrlSamples.java | 40 - ...eGenerateFilesystemDownloadUrlSamples.java | 40 - .../FirmwareGenerateSummarySamples.java | 38 - .../generated/FirmwareGetSamples.java | 38 - ...istGenerateBinaryHardeningListSamples.java | 40 - ...mwareListGenerateComponentListSamples.java | 38 - ...tGenerateCryptoCertificateListSamples.java | 43 - ...mwareListGenerateCryptoKeyListSamples.java | 43 - .../FirmwareListGenerateCveListSamples.java | 38 - ...reListGeneratePasswordHashListSamples.java | 38 - .../generated/FirmwareUpdateSamples.java | 67 - .../generated/FirmwaresCreateSamples.java | 45 + .../generated/FirmwaresDeleteSamples.java | 40 + .../FirmwaresGenerateDownloadUrlSamples.java | 40 + ...sGenerateFilesystemDownloadUrlSamples.java | 40 + .../generated/FirmwaresGetSamples.java | 40 + ...a => FirmwaresListByWorkspaceSamples.java} | 24 +- .../generated/FirmwaresUpdateSamples.java | 49 + .../generated/OperationsListSamples.java | 22 +- .../PasswordHashesListByFirmwareSamples.java | 40 + .../SbomComponentsListByFirmwareSamples.java | 40 + .../generated/SummariesGetSamples.java | 42 + .../SummariesListByFirmwareSamples.java | 40 + .../generated/WorkspacesCreateSamples.java | 40 +- .../generated/WorkspacesDeleteSamples.java | 32 +- .../WorkspacesGenerateUploadUrlSamples.java | 29 +- .../WorkspacesGetByResourceGroupSamples.java | 22 +- .../WorkspacesListByResourceGroupSamples.java | 14 +- .../generated/WorkspacesListSamples.java | 14 +- .../generated/WorkspacesUpdateSamples.java | 36 +- .../BinaryHardeningFeaturesTests.java | 40 +- .../generated/BinaryHardeningInnerTests.java | 65 - .../BinaryHardeningListResultTests.java | 26 + .../generated/BinaryHardeningListTests.java | 28 - .../BinaryHardeningResourceInnerTests.java | 48 + .../generated/BinaryHardeningResultTests.java | 49 + .../BinaryHardeningSummaryInnerTests.java | 45 - .../BinaryHardeningSummaryResourceTests.java | 37 + ...naryHardeningsListByFirmwareMockTests.java | 67 + .../generated/ComponentInnerTests.java | 51 - .../generated/ComponentListTests.java | 28 - .../CryptoCertificateEntityTests.java | 38 +- .../generated/CveComponentTests.java | 31 + .../generated/CveInnerTests.java | 59 - .../generated/CveLinkTests.java | 13 +- .../generated/CveListResultTests.java | 26 + .../generated/CveListTests.java | 28 - .../generated/CveResourceInnerTests.java | 51 + .../generated/CveResultTests.java | 50 + .../generated/CveSummaryInnerTests.java | 45 - .../generated/CveSummaryTests.java | 35 + .../CvesListByFirmwareMockTests.java | 67 + .../generated/FirmwareInnerTests.java | 51 - .../generated/FirmwareListTests.java | 28 - .../generated/FirmwarePropertiesTests.java | 51 - .../generated/FirmwareSummaryInnerTests.java | 48 - .../generated/FirmwareSummaryTests.java | 41 + .../FirmwareUpdateDefinitionTests.java | 51 - .../FirmwaresCreateWithResponseMockTests.java | 87 - .../FirmwaresDeleteWithResponseMockTests.java | 38 +- ...HardeningDetailsWithResponseMockTests.java | 85 - ...HardeningSummaryWithResponseMockTests.java | 76 - ...ComponentDetailsWithResponseMockTests.java | 77 - ...nerateCveSummaryWithResponseMockTests.java | 76 - ...erateDownloadUrlWithResponseMockTests.java | 39 +- ...ystemDownloadUrlWithResponseMockTests.java | 39 +- ...sGenerateSummaryWithResponseMockTests.java | 76 - .../FirmwaresGetWithResponseMockTests.java | 77 - .../FirmwaresListByWorkspaceMockTests.java | 75 - ...tGenerateBinaryHardeningListMockTests.java | 85 - ...resListGenerateComponentListMockTests.java | 78 - ...FirmwaresListGenerateCveListMockTests.java | 79 - .../GenerateUploadUrlRequestTests.java | 10 +- .../generated/OperationDisplayTests.java | 8 +- .../generated/OperationInnerTests.java | 8 +- .../generated/OperationListResultTests.java | 8 +- .../generated/OperationsListMockTests.java | 34 +- .../generated/PairedKeyTests.java | 15 +- .../SbomComponentListResultTests.java | 26 + .../SbomComponentResourceInnerTests.java | 37 + .../generated/SbomComponentTests.java | 36 + ...SbomComponentsListByFirmwareMockTests.java | 61 + .../SummariesGetWithResponseMockTests.java | 55 + .../SummariesListByFirmwareMockTests.java | 55 + .../generated/SummaryListResultTests.java | 26 + .../generated/SummaryResourceInnerTests.java | 23 + .../SummaryResourcePropertiesTests.java | 22 + .../generated/UrlTokenInnerTests.java | 3 +- .../generated/WorkspaceInnerTests.java | 21 +- .../generated/WorkspaceListTests.java | 14 +- .../generated/WorkspacePropertiesTests.java | 4 +- .../WorkspaceUpdateDefinitionTests.java | 6 +- ...WorkspacesCreateWithResponseMockTests.java | 49 +- ...eByResourceGroupWithResponseMockTests.java | 37 +- ...enerateUploadUrlWithResponseMockTests.java | 45 +- ...tByResourceGroupWithResponseMockTests.java | 44 +- ...orkspacesListByResourceGroupMockTests.java | 41 +- .../generated/WorkspacesListMockTests.java | 37 +- 266 files changed, 12109 insertions(+), 12836 deletions(-) create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/BinaryHardeningsClient.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/CryptoCertificatesClient.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/CryptoKeysClient.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/CvesClient.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/Fist.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/IoTFirmwareDefense.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/PasswordHashesClient.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/SbomComponentsClient.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/SummariesClient.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/BinaryHardeningResourceInner.java rename sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/{BinaryHardeningInner.java => BinaryHardeningResult.java} (65%) delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/ComponentInner.java rename sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/{CryptoCertificateInner.java => CryptoCertificate.java} (73%) create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/CryptoCertificateResourceInner.java rename sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/{CryptoKeyInner.java => CryptoKey.java} (75%) create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/CryptoKeyResourceInner.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/CveResourceInner.java rename sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/{CveInner.java => CveResult.java} (54%) delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/CveSummaryInner.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/FirmwareSummaryInner.java rename sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/{PasswordHashInner.java => PasswordHash.java} (78%) create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/PasswordHashResourceInner.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/SbomComponent.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/SbomComponentResourceInner.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/SummaryResourceInner.java rename sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/{BinaryHardeningImpl.java => BinaryHardeningResourceImpl.java} (63%) delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/BinaryHardeningSummaryImpl.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/BinaryHardeningsClientImpl.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/BinaryHardeningsImpl.java rename sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/{CryptoCertificateImpl.java => CryptoCertificateResourceImpl.java} (77%) delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CryptoCertificateSummaryImpl.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CryptoCertificatesClientImpl.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CryptoCertificatesImpl.java rename sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/{CryptoKeyImpl.java => CryptoKeyResourceImpl.java} (74%) delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CryptoKeySummaryImpl.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CryptoKeysClientImpl.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CryptoKeysImpl.java rename sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/{CveImpl.java => CveResourceImpl.java} (67%) delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CveSummaryImpl.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CvesClientImpl.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CvesImpl.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/FirmwareSummaryImpl.java rename sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/{FistBuilder.java => IoTFirmwareDefenseBuilder.java} (56%) rename sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/{FistImpl.java => IoTFirmwareDefenseImpl.java} (60%) rename sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/{PasswordHashImpl.java => PasswordHashResourceImpl.java} (68%) create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/PasswordHashesClientImpl.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/PasswordHashesImpl.java rename sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/{Utils.java => ResourceManagerUtils.java} (80%) rename sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/{ComponentImpl.java => SbomComponentResourceImpl.java} (62%) create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/SbomComponentsClientImpl.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/SbomComponentsImpl.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/SummariesClientImpl.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/SummariesImpl.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/SummaryResourceImpl.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/BinaryHardening.java rename sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/{BinaryHardeningList.java => BinaryHardeningListResult.java} (70%) create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/BinaryHardeningResource.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/BinaryHardeningSummary.java rename sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/{fluent/models/BinaryHardeningSummaryInner.java => models/BinaryHardeningSummaryResource.java} (67%) create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/BinaryHardenings.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CanaryFlag.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Component.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoCertificateListResult.java rename sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/{CryptoCertificate.java => CryptoCertificateResource.java} (69%) delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoCertificateSummary.java rename sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/{fluent/models/CryptoCertificateSummaryInner.java => models/CryptoCertificateSummaryResource.java} (72%) create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoCertificates.java rename sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/{ComponentList.java => CryptoKeyListResult.java} (67%) rename sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/{CryptoKey.java => CryptoKeyResource.java} (56%) delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoKeySummary.java rename sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/{fluent/models/CryptoKeySummaryInner.java => models/CryptoKeySummaryResource.java} (72%) create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoKeys.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Cve.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CveComponent.java rename sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/{CveList.java => CveListResult.java} (73%) create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CveResource.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Cves.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/IsExpired.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/IsSelfSigned.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/IsShortKeySize.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/IsUpdateAvailable.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/IsWeakSignature.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/NxFlag.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/PasswordHashList.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/PasswordHashListResult.java rename sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/{PasswordHash.java => PasswordHashResource.java} (58%) create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/PasswordHashes.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/PieFlag.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/RelroFlag.java rename sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/{CryptoKeyList.java => SbomComponentListResult.java} (66%) create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/SbomComponentResource.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/SbomComponents.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/StatusMessage.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/StrippedFlag.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Summaries.java rename sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/{CryptoCertificateList.java => SummaryListResult.java} (68%) create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/SummaryName.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/SummaryResource.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/SummaryResourceProperties.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/SummaryType.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-iotfirmwaredefense/proxy-config.json create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-iotfirmwaredefense/reflect-config.json create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/BinaryHardeningListByFirmwareSamples.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CryptoCertificatesListByFirmwareSamples.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CryptoKeysListByFirmwareSamples.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CvesListByFirmwareSamples.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareCreateSamples.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareDeleteSamples.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareGenerateBinaryHardeningDetailsSamples.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareGenerateBinaryHardeningSummarySamples.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareGenerateComponentDetailsSamples.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareGenerateCryptoCertificateSummarySamples.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareGenerateCryptoKeySummarySamples.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareGenerateCveSummarySamples.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareGenerateDownloadUrlSamples.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareGenerateFilesystemDownloadUrlSamples.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareGenerateSummarySamples.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareGetSamples.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareListGenerateBinaryHardeningListSamples.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareListGenerateComponentListSamples.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareListGenerateCryptoCertificateListSamples.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareListGenerateCryptoKeyListSamples.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareListGenerateCveListSamples.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareListGeneratePasswordHashListSamples.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareUpdateSamples.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresCreateSamples.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresDeleteSamples.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresGenerateDownloadUrlSamples.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresGenerateFilesystemDownloadUrlSamples.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresGetSamples.java rename sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/{FirmwareListByWorkspaceSamples.java => FirmwaresListByWorkspaceSamples.java} (62%) create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresUpdateSamples.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/PasswordHashesListByFirmwareSamples.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SbomComponentsListByFirmwareSamples.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SummariesGetSamples.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SummariesListByFirmwareSamples.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/BinaryHardeningInnerTests.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/BinaryHardeningListResultTests.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/BinaryHardeningListTests.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/BinaryHardeningResourceInnerTests.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/BinaryHardeningResultTests.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/BinaryHardeningSummaryInnerTests.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/BinaryHardeningSummaryResourceTests.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/BinaryHardeningsListByFirmwareMockTests.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/ComponentInnerTests.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/ComponentListTests.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CveComponentTests.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CveInnerTests.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CveListResultTests.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CveListTests.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CveResourceInnerTests.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CveResultTests.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CveSummaryInnerTests.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CveSummaryTests.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CvesListByFirmwareMockTests.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareInnerTests.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareListTests.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwarePropertiesTests.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareSummaryInnerTests.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareSummaryTests.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareUpdateDefinitionTests.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresCreateWithResponseMockTests.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresGenerateBinaryHardeningDetailsWithResponseMockTests.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresGenerateBinaryHardeningSummaryWithResponseMockTests.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresGenerateComponentDetailsWithResponseMockTests.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresGenerateCveSummaryWithResponseMockTests.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresGenerateSummaryWithResponseMockTests.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresGetWithResponseMockTests.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresListByWorkspaceMockTests.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresListGenerateBinaryHardeningListMockTests.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresListGenerateComponentListMockTests.java delete mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresListGenerateCveListMockTests.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SbomComponentListResultTests.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SbomComponentResourceInnerTests.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SbomComponentTests.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SbomComponentsListByFirmwareMockTests.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SummariesGetWithResponseMockTests.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SummariesListByFirmwareMockTests.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SummaryListResultTests.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SummaryResourceInnerTests.java create mode 100644 sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SummaryResourcePropertiesTests.java diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/CHANGELOG.md b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/CHANGELOG.md index 3af45b0c69953..589f2e141f6ee 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/CHANGELOG.md +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/CHANGELOG.md @@ -1,14 +1,242 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0 (2024-03-18) -### Features Added +- Azure Resource Manager IoT Firmware Defense client library for Java. This package contains Microsoft Azure SDK for IoT Firmware Defense Management SDK. Firmware & IoT Security REST API. Package tag package-2024-01-10. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Breaking Changes -### Bugs Fixed +* `models.Cve` was removed + +* `models.CryptoKeyList` was removed + +* `models.PasswordHashList` was removed + +* `models.NxFlag` was removed + +* `models.CveList` was removed + +* `models.CryptoKey` was removed + +* `models.CryptoCertificateList` was removed + +* `models.CryptoKeySummary` was removed + +* `models.BinaryHardeningSummary` was removed + +* `models.BinaryHardeningList` was removed + +* `models.CanaryFlag` was removed + +* `models.IsExpired` was removed + +* `models.IsUpdateAvailable` was removed + +* `models.CryptoCertificateSummary` was removed + +* `models.PasswordHash` was removed + +* `models.PieFlag` was removed + +* `models.StrippedFlag` was removed + +* `models.IsSelfSigned` was removed + +* `models.CryptoCertificate` was removed + +* `models.IsWeakSignature` was removed + +* `models.IsShortKeySize` was removed + +* `models.ComponentList` was removed + +* `models.RelroFlag` was removed + +* `models.Component` was removed + +* `models.BinaryHardening` was removed + +#### `models.PairedKey` was modified + +* `withAdditionalProperties(java.lang.Object)` was removed +* `additionalProperties()` was removed + +#### `models.UrlToken` was modified + +* `uploadUrl()` was removed + +#### `IoTFirmwareDefenseManager` was modified + +* `fluent.Fist serviceClient()` -> `fluent.IoTFirmwareDefense serviceClient()` + +#### `models.FirmwareSummary` was modified + +* `java.lang.Long extractedFileCount()` -> `java.lang.Long extractedFileCount()` +* `java.lang.Long fileSize()` -> `java.lang.Long fileSize()` +* `innerModel()` was removed +* `java.lang.Long componentCount()` -> `java.lang.Long componentCount()` +* `java.lang.Long rootFileSystems()` -> `java.lang.Long rootFileSystems()` +* `java.lang.Long analysisTimeSeconds()` -> `java.lang.Long analysisTimeSeconds()` +* `java.lang.Long binaryCount()` -> `java.lang.Long binaryCount()` +* `java.lang.Long extractedSize()` -> `java.lang.Long extractedSize()` + +#### `models.Firmwares` was modified + +* `generateCveSummary(java.lang.String,java.lang.String,java.lang.String)` was removed +* `listGenerateCveList(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `generateSummaryWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `listGenerateCryptoKeyList(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `listGeneratePasswordHashList(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `listGenerateCryptoCertificateList(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `listGenerateBinaryHardeningList(java.lang.String,java.lang.String,java.lang.String)` was removed +* `listGenerateCveList(java.lang.String,java.lang.String,java.lang.String)` was removed +* `listGenerateComponentList(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `generateBinaryHardeningDetails(java.lang.String,java.lang.String,java.lang.String)` was removed +* `generateCryptoKeySummary(java.lang.String,java.lang.String,java.lang.String)` was removed +* `generateBinaryHardeningDetailsWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `generateBinaryHardeningSummary(java.lang.String,java.lang.String,java.lang.String)` was removed +* `listGenerateCryptoKeyList(java.lang.String,java.lang.String,java.lang.String)` was removed +* `generateCryptoCertificateSummary(java.lang.String,java.lang.String,java.lang.String)` was removed +* `generateCveSummaryWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `listGenerateComponentList(java.lang.String,java.lang.String,java.lang.String)` was removed +* `generateComponentDetails(java.lang.String,java.lang.String,java.lang.String)` was removed +* `listGeneratePasswordHashList(java.lang.String,java.lang.String,java.lang.String)` was removed +* `listGenerateBinaryHardeningList(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `generateBinaryHardeningSummaryWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `generateComponentDetailsWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `generateCryptoKeySummaryWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `generateSummary(java.lang.String,java.lang.String,java.lang.String)` was removed +* `generateCryptoCertificateSummaryWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `listGenerateCryptoCertificateList(java.lang.String,java.lang.String,java.lang.String)` was removed + +#### `models.CveSummary` was modified + +* `java.lang.Long critical()` -> `java.lang.Long critical()` +* `java.lang.Long low()` -> `java.lang.Long low()` +* `java.lang.Long high()` -> `java.lang.Long high()` +* `undefined()` was removed +* `innerModel()` was removed +* `java.lang.Long unknown()` -> `java.lang.Long unknown()` +* `java.lang.Long medium()` -> `java.lang.Long medium()` + +#### `models.Firmware` was modified + +* `listGeneratePasswordHashList()` was removed +* `listGenerateCveList(com.azure.core.util.Context)` was removed +* `generateComponentDetailsWithResponse(com.azure.core.util.Context)` was removed +* `generateCryptoKeySummaryWithResponse(com.azure.core.util.Context)` was removed +* `listGenerateCveList()` was removed +* `generateCveSummary()` was removed +* `listGenerateComponentList()` was removed +* `generateComponentDetails()` was removed +* `generateBinaryHardeningDetails()` was removed +* `listGenerateComponentList(com.azure.core.util.Context)` was removed +* `listGenerateBinaryHardeningList(com.azure.core.util.Context)` was removed +* `listGenerateCryptoKeyList(com.azure.core.util.Context)` was removed +* `listGenerateBinaryHardeningList()` was removed +* `listGenerateCryptoCertificateList(com.azure.core.util.Context)` was removed +* `generateCryptoKeySummary()` was removed +* `generateBinaryHardeningSummary()` was removed +* `listGenerateCryptoKeyList()` was removed +* `generateSummaryWithResponse(com.azure.core.util.Context)` was removed +* `listGeneratePasswordHashList(com.azure.core.util.Context)` was removed +* `generateSummary()` was removed +* `generateCryptoCertificateSummary()` was removed +* `generateBinaryHardeningDetailsWithResponse(com.azure.core.util.Context)` was removed +* `generateCryptoCertificateSummaryWithResponse(com.azure.core.util.Context)` was removed +* `listGenerateCryptoCertificateList()` was removed +* `generateCveSummaryWithResponse(com.azure.core.util.Context)` was removed +* `generateBinaryHardeningSummaryWithResponse(com.azure.core.util.Context)` was removed + +### Features Added + +* `models.SbomComponentResource` was added + +* `models.CveResource` was added + +* `models.SbomComponentListResult` was added + +* `models.BinaryHardenings` was added + +* `models.CryptoCertificateSummaryResource` was added + +* `models.BinaryHardeningListResult` was added + +* `models.CryptoKeyListResult` was added + +* `models.SummaryListResult` was added + +* `models.BinaryHardeningSummaryResource` was added + +* `models.CveListResult` was added + +* `models.CryptoKeys` was added + +* `models.Summaries` was added + +* `models.SbomComponents` was added + +* `models.SummaryType` was added + +* `models.SummaryResource` was added + +* `models.StatusMessage` was added + +* `models.CveComponent` was added + +* `models.CryptoCertificateListResult` was added + +* `models.SummaryResourceProperties` was added + +* `models.CryptoCertificates` was added + +* `models.CryptoKeyResource` was added + +* `models.SummaryName` was added + +* `models.CryptoCertificateResource` was added + +* `models.CryptoKeySummaryResource` was added + +* `models.PasswordHashes` was added + +* `models.Cves` was added + +* `models.PasswordHashResource` was added + +* `models.PasswordHashListResult` was added + +* `models.BinaryHardeningResource` was added + +#### `IoTFirmwareDefenseManager` was modified + +* `passwordHashes()` was added +* `binaryHardenings()` was added +* `cryptoCertificates()` was added +* `sbomComponents()` was added +* `summaries()` was added +* `cves()` was added +* `cryptoKeys()` was added + +#### `models.FirmwareSummary` was modified + +* `withExtractedFileCount(java.lang.Long)` was added +* `withFileSize(java.lang.Long)` was added +* `withExtractedSize(java.lang.Long)` was added +* `withComponentCount(java.lang.Long)` was added +* `withBinaryCount(java.lang.Long)` was added +* `withAnalysisTimeSeconds(java.lang.Long)` was added +* `withRootFileSystems(java.lang.Long)` was added +* `validate()` was added + +#### `models.CveSummary` was modified -### Other Changes +* `withUnknown(java.lang.Long)` was added +* `withLow(java.lang.Long)` was added +* `withMedium(java.lang.Long)` was added +* `validate()` was added +* `withHigh(java.lang.Long)` was added +* `withCritical(java.lang.Long)` was added ## 1.0.0-beta.1 (2023-07-20) diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/README.md b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/README.md index c59231da6be3f..2444da68044d9 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/README.md +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/README.md @@ -2,7 +2,7 @@ Azure Resource Manager IoT Firmware Defense client library for Java. -This package contains Microsoft Azure SDK for IoT Firmware Defense Management SDK. The definitions and parameters in this swagger specification will be used to manage the IoT Firmware Defense resources. Package tag package-2023-02-08-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for IoT Firmware Defense Management SDK. Firmware & IoT Security REST API. Package tag package-2024-01-10. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-iotfirmwaredefense - 1.0.0-beta.1 + 1.0.0 ``` [//]: # ({x-version-update-end}) @@ -45,7 +45,7 @@ Azure Management Libraries require a `TokenCredential` implementation for authen ### Authentication -By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables. +By default, Microsoft Entra ID token authentication depends on correct configuration of the following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. - `AZURE_TENANT_ID` for Azure tenant ID. @@ -94,7 +94,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS [docs]: https://azure.github.io/azure-sdk-for-java/ -[jdk]: https://docs.microsoft.com/java/azure/jdk/ +[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/ [azure_subscription]: https://azure.microsoft.com/free/ [azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity [azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/SAMPLE.md b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/SAMPLE.md index 4ac2d3af1ba18..f061a9295800d 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/SAMPLE.md +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/SAMPLE.md @@ -1,890 +1,690 @@ # Code snippets and samples -## Firmware - -- [Create](#firmware_create) -- [Delete](#firmware_delete) -- [GenerateBinaryHardeningDetails](#firmware_generatebinaryhardeningdetails) -- [GenerateBinaryHardeningSummary](#firmware_generatebinaryhardeningsummary) -- [GenerateComponentDetails](#firmware_generatecomponentdetails) -- [GenerateCryptoCertificateSummary](#firmware_generatecryptocertificatesummary) -- [GenerateCryptoKeySummary](#firmware_generatecryptokeysummary) -- [GenerateCveSummary](#firmware_generatecvesummary) -- [GenerateDownloadUrl](#firmware_generatedownloadurl) -- [GenerateFilesystemDownloadUrl](#firmware_generatefilesystemdownloadurl) -- [GenerateSummary](#firmware_generatesummary) -- [Get](#firmware_get) -- [ListByWorkspace](#firmware_listbyworkspace) -- [ListGenerateBinaryHardeningList](#firmware_listgeneratebinaryhardeninglist) -- [ListGenerateComponentList](#firmware_listgeneratecomponentlist) -- [ListGenerateCryptoCertificateList](#firmware_listgeneratecryptocertificatelist) -- [ListGenerateCryptoKeyList](#firmware_listgeneratecryptokeylist) -- [ListGenerateCveList](#firmware_listgeneratecvelist) -- [ListGeneratePasswordHashList](#firmware_listgeneratepasswordhashlist) -- [Update](#firmware_update) +## BinaryHardening -## Operations +- [ListByFirmware](#binaryhardening_listbyfirmware) -- [List](#operations_list) +## CryptoCertificates -## Workspaces +- [ListByFirmware](#cryptocertificates_listbyfirmware) -- [Create](#workspaces_create) -- [Delete](#workspaces_delete) -- [GenerateUploadUrl](#workspaces_generateuploadurl) -- [GetByResourceGroup](#workspaces_getbyresourcegroup) -- [List](#workspaces_list) -- [ListByResourceGroup](#workspaces_listbyresourcegroup) -- [Update](#workspaces_update) -### Firmware_Create +## CryptoKeys -```java -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.iotfirmwaredefense.models.Status; -import java.io.IOException; -import java.util.Arrays; +- [ListByFirmware](#cryptokeys_listbyfirmware) -/** Samples for Firmware Create. */ -public final class FirmwareCreateSamples { - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_Create_MinimumSet_Gen.json - */ - /** - * Sample code: Firmware_Create_MinimumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareCreateMinimumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager.firmwares().define("umrkdttp").withExistingWorkspace("rgworkspaces-firmwares", "A7").create(); - } +## Cves - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_Create_MaximumSet_Gen.json - */ - /** - * Sample code: Firmware_Create_MaximumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareCreateMaximumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) throws IOException { - manager - .firmwares() - .define("umrkdttp") - .withExistingWorkspace("rgworkspaces-firmwares", "A7") - .withFileName("wresexxulcdsdd") - .withVendor("vycmdhgtmepcptyoubztiuudpkcpd") - .withModel("f") - .withVersion("s") - .withDescription("uz") - .withFileSize(17L) - .withStatus(Status.PENDING) - .withStatusMessages( - Arrays - .asList( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"message\":\"ulvhmhokezathzzauiitu\"}", Object.class, SerializerEncoding.JSON))) - .create(); - } -} -``` +- [ListByFirmware](#cves_listbyfirmware) -### Firmware_Delete +## Firmwares -```java -/** Samples for Firmware Delete. */ -public final class FirmwareDeleteSamples { - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_Delete_MinimumSet_Gen.json - */ - /** - * Sample code: Firmware_Delete_MinimumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareDeleteMinimumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .deleteWithResponse("rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_Delete_MaximumSet_Gen.json - */ - /** - * Sample code: Firmware_Delete_MaximumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareDeleteMaximumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .deleteWithResponse("rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); - } -} -``` +- [Create](#firmwares_create) +- [Delete](#firmwares_delete) +- [GenerateDownloadUrl](#firmwares_generatedownloadurl) +- [GenerateFilesystemDownloadUrl](#firmwares_generatefilesystemdownloadurl) +- [Get](#firmwares_get) +- [ListByWorkspace](#firmwares_listbyworkspace) +- [Update](#firmwares_update) -### Firmware_GenerateBinaryHardeningDetails +## Operations -```java -/** Samples for Firmware GenerateBinaryHardeningDetails. */ -public final class FirmwareGenerateBinaryHardeningDetailsSamples { - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateBinaryHardeningDetails_MaximumSet_Gen.json - */ - /** - * Sample code: Firmware_GenerateBinaryHardeningDetails_MaximumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareGenerateBinaryHardeningDetailsMaximumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .generateBinaryHardeningDetailsWithResponse( - "rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); - } +- [List](#operations_list) - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateBinaryHardeningDetails_MinimumSet_Gen.json - */ - /** - * Sample code: Firmware_GenerateBinaryHardeningDetails_MinimumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareGenerateBinaryHardeningDetailsMinimumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .generateBinaryHardeningDetailsWithResponse( - "rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); - } -} -``` +## PasswordHashes -### Firmware_GenerateBinaryHardeningSummary +- [ListByFirmware](#passwordhashes_listbyfirmware) -```java -/** Samples for Firmware GenerateBinaryHardeningSummary. */ -public final class FirmwareGenerateBinaryHardeningSummarySamples { - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateBinaryHardeningSummary_MaximumSet_Gen.json - */ - /** - * Sample code: Firmware_GenerateBinaryHardeningSummary_MaximumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareGenerateBinaryHardeningSummaryMaximumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .generateBinaryHardeningSummaryWithResponse( - "rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); - } +## SbomComponents - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateBinaryHardeningSummary_MinimumSet_Gen.json - */ - /** - * Sample code: Firmware_GenerateBinaryHardeningSummary_MinimumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareGenerateBinaryHardeningSummaryMinimumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .generateBinaryHardeningSummaryWithResponse( - "rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); - } -} -``` +- [ListByFirmware](#sbomcomponents_listbyfirmware) -### Firmware_GenerateComponentDetails +## Summaries -```java -/** Samples for Firmware GenerateComponentDetails. */ -public final class FirmwareGenerateComponentDetailsSamples { - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateComponentDetails_MinimumSet_Gen.json - */ - /** - * Sample code: Firmware_GenerateComponentDetails_MinimumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareGenerateComponentDetailsMinimumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .generateComponentDetailsWithResponse( - "rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); - } +- [Get](#summaries_get) +- [ListByFirmware](#summaries_listbyfirmware) - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateComponentDetails_MaximumSet_Gen.json - */ - /** - * Sample code: Firmware_GenerateComponentDetails_MaximumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareGenerateComponentDetailsMaximumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .generateComponentDetailsWithResponse( - "rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); - } -} -``` +## Workspaces -### Firmware_GenerateCryptoCertificateSummary +- [Create](#workspaces_create) +- [Delete](#workspaces_delete) +- [GenerateUploadUrl](#workspaces_generateuploadurl) +- [GetByResourceGroup](#workspaces_getbyresourcegroup) +- [List](#workspaces_list) +- [ListByResourceGroup](#workspaces_listbyresourcegroup) +- [Update](#workspaces_update) +### BinaryHardening_ListByFirmware ```java -/** Samples for Firmware GenerateCryptoCertificateSummary. */ -public final class FirmwareGenerateCryptoCertificateSummarySamples { +/** + * Samples for BinaryHardening ListByFirmware. + */ +public final class BinaryHardeningListByFirmwareSamples { /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateCryptoCertificateSummary_MaximumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * BinaryHardening_ListByFirmware_MinimumSet_Gen.json */ /** - * Sample code: Firmware_GenerateCryptoCertificateSummary_MaximumSet_Gen. - * + * Sample code: BinaryHardening_ListByFirmware_MinimumSet_Gen. + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void firmwareGenerateCryptoCertificateSummaryMaximumSetGen( + public static void binaryHardeningListByFirmwareMinimumSetGen( com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .generateCryptoCertificateSummaryWithResponse( - "FirmwareAnalysisRG", - "default", - "DECAFBAD-0000-0000-0000-BADBADBADBAD", - com.azure.core.util.Context.NONE); + manager.binaryHardenings().listByFirmware("FirmwareAnalysisRG", "default", + "109a9886-50bf-85a8-9d75-000000000000", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateCryptoCertificateSummary_MinimumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * BinaryHardening_ListByFirmware_MaximumSet_Gen.json */ /** - * Sample code: Firmware_GenerateCryptoCertificateSummary_MinimumSet_Gen. - * + * Sample code: BinaryHardening_ListByFirmware_MaximumSet_Gen. + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void firmwareGenerateCryptoCertificateSummaryMinimumSetGen( + public static void binaryHardeningListByFirmwareMaximumSetGen( com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .generateCryptoCertificateSummaryWithResponse( - "rgworkspaces-firmwares", "j5QE_", "wujtpcgypfpqseyrsebolarkspy", com.azure.core.util.Context.NONE); + manager.binaryHardenings().listByFirmware("FirmwareAnalysisRG", "default", + "109a9886-50bf-85a8-9d75-000000000000", com.azure.core.util.Context.NONE); } } ``` -### Firmware_GenerateCryptoKeySummary +### CryptoCertificates_ListByFirmware ```java -/** Samples for Firmware GenerateCryptoKeySummary. */ -public final class FirmwareGenerateCryptoKeySummarySamples { +/** + * Samples for CryptoCertificates ListByFirmware. + */ +public final class CryptoCertificatesListByFirmwareSamples { /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateCryptoKeySummary_MaximumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * CryptoCertificates_ListByFirmware_MaximumSet_Gen.json */ /** - * Sample code: Firmware_GenerateCryptoKeySummary_MaximumSet_Gen. - * + * Sample code: CryptoCertificates_ListByFirmware_MaximumSet_Gen. + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void firmwareGenerateCryptoKeySummaryMaximumSetGen( + public static void cryptoCertificatesListByFirmwareMaximumSetGen( com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .generateCryptoKeySummaryWithResponse( - "FirmwareAnalysisRG", - "default", - "DECAFBAD-0000-0000-0000-BADBADBADBAD", - com.azure.core.util.Context.NONE); + manager.cryptoCertificates().listByFirmware("FirmwareAnalysisRG", "default", + "109a9886-50bf-85a8-9d75-000000000000", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateCryptoKeySummary_MinimumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * CryptoCertificates_ListByFirmware_MinimumSet_Gen.json */ /** - * Sample code: Firmware_GenerateCryptoKeySummary_MinimumSet_Gen. - * + * Sample code: CryptoCertificates_ListByFirmware_MinimumSet_Gen. + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void firmwareGenerateCryptoKeySummaryMinimumSetGen( + public static void cryptoCertificatesListByFirmwareMinimumSetGen( com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .generateCryptoKeySummaryWithResponse( - "rgworkspaces-firmwares", "j5QE_", "wujtpcgypfpqseyrsebolarkspy", com.azure.core.util.Context.NONE); + manager.cryptoCertificates().listByFirmware("FirmwareAnalysisRG", "default", + "109a9886-50bf-85a8-9d75-000000000000", com.azure.core.util.Context.NONE); } } ``` -### Firmware_GenerateCveSummary +### CryptoKeys_ListByFirmware ```java -/** Samples for Firmware GenerateCveSummary. */ -public final class FirmwareGenerateCveSummarySamples { +/** + * Samples for CryptoKeys ListByFirmware. + */ +public final class CryptoKeysListByFirmwareSamples { /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateCveSummary_MinimumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * CryptoKeys_ListByFirmware_MinimumSet_Gen.json */ /** - * Sample code: Firmware_GenerateCveSummary_MinimumSet_Gen. - * + * Sample code: CryptoKeys_ListByFirmware_MinimumSet_Gen. + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void firmwareGenerateCveSummaryMinimumSetGen( + public static void cryptoKeysListByFirmwareMinimumSetGen( com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .generateCveSummaryWithResponse( - "rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); + manager.cryptoKeys().listByFirmware("FirmwareAnalysisRG", "default", "109a9886-50bf-85a8-9d75-000000000000", + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateCveSummary_MaximumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * CryptoKeys_ListByFirmware_MaximumSet_Gen.json */ /** - * Sample code: Firmware_GenerateCveSummary_MaximumSet_Gen. - * + * Sample code: CryptoKeys_ListByFirmware_MaximumSet_Gen. + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void firmwareGenerateCveSummaryMaximumSetGen( + public static void cryptoKeysListByFirmwareMaximumSetGen( com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .generateCveSummaryWithResponse( - "rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); + manager.cryptoKeys().listByFirmware("FirmwareAnalysisRG", "default", "109a9886-50bf-85a8-9d75-000000000000", + com.azure.core.util.Context.NONE); } } ``` -### Firmware_GenerateDownloadUrl +### Cves_ListByFirmware ```java -/** Samples for Firmware GenerateDownloadUrl. */ -public final class FirmwareGenerateDownloadUrlSamples { +/** + * Samples for Cves ListByFirmware. + */ +public final class CvesListByFirmwareSamples { /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateDownloadUrl_MaximumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Cves_ListByFirmware_MaximumSet_Gen.json */ /** - * Sample code: Firmware_GenerateDownloadUrl_MaximumSet_Gen. - * + * Sample code: Cves_ListByFirmware_MaximumSet_Gen. + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void firmwareGenerateDownloadUrlMaximumSetGen( + public static void cvesListByFirmwareMaximumSetGen( com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .generateDownloadUrlWithResponse( - "rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); + manager.cves().listByFirmware("FirmwareAnalysisRG", "default", "109a9886-50bf-85a8-9d75-000000000000", + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateDownloadUrl_MinimumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Cves_ListByFirmware_MinimumSet_Gen.json */ /** - * Sample code: Firmware_GenerateDownloadUrl_MinimumSet_Gen. - * + * Sample code: Cves_ListByFirmware_MinimumSet_Gen. + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void firmwareGenerateDownloadUrlMinimumSetGen( + public static void cvesListByFirmwareMinimumSetGen( com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .generateDownloadUrlWithResponse( - "rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); + manager.cves().listByFirmware("FirmwareAnalysisRG", "default", "109a9886-50bf-85a8-9d75-000000000000", + com.azure.core.util.Context.NONE); } } ``` -### Firmware_GenerateFilesystemDownloadUrl +### Firmwares_Create ```java -/** Samples for Firmware GenerateFilesystemDownloadUrl. */ -public final class FirmwareGenerateFilesystemDownloadUrlSamples { +import com.azure.resourcemanager.iotfirmwaredefense.models.Status; +import com.azure.resourcemanager.iotfirmwaredefense.models.StatusMessage; +import java.util.Arrays; + +/** + * Samples for Firmwares Create. + */ +public final class FirmwaresCreateSamples { /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateFilesystemDownloadUrl_MaximumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Firmwares_Create_MaximumSet_Gen.json */ /** - * Sample code: Firmware_GenerateFilesystemDownloadUrl_MaximumSet_Gen. - * + * Sample code: Firmwares_Create_MaximumSet_Gen. + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void firmwareGenerateFilesystemDownloadUrlMaximumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .generateFilesystemDownloadUrlWithResponse( - "rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); + public static void + firmwaresCreateMaximumSetGen(com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + manager.firmwares().define("umrkdttp").withExistingWorkspace("rgworkspaces-firmwares", "A7") + .withFileName("wresexxulcdsdd").withVendor("vycmdhgtmepcptyoubztiuudpkcpd").withModel("f").withVersion("s") + .withDescription("uz").withFileSize(17L).withStatus(Status.PENDING) + .withStatusMessages(Arrays.asList(new StatusMessage().withMessage("ulvhmhokezathzzauiitu"))).create(); } /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateFilesystemDownloadUrl_MinimumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Firmwares_Create_MinimumSet_Gen.json */ /** - * Sample code: Firmware_GenerateFilesystemDownloadUrl_MinimumSet_Gen. - * + * Sample code: Firmwares_Create_MinimumSet_Gen. + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void firmwareGenerateFilesystemDownloadUrlMinimumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .generateFilesystemDownloadUrlWithResponse( - "rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); + public static void + firmwaresCreateMinimumSetGen(com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + manager.firmwares().define("umrkdttp").withExistingWorkspace("rgworkspaces-firmwares", "A7").create(); } } ``` -### Firmware_GenerateSummary +### Firmwares_Delete ```java -/** Samples for Firmware GenerateSummary. */ -public final class FirmwareGenerateSummarySamples { +/** + * Samples for Firmwares Delete. + */ +public final class FirmwaresDeleteSamples { /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateSummary_MinimumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Firmwares_Delete_MinimumSet_Gen.json */ /** - * Sample code: Firmware_GenerateSummary_MinimumSet_Gen. - * + * Sample code: Firmwares_Delete_MinimumSet_Gen. + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void firmwareGenerateSummaryMinimumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .generateSummaryWithResponse("rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); + public static void + firmwaresDeleteMinimumSetGen(com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + manager.firmwares().deleteWithResponse("rgworkspaces-firmwares", "A7", "umrkdttp", + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateSummary_MaximumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Firmwares_Delete_MaximumSet_Gen.json */ /** - * Sample code: Firmware_GenerateSummary_MaximumSet_Gen. - * + * Sample code: Firmwares_Delete_MaximumSet_Gen. + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void firmwareGenerateSummaryMaximumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .generateSummaryWithResponse("rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); + public static void + firmwaresDeleteMaximumSetGen(com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + manager.firmwares().deleteWithResponse("rgworkspaces-firmwares", "A7", "umrkdttp", + com.azure.core.util.Context.NONE); } } ``` -### Firmware_Get +### Firmwares_GenerateDownloadUrl ```java -/** Samples for Firmware Get. */ -public final class FirmwareGetSamples { +/** + * Samples for Firmwares GenerateDownloadUrl. + */ +public final class FirmwaresGenerateDownloadUrlSamples { /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_Get_MinimumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Firmwares_GenerateDownloadUrl_MaximumSet_Gen.json */ /** - * Sample code: Firmware_Get_MinimumSet_Gen. - * + * Sample code: Firmwares_GenerateDownloadUrl_MaximumSet_Gen. + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void firmwareGetMinimumSetGen( + public static void firmwaresGenerateDownloadUrlMaximumSetGen( com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .getWithResponse("rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); + manager.firmwares().generateDownloadUrlWithResponse("rgworkspaces-firmwares", "A7", "umrkdttp", + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Firmwares_GenerateDownloadUrl_MinimumSet_Gen.json */ /** - * Sample code: Firmware_Get_MaximumSet_Gen. - * + * Sample code: Firmwares_GenerateDownloadUrl_MinimumSet_Gen. + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void firmwareGetMaximumSetGen( + public static void firmwaresGenerateDownloadUrlMinimumSetGen( com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .getWithResponse("rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); + manager.firmwares().generateDownloadUrlWithResponse("rgworkspaces-firmwares", "A7", "umrkdttp", + com.azure.core.util.Context.NONE); } } ``` -### Firmware_ListByWorkspace +### Firmwares_GenerateFilesystemDownloadUrl ```java -/** Samples for Firmware ListByWorkspace. */ -public final class FirmwareListByWorkspaceSamples { +/** + * Samples for Firmwares GenerateFilesystemDownloadUrl. + */ +public final class FirmwaresGenerateFilesystemDownloadUrlSamples { /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListByWorkspace_MaximumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Firmwares_GenerateFilesystemDownloadUrl_MaximumSet_Gen.json */ /** - * Sample code: Firmware_ListByWorkspace_MaximumSet_Gen. - * + * Sample code: Firmwares_GenerateFilesystemDownloadUrl_MaximumSet_Gen. + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void firmwareListByWorkspaceMaximumSetGen( + public static void firmwaresGenerateFilesystemDownloadUrlMaximumSetGen( com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager.firmwares().listByWorkspace("rgworkspaces-firmwares", "A7", com.azure.core.util.Context.NONE); + manager.firmwares().generateFilesystemDownloadUrlWithResponse("rgworkspaces-firmwares", "A7", "umrkdttp", + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListByWorkspace_MinimumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Firmwares_GenerateFilesystemDownloadUrl_MinimumSet_Gen.json */ /** - * Sample code: Firmware_ListByWorkspace_MinimumSet_Gen. - * + * Sample code: Firmwares_GenerateFilesystemDownloadUrl_MinimumSet_Gen. + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void firmwareListByWorkspaceMinimumSetGen( + public static void firmwaresGenerateFilesystemDownloadUrlMinimumSetGen( com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager.firmwares().listByWorkspace("rgworkspaces-firmwares", "A7", com.azure.core.util.Context.NONE); + manager.firmwares().generateFilesystemDownloadUrlWithResponse("rgworkspaces-firmwares", "A7", "umrkdttp", + com.azure.core.util.Context.NONE); } } ``` -### Firmware_ListGenerateBinaryHardeningList +### Firmwares_Get ```java -/** Samples for Firmware ListGenerateBinaryHardeningList. */ -public final class FirmwareListGenerateBinaryHardeningListSamples { +/** + * Samples for Firmwares Get. + */ +public final class FirmwaresGetSamples { /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateBinaryHardeningList_MinimumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Firmwares_Get_MinimumSet_Gen.json */ /** - * Sample code: Firmware_ListGenerateBinaryHardeningList_MinimumSet_Gen. - * + * Sample code: Firmwares_Get_MinimumSet_Gen. + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void firmwareListGenerateBinaryHardeningListMinimumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .listGenerateBinaryHardeningList( - "rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); + public static void + firmwaresGetMinimumSetGen(com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + manager.firmwares().getWithResponse("rgworkspaces-firmwares", "A7", "umrkdttp", + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateBinaryHardeningList_MaximumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Firmwares_Get_MaximumSet_Gen.json */ /** - * Sample code: Firmware_ListGenerateBinaryHardeningList_MaximumSet_Gen. - * + * Sample code: Firmwares_Get_MaximumSet_Gen. + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void firmwareListGenerateBinaryHardeningListMaximumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .listGenerateBinaryHardeningList( - "rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); + public static void + firmwaresGetMaximumSetGen(com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + manager.firmwares().getWithResponse("rgworkspaces-firmwares", "A7", "umrkdttp", + com.azure.core.util.Context.NONE); } } ``` -### Firmware_ListGenerateComponentList +### Firmwares_ListByWorkspace ```java -/** Samples for Firmware ListGenerateComponentList. */ -public final class FirmwareListGenerateComponentListSamples { +/** + * Samples for Firmwares ListByWorkspace. + */ +public final class FirmwaresListByWorkspaceSamples { /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateComponentList_MaximumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Firmwares_ListByWorkspace_MaximumSet_Gen.json */ /** - * Sample code: Firmware_ListGenerateComponentList_MaximumSet_Gen. - * + * Sample code: Firmwares_ListByWorkspace_MaximumSet_Gen. + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void firmwareListGenerateComponentListMaximumSetGen( + public static void firmwaresListByWorkspaceMaximumSetGen( com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .listGenerateComponentList("rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); + manager.firmwares().listByWorkspace("rgworkspaces-firmwares", "A7", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateComponentList_MinimumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Firmwares_ListByWorkspace_MinimumSet_Gen.json */ /** - * Sample code: Firmware_ListGenerateComponentList_MinimumSet_Gen. - * + * Sample code: Firmwares_ListByWorkspace_MinimumSet_Gen. + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void firmwareListGenerateComponentListMinimumSetGen( + public static void firmwaresListByWorkspaceMinimumSetGen( com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .listGenerateComponentList("rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); + manager.firmwares().listByWorkspace("rgworkspaces-firmwares", "A7", com.azure.core.util.Context.NONE); } } ``` -### Firmware_ListGenerateCryptoCertificateList +### Firmwares_Update ```java -/** Samples for Firmware ListGenerateCryptoCertificateList. */ -public final class FirmwareListGenerateCryptoCertificateListSamples { +import com.azure.resourcemanager.iotfirmwaredefense.models.Firmware; +import com.azure.resourcemanager.iotfirmwaredefense.models.Status; +import com.azure.resourcemanager.iotfirmwaredefense.models.StatusMessage; +import java.util.Arrays; + +/** + * Samples for Firmwares Update. + */ +public final class FirmwaresUpdateSamples { /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateCryptoCertificateList_MaximumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Firmwares_Update_MaximumSet_Gen.json */ /** - * Sample code: Firmware_ListGenerateCryptoCertificateList_MaximumSet_Gen. - * + * Sample code: Firmwares_Update_MaximumSet_Gen. + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void firmwareListGenerateCryptoCertificateListMaximumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .listGenerateCryptoCertificateList( - "FirmwareAnalysisRG", - "default", - "DECAFBAD-0000-0000-0000-BADBADBADBAD", - com.azure.core.util.Context.NONE); + public static void + firmwaresUpdateMaximumSetGen(com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + Firmware resource = manager.firmwares() + .getWithResponse("rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE).getValue(); + resource.update().withFileName("wresexxulcdsdd").withVendor("vycmdhgtmepcptyoubztiuudpkcpd").withModel("f") + .withVersion("s").withDescription("uz").withFileSize(17L).withStatus(Status.PENDING) + .withStatusMessages(Arrays.asList(new StatusMessage().withMessage("ulvhmhokezathzzauiitu"))).apply(); } /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateCryptoCertificateList_MinimumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Firmwares_Update_MinimumSet_Gen.json */ /** - * Sample code: Firmware_ListGenerateCryptoCertificateList_MinimumSet_Gen. - * + * Sample code: Firmwares_Update_MinimumSet_Gen. + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void firmwareListGenerateCryptoCertificateListMinimumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .listGenerateCryptoCertificateList( - "rgworkspaces-firmwares", "j5QE_", "wujtpcgypfpqseyrsebolarkspy", com.azure.core.util.Context.NONE); + public static void + firmwaresUpdateMinimumSetGen(com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + Firmware resource = manager.firmwares() + .getWithResponse("rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE).getValue(); + resource.update().apply(); } } ``` -### Firmware_ListGenerateCryptoKeyList +### Operations_List ```java -/** Samples for Firmware ListGenerateCryptoKeyList. */ -public final class FirmwareListGenerateCryptoKeyListSamples { +/** + * Samples for Operations List. + */ +public final class OperationsListSamples { /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateCryptoKeyList_MinimumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Operations_List_MinimumSet_Gen.json */ /** - * Sample code: Firmware_ListGenerateCryptoKeyList_MinimumSet_Gen. - * + * Sample code: Operations_List_MinimumSet_Gen. + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void firmwareListGenerateCryptoKeyListMinimumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .listGenerateCryptoKeyList( - "rgworkspaces-firmwares", "j5QE_", "wujtpcgypfpqseyrsebolarkspy", com.azure.core.util.Context.NONE); + public static void + operationsListMinimumSetGen(com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateCryptoKeyList_MaximumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Operations_List_MaximumSet_Gen.json */ /** - * Sample code: Firmware_ListGenerateCryptoKeyList_MaximumSet_Gen. - * + * Sample code: Operations_List_MaximumSet_Gen. + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void firmwareListGenerateCryptoKeyListMaximumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .listGenerateCryptoKeyList( - "FirmwareAnalysisRG", - "default", - "DECAFBAD-0000-0000-0000-BADBADBADBAD", - com.azure.core.util.Context.NONE); + public static void + operationsListMaximumSetGen(com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); } } ``` -### Firmware_ListGenerateCveList +### PasswordHashes_ListByFirmware ```java -/** Samples for Firmware ListGenerateCveList. */ -public final class FirmwareListGenerateCveListSamples { +/** + * Samples for PasswordHashes ListByFirmware. + */ +public final class PasswordHashesListByFirmwareSamples { /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateCveList_MaximumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * PasswordHashes_ListByFirmware_MaximumSet_Gen.json */ /** - * Sample code: Firmware_ListGenerateCveList_MaximumSet_Gen. - * + * Sample code: PasswordHashes_ListByFirmware_MaximumSet_Gen. + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void firmwareListGenerateCveListMaximumSetGen( + public static void passwordHashesListByFirmwareMaximumSetGen( com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .listGenerateCveList("rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); + manager.passwordHashes().listByFirmware("FirmwareAnalysisRG", "default", "109a9886-50bf-85a8-9d75-000000000000", + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateCveList_MinimumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * PasswordHashes_ListByFirmware_MinimumSet_Gen.json */ /** - * Sample code: Firmware_ListGenerateCveList_MinimumSet_Gen. - * + * Sample code: PasswordHashes_ListByFirmware_MinimumSet_Gen. + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void firmwareListGenerateCveListMinimumSetGen( + public static void passwordHashesListByFirmwareMinimumSetGen( com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .listGenerateCveList("rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); + manager.passwordHashes().listByFirmware("FirmwareAnalysisRG", "default", "109a9886-50bf-85a8-9d75-000000000000", + com.azure.core.util.Context.NONE); } } ``` -### Firmware_ListGeneratePasswordHashList +### SbomComponents_ListByFirmware ```java -/** Samples for Firmware ListGeneratePasswordHashList. */ -public final class FirmwareListGeneratePasswordHashListSamples { +/** + * Samples for SbomComponents ListByFirmware. + */ +public final class SbomComponentsListByFirmwareSamples { /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGeneratePasswordHashList_MinimumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * SbomComponents_ListByFirmware_MinimumSet_Gen.json */ /** - * Sample code: Firmware_ListGeneratePasswordHashList_MinimumSet_Gen. - * + * Sample code: SbomComponents_ListByFirmware_MinimumSet_Gen. + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void firmwareListGeneratePasswordHashListMinimumSetGen( + public static void sbomComponentsListByFirmwareMinimumSetGen( com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .listGeneratePasswordHashList("rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); + manager.sbomComponents().listByFirmware("FirmwareAnalysisRG", "default", "109a9886-50bf-85a8-9d75-000000000000", + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGeneratePasswordHashList_MaximumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * SbomComponents_ListByFirmware_MaximumSet_Gen.json */ /** - * Sample code: Firmware_ListGeneratePasswordHashList_MaximumSet_Gen. - * + * Sample code: SbomComponents_ListByFirmware_MaximumSet_Gen. + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void firmwareListGeneratePasswordHashListMaximumSetGen( + public static void sbomComponentsListByFirmwareMaximumSetGen( com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .listGeneratePasswordHashList("rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); + manager.sbomComponents().listByFirmware("FirmwareAnalysisRG", "default", "109a9886-50bf-85a8-9d75-000000000000", + com.azure.core.util.Context.NONE); } } ``` -### Firmware_Update +### Summaries_Get ```java -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.iotfirmwaredefense.models.Firmware; -import com.azure.resourcemanager.iotfirmwaredefense.models.Status; -import java.io.IOException; -import java.util.Arrays; +import com.azure.resourcemanager.iotfirmwaredefense.models.SummaryName; -/** Samples for Firmware Update. */ -public final class FirmwareUpdateSamples { +/** + * Samples for Summaries Get. + */ +public final class SummariesGetSamples { /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_Update_MaximumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Summaries_Get_MaximumSet_Gen.json */ /** - * Sample code: Firmware_Update_MaximumSet_Gen. - * + * Sample code: Summaries_Get_MaximumSet_Gen. + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void firmwareUpdateMaximumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) throws IOException { - Firmware resource = - manager - .firmwares() - .getWithResponse("rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withFileName("wresexxulcdsdd") - .withVendor("vycmdhgtmepcptyoubztiuudpkcpd") - .withModel("f") - .withVersion("s") - .withDescription("uz") - .withFileSize(17L) - .withStatus(Status.PENDING) - .withStatusMessages( - Arrays - .asList( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"message\":\"ulvhmhokezathzzauiitu\"}", Object.class, SerializerEncoding.JSON))) - .apply(); + public static void + summariesGetMaximumSetGen(com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + manager.summaries().getWithResponse("FirmwareAnalysisRG", "default", "109a9886-50bf-85a8-9d75-000000000000", + SummaryName.FIRMWARE, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_Update_MinimumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Summaries_Get_MinimumSet_Gen.json */ /** - * Sample code: Firmware_Update_MinimumSet_Gen. - * + * Sample code: Summaries_Get_MinimumSet_Gen. + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void firmwareUpdateMinimumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - Firmware resource = - manager - .firmwares() - .getWithResponse("rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().apply(); + public static void + summariesGetMinimumSetGen(com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + manager.summaries().getWithResponse("FirmwareAnalysisRG", "default", "109a9886-50bf-85a8-9d75-000000000000", + SummaryName.FIRMWARE, com.azure.core.util.Context.NONE); } } ``` -### Operations_List +### Summaries_ListByFirmware ```java -/** Samples for Operations List. */ -public final class OperationsListSamples { +/** + * Samples for Summaries ListByFirmware. + */ +public final class SummariesListByFirmwareSamples { /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Operations_List_MinimumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Summaries_ListByFirmware_MinimumSet_Gen.json */ /** - * Sample code: Operations_List_MinimumSet_Gen. - * + * Sample code: Summaries_ListByFirmware_MinimumSet_Gen. + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void operationsListMinimumSetGen( + public static void summariesListByFirmwareMinimumSetGen( com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager.operations().list(com.azure.core.util.Context.NONE); + manager.summaries().listByFirmware("FirmwareAnalysisRG", "default", "109a9886-50bf-85a8-9d75-000000000000", + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Operations_List_MaximumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Summaries_ListByFirmware_MaximumSet_Gen.json */ /** - * Sample code: Operations_List_MaximumSet_Gen. - * + * Sample code: Summaries_ListByFirmware_MaximumSet_Gen. + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void operationsListMaximumSetGen( + public static void summariesListByFirmwareMaximumSetGen( com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager.operations().list(com.azure.core.util.Context.NONE); + manager.summaries().listByFirmware("FirmwareAnalysisRG", "default", "109a9886-50bf-85a8-9d75-000000000000", + com.azure.core.util.Context.NONE); } } ``` @@ -895,45 +695,41 @@ public final class OperationsListSamples { import java.util.HashMap; import java.util.Map; -/** Samples for Workspaces Create. */ +/** + * Samples for Workspaces Create. + */ public final class WorkspacesCreateSamples { /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_Create_MinimumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Workspaces_Create_MinimumSet_Gen.json */ /** * Sample code: Workspaces_Create_MinimumSet_Gen. - * + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void workspacesCreateMinimumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .workspaces() - .define("E___-3") - .withRegion("jjwbseilitjgdrhbvvkwviqj") - .withExistingResourceGroup("rgworkspaces") - .create(); + public static void + workspacesCreateMinimumSetGen(com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + manager.workspaces().define("E___-3").withRegion("jjwbseilitjgdrhbvvkwviqj") + .withExistingResourceGroup("rgworkspaces").create(); } /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_Create_MaximumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Workspaces_Create_MaximumSet_Gen.json */ /** * Sample code: Workspaces_Create_MaximumSet_Gen. - * + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void workspacesCreateMaximumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .workspaces() - .define("E___-3") - .withRegion("jjwbseilitjgdrhbvvkwviqj") - .withExistingResourceGroup("rgworkspaces") - .withTags(mapOf("key450", "fakeTokenPlaceholder")) - .create(); + public static void + workspacesCreateMaximumSetGen(com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + manager.workspaces().define("E___-3").withRegion("jjwbseilitjgdrhbvvkwviqj") + .withExistingResourceGroup("rgworkspaces").withTags(mapOf("key450", "fakeTokenPlaceholder")).create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -950,36 +746,38 @@ public final class WorkspacesCreateSamples { ### Workspaces_Delete ```java -/** Samples for Workspaces Delete. */ +/** + * Samples for Workspaces Delete. + */ public final class WorkspacesDeleteSamples { /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_Delete_MinimumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Workspaces_Delete_MinimumSet_Gen.json */ /** * Sample code: Workspaces_Delete_MinimumSet_Gen. - * + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void workspacesDeleteMinimumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .workspaces() - .deleteByResourceGroupWithResponse("rgworkspaces", "E___-3", com.azure.core.util.Context.NONE); + public static void + workspacesDeleteMinimumSetGen(com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + manager.workspaces().deleteByResourceGroupWithResponse("rgworkspaces", "E___-3", + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Workspaces_Delete_MaximumSet_Gen.json */ /** * Sample code: Workspaces_Delete_MaximumSet_Gen. - * + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void workspacesDeleteMaximumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .workspaces() - .deleteByResourceGroupWithResponse("rgworkspaces", "E___-3", com.azure.core.util.Context.NONE); + public static void + workspacesDeleteMaximumSetGen(com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + manager.workspaces().deleteByResourceGroupWithResponse("rgworkspaces", "E___-3", + com.azure.core.util.Context.NONE); } } ``` @@ -989,41 +787,38 @@ public final class WorkspacesDeleteSamples { ```java import com.azure.resourcemanager.iotfirmwaredefense.models.GenerateUploadUrlRequest; -/** Samples for Workspaces GenerateUploadUrl. */ +/** + * Samples for Workspaces GenerateUploadUrl. + */ public final class WorkspacesGenerateUploadUrlSamples { /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_GenerateUploadUrl_MinimumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Workspaces_GenerateUploadUrl_MinimumSet_Gen.json */ /** * Sample code: Workspaces_GenerateUploadUrl_MinimumSet_Gen. - * + * * @param manager Entry point to IoTFirmwareDefenseManager. */ public static void workspacesGenerateUploadUrlMinimumSetGen( com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .workspaces() - .generateUploadUrlWithResponse( - "rgworkspaces", "E___-3", new GenerateUploadUrlRequest(), com.azure.core.util.Context.NONE); + manager.workspaces().generateUploadUrlWithResponse("rgworkspaces", "E___-3", new GenerateUploadUrlRequest(), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_GenerateUploadUrl_MaximumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Workspaces_GenerateUploadUrl_MaximumSet_Gen.json */ /** * Sample code: Workspaces_GenerateUploadUrl_MaximumSet_Gen. - * + * * @param manager Entry point to IoTFirmwareDefenseManager. */ public static void workspacesGenerateUploadUrlMaximumSetGen( com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .workspaces() - .generateUploadUrlWithResponse( - "rgworkspaces", - "E___-3", - new GenerateUploadUrlRequest().withFirmwareId("ytsfprbywi"), - com.azure.core.util.Context.NONE); + manager.workspaces().generateUploadUrlWithResponse("rgworkspaces", "E___-3", + new GenerateUploadUrlRequest().withFirmwareId("ytsfprbywi"), com.azure.core.util.Context.NONE); } } ``` @@ -1031,31 +826,35 @@ public final class WorkspacesGenerateUploadUrlSamples { ### Workspaces_GetByResourceGroup ```java -/** Samples for Workspaces GetByResourceGroup. */ +/** + * Samples for Workspaces GetByResourceGroup. + */ public final class WorkspacesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Workspaces_Get_MaximumSet_Gen.json */ /** * Sample code: Workspaces_Get_MaximumSet_Gen. - * + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void workspacesGetMaximumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + public static void + workspacesGetMaximumSetGen(com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { manager.workspaces().getByResourceGroupWithResponse("rgworkspaces", "E_US", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_Get_MinimumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Workspaces_Get_MinimumSet_Gen.json */ /** * Sample code: Workspaces_Get_MinimumSet_Gen. - * + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void workspacesGetMinimumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + public static void + workspacesGetMinimumSetGen(com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { manager.workspaces().getByResourceGroupWithResponse("rgworkspaces", "E_US", com.azure.core.util.Context.NONE); } } @@ -1064,14 +863,17 @@ public final class WorkspacesGetByResourceGroupSamples { ### Workspaces_List ```java -/** Samples for Workspaces List. */ +/** + * Samples for Workspaces List. + */ public final class WorkspacesListSamples { /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Workspaces_ListBySubscription_MaximumSet_Gen.json */ /** * Sample code: Workspaces_ListBySubscription_MaximumSet_Gen. - * + * * @param manager Entry point to IoTFirmwareDefenseManager. */ public static void workspacesListBySubscriptionMaximumSetGen( @@ -1080,11 +882,12 @@ public final class WorkspacesListSamples { } /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_ListBySubscription_MinimumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Workspaces_ListBySubscription_MinimumSet_Gen.json */ /** * Sample code: Workspaces_ListBySubscription_MinimumSet_Gen. - * + * * @param manager Entry point to IoTFirmwareDefenseManager. */ public static void workspacesListBySubscriptionMinimumSetGen( @@ -1097,14 +900,17 @@ public final class WorkspacesListSamples { ### Workspaces_ListByResourceGroup ```java -/** Samples for Workspaces ListByResourceGroup. */ +/** + * Samples for Workspaces ListByResourceGroup. + */ public final class WorkspacesListByResourceGroupSamples { /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Workspaces_ListByResourceGroup_MaximumSet_Gen.json */ /** * Sample code: Workspaces_ListByResourceGroup_MaximumSet_Gen. - * + * * @param manager Entry point to IoTFirmwareDefenseManager. */ public static void workspacesListByResourceGroupMaximumSetGen( @@ -1113,11 +919,12 @@ public final class WorkspacesListByResourceGroupSamples { } /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_ListByResourceGroup_MinimumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Workspaces_ListByResourceGroup_MinimumSet_Gen.json */ /** * Sample code: Workspaces_ListByResourceGroup_MinimumSet_Gen. - * + * * @param manager Entry point to IoTFirmwareDefenseManager. */ public static void workspacesListByResourceGroupMinimumSetGen( @@ -1132,41 +939,39 @@ public final class WorkspacesListByResourceGroupSamples { ```java import com.azure.resourcemanager.iotfirmwaredefense.models.Workspace; -/** Samples for Workspaces Update. */ +/** + * Samples for Workspaces Update. + */ public final class WorkspacesUpdateSamples { /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_Update_MaximumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Workspaces_Update_MaximumSet_Gen.json */ /** * Sample code: Workspaces_Update_MaximumSet_Gen. - * + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void workspacesUpdateMaximumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - Workspace resource = - manager - .workspaces() - .getByResourceGroupWithResponse("rgworkspaces", "E___-3", com.azure.core.util.Context.NONE) - .getValue(); + public static void + workspacesUpdateMaximumSetGen(com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + Workspace resource = manager.workspaces() + .getByResourceGroupWithResponse("rgworkspaces", "E___-3", com.azure.core.util.Context.NONE).getValue(); resource.update().apply(); } /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_Update_MinimumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Workspaces_Update_MinimumSet_Gen.json */ /** * Sample code: Workspaces_Update_MinimumSet_Gen. - * + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void workspacesUpdateMinimumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - Workspace resource = - manager - .workspaces() - .getByResourceGroupWithResponse("rgworkspaces", "E___-3", com.azure.core.util.Context.NONE) - .getValue(); + public static void + workspacesUpdateMinimumSetGen(com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + Workspace resource = manager.workspaces() + .getByResourceGroupWithResponse("rgworkspaces", "E___-3", com.azure.core.util.Context.NONE).getValue(); resource.update().apply(); } } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/pom.xml b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/pom.xml index 5c3c636de7698..72e3389a026a4 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/pom.xml +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/pom.xml @@ -14,11 +14,11 @@ com.azure.resourcemanager azure-resourcemanager-iotfirmwaredefense - 1.0.0-beta.2 + 1.0.0 jar Microsoft Azure SDK for IoT Firmware Defense Management - This package contains Microsoft Azure SDK for IoT Firmware Defense Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The definitions and parameters in this swagger specification will be used to manage the IoT Firmware Defense resources. Package tag package-2023-02-08-preview. + This package contains Microsoft Azure SDK for IoT Firmware Defense Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Firmware & IoT Security REST API. Package tag package-2024-01-10. https://github.com/Azure/azure-sdk-for-java @@ -87,8 +87,6 @@ 4.11.0 test - - net.bytebuddy byte-buddy diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/IoTFirmwareDefenseManager.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/IoTFirmwareDefenseManager.java index 25e0d19ed8069..c3f1c3a689e7b 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/IoTFirmwareDefenseManager.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/IoTFirmwareDefenseManager.java @@ -23,13 +23,27 @@ import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.Fist; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.IoTFirmwareDefense; +import com.azure.resourcemanager.iotfirmwaredefense.implementation.BinaryHardeningsImpl; +import com.azure.resourcemanager.iotfirmwaredefense.implementation.CryptoCertificatesImpl; +import com.azure.resourcemanager.iotfirmwaredefense.implementation.CryptoKeysImpl; +import com.azure.resourcemanager.iotfirmwaredefense.implementation.CvesImpl; import com.azure.resourcemanager.iotfirmwaredefense.implementation.FirmwaresImpl; -import com.azure.resourcemanager.iotfirmwaredefense.implementation.FistBuilder; +import com.azure.resourcemanager.iotfirmwaredefense.implementation.IoTFirmwareDefenseBuilder; import com.azure.resourcemanager.iotfirmwaredefense.implementation.OperationsImpl; +import com.azure.resourcemanager.iotfirmwaredefense.implementation.PasswordHashesImpl; +import com.azure.resourcemanager.iotfirmwaredefense.implementation.SbomComponentsImpl; +import com.azure.resourcemanager.iotfirmwaredefense.implementation.SummariesImpl; import com.azure.resourcemanager.iotfirmwaredefense.implementation.WorkspacesImpl; +import com.azure.resourcemanager.iotfirmwaredefense.models.BinaryHardenings; +import com.azure.resourcemanager.iotfirmwaredefense.models.CryptoCertificates; +import com.azure.resourcemanager.iotfirmwaredefense.models.CryptoKeys; +import com.azure.resourcemanager.iotfirmwaredefense.models.Cves; import com.azure.resourcemanager.iotfirmwaredefense.models.Firmwares; import com.azure.resourcemanager.iotfirmwaredefense.models.Operations; +import com.azure.resourcemanager.iotfirmwaredefense.models.PasswordHashes; +import com.azure.resourcemanager.iotfirmwaredefense.models.SbomComponents; +import com.azure.resourcemanager.iotfirmwaredefense.models.Summaries; import com.azure.resourcemanager.iotfirmwaredefense.models.Workspaces; import java.time.Duration; import java.time.temporal.ChronoUnit; @@ -39,33 +53,43 @@ import java.util.stream.Collectors; /** - * Entry point to IoTFirmwareDefenseManager. The definitions and parameters in this swagger specification will be used - * to manage the IoT Firmware Defense resources. + * Entry point to IoTFirmwareDefenseManager. + * Firmware & IoT Security REST API. */ public final class IoTFirmwareDefenseManager { - private Firmwares firmwares; + private BinaryHardenings binaryHardenings; - private Workspaces workspaces; + private CryptoCertificates cryptoCertificates; + + private CryptoKeys cryptoKeys; + + private Cves cves; + + private Firmwares firmwares; private Operations operations; - private final Fist clientObject; + private PasswordHashes passwordHashes; + + private SbomComponents sbomComponents; + + private Summaries summaries; + + private Workspaces workspaces; + + private final IoTFirmwareDefense clientObject; private IoTFirmwareDefenseManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = - new FistBuilder() - .pipeline(httpPipeline) - .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) - .subscriptionId(profile.getSubscriptionId()) - .defaultPollInterval(defaultPollInterval) - .buildClient(); + this.clientObject = new IoTFirmwareDefenseBuilder().pipeline(httpPipeline) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()).subscriptionId(profile.getSubscriptionId()) + .defaultPollInterval(defaultPollInterval).buildClient(); } /** * Creates an instance of IoT Firmware Defense service API entry point. - * + * * @param credential the credential to use. * @param profile the Azure profile for client. * @return the IoT Firmware Defense service API instance. @@ -78,7 +102,7 @@ public static IoTFirmwareDefenseManager authenticate(TokenCredential credential, /** * Creates an instance of IoT Firmware Defense service API entry point. - * + * * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. * @param profile the Azure profile for client. * @return the IoT Firmware Defense service API instance. @@ -91,14 +115,16 @@ public static IoTFirmwareDefenseManager authenticate(HttpPipeline httpPipeline, /** * Gets a Configurable instance that can be used to create IoTFirmwareDefenseManager with optional configuration. - * + * * @return the Configurable instance allowing configurations. */ public static Configurable configure() { return new IoTFirmwareDefenseManager.Configurable(); } - /** The Configurable allowing configurations to be set. */ + /** + * The Configurable allowing configurations to be set. + */ public static final class Configurable { private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); @@ -170,8 +196,8 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { /** * Sets the retry options for the HTTP pipeline retry policy. - * - *

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

+ * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. * * @param retryOptions the retry options for the HTTP pipeline retry policy. * @return the configurable object itself. @@ -188,8 +214,8 @@ public Configurable withRetryOptions(RetryOptions retryOptions) { * @return the configurable object itself. */ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = - Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); + this.defaultPollInterval + = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); if (this.defaultPollInterval.isNegative()) { throw LOGGER .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); @@ -209,21 +235,12 @@ public IoTFirmwareDefenseManager authenticate(TokenCredential credential, AzureP Objects.requireNonNull(profile, "'profile' cannot be null."); StringBuilder userAgentBuilder = new StringBuilder(); - userAgentBuilder - .append("azsdk-java") - .append("-") - .append("com.azure.resourcemanager.iotfirmwaredefense") - .append("/") - .append("1.0.0-beta.1"); + userAgentBuilder.append("azsdk-java").append("-").append("com.azure.resourcemanager.iotfirmwaredefense") + .append("/").append("1.0.0"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { - userAgentBuilder - .append(" (") - .append(Configuration.getGlobalConfiguration().get("java.version")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.name")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.version")) - .append("; auto-generated)"); + userAgentBuilder.append(" (").append(Configuration.getGlobalConfiguration().get("java.version")) + .append("; ").append(Configuration.getGlobalConfiguration().get("os.name")).append("; ") + .append(Configuration.getGlobalConfiguration().get("os.version")).append("; auto-generated)"); } else { userAgentBuilder.append(" (auto-generated)"); } @@ -242,38 +259,73 @@ public IoTFirmwareDefenseManager authenticate(TokenCredential credential, AzureP policies.add(new UserAgentPolicy(userAgentBuilder.toString())); policies.add(new AddHeadersFromContextPolicy()); policies.add(new RequestIdPolicy()); - policies - .addAll( - this - .policies - .stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) - .collect(Collectors.toList())); + policies.addAll(this.policies.stream().filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); - policies - .addAll( - this - .policies - .stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) - .collect(Collectors.toList())); + policies.addAll(this.policies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY).collect(Collectors.toList())); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); - HttpPipeline httpPipeline = - new HttpPipelineBuilder() - .httpClient(httpClient) - .policies(policies.toArray(new HttpPipelinePolicy[0])) - .build(); + HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) + .policies(policies.toArray(new HttpPipelinePolicy[0])).build(); return new IoTFirmwareDefenseManager(httpPipeline, profile, defaultPollInterval); } } + /** + * Gets the resource collection API of BinaryHardenings. + * + * @return Resource collection API of BinaryHardenings. + */ + public BinaryHardenings binaryHardenings() { + if (this.binaryHardenings == null) { + this.binaryHardenings = new BinaryHardeningsImpl(clientObject.getBinaryHardenings(), this); + } + return binaryHardenings; + } + + /** + * Gets the resource collection API of CryptoCertificates. + * + * @return Resource collection API of CryptoCertificates. + */ + public CryptoCertificates cryptoCertificates() { + if (this.cryptoCertificates == null) { + this.cryptoCertificates = new CryptoCertificatesImpl(clientObject.getCryptoCertificates(), this); + } + return cryptoCertificates; + } + + /** + * Gets the resource collection API of CryptoKeys. + * + * @return Resource collection API of CryptoKeys. + */ + public CryptoKeys cryptoKeys() { + if (this.cryptoKeys == null) { + this.cryptoKeys = new CryptoKeysImpl(clientObject.getCryptoKeys(), this); + } + return cryptoKeys; + } + + /** + * Gets the resource collection API of Cves. + * + * @return Resource collection API of Cves. + */ + public Cves cves() { + if (this.cves == null) { + this.cves = new CvesImpl(clientObject.getCves(), this); + } + return cves; + } + /** * Gets the resource collection API of Firmwares. It manages Firmware. - * + * * @return Resource collection API of Firmwares. */ public Firmwares firmwares() { @@ -283,21 +335,9 @@ public Firmwares firmwares() { return firmwares; } - /** - * Gets the resource collection API of Workspaces. It manages Workspace. - * - * @return Resource collection API of Workspaces. - */ - public Workspaces workspaces() { - if (this.workspaces == null) { - this.workspaces = new WorkspacesImpl(clientObject.getWorkspaces(), this); - } - return workspaces; - } - /** * Gets the resource collection API of Operations. - * + * * @return Resource collection API of Operations. */ public Operations operations() { @@ -308,10 +348,60 @@ public Operations operations() { } /** - * @return Wrapped service client Fist providing direct access to the underlying auto-generated API implementation, - * based on Azure REST API. + * Gets the resource collection API of PasswordHashes. + * + * @return Resource collection API of PasswordHashes. + */ + public PasswordHashes passwordHashes() { + if (this.passwordHashes == null) { + this.passwordHashes = new PasswordHashesImpl(clientObject.getPasswordHashes(), this); + } + return passwordHashes; + } + + /** + * Gets the resource collection API of SbomComponents. + * + * @return Resource collection API of SbomComponents. + */ + public SbomComponents sbomComponents() { + if (this.sbomComponents == null) { + this.sbomComponents = new SbomComponentsImpl(clientObject.getSbomComponents(), this); + } + return sbomComponents; + } + + /** + * Gets the resource collection API of Summaries. + * + * @return Resource collection API of Summaries. + */ + public Summaries summaries() { + if (this.summaries == null) { + this.summaries = new SummariesImpl(clientObject.getSummaries(), this); + } + return summaries; + } + + /** + * Gets the resource collection API of Workspaces. It manages Workspace. + * + * @return Resource collection API of Workspaces. + */ + public Workspaces workspaces() { + if (this.workspaces == null) { + this.workspaces = new WorkspacesImpl(clientObject.getWorkspaces(), this); + } + return workspaces; + } + + /** + * Gets wrapped service client IoTFirmwareDefense providing direct access to the underlying auto-generated API + * implementation, based on Azure REST API. + * + * @return Wrapped service client IoTFirmwareDefense. */ - public Fist serviceClient() { + public IoTFirmwareDefense serviceClient() { return this.clientObject; } } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/BinaryHardeningsClient.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/BinaryHardeningsClient.java new file mode 100644 index 0000000000000..01834d11246ec --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/BinaryHardeningsClient.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.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.iotfirmwaredefense.fluent.models.BinaryHardeningResourceInner; + +/** + * An instance of this class provides access to all the operations defined in BinaryHardeningsClient. + */ +public interface BinaryHardeningsClient { + /** + * Lists binary hardening analysis results of a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of binary hardening results as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId); + + /** + * Lists binary hardening analysis results of a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of binary hardening results as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId, Context context); +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/CryptoCertificatesClient.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/CryptoCertificatesClient.java new file mode 100644 index 0000000000000..a06def7392ec8 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/CryptoCertificatesClient.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.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.iotfirmwaredefense.fluent.models.CryptoCertificateResourceInner; + +/** + * An instance of this class provides access to all the operations defined in CryptoCertificatesClient. + */ +public interface CryptoCertificatesClient { + /** + * Lists cryptographic certificate analysis results found in a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of crypto certificates as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId); + + /** + * Lists cryptographic certificate analysis results found in a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of crypto certificates as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId, Context context); +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/CryptoKeysClient.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/CryptoKeysClient.java new file mode 100644 index 0000000000000..2fb6b18bac965 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/CryptoKeysClient.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.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.iotfirmwaredefense.fluent.models.CryptoKeyResourceInner; + +/** + * An instance of this class provides access to all the operations defined in CryptoKeysClient. + */ +public interface CryptoKeysClient { + /** + * Lists cryptographic key analysis results found in a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of crypto keys as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId); + + /** + * Lists cryptographic key analysis results found in a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of crypto keys as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId, Context context); +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/CvesClient.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/CvesClient.java new file mode 100644 index 0000000000000..1f30566ff7fa6 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/CvesClient.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.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.iotfirmwaredefense.fluent.models.CveResourceInner; + +/** + * An instance of this class provides access to all the operations defined in CvesClient. + */ +public interface CvesClient { + /** + * Lists CVE analysis results of a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of CVE results as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByFirmware(String resourceGroupName, String workspaceName, String firmwareId); + + /** + * Lists CVE analysis results of a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of CVE results as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByFirmware(String resourceGroupName, String workspaceName, String firmwareId, + Context context); +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/FirmwaresClient.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/FirmwaresClient.java index 2b52cc81adea3..3966be2042cbf 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/FirmwaresClient.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/FirmwaresClient.java @@ -9,26 +9,17 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.BinaryHardeningInner; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.BinaryHardeningSummaryInner; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.ComponentInner; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CryptoCertificateInner; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CryptoCertificateSummaryInner; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CryptoKeyInner; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CryptoKeySummaryInner; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CveInner; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CveSummaryInner; import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.FirmwareInner; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.FirmwareSummaryInner; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.PasswordHashInner; import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.UrlTokenInner; import com.azure.resourcemanager.iotfirmwaredefense.models.FirmwareUpdateDefinition; -/** An instance of this class provides access to all the operations defined in FirmwaresClient. */ +/** + * An instance of this class provides access to all the operations defined in FirmwaresClient. + */ public interface FirmwaresClient { /** * Lists all of firmwares inside a workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -41,7 +32,7 @@ public interface FirmwaresClient { /** * Lists all of firmwares inside a workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param context The context to associate with this operation. @@ -55,7 +46,7 @@ public interface FirmwaresClient { /** * The operation to create a firmware. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -67,12 +58,12 @@ public interface FirmwaresClient { * @return firmware definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse( - String resourceGroupName, String workspaceName, String firmwareId, FirmwareInner firmware, Context context); + Response createWithResponse(String resourceGroupName, String workspaceName, String firmwareId, + FirmwareInner firmware, Context context); /** * The operation to create a firmware. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -87,7 +78,7 @@ Response createWithResponse( /** * The operation to update firmware. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -99,16 +90,12 @@ Response createWithResponse( * @return firmware definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, - String workspaceName, - String firmwareId, - FirmwareUpdateDefinition firmware, - Context context); + Response updateWithResponse(String resourceGroupName, String workspaceName, String firmwareId, + FirmwareUpdateDefinition firmware, Context context); /** * The operation to update firmware. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -119,12 +106,12 @@ Response updateWithResponse( * @return firmware definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - FirmwareInner update( - String resourceGroupName, String workspaceName, String firmwareId, FirmwareUpdateDefinition firmware); + FirmwareInner update(String resourceGroupName, String workspaceName, String firmwareId, + FirmwareUpdateDefinition firmware); /** * The operation to delete a firmware. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -135,12 +122,12 @@ FirmwareInner update( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String firmwareId, Context context); + Response deleteWithResponse(String resourceGroupName, String workspaceName, String firmwareId, + Context context); /** * The operation to delete a firmware. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -153,7 +140,7 @@ Response deleteWithResponse( /** * Get firmware. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -164,12 +151,12 @@ Response deleteWithResponse( * @return firmware along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String firmwareId, Context context); + Response getWithResponse(String resourceGroupName, String workspaceName, String firmwareId, + Context context); /** * Get firmware. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -183,7 +170,7 @@ Response getWithResponse( /** * The operation to a url for file download. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -194,12 +181,12 @@ Response getWithResponse( * @return url data for creating or accessing a blob file along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response generateDownloadUrlWithResponse( - String resourceGroupName, String workspaceName, String firmwareId, Context context); + Response generateDownloadUrlWithResponse(String resourceGroupName, String workspaceName, + String firmwareId, Context context); /** * The operation to a url for file download. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -213,7 +200,7 @@ Response generateDownloadUrlWithResponse( /** * The operation to a url for tar file download. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -224,12 +211,12 @@ Response generateDownloadUrlWithResponse( * @return url data for creating or accessing a blob file along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response generateFilesystemDownloadUrlWithResponse( - String resourceGroupName, String workspaceName, String firmwareId, Context context); + Response generateFilesystemDownloadUrlWithResponse(String resourceGroupName, String workspaceName, + String firmwareId, Context context); /** * The operation to a url for tar file download. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -240,406 +227,4 @@ Response generateFilesystemDownloadUrlWithResponse( */ @ServiceMethod(returns = ReturnType.SINGLE) UrlTokenInner generateFilesystemDownloadUrl(String resourceGroupName, String workspaceName, String firmwareId); - - /** - * The operation to get a scan summary. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return summary result after scanning the firmware along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response generateSummaryWithResponse( - String resourceGroupName, String workspaceName, String firmwareId, Context context); - - /** - * The operation to get a scan summary. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return summary result after scanning the firmware. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - FirmwareSummaryInner generateSummary(String resourceGroupName, String workspaceName, String firmwareId); - - /** - * The operation to list all components result for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list result for components as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listGenerateComponentList( - String resourceGroupName, String workspaceName, String firmwareId); - - /** - * The operation to list all components result for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list result for components as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listGenerateComponentList( - String resourceGroupName, String workspaceName, String firmwareId, Context context); - - /** - * The operation to get component details for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return component of a firmware along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response generateComponentDetailsWithResponse( - String resourceGroupName, String workspaceName, String firmwareId, Context context); - - /** - * The operation to get component details for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return component of a firmware. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComponentInner generateComponentDetails(String resourceGroupName, String workspaceName, String firmwareId); - - /** - * The operation to list all binary hardening result for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list result for binary hardening as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listGenerateBinaryHardeningList( - String resourceGroupName, String workspaceName, String firmwareId); - - /** - * The operation to list all binary hardening result for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list result for binary hardening as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listGenerateBinaryHardeningList( - String resourceGroupName, String workspaceName, String firmwareId, Context context); - - /** - * The operation to list the binary hardening summary percentages for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return binary hardening summary percentages along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response generateBinaryHardeningSummaryWithResponse( - String resourceGroupName, String workspaceName, String firmwareId, Context context); - - /** - * The operation to list the binary hardening summary percentages for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return binary hardening summary percentages. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BinaryHardeningSummaryInner generateBinaryHardeningSummary( - String resourceGroupName, String workspaceName, String firmwareId); - - /** - * The operation to get binary hardening details for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return binary hardening of a firmware along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response generateBinaryHardeningDetailsWithResponse( - String resourceGroupName, String workspaceName, String firmwareId, Context context); - - /** - * The operation to get binary hardening details for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return binary hardening of a firmware. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BinaryHardeningInner generateBinaryHardeningDetails( - String resourceGroupName, String workspaceName, String firmwareId); - - /** - * The operation to list all password hashes for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return password hashes list as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listGeneratePasswordHashList( - String resourceGroupName, String workspaceName, String firmwareId); - - /** - * The operation to list all password hashes for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return password hashes list as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listGeneratePasswordHashList( - String resourceGroupName, String workspaceName, String firmwareId, Context context); - - /** - * The operation to list all cve results for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list result for CVE as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listGenerateCveList(String resourceGroupName, String workspaceName, String firmwareId); - - /** - * The operation to list all cve results for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list result for CVE as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listGenerateCveList( - String resourceGroupName, String workspaceName, String firmwareId, Context context); - - /** - * The operation to provide a high level summary of the CVEs reported for the firmware image. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cVE summary values along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response generateCveSummaryWithResponse( - String resourceGroupName, String workspaceName, String firmwareId, Context context); - - /** - * The operation to provide a high level summary of the CVEs reported for the firmware image. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cVE summary values. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CveSummaryInner generateCveSummary(String resourceGroupName, String workspaceName, String firmwareId); - - /** - * The operation to provide a high level summary of the discovered cryptographic certificates reported for the - * firmware image. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cryptographic certificate summary values along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response generateCryptoCertificateSummaryWithResponse( - String resourceGroupName, String workspaceName, String firmwareId, Context context); - - /** - * The operation to provide a high level summary of the discovered cryptographic certificates reported for the - * firmware image. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cryptographic certificate summary values. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CryptoCertificateSummaryInner generateCryptoCertificateSummary( - String resourceGroupName, String workspaceName, String firmwareId); - - /** - * The operation to provide a high level summary of the discovered cryptographic keys reported for the firmware - * image. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cryptographic key summary values along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response generateCryptoKeySummaryWithResponse( - String resourceGroupName, String workspaceName, String firmwareId, Context context); - - /** - * The operation to provide a high level summary of the discovered cryptographic keys reported for the firmware - * image. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cryptographic key summary values. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CryptoKeySummaryInner generateCryptoKeySummary(String resourceGroupName, String workspaceName, String firmwareId); - - /** - * The operation to list all crypto certificates for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return crypto certificates list as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listGenerateCryptoCertificateList( - String resourceGroupName, String workspaceName, String firmwareId); - - /** - * The operation to list all crypto certificates for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return crypto certificates list as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listGenerateCryptoCertificateList( - String resourceGroupName, String workspaceName, String firmwareId, Context context); - - /** - * The operation to list all crypto keys for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return crypto keys list as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listGenerateCryptoKeyList( - String resourceGroupName, String workspaceName, String firmwareId); - - /** - * The operation to list all crypto keys for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return crypto keys list as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listGenerateCryptoKeyList( - String resourceGroupName, String workspaceName, String firmwareId, Context context); } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/Fist.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/Fist.java deleted file mode 100644 index dd7e8b60df716..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/Fist.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.iotfirmwaredefense.fluent; - -import com.azure.core.http.HttpPipeline; -import java.time.Duration; - -/** The interface for Fist class. */ -public interface Fist { - /** - * Gets The ID of the target subscription. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets server parameter. - * - * @return the endpoint value. - */ - String getEndpoint(); - - /** - * Gets Api Version. - * - * @return the apiVersion value. - */ - String getApiVersion(); - - /** - * Gets The HTTP pipeline to send requests through. - * - * @return the httpPipeline value. - */ - HttpPipeline getHttpPipeline(); - - /** - * Gets The default poll interval for long-running operation. - * - * @return the defaultPollInterval value. - */ - Duration getDefaultPollInterval(); - - /** - * Gets the FirmwaresClient object to access its operations. - * - * @return the FirmwaresClient object. - */ - FirmwaresClient getFirmwares(); - - /** - * Gets the WorkspacesClient object to access its operations. - * - * @return the WorkspacesClient object. - */ - WorkspacesClient getWorkspaces(); - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - OperationsClient getOperations(); -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/IoTFirmwareDefense.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/IoTFirmwareDefense.java new file mode 100644 index 0000000000000..8910eeb3e362b --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/IoTFirmwareDefense.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.fluent; + +import com.azure.core.http.HttpPipeline; +import java.time.Duration; + +/** + * The interface for IoTFirmwareDefense class. + */ +public interface IoTFirmwareDefense { + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + String getSubscriptionId(); + + /** + * Gets server parameter. + * + * @return the endpoint value. + */ + String getEndpoint(); + + /** + * Gets Api Version. + * + * @return the apiVersion value. + */ + String getApiVersion(); + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + HttpPipeline getHttpPipeline(); + + /** + * Gets The default poll interval for long-running operation. + * + * @return the defaultPollInterval value. + */ + Duration getDefaultPollInterval(); + + /** + * Gets the BinaryHardeningsClient object to access its operations. + * + * @return the BinaryHardeningsClient object. + */ + BinaryHardeningsClient getBinaryHardenings(); + + /** + * Gets the CryptoCertificatesClient object to access its operations. + * + * @return the CryptoCertificatesClient object. + */ + CryptoCertificatesClient getCryptoCertificates(); + + /** + * Gets the CryptoKeysClient object to access its operations. + * + * @return the CryptoKeysClient object. + */ + CryptoKeysClient getCryptoKeys(); + + /** + * Gets the CvesClient object to access its operations. + * + * @return the CvesClient object. + */ + CvesClient getCves(); + + /** + * Gets the FirmwaresClient object to access its operations. + * + * @return the FirmwaresClient object. + */ + FirmwaresClient getFirmwares(); + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + OperationsClient getOperations(); + + /** + * Gets the PasswordHashesClient object to access its operations. + * + * @return the PasswordHashesClient object. + */ + PasswordHashesClient getPasswordHashes(); + + /** + * Gets the SbomComponentsClient object to access its operations. + * + * @return the SbomComponentsClient object. + */ + SbomComponentsClient getSbomComponents(); + + /** + * Gets the SummariesClient object to access its operations. + * + * @return the SummariesClient object. + */ + SummariesClient getSummaries(); + + /** + * Gets the WorkspacesClient object to access its operations. + * + * @return the WorkspacesClient object. + */ + WorkspacesClient getWorkspaces(); +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/OperationsClient.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/OperationsClient.java index a6f466c735d01..2c1ecd598b94b 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/OperationsClient.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/OperationsClient.java @@ -10,28 +10,30 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.OperationInner; -/** An instance of this class provides access to all the operations defined in OperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ public interface OperationsClient { /** * Lists the operations for this resource provider. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** * Lists the operations for this resource provider. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/PasswordHashesClient.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/PasswordHashesClient.java new file mode 100644 index 0000000000000..816f0abf61bf7 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/PasswordHashesClient.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.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.iotfirmwaredefense.fluent.models.PasswordHashResourceInner; + +/** + * An instance of this class provides access to all the operations defined in PasswordHashesClient. + */ +public interface PasswordHashesClient { + /** + * Lists password hash analysis results of a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of password hash results as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId); + + /** + * Lists password hash analysis results of a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of password hash results as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId, Context context); +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/SbomComponentsClient.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/SbomComponentsClient.java new file mode 100644 index 0000000000000..109ea4fc1b370 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/SbomComponentsClient.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.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.iotfirmwaredefense.fluent.models.SbomComponentResourceInner; + +/** + * An instance of this class provides access to all the operations defined in SbomComponentsClient. + */ +public interface SbomComponentsClient { + /** + * Lists SBOM analysis results of a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of SBOM results as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId); + + /** + * Lists SBOM analysis results of a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of SBOM results as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId, Context context); +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/SummariesClient.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/SummariesClient.java new file mode 100644 index 0000000000000..cb65fe78869a6 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/SummariesClient.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.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.iotfirmwaredefense.fluent.models.SummaryResourceInner; +import com.azure.resourcemanager.iotfirmwaredefense.models.SummaryName; + +/** + * An instance of this class provides access to all the operations defined in SummariesClient. + */ +public interface SummariesClient { + /** + * Lists analysis result summary names of a firmware. To fetch the full summary data, get that summary by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of analysis summaries as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId); + + /** + * Lists analysis result summary names of a firmware. To fetch the full summary data, get that summary by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of analysis summaries as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId, Context context); + + /** + * Get an analysis result summary of a firmware by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @param summaryName The Firmware analysis summary name describing the type of summary. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an analysis result summary of a firmware by name along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String workspaceName, String firmwareId, + SummaryName summaryName, Context context); + + /** + * Get an analysis result summary of a firmware by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @param summaryName The Firmware analysis summary name describing the type of summary. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an analysis result summary of a firmware by name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SummaryResourceInner get(String resourceGroupName, String workspaceName, String firmwareId, + SummaryName summaryName); +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/WorkspacesClient.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/WorkspacesClient.java index ca7c6040a3d61..a69ea8da5bbb1 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/WorkspacesClient.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/WorkspacesClient.java @@ -14,11 +14,13 @@ import com.azure.resourcemanager.iotfirmwaredefense.models.GenerateUploadUrlRequest; import com.azure.resourcemanager.iotfirmwaredefense.models.WorkspaceUpdateDefinition; -/** An instance of this class provides access to all the operations defined in WorkspacesClient. */ +/** + * An instance of this class provides access to all the operations defined in WorkspacesClient. + */ public interface WorkspacesClient { /** * Lists all of the firmware analysis workspaces in the specified subscription. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return return a list of firmware analysis workspaces as paginated response with {@link PagedIterable}. @@ -28,7 +30,7 @@ public interface WorkspacesClient { /** * Lists all of the firmware analysis workspaces in the specified subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -40,7 +42,7 @@ public interface WorkspacesClient { /** * Lists all of the firmware analysis workspaces in the specified resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -52,7 +54,7 @@ public interface WorkspacesClient { /** * Lists all of the firmware analysis workspaces in the specified resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -65,7 +67,7 @@ public interface WorkspacesClient { /** * The operation to create or update a firmware analysis workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param workspace Parameters when creating a firmware analysis workspace. @@ -76,12 +78,12 @@ public interface WorkspacesClient { * @return firmware analysis workspace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse( - String resourceGroupName, String workspaceName, WorkspaceInner workspace, Context context); + Response createWithResponse(String resourceGroupName, String workspaceName, + WorkspaceInner workspace, Context context); /** * The operation to create or update a firmware analysis workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param workspace Parameters when creating a firmware analysis workspace. @@ -95,7 +97,7 @@ Response createWithResponse( /** * The operation to update a firmware analysis workspaces. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param workspace Parameters when updating a firmware analysis workspace. @@ -106,12 +108,12 @@ Response createWithResponse( * @return firmware analysis workspace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, String workspaceName, WorkspaceUpdateDefinition workspace, Context context); + Response updateWithResponse(String resourceGroupName, String workspaceName, + WorkspaceUpdateDefinition workspace, Context context); /** * The operation to update a firmware analysis workspaces. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param workspace Parameters when updating a firmware analysis workspace. @@ -125,7 +127,7 @@ Response updateWithResponse( /** * The operation to delete a firmware analysis workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param context The context to associate with this operation. @@ -139,7 +141,7 @@ Response updateWithResponse( /** * The operation to delete a firmware analysis workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -151,7 +153,7 @@ Response updateWithResponse( /** * Get firmware analysis workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param context The context to associate with this operation. @@ -161,12 +163,12 @@ Response updateWithResponse( * @return firmware analysis workspace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String workspaceName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String workspaceName, + Context context); /** * Get firmware analysis workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -179,7 +181,7 @@ Response getByResourceGroupWithResponse( /** * The operation to get a url for file upload. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param generateUploadUrl Parameters when requesting a URL to upload firmware. @@ -190,12 +192,12 @@ Response getByResourceGroupWithResponse( * @return url data for creating or accessing a blob file along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response generateUploadUrlWithResponse( - String resourceGroupName, String workspaceName, GenerateUploadUrlRequest generateUploadUrl, Context context); + Response generateUploadUrlWithResponse(String resourceGroupName, String workspaceName, + GenerateUploadUrlRequest generateUploadUrl, Context context); /** * The operation to get a url for file upload. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param generateUploadUrl Parameters when requesting a URL to upload firmware. @@ -205,6 +207,6 @@ Response generateUploadUrlWithResponse( * @return url data for creating or accessing a blob file. */ @ServiceMethod(returns = ReturnType.SINGLE) - UrlTokenInner generateUploadUrl( - String resourceGroupName, String workspaceName, GenerateUploadUrlRequest generateUploadUrl); + UrlTokenInner generateUploadUrl(String resourceGroupName, String workspaceName, + GenerateUploadUrlRequest generateUploadUrl); } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/BinaryHardeningFeatures.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/BinaryHardeningFeatures.java index fe437801507c7..e9f07a37166f1 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/BinaryHardeningFeatures.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/BinaryHardeningFeatures.java @@ -5,153 +5,152 @@ package com.azure.resourcemanager.iotfirmwaredefense.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.iotfirmwaredefense.models.CanaryFlag; -import com.azure.resourcemanager.iotfirmwaredefense.models.NxFlag; -import com.azure.resourcemanager.iotfirmwaredefense.models.PieFlag; -import com.azure.resourcemanager.iotfirmwaredefense.models.RelroFlag; -import com.azure.resourcemanager.iotfirmwaredefense.models.StrippedFlag; import com.fasterxml.jackson.annotation.JsonProperty; -/** Binary hardening features. */ +/** + * Binary hardening features. + */ @Fluent public final class BinaryHardeningFeatures { /* - * NX flag. + * NX (no-execute) flag. */ @JsonProperty(value = "nx") - private NxFlag nx; + private Boolean nx; /* - * PIE flag. + * PIE (position independent executable) flag. */ @JsonProperty(value = "pie") - private PieFlag pie; + private Boolean pie; /* - * RELRO flag. + * RELRO (relocation read-only) flag. */ @JsonProperty(value = "relro") - private RelroFlag relro; + private Boolean relro; /* - * Canary flag. + * Canary (stack canaries) flag. */ @JsonProperty(value = "canary") - private CanaryFlag canary; + private Boolean canary; /* * Stripped flag. */ @JsonProperty(value = "stripped") - private StrippedFlag stripped; + private Boolean stripped; - /** Creates an instance of BinaryHardeningFeatures class. */ + /** + * Creates an instance of BinaryHardeningFeatures class. + */ public BinaryHardeningFeatures() { } /** - * Get the nx property: NX flag. - * + * Get the nx property: NX (no-execute) flag. + * * @return the nx value. */ - public NxFlag nx() { + public Boolean nx() { return this.nx; } /** - * Set the nx property: NX flag. - * + * Set the nx property: NX (no-execute) flag. + * * @param nx the nx value to set. * @return the BinaryHardeningFeatures object itself. */ - public BinaryHardeningFeatures withNx(NxFlag nx) { + public BinaryHardeningFeatures withNx(Boolean nx) { this.nx = nx; return this; } /** - * Get the pie property: PIE flag. - * + * Get the pie property: PIE (position independent executable) flag. + * * @return the pie value. */ - public PieFlag pie() { + public Boolean pie() { return this.pie; } /** - * Set the pie property: PIE flag. - * + * Set the pie property: PIE (position independent executable) flag. + * * @param pie the pie value to set. * @return the BinaryHardeningFeatures object itself. */ - public BinaryHardeningFeatures withPie(PieFlag pie) { + public BinaryHardeningFeatures withPie(Boolean pie) { this.pie = pie; return this; } /** - * Get the relro property: RELRO flag. - * + * Get the relro property: RELRO (relocation read-only) flag. + * * @return the relro value. */ - public RelroFlag relro() { + public Boolean relro() { return this.relro; } /** - * Set the relro property: RELRO flag. - * + * Set the relro property: RELRO (relocation read-only) flag. + * * @param relro the relro value to set. * @return the BinaryHardeningFeatures object itself. */ - public BinaryHardeningFeatures withRelro(RelroFlag relro) { + public BinaryHardeningFeatures withRelro(Boolean relro) { this.relro = relro; return this; } /** - * Get the canary property: Canary flag. - * + * Get the canary property: Canary (stack canaries) flag. + * * @return the canary value. */ - public CanaryFlag canary() { + public Boolean canary() { return this.canary; } /** - * Set the canary property: Canary flag. - * + * Set the canary property: Canary (stack canaries) flag. + * * @param canary the canary value to set. * @return the BinaryHardeningFeatures object itself. */ - public BinaryHardeningFeatures withCanary(CanaryFlag canary) { + public BinaryHardeningFeatures withCanary(Boolean canary) { this.canary = canary; return this; } /** * Get the stripped property: Stripped flag. - * + * * @return the stripped value. */ - public StrippedFlag stripped() { + public Boolean stripped() { return this.stripped; } /** * Set the stripped property: Stripped flag. - * + * * @param stripped the stripped value to set. * @return the BinaryHardeningFeatures object itself. */ - public BinaryHardeningFeatures withStripped(StrippedFlag stripped) { + public BinaryHardeningFeatures withStripped(Boolean stripped) { this.stripped = stripped; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/BinaryHardeningResourceInner.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/BinaryHardeningResourceInner.java new file mode 100644 index 0000000000000..443c1b36cedd8 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/BinaryHardeningResourceInner.java @@ -0,0 +1,316 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * binary hardening analysis result resource. + */ +@Fluent +public final class BinaryHardeningResourceInner extends ProxyResource { + /* + * The properties of a binary hardening result found within a firmware image + */ + @JsonProperty(value = "properties") + private BinaryHardeningResult innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of BinaryHardeningResourceInner class. + */ + public BinaryHardeningResourceInner() { + } + + /** + * Get the innerProperties property: The properties of a binary hardening result found within a firmware image. + * + * @return the innerProperties value. + */ + private BinaryHardeningResult innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the binaryHardeningId property: ID for the binary hardening result. + * + * @return the binaryHardeningId value. + */ + public String binaryHardeningId() { + return this.innerProperties() == null ? null : this.innerProperties().binaryHardeningId(); + } + + /** + * Set the binaryHardeningId property: ID for the binary hardening result. + * + * @param binaryHardeningId the binaryHardeningId value to set. + * @return the BinaryHardeningResourceInner object itself. + */ + public BinaryHardeningResourceInner withBinaryHardeningId(String binaryHardeningId) { + if (this.innerProperties() == null) { + this.innerProperties = new BinaryHardeningResult(); + } + this.innerProperties().withBinaryHardeningId(binaryHardeningId); + return this; + } + + /** + * Get the architecture property: The architecture of the uploaded firmware. + * + * @return the architecture value. + */ + public String architecture() { + return this.innerProperties() == null ? null : this.innerProperties().architecture(); + } + + /** + * Set the architecture property: The architecture of the uploaded firmware. + * + * @param architecture the architecture value to set. + * @return the BinaryHardeningResourceInner object itself. + */ + public BinaryHardeningResourceInner withArchitecture(String architecture) { + if (this.innerProperties() == null) { + this.innerProperties = new BinaryHardeningResult(); + } + this.innerProperties().withArchitecture(architecture); + return this; + } + + /** + * Get the filePath property: The executable path. + * + * @return the filePath value. + */ + public String filePath() { + return this.innerProperties() == null ? null : this.innerProperties().filePath(); + } + + /** + * Set the filePath property: The executable path. + * + * @param filePath the filePath value to set. + * @return the BinaryHardeningResourceInner object itself. + */ + public BinaryHardeningResourceInner withFilePath(String filePath) { + if (this.innerProperties() == null) { + this.innerProperties = new BinaryHardeningResult(); + } + this.innerProperties().withFilePath(filePath); + return this; + } + + /** + * Get the classProperty property: The executable class to indicate 32 or 64 bit. + * + * @return the classProperty value. + */ + public String classProperty() { + return this.innerProperties() == null ? null : this.innerProperties().classProperty(); + } + + /** + * Set the classProperty property: The executable class to indicate 32 or 64 bit. + * + * @param classProperty the classProperty value to set. + * @return the BinaryHardeningResourceInner object itself. + */ + public BinaryHardeningResourceInner withClassProperty(String classProperty) { + if (this.innerProperties() == null) { + this.innerProperties = new BinaryHardeningResult(); + } + this.innerProperties().withClassProperty(classProperty); + return this; + } + + /** + * Get the runpath property: The runpath of the uploaded firmware. + * + * @return the runpath value. + */ + public String runpath() { + return this.innerProperties() == null ? null : this.innerProperties().runpath(); + } + + /** + * Set the runpath property: The runpath of the uploaded firmware. + * + * @param runpath the runpath value to set. + * @return the BinaryHardeningResourceInner object itself. + */ + public BinaryHardeningResourceInner withRunpath(String runpath) { + if (this.innerProperties() == null) { + this.innerProperties = new BinaryHardeningResult(); + } + this.innerProperties().withRunpath(runpath); + return this; + } + + /** + * Get the rpath property: The rpath of the uploaded firmware. + * + * @return the rpath value. + */ + public String rpath() { + return this.innerProperties() == null ? null : this.innerProperties().rpath(); + } + + /** + * Set the rpath property: The rpath of the uploaded firmware. + * + * @param rpath the rpath value to set. + * @return the BinaryHardeningResourceInner object itself. + */ + public BinaryHardeningResourceInner withRpath(String rpath) { + if (this.innerProperties() == null) { + this.innerProperties = new BinaryHardeningResult(); + } + this.innerProperties().withRpath(rpath); + return this; + } + + /** + * Get the nx property: NX (no-execute) flag. + * + * @return the nx value. + */ + public Boolean nx() { + return this.innerProperties() == null ? null : this.innerProperties().nx(); + } + + /** + * Set the nx property: NX (no-execute) flag. + * + * @param nx the nx value to set. + * @return the BinaryHardeningResourceInner object itself. + */ + public BinaryHardeningResourceInner withNx(Boolean nx) { + if (this.innerProperties() == null) { + this.innerProperties = new BinaryHardeningResult(); + } + this.innerProperties().withNx(nx); + return this; + } + + /** + * Get the pie property: PIE (position independent executable) flag. + * + * @return the pie value. + */ + public Boolean pie() { + return this.innerProperties() == null ? null : this.innerProperties().pie(); + } + + /** + * Set the pie property: PIE (position independent executable) flag. + * + * @param pie the pie value to set. + * @return the BinaryHardeningResourceInner object itself. + */ + public BinaryHardeningResourceInner withPie(Boolean pie) { + if (this.innerProperties() == null) { + this.innerProperties = new BinaryHardeningResult(); + } + this.innerProperties().withPie(pie); + return this; + } + + /** + * Get the relro property: RELRO (relocation read-only) flag. + * + * @return the relro value. + */ + public Boolean relro() { + return this.innerProperties() == null ? null : this.innerProperties().relro(); + } + + /** + * Set the relro property: RELRO (relocation read-only) flag. + * + * @param relro the relro value to set. + * @return the BinaryHardeningResourceInner object itself. + */ + public BinaryHardeningResourceInner withRelro(Boolean relro) { + if (this.innerProperties() == null) { + this.innerProperties = new BinaryHardeningResult(); + } + this.innerProperties().withRelro(relro); + return this; + } + + /** + * Get the canary property: Canary (stack canaries) flag. + * + * @return the canary value. + */ + public Boolean canary() { + return this.innerProperties() == null ? null : this.innerProperties().canary(); + } + + /** + * Set the canary property: Canary (stack canaries) flag. + * + * @param canary the canary value to set. + * @return the BinaryHardeningResourceInner object itself. + */ + public BinaryHardeningResourceInner withCanary(Boolean canary) { + if (this.innerProperties() == null) { + this.innerProperties = new BinaryHardeningResult(); + } + this.innerProperties().withCanary(canary); + return this; + } + + /** + * Get the stripped property: Stripped flag. + * + * @return the stripped value. + */ + public Boolean stripped() { + return this.innerProperties() == null ? null : this.innerProperties().stripped(); + } + + /** + * Set the stripped property: Stripped flag. + * + * @param stripped the stripped value to set. + * @return the BinaryHardeningResourceInner object itself. + */ + public BinaryHardeningResourceInner withStripped(Boolean stripped) { + if (this.innerProperties() == null) { + this.innerProperties = new BinaryHardeningResult(); + } + this.innerProperties().withStripped(stripped); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/BinaryHardeningInner.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/BinaryHardeningResult.java similarity index 65% rename from sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/BinaryHardeningInner.java rename to sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/BinaryHardeningResult.java index cd64564164d06..dc31bef3f0972 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/BinaryHardeningInner.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/BinaryHardeningResult.java @@ -5,16 +5,13 @@ package com.azure.resourcemanager.iotfirmwaredefense.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.iotfirmwaredefense.models.CanaryFlag; -import com.azure.resourcemanager.iotfirmwaredefense.models.NxFlag; -import com.azure.resourcemanager.iotfirmwaredefense.models.PieFlag; -import com.azure.resourcemanager.iotfirmwaredefense.models.RelroFlag; -import com.azure.resourcemanager.iotfirmwaredefense.models.StrippedFlag; import com.fasterxml.jackson.annotation.JsonProperty; -/** Binary hardening of a firmware. */ +/** + * Binary hardening of a firmware. + */ @Fluent -public final class BinaryHardeningInner { +public final class BinaryHardeningResult { /* * ID for the binary hardening result. */ @@ -34,13 +31,13 @@ public final class BinaryHardeningInner { private String architecture; /* - * path for binary hardening. + * The executable path. */ - @JsonProperty(value = "path") - private String path; + @JsonProperty(value = "filePath") + private String filePath; /* - * class for binary hardening. + * The executable class to indicate 32 or 64 bit. */ @JsonProperty(value = "class") private String classProperty; @@ -57,13 +54,15 @@ public final class BinaryHardeningInner { @JsonProperty(value = "rpath") private String rpath; - /** Creates an instance of BinaryHardeningInner class. */ - public BinaryHardeningInner() { + /** + * Creates an instance of BinaryHardeningResult class. + */ + public BinaryHardeningResult() { } /** * Get the binaryHardeningId property: ID for the binary hardening result. - * + * * @return the binaryHardeningId value. */ public String binaryHardeningId() { @@ -72,18 +71,18 @@ public String binaryHardeningId() { /** * Set the binaryHardeningId property: ID for the binary hardening result. - * + * * @param binaryHardeningId the binaryHardeningId value to set. - * @return the BinaryHardeningInner object itself. + * @return the BinaryHardeningResult object itself. */ - public BinaryHardeningInner withBinaryHardeningId(String binaryHardeningId) { + public BinaryHardeningResult withBinaryHardeningId(String binaryHardeningId) { this.binaryHardeningId = binaryHardeningId; return this; } /** * Get the innerFeatures property: Binary hardening features. - * + * * @return the innerFeatures value. */ private BinaryHardeningFeatures innerFeatures() { @@ -92,7 +91,7 @@ private BinaryHardeningFeatures innerFeatures() { /** * Get the architecture property: The architecture of the uploaded firmware. - * + * * @return the architecture value. */ public String architecture() { @@ -101,38 +100,38 @@ public String architecture() { /** * Set the architecture property: The architecture of the uploaded firmware. - * + * * @param architecture the architecture value to set. - * @return the BinaryHardeningInner object itself. + * @return the BinaryHardeningResult object itself. */ - public BinaryHardeningInner withArchitecture(String architecture) { + public BinaryHardeningResult withArchitecture(String architecture) { this.architecture = architecture; return this; } /** - * Get the path property: path for binary hardening. - * - * @return the path value. + * Get the filePath property: The executable path. + * + * @return the filePath value. */ - public String path() { - return this.path; + public String filePath() { + return this.filePath; } /** - * Set the path property: path for binary hardening. - * - * @param path the path value to set. - * @return the BinaryHardeningInner object itself. + * Set the filePath property: The executable path. + * + * @param filePath the filePath value to set. + * @return the BinaryHardeningResult object itself. */ - public BinaryHardeningInner withPath(String path) { - this.path = path; + public BinaryHardeningResult withFilePath(String filePath) { + this.filePath = filePath; return this; } /** - * Get the classProperty property: class for binary hardening. - * + * Get the classProperty property: The executable class to indicate 32 or 64 bit. + * * @return the classProperty value. */ public String classProperty() { @@ -140,19 +139,19 @@ public String classProperty() { } /** - * Set the classProperty property: class for binary hardening. - * + * Set the classProperty property: The executable class to indicate 32 or 64 bit. + * * @param classProperty the classProperty value to set. - * @return the BinaryHardeningInner object itself. + * @return the BinaryHardeningResult object itself. */ - public BinaryHardeningInner withClassProperty(String classProperty) { + public BinaryHardeningResult withClassProperty(String classProperty) { this.classProperty = classProperty; return this; } /** * Get the runpath property: The runpath of the uploaded firmware. - * + * * @return the runpath value. */ public String runpath() { @@ -161,18 +160,18 @@ public String runpath() { /** * Set the runpath property: The runpath of the uploaded firmware. - * + * * @param runpath the runpath value to set. - * @return the BinaryHardeningInner object itself. + * @return the BinaryHardeningResult object itself. */ - public BinaryHardeningInner withRunpath(String runpath) { + public BinaryHardeningResult withRunpath(String runpath) { this.runpath = runpath; return this; } /** * Get the rpath property: The rpath of the uploaded firmware. - * + * * @return the rpath value. */ public String rpath() { @@ -181,31 +180,31 @@ public String rpath() { /** * Set the rpath property: The rpath of the uploaded firmware. - * + * * @param rpath the rpath value to set. - * @return the BinaryHardeningInner object itself. + * @return the BinaryHardeningResult object itself. */ - public BinaryHardeningInner withRpath(String rpath) { + public BinaryHardeningResult withRpath(String rpath) { this.rpath = rpath; return this; } /** - * Get the nx property: NX flag. - * + * Get the nx property: NX (no-execute) flag. + * * @return the nx value. */ - public NxFlag nx() { + public Boolean nx() { return this.innerFeatures() == null ? null : this.innerFeatures().nx(); } /** - * Set the nx property: NX flag. - * + * Set the nx property: NX (no-execute) flag. + * * @param nx the nx value to set. - * @return the BinaryHardeningInner object itself. + * @return the BinaryHardeningResult object itself. */ - public BinaryHardeningInner withNx(NxFlag nx) { + public BinaryHardeningResult withNx(Boolean nx) { if (this.innerFeatures() == null) { this.innerFeatures = new BinaryHardeningFeatures(); } @@ -214,21 +213,21 @@ public BinaryHardeningInner withNx(NxFlag nx) { } /** - * Get the pie property: PIE flag. - * + * Get the pie property: PIE (position independent executable) flag. + * * @return the pie value. */ - public PieFlag pie() { + public Boolean pie() { return this.innerFeatures() == null ? null : this.innerFeatures().pie(); } /** - * Set the pie property: PIE flag. - * + * Set the pie property: PIE (position independent executable) flag. + * * @param pie the pie value to set. - * @return the BinaryHardeningInner object itself. + * @return the BinaryHardeningResult object itself. */ - public BinaryHardeningInner withPie(PieFlag pie) { + public BinaryHardeningResult withPie(Boolean pie) { if (this.innerFeatures() == null) { this.innerFeatures = new BinaryHardeningFeatures(); } @@ -237,21 +236,21 @@ public BinaryHardeningInner withPie(PieFlag pie) { } /** - * Get the relro property: RELRO flag. - * + * Get the relro property: RELRO (relocation read-only) flag. + * * @return the relro value. */ - public RelroFlag relro() { + public Boolean relro() { return this.innerFeatures() == null ? null : this.innerFeatures().relro(); } /** - * Set the relro property: RELRO flag. - * + * Set the relro property: RELRO (relocation read-only) flag. + * * @param relro the relro value to set. - * @return the BinaryHardeningInner object itself. + * @return the BinaryHardeningResult object itself. */ - public BinaryHardeningInner withRelro(RelroFlag relro) { + public BinaryHardeningResult withRelro(Boolean relro) { if (this.innerFeatures() == null) { this.innerFeatures = new BinaryHardeningFeatures(); } @@ -260,21 +259,21 @@ public BinaryHardeningInner withRelro(RelroFlag relro) { } /** - * Get the canary property: Canary flag. - * + * Get the canary property: Canary (stack canaries) flag. + * * @return the canary value. */ - public CanaryFlag canary() { + public Boolean canary() { return this.innerFeatures() == null ? null : this.innerFeatures().canary(); } /** - * Set the canary property: Canary flag. - * + * Set the canary property: Canary (stack canaries) flag. + * * @param canary the canary value to set. - * @return the BinaryHardeningInner object itself. + * @return the BinaryHardeningResult object itself. */ - public BinaryHardeningInner withCanary(CanaryFlag canary) { + public BinaryHardeningResult withCanary(Boolean canary) { if (this.innerFeatures() == null) { this.innerFeatures = new BinaryHardeningFeatures(); } @@ -284,20 +283,20 @@ public BinaryHardeningInner withCanary(CanaryFlag canary) { /** * Get the stripped property: Stripped flag. - * + * * @return the stripped value. */ - public StrippedFlag stripped() { + public Boolean stripped() { return this.innerFeatures() == null ? null : this.innerFeatures().stripped(); } /** * Set the stripped property: Stripped flag. - * + * * @param stripped the stripped value to set. - * @return the BinaryHardeningInner object itself. + * @return the BinaryHardeningResult object itself. */ - public BinaryHardeningInner withStripped(StrippedFlag stripped) { + public BinaryHardeningResult withStripped(Boolean stripped) { if (this.innerFeatures() == null) { this.innerFeatures = new BinaryHardeningFeatures(); } @@ -307,7 +306,7 @@ public BinaryHardeningInner withStripped(StrippedFlag stripped) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/ComponentInner.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/ComponentInner.java deleted file mode 100644 index a489bcdc2363a..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/ComponentInner.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.iotfirmwaredefense.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.iotfirmwaredefense.models.IsUpdateAvailable; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** Component of a firmware. */ -@Fluent -public final class ComponentInner { - /* - * ID for the component. - */ - @JsonProperty(value = "componentId") - private String componentId; - - /* - * Name for the component. - */ - @JsonProperty(value = "componentName") - private String componentName; - - /* - * Version for the component. - */ - @JsonProperty(value = "version") - private String version; - - /* - * License for the component. - */ - @JsonProperty(value = "license") - private String license; - - /* - * Release date for the component. - */ - @JsonProperty(value = "releaseDate") - private OffsetDateTime releaseDate; - - /* - * Paths of the component. - */ - @JsonProperty(value = "paths") - private List paths; - - /* - * Flag if new update is available for the component. - */ - @JsonProperty(value = "isUpdateAvailable") - private IsUpdateAvailable isUpdateAvailable; - - /** Creates an instance of ComponentInner class. */ - public ComponentInner() { - } - - /** - * Get the componentId property: ID for the component. - * - * @return the componentId value. - */ - public String componentId() { - return this.componentId; - } - - /** - * Set the componentId property: ID for the component. - * - * @param componentId the componentId value to set. - * @return the ComponentInner object itself. - */ - public ComponentInner withComponentId(String componentId) { - this.componentId = componentId; - return this; - } - - /** - * Get the componentName property: Name for the component. - * - * @return the componentName value. - */ - public String componentName() { - return this.componentName; - } - - /** - * Set the componentName property: Name for the component. - * - * @param componentName the componentName value to set. - * @return the ComponentInner object itself. - */ - public ComponentInner withComponentName(String componentName) { - this.componentName = componentName; - return this; - } - - /** - * Get the version property: Version for the component. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Set the version property: Version for the component. - * - * @param version the version value to set. - * @return the ComponentInner object itself. - */ - public ComponentInner withVersion(String version) { - this.version = version; - return this; - } - - /** - * Get the license property: License for the component. - * - * @return the license value. - */ - public String license() { - return this.license; - } - - /** - * Set the license property: License for the component. - * - * @param license the license value to set. - * @return the ComponentInner object itself. - */ - public ComponentInner withLicense(String license) { - this.license = license; - return this; - } - - /** - * Get the releaseDate property: Release date for the component. - * - * @return the releaseDate value. - */ - public OffsetDateTime releaseDate() { - return this.releaseDate; - } - - /** - * Set the releaseDate property: Release date for the component. - * - * @param releaseDate the releaseDate value to set. - * @return the ComponentInner object itself. - */ - public ComponentInner withReleaseDate(OffsetDateTime releaseDate) { - this.releaseDate = releaseDate; - return this; - } - - /** - * Get the paths property: Paths of the component. - * - * @return the paths value. - */ - public List paths() { - return this.paths; - } - - /** - * Set the paths property: Paths of the component. - * - * @param paths the paths value to set. - * @return the ComponentInner object itself. - */ - public ComponentInner withPaths(List paths) { - this.paths = paths; - return this; - } - - /** - * Get the isUpdateAvailable property: Flag if new update is available for the component. - * - * @return the isUpdateAvailable value. - */ - public IsUpdateAvailable isUpdateAvailable() { - return this.isUpdateAvailable; - } - - /** - * Set the isUpdateAvailable property: Flag if new update is available for the component. - * - * @param isUpdateAvailable the isUpdateAvailable value to set. - * @return the ComponentInner object itself. - */ - public ComponentInner withIsUpdateAvailable(IsUpdateAvailable isUpdateAvailable) { - this.isUpdateAvailable = isUpdateAvailable; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/CryptoCertificateInner.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/CryptoCertificate.java similarity index 73% rename from sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/CryptoCertificateInner.java rename to sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/CryptoCertificate.java index 9d8783501c8f1..996ccc9a5663f 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/CryptoCertificateInner.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/CryptoCertificate.java @@ -6,20 +6,18 @@ import com.azure.core.annotation.Fluent; import com.azure.resourcemanager.iotfirmwaredefense.models.CryptoCertificateEntity; -import com.azure.resourcemanager.iotfirmwaredefense.models.IsExpired; -import com.azure.resourcemanager.iotfirmwaredefense.models.IsSelfSigned; -import com.azure.resourcemanager.iotfirmwaredefense.models.IsShortKeySize; -import com.azure.resourcemanager.iotfirmwaredefense.models.IsWeakSignature; import com.azure.resourcemanager.iotfirmwaredefense.models.PairedKey; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; -/** Crypto certificate properties. */ +/** + * Crypto certificate properties. + */ @Fluent -public final class CryptoCertificateInner { +public final class CryptoCertificate { /* - * ID for the certificate. + * ID for the certificate result. */ @JsonProperty(value = "cryptoCertId") private String cryptoCertId; @@ -103,7 +101,7 @@ public final class CryptoCertificateInner { private List usage; /* - * List of files paths for this certificate + * List of files where this certificate was found. */ @JsonProperty(value = "filePaths", access = JsonProperty.Access.WRITE_ONLY) private List filePaths; @@ -118,33 +116,35 @@ public final class CryptoCertificateInner { * Indicates if the certificate is expired. */ @JsonProperty(value = "isExpired") - private IsExpired isExpired; + private Boolean isExpired; /* - * Indicates if the certificate was self-signed. + * Indicates if the certificate is self-signed. */ @JsonProperty(value = "isSelfSigned") - private IsSelfSigned isSelfSigned; + private Boolean isSelfSigned; /* * Indicates the signature algorithm used is insecure. */ @JsonProperty(value = "isWeakSignature") - private IsWeakSignature isWeakSignature; + private Boolean isWeakSignature; /* * Indicates the certificate's key size is considered too small to be secure for the key algorithm. */ @JsonProperty(value = "isShortKeySize") - private IsShortKeySize isShortKeySize; + private Boolean isShortKeySize; - /** Creates an instance of CryptoCertificateInner class. */ - public CryptoCertificateInner() { + /** + * Creates an instance of CryptoCertificate class. + */ + public CryptoCertificate() { } /** - * Get the cryptoCertId property: ID for the certificate. - * + * Get the cryptoCertId property: ID for the certificate result. + * * @return the cryptoCertId value. */ public String cryptoCertId() { @@ -152,19 +152,19 @@ public String cryptoCertId() { } /** - * Set the cryptoCertId property: ID for the certificate. - * + * Set the cryptoCertId property: ID for the certificate result. + * * @param cryptoCertId the cryptoCertId value to set. - * @return the CryptoCertificateInner object itself. + * @return the CryptoCertificate object itself. */ - public CryptoCertificateInner withCryptoCertId(String cryptoCertId) { + public CryptoCertificate withCryptoCertId(String cryptoCertId) { this.cryptoCertId = cryptoCertId; return this; } /** * Get the name property: Name of the certificate. - * + * * @return the name value. */ public String name() { @@ -173,18 +173,18 @@ public String name() { /** * Set the name property: Name of the certificate. - * + * * @param name the name value to set. - * @return the CryptoCertificateInner object itself. + * @return the CryptoCertificate object itself. */ - public CryptoCertificateInner withName(String name) { + public CryptoCertificate withName(String name) { this.name = name; return this; } /** * Get the subject property: Subject information of the certificate. - * + * * @return the subject value. */ public CryptoCertificateEntity subject() { @@ -193,18 +193,18 @@ public CryptoCertificateEntity subject() { /** * Set the subject property: Subject information of the certificate. - * + * * @param subject the subject value to set. - * @return the CryptoCertificateInner object itself. + * @return the CryptoCertificate object itself. */ - public CryptoCertificateInner withSubject(CryptoCertificateEntity subject) { + public CryptoCertificate withSubject(CryptoCertificateEntity subject) { this.subject = subject; return this; } /** * Get the issuer property: Issuer information of the certificate. - * + * * @return the issuer value. */ public CryptoCertificateEntity issuer() { @@ -213,18 +213,18 @@ public CryptoCertificateEntity issuer() { /** * Set the issuer property: Issuer information of the certificate. - * + * * @param issuer the issuer value to set. - * @return the CryptoCertificateInner object itself. + * @return the CryptoCertificate object itself. */ - public CryptoCertificateInner withIssuer(CryptoCertificateEntity issuer) { + public CryptoCertificate withIssuer(CryptoCertificateEntity issuer) { this.issuer = issuer; return this; } /** * Get the issuedDate property: Issue date for the certificate. - * + * * @return the issuedDate value. */ public OffsetDateTime issuedDate() { @@ -233,18 +233,18 @@ public OffsetDateTime issuedDate() { /** * Set the issuedDate property: Issue date for the certificate. - * + * * @param issuedDate the issuedDate value to set. - * @return the CryptoCertificateInner object itself. + * @return the CryptoCertificate object itself. */ - public CryptoCertificateInner withIssuedDate(OffsetDateTime issuedDate) { + public CryptoCertificate withIssuedDate(OffsetDateTime issuedDate) { this.issuedDate = issuedDate; return this; } /** * Get the expirationDate property: Expiration date for the certificate. - * + * * @return the expirationDate value. */ public OffsetDateTime expirationDate() { @@ -253,18 +253,18 @@ public OffsetDateTime expirationDate() { /** * Set the expirationDate property: Expiration date for the certificate. - * + * * @param expirationDate the expirationDate value to set. - * @return the CryptoCertificateInner object itself. + * @return the CryptoCertificate object itself. */ - public CryptoCertificateInner withExpirationDate(OffsetDateTime expirationDate) { + public CryptoCertificate withExpirationDate(OffsetDateTime expirationDate) { this.expirationDate = expirationDate; return this; } /** * Get the role property: Role of the certificate (Root CA, etc). - * + * * @return the role value. */ public String role() { @@ -273,18 +273,18 @@ public String role() { /** * Set the role property: Role of the certificate (Root CA, etc). - * + * * @param role the role value to set. - * @return the CryptoCertificateInner object itself. + * @return the CryptoCertificate object itself. */ - public CryptoCertificateInner withRole(String role) { + public CryptoCertificate withRole(String role) { this.role = role; return this; } /** * Get the signatureAlgorithm property: The signature algorithm used in the certificate. - * + * * @return the signatureAlgorithm value. */ public String signatureAlgorithm() { @@ -293,18 +293,18 @@ public String signatureAlgorithm() { /** * Set the signatureAlgorithm property: The signature algorithm used in the certificate. - * + * * @param signatureAlgorithm the signatureAlgorithm value to set. - * @return the CryptoCertificateInner object itself. + * @return the CryptoCertificate object itself. */ - public CryptoCertificateInner withSignatureAlgorithm(String signatureAlgorithm) { + public CryptoCertificate withSignatureAlgorithm(String signatureAlgorithm) { this.signatureAlgorithm = signatureAlgorithm; return this; } /** * Get the keySize property: Size of the certificate's key in bits. - * + * * @return the keySize value. */ public Long keySize() { @@ -313,18 +313,18 @@ public Long keySize() { /** * Set the keySize property: Size of the certificate's key in bits. - * + * * @param keySize the keySize value to set. - * @return the CryptoCertificateInner object itself. + * @return the CryptoCertificate object itself. */ - public CryptoCertificateInner withKeySize(Long keySize) { + public CryptoCertificate withKeySize(Long keySize) { this.keySize = keySize; return this; } /** * Get the keyAlgorithm property: Key algorithm used in the certificate. - * + * * @return the keyAlgorithm value. */ public String keyAlgorithm() { @@ -333,18 +333,18 @@ public String keyAlgorithm() { /** * Set the keyAlgorithm property: Key algorithm used in the certificate. - * + * * @param keyAlgorithm the keyAlgorithm value to set. - * @return the CryptoCertificateInner object itself. + * @return the CryptoCertificate object itself. */ - public CryptoCertificateInner withKeyAlgorithm(String keyAlgorithm) { + public CryptoCertificate withKeyAlgorithm(String keyAlgorithm) { this.keyAlgorithm = keyAlgorithm; return this; } /** * Get the encoding property: Encoding used for the certificate. - * + * * @return the encoding value. */ public String encoding() { @@ -353,18 +353,18 @@ public String encoding() { /** * Set the encoding property: Encoding used for the certificate. - * + * * @param encoding the encoding value to set. - * @return the CryptoCertificateInner object itself. + * @return the CryptoCertificate object itself. */ - public CryptoCertificateInner withEncoding(String encoding) { + public CryptoCertificate withEncoding(String encoding) { this.encoding = encoding; return this; } /** * Get the serialNumber property: Serial number of the certificate. - * + * * @return the serialNumber value. */ public String serialNumber() { @@ -373,18 +373,18 @@ public String serialNumber() { /** * Set the serialNumber property: Serial number of the certificate. - * + * * @param serialNumber the serialNumber value to set. - * @return the CryptoCertificateInner object itself. + * @return the CryptoCertificate object itself. */ - public CryptoCertificateInner withSerialNumber(String serialNumber) { + public CryptoCertificate withSerialNumber(String serialNumber) { this.serialNumber = serialNumber; return this; } /** * Get the fingerprint property: Fingerprint of the certificate. - * + * * @return the fingerprint value. */ public String fingerprint() { @@ -393,18 +393,18 @@ public String fingerprint() { /** * Set the fingerprint property: Fingerprint of the certificate. - * + * * @param fingerprint the fingerprint value to set. - * @return the CryptoCertificateInner object itself. + * @return the CryptoCertificate object itself. */ - public CryptoCertificateInner withFingerprint(String fingerprint) { + public CryptoCertificate withFingerprint(String fingerprint) { this.fingerprint = fingerprint; return this; } /** * Get the usage property: List of functions the certificate can fulfill. - * + * * @return the usage value. */ public List usage() { @@ -413,18 +413,18 @@ public List usage() { /** * Set the usage property: List of functions the certificate can fulfill. - * + * * @param usage the usage value to set. - * @return the CryptoCertificateInner object itself. + * @return the CryptoCertificate object itself. */ - public CryptoCertificateInner withUsage(List usage) { + public CryptoCertificate withUsage(List usage) { this.usage = usage; return this; } /** - * Get the filePaths property: List of files paths for this certificate. - * + * Get the filePaths property: List of files where this certificate was found. + * * @return the filePaths value. */ public List filePaths() { @@ -433,7 +433,7 @@ public List filePaths() { /** * Get the pairedKey property: A matching paired private key. - * + * * @return the pairedKey value. */ public PairedKey pairedKey() { @@ -442,71 +442,71 @@ public PairedKey pairedKey() { /** * Set the pairedKey property: A matching paired private key. - * + * * @param pairedKey the pairedKey value to set. - * @return the CryptoCertificateInner object itself. + * @return the CryptoCertificate object itself. */ - public CryptoCertificateInner withPairedKey(PairedKey pairedKey) { + public CryptoCertificate withPairedKey(PairedKey pairedKey) { this.pairedKey = pairedKey; return this; } /** * Get the isExpired property: Indicates if the certificate is expired. - * + * * @return the isExpired value. */ - public IsExpired isExpired() { + public Boolean isExpired() { return this.isExpired; } /** * Set the isExpired property: Indicates if the certificate is expired. - * + * * @param isExpired the isExpired value to set. - * @return the CryptoCertificateInner object itself. + * @return the CryptoCertificate object itself. */ - public CryptoCertificateInner withIsExpired(IsExpired isExpired) { + public CryptoCertificate withIsExpired(Boolean isExpired) { this.isExpired = isExpired; return this; } /** - * Get the isSelfSigned property: Indicates if the certificate was self-signed. - * + * Get the isSelfSigned property: Indicates if the certificate is self-signed. + * * @return the isSelfSigned value. */ - public IsSelfSigned isSelfSigned() { + public Boolean isSelfSigned() { return this.isSelfSigned; } /** - * Set the isSelfSigned property: Indicates if the certificate was self-signed. - * + * Set the isSelfSigned property: Indicates if the certificate is self-signed. + * * @param isSelfSigned the isSelfSigned value to set. - * @return the CryptoCertificateInner object itself. + * @return the CryptoCertificate object itself. */ - public CryptoCertificateInner withIsSelfSigned(IsSelfSigned isSelfSigned) { + public CryptoCertificate withIsSelfSigned(Boolean isSelfSigned) { this.isSelfSigned = isSelfSigned; return this; } /** * Get the isWeakSignature property: Indicates the signature algorithm used is insecure. - * + * * @return the isWeakSignature value. */ - public IsWeakSignature isWeakSignature() { + public Boolean isWeakSignature() { return this.isWeakSignature; } /** * Set the isWeakSignature property: Indicates the signature algorithm used is insecure. - * + * * @param isWeakSignature the isWeakSignature value to set. - * @return the CryptoCertificateInner object itself. + * @return the CryptoCertificate object itself. */ - public CryptoCertificateInner withIsWeakSignature(IsWeakSignature isWeakSignature) { + public CryptoCertificate withIsWeakSignature(Boolean isWeakSignature) { this.isWeakSignature = isWeakSignature; return this; } @@ -514,28 +514,28 @@ public CryptoCertificateInner withIsWeakSignature(IsWeakSignature isWeakSignatur /** * Get the isShortKeySize property: Indicates the certificate's key size is considered too small to be secure for * the key algorithm. - * + * * @return the isShortKeySize value. */ - public IsShortKeySize isShortKeySize() { + public Boolean isShortKeySize() { return this.isShortKeySize; } /** * Set the isShortKeySize property: Indicates the certificate's key size is considered too small to be secure for * the key algorithm. - * + * * @param isShortKeySize the isShortKeySize value to set. - * @return the CryptoCertificateInner object itself. + * @return the CryptoCertificate object itself. */ - public CryptoCertificateInner withIsShortKeySize(IsShortKeySize isShortKeySize) { + public CryptoCertificate withIsShortKeySize(Boolean isShortKeySize) { this.isShortKeySize = isShortKeySize; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/CryptoCertificateResourceInner.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/CryptoCertificateResourceInner.java new file mode 100644 index 0000000000000..2b1d5af950e3f --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/CryptoCertificateResourceInner.java @@ -0,0 +1,515 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.iotfirmwaredefense.models.CryptoCertificateEntity; +import com.azure.resourcemanager.iotfirmwaredefense.models.PairedKey; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * Crypto certificate resource. + */ +@Fluent +public final class CryptoCertificateResourceInner extends ProxyResource { + /* + * The properties of a crypto certificate found within a firmware image + */ + @JsonProperty(value = "properties") + private CryptoCertificate innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of CryptoCertificateResourceInner class. + */ + public CryptoCertificateResourceInner() { + } + + /** + * Get the innerProperties property: The properties of a crypto certificate found within a firmware image. + * + * @return the innerProperties value. + */ + private CryptoCertificate innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the cryptoCertId property: ID for the certificate result. + * + * @return the cryptoCertId value. + */ + public String cryptoCertId() { + return this.innerProperties() == null ? null : this.innerProperties().cryptoCertId(); + } + + /** + * Set the cryptoCertId property: ID for the certificate result. + * + * @param cryptoCertId the cryptoCertId value to set. + * @return the CryptoCertificateResourceInner object itself. + */ + public CryptoCertificateResourceInner withCryptoCertId(String cryptoCertId) { + if (this.innerProperties() == null) { + this.innerProperties = new CryptoCertificate(); + } + this.innerProperties().withCryptoCertId(cryptoCertId); + return this; + } + + /** + * Get the name property: Name of the certificate. + * + * @return the name value. + */ + public String namePropertiesName() { + return this.innerProperties() == null ? null : this.innerProperties().name(); + } + + /** + * Set the name property: Name of the certificate. + * + * @param name the name value to set. + * @return the CryptoCertificateResourceInner object itself. + */ + public CryptoCertificateResourceInner withNamePropertiesName(String name) { + if (this.innerProperties() == null) { + this.innerProperties = new CryptoCertificate(); + } + this.innerProperties().withName(name); + return this; + } + + /** + * Get the subject property: Subject information of the certificate. + * + * @return the subject value. + */ + public CryptoCertificateEntity subject() { + return this.innerProperties() == null ? null : this.innerProperties().subject(); + } + + /** + * Set the subject property: Subject information of the certificate. + * + * @param subject the subject value to set. + * @return the CryptoCertificateResourceInner object itself. + */ + public CryptoCertificateResourceInner withSubject(CryptoCertificateEntity subject) { + if (this.innerProperties() == null) { + this.innerProperties = new CryptoCertificate(); + } + this.innerProperties().withSubject(subject); + return this; + } + + /** + * Get the issuer property: Issuer information of the certificate. + * + * @return the issuer value. + */ + public CryptoCertificateEntity issuer() { + return this.innerProperties() == null ? null : this.innerProperties().issuer(); + } + + /** + * Set the issuer property: Issuer information of the certificate. + * + * @param issuer the issuer value to set. + * @return the CryptoCertificateResourceInner object itself. + */ + public CryptoCertificateResourceInner withIssuer(CryptoCertificateEntity issuer) { + if (this.innerProperties() == null) { + this.innerProperties = new CryptoCertificate(); + } + this.innerProperties().withIssuer(issuer); + return this; + } + + /** + * Get the issuedDate property: Issue date for the certificate. + * + * @return the issuedDate value. + */ + public OffsetDateTime issuedDate() { + return this.innerProperties() == null ? null : this.innerProperties().issuedDate(); + } + + /** + * Set the issuedDate property: Issue date for the certificate. + * + * @param issuedDate the issuedDate value to set. + * @return the CryptoCertificateResourceInner object itself. + */ + public CryptoCertificateResourceInner withIssuedDate(OffsetDateTime issuedDate) { + if (this.innerProperties() == null) { + this.innerProperties = new CryptoCertificate(); + } + this.innerProperties().withIssuedDate(issuedDate); + return this; + } + + /** + * Get the expirationDate property: Expiration date for the certificate. + * + * @return the expirationDate value. + */ + public OffsetDateTime expirationDate() { + return this.innerProperties() == null ? null : this.innerProperties().expirationDate(); + } + + /** + * Set the expirationDate property: Expiration date for the certificate. + * + * @param expirationDate the expirationDate value to set. + * @return the CryptoCertificateResourceInner object itself. + */ + public CryptoCertificateResourceInner withExpirationDate(OffsetDateTime expirationDate) { + if (this.innerProperties() == null) { + this.innerProperties = new CryptoCertificate(); + } + this.innerProperties().withExpirationDate(expirationDate); + return this; + } + + /** + * Get the role property: Role of the certificate (Root CA, etc). + * + * @return the role value. + */ + public String role() { + return this.innerProperties() == null ? null : this.innerProperties().role(); + } + + /** + * Set the role property: Role of the certificate (Root CA, etc). + * + * @param role the role value to set. + * @return the CryptoCertificateResourceInner object itself. + */ + public CryptoCertificateResourceInner withRole(String role) { + if (this.innerProperties() == null) { + this.innerProperties = new CryptoCertificate(); + } + this.innerProperties().withRole(role); + return this; + } + + /** + * Get the signatureAlgorithm property: The signature algorithm used in the certificate. + * + * @return the signatureAlgorithm value. + */ + public String signatureAlgorithm() { + return this.innerProperties() == null ? null : this.innerProperties().signatureAlgorithm(); + } + + /** + * Set the signatureAlgorithm property: The signature algorithm used in the certificate. + * + * @param signatureAlgorithm the signatureAlgorithm value to set. + * @return the CryptoCertificateResourceInner object itself. + */ + public CryptoCertificateResourceInner withSignatureAlgorithm(String signatureAlgorithm) { + if (this.innerProperties() == null) { + this.innerProperties = new CryptoCertificate(); + } + this.innerProperties().withSignatureAlgorithm(signatureAlgorithm); + return this; + } + + /** + * Get the keySize property: Size of the certificate's key in bits. + * + * @return the keySize value. + */ + public Long keySize() { + return this.innerProperties() == null ? null : this.innerProperties().keySize(); + } + + /** + * Set the keySize property: Size of the certificate's key in bits. + * + * @param keySize the keySize value to set. + * @return the CryptoCertificateResourceInner object itself. + */ + public CryptoCertificateResourceInner withKeySize(Long keySize) { + if (this.innerProperties() == null) { + this.innerProperties = new CryptoCertificate(); + } + this.innerProperties().withKeySize(keySize); + return this; + } + + /** + * Get the keyAlgorithm property: Key algorithm used in the certificate. + * + * @return the keyAlgorithm value. + */ + public String keyAlgorithm() { + return this.innerProperties() == null ? null : this.innerProperties().keyAlgorithm(); + } + + /** + * Set the keyAlgorithm property: Key algorithm used in the certificate. + * + * @param keyAlgorithm the keyAlgorithm value to set. + * @return the CryptoCertificateResourceInner object itself. + */ + public CryptoCertificateResourceInner withKeyAlgorithm(String keyAlgorithm) { + if (this.innerProperties() == null) { + this.innerProperties = new CryptoCertificate(); + } + this.innerProperties().withKeyAlgorithm(keyAlgorithm); + return this; + } + + /** + * Get the encoding property: Encoding used for the certificate. + * + * @return the encoding value. + */ + public String encoding() { + return this.innerProperties() == null ? null : this.innerProperties().encoding(); + } + + /** + * Set the encoding property: Encoding used for the certificate. + * + * @param encoding the encoding value to set. + * @return the CryptoCertificateResourceInner object itself. + */ + public CryptoCertificateResourceInner withEncoding(String encoding) { + if (this.innerProperties() == null) { + this.innerProperties = new CryptoCertificate(); + } + this.innerProperties().withEncoding(encoding); + return this; + } + + /** + * Get the serialNumber property: Serial number of the certificate. + * + * @return the serialNumber value. + */ + public String serialNumber() { + return this.innerProperties() == null ? null : this.innerProperties().serialNumber(); + } + + /** + * Set the serialNumber property: Serial number of the certificate. + * + * @param serialNumber the serialNumber value to set. + * @return the CryptoCertificateResourceInner object itself. + */ + public CryptoCertificateResourceInner withSerialNumber(String serialNumber) { + if (this.innerProperties() == null) { + this.innerProperties = new CryptoCertificate(); + } + this.innerProperties().withSerialNumber(serialNumber); + return this; + } + + /** + * Get the fingerprint property: Fingerprint of the certificate. + * + * @return the fingerprint value. + */ + public String fingerprint() { + return this.innerProperties() == null ? null : this.innerProperties().fingerprint(); + } + + /** + * Set the fingerprint property: Fingerprint of the certificate. + * + * @param fingerprint the fingerprint value to set. + * @return the CryptoCertificateResourceInner object itself. + */ + public CryptoCertificateResourceInner withFingerprint(String fingerprint) { + if (this.innerProperties() == null) { + this.innerProperties = new CryptoCertificate(); + } + this.innerProperties().withFingerprint(fingerprint); + return this; + } + + /** + * Get the usage property: List of functions the certificate can fulfill. + * + * @return the usage value. + */ + public List usage() { + return this.innerProperties() == null ? null : this.innerProperties().usage(); + } + + /** + * Set the usage property: List of functions the certificate can fulfill. + * + * @param usage the usage value to set. + * @return the CryptoCertificateResourceInner object itself. + */ + public CryptoCertificateResourceInner withUsage(List usage) { + if (this.innerProperties() == null) { + this.innerProperties = new CryptoCertificate(); + } + this.innerProperties().withUsage(usage); + return this; + } + + /** + * Get the filePaths property: List of files where this certificate was found. + * + * @return the filePaths value. + */ + public List filePaths() { + return this.innerProperties() == null ? null : this.innerProperties().filePaths(); + } + + /** + * Get the pairedKey property: A matching paired private key. + * + * @return the pairedKey value. + */ + public PairedKey pairedKey() { + return this.innerProperties() == null ? null : this.innerProperties().pairedKey(); + } + + /** + * Set the pairedKey property: A matching paired private key. + * + * @param pairedKey the pairedKey value to set. + * @return the CryptoCertificateResourceInner object itself. + */ + public CryptoCertificateResourceInner withPairedKey(PairedKey pairedKey) { + if (this.innerProperties() == null) { + this.innerProperties = new CryptoCertificate(); + } + this.innerProperties().withPairedKey(pairedKey); + return this; + } + + /** + * Get the isExpired property: Indicates if the certificate is expired. + * + * @return the isExpired value. + */ + public Boolean isExpired() { + return this.innerProperties() == null ? null : this.innerProperties().isExpired(); + } + + /** + * Set the isExpired property: Indicates if the certificate is expired. + * + * @param isExpired the isExpired value to set. + * @return the CryptoCertificateResourceInner object itself. + */ + public CryptoCertificateResourceInner withIsExpired(Boolean isExpired) { + if (this.innerProperties() == null) { + this.innerProperties = new CryptoCertificate(); + } + this.innerProperties().withIsExpired(isExpired); + return this; + } + + /** + * Get the isSelfSigned property: Indicates if the certificate is self-signed. + * + * @return the isSelfSigned value. + */ + public Boolean isSelfSigned() { + return this.innerProperties() == null ? null : this.innerProperties().isSelfSigned(); + } + + /** + * Set the isSelfSigned property: Indicates if the certificate is self-signed. + * + * @param isSelfSigned the isSelfSigned value to set. + * @return the CryptoCertificateResourceInner object itself. + */ + public CryptoCertificateResourceInner withIsSelfSigned(Boolean isSelfSigned) { + if (this.innerProperties() == null) { + this.innerProperties = new CryptoCertificate(); + } + this.innerProperties().withIsSelfSigned(isSelfSigned); + return this; + } + + /** + * Get the isWeakSignature property: Indicates the signature algorithm used is insecure. + * + * @return the isWeakSignature value. + */ + public Boolean isWeakSignature() { + return this.innerProperties() == null ? null : this.innerProperties().isWeakSignature(); + } + + /** + * Set the isWeakSignature property: Indicates the signature algorithm used is insecure. + * + * @param isWeakSignature the isWeakSignature value to set. + * @return the CryptoCertificateResourceInner object itself. + */ + public CryptoCertificateResourceInner withIsWeakSignature(Boolean isWeakSignature) { + if (this.innerProperties() == null) { + this.innerProperties = new CryptoCertificate(); + } + this.innerProperties().withIsWeakSignature(isWeakSignature); + return this; + } + + /** + * Get the isShortKeySize property: Indicates the certificate's key size is considered too small to be secure for + * the key algorithm. + * + * @return the isShortKeySize value. + */ + public Boolean isShortKeySize() { + return this.innerProperties() == null ? null : this.innerProperties().isShortKeySize(); + } + + /** + * Set the isShortKeySize property: Indicates the certificate's key size is considered too small to be secure for + * the key algorithm. + * + * @param isShortKeySize the isShortKeySize value to set. + * @return the CryptoCertificateResourceInner object itself. + */ + public CryptoCertificateResourceInner withIsShortKeySize(Boolean isShortKeySize) { + if (this.innerProperties() == null) { + this.innerProperties = new CryptoCertificate(); + } + this.innerProperties().withIsShortKeySize(isShortKeySize); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/CryptoKeyInner.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/CryptoKey.java similarity index 75% rename from sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/CryptoKeyInner.java rename to sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/CryptoKey.java index 63eebaee2a8b5..c29fae1a42fdf 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/CryptoKeyInner.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/CryptoKey.java @@ -5,16 +5,17 @@ package com.azure.resourcemanager.iotfirmwaredefense.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.iotfirmwaredefense.models.IsShortKeySize; import com.azure.resourcemanager.iotfirmwaredefense.models.PairedKey; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Crypto key properties. */ +/** + * Crypto key properties. + */ @Fluent -public final class CryptoKeyInner { +public final class CryptoKey { /* - * ID for the key. + * ID for the key result. */ @JsonProperty(value = "cryptoKeyId") private String cryptoKeyId; @@ -44,7 +45,7 @@ public final class CryptoKeyInner { private List usage; /* - * List of files paths for this key. + * List of files where this key was found. */ @JsonProperty(value = "filePaths", access = JsonProperty.Access.WRITE_ONLY) private List filePaths; @@ -59,15 +60,17 @@ public final class CryptoKeyInner { * Indicates the key size is considered too small to be secure for the algorithm. */ @JsonProperty(value = "isShortKeySize") - private IsShortKeySize isShortKeySize; + private Boolean isShortKeySize; - /** Creates an instance of CryptoKeyInner class. */ - public CryptoKeyInner() { + /** + * Creates an instance of CryptoKey class. + */ + public CryptoKey() { } /** - * Get the cryptoKeyId property: ID for the key. - * + * Get the cryptoKeyId property: ID for the key result. + * * @return the cryptoKeyId value. */ public String cryptoKeyId() { @@ -75,19 +78,19 @@ public String cryptoKeyId() { } /** - * Set the cryptoKeyId property: ID for the key. - * + * Set the cryptoKeyId property: ID for the key result. + * * @param cryptoKeyId the cryptoKeyId value to set. - * @return the CryptoKeyInner object itself. + * @return the CryptoKey object itself. */ - public CryptoKeyInner withCryptoKeyId(String cryptoKeyId) { + public CryptoKey withCryptoKeyId(String cryptoKeyId) { this.cryptoKeyId = cryptoKeyId; return this; } /** * Get the keyType property: Type of the key (public or private). - * + * * @return the keyType value. */ public String keyType() { @@ -96,18 +99,18 @@ public String keyType() { /** * Set the keyType property: Type of the key (public or private). - * + * * @param keyType the keyType value to set. - * @return the CryptoKeyInner object itself. + * @return the CryptoKey object itself. */ - public CryptoKeyInner withKeyType(String keyType) { + public CryptoKey withKeyType(String keyType) { this.keyType = keyType; return this; } /** * Get the keySize property: Size of the key in bits. - * + * * @return the keySize value. */ public Long keySize() { @@ -116,18 +119,18 @@ public Long keySize() { /** * Set the keySize property: Size of the key in bits. - * + * * @param keySize the keySize value to set. - * @return the CryptoKeyInner object itself. + * @return the CryptoKey object itself. */ - public CryptoKeyInner withKeySize(Long keySize) { + public CryptoKey withKeySize(Long keySize) { this.keySize = keySize; return this; } /** * Get the keyAlgorithm property: Key algorithm name. - * + * * @return the keyAlgorithm value. */ public String keyAlgorithm() { @@ -136,18 +139,18 @@ public String keyAlgorithm() { /** * Set the keyAlgorithm property: Key algorithm name. - * + * * @param keyAlgorithm the keyAlgorithm value to set. - * @return the CryptoKeyInner object itself. + * @return the CryptoKey object itself. */ - public CryptoKeyInner withKeyAlgorithm(String keyAlgorithm) { + public CryptoKey withKeyAlgorithm(String keyAlgorithm) { this.keyAlgorithm = keyAlgorithm; return this; } /** * Get the usage property: Functions the key can fulfill. - * + * * @return the usage value. */ public List usage() { @@ -156,18 +159,18 @@ public List usage() { /** * Set the usage property: Functions the key can fulfill. - * + * * @param usage the usage value to set. - * @return the CryptoKeyInner object itself. + * @return the CryptoKey object itself. */ - public CryptoKeyInner withUsage(List usage) { + public CryptoKey withUsage(List usage) { this.usage = usage; return this; } /** - * Get the filePaths property: List of files paths for this key. - * + * Get the filePaths property: List of files where this key was found. + * * @return the filePaths value. */ public List filePaths() { @@ -176,7 +179,7 @@ public List filePaths() { /** * Get the pairedKey property: A matching paired key or certificate. - * + * * @return the pairedKey value. */ public PairedKey pairedKey() { @@ -185,38 +188,38 @@ public PairedKey pairedKey() { /** * Set the pairedKey property: A matching paired key or certificate. - * + * * @param pairedKey the pairedKey value to set. - * @return the CryptoKeyInner object itself. + * @return the CryptoKey object itself. */ - public CryptoKeyInner withPairedKey(PairedKey pairedKey) { + public CryptoKey withPairedKey(PairedKey pairedKey) { this.pairedKey = pairedKey; return this; } /** * Get the isShortKeySize property: Indicates the key size is considered too small to be secure for the algorithm. - * + * * @return the isShortKeySize value. */ - public IsShortKeySize isShortKeySize() { + public Boolean isShortKeySize() { return this.isShortKeySize; } /** * Set the isShortKeySize property: Indicates the key size is considered too small to be secure for the algorithm. - * + * * @param isShortKeySize the isShortKeySize value to set. - * @return the CryptoKeyInner object itself. + * @return the CryptoKey object itself. */ - public CryptoKeyInner withIsShortKeySize(IsShortKeySize isShortKeySize) { + public CryptoKey withIsShortKeySize(Boolean isShortKeySize) { this.isShortKeySize = isShortKeySize; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/CryptoKeyResourceInner.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/CryptoKeyResourceInner.java new file mode 100644 index 0000000000000..723308e310454 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/CryptoKeyResourceInner.java @@ -0,0 +1,235 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.iotfirmwaredefense.models.PairedKey; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Crypto key resource. + */ +@Fluent +public final class CryptoKeyResourceInner extends ProxyResource { + /* + * The properties of a crypto key found within a firmware image + */ + @JsonProperty(value = "properties") + private CryptoKey innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of CryptoKeyResourceInner class. + */ + public CryptoKeyResourceInner() { + } + + /** + * Get the innerProperties property: The properties of a crypto key found within a firmware image. + * + * @return the innerProperties value. + */ + private CryptoKey innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the cryptoKeyId property: ID for the key result. + * + * @return the cryptoKeyId value. + */ + public String cryptoKeyId() { + return this.innerProperties() == null ? null : this.innerProperties().cryptoKeyId(); + } + + /** + * Set the cryptoKeyId property: ID for the key result. + * + * @param cryptoKeyId the cryptoKeyId value to set. + * @return the CryptoKeyResourceInner object itself. + */ + public CryptoKeyResourceInner withCryptoKeyId(String cryptoKeyId) { + if (this.innerProperties() == null) { + this.innerProperties = new CryptoKey(); + } + this.innerProperties().withCryptoKeyId(cryptoKeyId); + return this; + } + + /** + * Get the keyType property: Type of the key (public or private). + * + * @return the keyType value. + */ + public String keyType() { + return this.innerProperties() == null ? null : this.innerProperties().keyType(); + } + + /** + * Set the keyType property: Type of the key (public or private). + * + * @param keyType the keyType value to set. + * @return the CryptoKeyResourceInner object itself. + */ + public CryptoKeyResourceInner withKeyType(String keyType) { + if (this.innerProperties() == null) { + this.innerProperties = new CryptoKey(); + } + this.innerProperties().withKeyType(keyType); + return this; + } + + /** + * Get the keySize property: Size of the key in bits. + * + * @return the keySize value. + */ + public Long keySize() { + return this.innerProperties() == null ? null : this.innerProperties().keySize(); + } + + /** + * Set the keySize property: Size of the key in bits. + * + * @param keySize the keySize value to set. + * @return the CryptoKeyResourceInner object itself. + */ + public CryptoKeyResourceInner withKeySize(Long keySize) { + if (this.innerProperties() == null) { + this.innerProperties = new CryptoKey(); + } + this.innerProperties().withKeySize(keySize); + return this; + } + + /** + * Get the keyAlgorithm property: Key algorithm name. + * + * @return the keyAlgorithm value. + */ + public String keyAlgorithm() { + return this.innerProperties() == null ? null : this.innerProperties().keyAlgorithm(); + } + + /** + * Set the keyAlgorithm property: Key algorithm name. + * + * @param keyAlgorithm the keyAlgorithm value to set. + * @return the CryptoKeyResourceInner object itself. + */ + public CryptoKeyResourceInner withKeyAlgorithm(String keyAlgorithm) { + if (this.innerProperties() == null) { + this.innerProperties = new CryptoKey(); + } + this.innerProperties().withKeyAlgorithm(keyAlgorithm); + return this; + } + + /** + * Get the usage property: Functions the key can fulfill. + * + * @return the usage value. + */ + public List usage() { + return this.innerProperties() == null ? null : this.innerProperties().usage(); + } + + /** + * Set the usage property: Functions the key can fulfill. + * + * @param usage the usage value to set. + * @return the CryptoKeyResourceInner object itself. + */ + public CryptoKeyResourceInner withUsage(List usage) { + if (this.innerProperties() == null) { + this.innerProperties = new CryptoKey(); + } + this.innerProperties().withUsage(usage); + return this; + } + + /** + * Get the filePaths property: List of files where this key was found. + * + * @return the filePaths value. + */ + public List filePaths() { + return this.innerProperties() == null ? null : this.innerProperties().filePaths(); + } + + /** + * Get the pairedKey property: A matching paired key or certificate. + * + * @return the pairedKey value. + */ + public PairedKey pairedKey() { + return this.innerProperties() == null ? null : this.innerProperties().pairedKey(); + } + + /** + * Set the pairedKey property: A matching paired key or certificate. + * + * @param pairedKey the pairedKey value to set. + * @return the CryptoKeyResourceInner object itself. + */ + public CryptoKeyResourceInner withPairedKey(PairedKey pairedKey) { + if (this.innerProperties() == null) { + this.innerProperties = new CryptoKey(); + } + this.innerProperties().withPairedKey(pairedKey); + return this; + } + + /** + * Get the isShortKeySize property: Indicates the key size is considered too small to be secure for the algorithm. + * + * @return the isShortKeySize value. + */ + public Boolean isShortKeySize() { + return this.innerProperties() == null ? null : this.innerProperties().isShortKeySize(); + } + + /** + * Set the isShortKeySize property: Indicates the key size is considered too small to be secure for the algorithm. + * + * @param isShortKeySize the isShortKeySize value to set. + * @return the CryptoKeyResourceInner object itself. + */ + public CryptoKeyResourceInner withIsShortKeySize(Boolean isShortKeySize) { + if (this.innerProperties() == null) { + this.innerProperties = new CryptoKey(); + } + this.innerProperties().withIsShortKeySize(isShortKeySize); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/CveResourceInner.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/CveResourceInner.java new file mode 100644 index 0000000000000..a062d632d7d75 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/CveResourceInner.java @@ -0,0 +1,284 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.iotfirmwaredefense.models.CveComponent; +import com.azure.resourcemanager.iotfirmwaredefense.models.CveLink; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * CVE analysis result resource. + */ +@Fluent +public final class CveResourceInner extends ProxyResource { + /* + * The properties of a CVE result found within a firmware image + */ + @JsonProperty(value = "properties") + private CveResult innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of CveResourceInner class. + */ + public CveResourceInner() { + } + + /** + * Get the innerProperties property: The properties of a CVE result found within a firmware image. + * + * @return the innerProperties value. + */ + private CveResult innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the cveId property: ID of the CVE result. + * + * @return the cveId value. + */ + public String cveId() { + return this.innerProperties() == null ? null : this.innerProperties().cveId(); + } + + /** + * Set the cveId property: ID of the CVE result. + * + * @param cveId the cveId value to set. + * @return the CveResourceInner object itself. + */ + public CveResourceInner withCveId(String cveId) { + if (this.innerProperties() == null) { + this.innerProperties = new CveResult(); + } + this.innerProperties().withCveId(cveId); + return this; + } + + /** + * Get the component property: The SBOM component for the CVE. + * + * @return the component value. + */ + public CveComponent component() { + return this.innerProperties() == null ? null : this.innerProperties().component(); + } + + /** + * Set the component property: The SBOM component for the CVE. + * + * @param component the component value to set. + * @return the CveResourceInner object itself. + */ + public CveResourceInner withComponent(CveComponent component) { + if (this.innerProperties() == null) { + this.innerProperties = new CveResult(); + } + this.innerProperties().withComponent(component); + return this; + } + + /** + * Get the severity property: Severity of the CVE. + * + * @return the severity value. + */ + public String severity() { + return this.innerProperties() == null ? null : this.innerProperties().severity(); + } + + /** + * Set the severity property: Severity of the CVE. + * + * @param severity the severity value to set. + * @return the CveResourceInner object itself. + */ + public CveResourceInner withSeverity(String severity) { + if (this.innerProperties() == null) { + this.innerProperties = new CveResult(); + } + this.innerProperties().withSeverity(severity); + return this; + } + + /** + * Get the name property: Name of the CVE. + * + * @return the name value. + */ + public String namePropertiesName() { + return this.innerProperties() == null ? null : this.innerProperties().name(); + } + + /** + * Set the name property: Name of the CVE. + * + * @param name the name value to set. + * @return the CveResourceInner object itself. + */ + public CveResourceInner withNamePropertiesName(String name) { + if (this.innerProperties() == null) { + this.innerProperties = new CveResult(); + } + this.innerProperties().withName(name); + return this; + } + + /** + * Get the cvssScore property: A single CVSS score to represent the CVE. If a V3 score is specified, then it will + * use the V3 score. Otherwise if the V2 score is specified it will be the V2 score. + * + * @return the cvssScore value. + */ + public String cvssScore() { + return this.innerProperties() == null ? null : this.innerProperties().cvssScore(); + } + + /** + * Set the cvssScore property: A single CVSS score to represent the CVE. If a V3 score is specified, then it will + * use the V3 score. Otherwise if the V2 score is specified it will be the V2 score. + * + * @param cvssScore the cvssScore value to set. + * @return the CveResourceInner object itself. + */ + public CveResourceInner withCvssScore(String cvssScore) { + if (this.innerProperties() == null) { + this.innerProperties = new CveResult(); + } + this.innerProperties().withCvssScore(cvssScore); + return this; + } + + /** + * Get the cvssVersion property: CVSS version of the CVE. + * + * @return the cvssVersion value. + */ + public String cvssVersion() { + return this.innerProperties() == null ? null : this.innerProperties().cvssVersion(); + } + + /** + * Set the cvssVersion property: CVSS version of the CVE. + * + * @param cvssVersion the cvssVersion value to set. + * @return the CveResourceInner object itself. + */ + public CveResourceInner withCvssVersion(String cvssVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new CveResult(); + } + this.innerProperties().withCvssVersion(cvssVersion); + return this; + } + + /** + * Get the cvssV2Score property: CVSS V2 score of the CVE. + * + * @return the cvssV2Score value. + */ + public String cvssV2Score() { + return this.innerProperties() == null ? null : this.innerProperties().cvssV2Score(); + } + + /** + * Set the cvssV2Score property: CVSS V2 score of the CVE. + * + * @param cvssV2Score the cvssV2Score value to set. + * @return the CveResourceInner object itself. + */ + public CveResourceInner withCvssV2Score(String cvssV2Score) { + if (this.innerProperties() == null) { + this.innerProperties = new CveResult(); + } + this.innerProperties().withCvssV2Score(cvssV2Score); + return this; + } + + /** + * Get the cvssV3Score property: CVSS V3 score of the CVE. + * + * @return the cvssV3Score value. + */ + public String cvssV3Score() { + return this.innerProperties() == null ? null : this.innerProperties().cvssV3Score(); + } + + /** + * Set the cvssV3Score property: CVSS V3 score of the CVE. + * + * @param cvssV3Score the cvssV3Score value to set. + * @return the CveResourceInner object itself. + */ + public CveResourceInner withCvssV3Score(String cvssV3Score) { + if (this.innerProperties() == null) { + this.innerProperties = new CveResult(); + } + this.innerProperties().withCvssV3Score(cvssV3Score); + return this; + } + + /** + * Get the links property: The list of reference links for the CVE. + * + * @return the links value. + */ + public List links() { + return this.innerProperties() == null ? null : this.innerProperties().links(); + } + + /** + * Get the description property: The CVE description. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: The CVE description. + * + * @param description the description value to set. + * @return the CveResourceInner object itself. + */ + public CveResourceInner withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new CveResult(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/CveInner.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/CveResult.java similarity index 54% rename from sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/CveInner.java rename to sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/CveResult.java index 37fe0eaf8be7c..65e29e3421a0d 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/CveInner.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/CveResult.java @@ -5,94 +5,86 @@ package com.azure.resourcemanager.iotfirmwaredefense.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.iotfirmwaredefense.models.CveComponent; import com.azure.resourcemanager.iotfirmwaredefense.models.CveLink; import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; import java.util.List; -/** Known CVEs of a firmware. */ +/** + * Details of a CVE detected in firmware. + */ @Fluent -public final class CveInner { +public final class CveResult { /* - * ID of CVE + * ID of the CVE result. */ @JsonProperty(value = "cveId") private String cveId; /* - * Component of CVE + * The SBOM component for the CVE. */ @JsonProperty(value = "component") - private Object component; + private CveComponent component; /* - * Severity of CVE + * Severity of the CVE. */ @JsonProperty(value = "severity") private String severity; /* - * Name of CVE + * Name of the CVE. */ @JsonProperty(value = "name") private String name; /* * A single CVSS score to represent the CVE. If a V3 score is specified, then it will use the V3 score. Otherwise - * if the V2 score is specified it will be the V2 score + * if the V2 score is specified it will be the V2 score. */ @JsonProperty(value = "cvssScore") private String cvssScore; /* - * Cvss version of CVE + * CVSS version of the CVE. */ @JsonProperty(value = "cvssVersion") private String cvssVersion; /* - * Cvss V2 score of CVE + * CVSS V2 score of the CVE. */ @JsonProperty(value = "cvssV2Score") private String cvssV2Score; /* - * Cvss V3 score of CVE + * CVSS V3 score of the CVE. */ @JsonProperty(value = "cvssV3Score") private String cvssV3Score; /* - * Publish date of CVE - */ - @JsonProperty(value = "publishDate") - private OffsetDateTime publishDate; - - /* - * Updated date of CVE - */ - @JsonProperty(value = "updatedDate") - private OffsetDateTime updatedDate; - - /* - * The list of CVE links. + * The list of reference links for the CVE. */ @JsonProperty(value = "links", access = JsonProperty.Access.WRITE_ONLY) private List links; /* - * Description of CVE + * The CVE description. */ @JsonProperty(value = "description") private String description; - /** Creates an instance of CveInner class. */ - public CveInner() { + /** + * Creates an instance of CveResult class. + */ + public CveResult() { } /** - * Get the cveId property: ID of CVE. - * + * Get the cveId property: ID of the CVE result. + * * @return the cveId value. */ public String cveId() { @@ -100,39 +92,39 @@ public String cveId() { } /** - * Set the cveId property: ID of CVE. - * + * Set the cveId property: ID of the CVE result. + * * @param cveId the cveId value to set. - * @return the CveInner object itself. + * @return the CveResult object itself. */ - public CveInner withCveId(String cveId) { + public CveResult withCveId(String cveId) { this.cveId = cveId; return this; } /** - * Get the component property: Component of CVE. - * + * Get the component property: The SBOM component for the CVE. + * * @return the component value. */ - public Object component() { + public CveComponent component() { return this.component; } /** - * Set the component property: Component of CVE. - * + * Set the component property: The SBOM component for the CVE. + * * @param component the component value to set. - * @return the CveInner object itself. + * @return the CveResult object itself. */ - public CveInner withComponent(Object component) { + public CveResult withComponent(CveComponent component) { this.component = component; return this; } /** - * Get the severity property: Severity of CVE. - * + * Get the severity property: Severity of the CVE. + * * @return the severity value. */ public String severity() { @@ -140,19 +132,19 @@ public String severity() { } /** - * Set the severity property: Severity of CVE. - * + * Set the severity property: Severity of the CVE. + * * @param severity the severity value to set. - * @return the CveInner object itself. + * @return the CveResult object itself. */ - public CveInner withSeverity(String severity) { + public CveResult withSeverity(String severity) { this.severity = severity; return this; } /** - * Get the name property: Name of CVE. - * + * Get the name property: Name of the CVE. + * * @return the name value. */ public String name() { @@ -160,12 +152,12 @@ public String name() { } /** - * Set the name property: Name of CVE. - * + * Set the name property: Name of the CVE. + * * @param name the name value to set. - * @return the CveInner object itself. + * @return the CveResult object itself. */ - public CveInner withName(String name) { + public CveResult withName(String name) { this.name = name; return this; } @@ -173,7 +165,7 @@ public CveInner withName(String name) { /** * Get the cvssScore property: A single CVSS score to represent the CVE. If a V3 score is specified, then it will * use the V3 score. Otherwise if the V2 score is specified it will be the V2 score. - * + * * @return the cvssScore value. */ public String cvssScore() { @@ -183,18 +175,18 @@ public String cvssScore() { /** * Set the cvssScore property: A single CVSS score to represent the CVE. If a V3 score is specified, then it will * use the V3 score. Otherwise if the V2 score is specified it will be the V2 score. - * + * * @param cvssScore the cvssScore value to set. - * @return the CveInner object itself. + * @return the CveResult object itself. */ - public CveInner withCvssScore(String cvssScore) { + public CveResult withCvssScore(String cvssScore) { this.cvssScore = cvssScore; return this; } /** - * Get the cvssVersion property: Cvss version of CVE. - * + * Get the cvssVersion property: CVSS version of the CVE. + * * @return the cvssVersion value. */ public String cvssVersion() { @@ -202,19 +194,19 @@ public String cvssVersion() { } /** - * Set the cvssVersion property: Cvss version of CVE. - * + * Set the cvssVersion property: CVSS version of the CVE. + * * @param cvssVersion the cvssVersion value to set. - * @return the CveInner object itself. + * @return the CveResult object itself. */ - public CveInner withCvssVersion(String cvssVersion) { + public CveResult withCvssVersion(String cvssVersion) { this.cvssVersion = cvssVersion; return this; } /** - * Get the cvssV2Score property: Cvss V2 score of CVE. - * + * Get the cvssV2Score property: CVSS V2 score of the CVE. + * * @return the cvssV2Score value. */ public String cvssV2Score() { @@ -222,19 +214,19 @@ public String cvssV2Score() { } /** - * Set the cvssV2Score property: Cvss V2 score of CVE. - * + * Set the cvssV2Score property: CVSS V2 score of the CVE. + * * @param cvssV2Score the cvssV2Score value to set. - * @return the CveInner object itself. + * @return the CveResult object itself. */ - public CveInner withCvssV2Score(String cvssV2Score) { + public CveResult withCvssV2Score(String cvssV2Score) { this.cvssV2Score = cvssV2Score; return this; } /** - * Get the cvssV3Score property: Cvss V3 score of CVE. - * + * Get the cvssV3Score property: CVSS V3 score of the CVE. + * * @return the cvssV3Score value. */ public String cvssV3Score() { @@ -242,59 +234,19 @@ public String cvssV3Score() { } /** - * Set the cvssV3Score property: Cvss V3 score of CVE. - * + * Set the cvssV3Score property: CVSS V3 score of the CVE. + * * @param cvssV3Score the cvssV3Score value to set. - * @return the CveInner object itself. + * @return the CveResult object itself. */ - public CveInner withCvssV3Score(String cvssV3Score) { + public CveResult withCvssV3Score(String cvssV3Score) { this.cvssV3Score = cvssV3Score; return this; } /** - * Get the publishDate property: Publish date of CVE. - * - * @return the publishDate value. - */ - public OffsetDateTime publishDate() { - return this.publishDate; - } - - /** - * Set the publishDate property: Publish date of CVE. - * - * @param publishDate the publishDate value to set. - * @return the CveInner object itself. - */ - public CveInner withPublishDate(OffsetDateTime publishDate) { - this.publishDate = publishDate; - return this; - } - - /** - * Get the updatedDate property: Updated date of CVE. - * - * @return the updatedDate value. - */ - public OffsetDateTime updatedDate() { - return this.updatedDate; - } - - /** - * Set the updatedDate property: Updated date of CVE. - * - * @param updatedDate the updatedDate value to set. - * @return the CveInner object itself. - */ - public CveInner withUpdatedDate(OffsetDateTime updatedDate) { - this.updatedDate = updatedDate; - return this; - } - - /** - * Get the links property: The list of CVE links. - * + * Get the links property: The list of reference links for the CVE. + * * @return the links value. */ public List links() { @@ -302,8 +254,8 @@ public List links() { } /** - * Get the description property: Description of CVE. - * + * Get the description property: The CVE description. + * * @return the description value. */ public String description() { @@ -311,22 +263,25 @@ public String description() { } /** - * Set the description property: Description of CVE. - * + * Set the description property: The CVE description. + * * @param description the description value to set. - * @return the CveInner object itself. + * @return the CveResult object itself. */ - public CveInner withDescription(String description) { + public CveResult withDescription(String description) { this.description = description; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (component() != null) { + component().validate(); + } if (links() != null) { links().forEach(e -> e.validate()); } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/CveSummaryInner.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/CveSummaryInner.java deleted file mode 100644 index 7b30c7deb57e9..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/CveSummaryInner.java +++ /dev/null @@ -1,180 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.iotfirmwaredefense.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** CVE summary values. */ -@Fluent -public final class CveSummaryInner { - /* - * The total number of critical severity CVEs detected - */ - @JsonProperty(value = "critical") - private Long critical; - - /* - * The total number of high severity CVEs detected - */ - @JsonProperty(value = "high") - private Long high; - - /* - * The total number of medium severity CVEs detected - */ - @JsonProperty(value = "medium") - private Long medium; - - /* - * The total number of low severity CVEs detected - */ - @JsonProperty(value = "low") - private Long low; - - /* - * The total number of unknown severity CVEs detected - */ - @JsonProperty(value = "unknown") - private Long unknown; - - /* - * The total number of undefined severity CVEs detected - */ - @JsonProperty(value = "undefined") - private Long undefined; - - /** Creates an instance of CveSummaryInner class. */ - public CveSummaryInner() { - } - - /** - * Get the critical property: The total number of critical severity CVEs detected. - * - * @return the critical value. - */ - public Long critical() { - return this.critical; - } - - /** - * Set the critical property: The total number of critical severity CVEs detected. - * - * @param critical the critical value to set. - * @return the CveSummaryInner object itself. - */ - public CveSummaryInner withCritical(Long critical) { - this.critical = critical; - return this; - } - - /** - * Get the high property: The total number of high severity CVEs detected. - * - * @return the high value. - */ - public Long high() { - return this.high; - } - - /** - * Set the high property: The total number of high severity CVEs detected. - * - * @param high the high value to set. - * @return the CveSummaryInner object itself. - */ - public CveSummaryInner withHigh(Long high) { - this.high = high; - return this; - } - - /** - * Get the medium property: The total number of medium severity CVEs detected. - * - * @return the medium value. - */ - public Long medium() { - return this.medium; - } - - /** - * Set the medium property: The total number of medium severity CVEs detected. - * - * @param medium the medium value to set. - * @return the CveSummaryInner object itself. - */ - public CveSummaryInner withMedium(Long medium) { - this.medium = medium; - return this; - } - - /** - * Get the low property: The total number of low severity CVEs detected. - * - * @return the low value. - */ - public Long low() { - return this.low; - } - - /** - * Set the low property: The total number of low severity CVEs detected. - * - * @param low the low value to set. - * @return the CveSummaryInner object itself. - */ - public CveSummaryInner withLow(Long low) { - this.low = low; - return this; - } - - /** - * Get the unknown property: The total number of unknown severity CVEs detected. - * - * @return the unknown value. - */ - public Long unknown() { - return this.unknown; - } - - /** - * Set the unknown property: The total number of unknown severity CVEs detected. - * - * @param unknown the unknown value to set. - * @return the CveSummaryInner object itself. - */ - public CveSummaryInner withUnknown(Long unknown) { - this.unknown = unknown; - return this; - } - - /** - * Get the undefined property: The total number of undefined severity CVEs detected. - * - * @return the undefined value. - */ - public Long undefined() { - return this.undefined; - } - - /** - * Set the undefined property: The total number of undefined severity CVEs detected. - * - * @param undefined the undefined value to set. - * @return the CveSummaryInner object itself. - */ - public CveSummaryInner withUndefined(Long undefined) { - this.undefined = undefined; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/FirmwareInner.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/FirmwareInner.java index 7377f620d360a..eea703ddf639a 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/FirmwareInner.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/FirmwareInner.java @@ -9,10 +9,13 @@ import com.azure.core.management.SystemData; import com.azure.resourcemanager.iotfirmwaredefense.models.ProvisioningState; import com.azure.resourcemanager.iotfirmwaredefense.models.Status; +import com.azure.resourcemanager.iotfirmwaredefense.models.StatusMessage; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Firmware definition. */ +/** + * Firmware definition. + */ @Fluent public final class FirmwareInner extends ProxyResource { /* @@ -27,13 +30,15 @@ public final class FirmwareInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of FirmwareInner class. */ + /** + * Creates an instance of FirmwareInner class. + */ public FirmwareInner() { } /** * Get the innerProperties property: The properties of a firmware. - * + * * @return the innerProperties value. */ private FirmwareProperties innerProperties() { @@ -42,7 +47,7 @@ private FirmwareProperties innerProperties() { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -51,7 +56,7 @@ public SystemData systemData() { /** * Get the fileName property: File name for a firmware that user uploaded. - * + * * @return the fileName value. */ public String fileName() { @@ -60,7 +65,7 @@ public String fileName() { /** * Set the fileName property: File name for a firmware that user uploaded. - * + * * @param fileName the fileName value to set. * @return the FirmwareInner object itself. */ @@ -74,7 +79,7 @@ public FirmwareInner withFileName(String fileName) { /** * Get the vendor property: Firmware vendor. - * + * * @return the vendor value. */ public String vendor() { @@ -83,7 +88,7 @@ public String vendor() { /** * Set the vendor property: Firmware vendor. - * + * * @param vendor the vendor value to set. * @return the FirmwareInner object itself. */ @@ -97,7 +102,7 @@ public FirmwareInner withVendor(String vendor) { /** * Get the model property: Firmware model. - * + * * @return the model value. */ public String model() { @@ -106,7 +111,7 @@ public String model() { /** * Set the model property: Firmware model. - * + * * @param model the model value to set. * @return the FirmwareInner object itself. */ @@ -120,7 +125,7 @@ public FirmwareInner withModel(String model) { /** * Get the version property: Firmware version. - * + * * @return the version value. */ public String version() { @@ -129,7 +134,7 @@ public String version() { /** * Set the version property: Firmware version. - * + * * @param version the version value to set. * @return the FirmwareInner object itself. */ @@ -143,7 +148,7 @@ public FirmwareInner withVersion(String version) { /** * Get the description property: User-specified description of the firmware. - * + * * @return the description value. */ public String description() { @@ -152,7 +157,7 @@ public String description() { /** * Set the description property: User-specified description of the firmware. - * + * * @param description the description value to set. * @return the FirmwareInner object itself. */ @@ -166,7 +171,7 @@ public FirmwareInner withDescription(String description) { /** * Get the fileSize property: File size of the uploaded firmware image. - * + * * @return the fileSize value. */ public Long fileSize() { @@ -175,7 +180,7 @@ public Long fileSize() { /** * Set the fileSize property: File size of the uploaded firmware image. - * + * * @param fileSize the fileSize value to set. * @return the FirmwareInner object itself. */ @@ -189,7 +194,7 @@ public FirmwareInner withFileSize(Long fileSize) { /** * Get the status property: The status of firmware scan. - * + * * @return the status value. */ public Status status() { @@ -198,7 +203,7 @@ public Status status() { /** * Set the status property: The status of firmware scan. - * + * * @param status the status value to set. * @return the FirmwareInner object itself. */ @@ -212,20 +217,20 @@ public FirmwareInner withStatus(Status status) { /** * Get the statusMessages property: A list of errors or other messages generated during firmware analysis. - * + * * @return the statusMessages value. */ - public List statusMessages() { + public List statusMessages() { return this.innerProperties() == null ? null : this.innerProperties().statusMessages(); } /** * Set the statusMessages property: A list of errors or other messages generated during firmware analysis. - * + * * @param statusMessages the statusMessages value to set. * @return the FirmwareInner object itself. */ - public FirmwareInner withStatusMessages(List statusMessages) { + public FirmwareInner withStatusMessages(List statusMessages) { if (this.innerProperties() == null) { this.innerProperties = new FirmwareProperties(); } @@ -235,7 +240,7 @@ public FirmwareInner withStatusMessages(List statusMessages) { /** * Get the provisioningState property: Provisioning state of the resource. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -244,7 +249,7 @@ public ProvisioningState provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/FirmwareProperties.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/FirmwareProperties.java index 6b84b20da58d7..b063e7e44f0a9 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/FirmwareProperties.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/FirmwareProperties.java @@ -7,10 +7,13 @@ import com.azure.core.annotation.Fluent; import com.azure.resourcemanager.iotfirmwaredefense.models.ProvisioningState; import com.azure.resourcemanager.iotfirmwaredefense.models.Status; +import com.azure.resourcemanager.iotfirmwaredefense.models.StatusMessage; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Firmware properties. */ +/** + * Firmware properties. + */ @Fluent public final class FirmwareProperties { /* @@ -59,7 +62,7 @@ public final class FirmwareProperties { * A list of errors or other messages generated during firmware analysis */ @JsonProperty(value = "statusMessages") - private List statusMessages; + private List statusMessages; /* * Provisioning state of the resource. @@ -67,13 +70,15 @@ public final class FirmwareProperties { @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ProvisioningState provisioningState; - /** Creates an instance of FirmwareProperties class. */ + /** + * Creates an instance of FirmwareProperties class. + */ public FirmwareProperties() { } /** * Get the fileName property: File name for a firmware that user uploaded. - * + * * @return the fileName value. */ public String fileName() { @@ -82,7 +87,7 @@ public String fileName() { /** * Set the fileName property: File name for a firmware that user uploaded. - * + * * @param fileName the fileName value to set. * @return the FirmwareProperties object itself. */ @@ -93,7 +98,7 @@ public FirmwareProperties withFileName(String fileName) { /** * Get the vendor property: Firmware vendor. - * + * * @return the vendor value. */ public String vendor() { @@ -102,7 +107,7 @@ public String vendor() { /** * Set the vendor property: Firmware vendor. - * + * * @param vendor the vendor value to set. * @return the FirmwareProperties object itself. */ @@ -113,7 +118,7 @@ public FirmwareProperties withVendor(String vendor) { /** * Get the model property: Firmware model. - * + * * @return the model value. */ public String model() { @@ -122,7 +127,7 @@ public String model() { /** * Set the model property: Firmware model. - * + * * @param model the model value to set. * @return the FirmwareProperties object itself. */ @@ -133,7 +138,7 @@ public FirmwareProperties withModel(String model) { /** * Get the version property: Firmware version. - * + * * @return the version value. */ public String version() { @@ -142,7 +147,7 @@ public String version() { /** * Set the version property: Firmware version. - * + * * @param version the version value to set. * @return the FirmwareProperties object itself. */ @@ -153,7 +158,7 @@ public FirmwareProperties withVersion(String version) { /** * Get the description property: User-specified description of the firmware. - * + * * @return the description value. */ public String description() { @@ -162,7 +167,7 @@ public String description() { /** * Set the description property: User-specified description of the firmware. - * + * * @param description the description value to set. * @return the FirmwareProperties object itself. */ @@ -173,7 +178,7 @@ public FirmwareProperties withDescription(String description) { /** * Get the fileSize property: File size of the uploaded firmware image. - * + * * @return the fileSize value. */ public Long fileSize() { @@ -182,7 +187,7 @@ public Long fileSize() { /** * Set the fileSize property: File size of the uploaded firmware image. - * + * * @param fileSize the fileSize value to set. * @return the FirmwareProperties object itself. */ @@ -193,7 +198,7 @@ public FirmwareProperties withFileSize(Long fileSize) { /** * Get the status property: The status of firmware scan. - * + * * @return the status value. */ public Status status() { @@ -202,7 +207,7 @@ public Status status() { /** * Set the status property: The status of firmware scan. - * + * * @param status the status value to set. * @return the FirmwareProperties object itself. */ @@ -213,27 +218,27 @@ public FirmwareProperties withStatus(Status status) { /** * Get the statusMessages property: A list of errors or other messages generated during firmware analysis. - * + * * @return the statusMessages value. */ - public List statusMessages() { + public List statusMessages() { return this.statusMessages; } /** * Set the statusMessages property: A list of errors or other messages generated during firmware analysis. - * + * * @param statusMessages the statusMessages value to set. * @return the FirmwareProperties object itself. */ - public FirmwareProperties withStatusMessages(List statusMessages) { + public FirmwareProperties withStatusMessages(List statusMessages) { this.statusMessages = statusMessages; return this; } /** * Get the provisioningState property: Provisioning state of the resource. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -242,9 +247,12 @@ public ProvisioningState provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (statusMessages() != null) { + statusMessages().forEach(e -> e.validate()); + } } } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/FirmwareSummaryInner.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/FirmwareSummaryInner.java deleted file mode 100644 index ddcc63f2c8930..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/FirmwareSummaryInner.java +++ /dev/null @@ -1,206 +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.iotfirmwaredefense.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Summary result after scanning the firmware. */ -@Fluent -public final class FirmwareSummaryInner { - /* - * Total extracted size of the firmware in bytes. - */ - @JsonProperty(value = "extractedSize") - private Long extractedSize; - - /* - * Firmware file size in bytes. - */ - @JsonProperty(value = "fileSize") - private Long fileSize; - - /* - * Extracted file count. - */ - @JsonProperty(value = "extractedFileCount") - private Long extractedFileCount; - - /* - * Components count. - */ - @JsonProperty(value = "componentCount") - private Long componentCount; - - /* - * Binary count - */ - @JsonProperty(value = "binaryCount") - private Long binaryCount; - - /* - * Time used for analysis - */ - @JsonProperty(value = "analysisTimeSeconds") - private Long analysisTimeSeconds; - - /* - * The number of root file systems found. - */ - @JsonProperty(value = "rootFileSystems") - private Long rootFileSystems; - - /** Creates an instance of FirmwareSummaryInner class. */ - public FirmwareSummaryInner() { - } - - /** - * Get the extractedSize property: Total extracted size of the firmware in bytes. - * - * @return the extractedSize value. - */ - public Long extractedSize() { - return this.extractedSize; - } - - /** - * Set the extractedSize property: Total extracted size of the firmware in bytes. - * - * @param extractedSize the extractedSize value to set. - * @return the FirmwareSummaryInner object itself. - */ - public FirmwareSummaryInner withExtractedSize(Long extractedSize) { - this.extractedSize = extractedSize; - return this; - } - - /** - * Get the fileSize property: Firmware file size in bytes. - * - * @return the fileSize value. - */ - public Long fileSize() { - return this.fileSize; - } - - /** - * Set the fileSize property: Firmware file size in bytes. - * - * @param fileSize the fileSize value to set. - * @return the FirmwareSummaryInner object itself. - */ - public FirmwareSummaryInner withFileSize(Long fileSize) { - this.fileSize = fileSize; - return this; - } - - /** - * Get the extractedFileCount property: Extracted file count. - * - * @return the extractedFileCount value. - */ - public Long extractedFileCount() { - return this.extractedFileCount; - } - - /** - * Set the extractedFileCount property: Extracted file count. - * - * @param extractedFileCount the extractedFileCount value to set. - * @return the FirmwareSummaryInner object itself. - */ - public FirmwareSummaryInner withExtractedFileCount(Long extractedFileCount) { - this.extractedFileCount = extractedFileCount; - return this; - } - - /** - * Get the componentCount property: Components count. - * - * @return the componentCount value. - */ - public Long componentCount() { - return this.componentCount; - } - - /** - * Set the componentCount property: Components count. - * - * @param componentCount the componentCount value to set. - * @return the FirmwareSummaryInner object itself. - */ - public FirmwareSummaryInner withComponentCount(Long componentCount) { - this.componentCount = componentCount; - return this; - } - - /** - * Get the binaryCount property: Binary count. - * - * @return the binaryCount value. - */ - public Long binaryCount() { - return this.binaryCount; - } - - /** - * Set the binaryCount property: Binary count. - * - * @param binaryCount the binaryCount value to set. - * @return the FirmwareSummaryInner object itself. - */ - public FirmwareSummaryInner withBinaryCount(Long binaryCount) { - this.binaryCount = binaryCount; - return this; - } - - /** - * Get the analysisTimeSeconds property: Time used for analysis. - * - * @return the analysisTimeSeconds value. - */ - public Long analysisTimeSeconds() { - return this.analysisTimeSeconds; - } - - /** - * Set the analysisTimeSeconds property: Time used for analysis. - * - * @param analysisTimeSeconds the analysisTimeSeconds value to set. - * @return the FirmwareSummaryInner object itself. - */ - public FirmwareSummaryInner withAnalysisTimeSeconds(Long analysisTimeSeconds) { - this.analysisTimeSeconds = analysisTimeSeconds; - return this; - } - - /** - * Get the rootFileSystems property: The number of root file systems found. - * - * @return the rootFileSystems value. - */ - public Long rootFileSystems() { - return this.rootFileSystems; - } - - /** - * Set the rootFileSystems property: The number of root file systems found. - * - * @param rootFileSystems the rootFileSystems value to set. - * @return the FirmwareSummaryInner object itself. - */ - public FirmwareSummaryInner withRootFileSystems(Long rootFileSystems) { - this.rootFileSystems = rootFileSystems; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/OperationInner.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/OperationInner.java index d45e50cd6ff04..9e665e7a378de 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/OperationInner.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/OperationInner.java @@ -12,8 +12,8 @@ /** * REST API Operation - * - *

Details of a REST API operation, returned from the Resource Provider Operations API. + * + * Details of a REST API operation, returned from the Resource Provider Operations API. */ @Fluent public final class OperationInner { @@ -50,14 +50,16 @@ public final class OperationInner { @JsonProperty(value = "actionType", access = JsonProperty.Access.WRITE_ONLY) private ActionType actionType; - /** Creates an instance of OperationInner class. */ + /** + * Creates an instance of OperationInner class. + */ public OperationInner() { } /** * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". - * + * * @return the name value. */ public String name() { @@ -67,7 +69,7 @@ public String name() { /** * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane * operations and "false" for ARM/control-plane operations. - * + * * @return the isDataAction value. */ public Boolean isDataAction() { @@ -76,7 +78,7 @@ public Boolean isDataAction() { /** * Get the display property: Localized display information for this particular operation. - * + * * @return the display value. */ public OperationDisplay display() { @@ -85,7 +87,7 @@ public OperationDisplay display() { /** * Set the display property: Localized display information for this particular operation. - * + * * @param display the display value to set. * @return the OperationInner object itself. */ @@ -97,7 +99,7 @@ public OperationInner withDisplay(OperationDisplay display) { /** * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and * audit logs UX. Default value is "user,system". - * + * * @return the origin value. */ public Origin origin() { @@ -107,7 +109,7 @@ public Origin origin() { /** * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal * only APIs. - * + * * @return the actionType value. */ public ActionType actionType() { @@ -116,7 +118,7 @@ public ActionType actionType() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/PasswordHashInner.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/PasswordHash.java similarity index 78% rename from sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/PasswordHashInner.java rename to sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/PasswordHash.java index a7486b889bffd..64fb63f701bfb 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/PasswordHashInner.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/PasswordHash.java @@ -7,9 +7,11 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Password hash properties. */ +/** + * Password hash properties. + */ @Fluent -public final class PasswordHashInner { +public final class PasswordHash { /* * ID for password hash */ @@ -52,13 +54,15 @@ public final class PasswordHashInner { @JsonProperty(value = "algorithm") private String algorithm; - /** Creates an instance of PasswordHashInner class. */ - public PasswordHashInner() { + /** + * Creates an instance of PasswordHash class. + */ + public PasswordHash() { } /** * Get the passwordHashId property: ID for password hash. - * + * * @return the passwordHashId value. */ public String passwordHashId() { @@ -67,18 +71,18 @@ public String passwordHashId() { /** * Set the passwordHashId property: ID for password hash. - * + * * @param passwordHashId the passwordHashId value to set. - * @return the PasswordHashInner object itself. + * @return the PasswordHash object itself. */ - public PasswordHashInner withPasswordHashId(String passwordHashId) { + public PasswordHash withPasswordHashId(String passwordHashId) { this.passwordHashId = passwordHashId; return this; } /** * Get the filePath property: File path of the password hash. - * + * * @return the filePath value. */ public String filePath() { @@ -87,18 +91,18 @@ public String filePath() { /** * Set the filePath property: File path of the password hash. - * + * * @param filePath the filePath value to set. - * @return the PasswordHashInner object itself. + * @return the PasswordHash object itself. */ - public PasswordHashInner withFilePath(String filePath) { + public PasswordHash withFilePath(String filePath) { this.filePath = filePath; return this; } /** * Get the salt property: Salt of the password hash. - * + * * @return the salt value. */ public String salt() { @@ -107,18 +111,18 @@ public String salt() { /** * Set the salt property: Salt of the password hash. - * + * * @param salt the salt value to set. - * @return the PasswordHashInner object itself. + * @return the PasswordHash object itself. */ - public PasswordHashInner withSalt(String salt) { + public PasswordHash withSalt(String salt) { this.salt = salt; return this; } /** * Get the hash property: Hash of the password. - * + * * @return the hash value. */ public String hash() { @@ -127,18 +131,18 @@ public String hash() { /** * Set the hash property: Hash of the password. - * + * * @param hash the hash value to set. - * @return the PasswordHashInner object itself. + * @return the PasswordHash object itself. */ - public PasswordHashInner withHash(String hash) { + public PasswordHash withHash(String hash) { this.hash = hash; return this; } /** * Get the context property: Context of password hash. - * + * * @return the context value. */ public String context() { @@ -147,18 +151,18 @@ public String context() { /** * Set the context property: Context of password hash. - * + * * @param context the context value to set. - * @return the PasswordHashInner object itself. + * @return the PasswordHash object itself. */ - public PasswordHashInner withContext(String context) { + public PasswordHash withContext(String context) { this.context = context; return this; } /** * Get the username property: User name of password hash. - * + * * @return the username value. */ public String username() { @@ -167,18 +171,18 @@ public String username() { /** * Set the username property: User name of password hash. - * + * * @param username the username value to set. - * @return the PasswordHashInner object itself. + * @return the PasswordHash object itself. */ - public PasswordHashInner withUsername(String username) { + public PasswordHash withUsername(String username) { this.username = username; return this; } /** * Get the algorithm property: Algorithm of the password hash. - * + * * @return the algorithm value. */ public String algorithm() { @@ -187,18 +191,18 @@ public String algorithm() { /** * Set the algorithm property: Algorithm of the password hash. - * + * * @param algorithm the algorithm value to set. - * @return the PasswordHashInner object itself. + * @return the PasswordHash object itself. */ - public PasswordHashInner withAlgorithm(String algorithm) { + public PasswordHash withAlgorithm(String algorithm) { this.algorithm = algorithm; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/PasswordHashResourceInner.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/PasswordHashResourceInner.java new file mode 100644 index 0000000000000..003fe8e9adb53 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/PasswordHashResourceInner.java @@ -0,0 +1,224 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Password hash resource. + */ +@Fluent +public final class PasswordHashResourceInner extends ProxyResource { + /* + * The properties of a password hash found within a firmware image + */ + @JsonProperty(value = "properties") + private PasswordHash innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of PasswordHashResourceInner class. + */ + public PasswordHashResourceInner() { + } + + /** + * Get the innerProperties property: The properties of a password hash found within a firmware image. + * + * @return the innerProperties value. + */ + private PasswordHash innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the passwordHashId property: ID for password hash. + * + * @return the passwordHashId value. + */ + public String passwordHashId() { + return this.innerProperties() == null ? null : this.innerProperties().passwordHashId(); + } + + /** + * Set the passwordHashId property: ID for password hash. + * + * @param passwordHashId the passwordHashId value to set. + * @return the PasswordHashResourceInner object itself. + */ + public PasswordHashResourceInner withPasswordHashId(String passwordHashId) { + if (this.innerProperties() == null) { + this.innerProperties = new PasswordHash(); + } + this.innerProperties().withPasswordHashId(passwordHashId); + return this; + } + + /** + * Get the filePath property: File path of the password hash. + * + * @return the filePath value. + */ + public String filePath() { + return this.innerProperties() == null ? null : this.innerProperties().filePath(); + } + + /** + * Set the filePath property: File path of the password hash. + * + * @param filePath the filePath value to set. + * @return the PasswordHashResourceInner object itself. + */ + public PasswordHashResourceInner withFilePath(String filePath) { + if (this.innerProperties() == null) { + this.innerProperties = new PasswordHash(); + } + this.innerProperties().withFilePath(filePath); + return this; + } + + /** + * Get the salt property: Salt of the password hash. + * + * @return the salt value. + */ + public String salt() { + return this.innerProperties() == null ? null : this.innerProperties().salt(); + } + + /** + * Set the salt property: Salt of the password hash. + * + * @param salt the salt value to set. + * @return the PasswordHashResourceInner object itself. + */ + public PasswordHashResourceInner withSalt(String salt) { + if (this.innerProperties() == null) { + this.innerProperties = new PasswordHash(); + } + this.innerProperties().withSalt(salt); + return this; + } + + /** + * Get the hash property: Hash of the password. + * + * @return the hash value. + */ + public String hash() { + return this.innerProperties() == null ? null : this.innerProperties().hash(); + } + + /** + * Set the hash property: Hash of the password. + * + * @param hash the hash value to set. + * @return the PasswordHashResourceInner object itself. + */ + public PasswordHashResourceInner withHash(String hash) { + if (this.innerProperties() == null) { + this.innerProperties = new PasswordHash(); + } + this.innerProperties().withHash(hash); + return this; + } + + /** + * Get the context property: Context of password hash. + * + * @return the context value. + */ + public String context() { + return this.innerProperties() == null ? null : this.innerProperties().context(); + } + + /** + * Set the context property: Context of password hash. + * + * @param context the context value to set. + * @return the PasswordHashResourceInner object itself. + */ + public PasswordHashResourceInner withContext(String context) { + if (this.innerProperties() == null) { + this.innerProperties = new PasswordHash(); + } + this.innerProperties().withContext(context); + return this; + } + + /** + * Get the username property: User name of password hash. + * + * @return the username value. + */ + public String username() { + return this.innerProperties() == null ? null : this.innerProperties().username(); + } + + /** + * Set the username property: User name of password hash. + * + * @param username the username value to set. + * @return the PasswordHashResourceInner object itself. + */ + public PasswordHashResourceInner withUsername(String username) { + if (this.innerProperties() == null) { + this.innerProperties = new PasswordHash(); + } + this.innerProperties().withUsername(username); + return this; + } + + /** + * Get the algorithm property: Algorithm of the password hash. + * + * @return the algorithm value. + */ + public String algorithm() { + return this.innerProperties() == null ? null : this.innerProperties().algorithm(); + } + + /** + * Set the algorithm property: Algorithm of the password hash. + * + * @param algorithm the algorithm value to set. + * @return the PasswordHashResourceInner object itself. + */ + public PasswordHashResourceInner withAlgorithm(String algorithm) { + if (this.innerProperties() == null) { + this.innerProperties = new PasswordHash(); + } + this.innerProperties().withAlgorithm(algorithm); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/SbomComponent.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/SbomComponent.java new file mode 100644 index 0000000000000..46d4a5dee2d72 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/SbomComponent.java @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * SBOM component of a firmware. + */ +@Fluent +public final class SbomComponent { + /* + * ID for the component. + */ + @JsonProperty(value = "componentId") + private String componentId; + + /* + * Name for the component. + */ + @JsonProperty(value = "componentName") + private String componentName; + + /* + * Version for the component. + */ + @JsonProperty(value = "version") + private String version; + + /* + * License for the component. + */ + @JsonProperty(value = "license") + private String license; + + /* + * File paths related to the component. + */ + @JsonProperty(value = "filePaths") + private List filePaths; + + /** + * Creates an instance of SbomComponent class. + */ + public SbomComponent() { + } + + /** + * Get the componentId property: ID for the component. + * + * @return the componentId value. + */ + public String componentId() { + return this.componentId; + } + + /** + * Set the componentId property: ID for the component. + * + * @param componentId the componentId value to set. + * @return the SbomComponent object itself. + */ + public SbomComponent withComponentId(String componentId) { + this.componentId = componentId; + return this; + } + + /** + * Get the componentName property: Name for the component. + * + * @return the componentName value. + */ + public String componentName() { + return this.componentName; + } + + /** + * Set the componentName property: Name for the component. + * + * @param componentName the componentName value to set. + * @return the SbomComponent object itself. + */ + public SbomComponent withComponentName(String componentName) { + this.componentName = componentName; + return this; + } + + /** + * Get the version property: Version for the component. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: Version for the component. + * + * @param version the version value to set. + * @return the SbomComponent object itself. + */ + public SbomComponent withVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the license property: License for the component. + * + * @return the license value. + */ + public String license() { + return this.license; + } + + /** + * Set the license property: License for the component. + * + * @param license the license value to set. + * @return the SbomComponent object itself. + */ + public SbomComponent withLicense(String license) { + this.license = license; + return this; + } + + /** + * Get the filePaths property: File paths related to the component. + * + * @return the filePaths value. + */ + public List filePaths() { + return this.filePaths; + } + + /** + * Set the filePaths property: File paths related to the component. + * + * @param filePaths the filePaths value to set. + * @return the SbomComponent object itself. + */ + public SbomComponent withFilePaths(List filePaths) { + this.filePaths = filePaths; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/SbomComponentResourceInner.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/SbomComponentResourceInner.java new file mode 100644 index 0000000000000..7704186e4ce87 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/SbomComponentResourceInner.java @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * SBOM analysis result resource. + */ +@Fluent +public final class SbomComponentResourceInner extends ProxyResource { + /* + * The properties of an SBOM component found within a firmware image + */ + @JsonProperty(value = "properties") + private SbomComponent innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of SbomComponentResourceInner class. + */ + public SbomComponentResourceInner() { + } + + /** + * Get the innerProperties property: The properties of an SBOM component found within a firmware image. + * + * @return the innerProperties value. + */ + private SbomComponent innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the componentId property: ID for the component. + * + * @return the componentId value. + */ + public String componentId() { + return this.innerProperties() == null ? null : this.innerProperties().componentId(); + } + + /** + * Set the componentId property: ID for the component. + * + * @param componentId the componentId value to set. + * @return the SbomComponentResourceInner object itself. + */ + public SbomComponentResourceInner withComponentId(String componentId) { + if (this.innerProperties() == null) { + this.innerProperties = new SbomComponent(); + } + this.innerProperties().withComponentId(componentId); + return this; + } + + /** + * Get the componentName property: Name for the component. + * + * @return the componentName value. + */ + public String componentName() { + return this.innerProperties() == null ? null : this.innerProperties().componentName(); + } + + /** + * Set the componentName property: Name for the component. + * + * @param componentName the componentName value to set. + * @return the SbomComponentResourceInner object itself. + */ + public SbomComponentResourceInner withComponentName(String componentName) { + if (this.innerProperties() == null) { + this.innerProperties = new SbomComponent(); + } + this.innerProperties().withComponentName(componentName); + return this; + } + + /** + * Get the version property: Version for the component. + * + * @return the version value. + */ + public String version() { + return this.innerProperties() == null ? null : this.innerProperties().version(); + } + + /** + * Set the version property: Version for the component. + * + * @param version the version value to set. + * @return the SbomComponentResourceInner object itself. + */ + public SbomComponentResourceInner withVersion(String version) { + if (this.innerProperties() == null) { + this.innerProperties = new SbomComponent(); + } + this.innerProperties().withVersion(version); + return this; + } + + /** + * Get the license property: License for the component. + * + * @return the license value. + */ + public String license() { + return this.innerProperties() == null ? null : this.innerProperties().license(); + } + + /** + * Set the license property: License for the component. + * + * @param license the license value to set. + * @return the SbomComponentResourceInner object itself. + */ + public SbomComponentResourceInner withLicense(String license) { + if (this.innerProperties() == null) { + this.innerProperties = new SbomComponent(); + } + this.innerProperties().withLicense(license); + return this; + } + + /** + * Get the filePaths property: File paths related to the component. + * + * @return the filePaths value. + */ + public List filePaths() { + return this.innerProperties() == null ? null : this.innerProperties().filePaths(); + } + + /** + * Set the filePaths property: File paths related to the component. + * + * @param filePaths the filePaths value to set. + * @return the SbomComponentResourceInner object itself. + */ + public SbomComponentResourceInner withFilePaths(List filePaths) { + if (this.innerProperties() == null) { + this.innerProperties = new SbomComponent(); + } + this.innerProperties().withFilePaths(filePaths); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/SummaryResourceInner.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/SummaryResourceInner.java new file mode 100644 index 0000000000000..7f7bfdda32081 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/SummaryResourceInner.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.iotfirmwaredefense.models.SummaryResourceProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The object representing a firmware analysis summary resource. + */ +@Immutable +public final class SummaryResourceInner extends ProxyResource { + /* + * Properties of an analysis summary. + */ + @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) + private SummaryResourceProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of SummaryResourceInner class. + */ + public SummaryResourceInner() { + } + + /** + * Get the properties property: Properties of an analysis summary. + * + * @return the properties value. + */ + public SummaryResourceProperties properties() { + return this.properties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/UrlTokenInner.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/UrlTokenInner.java index 40164c117d837..4aafb2c90a322 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/UrlTokenInner.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/UrlTokenInner.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Url data for creating or accessing a blob file. */ +/** + * Url data for creating or accessing a blob file. + */ @Immutable public final class UrlTokenInner { /* @@ -16,37 +18,24 @@ public final class UrlTokenInner { @JsonProperty(value = "url", access = JsonProperty.Access.WRITE_ONLY) private String url; - /* - * SAS URL for file uploading. Kept for backwards compatibility + /** + * Creates an instance of UrlTokenInner class. */ - @JsonProperty(value = "uploadUrl", access = JsonProperty.Access.WRITE_ONLY) - private String uploadUrl; - - /** Creates an instance of UrlTokenInner class. */ public UrlTokenInner() { } /** * Get the url property: SAS URL for creating or accessing a blob file. - * + * * @return the url value. */ public String url() { return this.url; } - /** - * Get the uploadUrl property: SAS URL for file uploading. Kept for backwards compatibility. - * - * @return the uploadUrl value. - */ - public String uploadUrl() { - return this.uploadUrl; - } - /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/WorkspaceInner.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/WorkspaceInner.java index 89c0c0cd5e3e0..0edab0172f15a 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/WorkspaceInner.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/WorkspaceInner.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Firmware analysis workspace. */ +/** + * Firmware analysis workspace. + */ @Fluent public final class WorkspaceInner extends Resource { /* @@ -26,13 +28,15 @@ public final class WorkspaceInner extends Resource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of WorkspaceInner class. */ + /** + * Creates an instance of WorkspaceInner class. + */ public WorkspaceInner() { } /** * Get the innerProperties property: Workspace properties. - * + * * @return the innerProperties value. */ private WorkspaceProperties innerProperties() { @@ -41,21 +45,25 @@ private WorkspaceProperties innerProperties() { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { return this.systemData; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public WorkspaceInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public WorkspaceInner withTags(Map tags) { super.withTags(tags); @@ -64,7 +72,7 @@ public WorkspaceInner withTags(Map tags) { /** * Get the provisioningState property: Provisioning state of the resource. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -73,7 +81,7 @@ public ProvisioningState provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/WorkspaceProperties.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/WorkspaceProperties.java index 0550db5d17909..505cdbda358d1 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/WorkspaceProperties.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/WorkspaceProperties.java @@ -8,7 +8,9 @@ import com.azure.resourcemanager.iotfirmwaredefense.models.ProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; -/** Workspace properties. */ +/** + * Workspace properties. + */ @Immutable public final class WorkspaceProperties { /* @@ -17,13 +19,15 @@ public final class WorkspaceProperties { @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ProvisioningState provisioningState; - /** Creates an instance of WorkspaceProperties class. */ + /** + * Creates an instance of WorkspaceProperties class. + */ public WorkspaceProperties() { } /** * Get the provisioningState property: Provisioning state of the resource. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -32,7 +36,7 @@ public ProvisioningState provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/package-info.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/package-info.java index 3a80a61295751..1e6f7f0c41e31 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/package-info.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/package-info.java @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the inner data models for Fist. The definitions and parameters in this swagger specification will - * be used to manage the IoT Firmware Defense resources. + * Package containing the inner data models for IoTFirmwareDefense. + * Firmware & IoT Security REST API. */ package com.azure.resourcemanager.iotfirmwaredefense.fluent.models; diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/package-info.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/package-info.java index b8362def140f3..13851f086a9f9 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/package-info.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/package-info.java @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the service clients for Fist. The definitions and parameters in this swagger specification will be - * used to manage the IoT Firmware Defense resources. + * Package containing the service clients for IoTFirmwareDefense. + * Firmware & IoT Security REST API. */ package com.azure.resourcemanager.iotfirmwaredefense.fluent; diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/BinaryHardeningImpl.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/BinaryHardeningResourceImpl.java similarity index 63% rename from sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/BinaryHardeningImpl.java rename to sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/BinaryHardeningResourceImpl.java index c30ed498a1263..ff952ebb7544f 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/BinaryHardeningImpl.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/BinaryHardeningResourceImpl.java @@ -4,26 +4,37 @@ package com.azure.resourcemanager.iotfirmwaredefense.implementation; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.BinaryHardeningInner; -import com.azure.resourcemanager.iotfirmwaredefense.models.BinaryHardening; -import com.azure.resourcemanager.iotfirmwaredefense.models.CanaryFlag; -import com.azure.resourcemanager.iotfirmwaredefense.models.NxFlag; -import com.azure.resourcemanager.iotfirmwaredefense.models.PieFlag; -import com.azure.resourcemanager.iotfirmwaredefense.models.RelroFlag; -import com.azure.resourcemanager.iotfirmwaredefense.models.StrippedFlag; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.BinaryHardeningResourceInner; +import com.azure.resourcemanager.iotfirmwaredefense.models.BinaryHardeningResource; -public final class BinaryHardeningImpl implements BinaryHardening { - private BinaryHardeningInner innerObject; +public final class BinaryHardeningResourceImpl implements BinaryHardeningResource { + private BinaryHardeningResourceInner innerObject; private final com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager; - BinaryHardeningImpl( - BinaryHardeningInner innerObject, + BinaryHardeningResourceImpl(BinaryHardeningResourceInner innerObject, com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String binaryHardeningId() { return this.innerModel().binaryHardeningId(); } @@ -32,8 +43,8 @@ public String architecture() { return this.innerModel().architecture(); } - public String path() { - return this.innerModel().path(); + public String filePath() { + return this.innerModel().filePath(); } public String classProperty() { @@ -48,27 +59,27 @@ public String rpath() { return this.innerModel().rpath(); } - public NxFlag nx() { + public Boolean nx() { return this.innerModel().nx(); } - public PieFlag pie() { + public Boolean pie() { return this.innerModel().pie(); } - public RelroFlag relro() { + public Boolean relro() { return this.innerModel().relro(); } - public CanaryFlag canary() { + public Boolean canary() { return this.innerModel().canary(); } - public StrippedFlag stripped() { + public Boolean stripped() { return this.innerModel().stripped(); } - public BinaryHardeningInner innerModel() { + public BinaryHardeningResourceInner innerModel() { return this.innerObject; } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/BinaryHardeningSummaryImpl.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/BinaryHardeningSummaryImpl.java deleted file mode 100644 index 435686164972f..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/BinaryHardeningSummaryImpl.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.iotfirmwaredefense.implementation; - -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.BinaryHardeningSummaryInner; -import com.azure.resourcemanager.iotfirmwaredefense.models.BinaryHardeningSummary; - -public final class BinaryHardeningSummaryImpl implements BinaryHardeningSummary { - private BinaryHardeningSummaryInner innerObject; - - private final com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager; - - BinaryHardeningSummaryImpl( - BinaryHardeningSummaryInner innerObject, - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public Long totalFiles() { - return this.innerModel().totalFiles(); - } - - public Integer nx() { - return this.innerModel().nx(); - } - - public Integer pie() { - return this.innerModel().pie(); - } - - public Integer relro() { - return this.innerModel().relro(); - } - - public Integer canary() { - return this.innerModel().canary(); - } - - public Integer stripped() { - return this.innerModel().stripped(); - } - - public BinaryHardeningSummaryInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/BinaryHardeningsClientImpl.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/BinaryHardeningsClientImpl.java new file mode 100644 index 0000000000000..d681358f1eb9f --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/BinaryHardeningsClientImpl.java @@ -0,0 +1,300 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.BinaryHardeningsClient; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.BinaryHardeningResourceInner; +import com.azure.resourcemanager.iotfirmwaredefense.models.BinaryHardeningListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in BinaryHardeningsClient. + */ +public final class BinaryHardeningsClientImpl implements BinaryHardeningsClient { + /** + * The proxy service used to perform REST calls. + */ + private final BinaryHardeningsService service; + + /** + * The service client containing this operation class. + */ + private final IoTFirmwareDefenseImpl client; + + /** + * Initializes an instance of BinaryHardeningsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + BinaryHardeningsClientImpl(IoTFirmwareDefenseImpl client) { + this.service + = RestProxy.create(BinaryHardeningsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for IoTFirmwareDefenseBinaryHardenings to be used by the proxy service + * to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "IoTFirmwareDefenseBi") + public interface BinaryHardeningsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/binaryHardeningResults") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByFirmware(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("firmwareId") String firmwareId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByFirmwareNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Lists binary hardening analysis results of a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of binary hardening results along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByFirmwareSinglePageAsync(String resourceGroupName, + String workspaceName, String firmwareId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (firmwareId == null) { + return Mono.error(new IllegalArgumentException("Parameter firmwareId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByFirmware(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, firmwareId, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists binary hardening analysis results of a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of binary hardening results along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByFirmwareSinglePageAsync(String resourceGroupName, + String workspaceName, String firmwareId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (firmwareId == null) { + return Mono.error(new IllegalArgumentException("Parameter firmwareId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByFirmware(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, firmwareId, this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists binary hardening analysis results of a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of binary hardening results as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByFirmwareAsync(String resourceGroupName, String workspaceName, + String firmwareId) { + return new PagedFlux<>(() -> listByFirmwareSinglePageAsync(resourceGroupName, workspaceName, firmwareId), + nextLink -> listByFirmwareNextSinglePageAsync(nextLink)); + } + + /** + * Lists binary hardening analysis results of a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of binary hardening results as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByFirmwareAsync(String resourceGroupName, String workspaceName, + String firmwareId, Context context) { + return new PagedFlux<>( + () -> listByFirmwareSinglePageAsync(resourceGroupName, workspaceName, firmwareId, context), + nextLink -> listByFirmwareNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists binary hardening analysis results of a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of binary hardening results as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId) { + return new PagedIterable<>(listByFirmwareAsync(resourceGroupName, workspaceName, firmwareId)); + } + + /** + * Lists binary hardening analysis results of a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of binary hardening results as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId, Context context) { + return new PagedIterable<>(listByFirmwareAsync(resourceGroupName, workspaceName, firmwareId, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of binary hardening results along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByFirmwareNextSinglePageAsync(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.listByFirmwareNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of binary hardening results along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByFirmwareNextSinglePageAsync(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.listByFirmwareNext(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/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/BinaryHardeningsImpl.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/BinaryHardeningsImpl.java new file mode 100644 index 0000000000000..8de1d800e527f --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/BinaryHardeningsImpl.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.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.iotfirmwaredefense.fluent.BinaryHardeningsClient; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.BinaryHardeningResourceInner; +import com.azure.resourcemanager.iotfirmwaredefense.models.BinaryHardeningResource; +import com.azure.resourcemanager.iotfirmwaredefense.models.BinaryHardenings; + +public final class BinaryHardeningsImpl implements BinaryHardenings { + private static final ClientLogger LOGGER = new ClientLogger(BinaryHardeningsImpl.class); + + private final BinaryHardeningsClient innerClient; + + private final com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager; + + public BinaryHardeningsImpl(BinaryHardeningsClient innerClient, + com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId) { + PagedIterable inner + = this.serviceClient().listByFirmware(resourceGroupName, workspaceName, firmwareId); + return ResourceManagerUtils.mapPage(inner, inner1 -> new BinaryHardeningResourceImpl(inner1, this.manager())); + } + + public PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId, Context context) { + PagedIterable inner + = this.serviceClient().listByFirmware(resourceGroupName, workspaceName, firmwareId, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new BinaryHardeningResourceImpl(inner1, this.manager())); + } + + private BinaryHardeningsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CryptoCertificateImpl.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CryptoCertificateResourceImpl.java similarity index 77% rename from sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CryptoCertificateImpl.java rename to sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CryptoCertificateResourceImpl.java index 7d4de06b6ae1a..175d3e5890074 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CryptoCertificateImpl.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CryptoCertificateResourceImpl.java @@ -4,38 +4,50 @@ package com.azure.resourcemanager.iotfirmwaredefense.implementation; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CryptoCertificateInner; -import com.azure.resourcemanager.iotfirmwaredefense.models.CryptoCertificate; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CryptoCertificateResourceInner; import com.azure.resourcemanager.iotfirmwaredefense.models.CryptoCertificateEntity; -import com.azure.resourcemanager.iotfirmwaredefense.models.IsExpired; -import com.azure.resourcemanager.iotfirmwaredefense.models.IsSelfSigned; -import com.azure.resourcemanager.iotfirmwaredefense.models.IsShortKeySize; -import com.azure.resourcemanager.iotfirmwaredefense.models.IsWeakSignature; +import com.azure.resourcemanager.iotfirmwaredefense.models.CryptoCertificateResource; import com.azure.resourcemanager.iotfirmwaredefense.models.PairedKey; import java.time.OffsetDateTime; import java.util.Collections; import java.util.List; -public final class CryptoCertificateImpl implements CryptoCertificate { - private CryptoCertificateInner innerObject; +public final class CryptoCertificateResourceImpl implements CryptoCertificateResource { + private CryptoCertificateResourceInner innerObject; private final com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager; - CryptoCertificateImpl( - CryptoCertificateInner innerObject, + CryptoCertificateResourceImpl(CryptoCertificateResourceInner innerObject, com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } - public String cryptoCertId() { - return this.innerModel().cryptoCertId(); + public String id() { + return this.innerModel().id(); } public String name() { return this.innerModel().name(); } + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String cryptoCertId() { + return this.innerModel().cryptoCertId(); + } + + public String namePropertiesName() { + return this.innerModel().namePropertiesName(); + } + public CryptoCertificateEntity subject() { return this.innerModel().subject(); } @@ -102,23 +114,23 @@ public PairedKey pairedKey() { return this.innerModel().pairedKey(); } - public IsExpired isExpired() { + public Boolean isExpired() { return this.innerModel().isExpired(); } - public IsSelfSigned isSelfSigned() { + public Boolean isSelfSigned() { return this.innerModel().isSelfSigned(); } - public IsWeakSignature isWeakSignature() { + public Boolean isWeakSignature() { return this.innerModel().isWeakSignature(); } - public IsShortKeySize isShortKeySize() { + public Boolean isShortKeySize() { return this.innerModel().isShortKeySize(); } - public CryptoCertificateInner innerModel() { + public CryptoCertificateResourceInner innerModel() { return this.innerObject; } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CryptoCertificateSummaryImpl.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CryptoCertificateSummaryImpl.java deleted file mode 100644 index e18e7d7a66e68..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CryptoCertificateSummaryImpl.java +++ /dev/null @@ -1,57 +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.iotfirmwaredefense.implementation; - -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CryptoCertificateSummaryInner; -import com.azure.resourcemanager.iotfirmwaredefense.models.CryptoCertificateSummary; - -public final class CryptoCertificateSummaryImpl implements CryptoCertificateSummary { - private CryptoCertificateSummaryInner innerObject; - - private final com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager; - - CryptoCertificateSummaryImpl( - CryptoCertificateSummaryInner innerObject, - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public Long totalCertificates() { - return this.innerModel().totalCertificates(); - } - - public Long pairedKeys() { - return this.innerModel().pairedKeys(); - } - - public Long expired() { - return this.innerModel().expired(); - } - - public Long expiringSoon() { - return this.innerModel().expiringSoon(); - } - - public Long weakSignature() { - return this.innerModel().weakSignature(); - } - - public Long selfSigned() { - return this.innerModel().selfSigned(); - } - - public Long shortKeySize() { - return this.innerModel().shortKeySize(); - } - - public CryptoCertificateSummaryInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CryptoCertificatesClientImpl.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CryptoCertificatesClientImpl.java new file mode 100644 index 0000000000000..1471fa83acfae --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CryptoCertificatesClientImpl.java @@ -0,0 +1,296 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.CryptoCertificatesClient; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CryptoCertificateResourceInner; +import com.azure.resourcemanager.iotfirmwaredefense.models.CryptoCertificateListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in CryptoCertificatesClient. + */ +public final class CryptoCertificatesClientImpl implements CryptoCertificatesClient { + /** + * The proxy service used to perform REST calls. + */ + private final CryptoCertificatesService service; + + /** + * The service client containing this operation class. + */ + private final IoTFirmwareDefenseImpl client; + + /** + * Initializes an instance of CryptoCertificatesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + CryptoCertificatesClientImpl(IoTFirmwareDefenseImpl client) { + this.service = RestProxy.create(CryptoCertificatesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for IoTFirmwareDefenseCryptoCertificates to be used by the proxy service + * to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "IoTFirmwareDefenseCr") + public interface CryptoCertificatesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/cryptoCertificates") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByFirmware(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("firmwareId") String firmwareId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByFirmwareNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Lists cryptographic certificate analysis results found in a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of crypto certificates along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByFirmwareSinglePageAsync(String resourceGroupName, + String workspaceName, String firmwareId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (firmwareId == null) { + return Mono.error(new IllegalArgumentException("Parameter firmwareId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByFirmware(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, firmwareId, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists cryptographic certificate analysis results found in a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of crypto certificates along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByFirmwareSinglePageAsync(String resourceGroupName, + String workspaceName, String firmwareId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (firmwareId == null) { + return Mono.error(new IllegalArgumentException("Parameter firmwareId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByFirmware(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, firmwareId, this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists cryptographic certificate analysis results found in a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of crypto certificates as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByFirmwareAsync(String resourceGroupName, + String workspaceName, String firmwareId) { + return new PagedFlux<>(() -> listByFirmwareSinglePageAsync(resourceGroupName, workspaceName, firmwareId), + nextLink -> listByFirmwareNextSinglePageAsync(nextLink)); + } + + /** + * Lists cryptographic certificate analysis results found in a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of crypto certificates as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByFirmwareAsync(String resourceGroupName, + String workspaceName, String firmwareId, Context context) { + return new PagedFlux<>( + () -> listByFirmwareSinglePageAsync(resourceGroupName, workspaceName, firmwareId, context), + nextLink -> listByFirmwareNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists cryptographic certificate analysis results found in a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of crypto certificates as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId) { + return new PagedIterable<>(listByFirmwareAsync(resourceGroupName, workspaceName, firmwareId)); + } + + /** + * Lists cryptographic certificate analysis results found in a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of crypto certificates as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId, Context context) { + return new PagedIterable<>(listByFirmwareAsync(resourceGroupName, workspaceName, firmwareId, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of crypto certificates along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByFirmwareNextSinglePageAsync(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.listByFirmwareNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of crypto certificates along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByFirmwareNextSinglePageAsync(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.listByFirmwareNext(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/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CryptoCertificatesImpl.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CryptoCertificatesImpl.java new file mode 100644 index 0000000000000..5f331c5d53e37 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CryptoCertificatesImpl.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.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.iotfirmwaredefense.fluent.CryptoCertificatesClient; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CryptoCertificateResourceInner; +import com.azure.resourcemanager.iotfirmwaredefense.models.CryptoCertificateResource; +import com.azure.resourcemanager.iotfirmwaredefense.models.CryptoCertificates; + +public final class CryptoCertificatesImpl implements CryptoCertificates { + private static final ClientLogger LOGGER = new ClientLogger(CryptoCertificatesImpl.class); + + private final CryptoCertificatesClient innerClient; + + private final com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager; + + public CryptoCertificatesImpl(CryptoCertificatesClient innerClient, + com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId) { + PagedIterable inner + = this.serviceClient().listByFirmware(resourceGroupName, workspaceName, firmwareId); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CryptoCertificateResourceImpl(inner1, this.manager())); + } + + public PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId, Context context) { + PagedIterable inner + = this.serviceClient().listByFirmware(resourceGroupName, workspaceName, firmwareId, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CryptoCertificateResourceImpl(inner1, this.manager())); + } + + private CryptoCertificatesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CryptoKeyImpl.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CryptoKeyResourceImpl.java similarity index 74% rename from sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CryptoKeyImpl.java rename to sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CryptoKeyResourceImpl.java index a1aa8febbaf67..eeca5b7a60328 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CryptoKeyImpl.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CryptoKeyResourceImpl.java @@ -4,25 +4,40 @@ package com.azure.resourcemanager.iotfirmwaredefense.implementation; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CryptoKeyInner; -import com.azure.resourcemanager.iotfirmwaredefense.models.CryptoKey; -import com.azure.resourcemanager.iotfirmwaredefense.models.IsShortKeySize; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CryptoKeyResourceInner; +import com.azure.resourcemanager.iotfirmwaredefense.models.CryptoKeyResource; import com.azure.resourcemanager.iotfirmwaredefense.models.PairedKey; import java.util.Collections; import java.util.List; -public final class CryptoKeyImpl implements CryptoKey { - private CryptoKeyInner innerObject; +public final class CryptoKeyResourceImpl implements CryptoKeyResource { + private CryptoKeyResourceInner innerObject; private final com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager; - CryptoKeyImpl( - CryptoKeyInner innerObject, + CryptoKeyResourceImpl(CryptoKeyResourceInner innerObject, com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String cryptoKeyId() { return this.innerModel().cryptoKeyId(); } @@ -61,11 +76,11 @@ public PairedKey pairedKey() { return this.innerModel().pairedKey(); } - public IsShortKeySize isShortKeySize() { + public Boolean isShortKeySize() { return this.innerModel().isShortKeySize(); } - public CryptoKeyInner innerModel() { + public CryptoKeyResourceInner innerModel() { return this.innerObject; } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CryptoKeySummaryImpl.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CryptoKeySummaryImpl.java deleted file mode 100644 index bed579f3265fc..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CryptoKeySummaryImpl.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.iotfirmwaredefense.implementation; - -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CryptoKeySummaryInner; -import com.azure.resourcemanager.iotfirmwaredefense.models.CryptoKeySummary; - -public final class CryptoKeySummaryImpl implements CryptoKeySummary { - private CryptoKeySummaryInner innerObject; - - private final com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager; - - CryptoKeySummaryImpl( - CryptoKeySummaryInner innerObject, - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public Long totalKeys() { - return this.innerModel().totalKeys(); - } - - public Long publicKeys() { - return this.innerModel().publicKeys(); - } - - public Long privateKeys() { - return this.innerModel().privateKeys(); - } - - public Long pairedKeys() { - return this.innerModel().pairedKeys(); - } - - public Long shortKeySize() { - return this.innerModel().shortKeySize(); - } - - public CryptoKeySummaryInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CryptoKeysClientImpl.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CryptoKeysClientImpl.java new file mode 100644 index 0000000000000..b9cf4dc2b54d9 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CryptoKeysClientImpl.java @@ -0,0 +1,296 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.CryptoKeysClient; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CryptoKeyResourceInner; +import com.azure.resourcemanager.iotfirmwaredefense.models.CryptoKeyListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in CryptoKeysClient. + */ +public final class CryptoKeysClientImpl implements CryptoKeysClient { + /** + * The proxy service used to perform REST calls. + */ + private final CryptoKeysService service; + + /** + * The service client containing this operation class. + */ + private final IoTFirmwareDefenseImpl client; + + /** + * Initializes an instance of CryptoKeysClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + CryptoKeysClientImpl(IoTFirmwareDefenseImpl client) { + this.service + = RestProxy.create(CryptoKeysService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for IoTFirmwareDefenseCryptoKeys to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "IoTFirmwareDefenseCr") + public interface CryptoKeysService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/cryptoKeys") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByFirmware(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("firmwareId") String firmwareId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByFirmwareNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Lists cryptographic key analysis results found in a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of crypto keys along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByFirmwareSinglePageAsync(String resourceGroupName, + String workspaceName, String firmwareId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (firmwareId == null) { + return Mono.error(new IllegalArgumentException("Parameter firmwareId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByFirmware(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, firmwareId, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists cryptographic key analysis results found in a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of crypto keys along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByFirmwareSinglePageAsync(String resourceGroupName, + String workspaceName, String firmwareId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (firmwareId == null) { + return Mono.error(new IllegalArgumentException("Parameter firmwareId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByFirmware(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, firmwareId, this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists cryptographic key analysis results found in a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of crypto keys as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByFirmwareAsync(String resourceGroupName, String workspaceName, + String firmwareId) { + return new PagedFlux<>(() -> listByFirmwareSinglePageAsync(resourceGroupName, workspaceName, firmwareId), + nextLink -> listByFirmwareNextSinglePageAsync(nextLink)); + } + + /** + * Lists cryptographic key analysis results found in a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of crypto keys as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByFirmwareAsync(String resourceGroupName, String workspaceName, + String firmwareId, Context context) { + return new PagedFlux<>( + () -> listByFirmwareSinglePageAsync(resourceGroupName, workspaceName, firmwareId, context), + nextLink -> listByFirmwareNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists cryptographic key analysis results found in a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of crypto keys as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId) { + return new PagedIterable<>(listByFirmwareAsync(resourceGroupName, workspaceName, firmwareId)); + } + + /** + * Lists cryptographic key analysis results found in a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of crypto keys as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId, Context context) { + return new PagedIterable<>(listByFirmwareAsync(resourceGroupName, workspaceName, firmwareId, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of crypto keys along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByFirmwareNextSinglePageAsync(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.listByFirmwareNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of crypto keys along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByFirmwareNextSinglePageAsync(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.listByFirmwareNext(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/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CryptoKeysImpl.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CryptoKeysImpl.java new file mode 100644 index 0000000000000..4f87e68e9cf5a --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CryptoKeysImpl.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.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.iotfirmwaredefense.fluent.CryptoKeysClient; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CryptoKeyResourceInner; +import com.azure.resourcemanager.iotfirmwaredefense.models.CryptoKeyResource; +import com.azure.resourcemanager.iotfirmwaredefense.models.CryptoKeys; + +public final class CryptoKeysImpl implements CryptoKeys { + private static final ClientLogger LOGGER = new ClientLogger(CryptoKeysImpl.class); + + private final CryptoKeysClient innerClient; + + private final com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager; + + public CryptoKeysImpl(CryptoKeysClient innerClient, + com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId) { + PagedIterable inner + = this.serviceClient().listByFirmware(resourceGroupName, workspaceName, firmwareId); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CryptoKeyResourceImpl(inner1, this.manager())); + } + + public PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId, Context context) { + PagedIterable inner + = this.serviceClient().listByFirmware(resourceGroupName, workspaceName, firmwareId, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CryptoKeyResourceImpl(inner1, this.manager())); + } + + private CryptoKeysClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CveImpl.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CveResourceImpl.java similarity index 67% rename from sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CveImpl.java rename to sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CveResourceImpl.java index e22c8c30c96d9..e0e5641e2c635 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CveImpl.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CveResourceImpl.java @@ -4,29 +4,46 @@ package com.azure.resourcemanager.iotfirmwaredefense.implementation; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CveInner; -import com.azure.resourcemanager.iotfirmwaredefense.models.Cve; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CveResourceInner; +import com.azure.resourcemanager.iotfirmwaredefense.models.CveComponent; import com.azure.resourcemanager.iotfirmwaredefense.models.CveLink; -import java.time.OffsetDateTime; +import com.azure.resourcemanager.iotfirmwaredefense.models.CveResource; import java.util.Collections; import java.util.List; -public final class CveImpl implements Cve { - private CveInner innerObject; +public final class CveResourceImpl implements CveResource { + private CveResourceInner innerObject; private final com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager; - CveImpl( - CveInner innerObject, com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager) { + CveResourceImpl(CveResourceInner innerObject, + com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String cveId() { return this.innerModel().cveId(); } - public Object component() { + public CveComponent component() { return this.innerModel().component(); } @@ -34,8 +51,8 @@ public String severity() { return this.innerModel().severity(); } - public String name() { - return this.innerModel().name(); + public String namePropertiesName() { + return this.innerModel().namePropertiesName(); } public String cvssScore() { @@ -54,14 +71,6 @@ public String cvssV3Score() { return this.innerModel().cvssV3Score(); } - public OffsetDateTime publishDate() { - return this.innerModel().publishDate(); - } - - public OffsetDateTime updatedDate() { - return this.innerModel().updatedDate(); - } - public List links() { List inner = this.innerModel().links(); if (inner != null) { @@ -75,7 +84,7 @@ public String description() { return this.innerModel().description(); } - public CveInner innerModel() { + public CveResourceInner innerModel() { return this.innerObject; } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CveSummaryImpl.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CveSummaryImpl.java deleted file mode 100644 index 0a81bc74acb2f..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CveSummaryImpl.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.iotfirmwaredefense.implementation; - -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CveSummaryInner; -import com.azure.resourcemanager.iotfirmwaredefense.models.CveSummary; - -public final class CveSummaryImpl implements CveSummary { - private CveSummaryInner innerObject; - - private final com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager; - - CveSummaryImpl( - CveSummaryInner innerObject, - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public Long critical() { - return this.innerModel().critical(); - } - - public Long high() { - return this.innerModel().high(); - } - - public Long medium() { - return this.innerModel().medium(); - } - - public Long low() { - return this.innerModel().low(); - } - - public Long unknown() { - return this.innerModel().unknown(); - } - - public Long undefined() { - return this.innerModel().undefined(); - } - - public CveSummaryInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CvesClientImpl.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CvesClientImpl.java new file mode 100644 index 0000000000000..b58d6f12227a7 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CvesClientImpl.java @@ -0,0 +1,293 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.CvesClient; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CveResourceInner; +import com.azure.resourcemanager.iotfirmwaredefense.models.CveListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in CvesClient. + */ +public final class CvesClientImpl implements CvesClient { + /** + * The proxy service used to perform REST calls. + */ + private final CvesService service; + + /** + * The service client containing this operation class. + */ + private final IoTFirmwareDefenseImpl client; + + /** + * Initializes an instance of CvesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + CvesClientImpl(IoTFirmwareDefenseImpl client) { + this.service = RestProxy.create(CvesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for IoTFirmwareDefenseCves to be used by the proxy service to perform + * REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "IoTFirmwareDefenseCv") + public interface CvesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/cves") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByFirmware(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("firmwareId") String firmwareId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByFirmwareNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Lists CVE analysis results of a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of CVE results along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByFirmwareSinglePageAsync(String resourceGroupName, + String workspaceName, String firmwareId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (firmwareId == null) { + return Mono.error(new IllegalArgumentException("Parameter firmwareId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByFirmware(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, firmwareId, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists CVE analysis results of a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of CVE results along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByFirmwareSinglePageAsync(String resourceGroupName, + String workspaceName, String firmwareId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (firmwareId == null) { + return Mono.error(new IllegalArgumentException("Parameter firmwareId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByFirmware(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, firmwareId, this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists CVE analysis results of a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of CVE results as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByFirmwareAsync(String resourceGroupName, String workspaceName, + String firmwareId) { + return new PagedFlux<>(() -> listByFirmwareSinglePageAsync(resourceGroupName, workspaceName, firmwareId), + nextLink -> listByFirmwareNextSinglePageAsync(nextLink)); + } + + /** + * Lists CVE analysis results of a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of CVE results as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByFirmwareAsync(String resourceGroupName, String workspaceName, + String firmwareId, Context context) { + return new PagedFlux<>( + () -> listByFirmwareSinglePageAsync(resourceGroupName, workspaceName, firmwareId, context), + nextLink -> listByFirmwareNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists CVE analysis results of a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of CVE results as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId) { + return new PagedIterable<>(listByFirmwareAsync(resourceGroupName, workspaceName, firmwareId)); + } + + /** + * Lists CVE analysis results of a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of CVE results as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId, Context context) { + return new PagedIterable<>(listByFirmwareAsync(resourceGroupName, workspaceName, firmwareId, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of CVE results along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByFirmwareNextSinglePageAsync(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.listByFirmwareNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of CVE results along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByFirmwareNextSinglePageAsync(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.listByFirmwareNext(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/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CvesImpl.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CvesImpl.java new file mode 100644 index 0000000000000..16f828535a7e2 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/CvesImpl.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.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.iotfirmwaredefense.fluent.CvesClient; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CveResourceInner; +import com.azure.resourcemanager.iotfirmwaredefense.models.CveResource; +import com.azure.resourcemanager.iotfirmwaredefense.models.Cves; + +public final class CvesImpl implements Cves { + private static final ClientLogger LOGGER = new ClientLogger(CvesImpl.class); + + private final CvesClient innerClient; + + private final com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager; + + public CvesImpl(CvesClient innerClient, + com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId) { + PagedIterable inner + = this.serviceClient().listByFirmware(resourceGroupName, workspaceName, firmwareId); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CveResourceImpl(inner1, this.manager())); + } + + public PagedIterable listByFirmware(String resourceGroupName, String workspaceName, String firmwareId, + Context context) { + PagedIterable inner + = this.serviceClient().listByFirmware(resourceGroupName, workspaceName, firmwareId, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CveResourceImpl(inner1, this.manager())); + } + + private CvesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/FirmwareImpl.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/FirmwareImpl.java index bb01cfd4ac50d..eff8f9d8e7048 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/FirmwareImpl.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/FirmwareImpl.java @@ -4,26 +4,15 @@ package com.azure.resourcemanager.iotfirmwaredefense.implementation; -import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.FirmwareInner; -import com.azure.resourcemanager.iotfirmwaredefense.models.BinaryHardening; -import com.azure.resourcemanager.iotfirmwaredefense.models.BinaryHardeningSummary; -import com.azure.resourcemanager.iotfirmwaredefense.models.Component; -import com.azure.resourcemanager.iotfirmwaredefense.models.CryptoCertificate; -import com.azure.resourcemanager.iotfirmwaredefense.models.CryptoCertificateSummary; -import com.azure.resourcemanager.iotfirmwaredefense.models.CryptoKey; -import com.azure.resourcemanager.iotfirmwaredefense.models.CryptoKeySummary; -import com.azure.resourcemanager.iotfirmwaredefense.models.Cve; -import com.azure.resourcemanager.iotfirmwaredefense.models.CveSummary; import com.azure.resourcemanager.iotfirmwaredefense.models.Firmware; -import com.azure.resourcemanager.iotfirmwaredefense.models.FirmwareSummary; import com.azure.resourcemanager.iotfirmwaredefense.models.FirmwareUpdateDefinition; -import com.azure.resourcemanager.iotfirmwaredefense.models.PasswordHash; import com.azure.resourcemanager.iotfirmwaredefense.models.ProvisioningState; import com.azure.resourcemanager.iotfirmwaredefense.models.Status; +import com.azure.resourcemanager.iotfirmwaredefense.models.StatusMessage; import com.azure.resourcemanager.iotfirmwaredefense.models.UrlToken; import java.util.Collections; import java.util.List; @@ -77,8 +66,8 @@ public Status status() { return this.innerModel().status(); } - public List statusMessages() { - List inner = this.innerModel().statusMessages(); + public List statusMessages() { + List inner = this.innerModel().statusMessages(); if (inner != null) { return Collections.unmodifiableList(inner); } else { @@ -117,22 +106,15 @@ public FirmwareImpl withExistingWorkspace(String resourceGroupName, String works } public Firmware create() { - this.innerObject = - serviceManager - .serviceClient() - .getFirmwares() - .createWithResponse(resourceGroupName, workspaceName, firmwareId, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getFirmwares() + .createWithResponse(resourceGroupName, workspaceName, firmwareId, this.innerModel(), Context.NONE) + .getValue(); return this; } public Firmware create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getFirmwares() - .createWithResponse(resourceGroupName, workspaceName, firmwareId, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getFirmwares() + .createWithResponse(resourceGroupName, workspaceName, firmwareId, this.innerModel(), context).getValue(); return this; } @@ -148,59 +130,41 @@ public FirmwareImpl update() { } public Firmware apply() { - this.innerObject = - serviceManager - .serviceClient() - .getFirmwares() - .updateWithResponse(resourceGroupName, workspaceName, firmwareId, updateFirmware, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getFirmwares() + .updateWithResponse(resourceGroupName, workspaceName, firmwareId, updateFirmware, Context.NONE).getValue(); return this; } public Firmware apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getFirmwares() - .updateWithResponse(resourceGroupName, workspaceName, firmwareId, updateFirmware, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getFirmwares() + .updateWithResponse(resourceGroupName, workspaceName, firmwareId, updateFirmware, context).getValue(); return this; } - FirmwareImpl( - FirmwareInner innerObject, + FirmwareImpl(FirmwareInner innerObject, com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.firmwareId = Utils.getValueFromIdByName(innerObject.id(), "firmwares"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.firmwareId = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "firmwares"); } public Firmware refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getFirmwares() - .getWithResponse(resourceGroupName, workspaceName, firmwareId, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getFirmwares() + .getWithResponse(resourceGroupName, workspaceName, firmwareId, Context.NONE).getValue(); return this; } public Firmware refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getFirmwares() - .getWithResponse(resourceGroupName, workspaceName, firmwareId, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getFirmwares() + .getWithResponse(resourceGroupName, workspaceName, firmwareId, context).getValue(); return this; } public Response generateDownloadUrlWithResponse(Context context) { - return serviceManager - .firmwares() - .generateDownloadUrlWithResponse(resourceGroupName, workspaceName, firmwareId, context); + return serviceManager.firmwares().generateDownloadUrlWithResponse(resourceGroupName, workspaceName, firmwareId, + context); } public UrlToken generateDownloadUrl() { @@ -208,147 +172,14 @@ public UrlToken generateDownloadUrl() { } public Response generateFilesystemDownloadUrlWithResponse(Context context) { - return serviceManager - .firmwares() - .generateFilesystemDownloadUrlWithResponse(resourceGroupName, workspaceName, firmwareId, context); + return serviceManager.firmwares().generateFilesystemDownloadUrlWithResponse(resourceGroupName, workspaceName, + firmwareId, context); } public UrlToken generateFilesystemDownloadUrl() { return serviceManager.firmwares().generateFilesystemDownloadUrl(resourceGroupName, workspaceName, firmwareId); } - public Response generateSummaryWithResponse(Context context) { - return serviceManager - .firmwares() - .generateSummaryWithResponse(resourceGroupName, workspaceName, firmwareId, context); - } - - public FirmwareSummary generateSummary() { - return serviceManager.firmwares().generateSummary(resourceGroupName, workspaceName, firmwareId); - } - - public PagedIterable listGenerateComponentList() { - return serviceManager.firmwares().listGenerateComponentList(resourceGroupName, workspaceName, firmwareId); - } - - public PagedIterable listGenerateComponentList(Context context) { - return serviceManager - .firmwares() - .listGenerateComponentList(resourceGroupName, workspaceName, firmwareId, context); - } - - public Response generateComponentDetailsWithResponse(Context context) { - return serviceManager - .firmwares() - .generateComponentDetailsWithResponse(resourceGroupName, workspaceName, firmwareId, context); - } - - public Component generateComponentDetails() { - return serviceManager.firmwares().generateComponentDetails(resourceGroupName, workspaceName, firmwareId); - } - - public PagedIterable listGenerateBinaryHardeningList() { - return serviceManager.firmwares().listGenerateBinaryHardeningList(resourceGroupName, workspaceName, firmwareId); - } - - public PagedIterable listGenerateBinaryHardeningList(Context context) { - return serviceManager - .firmwares() - .listGenerateBinaryHardeningList(resourceGroupName, workspaceName, firmwareId, context); - } - - public Response generateBinaryHardeningSummaryWithResponse(Context context) { - return serviceManager - .firmwares() - .generateBinaryHardeningSummaryWithResponse(resourceGroupName, workspaceName, firmwareId, context); - } - - public BinaryHardeningSummary generateBinaryHardeningSummary() { - return serviceManager.firmwares().generateBinaryHardeningSummary(resourceGroupName, workspaceName, firmwareId); - } - - public Response generateBinaryHardeningDetailsWithResponse(Context context) { - return serviceManager - .firmwares() - .generateBinaryHardeningDetailsWithResponse(resourceGroupName, workspaceName, firmwareId, context); - } - - public BinaryHardening generateBinaryHardeningDetails() { - return serviceManager.firmwares().generateBinaryHardeningDetails(resourceGroupName, workspaceName, firmwareId); - } - - public PagedIterable listGeneratePasswordHashList() { - return serviceManager.firmwares().listGeneratePasswordHashList(resourceGroupName, workspaceName, firmwareId); - } - - public PagedIterable listGeneratePasswordHashList(Context context) { - return serviceManager - .firmwares() - .listGeneratePasswordHashList(resourceGroupName, workspaceName, firmwareId, context); - } - - public PagedIterable listGenerateCveList() { - return serviceManager.firmwares().listGenerateCveList(resourceGroupName, workspaceName, firmwareId); - } - - public PagedIterable listGenerateCveList(Context context) { - return serviceManager.firmwares().listGenerateCveList(resourceGroupName, workspaceName, firmwareId, context); - } - - public Response generateCveSummaryWithResponse(Context context) { - return serviceManager - .firmwares() - .generateCveSummaryWithResponse(resourceGroupName, workspaceName, firmwareId, context); - } - - public CveSummary generateCveSummary() { - return serviceManager.firmwares().generateCveSummary(resourceGroupName, workspaceName, firmwareId); - } - - public Response generateCryptoCertificateSummaryWithResponse(Context context) { - return serviceManager - .firmwares() - .generateCryptoCertificateSummaryWithResponse(resourceGroupName, workspaceName, firmwareId, context); - } - - public CryptoCertificateSummary generateCryptoCertificateSummary() { - return serviceManager - .firmwares() - .generateCryptoCertificateSummary(resourceGroupName, workspaceName, firmwareId); - } - - public Response generateCryptoKeySummaryWithResponse(Context context) { - return serviceManager - .firmwares() - .generateCryptoKeySummaryWithResponse(resourceGroupName, workspaceName, firmwareId, context); - } - - public CryptoKeySummary generateCryptoKeySummary() { - return serviceManager.firmwares().generateCryptoKeySummary(resourceGroupName, workspaceName, firmwareId); - } - - public PagedIterable listGenerateCryptoCertificateList() { - return serviceManager - .firmwares() - .listGenerateCryptoCertificateList(resourceGroupName, workspaceName, firmwareId); - } - - public PagedIterable listGenerateCryptoCertificateList(Context context) { - return serviceManager - .firmwares() - .listGenerateCryptoCertificateList(resourceGroupName, workspaceName, firmwareId, context); - } - - public PagedIterable listGenerateCryptoKeyList() { - return serviceManager.firmwares().listGenerateCryptoKeyList(resourceGroupName, workspaceName, firmwareId); - } - - public PagedIterable listGenerateCryptoKeyList(Context context) { - return serviceManager - .firmwares() - .listGenerateCryptoKeyList(resourceGroupName, workspaceName, firmwareId, context); - } - public FirmwareImpl withFileName(String fileName) { if (isInCreateMode()) { this.innerModel().withFileName(fileName); @@ -419,7 +250,7 @@ public FirmwareImpl withStatus(Status status) { } } - public FirmwareImpl withStatusMessages(List statusMessages) { + public FirmwareImpl withStatusMessages(List statusMessages) { if (isInCreateMode()) { this.innerModel().withStatusMessages(statusMessages); return this; diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/FirmwareSummaryImpl.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/FirmwareSummaryImpl.java deleted file mode 100644 index 0ccafa291c6a5..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/FirmwareSummaryImpl.java +++ /dev/null @@ -1,57 +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.iotfirmwaredefense.implementation; - -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.FirmwareSummaryInner; -import com.azure.resourcemanager.iotfirmwaredefense.models.FirmwareSummary; - -public final class FirmwareSummaryImpl implements FirmwareSummary { - private FirmwareSummaryInner innerObject; - - private final com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager; - - FirmwareSummaryImpl( - FirmwareSummaryInner innerObject, - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public Long extractedSize() { - return this.innerModel().extractedSize(); - } - - public Long fileSize() { - return this.innerModel().fileSize(); - } - - public Long extractedFileCount() { - return this.innerModel().extractedFileCount(); - } - - public Long componentCount() { - return this.innerModel().componentCount(); - } - - public Long binaryCount() { - return this.innerModel().binaryCount(); - } - - public Long analysisTimeSeconds() { - return this.innerModel().analysisTimeSeconds(); - } - - public Long rootFileSystems() { - return this.innerModel().rootFileSystems(); - } - - public FirmwareSummaryInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/FirmwaresClientImpl.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/FirmwaresClientImpl.java index ca8c56889598c..80177869933ab 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/FirmwaresClientImpl.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/FirmwaresClientImpl.java @@ -31,429 +31,126 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.iotfirmwaredefense.fluent.FirmwaresClient; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.BinaryHardeningInner; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.BinaryHardeningSummaryInner; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.ComponentInner; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CryptoCertificateInner; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CryptoCertificateSummaryInner; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CryptoKeyInner; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CryptoKeySummaryInner; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CveInner; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CveSummaryInner; import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.FirmwareInner; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.FirmwareSummaryInner; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.PasswordHashInner; import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.UrlTokenInner; -import com.azure.resourcemanager.iotfirmwaredefense.models.BinaryHardeningList; -import com.azure.resourcemanager.iotfirmwaredefense.models.ComponentList; -import com.azure.resourcemanager.iotfirmwaredefense.models.CryptoCertificateList; -import com.azure.resourcemanager.iotfirmwaredefense.models.CryptoKeyList; -import com.azure.resourcemanager.iotfirmwaredefense.models.CveList; import com.azure.resourcemanager.iotfirmwaredefense.models.FirmwareList; import com.azure.resourcemanager.iotfirmwaredefense.models.FirmwareUpdateDefinition; -import com.azure.resourcemanager.iotfirmwaredefense.models.PasswordHashList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in FirmwaresClient. */ +/** + * An instance of this class provides access to all the operations defined in FirmwaresClient. + */ public final class FirmwaresClientImpl implements FirmwaresClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final FirmwaresService service; - /** The service client containing this operation class. */ - private final FistImpl client; + /** + * The service client containing this operation class. + */ + private final IoTFirmwareDefenseImpl client; /** * Initializes an instance of FirmwaresClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ - FirmwaresClientImpl(FistImpl client) { - this.service = - RestProxy.create(FirmwaresService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + FirmwaresClientImpl(IoTFirmwareDefenseImpl client) { + this.service + = RestProxy.create(FirmwaresService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for FistFirmwares to be used by the proxy service to perform REST calls. + * The interface defining all the services for IoTFirmwareDefenseFirmwares to be used by the proxy service to + * perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "FistFirmwares") + @ServiceInterface(name = "IoTFirmwareDefenseFi") public interface FirmwaresService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByWorkspace( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> create( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("firmwareId") String firmwareId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") FirmwareInner firmware, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("firmwareId") String firmwareId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") FirmwareUpdateDefinition firmware, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("firmwareId") String firmwareId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("firmwareId") String firmwareId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/generateDownloadUrl") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> generateDownloadUrl( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("firmwareId") String firmwareId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/generateFilesystemDownloadUrl") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> generateFilesystemDownloadUrl( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("firmwareId") String firmwareId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/generateSummary") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> generateSummary( - @HostParam("$host") String endpoint, + Mono> listByWorkspace(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("firmwareId") String firmwareId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/generateComponentList") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listGenerateComponentList( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("firmwareId") String firmwareId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/generateComponentDetails") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> generateComponentDetails( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("firmwareId") String firmwareId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/generateBinaryHardeningList") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listGenerateBinaryHardeningList( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("firmwareId") String firmwareId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/generateBinaryHardeningSummary") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> generateBinaryHardeningSummary( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("firmwareId") String firmwareId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/generateBinaryHardeningDetails") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> generateBinaryHardeningDetails( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("firmwareId") String firmwareId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/generatePasswordHashList") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listGeneratePasswordHashList( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("firmwareId") String firmwareId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/generateCveList") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listGenerateCveList( - @HostParam("$host") String endpoint, + Mono> create(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("firmwareId") String firmwareId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("firmwareId") String firmwareId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") FirmwareInner firmware, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/generateCveSummary") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> generateCveSummary( - @HostParam("$host") String endpoint, + Mono> update(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("firmwareId") String firmwareId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("firmwareId") String firmwareId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") FirmwareUpdateDefinition firmware, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/generateCryptoCertificateSummary") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> generateCryptoCertificateSummary( - @HostParam("$host") String endpoint, + Mono> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("firmwareId") String firmwareId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("firmwareId") String firmwareId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/generateCryptoKeySummary") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> generateCryptoKeySummary( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("firmwareId") String firmwareId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("firmwareId") String firmwareId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/generateCryptoCertificateList") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/generateDownloadUrl") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listGenerateCryptoCertificateList( - @HostParam("$host") String endpoint, + Mono> generateDownloadUrl(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("firmwareId") String firmwareId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("firmwareId") String firmwareId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/generateCryptoKeyList") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/generateFilesystemDownloadUrl") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listGenerateCryptoKeyList( - @HostParam("$host") String endpoint, + Mono> generateFilesystemDownloadUrl(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("firmwareId") String firmwareId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByWorkspaceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listGenerateComponentListNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listGenerateBinaryHardeningListNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listGeneratePasswordHashListNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listGenerateCveListNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listGenerateCryptoCertificateListNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("firmwareId") String firmwareId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listGenerateCryptoKeyListNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByWorkspaceNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Lists all of firmwares inside a workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -462,19 +159,15 @@ Mono> listGenerateCryptoKeyListNext( * @return list of firmwares along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceSinglePageAsync( - String resourceGroupName, String workspaceName) { + private Mono> listByWorkspaceSinglePageAsync(String resourceGroupName, + String workspaceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -485,32 +178,16 @@ private Mono> listByWorkspaceSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByWorkspace( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByWorkspace(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists all of firmwares inside a workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param context The context to associate with this operation. @@ -520,19 +197,15 @@ private Mono> listByWorkspaceSinglePageAsync( * @return list of firmwares along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceSinglePageAsync( - String resourceGroupName, String workspaceName, Context context) { + private Mono> listByWorkspaceSinglePageAsync(String resourceGroupName, + String workspaceName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -544,28 +217,15 @@ private Mono> listByWorkspaceSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByWorkspace( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByWorkspace(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists all of firmwares inside a workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -575,14 +235,13 @@ private Mono> listByWorkspaceSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByWorkspaceAsync(String resourceGroupName, String workspaceName) { - return new PagedFlux<>( - () -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName), + return new PagedFlux<>(() -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName), nextLink -> listByWorkspaceNextSinglePageAsync(nextLink)); } /** * Lists all of firmwares inside a workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param context The context to associate with this operation. @@ -592,16 +251,15 @@ private PagedFlux listByWorkspaceAsync(String resourceGroupName, * @return list of firmwares as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByWorkspaceAsync( - String resourceGroupName, String workspaceName, Context context) { - return new PagedFlux<>( - () -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, context), + private PagedFlux listByWorkspaceAsync(String resourceGroupName, String workspaceName, + Context context) { + return new PagedFlux<>(() -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, context), nextLink -> listByWorkspaceNextSinglePageAsync(nextLink, context)); } /** * Lists all of firmwares inside a workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -616,7 +274,7 @@ public PagedIterable listByWorkspace(String resourceGroupName, St /** * Lists all of firmwares inside a workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param context The context to associate with this operation. @@ -626,14 +284,14 @@ public PagedIterable listByWorkspace(String resourceGroupName, St * @return list of firmwares as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByWorkspace( - String resourceGroupName, String workspaceName, Context context) { + public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, + Context context) { return new PagedIterable<>(listByWorkspaceAsync(resourceGroupName, workspaceName, context)); } /** * The operation to create a firmware. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -644,19 +302,15 @@ public PagedIterable listByWorkspace( * @return firmware definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, String workspaceName, String firmwareId, FirmwareInner firmware) { + private Mono> createWithResponseAsync(String resourceGroupName, String workspaceName, + String firmwareId, FirmwareInner firmware) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -675,25 +329,14 @@ private Mono> createWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .create( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - firmwareId, - this.client.getApiVersion(), - firmware, - accept, - context)) + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, firmwareId, this.client.getApiVersion(), firmware, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The operation to create a firmware. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -705,19 +348,15 @@ private Mono> createWithResponseAsync( * @return firmware definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, String workspaceName, String firmwareId, FirmwareInner firmware, Context context) { + private Mono> createWithResponseAsync(String resourceGroupName, String workspaceName, + String firmwareId, FirmwareInner firmware, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -736,22 +375,13 @@ private Mono> createWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .create( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - firmwareId, - this.client.getApiVersion(), - firmware, - accept, - context); + return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, firmwareId, this.client.getApiVersion(), firmware, accept, context); } /** * The operation to create a firmware. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -762,15 +392,15 @@ private Mono> createWithResponseAsync( * @return firmware definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, String workspaceName, String firmwareId, FirmwareInner firmware) { + private Mono createAsync(String resourceGroupName, String workspaceName, String firmwareId, + FirmwareInner firmware) { return createWithResponseAsync(resourceGroupName, workspaceName, firmwareId, firmware) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * The operation to create a firmware. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -782,14 +412,14 @@ private Mono createAsync( * @return firmware definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse( - String resourceGroupName, String workspaceName, String firmwareId, FirmwareInner firmware, Context context) { + public Response createWithResponse(String resourceGroupName, String workspaceName, String firmwareId, + FirmwareInner firmware, Context context) { return createWithResponseAsync(resourceGroupName, workspaceName, firmwareId, firmware, context).block(); } /** * The operation to create a firmware. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -800,14 +430,14 @@ public Response createWithResponse( * @return firmware definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public FirmwareInner create( - String resourceGroupName, String workspaceName, String firmwareId, FirmwareInner firmware) { + public FirmwareInner create(String resourceGroupName, String workspaceName, String firmwareId, + FirmwareInner firmware) { return createWithResponse(resourceGroupName, workspaceName, firmwareId, firmware, Context.NONE).getValue(); } /** * The operation to update firmware. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -818,19 +448,15 @@ public FirmwareInner create( * @return firmware definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, String workspaceName, String firmwareId, FirmwareUpdateDefinition firmware) { + private Mono> updateWithResponseAsync(String resourceGroupName, String workspaceName, + String firmwareId, FirmwareUpdateDefinition firmware) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -849,25 +475,14 @@ private Mono> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - firmwareId, - this.client.getApiVersion(), - firmware, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, firmwareId, this.client.getApiVersion(), firmware, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The operation to update firmware. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -879,23 +494,15 @@ private Mono> updateWithResponseAsync( * @return firmware definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String firmwareId, - FirmwareUpdateDefinition firmware, - Context context) { + private Mono> updateWithResponseAsync(String resourceGroupName, String workspaceName, + String firmwareId, FirmwareUpdateDefinition firmware, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -914,22 +521,13 @@ private Mono> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - firmwareId, - this.client.getApiVersion(), - firmware, - accept, - context); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, firmwareId, this.client.getApiVersion(), firmware, accept, context); } /** * The operation to update firmware. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -940,15 +538,15 @@ private Mono> updateWithResponseAsync( * @return firmware definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String workspaceName, String firmwareId, FirmwareUpdateDefinition firmware) { + private Mono updateAsync(String resourceGroupName, String workspaceName, String firmwareId, + FirmwareUpdateDefinition firmware) { return updateWithResponseAsync(resourceGroupName, workspaceName, firmwareId, firmware) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * The operation to update firmware. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -960,18 +558,14 @@ private Mono updateAsync( * @return firmware definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String workspaceName, - String firmwareId, - FirmwareUpdateDefinition firmware, - Context context) { + public Response updateWithResponse(String resourceGroupName, String workspaceName, String firmwareId, + FirmwareUpdateDefinition firmware, Context context) { return updateWithResponseAsync(resourceGroupName, workspaceName, firmwareId, firmware, context).block(); } /** * The operation to update firmware. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -982,14 +576,14 @@ public Response updateWithResponse( * @return firmware definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public FirmwareInner update( - String resourceGroupName, String workspaceName, String firmwareId, FirmwareUpdateDefinition firmware) { + public FirmwareInner update(String resourceGroupName, String workspaceName, String firmwareId, + FirmwareUpdateDefinition firmware) { return updateWithResponse(resourceGroupName, workspaceName, firmwareId, firmware, Context.NONE).getValue(); } /** * The operation to delete a firmware. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -999,19 +593,15 @@ public FirmwareInner update( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String firmwareId) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, + String firmwareId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1025,24 +615,14 @@ private Mono> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - firmwareId, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, firmwareId, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The operation to delete a firmware. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -1053,19 +633,15 @@ private Mono> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, + String firmwareId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1079,21 +655,13 @@ private Mono> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - firmwareId, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, firmwareId, this.client.getApiVersion(), accept, context); } /** * The operation to delete a firmware. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -1109,7 +677,7 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S /** * The operation to delete a firmware. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -1120,14 +688,14 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { + public Response deleteWithResponse(String resourceGroupName, String workspaceName, String firmwareId, + Context context) { return deleteWithResponseAsync(resourceGroupName, workspaceName, firmwareId, context).block(); } /** * The operation to delete a firmware. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -1142,7 +710,7 @@ public void delete(String resourceGroupName, String workspaceName, String firmwa /** * Get firmware. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -1152,19 +720,15 @@ public void delete(String resourceGroupName, String workspaceName, String firmwa * @return firmware along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String firmwareId) { + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String firmwareId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1178,24 +742,14 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - firmwareId, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, firmwareId, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get firmware. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -1206,19 +760,15 @@ private Mono> getWithResponseAsync( * @return firmware along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String firmwareId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1232,21 +782,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - firmwareId, - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + firmwareId, this.client.getApiVersion(), accept, context); } /** * Get firmware. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -1263,7 +805,7 @@ private Mono getAsync(String resourceGroupName, String workspaceN /** * Get firmware. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -1274,14 +816,14 @@ private Mono getAsync(String resourceGroupName, String workspaceN * @return firmware along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { + public Response getWithResponse(String resourceGroupName, String workspaceName, String firmwareId, + Context context) { return getWithResponseAsync(resourceGroupName, workspaceName, firmwareId, context).block(); } /** * Get firmware. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -1297,7 +839,7 @@ public FirmwareInner get(String resourceGroupName, String workspaceName, String /** * The operation to a url for file download. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -1305,22 +847,18 @@ public FirmwareInner get(String resourceGroupName, String workspaceName, String * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return url data for creating or accessing a blob file along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> generateDownloadUrlWithResponseAsync( - String resourceGroupName, String workspaceName, String firmwareId) { + private Mono> generateDownloadUrlWithResponseAsync(String resourceGroupName, + String workspaceName, String firmwareId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1335,23 +873,14 @@ private Mono> generateDownloadUrlWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .generateDownloadUrl( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - firmwareId, - this.client.getApiVersion(), - accept, - context)) + context -> service.generateDownloadUrl(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, firmwareId, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The operation to a url for file download. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -1360,22 +889,18 @@ private Mono> generateDownloadUrlWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return url data for creating or accessing a blob file along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> generateDownloadUrlWithResponseAsync( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { + private Mono> generateDownloadUrlWithResponseAsync(String resourceGroupName, + String workspaceName, String firmwareId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1389,21 +914,13 @@ private Mono> generateDownloadUrlWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .generateDownloadUrl( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - firmwareId, - this.client.getApiVersion(), - accept, - context); + return service.generateDownloadUrl(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, firmwareId, this.client.getApiVersion(), accept, context); } /** * The operation to a url for file download. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -1413,15 +930,15 @@ private Mono> generateDownloadUrlWithResponseAsync( * @return url data for creating or accessing a blob file on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono generateDownloadUrlAsync( - String resourceGroupName, String workspaceName, String firmwareId) { + private Mono generateDownloadUrlAsync(String resourceGroupName, String workspaceName, + String firmwareId) { return generateDownloadUrlWithResponseAsync(resourceGroupName, workspaceName, firmwareId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * The operation to a url for file download. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -1432,14 +949,14 @@ private Mono generateDownloadUrlAsync( * @return url data for creating or accessing a blob file along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response generateDownloadUrlWithResponse( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { + public Response generateDownloadUrlWithResponse(String resourceGroupName, String workspaceName, + String firmwareId, Context context) { return generateDownloadUrlWithResponseAsync(resourceGroupName, workspaceName, firmwareId, context).block(); } /** * The operation to a url for file download. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -1455,7 +972,7 @@ public UrlTokenInner generateDownloadUrl(String resourceGroupName, String worksp /** * The operation to a url for tar file download. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -1463,22 +980,18 @@ public UrlTokenInner generateDownloadUrl(String resourceGroupName, String worksp * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return url data for creating or accessing a blob file along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> generateFilesystemDownloadUrlWithResponseAsync( - String resourceGroupName, String workspaceName, String firmwareId) { + private Mono> generateFilesystemDownloadUrlWithResponseAsync(String resourceGroupName, + String workspaceName, String firmwareId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1492,24 +1005,15 @@ private Mono> generateFilesystemDownloadUrlWithResponseA } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .generateFilesystemDownloadUrl( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - firmwareId, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.generateFilesystemDownloadUrl(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, firmwareId, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The operation to a url for tar file download. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -1518,22 +1022,18 @@ private Mono> generateFilesystemDownloadUrlWithResponseA * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return url data for creating or accessing a blob file along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> generateFilesystemDownloadUrlWithResponseAsync( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { + private Mono> generateFilesystemDownloadUrlWithResponseAsync(String resourceGroupName, + String workspaceName, String firmwareId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1547,21 +1047,13 @@ private Mono> generateFilesystemDownloadUrlWithResponseA } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .generateFilesystemDownloadUrl( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - firmwareId, - this.client.getApiVersion(), - accept, - context); + return service.generateFilesystemDownloadUrl(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, firmwareId, this.client.getApiVersion(), accept, context); } /** * The operation to a url for tar file download. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -1571,15 +1063,15 @@ private Mono> generateFilesystemDownloadUrlWithResponseA * @return url data for creating or accessing a blob file on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono generateFilesystemDownloadUrlAsync( - String resourceGroupName, String workspaceName, String firmwareId) { + private Mono generateFilesystemDownloadUrlAsync(String resourceGroupName, String workspaceName, + String firmwareId) { return generateFilesystemDownloadUrlWithResponseAsync(resourceGroupName, workspaceName, firmwareId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * The operation to a url for tar file download. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -1590,15 +1082,15 @@ private Mono generateFilesystemDownloadUrlAsync( * @return url data for creating or accessing a blob file along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response generateFilesystemDownloadUrlWithResponse( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { + public Response generateFilesystemDownloadUrlWithResponse(String resourceGroupName, + String workspaceName, String firmwareId, Context context) { return generateFilesystemDownloadUrlWithResponseAsync(resourceGroupName, workspaceName, firmwareId, context) .block(); } /** * The operation to a url for tar file download. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -1608,2843 +1100,65 @@ public Response generateFilesystemDownloadUrlWithResponse( * @return url data for creating or accessing a blob file. */ @ServiceMethod(returns = ReturnType.SINGLE) - public UrlTokenInner generateFilesystemDownloadUrl( - String resourceGroupName, String workspaceName, String firmwareId) { + public UrlTokenInner generateFilesystemDownloadUrl(String resourceGroupName, String workspaceName, + String firmwareId) { return generateFilesystemDownloadUrlWithResponse(resourceGroupName, workspaceName, firmwareId, Context.NONE) .getValue(); } /** - * The operation to get a scan summary. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return summary result after scanning the firmware along with {@link Response} on successful completion of {@link - * Mono}. + * @return list of firmwares along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> generateSummaryWithResponseAsync( - String resourceGroupName, String workspaceName, String firmwareId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + private Mono> listByWorkspaceNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } - if (firmwareId == null) { - return Mono.error(new IllegalArgumentException("Parameter firmwareId 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 - .generateSummary( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - firmwareId, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.listByWorkspaceNext(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())); } /** - * The operation to get a scan summary. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return summary result after scanning the firmware along with {@link Response} on successful completion of {@link - * Mono}. + * @return list of firmwares along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> generateSummaryWithResponseAsync( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (firmwareId == null) { - return Mono.error(new IllegalArgumentException("Parameter firmwareId is required and cannot be null.")); + private Mono> listByWorkspaceNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .generateSummary( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - firmwareId, - this.client.getApiVersion(), - accept, - context); - } - - /** - * The operation to get a scan summary. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return summary result after scanning the firmware on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono generateSummaryAsync( - String resourceGroupName, String workspaceName, String firmwareId) { - return generateSummaryWithResponseAsync(resourceGroupName, workspaceName, firmwareId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * The operation to get a scan summary. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return summary result after scanning the firmware along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response generateSummaryWithResponse( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - return generateSummaryWithResponseAsync(resourceGroupName, workspaceName, firmwareId, context).block(); - } - - /** - * The operation to get a scan summary. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return summary result after scanning the firmware. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FirmwareSummaryInner generateSummary(String resourceGroupName, String workspaceName, String firmwareId) { - return generateSummaryWithResponse(resourceGroupName, workspaceName, firmwareId, Context.NONE).getValue(); - } - - /** - * The operation to list all components result for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list result for components along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listGenerateComponentListSinglePageAsync( - String resourceGroupName, String workspaceName, String firmwareId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (firmwareId == null) { - return Mono.error(new IllegalArgumentException("Parameter firmwareId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listGenerateComponentList( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - firmwareId, - this.client.getApiVersion(), - 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())); - } - - /** - * The operation to list all components result for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list result for components along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listGenerateComponentListSinglePageAsync( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (firmwareId == null) { - return Mono.error(new IllegalArgumentException("Parameter firmwareId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listGenerateComponentList( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - firmwareId, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * The operation to list all components result for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list result for components as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listGenerateComponentListAsync( - String resourceGroupName, String workspaceName, String firmwareId) { - return new PagedFlux<>( - () -> listGenerateComponentListSinglePageAsync(resourceGroupName, workspaceName, firmwareId), - nextLink -> listGenerateComponentListNextSinglePageAsync(nextLink)); - } - - /** - * The operation to list all components result for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list result for components as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listGenerateComponentListAsync( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - return new PagedFlux<>( - () -> listGenerateComponentListSinglePageAsync(resourceGroupName, workspaceName, firmwareId, context), - nextLink -> listGenerateComponentListNextSinglePageAsync(nextLink, context)); - } - - /** - * The operation to list all components result for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list result for components as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listGenerateComponentList( - String resourceGroupName, String workspaceName, String firmwareId) { - return new PagedIterable<>(listGenerateComponentListAsync(resourceGroupName, workspaceName, firmwareId)); - } - - /** - * The operation to list all components result for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list result for components as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listGenerateComponentList( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - return new PagedIterable<>( - listGenerateComponentListAsync(resourceGroupName, workspaceName, firmwareId, context)); - } - - /** - * The operation to get component details for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return component of a firmware along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> generateComponentDetailsWithResponseAsync( - String resourceGroupName, String workspaceName, String firmwareId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (firmwareId == null) { - return Mono.error(new IllegalArgumentException("Parameter firmwareId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .generateComponentDetails( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - firmwareId, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * The operation to get component details for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return component of a firmware along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> generateComponentDetailsWithResponseAsync( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (firmwareId == null) { - return Mono.error(new IllegalArgumentException("Parameter firmwareId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .generateComponentDetails( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - firmwareId, - this.client.getApiVersion(), - accept, - context); - } - - /** - * The operation to get component details for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return component of a firmware on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono generateComponentDetailsAsync( - String resourceGroupName, String workspaceName, String firmwareId) { - return generateComponentDetailsWithResponseAsync(resourceGroupName, workspaceName, firmwareId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * The operation to get component details for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return component of a firmware along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response generateComponentDetailsWithResponse( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - return generateComponentDetailsWithResponseAsync(resourceGroupName, workspaceName, firmwareId, context).block(); - } - - /** - * The operation to get component details for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return component of a firmware. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComponentInner generateComponentDetails(String resourceGroupName, String workspaceName, String firmwareId) { - return generateComponentDetailsWithResponse(resourceGroupName, workspaceName, firmwareId, Context.NONE) - .getValue(); - } - - /** - * The operation to list all binary hardening result for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list result for binary hardening along with {@link PagedResponse} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listGenerateBinaryHardeningListSinglePageAsync( - String resourceGroupName, String workspaceName, String firmwareId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (firmwareId == null) { - return Mono.error(new IllegalArgumentException("Parameter firmwareId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listGenerateBinaryHardeningList( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - firmwareId, - this.client.getApiVersion(), - 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())); - } - - /** - * The operation to list all binary hardening result for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list result for binary hardening along with {@link PagedResponse} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listGenerateBinaryHardeningListSinglePageAsync( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (firmwareId == null) { - return Mono.error(new IllegalArgumentException("Parameter firmwareId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listGenerateBinaryHardeningList( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - firmwareId, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * The operation to list all binary hardening result for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list result for binary hardening as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listGenerateBinaryHardeningListAsync( - String resourceGroupName, String workspaceName, String firmwareId) { - return new PagedFlux<>( - () -> listGenerateBinaryHardeningListSinglePageAsync(resourceGroupName, workspaceName, firmwareId), - nextLink -> listGenerateBinaryHardeningListNextSinglePageAsync(nextLink)); - } - - /** - * The operation to list all binary hardening result for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list result for binary hardening as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listGenerateBinaryHardeningListAsync( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - return new PagedFlux<>( - () -> listGenerateBinaryHardeningListSinglePageAsync(resourceGroupName, workspaceName, firmwareId, context), - nextLink -> listGenerateBinaryHardeningListNextSinglePageAsync(nextLink, context)); - } - - /** - * The operation to list all binary hardening result for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list result for binary hardening as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listGenerateBinaryHardeningList( - String resourceGroupName, String workspaceName, String firmwareId) { - return new PagedIterable<>(listGenerateBinaryHardeningListAsync(resourceGroupName, workspaceName, firmwareId)); - } - - /** - * The operation to list all binary hardening result for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list result for binary hardening as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listGenerateBinaryHardeningList( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - return new PagedIterable<>( - listGenerateBinaryHardeningListAsync(resourceGroupName, workspaceName, firmwareId, context)); - } - - /** - * The operation to list the binary hardening summary percentages for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return binary hardening summary percentages along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> generateBinaryHardeningSummaryWithResponseAsync( - String resourceGroupName, String workspaceName, String firmwareId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (firmwareId == null) { - return Mono.error(new IllegalArgumentException("Parameter firmwareId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .generateBinaryHardeningSummary( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - firmwareId, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * The operation to list the binary hardening summary percentages for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return binary hardening summary percentages along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> generateBinaryHardeningSummaryWithResponseAsync( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (firmwareId == null) { - return Mono.error(new IllegalArgumentException("Parameter firmwareId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .generateBinaryHardeningSummary( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - firmwareId, - this.client.getApiVersion(), - accept, - context); - } - - /** - * The operation to list the binary hardening summary percentages for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return binary hardening summary percentages on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono generateBinaryHardeningSummaryAsync( - String resourceGroupName, String workspaceName, String firmwareId) { - return generateBinaryHardeningSummaryWithResponseAsync(resourceGroupName, workspaceName, firmwareId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * The operation to list the binary hardening summary percentages for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return binary hardening summary percentages along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response generateBinaryHardeningSummaryWithResponse( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - return generateBinaryHardeningSummaryWithResponseAsync(resourceGroupName, workspaceName, firmwareId, context) - .block(); - } - - /** - * The operation to list the binary hardening summary percentages for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return binary hardening summary percentages. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BinaryHardeningSummaryInner generateBinaryHardeningSummary( - String resourceGroupName, String workspaceName, String firmwareId) { - return generateBinaryHardeningSummaryWithResponse(resourceGroupName, workspaceName, firmwareId, Context.NONE) - .getValue(); - } - - /** - * The operation to get binary hardening details for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return binary hardening of a firmware along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> generateBinaryHardeningDetailsWithResponseAsync( - String resourceGroupName, String workspaceName, String firmwareId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (firmwareId == null) { - return Mono.error(new IllegalArgumentException("Parameter firmwareId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .generateBinaryHardeningDetails( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - firmwareId, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * The operation to get binary hardening details for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return binary hardening of a firmware along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> generateBinaryHardeningDetailsWithResponseAsync( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (firmwareId == null) { - return Mono.error(new IllegalArgumentException("Parameter firmwareId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .generateBinaryHardeningDetails( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - firmwareId, - this.client.getApiVersion(), - accept, - context); - } - - /** - * The operation to get binary hardening details for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return binary hardening of a firmware on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono generateBinaryHardeningDetailsAsync( - String resourceGroupName, String workspaceName, String firmwareId) { - return generateBinaryHardeningDetailsWithResponseAsync(resourceGroupName, workspaceName, firmwareId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * The operation to get binary hardening details for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return binary hardening of a firmware along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response generateBinaryHardeningDetailsWithResponse( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - return generateBinaryHardeningDetailsWithResponseAsync(resourceGroupName, workspaceName, firmwareId, context) - .block(); - } - - /** - * The operation to get binary hardening details for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return binary hardening of a firmware. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BinaryHardeningInner generateBinaryHardeningDetails( - String resourceGroupName, String workspaceName, String firmwareId) { - return generateBinaryHardeningDetailsWithResponse(resourceGroupName, workspaceName, firmwareId, Context.NONE) - .getValue(); - } - - /** - * The operation to list all password hashes for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return password hashes list along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listGeneratePasswordHashListSinglePageAsync( - String resourceGroupName, String workspaceName, String firmwareId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (firmwareId == null) { - return Mono.error(new IllegalArgumentException("Parameter firmwareId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listGeneratePasswordHashList( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - firmwareId, - this.client.getApiVersion(), - 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())); - } - - /** - * The operation to list all password hashes for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return password hashes list along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listGeneratePasswordHashListSinglePageAsync( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (firmwareId == null) { - return Mono.error(new IllegalArgumentException("Parameter firmwareId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listGeneratePasswordHashList( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - firmwareId, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * The operation to list all password hashes for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return password hashes list as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listGeneratePasswordHashListAsync( - String resourceGroupName, String workspaceName, String firmwareId) { - return new PagedFlux<>( - () -> listGeneratePasswordHashListSinglePageAsync(resourceGroupName, workspaceName, firmwareId), - nextLink -> listGeneratePasswordHashListNextSinglePageAsync(nextLink)); - } - - /** - * The operation to list all password hashes for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return password hashes list as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listGeneratePasswordHashListAsync( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - return new PagedFlux<>( - () -> listGeneratePasswordHashListSinglePageAsync(resourceGroupName, workspaceName, firmwareId, context), - nextLink -> listGeneratePasswordHashListNextSinglePageAsync(nextLink, context)); - } - - /** - * The operation to list all password hashes for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return password hashes list as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listGeneratePasswordHashList( - String resourceGroupName, String workspaceName, String firmwareId) { - return new PagedIterable<>(listGeneratePasswordHashListAsync(resourceGroupName, workspaceName, firmwareId)); - } - - /** - * The operation to list all password hashes for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return password hashes list as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listGeneratePasswordHashList( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - return new PagedIterable<>( - listGeneratePasswordHashListAsync(resourceGroupName, workspaceName, firmwareId, context)); - } - - /** - * The operation to list all cve results for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list result for CVE along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listGenerateCveListSinglePageAsync( - String resourceGroupName, String workspaceName, String firmwareId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (firmwareId == null) { - return Mono.error(new IllegalArgumentException("Parameter firmwareId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listGenerateCveList( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - firmwareId, - this.client.getApiVersion(), - 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())); - } - - /** - * The operation to list all cve results for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list result for CVE along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listGenerateCveListSinglePageAsync( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (firmwareId == null) { - return Mono.error(new IllegalArgumentException("Parameter firmwareId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listGenerateCveList( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - firmwareId, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * The operation to list all cve results for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list result for CVE as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listGenerateCveListAsync( - String resourceGroupName, String workspaceName, String firmwareId) { - return new PagedFlux<>( - () -> listGenerateCveListSinglePageAsync(resourceGroupName, workspaceName, firmwareId), - nextLink -> listGenerateCveListNextSinglePageAsync(nextLink)); - } - - /** - * The operation to list all cve results for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list result for CVE as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listGenerateCveListAsync( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - return new PagedFlux<>( - () -> listGenerateCveListSinglePageAsync(resourceGroupName, workspaceName, firmwareId, context), - nextLink -> listGenerateCveListNextSinglePageAsync(nextLink, context)); - } - - /** - * The operation to list all cve results for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list result for CVE as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listGenerateCveList( - String resourceGroupName, String workspaceName, String firmwareId) { - return new PagedIterable<>(listGenerateCveListAsync(resourceGroupName, workspaceName, firmwareId)); - } - - /** - * The operation to list all cve results for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list result for CVE as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listGenerateCveList( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - return new PagedIterable<>(listGenerateCveListAsync(resourceGroupName, workspaceName, firmwareId, context)); - } - - /** - * The operation to provide a high level summary of the CVEs reported for the firmware image. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cVE summary values along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> generateCveSummaryWithResponseAsync( - String resourceGroupName, String workspaceName, String firmwareId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (firmwareId == null) { - return Mono.error(new IllegalArgumentException("Parameter firmwareId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .generateCveSummary( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - firmwareId, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * The operation to provide a high level summary of the CVEs reported for the firmware image. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cVE summary values along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> generateCveSummaryWithResponseAsync( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (firmwareId == null) { - return Mono.error(new IllegalArgumentException("Parameter firmwareId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .generateCveSummary( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - firmwareId, - this.client.getApiVersion(), - accept, - context); - } - - /** - * The operation to provide a high level summary of the CVEs reported for the firmware image. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cVE summary values on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono generateCveSummaryAsync( - String resourceGroupName, String workspaceName, String firmwareId) { - return generateCveSummaryWithResponseAsync(resourceGroupName, workspaceName, firmwareId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * The operation to provide a high level summary of the CVEs reported for the firmware image. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cVE summary values along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response generateCveSummaryWithResponse( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - return generateCveSummaryWithResponseAsync(resourceGroupName, workspaceName, firmwareId, context).block(); - } - - /** - * The operation to provide a high level summary of the CVEs reported for the firmware image. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cVE summary values. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CveSummaryInner generateCveSummary(String resourceGroupName, String workspaceName, String firmwareId) { - return generateCveSummaryWithResponse(resourceGroupName, workspaceName, firmwareId, Context.NONE).getValue(); - } - - /** - * The operation to provide a high level summary of the discovered cryptographic certificates reported for the - * firmware image. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cryptographic certificate summary values along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> generateCryptoCertificateSummaryWithResponseAsync( - String resourceGroupName, String workspaceName, String firmwareId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (firmwareId == null) { - return Mono.error(new IllegalArgumentException("Parameter firmwareId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .generateCryptoCertificateSummary( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - firmwareId, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * The operation to provide a high level summary of the discovered cryptographic certificates reported for the - * firmware image. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cryptographic certificate summary values along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> generateCryptoCertificateSummaryWithResponseAsync( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (firmwareId == null) { - return Mono.error(new IllegalArgumentException("Parameter firmwareId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .generateCryptoCertificateSummary( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - firmwareId, - this.client.getApiVersion(), - accept, - context); - } - - /** - * The operation to provide a high level summary of the discovered cryptographic certificates reported for the - * firmware image. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cryptographic certificate summary values on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono generateCryptoCertificateSummaryAsync( - String resourceGroupName, String workspaceName, String firmwareId) { - return generateCryptoCertificateSummaryWithResponseAsync(resourceGroupName, workspaceName, firmwareId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * The operation to provide a high level summary of the discovered cryptographic certificates reported for the - * firmware image. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cryptographic certificate summary values along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response generateCryptoCertificateSummaryWithResponse( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - return generateCryptoCertificateSummaryWithResponseAsync(resourceGroupName, workspaceName, firmwareId, context) - .block(); - } - - /** - * The operation to provide a high level summary of the discovered cryptographic certificates reported for the - * firmware image. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cryptographic certificate summary values. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CryptoCertificateSummaryInner generateCryptoCertificateSummary( - String resourceGroupName, String workspaceName, String firmwareId) { - return generateCryptoCertificateSummaryWithResponse(resourceGroupName, workspaceName, firmwareId, Context.NONE) - .getValue(); - } - - /** - * The operation to provide a high level summary of the discovered cryptographic keys reported for the firmware - * image. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cryptographic key summary values along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> generateCryptoKeySummaryWithResponseAsync( - String resourceGroupName, String workspaceName, String firmwareId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (firmwareId == null) { - return Mono.error(new IllegalArgumentException("Parameter firmwareId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .generateCryptoKeySummary( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - firmwareId, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * The operation to provide a high level summary of the discovered cryptographic keys reported for the firmware - * image. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cryptographic key summary values along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> generateCryptoKeySummaryWithResponseAsync( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (firmwareId == null) { - return Mono.error(new IllegalArgumentException("Parameter firmwareId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .generateCryptoKeySummary( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - firmwareId, - this.client.getApiVersion(), - accept, - context); - } - - /** - * The operation to provide a high level summary of the discovered cryptographic keys reported for the firmware - * image. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cryptographic key summary values on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono generateCryptoKeySummaryAsync( - String resourceGroupName, String workspaceName, String firmwareId) { - return generateCryptoKeySummaryWithResponseAsync(resourceGroupName, workspaceName, firmwareId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * The operation to provide a high level summary of the discovered cryptographic keys reported for the firmware - * image. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cryptographic key summary values along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response generateCryptoKeySummaryWithResponse( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - return generateCryptoKeySummaryWithResponseAsync(resourceGroupName, workspaceName, firmwareId, context).block(); - } - - /** - * The operation to provide a high level summary of the discovered cryptographic keys reported for the firmware - * image. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cryptographic key summary values. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CryptoKeySummaryInner generateCryptoKeySummary( - String resourceGroupName, String workspaceName, String firmwareId) { - return generateCryptoKeySummaryWithResponse(resourceGroupName, workspaceName, firmwareId, Context.NONE) - .getValue(); - } - - /** - * The operation to list all crypto certificates for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return crypto certificates list along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listGenerateCryptoCertificateListSinglePageAsync( - String resourceGroupName, String workspaceName, String firmwareId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (firmwareId == null) { - return Mono.error(new IllegalArgumentException("Parameter firmwareId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listGenerateCryptoCertificateList( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - firmwareId, - this.client.getApiVersion(), - 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())); - } - - /** - * The operation to list all crypto certificates for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return crypto certificates list along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listGenerateCryptoCertificateListSinglePageAsync( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (firmwareId == null) { - return Mono.error(new IllegalArgumentException("Parameter firmwareId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listGenerateCryptoCertificateList( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - firmwareId, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * The operation to list all crypto certificates for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return crypto certificates list as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listGenerateCryptoCertificateListAsync( - String resourceGroupName, String workspaceName, String firmwareId) { - return new PagedFlux<>( - () -> listGenerateCryptoCertificateListSinglePageAsync(resourceGroupName, workspaceName, firmwareId), - nextLink -> listGenerateCryptoCertificateListNextSinglePageAsync(nextLink)); - } - - /** - * The operation to list all crypto certificates for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return crypto certificates list as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listGenerateCryptoCertificateListAsync( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - return new PagedFlux<>( - () -> - listGenerateCryptoCertificateListSinglePageAsync(resourceGroupName, workspaceName, firmwareId, context), - nextLink -> listGenerateCryptoCertificateListNextSinglePageAsync(nextLink, context)); - } - - /** - * The operation to list all crypto certificates for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return crypto certificates list as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listGenerateCryptoCertificateList( - String resourceGroupName, String workspaceName, String firmwareId) { - return new PagedIterable<>( - listGenerateCryptoCertificateListAsync(resourceGroupName, workspaceName, firmwareId)); - } - - /** - * The operation to list all crypto certificates for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return crypto certificates list as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listGenerateCryptoCertificateList( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - return new PagedIterable<>( - listGenerateCryptoCertificateListAsync(resourceGroupName, workspaceName, firmwareId, context)); - } - - /** - * The operation to list all crypto keys for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return crypto keys list along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listGenerateCryptoKeyListSinglePageAsync( - String resourceGroupName, String workspaceName, String firmwareId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (firmwareId == null) { - return Mono.error(new IllegalArgumentException("Parameter firmwareId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listGenerateCryptoKeyList( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - firmwareId, - this.client.getApiVersion(), - 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())); - } - - /** - * The operation to list all crypto keys for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return crypto keys list along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listGenerateCryptoKeyListSinglePageAsync( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (firmwareId == null) { - return Mono.error(new IllegalArgumentException("Parameter firmwareId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listGenerateCryptoKeyList( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - firmwareId, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * The operation to list all crypto keys for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return crypto keys list as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listGenerateCryptoKeyListAsync( - String resourceGroupName, String workspaceName, String firmwareId) { - return new PagedFlux<>( - () -> listGenerateCryptoKeyListSinglePageAsync(resourceGroupName, workspaceName, firmwareId), - nextLink -> listGenerateCryptoKeyListNextSinglePageAsync(nextLink)); - } - - /** - * The operation to list all crypto keys for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return crypto keys list as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listGenerateCryptoKeyListAsync( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - return new PagedFlux<>( - () -> listGenerateCryptoKeyListSinglePageAsync(resourceGroupName, workspaceName, firmwareId, context), - nextLink -> listGenerateCryptoKeyListNextSinglePageAsync(nextLink, context)); - } - - /** - * The operation to list all crypto keys for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return crypto keys list as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listGenerateCryptoKeyList( - String resourceGroupName, String workspaceName, String firmwareId) { - return new PagedIterable<>(listGenerateCryptoKeyListAsync(resourceGroupName, workspaceName, firmwareId)); - } - - /** - * The operation to list all crypto keys for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return crypto keys list as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listGenerateCryptoKeyList( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - return new PagedIterable<>( - listGenerateCryptoKeyListAsync(resourceGroupName, workspaceName, firmwareId, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of firmwares along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceNextSinglePageAsync(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.listByWorkspaceNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of firmwares along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceNextSinglePageAsync(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 - .listByWorkspaceNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list result for components along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listGenerateComponentListNextSinglePageAsync(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.listGenerateComponentListNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list result for components along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listGenerateComponentListNextSinglePageAsync( - 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 - .listGenerateComponentListNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list result for binary hardening along with {@link PagedResponse} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listGenerateBinaryHardeningListNextSinglePageAsync( - 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.listGenerateBinaryHardeningListNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list result for binary hardening along with {@link PagedResponse} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listGenerateBinaryHardeningListNextSinglePageAsync( - 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 - .listGenerateBinaryHardeningListNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return password hashes list along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listGeneratePasswordHashListNextSinglePageAsync(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.listGeneratePasswordHashListNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return password hashes list along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listGeneratePasswordHashListNextSinglePageAsync( - 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 - .listGeneratePasswordHashListNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list result for CVE along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listGenerateCveListNextSinglePageAsync(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.listGenerateCveListNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list result for CVE along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listGenerateCveListNextSinglePageAsync(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 - .listGenerateCveListNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return crypto certificates list along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listGenerateCryptoCertificateListNextSinglePageAsync( - 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.listGenerateCryptoCertificateListNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return crypto certificates list along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listGenerateCryptoCertificateListNextSinglePageAsync( - 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 - .listGenerateCryptoCertificateListNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return crypto keys list along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listGenerateCryptoKeyListNextSinglePageAsync(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.listGenerateCryptoKeyListNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return crypto keys list along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listGenerateCryptoKeyListNextSinglePageAsync( - String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listGenerateCryptoKeyListNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByWorkspaceNext(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/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/FirmwaresImpl.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/FirmwaresImpl.java index f63dcadf1b934..9260ad59c715e 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/FirmwaresImpl.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/FirmwaresImpl.java @@ -10,32 +10,10 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.iotfirmwaredefense.fluent.FirmwaresClient; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.BinaryHardeningInner; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.BinaryHardeningSummaryInner; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.ComponentInner; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CryptoCertificateInner; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CryptoCertificateSummaryInner; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CryptoKeyInner; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CryptoKeySummaryInner; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CveInner; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CveSummaryInner; import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.FirmwareInner; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.FirmwareSummaryInner; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.PasswordHashInner; import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.UrlTokenInner; -import com.azure.resourcemanager.iotfirmwaredefense.models.BinaryHardening; -import com.azure.resourcemanager.iotfirmwaredefense.models.BinaryHardeningSummary; -import com.azure.resourcemanager.iotfirmwaredefense.models.Component; -import com.azure.resourcemanager.iotfirmwaredefense.models.CryptoCertificate; -import com.azure.resourcemanager.iotfirmwaredefense.models.CryptoCertificateSummary; -import com.azure.resourcemanager.iotfirmwaredefense.models.CryptoKey; -import com.azure.resourcemanager.iotfirmwaredefense.models.CryptoKeySummary; -import com.azure.resourcemanager.iotfirmwaredefense.models.Cve; -import com.azure.resourcemanager.iotfirmwaredefense.models.CveSummary; import com.azure.resourcemanager.iotfirmwaredefense.models.Firmware; -import com.azure.resourcemanager.iotfirmwaredefense.models.FirmwareSummary; import com.azure.resourcemanager.iotfirmwaredefense.models.Firmwares; -import com.azure.resourcemanager.iotfirmwaredefense.models.PasswordHash; import com.azure.resourcemanager.iotfirmwaredefense.models.UrlToken; public final class FirmwaresImpl implements Firmwares { @@ -45,8 +23,7 @@ public final class FirmwaresImpl implements Firmwares { private final com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager; - public FirmwaresImpl( - FirmwaresClient innerClient, + public FirmwaresImpl(FirmwaresClient innerClient, com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -54,17 +31,17 @@ public FirmwaresImpl( public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName) { PagedIterable inner = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new FirmwareImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new FirmwareImpl(inner1, this.manager())); } public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, Context context) { - PagedIterable inner = - this.serviceClient().listByWorkspace(resourceGroupName, workspaceName, context); - return Utils.mapPage(inner, inner1 -> new FirmwareImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new FirmwareImpl(inner1, this.manager())); } - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { + public Response deleteWithResponse(String resourceGroupName, String workspaceName, String firmwareId, + Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, firmwareId, context); } @@ -72,15 +49,12 @@ public void delete(String resourceGroupName, String workspaceName, String firmwa this.serviceClient().delete(resourceGroupName, workspaceName, firmwareId); } - public Response getWithResponse( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, firmwareId, context); + public Response getWithResponse(String resourceGroupName, String workspaceName, String firmwareId, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, firmwareId, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new FirmwareImpl(inner.getValue(), this.manager())); } else { return null; @@ -96,15 +70,12 @@ public Firmware get(String resourceGroupName, String workspaceName, String firmw } } - public Response generateDownloadUrlWithResponse( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - Response inner = - this.serviceClient().generateDownloadUrlWithResponse(resourceGroupName, workspaceName, firmwareId, context); + public Response generateDownloadUrlWithResponse(String resourceGroupName, String workspaceName, + String firmwareId, Context context) { + Response inner = this.serviceClient().generateDownloadUrlWithResponse(resourceGroupName, + workspaceName, firmwareId, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new UrlTokenImpl(inner.getValue(), this.manager())); } else { return null; @@ -120,17 +91,12 @@ public UrlToken generateDownloadUrl(String resourceGroupName, String workspaceNa } } - public Response generateFilesystemDownloadUrlWithResponse( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - Response inner = - this - .serviceClient() - .generateFilesystemDownloadUrlWithResponse(resourceGroupName, workspaceName, firmwareId, context); + public Response generateFilesystemDownloadUrlWithResponse(String resourceGroupName, String workspaceName, + String firmwareId, Context context) { + Response inner = this.serviceClient() + .generateFilesystemDownloadUrlWithResponse(resourceGroupName, workspaceName, firmwareId, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new UrlTokenImpl(inner.getValue(), this.manager())); } else { return null; @@ -138,8 +104,8 @@ public Response generateFilesystemDownloadUrlWithResponse( } public UrlToken generateFilesystemDownloadUrl(String resourceGroupName, String workspaceName, String firmwareId) { - UrlTokenInner inner = - this.serviceClient().generateFilesystemDownloadUrl(resourceGroupName, workspaceName, firmwareId); + UrlTokenInner inner + = this.serviceClient().generateFilesystemDownloadUrl(resourceGroupName, workspaceName, firmwareId); if (inner != null) { return new UrlTokenImpl(inner, this.manager()); } else { @@ -147,378 +113,78 @@ public UrlToken generateFilesystemDownloadUrl(String resourceGroupName, String w } } - public Response generateSummaryWithResponse( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - Response inner = - this.serviceClient().generateSummaryWithResponse(resourceGroupName, workspaceName, firmwareId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new FirmwareSummaryImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public FirmwareSummary generateSummary(String resourceGroupName, String workspaceName, String firmwareId) { - FirmwareSummaryInner inner = this.serviceClient().generateSummary(resourceGroupName, workspaceName, firmwareId); - if (inner != null) { - return new FirmwareSummaryImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable listGenerateComponentList( - String resourceGroupName, String workspaceName, String firmwareId) { - PagedIterable inner = - this.serviceClient().listGenerateComponentList(resourceGroupName, workspaceName, firmwareId); - return Utils.mapPage(inner, inner1 -> new ComponentImpl(inner1, this.manager())); - } - - public PagedIterable listGenerateComponentList( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - PagedIterable inner = - this.serviceClient().listGenerateComponentList(resourceGroupName, workspaceName, firmwareId, context); - return Utils.mapPage(inner, inner1 -> new ComponentImpl(inner1, this.manager())); - } - - public Response generateComponentDetailsWithResponse( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - Response inner = - this - .serviceClient() - .generateComponentDetailsWithResponse(resourceGroupName, workspaceName, firmwareId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ComponentImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Component generateComponentDetails(String resourceGroupName, String workspaceName, String firmwareId) { - ComponentInner inner = - this.serviceClient().generateComponentDetails(resourceGroupName, workspaceName, firmwareId); - if (inner != null) { - return new ComponentImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable listGenerateBinaryHardeningList( - String resourceGroupName, String workspaceName, String firmwareId) { - PagedIterable inner = - this.serviceClient().listGenerateBinaryHardeningList(resourceGroupName, workspaceName, firmwareId); - return Utils.mapPage(inner, inner1 -> new BinaryHardeningImpl(inner1, this.manager())); - } - - public PagedIterable listGenerateBinaryHardeningList( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - PagedIterable inner = - this.serviceClient().listGenerateBinaryHardeningList(resourceGroupName, workspaceName, firmwareId, context); - return Utils.mapPage(inner, inner1 -> new BinaryHardeningImpl(inner1, this.manager())); - } - - public Response generateBinaryHardeningSummaryWithResponse( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - Response inner = - this - .serviceClient() - .generateBinaryHardeningSummaryWithResponse(resourceGroupName, workspaceName, firmwareId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new BinaryHardeningSummaryImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public BinaryHardeningSummary generateBinaryHardeningSummary( - String resourceGroupName, String workspaceName, String firmwareId) { - BinaryHardeningSummaryInner inner = - this.serviceClient().generateBinaryHardeningSummary(resourceGroupName, workspaceName, firmwareId); - if (inner != null) { - return new BinaryHardeningSummaryImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response generateBinaryHardeningDetailsWithResponse( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - Response inner = - this - .serviceClient() - .generateBinaryHardeningDetailsWithResponse(resourceGroupName, workspaceName, firmwareId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new BinaryHardeningImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public BinaryHardening generateBinaryHardeningDetails( - String resourceGroupName, String workspaceName, String firmwareId) { - BinaryHardeningInner inner = - this.serviceClient().generateBinaryHardeningDetails(resourceGroupName, workspaceName, firmwareId); - if (inner != null) { - return new BinaryHardeningImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable listGeneratePasswordHashList( - String resourceGroupName, String workspaceName, String firmwareId) { - PagedIterable inner = - this.serviceClient().listGeneratePasswordHashList(resourceGroupName, workspaceName, firmwareId); - return Utils.mapPage(inner, inner1 -> new PasswordHashImpl(inner1, this.manager())); - } - - public PagedIterable listGeneratePasswordHashList( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - PagedIterable inner = - this.serviceClient().listGeneratePasswordHashList(resourceGroupName, workspaceName, firmwareId, context); - return Utils.mapPage(inner, inner1 -> new PasswordHashImpl(inner1, this.manager())); - } - - public PagedIterable listGenerateCveList(String resourceGroupName, String workspaceName, String firmwareId) { - PagedIterable inner = - this.serviceClient().listGenerateCveList(resourceGroupName, workspaceName, firmwareId); - return Utils.mapPage(inner, inner1 -> new CveImpl(inner1, this.manager())); - } - - public PagedIterable listGenerateCveList( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - PagedIterable inner = - this.serviceClient().listGenerateCveList(resourceGroupName, workspaceName, firmwareId, context); - return Utils.mapPage(inner, inner1 -> new CveImpl(inner1, this.manager())); - } - - public Response generateCveSummaryWithResponse( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - Response inner = - this.serviceClient().generateCveSummaryWithResponse(resourceGroupName, workspaceName, firmwareId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new CveSummaryImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public CveSummary generateCveSummary(String resourceGroupName, String workspaceName, String firmwareId) { - CveSummaryInner inner = this.serviceClient().generateCveSummary(resourceGroupName, workspaceName, firmwareId); - if (inner != null) { - return new CveSummaryImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response generateCryptoCertificateSummaryWithResponse( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - Response inner = - this - .serviceClient() - .generateCryptoCertificateSummaryWithResponse(resourceGroupName, workspaceName, firmwareId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new CryptoCertificateSummaryImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public CryptoCertificateSummary generateCryptoCertificateSummary( - String resourceGroupName, String workspaceName, String firmwareId) { - CryptoCertificateSummaryInner inner = - this.serviceClient().generateCryptoCertificateSummary(resourceGroupName, workspaceName, firmwareId); - if (inner != null) { - return new CryptoCertificateSummaryImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response generateCryptoKeySummaryWithResponse( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - Response inner = - this - .serviceClient() - .generateCryptoKeySummaryWithResponse(resourceGroupName, workspaceName, firmwareId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new CryptoKeySummaryImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public CryptoKeySummary generateCryptoKeySummary( - String resourceGroupName, String workspaceName, String firmwareId) { - CryptoKeySummaryInner inner = - this.serviceClient().generateCryptoKeySummary(resourceGroupName, workspaceName, firmwareId); - if (inner != null) { - return new CryptoKeySummaryImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable listGenerateCryptoCertificateList( - String resourceGroupName, String workspaceName, String firmwareId) { - PagedIterable inner = - this.serviceClient().listGenerateCryptoCertificateList(resourceGroupName, workspaceName, firmwareId); - return Utils.mapPage(inner, inner1 -> new CryptoCertificateImpl(inner1, this.manager())); - } - - public PagedIterable listGenerateCryptoCertificateList( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - PagedIterable inner = - this - .serviceClient() - .listGenerateCryptoCertificateList(resourceGroupName, workspaceName, firmwareId, context); - return Utils.mapPage(inner, inner1 -> new CryptoCertificateImpl(inner1, this.manager())); - } - - public PagedIterable listGenerateCryptoKeyList( - String resourceGroupName, String workspaceName, String firmwareId) { - PagedIterable inner = - this.serviceClient().listGenerateCryptoKeyList(resourceGroupName, workspaceName, firmwareId); - return Utils.mapPage(inner, inner1 -> new CryptoKeyImpl(inner1, this.manager())); - } - - public PagedIterable listGenerateCryptoKeyList( - String resourceGroupName, String workspaceName, String firmwareId, Context context) { - PagedIterable inner = - this.serviceClient().listGenerateCryptoKeyList(resourceGroupName, workspaceName, firmwareId, context); - return Utils.mapPage(inner, inner1 -> new CryptoKeyImpl(inner1, this.manager())); - } - public Firmware getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String firmwareId = Utils.getValueFromIdByName(id, "firmwares"); + String firmwareId = ResourceManagerUtils.getValueFromIdByName(id, "firmwares"); if (firmwareId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'firmwares'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'firmwares'.", id))); } return this.getWithResponse(resourceGroupName, workspaceName, firmwareId, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String firmwareId = Utils.getValueFromIdByName(id, "firmwares"); + String firmwareId = ResourceManagerUtils.getValueFromIdByName(id, "firmwares"); if (firmwareId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'firmwares'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'firmwares'.", id))); } return this.getWithResponse(resourceGroupName, workspaceName, firmwareId, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String firmwareId = Utils.getValueFromIdByName(id, "firmwares"); + String firmwareId = ResourceManagerUtils.getValueFromIdByName(id, "firmwares"); if (firmwareId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'firmwares'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'firmwares'.", id))); } this.deleteWithResponse(resourceGroupName, workspaceName, firmwareId, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String firmwareId = Utils.getValueFromIdByName(id, "firmwares"); + String firmwareId = ResourceManagerUtils.getValueFromIdByName(id, "firmwares"); if (firmwareId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'firmwares'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'firmwares'.", id))); } return this.deleteWithResponse(resourceGroupName, workspaceName, firmwareId, context); } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/FistBuilder.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/IoTFirmwareDefenseBuilder.java similarity index 56% rename from sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/FistBuilder.java rename to sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/IoTFirmwareDefenseBuilder.java index e0b079f1fc627..ca8bc5661dd61 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/FistBuilder.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/IoTFirmwareDefenseBuilder.java @@ -14,21 +14,23 @@ import com.azure.core.util.serializer.SerializerAdapter; import java.time.Duration; -/** A builder for creating a new instance of the FistImpl type. */ -@ServiceClientBuilder(serviceClients = {FistImpl.class}) -public final class FistBuilder { +/** + * A builder for creating a new instance of the IoTFirmwareDefenseImpl type. + */ +@ServiceClientBuilder(serviceClients = { IoTFirmwareDefenseImpl.class }) +public final class IoTFirmwareDefenseBuilder { /* - * The ID of the target subscription. + * The ID of the target subscription. The value must be an UUID. */ private String subscriptionId; /** - * Sets The ID of the target subscription. - * + * Sets The ID of the target subscription. The value must be an UUID. + * * @param subscriptionId the subscriptionId value. - * @return the FistBuilder. + * @return the IoTFirmwareDefenseBuilder. */ - public FistBuilder subscriptionId(String subscriptionId) { + public IoTFirmwareDefenseBuilder subscriptionId(String subscriptionId) { this.subscriptionId = subscriptionId; return this; } @@ -40,11 +42,11 @@ public FistBuilder subscriptionId(String subscriptionId) { /** * Sets server parameter. - * + * * @param endpoint the endpoint value. - * @return the FistBuilder. + * @return the IoTFirmwareDefenseBuilder. */ - public FistBuilder endpoint(String endpoint) { + public IoTFirmwareDefenseBuilder endpoint(String endpoint) { this.endpoint = endpoint; return this; } @@ -56,11 +58,11 @@ public FistBuilder endpoint(String endpoint) { /** * Sets The environment to connect to. - * + * * @param environment the environment value. - * @return the FistBuilder. + * @return the IoTFirmwareDefenseBuilder. */ - public FistBuilder environment(AzureEnvironment environment) { + public IoTFirmwareDefenseBuilder environment(AzureEnvironment environment) { this.environment = environment; return this; } @@ -72,11 +74,11 @@ public FistBuilder environment(AzureEnvironment environment) { /** * Sets The HTTP pipeline to send requests through. - * + * * @param pipeline the pipeline value. - * @return the FistBuilder. + * @return the IoTFirmwareDefenseBuilder. */ - public FistBuilder pipeline(HttpPipeline pipeline) { + public IoTFirmwareDefenseBuilder pipeline(HttpPipeline pipeline) { this.pipeline = pipeline; return this; } @@ -88,11 +90,11 @@ public FistBuilder pipeline(HttpPipeline pipeline) { /** * Sets The default poll interval for long-running operation. - * + * * @param defaultPollInterval the defaultPollInterval value. - * @return the FistBuilder. + * @return the IoTFirmwareDefenseBuilder. */ - public FistBuilder defaultPollInterval(Duration defaultPollInterval) { + public IoTFirmwareDefenseBuilder defaultPollInterval(Duration defaultPollInterval) { this.defaultPollInterval = defaultPollInterval; return this; } @@ -104,41 +106,31 @@ public FistBuilder defaultPollInterval(Duration defaultPollInterval) { /** * Sets The serializer to serialize an object into a string. - * + * * @param serializerAdapter the serializerAdapter value. - * @return the FistBuilder. + * @return the IoTFirmwareDefenseBuilder. */ - public FistBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + public IoTFirmwareDefenseBuilder serializerAdapter(SerializerAdapter serializerAdapter) { this.serializerAdapter = serializerAdapter; return this; } /** - * Builds an instance of FistImpl with the provided parameters. - * - * @return an instance of FistImpl. + * Builds an instance of IoTFirmwareDefenseImpl with the provided parameters. + * + * @return an instance of IoTFirmwareDefenseImpl. */ - public FistImpl buildClient() { + public IoTFirmwareDefenseImpl buildClient() { String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; - HttpPipeline localPipeline = - (pipeline != null) - ? pipeline - : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - Duration localDefaultPollInterval = - (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); - SerializerAdapter localSerializerAdapter = - (serializerAdapter != null) - ? serializerAdapter - : SerializerFactory.createDefaultManagementSerializerAdapter(); - FistImpl client = - new FistImpl( - localPipeline, - localSerializerAdapter, - localDefaultPollInterval, - localEnvironment, - subscriptionId, - localEndpoint); + HttpPipeline localPipeline = (pipeline != null) ? pipeline + : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + Duration localDefaultPollInterval + = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); + SerializerAdapter localSerializerAdapter = (serializerAdapter != null) ? serializerAdapter + : SerializerFactory.createDefaultManagementSerializerAdapter(); + IoTFirmwareDefenseImpl client = new IoTFirmwareDefenseImpl(localPipeline, localSerializerAdapter, + localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); return client; } } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/FistImpl.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/IoTFirmwareDefenseImpl.java similarity index 60% rename from sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/FistImpl.java rename to sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/IoTFirmwareDefenseImpl.java index 8dc1d97ec132a..a5afad0368ff6 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/FistImpl.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/IoTFirmwareDefenseImpl.java @@ -22,9 +22,16 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.BinaryHardeningsClient; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.CryptoCertificatesClient; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.CryptoKeysClient; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.CvesClient; import com.azure.resourcemanager.iotfirmwaredefense.fluent.FirmwaresClient; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.Fist; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.IoTFirmwareDefense; import com.azure.resourcemanager.iotfirmwaredefense.fluent.OperationsClient; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.PasswordHashesClient; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.SbomComponentsClient; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.SummariesClient; import com.azure.resourcemanager.iotfirmwaredefense.fluent.WorkspacesClient; import java.io.IOException; import java.lang.reflect.Type; @@ -35,111 +42,173 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** Initializes a new instance of the FistImpl type. */ -@ServiceClient(builder = FistBuilder.class) -public final class FistImpl implements Fist { - /** The ID of the target subscription. */ +/** + * Initializes a new instance of the IoTFirmwareDefenseImpl type. + */ +@ServiceClient(builder = IoTFirmwareDefenseBuilder.class) +public final class IoTFirmwareDefenseImpl implements IoTFirmwareDefense { + /** + * The ID of the target subscription. The value must be an UUID. + */ private final String subscriptionId; /** - * Gets The ID of the target subscription. - * + * Gets The ID of the target subscription. The value must be an UUID. + * * @return the subscriptionId value. */ public String getSubscriptionId() { return this.subscriptionId; } - /** server parameter. */ + /** + * server parameter. + */ private final String endpoint; /** * Gets server parameter. - * + * * @return the endpoint value. */ public String getEndpoint() { return this.endpoint; } - /** Api Version. */ + /** + * Api Version. + */ private final String apiVersion; /** * Gets Api Version. - * + * * @return the apiVersion value. */ public String getApiVersion() { return this.apiVersion; } - /** The HTTP pipeline to send requests through. */ + /** + * The HTTP pipeline to send requests through. + */ private final HttpPipeline httpPipeline; /** * Gets The HTTP pipeline to send requests through. - * + * * @return the httpPipeline value. */ public HttpPipeline getHttpPipeline() { return this.httpPipeline; } - /** The serializer to serialize an object into a string. */ + /** + * The serializer to serialize an object into a string. + */ private final SerializerAdapter serializerAdapter; /** * Gets The serializer to serialize an object into a string. - * + * * @return the serializerAdapter value. */ SerializerAdapter getSerializerAdapter() { return this.serializerAdapter; } - /** The default poll interval for long-running operation. */ + /** + * The default poll interval for long-running operation. + */ private final Duration defaultPollInterval; /** * Gets The default poll interval for long-running operation. - * + * * @return the defaultPollInterval value. */ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } - /** The FirmwaresClient object to access its operations. */ + /** + * The BinaryHardeningsClient object to access its operations. + */ + private final BinaryHardeningsClient binaryHardenings; + + /** + * Gets the BinaryHardeningsClient object to access its operations. + * + * @return the BinaryHardeningsClient object. + */ + public BinaryHardeningsClient getBinaryHardenings() { + return this.binaryHardenings; + } + + /** + * The CryptoCertificatesClient object to access its operations. + */ + private final CryptoCertificatesClient cryptoCertificates; + + /** + * Gets the CryptoCertificatesClient object to access its operations. + * + * @return the CryptoCertificatesClient object. + */ + public CryptoCertificatesClient getCryptoCertificates() { + return this.cryptoCertificates; + } + + /** + * The CryptoKeysClient object to access its operations. + */ + private final CryptoKeysClient cryptoKeys; + + /** + * Gets the CryptoKeysClient object to access its operations. + * + * @return the CryptoKeysClient object. + */ + public CryptoKeysClient getCryptoKeys() { + return this.cryptoKeys; + } + + /** + * The CvesClient object to access its operations. + */ + private final CvesClient cves; + + /** + * Gets the CvesClient object to access its operations. + * + * @return the CvesClient object. + */ + public CvesClient getCves() { + return this.cves; + } + + /** + * The FirmwaresClient object to access its operations. + */ private final FirmwaresClient firmwares; /** * Gets the FirmwaresClient object to access its operations. - * + * * @return the FirmwaresClient object. */ public FirmwaresClient getFirmwares() { return this.firmwares; } - /** The WorkspacesClient object to access its operations. */ - private final WorkspacesClient workspaces; - /** - * Gets the WorkspacesClient object to access its operations. - * - * @return the WorkspacesClient object. + * The OperationsClient object to access its operations. */ - public WorkspacesClient getWorkspaces() { - return this.workspaces; - } - - /** The OperationsClient object to access its operations. */ private final OperationsClient operations; /** * Gets the OperationsClient object to access its operations. - * + * * @return the OperationsClient object. */ public OperationsClient getOperations() { @@ -147,36 +216,94 @@ public OperationsClient getOperations() { } /** - * Initializes an instance of Fist client. - * + * The PasswordHashesClient object to access its operations. + */ + private final PasswordHashesClient passwordHashes; + + /** + * Gets the PasswordHashesClient object to access its operations. + * + * @return the PasswordHashesClient object. + */ + public PasswordHashesClient getPasswordHashes() { + return this.passwordHashes; + } + + /** + * The SbomComponentsClient object to access its operations. + */ + private final SbomComponentsClient sbomComponents; + + /** + * Gets the SbomComponentsClient object to access its operations. + * + * @return the SbomComponentsClient object. + */ + public SbomComponentsClient getSbomComponents() { + return this.sbomComponents; + } + + /** + * The SummariesClient object to access its operations. + */ + private final SummariesClient summaries; + + /** + * Gets the SummariesClient object to access its operations. + * + * @return the SummariesClient object. + */ + public SummariesClient getSummaries() { + return this.summaries; + } + + /** + * The WorkspacesClient object to access its operations. + */ + private final WorkspacesClient workspaces; + + /** + * Gets the WorkspacesClient object to access its operations. + * + * @return the WorkspacesClient object. + */ + public WorkspacesClient getWorkspaces() { + return this.workspaces; + } + + /** + * Initializes an instance of IoTFirmwareDefense client. + * * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. * @param environment The Azure environment. - * @param subscriptionId The ID of the target subscription. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. * @param endpoint server parameter. */ - FistImpl( - HttpPipeline httpPipeline, - SerializerAdapter serializerAdapter, - Duration defaultPollInterval, - AzureEnvironment environment, - String subscriptionId, - String endpoint) { + IoTFirmwareDefenseImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, Duration defaultPollInterval, + AzureEnvironment environment, String subscriptionId, String endpoint) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2023-02-08-preview"; + this.apiVersion = "2024-01-10"; + this.binaryHardenings = new BinaryHardeningsClientImpl(this); + this.cryptoCertificates = new CryptoCertificatesClientImpl(this); + this.cryptoKeys = new CryptoKeysClientImpl(this); + this.cves = new CvesClientImpl(this); this.firmwares = new FirmwaresClientImpl(this); - this.workspaces = new WorkspacesClientImpl(this); this.operations = new OperationsClientImpl(this); + this.passwordHashes = new PasswordHashesClientImpl(this); + this.sbomComponents = new SbomComponentsClientImpl(this); + this.summaries = new SummariesClientImpl(this); + this.workspaces = new WorkspacesClientImpl(this); } /** * Gets default client context. - * + * * @return the default client context. */ public Context getContext() { @@ -185,7 +312,7 @@ public Context getContext() { /** * Merges default client context with provided context. - * + * * @param context the context to be merged with default client context. * @return the merged context. */ @@ -195,7 +322,7 @@ public Context mergeContext(Context context) { /** * Gets long running operation result. - * + * * @param activationResponse the response of activation operation. * @param httpPipeline the http pipeline. * @param pollResultType type of poll result. @@ -205,26 +332,15 @@ public Context mergeContext(Context context) { * @param type of final result. * @return poller flux for poll result and final result. */ - public PollerFlux, U> getLroResult( - Mono>> activationResponse, - HttpPipeline httpPipeline, - Type pollResultType, - Type finalResultType, - Context context) { - return PollerFactory - .create( - serializerAdapter, - httpPipeline, - pollResultType, - finalResultType, - defaultPollInterval, - activationResponse, - context); + public PollerFlux, U> getLroResult(Mono>> activationResponse, + HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) { + return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, + defaultPollInterval, activationResponse, context); } /** * Gets the final result, or an error, based on last async poll response. - * + * * @param response the last async poll response. * @param type of poll result. * @param type of final result. @@ -237,19 +353,16 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, HttpResponse errorResponse = null; PollResult.Error lroError = response.getValue().getError(); if (lroError != null) { - errorResponse = - new HttpResponseImpl( - lroError.getResponseStatusCode(), lroError.getResponseHeaders(), lroError.getResponseBody()); + errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(), + lroError.getResponseBody()); errorMessage = response.getValue().getError().getMessage(); String errorBody = response.getValue().getError().getResponseBody(); if (errorBody != null) { // try to deserialize error body to ManagementError try { - managementError = - this - .getSerializerAdapter() - .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); + managementError = this.getSerializerAdapter().deserialize(errorBody, ManagementError.class, + SerializerEncoding.JSON); if (managementError.getCode() == null || managementError.getMessage() == null) { managementError = null; } @@ -314,5 +427,5 @@ public Mono getBodyAsString(Charset charset) { } } - private static final ClientLogger LOGGER = new ClientLogger(FistImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(IoTFirmwareDefenseImpl.class); } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/OperationImpl.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/OperationImpl.java index a45d8c1bc2e25..352f62e462e3a 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/OperationImpl.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/OperationImpl.java @@ -15,8 +15,7 @@ public final class OperationImpl implements Operation { private final com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager; - OperationImpl( - OperationInner innerObject, + OperationImpl(OperationInner innerObject, com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/OperationsClientImpl.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/OperationsClientImpl.java index 6e3ade631ead6..cdeb210ecf183 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/OperationsClientImpl.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/OperationsClientImpl.java @@ -30,124 +30,106 @@ import com.azure.resourcemanager.iotfirmwaredefense.models.OperationListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in OperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ public final class OperationsClientImpl implements OperationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final OperationsService service; - /** The service client containing this operation class. */ - private final FistImpl client; + /** + * The service client containing this operation class. + */ + private final IoTFirmwareDefenseImpl client; /** * Initializes an instance of OperationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ - OperationsClientImpl(FistImpl client) { - this.service = - RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + OperationsClientImpl(IoTFirmwareDefenseImpl client) { + this.service + = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for FistOperations to be used by the proxy service to perform REST calls. + * The interface defining all the services for IoTFirmwareDefenseOperations to be used by the proxy service to + * perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "FistOperations") + @ServiceInterface(name = "IoTFirmwareDefenseOp") public interface OperationsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.IoTFirmwareDefense/operations") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Lists the operations for this resource provider. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists the operations for this resource provider. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists the operations for this resource provider. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedFlux}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -156,27 +138,27 @@ private PagedFlux listAsync() { /** * Lists the operations for this resource provider. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedFlux}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Lists the operations for this resource provider. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -185,13 +167,13 @@ public PagedIterable list() { /** * Lists the operations for this resource provider. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -200,14 +182,15 @@ public PagedIterable list(Context context) { /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

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

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -253,23 +227,13 @@ private Mono> listNextSinglePageAsync(String nextL return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/OperationsImpl.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/OperationsImpl.java index 30c5f7cc91449..1e3554b1d91e0 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/OperationsImpl.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/OperationsImpl.java @@ -19,8 +19,7 @@ public final class OperationsImpl implements Operations { private final com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager; - public OperationsImpl( - OperationsClient innerClient, + public OperationsImpl(OperationsClient innerClient, com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -28,12 +27,12 @@ public OperationsImpl( public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); } private OperationsClient serviceClient() { diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/PasswordHashImpl.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/PasswordHashResourceImpl.java similarity index 68% rename from sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/PasswordHashImpl.java rename to sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/PasswordHashResourceImpl.java index 8b0632f6d6739..189bc19352ec7 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/PasswordHashImpl.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/PasswordHashResourceImpl.java @@ -4,21 +4,37 @@ package com.azure.resourcemanager.iotfirmwaredefense.implementation; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.PasswordHashInner; -import com.azure.resourcemanager.iotfirmwaredefense.models.PasswordHash; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.PasswordHashResourceInner; +import com.azure.resourcemanager.iotfirmwaredefense.models.PasswordHashResource; -public final class PasswordHashImpl implements PasswordHash { - private PasswordHashInner innerObject; +public final class PasswordHashResourceImpl implements PasswordHashResource { + private PasswordHashResourceInner innerObject; private final com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager; - PasswordHashImpl( - PasswordHashInner innerObject, + PasswordHashResourceImpl(PasswordHashResourceInner innerObject, com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String passwordHashId() { return this.innerModel().passwordHashId(); } @@ -47,7 +63,7 @@ public String algorithm() { return this.innerModel().algorithm(); } - public PasswordHashInner innerModel() { + public PasswordHashResourceInner innerModel() { return this.innerObject; } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/PasswordHashesClientImpl.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/PasswordHashesClientImpl.java new file mode 100644 index 0000000000000..a826d2f39aaae --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/PasswordHashesClientImpl.java @@ -0,0 +1,296 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.PasswordHashesClient; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.PasswordHashResourceInner; +import com.azure.resourcemanager.iotfirmwaredefense.models.PasswordHashListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in PasswordHashesClient. + */ +public final class PasswordHashesClientImpl implements PasswordHashesClient { + /** + * The proxy service used to perform REST calls. + */ + private final PasswordHashesService service; + + /** + * The service client containing this operation class. + */ + private final IoTFirmwareDefenseImpl client; + + /** + * Initializes an instance of PasswordHashesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + PasswordHashesClientImpl(IoTFirmwareDefenseImpl client) { + this.service + = RestProxy.create(PasswordHashesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for IoTFirmwareDefensePasswordHashes to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "IoTFirmwareDefensePa") + public interface PasswordHashesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/passwordHashes") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByFirmware(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("firmwareId") String firmwareId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByFirmwareNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Lists password hash analysis results of a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of password hash results along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByFirmwareSinglePageAsync(String resourceGroupName, + String workspaceName, String firmwareId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (firmwareId == null) { + return Mono.error(new IllegalArgumentException("Parameter firmwareId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByFirmware(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, firmwareId, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists password hash analysis results of a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of password hash results along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByFirmwareSinglePageAsync(String resourceGroupName, + String workspaceName, String firmwareId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (firmwareId == null) { + return Mono.error(new IllegalArgumentException("Parameter firmwareId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByFirmware(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, firmwareId, this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists password hash analysis results of a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of password hash results as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByFirmwareAsync(String resourceGroupName, String workspaceName, + String firmwareId) { + return new PagedFlux<>(() -> listByFirmwareSinglePageAsync(resourceGroupName, workspaceName, firmwareId), + nextLink -> listByFirmwareNextSinglePageAsync(nextLink)); + } + + /** + * Lists password hash analysis results of a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of password hash results as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByFirmwareAsync(String resourceGroupName, String workspaceName, + String firmwareId, Context context) { + return new PagedFlux<>( + () -> listByFirmwareSinglePageAsync(resourceGroupName, workspaceName, firmwareId, context), + nextLink -> listByFirmwareNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists password hash analysis results of a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of password hash results as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId) { + return new PagedIterable<>(listByFirmwareAsync(resourceGroupName, workspaceName, firmwareId)); + } + + /** + * Lists password hash analysis results of a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of password hash results as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId, Context context) { + return new PagedIterable<>(listByFirmwareAsync(resourceGroupName, workspaceName, firmwareId, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of password hash results along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByFirmwareNextSinglePageAsync(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.listByFirmwareNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of password hash results along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByFirmwareNextSinglePageAsync(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.listByFirmwareNext(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/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/PasswordHashesImpl.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/PasswordHashesImpl.java new file mode 100644 index 0000000000000..2e19ab6dee412 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/PasswordHashesImpl.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.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.iotfirmwaredefense.fluent.PasswordHashesClient; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.PasswordHashResourceInner; +import com.azure.resourcemanager.iotfirmwaredefense.models.PasswordHashResource; +import com.azure.resourcemanager.iotfirmwaredefense.models.PasswordHashes; + +public final class PasswordHashesImpl implements PasswordHashes { + private static final ClientLogger LOGGER = new ClientLogger(PasswordHashesImpl.class); + + private final PasswordHashesClient innerClient; + + private final com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager; + + public PasswordHashesImpl(PasswordHashesClient innerClient, + com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId) { + PagedIterable inner + = this.serviceClient().listByFirmware(resourceGroupName, workspaceName, firmwareId); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PasswordHashResourceImpl(inner1, this.manager())); + } + + public PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId, Context context) { + PagedIterable inner + = this.serviceClient().listByFirmware(resourceGroupName, workspaceName, firmwareId, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PasswordHashResourceImpl(inner1, this.manager())); + } + + private PasswordHashesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/Utils.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/ResourceManagerUtils.java similarity index 80% rename from sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/Utils.java rename to sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/ResourceManagerUtils.java index 8a9e03e5e56fb..791a676d80b31 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/Utils.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/ResourceManagerUtils.java @@ -19,7 +19,10 @@ import java.util.stream.Stream; import reactor.core.publisher.Flux; -final class Utils { +final class ResourceManagerUtils { + private ResourceManagerUtils() { + } + static String getValueFromIdByName(String id, String name) { if (id == null) { return null; @@ -38,6 +41,7 @@ static String getValueFromIdByName(String id, String name) { } } return null; + } static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { @@ -60,7 +64,7 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri segments.add(idSegment); idItrReverted.forEachRemaining(segments::add); Collections.reverse(segments); - if (segments.size() > 0 && segments.get(0).isEmpty()) { + if (!segments.isEmpty() && segments.get(0).isEmpty()) { segments.remove(0); } return String.join("/", segments); @@ -71,10 +75,11 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri } } return null; + } static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { - return new PagedIterableImpl(pageIterable, mapper); + return new PagedIterableImpl<>(pageIterable, mapper); } private static final class PagedIterableImpl extends PagedIterable { @@ -84,26 +89,17 @@ private static final class PagedIterableImpl extends PagedIterable { private final Function, PagedResponse> pageMapper; private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { - super( - PagedFlux - .create( - () -> - (continuationToken, pageSize) -> - Flux.fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); + super(PagedFlux.create(() -> (continuationToken, pageSize) -> Flux + .fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); this.pagedIterable = pagedIterable; this.mapper = mapper; this.pageMapper = getPageMapper(mapper); } private static Function, PagedResponse> getPageMapper(Function mapper) { - return page -> - new PagedResponseBase( - page.getRequest(), - page.getStatusCode(), - page.getHeaders(), - page.getElements().stream().map(mapper).collect(Collectors.toList()), - page.getContinuationToken(), - null); + return page -> new PagedResponseBase(page.getRequest(), page.getStatusCode(), page.getHeaders(), + page.getElements().stream().map(mapper).collect(Collectors.toList()), page.getContinuationToken(), + null); } @Override @@ -133,30 +129,27 @@ public Stream> streamByPage(String continuationToken, int prefe @Override public Iterator iterator() { - return new IteratorImpl(pagedIterable.iterator(), mapper); + return new IteratorImpl<>(pagedIterable.iterator(), mapper); } @Override public Iterable> iterableByPage() { - return new IterableImpl, PagedResponse>(pagedIterable.iterableByPage(), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(), pageMapper); } @Override public Iterable> iterableByPage(String continuationToken) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(continuationToken), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken), pageMapper); } @Override public Iterable> iterableByPage(int preferredPageSize) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(preferredPageSize), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(preferredPageSize), pageMapper); } @Override public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); } } @@ -198,7 +191,7 @@ private IterableImpl(Iterable iterable, Function mapper) { @Override public Iterator iterator() { - return new IteratorImpl(iterable.iterator(), mapper); + return new IteratorImpl<>(iterable.iterator(), mapper); } } } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/ComponentImpl.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/SbomComponentResourceImpl.java similarity index 62% rename from sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/ComponentImpl.java rename to sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/SbomComponentResourceImpl.java index 31d4d11874322..4561517b7a5a3 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/ComponentImpl.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/SbomComponentResourceImpl.java @@ -4,25 +4,39 @@ package com.azure.resourcemanager.iotfirmwaredefense.implementation; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.ComponentInner; -import com.azure.resourcemanager.iotfirmwaredefense.models.Component; -import com.azure.resourcemanager.iotfirmwaredefense.models.IsUpdateAvailable; -import java.time.OffsetDateTime; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.SbomComponentResourceInner; +import com.azure.resourcemanager.iotfirmwaredefense.models.SbomComponentResource; import java.util.Collections; import java.util.List; -public final class ComponentImpl implements Component { - private ComponentInner innerObject; +public final class SbomComponentResourceImpl implements SbomComponentResource { + private SbomComponentResourceInner innerObject; private final com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager; - ComponentImpl( - ComponentInner innerObject, + SbomComponentResourceImpl(SbomComponentResourceInner innerObject, com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String componentId() { return this.innerModel().componentId(); } @@ -39,12 +53,8 @@ public String license() { return this.innerModel().license(); } - public OffsetDateTime releaseDate() { - return this.innerModel().releaseDate(); - } - - public List paths() { - List inner = this.innerModel().paths(); + public List filePaths() { + List inner = this.innerModel().filePaths(); if (inner != null) { return Collections.unmodifiableList(inner); } else { @@ -52,11 +62,7 @@ public List paths() { } } - public IsUpdateAvailable isUpdateAvailable() { - return this.innerModel().isUpdateAvailable(); - } - - public ComponentInner innerModel() { + public SbomComponentResourceInner innerModel() { return this.innerObject; } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/SbomComponentsClientImpl.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/SbomComponentsClientImpl.java new file mode 100644 index 0000000000000..10f28eedcfa7e --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/SbomComponentsClientImpl.java @@ -0,0 +1,296 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.SbomComponentsClient; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.SbomComponentResourceInner; +import com.azure.resourcemanager.iotfirmwaredefense.models.SbomComponentListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in SbomComponentsClient. + */ +public final class SbomComponentsClientImpl implements SbomComponentsClient { + /** + * The proxy service used to perform REST calls. + */ + private final SbomComponentsService service; + + /** + * The service client containing this operation class. + */ + private final IoTFirmwareDefenseImpl client; + + /** + * Initializes an instance of SbomComponentsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + SbomComponentsClientImpl(IoTFirmwareDefenseImpl client) { + this.service + = RestProxy.create(SbomComponentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for IoTFirmwareDefenseSbomComponents to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "IoTFirmwareDefenseSb") + public interface SbomComponentsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/sbomComponents") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByFirmware(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("firmwareId") String firmwareId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByFirmwareNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Lists SBOM analysis results of a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of SBOM results along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByFirmwareSinglePageAsync(String resourceGroupName, + String workspaceName, String firmwareId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (firmwareId == null) { + return Mono.error(new IllegalArgumentException("Parameter firmwareId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByFirmware(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, firmwareId, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists SBOM analysis results of a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of SBOM results along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByFirmwareSinglePageAsync(String resourceGroupName, + String workspaceName, String firmwareId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (firmwareId == null) { + return Mono.error(new IllegalArgumentException("Parameter firmwareId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByFirmware(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, firmwareId, this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists SBOM analysis results of a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of SBOM results as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByFirmwareAsync(String resourceGroupName, String workspaceName, + String firmwareId) { + return new PagedFlux<>(() -> listByFirmwareSinglePageAsync(resourceGroupName, workspaceName, firmwareId), + nextLink -> listByFirmwareNextSinglePageAsync(nextLink)); + } + + /** + * Lists SBOM analysis results of a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of SBOM results as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByFirmwareAsync(String resourceGroupName, String workspaceName, + String firmwareId, Context context) { + return new PagedFlux<>( + () -> listByFirmwareSinglePageAsync(resourceGroupName, workspaceName, firmwareId, context), + nextLink -> listByFirmwareNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists SBOM analysis results of a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of SBOM results as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId) { + return new PagedIterable<>(listByFirmwareAsync(resourceGroupName, workspaceName, firmwareId)); + } + + /** + * Lists SBOM analysis results of a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of SBOM results as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId, Context context) { + return new PagedIterable<>(listByFirmwareAsync(resourceGroupName, workspaceName, firmwareId, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of SBOM results along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByFirmwareNextSinglePageAsync(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.listByFirmwareNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of SBOM results along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByFirmwareNextSinglePageAsync(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.listByFirmwareNext(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/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/SbomComponentsImpl.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/SbomComponentsImpl.java new file mode 100644 index 0000000000000..e1100da23655a --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/SbomComponentsImpl.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.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.iotfirmwaredefense.fluent.SbomComponentsClient; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.SbomComponentResourceInner; +import com.azure.resourcemanager.iotfirmwaredefense.models.SbomComponentResource; +import com.azure.resourcemanager.iotfirmwaredefense.models.SbomComponents; + +public final class SbomComponentsImpl implements SbomComponents { + private static final ClientLogger LOGGER = new ClientLogger(SbomComponentsImpl.class); + + private final SbomComponentsClient innerClient; + + private final com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager; + + public SbomComponentsImpl(SbomComponentsClient innerClient, + com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId) { + PagedIterable inner + = this.serviceClient().listByFirmware(resourceGroupName, workspaceName, firmwareId); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SbomComponentResourceImpl(inner1, this.manager())); + } + + public PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId, Context context) { + PagedIterable inner + = this.serviceClient().listByFirmware(resourceGroupName, workspaceName, firmwareId, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SbomComponentResourceImpl(inner1, this.manager())); + } + + private SbomComponentsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/SummariesClientImpl.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/SummariesClientImpl.java new file mode 100644 index 0000000000000..4b4525cb41f39 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/SummariesClientImpl.java @@ -0,0 +1,452 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.SummariesClient; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.SummaryResourceInner; +import com.azure.resourcemanager.iotfirmwaredefense.models.SummaryListResult; +import com.azure.resourcemanager.iotfirmwaredefense.models.SummaryName; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in SummariesClient. + */ +public final class SummariesClientImpl implements SummariesClient { + /** + * The proxy service used to perform REST calls. + */ + private final SummariesService service; + + /** + * The service client containing this operation class. + */ + private final IoTFirmwareDefenseImpl client; + + /** + * Initializes an instance of SummariesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + SummariesClientImpl(IoTFirmwareDefenseImpl client) { + this.service + = RestProxy.create(SummariesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for IoTFirmwareDefenseSummaries to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "IoTFirmwareDefenseSu") + public interface SummariesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/summaries") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByFirmware(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("firmwareId") String firmwareId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/summaries/{summaryName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("firmwareId") String firmwareId, @PathParam("summaryName") SummaryName summaryName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByFirmwareNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Lists analysis result summary names of a firmware. To fetch the full summary data, get that summary by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of analysis summaries along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByFirmwareSinglePageAsync(String resourceGroupName, + String workspaceName, String firmwareId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (firmwareId == null) { + return Mono.error(new IllegalArgumentException("Parameter firmwareId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByFirmware(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, firmwareId, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists analysis result summary names of a firmware. To fetch the full summary data, get that summary by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of analysis summaries along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByFirmwareSinglePageAsync(String resourceGroupName, + String workspaceName, String firmwareId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (firmwareId == null) { + return Mono.error(new IllegalArgumentException("Parameter firmwareId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByFirmware(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, firmwareId, this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists analysis result summary names of a firmware. To fetch the full summary data, get that summary by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of analysis summaries as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByFirmwareAsync(String resourceGroupName, String workspaceName, + String firmwareId) { + return new PagedFlux<>(() -> listByFirmwareSinglePageAsync(resourceGroupName, workspaceName, firmwareId), + nextLink -> listByFirmwareNextSinglePageAsync(nextLink)); + } + + /** + * Lists analysis result summary names of a firmware. To fetch the full summary data, get that summary by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of analysis summaries as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByFirmwareAsync(String resourceGroupName, String workspaceName, + String firmwareId, Context context) { + return new PagedFlux<>( + () -> listByFirmwareSinglePageAsync(resourceGroupName, workspaceName, firmwareId, context), + nextLink -> listByFirmwareNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists analysis result summary names of a firmware. To fetch the full summary data, get that summary by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of analysis summaries as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId) { + return new PagedIterable<>(listByFirmwareAsync(resourceGroupName, workspaceName, firmwareId)); + } + + /** + * Lists analysis result summary names of a firmware. To fetch the full summary data, get that summary by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of analysis summaries as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId, Context context) { + return new PagedIterable<>(listByFirmwareAsync(resourceGroupName, workspaceName, firmwareId, context)); + } + + /** + * Get an analysis result summary of a firmware by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @param summaryName The Firmware analysis summary name describing the type of summary. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an analysis result summary of a firmware by name along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String firmwareId, SummaryName summaryName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (firmwareId == null) { + return Mono.error(new IllegalArgumentException("Parameter firmwareId is required and cannot be null.")); + } + if (summaryName == null) { + return Mono.error(new IllegalArgumentException("Parameter summaryName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, firmwareId, summaryName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get an analysis result summary of a firmware by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @param summaryName The Firmware analysis summary name describing the type of summary. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an analysis result summary of a firmware by name along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String firmwareId, SummaryName summaryName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (firmwareId == null) { + return Mono.error(new IllegalArgumentException("Parameter firmwareId is required and cannot be null.")); + } + if (summaryName == null) { + return Mono.error(new IllegalArgumentException("Parameter summaryName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + firmwareId, summaryName, this.client.getApiVersion(), accept, context); + } + + /** + * Get an analysis result summary of a firmware by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @param summaryName The Firmware analysis summary name describing the type of summary. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an analysis result summary of a firmware by name on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String workspaceName, String firmwareId, + SummaryName summaryName) { + return getWithResponseAsync(resourceGroupName, workspaceName, firmwareId, summaryName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get an analysis result summary of a firmware by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @param summaryName The Firmware analysis summary name describing the type of summary. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an analysis result summary of a firmware by name along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String workspaceName, + String firmwareId, SummaryName summaryName, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, firmwareId, summaryName, context).block(); + } + + /** + * Get an analysis result summary of a firmware by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @param summaryName The Firmware analysis summary name describing the type of summary. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an analysis result summary of a firmware by name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SummaryResourceInner get(String resourceGroupName, String workspaceName, String firmwareId, + SummaryName summaryName) { + return getWithResponse(resourceGroupName, workspaceName, firmwareId, summaryName, Context.NONE).getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of analysis summaries along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByFirmwareNextSinglePageAsync(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.listByFirmwareNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of analysis summaries along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByFirmwareNextSinglePageAsync(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.listByFirmwareNext(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/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/SummariesImpl.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/SummariesImpl.java new file mode 100644 index 0000000000000..aad4b3986a5ba --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/SummariesImpl.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.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.iotfirmwaredefense.fluent.SummariesClient; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.SummaryResourceInner; +import com.azure.resourcemanager.iotfirmwaredefense.models.Summaries; +import com.azure.resourcemanager.iotfirmwaredefense.models.SummaryName; +import com.azure.resourcemanager.iotfirmwaredefense.models.SummaryResource; + +public final class SummariesImpl implements Summaries { + private static final ClientLogger LOGGER = new ClientLogger(SummariesImpl.class); + + private final SummariesClient innerClient; + + private final com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager; + + public SummariesImpl(SummariesClient innerClient, + com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId) { + PagedIterable inner + = this.serviceClient().listByFirmware(resourceGroupName, workspaceName, firmwareId); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SummaryResourceImpl(inner1, this.manager())); + } + + public PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId, Context context) { + PagedIterable inner + = this.serviceClient().listByFirmware(resourceGroupName, workspaceName, firmwareId, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SummaryResourceImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String workspaceName, String firmwareId, + SummaryName summaryName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, firmwareId, summaryName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new SummaryResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SummaryResource get(String resourceGroupName, String workspaceName, String firmwareId, + SummaryName summaryName) { + SummaryResourceInner inner + = this.serviceClient().get(resourceGroupName, workspaceName, firmwareId, summaryName); + if (inner != null) { + return new SummaryResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + private SummariesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/SummaryResourceImpl.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/SummaryResourceImpl.java new file mode 100644 index 0000000000000..0dec1fd0b03ab --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/SummaryResourceImpl.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.SummaryResourceInner; +import com.azure.resourcemanager.iotfirmwaredefense.models.SummaryResource; +import com.azure.resourcemanager.iotfirmwaredefense.models.SummaryResourceProperties; + +public final class SummaryResourceImpl implements SummaryResource { + private SummaryResourceInner innerObject; + + private final com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager; + + SummaryResourceImpl(SummaryResourceInner innerObject, + com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager 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 SummaryResourceProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public SummaryResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/UrlTokenImpl.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/UrlTokenImpl.java index 6323de0e4c769..435c4e2a24e58 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/UrlTokenImpl.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/UrlTokenImpl.java @@ -12,8 +12,7 @@ public final class UrlTokenImpl implements UrlToken { private final com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager; - UrlTokenImpl( - UrlTokenInner innerObject, + UrlTokenImpl(UrlTokenInner innerObject, com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -23,10 +22,6 @@ public String url() { return this.innerModel().url(); } - public String uploadUrl() { - return this.innerModel().uploadUrl(); - } - public UrlTokenInner innerModel() { return this.innerObject; } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/WorkspaceImpl.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/WorkspaceImpl.java index dfd556d71c417..fa5a1ec84c4ea 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/WorkspaceImpl.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/WorkspaceImpl.java @@ -87,22 +87,14 @@ public WorkspaceImpl withExistingResourceGroup(String resourceGroupName) { } public Workspace create() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkspaces() - .createWithResponse(resourceGroupName, workspaceName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWorkspaces() + .createWithResponse(resourceGroupName, workspaceName, this.innerModel(), Context.NONE).getValue(); return this; } public Workspace create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkspaces() - .createWithResponse(resourceGroupName, workspaceName, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWorkspaces() + .createWithResponse(resourceGroupName, workspaceName, this.innerModel(), context).getValue(); return this; } @@ -118,59 +110,41 @@ public WorkspaceImpl update() { } public Workspace apply() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkspaces() - .updateWithResponse(resourceGroupName, workspaceName, updateWorkspace, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWorkspaces() + .updateWithResponse(resourceGroupName, workspaceName, updateWorkspace, Context.NONE).getValue(); return this; } public Workspace apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkspaces() - .updateWithResponse(resourceGroupName, workspaceName, updateWorkspace, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWorkspaces() + .updateWithResponse(resourceGroupName, workspaceName, updateWorkspace, context).getValue(); return this; } - WorkspaceImpl( - WorkspaceInner innerObject, + WorkspaceImpl(WorkspaceInner innerObject, com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); } public Workspace refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkspaces() - .getByResourceGroupWithResponse(resourceGroupName, workspaceName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWorkspaces() + .getByResourceGroupWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); return this; } public Workspace refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkspaces() - .getByResourceGroupWithResponse(resourceGroupName, workspaceName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWorkspaces() + .getByResourceGroupWithResponse(resourceGroupName, workspaceName, context).getValue(); return this; } - public Response generateUploadUrlWithResponse( - GenerateUploadUrlRequest generateUploadUrl, Context context) { - return serviceManager - .workspaces() - .generateUploadUrlWithResponse(resourceGroupName, workspaceName, generateUploadUrl, context); + public Response generateUploadUrlWithResponse(GenerateUploadUrlRequest generateUploadUrl, + Context context) { + return serviceManager.workspaces().generateUploadUrlWithResponse(resourceGroupName, workspaceName, + generateUploadUrl, context); } public UrlToken generateUploadUrl(GenerateUploadUrlRequest generateUploadUrl) { diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/WorkspacesClientImpl.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/WorkspacesClientImpl.java index 3ba7887b471e6..b0ec189e1ba82 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/WorkspacesClientImpl.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/WorkspacesClientImpl.java @@ -38,254 +38,194 @@ import com.azure.resourcemanager.iotfirmwaredefense.models.WorkspaceUpdateDefinition; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in WorkspacesClient. */ +/** + * An instance of this class provides access to all the operations defined in WorkspacesClient. + */ public final class WorkspacesClientImpl implements WorkspacesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final WorkspacesService service; - /** The service client containing this operation class. */ - private final FistImpl client; + /** + * The service client containing this operation class. + */ + private final IoTFirmwareDefenseImpl client; /** * Initializes an instance of WorkspacesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ - WorkspacesClientImpl(FistImpl client) { - this.service = - RestProxy.create(WorkspacesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + WorkspacesClientImpl(IoTFirmwareDefenseImpl client) { + this.service + = RestProxy.create(WorkspacesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for FistWorkspaces to be used by the proxy service to perform REST calls. + * The interface defining all the services for IoTFirmwareDefenseWorkspaces to be used by the proxy service to + * perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "FistWorkspaces") + @ServiceInterface(name = "IoTFirmwareDefenseWo") public interface WorkspacesService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.IoTFirmwareDefense/workspaces") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, + Mono> listByResourceGroup(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> create( - @HostParam("$host") String endpoint, + Mono> create(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") WorkspaceInner workspace, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") WorkspaceInner workspace, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( - @HostParam("$host") String endpoint, + Mono> update(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") WorkspaceUpdateDefinition workspace, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") WorkspaceUpdateDefinition workspace, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}") - @ExpectedResponses({200, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, + Mono> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}") - @ExpectedResponses({200, 304}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, + Mono> getByResourceGroup(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/generateUploadUrl") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/generateUploadUrl") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> generateUploadUrl( - @HostParam("$host") String endpoint, + Mono> generateUploadUrl(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") GenerateUploadUrlRequest generateUploadUrl, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Lists all of the firmware analysis workspaces in the specified subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return return a list of firmware analysis workspaces along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists all of the firmware analysis workspaces in the specified subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return return a list of firmware analysis workspaces along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists all of the firmware analysis workspaces in the specified subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return return a list of firmware analysis workspaces as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { - return new PagedFlux<>( - () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** * Lists all of the firmware analysis workspaces in the specified subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -294,13 +234,13 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); } /** * Lists all of the firmware analysis workspaces in the specified subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return return a list of firmware analysis workspaces as paginated response with {@link PagedIterable}. @@ -312,7 +252,7 @@ public PagedIterable list() { /** * Lists all of the firmware analysis workspaces in the specified subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -326,27 +266,23 @@ public PagedIterable list(Context context) { /** * Lists all of the firmware analysis workspaces in the specified resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return return a list of firmware analysis workspaces along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -354,53 +290,34 @@ private Mono> listByResourceGroupSinglePageAsync(S } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists all of the firmware analysis workspaces in the specified resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return return a list of firmware analysis workspaces along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Context context) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -409,27 +326,15 @@ private Mono> listByResourceGroupSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists all of the firmware analysis workspaces in the specified resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -438,14 +343,13 @@ private Mono> listByResourceGroupSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** * Lists all of the firmware analysis workspaces in the specified resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -455,14 +359,13 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupN */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } /** * Lists all of the firmware analysis workspaces in the specified resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -476,7 +379,7 @@ public PagedIterable listByResourceGroup(String resourceGroupNam /** * Lists all of the firmware analysis workspaces in the specified resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -491,7 +394,7 @@ public PagedIterable listByResourceGroup(String resourceGroupNam /** * The operation to create or update a firmware analysis workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param workspace Parameters when creating a firmware analysis workspace. @@ -501,19 +404,15 @@ public PagedIterable listByResourceGroup(String resourceGroupNam * @return firmware analysis workspace along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, String workspaceName, WorkspaceInner workspace) { + private Mono> createWithResponseAsync(String resourceGroupName, String workspaceName, + WorkspaceInner workspace) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -529,24 +428,14 @@ private Mono> createWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .create( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - workspace, - accept, - context)) + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, this.client.getApiVersion(), workspace, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The operation to create or update a firmware analysis workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param workspace Parameters when creating a firmware analysis workspace. @@ -557,19 +446,15 @@ private Mono> createWithResponseAsync( * @return firmware analysis workspace along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, String workspaceName, WorkspaceInner workspace, Context context) { + private Mono> createWithResponseAsync(String resourceGroupName, String workspaceName, + WorkspaceInner workspace, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -585,21 +470,13 @@ private Mono> createWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .create( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - workspace, - accept, - context); + return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, this.client.getApiVersion(), workspace, accept, context); } /** * The operation to create or update a firmware analysis workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param workspace Parameters when creating a firmware analysis workspace. @@ -616,7 +493,7 @@ private Mono createAsync(String resourceGroupName, String worksp /** * The operation to create or update a firmware analysis workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param workspace Parameters when creating a firmware analysis workspace. @@ -627,14 +504,14 @@ private Mono createAsync(String resourceGroupName, String worksp * @return firmware analysis workspace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse( - String resourceGroupName, String workspaceName, WorkspaceInner workspace, Context context) { + public Response createWithResponse(String resourceGroupName, String workspaceName, + WorkspaceInner workspace, Context context) { return createWithResponseAsync(resourceGroupName, workspaceName, workspace, context).block(); } /** * The operation to create or update a firmware analysis workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param workspace Parameters when creating a firmware analysis workspace. @@ -650,7 +527,7 @@ public WorkspaceInner create(String resourceGroupName, String workspaceName, Wor /** * The operation to update a firmware analysis workspaces. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param workspace Parameters when updating a firmware analysis workspace. @@ -660,19 +537,15 @@ public WorkspaceInner create(String resourceGroupName, String workspaceName, Wor * @return firmware analysis workspace along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, String workspaceName, WorkspaceUpdateDefinition workspace) { + private Mono> updateWithResponseAsync(String resourceGroupName, String workspaceName, + WorkspaceUpdateDefinition workspace) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -688,24 +561,14 @@ private Mono> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - workspace, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, this.client.getApiVersion(), workspace, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The operation to update a firmware analysis workspaces. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param workspace Parameters when updating a firmware analysis workspace. @@ -716,19 +579,15 @@ private Mono> updateWithResponseAsync( * @return firmware analysis workspace along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, String workspaceName, WorkspaceUpdateDefinition workspace, Context context) { + private Mono> updateWithResponseAsync(String resourceGroupName, String workspaceName, + WorkspaceUpdateDefinition workspace, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -744,21 +603,13 @@ private Mono> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - workspace, - accept, - context); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, this.client.getApiVersion(), workspace, accept, context); } /** * The operation to update a firmware analysis workspaces. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param workspace Parameters when updating a firmware analysis workspace. @@ -768,15 +619,15 @@ private Mono> updateWithResponseAsync( * @return firmware analysis workspace on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String workspaceName, WorkspaceUpdateDefinition workspace) { + private Mono updateAsync(String resourceGroupName, String workspaceName, + WorkspaceUpdateDefinition workspace) { return updateWithResponseAsync(resourceGroupName, workspaceName, workspace) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * The operation to update a firmware analysis workspaces. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param workspace Parameters when updating a firmware analysis workspace. @@ -787,14 +638,14 @@ private Mono updateAsync( * @return firmware analysis workspace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, String workspaceName, WorkspaceUpdateDefinition workspace, Context context) { + public Response updateWithResponse(String resourceGroupName, String workspaceName, + WorkspaceUpdateDefinition workspace, Context context) { return updateWithResponseAsync(resourceGroupName, workspaceName, workspace, context).block(); } /** * The operation to update a firmware analysis workspaces. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param workspace Parameters when updating a firmware analysis workspace. @@ -810,7 +661,7 @@ public WorkspaceInner update(String resourceGroupName, String workspaceName, Wor /** * The operation to delete a firmware analysis workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -821,16 +672,12 @@ public WorkspaceInner update(String resourceGroupName, String workspaceName, Wor @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -841,23 +688,14 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The operation to delete a firmware analysis workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param context The context to associate with this operation. @@ -867,19 +705,15 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -890,20 +724,13 @@ private Mono> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, this.client.getApiVersion(), accept, context); } /** * The operation to delete a firmware analysis workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -918,7 +745,7 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName) { /** * The operation to delete a firmware analysis workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param context The context to associate with this operation. @@ -934,7 +761,7 @@ public Response deleteWithResponse(String resourceGroupName, String worksp /** * The operation to delete a firmware analysis workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -948,7 +775,7 @@ public void delete(String resourceGroupName, String workspaceName) { /** * Get firmware analysis workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -957,19 +784,15 @@ public void delete(String resourceGroupName, String workspaceName) { * @return firmware analysis workspace along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String workspaceName) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String workspaceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -981,22 +804,14 @@ private Mono> getByResourceGroupWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - accept, - context)) + context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get firmware analysis workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param context The context to associate with this operation. @@ -1006,19 +821,15 @@ private Mono> getByResourceGroupWithResponseAsync( * @return firmware analysis workspace along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String workspaceName, Context context) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String workspaceName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1029,20 +840,13 @@ private Mono> getByResourceGroupWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - accept, - context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, this.client.getApiVersion(), accept, context); } /** * Get firmware analysis workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1058,7 +862,7 @@ private Mono getByResourceGroupAsync(String resourceGroupName, S /** * Get firmware analysis workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param context The context to associate with this operation. @@ -1068,14 +872,14 @@ private Mono getByResourceGroupAsync(String resourceGroupName, S * @return firmware analysis workspace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String workspaceName, Context context) { + public Response getByResourceGroupWithResponse(String resourceGroupName, String workspaceName, + Context context) { return getByResourceGroupWithResponseAsync(resourceGroupName, workspaceName, context).block(); } /** * Get firmware analysis workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1090,7 +894,7 @@ public WorkspaceInner getByResourceGroup(String resourceGroupName, String worksp /** * The operation to get a url for file upload. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param generateUploadUrl Parameters when requesting a URL to upload firmware. @@ -1098,22 +902,18 @@ public WorkspaceInner getByResourceGroup(String resourceGroupName, String worksp * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return url data for creating or accessing a blob file along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> generateUploadUrlWithResponseAsync( - String resourceGroupName, String workspaceName, GenerateUploadUrlRequest generateUploadUrl) { + private Mono> generateUploadUrlWithResponseAsync(String resourceGroupName, + String workspaceName, GenerateUploadUrlRequest generateUploadUrl) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1131,23 +931,14 @@ private Mono> generateUploadUrlWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .generateUploadUrl( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - generateUploadUrl, - accept, - context)) + context -> service.generateUploadUrl(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, this.client.getApiVersion(), generateUploadUrl, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The operation to get a url for file upload. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param generateUploadUrl Parameters when requesting a URL to upload firmware. @@ -1156,22 +947,18 @@ private Mono> generateUploadUrlWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return url data for creating or accessing a blob file along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> generateUploadUrlWithResponseAsync( - String resourceGroupName, String workspaceName, GenerateUploadUrlRequest generateUploadUrl, Context context) { + private Mono> generateUploadUrlWithResponseAsync(String resourceGroupName, + String workspaceName, GenerateUploadUrlRequest generateUploadUrl, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1188,21 +975,13 @@ private Mono> generateUploadUrlWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .generateUploadUrl( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - generateUploadUrl, - accept, - context); + return service.generateUploadUrl(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, this.client.getApiVersion(), generateUploadUrl, accept, context); } /** * The operation to get a url for file upload. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param generateUploadUrl Parameters when requesting a URL to upload firmware. @@ -1212,15 +991,15 @@ private Mono> generateUploadUrlWithResponseAsync( * @return url data for creating or accessing a blob file on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono generateUploadUrlAsync( - String resourceGroupName, String workspaceName, GenerateUploadUrlRequest generateUploadUrl) { + private Mono generateUploadUrlAsync(String resourceGroupName, String workspaceName, + GenerateUploadUrlRequest generateUploadUrl) { return generateUploadUrlWithResponseAsync(resourceGroupName, workspaceName, generateUploadUrl) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * The operation to get a url for file upload. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param generateUploadUrl Parameters when requesting a URL to upload firmware. @@ -1231,14 +1010,14 @@ private Mono generateUploadUrlAsync( * @return url data for creating or accessing a blob file along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response generateUploadUrlWithResponse( - String resourceGroupName, String workspaceName, GenerateUploadUrlRequest generateUploadUrl, Context context) { + public Response generateUploadUrlWithResponse(String resourceGroupName, String workspaceName, + GenerateUploadUrlRequest generateUploadUrl, Context context) { return generateUploadUrlWithResponseAsync(resourceGroupName, workspaceName, generateUploadUrl, context).block(); } /** * The operation to get a url for file upload. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param generateUploadUrl Parameters when requesting a URL to upload firmware. @@ -1248,22 +1027,23 @@ public Response generateUploadUrlWithResponse( * @return url data for creating or accessing a blob file. */ @ServiceMethod(returns = ReturnType.SINGLE) - public UrlTokenInner generateUploadUrl( - String resourceGroupName, String workspaceName, GenerateUploadUrlRequest generateUploadUrl) { + public UrlTokenInner generateUploadUrl(String resourceGroupName, String workspaceName, + GenerateUploadUrlRequest generateUploadUrl) { return generateUploadUrlWithResponse(resourceGroupName, workspaceName, generateUploadUrl, Context.NONE) .getValue(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

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

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

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

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return return a list of firmware analysis workspaces along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/WorkspacesImpl.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/WorkspacesImpl.java index 17c358ca97aaa..c7a2f6d3cd357 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/WorkspacesImpl.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/WorkspacesImpl.java @@ -24,8 +24,7 @@ public final class WorkspacesImpl implements Workspaces { private final com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager; - public WorkspacesImpl( - WorkspacesClient innerClient, + public WorkspacesImpl(WorkspacesClient innerClient, com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -33,26 +32,26 @@ public WorkspacesImpl( public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return Utils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); } - public Response deleteByResourceGroupWithResponse( - String resourceGroupName, String workspaceName, Context context) { + public Response deleteByResourceGroupWithResponse(String resourceGroupName, String workspaceName, + Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, context); } @@ -60,15 +59,12 @@ public void deleteByResourceGroup(String resourceGroupName, String workspaceName this.serviceClient().delete(resourceGroupName, workspaceName); } - public Response getByResourceGroupWithResponse( - String resourceGroupName, String workspaceName, Context context) { - Response inner = - this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, workspaceName, context); + public Response getByResourceGroupWithResponse(String resourceGroupName, String workspaceName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, workspaceName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new WorkspaceImpl(inner.getValue(), this.manager())); } else { return null; @@ -84,27 +80,22 @@ public Workspace getByResourceGroup(String resourceGroupName, String workspaceNa } } - public Response generateUploadUrlWithResponse( - String resourceGroupName, String workspaceName, GenerateUploadUrlRequest generateUploadUrl, Context context) { - Response inner = - this - .serviceClient() - .generateUploadUrlWithResponse(resourceGroupName, workspaceName, generateUploadUrl, context); + public Response generateUploadUrlWithResponse(String resourceGroupName, String workspaceName, + GenerateUploadUrlRequest generateUploadUrl, Context context) { + Response inner = this.serviceClient().generateUploadUrlWithResponse(resourceGroupName, + workspaceName, generateUploadUrl, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new UrlTokenImpl(inner.getValue(), this.manager())); } else { return null; } } - public UrlToken generateUploadUrl( - String resourceGroupName, String workspaceName, GenerateUploadUrlRequest generateUploadUrl) { - UrlTokenInner inner = - this.serviceClient().generateUploadUrl(resourceGroupName, workspaceName, generateUploadUrl); + public UrlToken generateUploadUrl(String resourceGroupName, String workspaceName, + GenerateUploadUrlRequest generateUploadUrl) { + UrlTokenInner inner + = this.serviceClient().generateUploadUrl(resourceGroupName, workspaceName, generateUploadUrl); if (inner != null) { return new UrlTokenImpl(inner, this.manager()); } else { @@ -113,77 +104,57 @@ public UrlToken generateUploadUrl( } public Workspace getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, workspaceName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } this.deleteByResourceGroupWithResponse(resourceGroupName, workspaceName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } return this.deleteByResourceGroupWithResponse(resourceGroupName, workspaceName, context); } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/package-info.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/package-info.java index 0e164a564928e..b4c7025b41e02 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/package-info.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/implementation/package-info.java @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the implementations for Fist. The definitions and parameters in this swagger specification will be - * used to manage the IoT Firmware Defense resources. + * Package containing the implementations for IoTFirmwareDefense. + * Firmware & IoT Security REST API. */ package com.azure.resourcemanager.iotfirmwaredefense.implementation; diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/ActionType.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/ActionType.java index 28952be1ea48f..fa6342ff6b034 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/ActionType.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/ActionType.java @@ -8,14 +8,18 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ +/** + * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + */ public final class ActionType extends ExpandableStringEnum { - /** Static value Internal for ActionType. */ + /** + * Static value Internal for ActionType. + */ public static final ActionType INTERNAL = fromString("Internal"); /** * Creates a new instance of ActionType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -24,7 +28,7 @@ public ActionType() { /** * Creates or finds a ActionType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ActionType. */ @@ -35,7 +39,7 @@ public static ActionType fromString(String name) { /** * Gets known ActionType values. - * + * * @return known ActionType values. */ public static Collection values() { diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/BinaryHardening.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/BinaryHardening.java deleted file mode 100644 index 75f15a6d249b6..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/BinaryHardening.java +++ /dev/null @@ -1,94 +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.iotfirmwaredefense.models; - -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.BinaryHardeningInner; - -/** An immutable client-side representation of BinaryHardening. */ -public interface BinaryHardening { - /** - * Gets the binaryHardeningId property: ID for the binary hardening result. - * - * @return the binaryHardeningId value. - */ - String binaryHardeningId(); - - /** - * Gets the architecture property: The architecture of the uploaded firmware. - * - * @return the architecture value. - */ - String architecture(); - - /** - * Gets the path property: path for binary hardening. - * - * @return the path value. - */ - String path(); - - /** - * Gets the classProperty property: class for binary hardening. - * - * @return the classProperty value. - */ - String classProperty(); - - /** - * Gets the runpath property: The runpath of the uploaded firmware. - * - * @return the runpath value. - */ - String runpath(); - - /** - * Gets the rpath property: The rpath of the uploaded firmware. - * - * @return the rpath value. - */ - String rpath(); - - /** - * Gets the nx property: NX flag. - * - * @return the nx value. - */ - NxFlag nx(); - - /** - * Gets the pie property: PIE flag. - * - * @return the pie value. - */ - PieFlag pie(); - - /** - * Gets the relro property: RELRO flag. - * - * @return the relro value. - */ - RelroFlag relro(); - - /** - * Gets the canary property: Canary flag. - * - * @return the canary value. - */ - CanaryFlag canary(); - - /** - * Gets the stripped property: Stripped flag. - * - * @return the stripped value. - */ - StrippedFlag stripped(); - - /** - * Gets the inner com.azure.resourcemanager.iotfirmwaredefense.fluent.models.BinaryHardeningInner object. - * - * @return the inner object. - */ - BinaryHardeningInner innerModel(); -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/BinaryHardeningList.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/BinaryHardeningListResult.java similarity index 70% rename from sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/BinaryHardeningList.java rename to sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/BinaryHardeningListResult.java index 118ca6fad6a17..f4060cffcb44f 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/BinaryHardeningList.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/BinaryHardeningListResult.java @@ -5,41 +5,45 @@ package com.azure.resourcemanager.iotfirmwaredefense.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.BinaryHardeningInner; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.BinaryHardeningResourceInner; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List result for binary hardening. */ +/** + * List of binary hardening results. + */ @Fluent -public final class BinaryHardeningList { +public final class BinaryHardeningListResult { /* * The list of binary hardening results. */ @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; + private List value; /* - * The uri to fetch the next page of asset. + * The uri to fetch the next page of resources. */ @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of BinaryHardeningList class. */ - public BinaryHardeningList() { + /** + * Creates an instance of BinaryHardeningListResult class. + */ + public BinaryHardeningListResult() { } /** * Get the value property: The list of binary hardening results. - * + * * @return the value value. */ - public List value() { + public List value() { return this.value; } /** - * Get the nextLink property: The uri to fetch the next page of asset. - * + * Get the nextLink property: The uri to fetch the next page of resources. + * * @return the nextLink value. */ public String nextLink() { @@ -47,19 +51,19 @@ public String nextLink() { } /** - * Set the nextLink property: The uri to fetch the next page of asset. - * + * Set the nextLink property: The uri to fetch the next page of resources. + * * @param nextLink the nextLink value to set. - * @return the BinaryHardeningList object itself. + * @return the BinaryHardeningListResult object itself. */ - public BinaryHardeningList withNextLink(String nextLink) { + public BinaryHardeningListResult withNextLink(String nextLink) { this.nextLink = nextLink; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/BinaryHardeningResource.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/BinaryHardeningResource.java new file mode 100644 index 0000000000000..65236de3721cb --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/BinaryHardeningResource.java @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.BinaryHardeningResourceInner; + +/** + * An immutable client-side representation of BinaryHardeningResource. + */ +public interface BinaryHardeningResource { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the binaryHardeningId property: ID for the binary hardening result. + * + * @return the binaryHardeningId value. + */ + String binaryHardeningId(); + + /** + * Gets the architecture property: The architecture of the uploaded firmware. + * + * @return the architecture value. + */ + String architecture(); + + /** + * Gets the filePath property: The executable path. + * + * @return the filePath value. + */ + String filePath(); + + /** + * Gets the classProperty property: The executable class to indicate 32 or 64 bit. + * + * @return the classProperty value. + */ + String classProperty(); + + /** + * Gets the runpath property: The runpath of the uploaded firmware. + * + * @return the runpath value. + */ + String runpath(); + + /** + * Gets the rpath property: The rpath of the uploaded firmware. + * + * @return the rpath value. + */ + String rpath(); + + /** + * Gets the nx property: NX (no-execute) flag. + * + * @return the nx value. + */ + Boolean nx(); + + /** + * Gets the pie property: PIE (position independent executable) flag. + * + * @return the pie value. + */ + Boolean pie(); + + /** + * Gets the relro property: RELRO (relocation read-only) flag. + * + * @return the relro value. + */ + Boolean relro(); + + /** + * Gets the canary property: Canary (stack canaries) flag. + * + * @return the canary value. + */ + Boolean canary(); + + /** + * Gets the stripped property: Stripped flag. + * + * @return the stripped value. + */ + Boolean stripped(); + + /** + * Gets the inner com.azure.resourcemanager.iotfirmwaredefense.fluent.models.BinaryHardeningResourceInner object. + * + * @return the inner object. + */ + BinaryHardeningResourceInner innerModel(); +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/BinaryHardeningSummary.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/BinaryHardeningSummary.java deleted file mode 100644 index 0d35b620758dd..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/BinaryHardeningSummary.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.iotfirmwaredefense.models; - -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.BinaryHardeningSummaryInner; - -/** An immutable client-side representation of BinaryHardeningSummary. */ -public interface BinaryHardeningSummary { - /** - * Gets the totalFiles property: Total number of binaries that were analyzed. - * - * @return the totalFiles value. - */ - Long totalFiles(); - - /** - * Gets the nx property: NX summary percentage. - * - * @return the nx value. - */ - Integer nx(); - - /** - * Gets the pie property: PIE summary percentage. - * - * @return the pie value. - */ - Integer pie(); - - /** - * Gets the relro property: RELRO summary percentage. - * - * @return the relro value. - */ - Integer relro(); - - /** - * Gets the canary property: Canary summary percentage. - * - * @return the canary value. - */ - Integer canary(); - - /** - * Gets the stripped property: Stripped summary percentage. - * - * @return the stripped value. - */ - Integer stripped(); - - /** - * Gets the inner com.azure.resourcemanager.iotfirmwaredefense.fluent.models.BinaryHardeningSummaryInner object. - * - * @return the inner object. - */ - BinaryHardeningSummaryInner innerModel(); -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/BinaryHardeningSummaryInner.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/BinaryHardeningSummaryResource.java similarity index 67% rename from sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/BinaryHardeningSummaryInner.java rename to sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/BinaryHardeningSummaryResource.java index 7eca7366b64b2..8c8cec0d54a67 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/BinaryHardeningSummaryInner.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/BinaryHardeningSummaryResource.java @@ -2,14 +2,20 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.iotfirmwaredefense.fluent.models; +package com.azure.resourcemanager.iotfirmwaredefense.models; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; - -/** Binary hardening summary percentages. */ +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Properties for a binary hardening analysis summary. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "summaryType") +@JsonTypeName("BinaryHardening") @Fluent -public final class BinaryHardeningSummaryInner { +public final class BinaryHardeningSummaryResource extends SummaryResourceProperties { /* * Total number of binaries that were analyzed */ @@ -46,13 +52,15 @@ public final class BinaryHardeningSummaryInner { @JsonProperty(value = "stripped") private Integer stripped; - /** Creates an instance of BinaryHardeningSummaryInner class. */ - public BinaryHardeningSummaryInner() { + /** + * Creates an instance of BinaryHardeningSummaryResource class. + */ + public BinaryHardeningSummaryResource() { } /** * Get the totalFiles property: Total number of binaries that were analyzed. - * + * * @return the totalFiles value. */ public Long totalFiles() { @@ -61,18 +69,18 @@ public Long totalFiles() { /** * Set the totalFiles property: Total number of binaries that were analyzed. - * + * * @param totalFiles the totalFiles value to set. - * @return the BinaryHardeningSummaryInner object itself. + * @return the BinaryHardeningSummaryResource object itself. */ - public BinaryHardeningSummaryInner withTotalFiles(Long totalFiles) { + public BinaryHardeningSummaryResource withTotalFiles(Long totalFiles) { this.totalFiles = totalFiles; return this; } /** * Get the nx property: NX summary percentage. - * + * * @return the nx value. */ public Integer nx() { @@ -81,18 +89,18 @@ public Integer nx() { /** * Set the nx property: NX summary percentage. - * + * * @param nx the nx value to set. - * @return the BinaryHardeningSummaryInner object itself. + * @return the BinaryHardeningSummaryResource object itself. */ - public BinaryHardeningSummaryInner withNx(Integer nx) { + public BinaryHardeningSummaryResource withNx(Integer nx) { this.nx = nx; return this; } /** * Get the pie property: PIE summary percentage. - * + * * @return the pie value. */ public Integer pie() { @@ -101,18 +109,18 @@ public Integer pie() { /** * Set the pie property: PIE summary percentage. - * + * * @param pie the pie value to set. - * @return the BinaryHardeningSummaryInner object itself. + * @return the BinaryHardeningSummaryResource object itself. */ - public BinaryHardeningSummaryInner withPie(Integer pie) { + public BinaryHardeningSummaryResource withPie(Integer pie) { this.pie = pie; return this; } /** * Get the relro property: RELRO summary percentage. - * + * * @return the relro value. */ public Integer relro() { @@ -121,18 +129,18 @@ public Integer relro() { /** * Set the relro property: RELRO summary percentage. - * + * * @param relro the relro value to set. - * @return the BinaryHardeningSummaryInner object itself. + * @return the BinaryHardeningSummaryResource object itself. */ - public BinaryHardeningSummaryInner withRelro(Integer relro) { + public BinaryHardeningSummaryResource withRelro(Integer relro) { this.relro = relro; return this; } /** * Get the canary property: Canary summary percentage. - * + * * @return the canary value. */ public Integer canary() { @@ -141,18 +149,18 @@ public Integer canary() { /** * Set the canary property: Canary summary percentage. - * + * * @param canary the canary value to set. - * @return the BinaryHardeningSummaryInner object itself. + * @return the BinaryHardeningSummaryResource object itself. */ - public BinaryHardeningSummaryInner withCanary(Integer canary) { + public BinaryHardeningSummaryResource withCanary(Integer canary) { this.canary = canary; return this; } /** * Get the stripped property: Stripped summary percentage. - * + * * @return the stripped value. */ public Integer stripped() { @@ -161,20 +169,22 @@ public Integer stripped() { /** * Set the stripped property: Stripped summary percentage. - * + * * @param stripped the stripped value to set. - * @return the BinaryHardeningSummaryInner object itself. + * @return the BinaryHardeningSummaryResource object itself. */ - public BinaryHardeningSummaryInner withStripped(Integer stripped) { + public BinaryHardeningSummaryResource withStripped(Integer stripped) { this.stripped = stripped; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ + @Override public void validate() { + super.validate(); } } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/BinaryHardenings.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/BinaryHardenings.java new file mode 100644 index 0000000000000..74394382b1866 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/BinaryHardenings.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** + * Resource collection API of BinaryHardenings. + */ +public interface BinaryHardenings { + /** + * Lists binary hardening analysis results of a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of binary hardening results as paginated response with {@link PagedIterable}. + */ + PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId); + + /** + * Lists binary hardening analysis results of a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of binary hardening results as paginated response with {@link PagedIterable}. + */ + PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId, Context context); +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CanaryFlag.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CanaryFlag.java deleted file mode 100644 index 8fe0b7d5f33a7..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CanaryFlag.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.iotfirmwaredefense.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Canary flag. */ -public final class CanaryFlag extends ExpandableStringEnum { - /** Static value True for CanaryFlag. */ - public static final CanaryFlag TRUE = fromString("True"); - - /** Static value False for CanaryFlag. */ - public static final CanaryFlag FALSE = fromString("False"); - - /** - * Creates a new instance of CanaryFlag value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public CanaryFlag() { - } - - /** - * Creates or finds a CanaryFlag from its string representation. - * - * @param name a name to look for. - * @return the corresponding CanaryFlag. - */ - @JsonCreator - public static CanaryFlag fromString(String name) { - return fromString(name, CanaryFlag.class); - } - - /** - * Gets known CanaryFlag values. - * - * @return known CanaryFlag values. - */ - public static Collection values() { - return values(CanaryFlag.class); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Component.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Component.java deleted file mode 100644 index 21ed187a90866..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Component.java +++ /dev/null @@ -1,68 +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.iotfirmwaredefense.models; - -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.ComponentInner; -import java.time.OffsetDateTime; -import java.util.List; - -/** An immutable client-side representation of Component. */ -public interface Component { - /** - * Gets the componentId property: ID for the component. - * - * @return the componentId value. - */ - String componentId(); - - /** - * Gets the componentName property: Name for the component. - * - * @return the componentName value. - */ - String componentName(); - - /** - * Gets the version property: Version for the component. - * - * @return the version value. - */ - String version(); - - /** - * Gets the license property: License for the component. - * - * @return the license value. - */ - String license(); - - /** - * Gets the releaseDate property: Release date for the component. - * - * @return the releaseDate value. - */ - OffsetDateTime releaseDate(); - - /** - * Gets the paths property: Paths of the component. - * - * @return the paths value. - */ - List paths(); - - /** - * Gets the isUpdateAvailable property: Flag if new update is available for the component. - * - * @return the isUpdateAvailable value. - */ - IsUpdateAvailable isUpdateAvailable(); - - /** - * Gets the inner com.azure.resourcemanager.iotfirmwaredefense.fluent.models.ComponentInner object. - * - * @return the inner object. - */ - ComponentInner innerModel(); -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoCertificateEntity.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoCertificateEntity.java index a1c82c50e7641..97b345391b684 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoCertificateEntity.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoCertificateEntity.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Information on an entity (distinguished name) in a cryptographic certificate. */ +/** + * Information on an entity (distinguished name) in a cryptographic certificate. + */ @Fluent public final class CryptoCertificateEntity { /* @@ -40,13 +42,15 @@ public final class CryptoCertificateEntity { @JsonProperty(value = "country") private String country; - /** Creates an instance of CryptoCertificateEntity class. */ + /** + * Creates an instance of CryptoCertificateEntity class. + */ public CryptoCertificateEntity() { } /** * Get the commonName property: Common name of the certificate entity. - * + * * @return the commonName value. */ public String commonName() { @@ -55,7 +59,7 @@ public String commonName() { /** * Set the commonName property: Common name of the certificate entity. - * + * * @param commonName the commonName value to set. * @return the CryptoCertificateEntity object itself. */ @@ -66,7 +70,7 @@ public CryptoCertificateEntity withCommonName(String commonName) { /** * Get the organization property: Organization of the certificate entity. - * + * * @return the organization value. */ public String organization() { @@ -75,7 +79,7 @@ public String organization() { /** * Set the organization property: Organization of the certificate entity. - * + * * @param organization the organization value to set. * @return the CryptoCertificateEntity object itself. */ @@ -86,7 +90,7 @@ public CryptoCertificateEntity withOrganization(String organization) { /** * Get the organizationalUnit property: The organizational unit of the certificate entity. - * + * * @return the organizationalUnit value. */ public String organizationalUnit() { @@ -95,7 +99,7 @@ public String organizationalUnit() { /** * Set the organizationalUnit property: The organizational unit of the certificate entity. - * + * * @param organizationalUnit the organizationalUnit value to set. * @return the CryptoCertificateEntity object itself. */ @@ -106,7 +110,7 @@ public CryptoCertificateEntity withOrganizationalUnit(String organizationalUnit) /** * Get the state property: Geographical state or province of the certificate entity. - * + * * @return the state value. */ public String state() { @@ -115,7 +119,7 @@ public String state() { /** * Set the state property: Geographical state or province of the certificate entity. - * + * * @param state the state value to set. * @return the CryptoCertificateEntity object itself. */ @@ -126,7 +130,7 @@ public CryptoCertificateEntity withState(String state) { /** * Get the country property: Country code of the certificate entity. - * + * * @return the country value. */ public String country() { @@ -135,7 +139,7 @@ public String country() { /** * Set the country property: Country code of the certificate entity. - * + * * @param country the country value to set. * @return the CryptoCertificateEntity object itself. */ @@ -146,7 +150,7 @@ public CryptoCertificateEntity withCountry(String country) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoCertificateListResult.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoCertificateListResult.java new file mode 100644 index 0000000000000..3ab0bd380485a --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoCertificateListResult.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CryptoCertificateResourceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * List of crypto certificates. + */ +@Fluent +public final class CryptoCertificateListResult { + /* + * The list of crypto certificate results. + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private List value; + + /* + * The uri to fetch the next page of resources. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of CryptoCertificateListResult class. + */ + public CryptoCertificateListResult() { + } + + /** + * Get the value property: The list of crypto certificate results. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The uri to fetch the next page of resources. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The uri to fetch the next page of resources. + * + * @param nextLink the nextLink value to set. + * @return the CryptoCertificateListResult object itself. + */ + public CryptoCertificateListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoCertificate.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoCertificateResource.java similarity index 69% rename from sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoCertificate.java rename to sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoCertificateResource.java index 1d5cb76279560..64162fbf0b1d1 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoCertificate.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoCertificateResource.java @@ -4,157 +4,188 @@ package com.azure.resourcemanager.iotfirmwaredefense.models; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CryptoCertificateInner; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CryptoCertificateResourceInner; import java.time.OffsetDateTime; import java.util.List; -/** An immutable client-side representation of CryptoCertificate. */ -public interface CryptoCertificate { +/** + * An immutable client-side representation of CryptoCertificateResource. + */ +public interface CryptoCertificateResource { /** - * Gets the cryptoCertId property: ID for the certificate. - * - * @return the cryptoCertId value. + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. */ - String cryptoCertId(); + String id(); /** - * Gets the name property: Name of the certificate. - * + * Gets the name property: The name of the resource. + * * @return the name value. */ String name(); + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the cryptoCertId property: ID for the certificate result. + * + * @return the cryptoCertId value. + */ + String cryptoCertId(); + + /** + * Gets the namePropertiesName property: Name of the certificate. + * + * @return the namePropertiesName value. + */ + String namePropertiesName(); + /** * Gets the subject property: Subject information of the certificate. - * + * * @return the subject value. */ CryptoCertificateEntity subject(); /** * Gets the issuer property: Issuer information of the certificate. - * + * * @return the issuer value. */ CryptoCertificateEntity issuer(); /** * Gets the issuedDate property: Issue date for the certificate. - * + * * @return the issuedDate value. */ OffsetDateTime issuedDate(); /** * Gets the expirationDate property: Expiration date for the certificate. - * + * * @return the expirationDate value. */ OffsetDateTime expirationDate(); /** * Gets the role property: Role of the certificate (Root CA, etc). - * + * * @return the role value. */ String role(); /** * Gets the signatureAlgorithm property: The signature algorithm used in the certificate. - * + * * @return the signatureAlgorithm value. */ String signatureAlgorithm(); /** * Gets the keySize property: Size of the certificate's key in bits. - * + * * @return the keySize value. */ Long keySize(); /** * Gets the keyAlgorithm property: Key algorithm used in the certificate. - * + * * @return the keyAlgorithm value. */ String keyAlgorithm(); /** * Gets the encoding property: Encoding used for the certificate. - * + * * @return the encoding value. */ String encoding(); /** * Gets the serialNumber property: Serial number of the certificate. - * + * * @return the serialNumber value. */ String serialNumber(); /** * Gets the fingerprint property: Fingerprint of the certificate. - * + * * @return the fingerprint value. */ String fingerprint(); /** * Gets the usage property: List of functions the certificate can fulfill. - * + * * @return the usage value. */ List usage(); /** - * Gets the filePaths property: List of files paths for this certificate. - * + * Gets the filePaths property: List of files where this certificate was found. + * * @return the filePaths value. */ List filePaths(); /** * Gets the pairedKey property: A matching paired private key. - * + * * @return the pairedKey value. */ PairedKey pairedKey(); /** * Gets the isExpired property: Indicates if the certificate is expired. - * + * * @return the isExpired value. */ - IsExpired isExpired(); + Boolean isExpired(); /** - * Gets the isSelfSigned property: Indicates if the certificate was self-signed. - * + * Gets the isSelfSigned property: Indicates if the certificate is self-signed. + * * @return the isSelfSigned value. */ - IsSelfSigned isSelfSigned(); + Boolean isSelfSigned(); /** * Gets the isWeakSignature property: Indicates the signature algorithm used is insecure. - * + * * @return the isWeakSignature value. */ - IsWeakSignature isWeakSignature(); + Boolean isWeakSignature(); /** * Gets the isShortKeySize property: Indicates the certificate's key size is considered too small to be secure for * the key algorithm. - * + * * @return the isShortKeySize value. */ - IsShortKeySize isShortKeySize(); + Boolean isShortKeySize(); /** - * Gets the inner com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CryptoCertificateInner object. - * + * Gets the inner com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CryptoCertificateResourceInner object. + * * @return the inner object. */ - CryptoCertificateInner innerModel(); + CryptoCertificateResourceInner innerModel(); } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoCertificateSummary.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoCertificateSummary.java deleted file mode 100644 index 92b4a15278695..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoCertificateSummary.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.iotfirmwaredefense.models; - -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CryptoCertificateSummaryInner; - -/** An immutable client-side representation of CryptoCertificateSummary. */ -public interface CryptoCertificateSummary { - /** - * Gets the totalCertificates property: Total number of certificates found. - * - * @return the totalCertificates value. - */ - Long totalCertificates(); - - /** - * Gets the pairedKeys property: Total number of paired private keys found for the certificates. - * - * @return the pairedKeys value. - */ - Long pairedKeys(); - - /** - * Gets the expired property: Total number of expired certificates found. - * - * @return the expired value. - */ - Long expired(); - - /** - * Gets the expiringSoon property: Total number of nearly expired certificates found. - * - * @return the expiringSoon value. - */ - Long expiringSoon(); - - /** - * Gets the weakSignature property: Total number of certificates found using a weak signature algorithm. - * - * @return the weakSignature value. - */ - Long weakSignature(); - - /** - * Gets the selfSigned property: Total number of certificates found that are self-signed. - * - * @return the selfSigned value. - */ - Long selfSigned(); - - /** - * Gets the shortKeySize property: Total number of certificates found that have an insecure key size for the key - * algorithm. - * - * @return the shortKeySize value. - */ - Long shortKeySize(); - - /** - * Gets the inner com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CryptoCertificateSummaryInner object. - * - * @return the inner object. - */ - CryptoCertificateSummaryInner innerModel(); -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/CryptoCertificateSummaryInner.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoCertificateSummaryResource.java similarity index 72% rename from sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/CryptoCertificateSummaryInner.java rename to sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoCertificateSummaryResource.java index 5c43bf47c9628..c27eea0d3a3a2 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/CryptoCertificateSummaryInner.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoCertificateSummaryResource.java @@ -2,14 +2,20 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.iotfirmwaredefense.fluent.models; +package com.azure.resourcemanager.iotfirmwaredefense.models; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; - -/** Cryptographic certificate summary values. */ +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Properties for cryptographic certificate summary. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "summaryType") +@JsonTypeName("CryptoCertificate") @Fluent -public final class CryptoCertificateSummaryInner { +public final class CryptoCertificateSummaryResource extends SummaryResourceProperties { /* * Total number of certificates found. */ @@ -52,13 +58,15 @@ public final class CryptoCertificateSummaryInner { @JsonProperty(value = "shortKeySize") private Long shortKeySize; - /** Creates an instance of CryptoCertificateSummaryInner class. */ - public CryptoCertificateSummaryInner() { + /** + * Creates an instance of CryptoCertificateSummaryResource class. + */ + public CryptoCertificateSummaryResource() { } /** * Get the totalCertificates property: Total number of certificates found. - * + * * @return the totalCertificates value. */ public Long totalCertificates() { @@ -67,18 +75,18 @@ public Long totalCertificates() { /** * Set the totalCertificates property: Total number of certificates found. - * + * * @param totalCertificates the totalCertificates value to set. - * @return the CryptoCertificateSummaryInner object itself. + * @return the CryptoCertificateSummaryResource object itself. */ - public CryptoCertificateSummaryInner withTotalCertificates(Long totalCertificates) { + public CryptoCertificateSummaryResource withTotalCertificates(Long totalCertificates) { this.totalCertificates = totalCertificates; return this; } /** * Get the pairedKeys property: Total number of paired private keys found for the certificates. - * + * * @return the pairedKeys value. */ public Long pairedKeys() { @@ -87,18 +95,18 @@ public Long pairedKeys() { /** * Set the pairedKeys property: Total number of paired private keys found for the certificates. - * + * * @param pairedKeys the pairedKeys value to set. - * @return the CryptoCertificateSummaryInner object itself. + * @return the CryptoCertificateSummaryResource object itself. */ - public CryptoCertificateSummaryInner withPairedKeys(Long pairedKeys) { + public CryptoCertificateSummaryResource withPairedKeys(Long pairedKeys) { this.pairedKeys = pairedKeys; return this; } /** * Get the expired property: Total number of expired certificates found. - * + * * @return the expired value. */ public Long expired() { @@ -107,18 +115,18 @@ public Long expired() { /** * Set the expired property: Total number of expired certificates found. - * + * * @param expired the expired value to set. - * @return the CryptoCertificateSummaryInner object itself. + * @return the CryptoCertificateSummaryResource object itself. */ - public CryptoCertificateSummaryInner withExpired(Long expired) { + public CryptoCertificateSummaryResource withExpired(Long expired) { this.expired = expired; return this; } /** * Get the expiringSoon property: Total number of nearly expired certificates found. - * + * * @return the expiringSoon value. */ public Long expiringSoon() { @@ -127,18 +135,18 @@ public Long expiringSoon() { /** * Set the expiringSoon property: Total number of nearly expired certificates found. - * + * * @param expiringSoon the expiringSoon value to set. - * @return the CryptoCertificateSummaryInner object itself. + * @return the CryptoCertificateSummaryResource object itself. */ - public CryptoCertificateSummaryInner withExpiringSoon(Long expiringSoon) { + public CryptoCertificateSummaryResource withExpiringSoon(Long expiringSoon) { this.expiringSoon = expiringSoon; return this; } /** * Get the weakSignature property: Total number of certificates found using a weak signature algorithm. - * + * * @return the weakSignature value. */ public Long weakSignature() { @@ -147,18 +155,18 @@ public Long weakSignature() { /** * Set the weakSignature property: Total number of certificates found using a weak signature algorithm. - * + * * @param weakSignature the weakSignature value to set. - * @return the CryptoCertificateSummaryInner object itself. + * @return the CryptoCertificateSummaryResource object itself. */ - public CryptoCertificateSummaryInner withWeakSignature(Long weakSignature) { + public CryptoCertificateSummaryResource withWeakSignature(Long weakSignature) { this.weakSignature = weakSignature; return this; } /** * Get the selfSigned property: Total number of certificates found that are self-signed. - * + * * @return the selfSigned value. */ public Long selfSigned() { @@ -167,11 +175,11 @@ public Long selfSigned() { /** * Set the selfSigned property: Total number of certificates found that are self-signed. - * + * * @param selfSigned the selfSigned value to set. - * @return the CryptoCertificateSummaryInner object itself. + * @return the CryptoCertificateSummaryResource object itself. */ - public CryptoCertificateSummaryInner withSelfSigned(Long selfSigned) { + public CryptoCertificateSummaryResource withSelfSigned(Long selfSigned) { this.selfSigned = selfSigned; return this; } @@ -179,7 +187,7 @@ public CryptoCertificateSummaryInner withSelfSigned(Long selfSigned) { /** * Get the shortKeySize property: Total number of certificates found that have an insecure key size for the key * algorithm. - * + * * @return the shortKeySize value. */ public Long shortKeySize() { @@ -189,20 +197,22 @@ public Long shortKeySize() { /** * Set the shortKeySize property: Total number of certificates found that have an insecure key size for the key * algorithm. - * + * * @param shortKeySize the shortKeySize value to set. - * @return the CryptoCertificateSummaryInner object itself. + * @return the CryptoCertificateSummaryResource object itself. */ - public CryptoCertificateSummaryInner withShortKeySize(Long shortKeySize) { + public CryptoCertificateSummaryResource withShortKeySize(Long shortKeySize) { this.shortKeySize = shortKeySize; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ + @Override public void validate() { + super.validate(); } } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoCertificates.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoCertificates.java new file mode 100644 index 0000000000000..53e1a7467d663 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoCertificates.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** + * Resource collection API of CryptoCertificates. + */ +public interface CryptoCertificates { + /** + * Lists cryptographic certificate analysis results found in a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of crypto certificates as paginated response with {@link PagedIterable}. + */ + PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId); + + /** + * Lists cryptographic certificate analysis results found in a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of crypto certificates as paginated response with {@link PagedIterable}. + */ + PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId, Context context); +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/ComponentList.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoKeyListResult.java similarity index 67% rename from sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/ComponentList.java rename to sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoKeyListResult.java index 61ca6c2e752ae..cd6656fde7f90 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/ComponentList.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoKeyListResult.java @@ -5,41 +5,45 @@ package com.azure.resourcemanager.iotfirmwaredefense.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.ComponentInner; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CryptoKeyResourceInner; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List result for components. */ +/** + * List of crypto keys. + */ @Fluent -public final class ComponentList { +public final class CryptoKeyListResult { /* - * The list of components. + * The list of crypto key results. */ @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; + private List value; /* - * The uri to fetch the next page of asset. + * The uri to fetch the next page of resources. */ @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of ComponentList class. */ - public ComponentList() { + /** + * Creates an instance of CryptoKeyListResult class. + */ + public CryptoKeyListResult() { } /** - * Get the value property: The list of components. - * + * Get the value property: The list of crypto key results. + * * @return the value value. */ - public List value() { + public List value() { return this.value; } /** - * Get the nextLink property: The uri to fetch the next page of asset. - * + * Get the nextLink property: The uri to fetch the next page of resources. + * * @return the nextLink value. */ public String nextLink() { @@ -47,19 +51,19 @@ public String nextLink() { } /** - * Set the nextLink property: The uri to fetch the next page of asset. - * + * Set the nextLink property: The uri to fetch the next page of resources. + * * @param nextLink the nextLink value to set. - * @return the ComponentList object itself. + * @return the CryptoKeyListResult object itself. */ - public ComponentList withNextLink(String nextLink) { + public CryptoKeyListResult withNextLink(String nextLink) { this.nextLink = nextLink; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoKey.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoKeyResource.java similarity index 56% rename from sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoKey.java rename to sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoKeyResource.java index 37f106d18c521..63cbb418bec24 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoKey.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoKeyResource.java @@ -4,71 +4,102 @@ package com.azure.resourcemanager.iotfirmwaredefense.models; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CryptoKeyInner; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CryptoKeyResourceInner; import java.util.List; -/** An immutable client-side representation of CryptoKey. */ -public interface CryptoKey { +/** + * An immutable client-side representation of CryptoKeyResource. + */ +public interface CryptoKeyResource { /** - * Gets the cryptoKeyId property: ID for the key. - * + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the cryptoKeyId property: ID for the key result. + * * @return the cryptoKeyId value. */ String cryptoKeyId(); /** * Gets the keyType property: Type of the key (public or private). - * + * * @return the keyType value. */ String keyType(); /** * Gets the keySize property: Size of the key in bits. - * + * * @return the keySize value. */ Long keySize(); /** * Gets the keyAlgorithm property: Key algorithm name. - * + * * @return the keyAlgorithm value. */ String keyAlgorithm(); /** * Gets the usage property: Functions the key can fulfill. - * + * * @return the usage value. */ List usage(); /** - * Gets the filePaths property: List of files paths for this key. - * + * Gets the filePaths property: List of files where this key was found. + * * @return the filePaths value. */ List filePaths(); /** * Gets the pairedKey property: A matching paired key or certificate. - * + * * @return the pairedKey value. */ PairedKey pairedKey(); /** * Gets the isShortKeySize property: Indicates the key size is considered too small to be secure for the algorithm. - * + * * @return the isShortKeySize value. */ - IsShortKeySize isShortKeySize(); + Boolean isShortKeySize(); /** - * Gets the inner com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CryptoKeyInner object. - * + * Gets the inner com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CryptoKeyResourceInner object. + * * @return the inner object. */ - CryptoKeyInner innerModel(); + CryptoKeyResourceInner innerModel(); } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoKeySummary.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoKeySummary.java deleted file mode 100644 index fe71e0febe2dc..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoKeySummary.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.iotfirmwaredefense.models; - -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CryptoKeySummaryInner; - -/** An immutable client-side representation of CryptoKeySummary. */ -public interface CryptoKeySummary { - /** - * Gets the totalKeys property: Total number of cryptographic keys found. - * - * @return the totalKeys value. - */ - Long totalKeys(); - - /** - * Gets the publicKeys property: Total number of (non-certificate) public keys found. - * - * @return the publicKeys value. - */ - Long publicKeys(); - - /** - * Gets the privateKeys property: Total number of private keys found. - * - * @return the privateKeys value. - */ - Long privateKeys(); - - /** - * Gets the pairedKeys property: Total number of keys found that have a matching paired key or certificate. - * - * @return the pairedKeys value. - */ - Long pairedKeys(); - - /** - * Gets the shortKeySize property: Total number of keys found that have an insecure key size for the algorithm. - * - * @return the shortKeySize value. - */ - Long shortKeySize(); - - /** - * Gets the inner com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CryptoKeySummaryInner object. - * - * @return the inner object. - */ - CryptoKeySummaryInner innerModel(); -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/CryptoKeySummaryInner.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoKeySummaryResource.java similarity index 72% rename from sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/CryptoKeySummaryInner.java rename to sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoKeySummaryResource.java index 8015e4e5e020f..6a558ea9ff908 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/fluent/models/CryptoKeySummaryInner.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoKeySummaryResource.java @@ -2,14 +2,20 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.iotfirmwaredefense.fluent.models; +package com.azure.resourcemanager.iotfirmwaredefense.models; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; - -/** Cryptographic key summary values. */ +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Properties for cryptographic key summary. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "summaryType") +@JsonTypeName("CryptoKey") @Fluent -public final class CryptoKeySummaryInner { +public final class CryptoKeySummaryResource extends SummaryResourceProperties { /* * Total number of cryptographic keys found. */ @@ -40,13 +46,15 @@ public final class CryptoKeySummaryInner { @JsonProperty(value = "shortKeySize") private Long shortKeySize; - /** Creates an instance of CryptoKeySummaryInner class. */ - public CryptoKeySummaryInner() { + /** + * Creates an instance of CryptoKeySummaryResource class. + */ + public CryptoKeySummaryResource() { } /** * Get the totalKeys property: Total number of cryptographic keys found. - * + * * @return the totalKeys value. */ public Long totalKeys() { @@ -55,18 +63,18 @@ public Long totalKeys() { /** * Set the totalKeys property: Total number of cryptographic keys found. - * + * * @param totalKeys the totalKeys value to set. - * @return the CryptoKeySummaryInner object itself. + * @return the CryptoKeySummaryResource object itself. */ - public CryptoKeySummaryInner withTotalKeys(Long totalKeys) { + public CryptoKeySummaryResource withTotalKeys(Long totalKeys) { this.totalKeys = totalKeys; return this; } /** * Get the publicKeys property: Total number of (non-certificate) public keys found. - * + * * @return the publicKeys value. */ public Long publicKeys() { @@ -75,18 +83,18 @@ public Long publicKeys() { /** * Set the publicKeys property: Total number of (non-certificate) public keys found. - * + * * @param publicKeys the publicKeys value to set. - * @return the CryptoKeySummaryInner object itself. + * @return the CryptoKeySummaryResource object itself. */ - public CryptoKeySummaryInner withPublicKeys(Long publicKeys) { + public CryptoKeySummaryResource withPublicKeys(Long publicKeys) { this.publicKeys = publicKeys; return this; } /** * Get the privateKeys property: Total number of private keys found. - * + * * @return the privateKeys value. */ public Long privateKeys() { @@ -95,18 +103,18 @@ public Long privateKeys() { /** * Set the privateKeys property: Total number of private keys found. - * + * * @param privateKeys the privateKeys value to set. - * @return the CryptoKeySummaryInner object itself. + * @return the CryptoKeySummaryResource object itself. */ - public CryptoKeySummaryInner withPrivateKeys(Long privateKeys) { + public CryptoKeySummaryResource withPrivateKeys(Long privateKeys) { this.privateKeys = privateKeys; return this; } /** * Get the pairedKeys property: Total number of keys found that have a matching paired key or certificate. - * + * * @return the pairedKeys value. */ public Long pairedKeys() { @@ -115,18 +123,18 @@ public Long pairedKeys() { /** * Set the pairedKeys property: Total number of keys found that have a matching paired key or certificate. - * + * * @param pairedKeys the pairedKeys value to set. - * @return the CryptoKeySummaryInner object itself. + * @return the CryptoKeySummaryResource object itself. */ - public CryptoKeySummaryInner withPairedKeys(Long pairedKeys) { + public CryptoKeySummaryResource withPairedKeys(Long pairedKeys) { this.pairedKeys = pairedKeys; return this; } /** * Get the shortKeySize property: Total number of keys found that have an insecure key size for the algorithm. - * + * * @return the shortKeySize value. */ public Long shortKeySize() { @@ -135,20 +143,22 @@ public Long shortKeySize() { /** * Set the shortKeySize property: Total number of keys found that have an insecure key size for the algorithm. - * + * * @param shortKeySize the shortKeySize value to set. - * @return the CryptoKeySummaryInner object itself. + * @return the CryptoKeySummaryResource object itself. */ - public CryptoKeySummaryInner withShortKeySize(Long shortKeySize) { + public CryptoKeySummaryResource withShortKeySize(Long shortKeySize) { this.shortKeySize = shortKeySize; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ + @Override public void validate() { + super.validate(); } } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoKeys.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoKeys.java new file mode 100644 index 0000000000000..cee25c52467e6 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoKeys.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** + * Resource collection API of CryptoKeys. + */ +public interface CryptoKeys { + /** + * Lists cryptographic key analysis results found in a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of crypto keys as paginated response with {@link PagedIterable}. + */ + PagedIterable listByFirmware(String resourceGroupName, String workspaceName, String firmwareId); + + /** + * Lists cryptographic key analysis results found in a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of crypto keys as paginated response with {@link PagedIterable}. + */ + PagedIterable listByFirmware(String resourceGroupName, String workspaceName, String firmwareId, + Context context); +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Cve.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Cve.java deleted file mode 100644 index 86387b3b180ec..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Cve.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.iotfirmwaredefense.models; - -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CveInner; -import java.time.OffsetDateTime; -import java.util.List; - -/** An immutable client-side representation of Cve. */ -public interface Cve { - /** - * Gets the cveId property: ID of CVE. - * - * @return the cveId value. - */ - String cveId(); - - /** - * Gets the component property: Component of CVE. - * - * @return the component value. - */ - Object component(); - - /** - * Gets the severity property: Severity of CVE. - * - * @return the severity value. - */ - String severity(); - - /** - * Gets the name property: Name of CVE. - * - * @return the name value. - */ - String name(); - - /** - * Gets the cvssScore property: A single CVSS score to represent the CVE. If a V3 score is specified, then it will - * use the V3 score. Otherwise if the V2 score is specified it will be the V2 score. - * - * @return the cvssScore value. - */ - String cvssScore(); - - /** - * Gets the cvssVersion property: Cvss version of CVE. - * - * @return the cvssVersion value. - */ - String cvssVersion(); - - /** - * Gets the cvssV2Score property: Cvss V2 score of CVE. - * - * @return the cvssV2Score value. - */ - String cvssV2Score(); - - /** - * Gets the cvssV3Score property: Cvss V3 score of CVE. - * - * @return the cvssV3Score value. - */ - String cvssV3Score(); - - /** - * Gets the publishDate property: Publish date of CVE. - * - * @return the publishDate value. - */ - OffsetDateTime publishDate(); - - /** - * Gets the updatedDate property: Updated date of CVE. - * - * @return the updatedDate value. - */ - OffsetDateTime updatedDate(); - - /** - * Gets the links property: The list of CVE links. - * - * @return the links value. - */ - List links(); - - /** - * Gets the description property: Description of CVE. - * - * @return the description value. - */ - String description(); - - /** - * Gets the inner com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CveInner object. - * - * @return the inner object. - */ - CveInner innerModel(); -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CveComponent.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CveComponent.java new file mode 100644 index 0000000000000..78d7643b31128 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CveComponent.java @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Properties of the SBOM component for a CVE. + */ +@Fluent +public final class CveComponent { + /* + * ID of the SBOM component + */ + @JsonProperty(value = "componentId") + private String componentId; + + /* + * Name of the SBOM component + */ + @JsonProperty(value = "name") + private String name; + + /* + * Version of the SBOM component. + */ + @JsonProperty(value = "version") + private String version; + + /** + * Creates an instance of CveComponent class. + */ + public CveComponent() { + } + + /** + * Get the componentId property: ID of the SBOM component. + * + * @return the componentId value. + */ + public String componentId() { + return this.componentId; + } + + /** + * Set the componentId property: ID of the SBOM component. + * + * @param componentId the componentId value to set. + * @return the CveComponent object itself. + */ + public CveComponent withComponentId(String componentId) { + this.componentId = componentId; + return this; + } + + /** + * Get the name property: Name of the SBOM component. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the SBOM component. + * + * @param name the name value to set. + * @return the CveComponent object itself. + */ + public CveComponent withName(String name) { + this.name = name; + return this; + } + + /** + * Get the version property: Version of the SBOM component. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: Version of the SBOM component. + * + * @param version the version value to set. + * @return the CveComponent object itself. + */ + public CveComponent withVersion(String version) { + this.version = version; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CveLink.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CveLink.java index 0869414371857..bb851d0e37ec6 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CveLink.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CveLink.java @@ -7,28 +7,32 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Link for CVE. */ +/** + * Properties of a reference link for a CVE. + */ @Fluent public final class CveLink { /* - * Href of CVE link + * The destination of the reference link. */ @JsonProperty(value = "href") private String href; /* - * Label of CVE link + * The label of the reference link. */ @JsonProperty(value = "label") private String label; - /** Creates an instance of CveLink class. */ + /** + * Creates an instance of CveLink class. + */ public CveLink() { } /** - * Get the href property: Href of CVE link. - * + * Get the href property: The destination of the reference link. + * * @return the href value. */ public String href() { @@ -36,8 +40,8 @@ public String href() { } /** - * Set the href property: Href of CVE link. - * + * Set the href property: The destination of the reference link. + * * @param href the href value to set. * @return the CveLink object itself. */ @@ -47,8 +51,8 @@ public CveLink withHref(String href) { } /** - * Get the label property: Label of CVE link. - * + * Get the label property: The label of the reference link. + * * @return the label value. */ public String label() { @@ -56,8 +60,8 @@ public String label() { } /** - * Set the label property: Label of CVE link. - * + * Set the label property: The label of the reference link. + * * @param label the label value to set. * @return the CveLink object itself. */ @@ -68,7 +72,7 @@ public CveLink withLabel(String label) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CveList.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CveListResult.java similarity index 73% rename from sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CveList.java rename to sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CveListResult.java index 89eba0be3a5b0..90c2817d91097 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CveList.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CveListResult.java @@ -5,41 +5,45 @@ package com.azure.resourcemanager.iotfirmwaredefense.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CveInner; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CveResourceInner; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List result for CVE. */ +/** + * List of CVE results. + */ @Fluent -public final class CveList { +public final class CveListResult { /* * The list of CVE results. */ @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; + private List value; /* - * The uri to fetch the next page of asset. + * The uri to fetch the next page of resources. */ @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of CveList class. */ - public CveList() { + /** + * Creates an instance of CveListResult class. + */ + public CveListResult() { } /** * Get the value property: The list of CVE results. - * + * * @return the value value. */ - public List value() { + public List value() { return this.value; } /** - * Get the nextLink property: The uri to fetch the next page of asset. - * + * Get the nextLink property: The uri to fetch the next page of resources. + * * @return the nextLink value. */ public String nextLink() { @@ -47,19 +51,19 @@ public String nextLink() { } /** - * Set the nextLink property: The uri to fetch the next page of asset. - * + * Set the nextLink property: The uri to fetch the next page of resources. + * * @param nextLink the nextLink value to set. - * @return the CveList object itself. + * @return the CveListResult object itself. */ - public CveList withNextLink(String nextLink) { + public CveListResult withNextLink(String nextLink) { this.nextLink = nextLink; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CveResource.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CveResource.java new file mode 100644 index 0000000000000..e23dafc37dbbf --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CveResource.java @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CveResourceInner; +import java.util.List; + +/** + * An immutable client-side representation of CveResource. + */ +public interface CveResource { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the cveId property: ID of the CVE result. + * + * @return the cveId value. + */ + String cveId(); + + /** + * Gets the component property: The SBOM component for the CVE. + * + * @return the component value. + */ + CveComponent component(); + + /** + * Gets the severity property: Severity of the CVE. + * + * @return the severity value. + */ + String severity(); + + /** + * Gets the namePropertiesName property: Name of the CVE. + * + * @return the namePropertiesName value. + */ + String namePropertiesName(); + + /** + * Gets the cvssScore property: A single CVSS score to represent the CVE. If a V3 score is specified, then it will + * use the V3 score. Otherwise if the V2 score is specified it will be the V2 score. + * + * @return the cvssScore value. + */ + String cvssScore(); + + /** + * Gets the cvssVersion property: CVSS version of the CVE. + * + * @return the cvssVersion value. + */ + String cvssVersion(); + + /** + * Gets the cvssV2Score property: CVSS V2 score of the CVE. + * + * @return the cvssV2Score value. + */ + String cvssV2Score(); + + /** + * Gets the cvssV3Score property: CVSS V3 score of the CVE. + * + * @return the cvssV3Score value. + */ + String cvssV3Score(); + + /** + * Gets the links property: The list of reference links for the CVE. + * + * @return the links value. + */ + List links(); + + /** + * Gets the description property: The CVE description. + * + * @return the description value. + */ + String description(); + + /** + * Gets the inner com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CveResourceInner object. + * + * @return the inner object. + */ + CveResourceInner innerModel(); +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CveSummary.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CveSummary.java index 7927a0b3f22a5..e73a215b54063 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CveSummary.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CveSummary.java @@ -4,56 +4,161 @@ package com.azure.resourcemanager.iotfirmwaredefense.models; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CveSummaryInner; +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Properties for a CVE analysis summary. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "summaryType") +@JsonTypeName("CVE") +@Fluent +public final class CveSummary extends SummaryResourceProperties { + /* + * The total number of critical severity CVEs detected + */ + @JsonProperty(value = "critical") + private Long critical; + + /* + * The total number of high severity CVEs detected + */ + @JsonProperty(value = "high") + private Long high; + + /* + * The total number of medium severity CVEs detected + */ + @JsonProperty(value = "medium") + private Long medium; + + /* + * The total number of low severity CVEs detected + */ + @JsonProperty(value = "low") + private Long low; + + /* + * The total number of unknown severity CVEs detected + */ + @JsonProperty(value = "unknown") + private Long unknown; + + /** + * Creates an instance of CveSummary class. + */ + public CveSummary() { + } -/** An immutable client-side representation of CveSummary. */ -public interface CveSummary { /** - * Gets the critical property: The total number of critical severity CVEs detected. - * + * Get the critical property: The total number of critical severity CVEs detected. + * * @return the critical value. */ - Long critical(); + public Long critical() { + return this.critical; + } /** - * Gets the high property: The total number of high severity CVEs detected. - * + * Set the critical property: The total number of critical severity CVEs detected. + * + * @param critical the critical value to set. + * @return the CveSummary object itself. + */ + public CveSummary withCritical(Long critical) { + this.critical = critical; + return this; + } + + /** + * Get the high property: The total number of high severity CVEs detected. + * * @return the high value. */ - Long high(); + public Long high() { + return this.high; + } + + /** + * Set the high property: The total number of high severity CVEs detected. + * + * @param high the high value to set. + * @return the CveSummary object itself. + */ + public CveSummary withHigh(Long high) { + this.high = high; + return this; + } /** - * Gets the medium property: The total number of medium severity CVEs detected. - * + * Get the medium property: The total number of medium severity CVEs detected. + * * @return the medium value. */ - Long medium(); + public Long medium() { + return this.medium; + } /** - * Gets the low property: The total number of low severity CVEs detected. - * + * Set the medium property: The total number of medium severity CVEs detected. + * + * @param medium the medium value to set. + * @return the CveSummary object itself. + */ + public CveSummary withMedium(Long medium) { + this.medium = medium; + return this; + } + + /** + * Get the low property: The total number of low severity CVEs detected. + * * @return the low value. */ - Long low(); + public Long low() { + return this.low; + } + + /** + * Set the low property: The total number of low severity CVEs detected. + * + * @param low the low value to set. + * @return the CveSummary object itself. + */ + public CveSummary withLow(Long low) { + this.low = low; + return this; + } /** - * Gets the unknown property: The total number of unknown severity CVEs detected. - * + * Get the unknown property: The total number of unknown severity CVEs detected. + * * @return the unknown value. */ - Long unknown(); + public Long unknown() { + return this.unknown; + } /** - * Gets the undefined property: The total number of undefined severity CVEs detected. - * - * @return the undefined value. + * Set the unknown property: The total number of unknown severity CVEs detected. + * + * @param unknown the unknown value to set. + * @return the CveSummary object itself. */ - Long undefined(); + public CveSummary withUnknown(Long unknown) { + this.unknown = unknown; + return this; + } /** - * Gets the inner com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CveSummaryInner object. - * - * @return the inner object. + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. */ - CveSummaryInner innerModel(); + @Override + public void validate() { + super.validate(); + } } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Cves.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Cves.java new file mode 100644 index 0000000000000..a3f1a3213e0d1 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Cves.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** + * Resource collection API of Cves. + */ +public interface Cves { + /** + * Lists CVE analysis results of a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of CVE results as paginated response with {@link PagedIterable}. + */ + PagedIterable listByFirmware(String resourceGroupName, String workspaceName, String firmwareId); + + /** + * Lists CVE analysis results of a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of CVE results as paginated response with {@link PagedIterable}. + */ + PagedIterable listByFirmware(String resourceGroupName, String workspaceName, String firmwareId, + Context context); +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Firmware.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Firmware.java index 4af43d6957b75..825bf6bf8da39 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Firmware.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Firmware.java @@ -4,136 +4,145 @@ package com.azure.resourcemanager.iotfirmwaredefense.models; -import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.FirmwareInner; import java.util.List; -/** An immutable client-side representation of Firmware. */ +/** + * An immutable client-side representation of Firmware. + */ public interface Firmware { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the fileName property: File name for a firmware that user uploaded. - * + * * @return the fileName value. */ String fileName(); /** * Gets the vendor property: Firmware vendor. - * + * * @return the vendor value. */ String vendor(); /** * Gets the model property: Firmware model. - * + * * @return the model value. */ String model(); /** * Gets the version property: Firmware version. - * + * * @return the version value. */ String version(); /** * Gets the description property: User-specified description of the firmware. - * + * * @return the description value. */ String description(); /** * Gets the fileSize property: File size of the uploaded firmware image. - * + * * @return the fileSize value. */ Long fileSize(); /** * Gets the status property: The status of firmware scan. - * + * * @return the status value. */ Status status(); /** * Gets the statusMessages property: A list of errors or other messages generated during firmware analysis. - * + * * @return the statusMessages value. */ - List statusMessages(); + List statusMessages(); /** * Gets the provisioningState property: Provisioning state of the resource. - * + * * @return the provisioningState value. */ ProvisioningState provisioningState(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.iotfirmwaredefense.fluent.models.FirmwareInner object. - * + * * @return the inner object. */ FirmwareInner innerModel(); - /** The entirety of the Firmware definition. */ + /** + * The entirety of the Firmware definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The Firmware definition stages. */ + /** + * The Firmware definition stages. + */ interface DefinitionStages { - /** The first stage of the Firmware definition. */ + /** + * The first stage of the Firmware definition. + */ interface Blank extends WithParentResource { } - /** The stage of the Firmware definition allowing to specify parent resource. */ + /** + * The stage of the Firmware definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, workspaceName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @return the next definition stage. @@ -145,256 +154,280 @@ interface WithParentResource { * The stage of the Firmware 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.WithFileName, - DefinitionStages.WithVendor, - DefinitionStages.WithModel, - DefinitionStages.WithVersion, - DefinitionStages.WithDescription, - DefinitionStages.WithFileSize, - DefinitionStages.WithStatus, - DefinitionStages.WithStatusMessages { + interface WithCreate extends DefinitionStages.WithFileName, DefinitionStages.WithVendor, + DefinitionStages.WithModel, DefinitionStages.WithVersion, DefinitionStages.WithDescription, + DefinitionStages.WithFileSize, DefinitionStages.WithStatus, DefinitionStages.WithStatusMessages { /** * Executes the create request. - * + * * @return the created resource. */ Firmware create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ Firmware create(Context context); } - /** The stage of the Firmware definition allowing to specify fileName. */ + /** + * The stage of the Firmware definition allowing to specify fileName. + */ interface WithFileName { /** * Specifies the fileName property: File name for a firmware that user uploaded.. - * + * * @param fileName File name for a firmware that user uploaded. * @return the next definition stage. */ WithCreate withFileName(String fileName); } - /** The stage of the Firmware definition allowing to specify vendor. */ + /** + * The stage of the Firmware definition allowing to specify vendor. + */ interface WithVendor { /** * Specifies the vendor property: Firmware vendor.. - * + * * @param vendor Firmware vendor. * @return the next definition stage. */ WithCreate withVendor(String vendor); } - /** The stage of the Firmware definition allowing to specify model. */ + /** + * The stage of the Firmware definition allowing to specify model. + */ interface WithModel { /** * Specifies the model property: Firmware model.. - * + * * @param model Firmware model. * @return the next definition stage. */ WithCreate withModel(String model); } - /** The stage of the Firmware definition allowing to specify version. */ + /** + * The stage of the Firmware definition allowing to specify version. + */ interface WithVersion { /** * Specifies the version property: Firmware version.. - * + * * @param version Firmware version. * @return the next definition stage. */ WithCreate withVersion(String version); } - /** The stage of the Firmware definition allowing to specify description. */ + /** + * The stage of the Firmware definition allowing to specify description. + */ interface WithDescription { /** * Specifies the description property: User-specified description of the firmware.. - * + * * @param description User-specified description of the firmware. * @return the next definition stage. */ WithCreate withDescription(String description); } - /** The stage of the Firmware definition allowing to specify fileSize. */ + /** + * The stage of the Firmware definition allowing to specify fileSize. + */ interface WithFileSize { /** * Specifies the fileSize property: File size of the uploaded firmware image.. - * + * * @param fileSize File size of the uploaded firmware image. * @return the next definition stage. */ WithCreate withFileSize(Long fileSize); } - /** The stage of the Firmware definition allowing to specify status. */ + /** + * The stage of the Firmware definition allowing to specify status. + */ interface WithStatus { /** * Specifies the status property: The status of firmware scan.. - * + * * @param status The status of firmware scan. * @return the next definition stage. */ WithCreate withStatus(Status status); } - /** The stage of the Firmware definition allowing to specify statusMessages. */ + /** + * The stage of the Firmware definition allowing to specify statusMessages. + */ interface WithStatusMessages { /** * Specifies the statusMessages property: A list of errors or other messages generated during firmware * analysis. - * + * * @param statusMessages A list of errors or other messages generated during firmware analysis. * @return the next definition stage. */ - WithCreate withStatusMessages(List statusMessages); + WithCreate withStatusMessages(List statusMessages); } } /** * Begins update for the Firmware resource. - * + * * @return the stage of resource update. */ Firmware.Update update(); - /** The template for Firmware update. */ - interface Update - extends UpdateStages.WithFileName, - UpdateStages.WithVendor, - UpdateStages.WithModel, - UpdateStages.WithVersion, - UpdateStages.WithDescription, - UpdateStages.WithFileSize, - UpdateStages.WithStatus, - UpdateStages.WithStatusMessages { + /** + * The template for Firmware update. + */ + interface Update extends UpdateStages.WithFileName, UpdateStages.WithVendor, UpdateStages.WithModel, + UpdateStages.WithVersion, UpdateStages.WithDescription, UpdateStages.WithFileSize, UpdateStages.WithStatus, + UpdateStages.WithStatusMessages { /** * Executes the update request. - * + * * @return the updated resource. */ Firmware apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ Firmware apply(Context context); } - /** The Firmware update stages. */ + /** + * The Firmware update stages. + */ interface UpdateStages { - /** The stage of the Firmware update allowing to specify fileName. */ + /** + * The stage of the Firmware update allowing to specify fileName. + */ interface WithFileName { /** * Specifies the fileName property: File name for a firmware that user uploaded.. - * + * * @param fileName File name for a firmware that user uploaded. * @return the next definition stage. */ Update withFileName(String fileName); } - /** The stage of the Firmware update allowing to specify vendor. */ + /** + * The stage of the Firmware update allowing to specify vendor. + */ interface WithVendor { /** * Specifies the vendor property: Firmware vendor.. - * + * * @param vendor Firmware vendor. * @return the next definition stage. */ Update withVendor(String vendor); } - /** The stage of the Firmware update allowing to specify model. */ + /** + * The stage of the Firmware update allowing to specify model. + */ interface WithModel { /** * Specifies the model property: Firmware model.. - * + * * @param model Firmware model. * @return the next definition stage. */ Update withModel(String model); } - /** The stage of the Firmware update allowing to specify version. */ + /** + * The stage of the Firmware update allowing to specify version. + */ interface WithVersion { /** * Specifies the version property: Firmware version.. - * + * * @param version Firmware version. * @return the next definition stage. */ Update withVersion(String version); } - /** The stage of the Firmware update allowing to specify description. */ + /** + * The stage of the Firmware update allowing to specify description. + */ interface WithDescription { /** * Specifies the description property: User-specified description of the firmware.. - * + * * @param description User-specified description of the firmware. * @return the next definition stage. */ Update withDescription(String description); } - /** The stage of the Firmware update allowing to specify fileSize. */ + /** + * The stage of the Firmware update allowing to specify fileSize. + */ interface WithFileSize { /** * Specifies the fileSize property: File size of the uploaded firmware image.. - * + * * @param fileSize File size of the uploaded firmware image. * @return the next definition stage. */ Update withFileSize(Long fileSize); } - /** The stage of the Firmware update allowing to specify status. */ + /** + * The stage of the Firmware update allowing to specify status. + */ interface WithStatus { /** * Specifies the status property: The status of firmware scan.. - * + * * @param status The status of firmware scan. * @return the next definition stage. */ Update withStatus(Status status); } - /** The stage of the Firmware update allowing to specify statusMessages. */ + /** + * The stage of the Firmware update allowing to specify statusMessages. + */ interface WithStatusMessages { /** * Specifies the statusMessages property: A list of errors or other messages generated during firmware * analysis. - * + * * @param statusMessages A list of errors or other messages generated during firmware analysis. * @return the next definition stage. */ - Update withStatusMessages(List statusMessages); + Update withStatusMessages(List statusMessages); } } /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ Firmware refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ @@ -402,7 +435,7 @@ interface WithStatusMessages { /** * The operation to a url for file download. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -413,7 +446,7 @@ interface WithStatusMessages { /** * The operation to a url for file download. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return url data for creating or accessing a blob file. @@ -422,7 +455,7 @@ interface WithStatusMessages { /** * The operation to a url for tar file download. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -433,274 +466,10 @@ interface WithStatusMessages { /** * The operation to a url for tar file download. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return url data for creating or accessing a blob file. */ UrlToken generateFilesystemDownloadUrl(); - - /** - * The operation to get a scan summary. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return summary result after scanning the firmware along with {@link Response}. - */ - Response generateSummaryWithResponse(Context context); - - /** - * The operation to get a scan summary. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return summary result after scanning the firmware. - */ - FirmwareSummary generateSummary(); - - /** - * The operation to list all components result for a firmware. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list result for components as paginated response with {@link PagedIterable}. - */ - PagedIterable listGenerateComponentList(); - - /** - * The operation to list all components result for a firmware. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list result for components as paginated response with {@link PagedIterable}. - */ - PagedIterable listGenerateComponentList(Context context); - - /** - * The operation to get component details for a firmware. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return component of a firmware along with {@link Response}. - */ - Response generateComponentDetailsWithResponse(Context context); - - /** - * The operation to get component details for a firmware. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return component of a firmware. - */ - Component generateComponentDetails(); - - /** - * The operation to list all binary hardening result for a firmware. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list result for binary hardening as paginated response with {@link PagedIterable}. - */ - PagedIterable listGenerateBinaryHardeningList(); - - /** - * The operation to list all binary hardening result for a firmware. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list result for binary hardening as paginated response with {@link PagedIterable}. - */ - PagedIterable listGenerateBinaryHardeningList(Context context); - - /** - * The operation to list the binary hardening summary percentages for a firmware. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return binary hardening summary percentages along with {@link Response}. - */ - Response generateBinaryHardeningSummaryWithResponse(Context context); - - /** - * The operation to list the binary hardening summary percentages for a firmware. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return binary hardening summary percentages. - */ - BinaryHardeningSummary generateBinaryHardeningSummary(); - - /** - * The operation to get binary hardening details for a firmware. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return binary hardening of a firmware along with {@link Response}. - */ - Response generateBinaryHardeningDetailsWithResponse(Context context); - - /** - * The operation to get binary hardening details for a firmware. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return binary hardening of a firmware. - */ - BinaryHardening generateBinaryHardeningDetails(); - - /** - * The operation to list all password hashes for a firmware. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return password hashes list as paginated response with {@link PagedIterable}. - */ - PagedIterable listGeneratePasswordHashList(); - - /** - * The operation to list all password hashes for a firmware. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return password hashes list as paginated response with {@link PagedIterable}. - */ - PagedIterable listGeneratePasswordHashList(Context context); - - /** - * The operation to list all cve results for a firmware. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list result for CVE as paginated response with {@link PagedIterable}. - */ - PagedIterable listGenerateCveList(); - - /** - * The operation to list all cve results for a firmware. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list result for CVE as paginated response with {@link PagedIterable}. - */ - PagedIterable listGenerateCveList(Context context); - - /** - * The operation to provide a high level summary of the CVEs reported for the firmware image. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cVE summary values along with {@link Response}. - */ - Response generateCveSummaryWithResponse(Context context); - - /** - * The operation to provide a high level summary of the CVEs reported for the firmware image. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cVE summary values. - */ - CveSummary generateCveSummary(); - - /** - * The operation to provide a high level summary of the discovered cryptographic certificates reported for the - * firmware image. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cryptographic certificate summary values along with {@link Response}. - */ - Response generateCryptoCertificateSummaryWithResponse(Context context); - - /** - * The operation to provide a high level summary of the discovered cryptographic certificates reported for the - * firmware image. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cryptographic certificate summary values. - */ - CryptoCertificateSummary generateCryptoCertificateSummary(); - - /** - * The operation to provide a high level summary of the discovered cryptographic keys reported for the firmware - * image. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cryptographic key summary values along with {@link Response}. - */ - Response generateCryptoKeySummaryWithResponse(Context context); - - /** - * The operation to provide a high level summary of the discovered cryptographic keys reported for the firmware - * image. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cryptographic key summary values. - */ - CryptoKeySummary generateCryptoKeySummary(); - - /** - * The operation to list all crypto certificates for a firmware. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return crypto certificates list as paginated response with {@link PagedIterable}. - */ - PagedIterable listGenerateCryptoCertificateList(); - - /** - * The operation to list all crypto certificates for a firmware. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return crypto certificates list as paginated response with {@link PagedIterable}. - */ - PagedIterable listGenerateCryptoCertificateList(Context context); - - /** - * The operation to list all crypto keys for a firmware. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return crypto keys list as paginated response with {@link PagedIterable}. - */ - PagedIterable listGenerateCryptoKeyList(); - - /** - * The operation to list all crypto keys for a firmware. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return crypto keys list as paginated response with {@link PagedIterable}. - */ - PagedIterable listGenerateCryptoKeyList(Context context); } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/FirmwareList.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/FirmwareList.java index 1467872db56e9..00617e6002cdd 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/FirmwareList.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/FirmwareList.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List of firmwares. */ +/** + * List of firmwares. + */ @Fluent public final class FirmwareList { /* @@ -24,13 +26,15 @@ public final class FirmwareList { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of FirmwareList class. */ + /** + * Creates an instance of FirmwareList class. + */ public FirmwareList() { } /** * Get the value property: The list of firmwares. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Get the nextLink property: The uri to fetch the next page of asset. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +52,7 @@ public String nextLink() { /** * Set the nextLink property: The uri to fetch the next page of asset. - * + * * @param nextLink the nextLink value to set. * @return the FirmwareList object itself. */ @@ -59,7 +63,7 @@ public FirmwareList withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/FirmwareSummary.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/FirmwareSummary.java index 51ba31089a98f..7a6c0208f8c09 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/FirmwareSummary.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/FirmwareSummary.java @@ -4,63 +4,213 @@ package com.azure.resourcemanager.iotfirmwaredefense.models; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.FirmwareSummaryInner; +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Properties for high level summary of firmware analysis results. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "summaryType") +@JsonTypeName("Firmware") +@Fluent +public final class FirmwareSummary extends SummaryResourceProperties { + /* + * Total extracted size of the firmware in bytes. + */ + @JsonProperty(value = "extractedSize") + private Long extractedSize; + + /* + * Firmware file size in bytes. + */ + @JsonProperty(value = "fileSize") + private Long fileSize; + + /* + * Extracted file count. + */ + @JsonProperty(value = "extractedFileCount") + private Long extractedFileCount; + + /* + * Components count. + */ + @JsonProperty(value = "componentCount") + private Long componentCount; + + /* + * Binary count + */ + @JsonProperty(value = "binaryCount") + private Long binaryCount; + + /* + * Time used for analysis + */ + @JsonProperty(value = "analysisTimeSeconds") + private Long analysisTimeSeconds; + + /* + * The number of root file systems found. + */ + @JsonProperty(value = "rootFileSystems") + private Long rootFileSystems; -/** An immutable client-side representation of FirmwareSummary. */ -public interface FirmwareSummary { /** - * Gets the extractedSize property: Total extracted size of the firmware in bytes. - * + * Creates an instance of FirmwareSummary class. + */ + public FirmwareSummary() { + } + + /** + * Get the extractedSize property: Total extracted size of the firmware in bytes. + * * @return the extractedSize value. */ - Long extractedSize(); + public Long extractedSize() { + return this.extractedSize; + } + + /** + * Set the extractedSize property: Total extracted size of the firmware in bytes. + * + * @param extractedSize the extractedSize value to set. + * @return the FirmwareSummary object itself. + */ + public FirmwareSummary withExtractedSize(Long extractedSize) { + this.extractedSize = extractedSize; + return this; + } /** - * Gets the fileSize property: Firmware file size in bytes. - * + * Get the fileSize property: Firmware file size in bytes. + * * @return the fileSize value. */ - Long fileSize(); + public Long fileSize() { + return this.fileSize; + } /** - * Gets the extractedFileCount property: Extracted file count. - * + * Set the fileSize property: Firmware file size in bytes. + * + * @param fileSize the fileSize value to set. + * @return the FirmwareSummary object itself. + */ + public FirmwareSummary withFileSize(Long fileSize) { + this.fileSize = fileSize; + return this; + } + + /** + * Get the extractedFileCount property: Extracted file count. + * * @return the extractedFileCount value. */ - Long extractedFileCount(); + public Long extractedFileCount() { + return this.extractedFileCount; + } + + /** + * Set the extractedFileCount property: Extracted file count. + * + * @param extractedFileCount the extractedFileCount value to set. + * @return the FirmwareSummary object itself. + */ + public FirmwareSummary withExtractedFileCount(Long extractedFileCount) { + this.extractedFileCount = extractedFileCount; + return this; + } /** - * Gets the componentCount property: Components count. - * + * Get the componentCount property: Components count. + * * @return the componentCount value. */ - Long componentCount(); + public Long componentCount() { + return this.componentCount; + } + + /** + * Set the componentCount property: Components count. + * + * @param componentCount the componentCount value to set. + * @return the FirmwareSummary object itself. + */ + public FirmwareSummary withComponentCount(Long componentCount) { + this.componentCount = componentCount; + return this; + } /** - * Gets the binaryCount property: Binary count. - * + * Get the binaryCount property: Binary count. + * * @return the binaryCount value. */ - Long binaryCount(); + public Long binaryCount() { + return this.binaryCount; + } /** - * Gets the analysisTimeSeconds property: Time used for analysis. - * + * Set the binaryCount property: Binary count. + * + * @param binaryCount the binaryCount value to set. + * @return the FirmwareSummary object itself. + */ + public FirmwareSummary withBinaryCount(Long binaryCount) { + this.binaryCount = binaryCount; + return this; + } + + /** + * Get the analysisTimeSeconds property: Time used for analysis. + * * @return the analysisTimeSeconds value. */ - Long analysisTimeSeconds(); + public Long analysisTimeSeconds() { + return this.analysisTimeSeconds; + } /** - * Gets the rootFileSystems property: The number of root file systems found. - * + * Set the analysisTimeSeconds property: Time used for analysis. + * + * @param analysisTimeSeconds the analysisTimeSeconds value to set. + * @return the FirmwareSummary object itself. + */ + public FirmwareSummary withAnalysisTimeSeconds(Long analysisTimeSeconds) { + this.analysisTimeSeconds = analysisTimeSeconds; + return this; + } + + /** + * Get the rootFileSystems property: The number of root file systems found. + * * @return the rootFileSystems value. */ - Long rootFileSystems(); + public Long rootFileSystems() { + return this.rootFileSystems; + } + + /** + * Set the rootFileSystems property: The number of root file systems found. + * + * @param rootFileSystems the rootFileSystems value to set. + * @return the FirmwareSummary object itself. + */ + public FirmwareSummary withRootFileSystems(Long rootFileSystems) { + this.rootFileSystems = rootFileSystems; + return this; + } /** - * Gets the inner com.azure.resourcemanager.iotfirmwaredefense.fluent.models.FirmwareSummaryInner object. - * - * @return the inner object. + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. */ - FirmwareSummaryInner innerModel(); + @Override + public void validate() { + super.validate(); + } } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/FirmwareUpdateDefinition.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/FirmwareUpdateDefinition.java index 8a00b46ef265b..6eb4015d2c16d 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/FirmwareUpdateDefinition.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/FirmwareUpdateDefinition.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Firmware definition. */ +/** + * Firmware definition. + */ @Fluent public final class FirmwareUpdateDefinition { /* @@ -18,13 +20,15 @@ public final class FirmwareUpdateDefinition { @JsonProperty(value = "properties") private FirmwareProperties innerProperties; - /** Creates an instance of FirmwareUpdateDefinition class. */ + /** + * Creates an instance of FirmwareUpdateDefinition class. + */ public FirmwareUpdateDefinition() { } /** * Get the innerProperties property: The editable properties of a firmware. - * + * * @return the innerProperties value. */ private FirmwareProperties innerProperties() { @@ -33,7 +37,7 @@ private FirmwareProperties innerProperties() { /** * Get the fileName property: File name for a firmware that user uploaded. - * + * * @return the fileName value. */ public String fileName() { @@ -42,7 +46,7 @@ public String fileName() { /** * Set the fileName property: File name for a firmware that user uploaded. - * + * * @param fileName the fileName value to set. * @return the FirmwareUpdateDefinition object itself. */ @@ -56,7 +60,7 @@ public FirmwareUpdateDefinition withFileName(String fileName) { /** * Get the vendor property: Firmware vendor. - * + * * @return the vendor value. */ public String vendor() { @@ -65,7 +69,7 @@ public String vendor() { /** * Set the vendor property: Firmware vendor. - * + * * @param vendor the vendor value to set. * @return the FirmwareUpdateDefinition object itself. */ @@ -79,7 +83,7 @@ public FirmwareUpdateDefinition withVendor(String vendor) { /** * Get the model property: Firmware model. - * + * * @return the model value. */ public String model() { @@ -88,7 +92,7 @@ public String model() { /** * Set the model property: Firmware model. - * + * * @param model the model value to set. * @return the FirmwareUpdateDefinition object itself. */ @@ -102,7 +106,7 @@ public FirmwareUpdateDefinition withModel(String model) { /** * Get the version property: Firmware version. - * + * * @return the version value. */ public String version() { @@ -111,7 +115,7 @@ public String version() { /** * Set the version property: Firmware version. - * + * * @param version the version value to set. * @return the FirmwareUpdateDefinition object itself. */ @@ -125,7 +129,7 @@ public FirmwareUpdateDefinition withVersion(String version) { /** * Get the description property: User-specified description of the firmware. - * + * * @return the description value. */ public String description() { @@ -134,7 +138,7 @@ public String description() { /** * Set the description property: User-specified description of the firmware. - * + * * @param description the description value to set. * @return the FirmwareUpdateDefinition object itself. */ @@ -148,7 +152,7 @@ public FirmwareUpdateDefinition withDescription(String description) { /** * Get the fileSize property: File size of the uploaded firmware image. - * + * * @return the fileSize value. */ public Long fileSize() { @@ -157,7 +161,7 @@ public Long fileSize() { /** * Set the fileSize property: File size of the uploaded firmware image. - * + * * @param fileSize the fileSize value to set. * @return the FirmwareUpdateDefinition object itself. */ @@ -171,7 +175,7 @@ public FirmwareUpdateDefinition withFileSize(Long fileSize) { /** * Get the status property: The status of firmware scan. - * + * * @return the status value. */ public Status status() { @@ -180,7 +184,7 @@ public Status status() { /** * Set the status property: The status of firmware scan. - * + * * @param status the status value to set. * @return the FirmwareUpdateDefinition object itself. */ @@ -194,20 +198,20 @@ public FirmwareUpdateDefinition withStatus(Status status) { /** * Get the statusMessages property: A list of errors or other messages generated during firmware analysis. - * + * * @return the statusMessages value. */ - public List statusMessages() { + public List statusMessages() { return this.innerProperties() == null ? null : this.innerProperties().statusMessages(); } /** * Set the statusMessages property: A list of errors or other messages generated during firmware analysis. - * + * * @param statusMessages the statusMessages value to set. * @return the FirmwareUpdateDefinition object itself. */ - public FirmwareUpdateDefinition withStatusMessages(List statusMessages) { + public FirmwareUpdateDefinition withStatusMessages(List statusMessages) { if (this.innerProperties() == null) { this.innerProperties = new FirmwareProperties(); } @@ -217,7 +221,7 @@ public FirmwareUpdateDefinition withStatusMessages(List statusMessages) /** * Get the provisioningState property: Provisioning state of the resource. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -226,7 +230,7 @@ public ProvisioningState provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Firmwares.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Firmwares.java index 093ff7015c12b..2b7295d4febde 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Firmwares.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Firmwares.java @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Firmwares. */ +/** + * Resource collection API of Firmwares. + */ public interface Firmwares { /** * Lists all of firmwares inside a workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -24,7 +26,7 @@ public interface Firmwares { /** * Lists all of firmwares inside a workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param context The context to associate with this operation. @@ -37,7 +39,7 @@ public interface Firmwares { /** * The operation to delete a firmware. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -47,12 +49,12 @@ public interface Firmwares { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String firmwareId, Context context); + Response deleteWithResponse(String resourceGroupName, String workspaceName, String firmwareId, + Context context); /** * The operation to delete a firmware. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -64,7 +66,7 @@ Response deleteWithResponse( /** * Get firmware. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -74,12 +76,12 @@ Response deleteWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return firmware along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String firmwareId, Context context); + Response getWithResponse(String resourceGroupName, String workspaceName, String firmwareId, + Context context); /** * Get firmware. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -92,7 +94,7 @@ Response getWithResponse( /** * The operation to a url for file download. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -102,12 +104,12 @@ Response getWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return url data for creating or accessing a blob file along with {@link Response}. */ - Response generateDownloadUrlWithResponse( - String resourceGroupName, String workspaceName, String firmwareId, Context context); + Response generateDownloadUrlWithResponse(String resourceGroupName, String workspaceName, + String firmwareId, Context context); /** * The operation to a url for file download. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -120,7 +122,7 @@ Response generateDownloadUrlWithResponse( /** * The operation to a url for tar file download. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -130,12 +132,12 @@ Response generateDownloadUrlWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return url data for creating or accessing a blob file along with {@link Response}. */ - Response generateFilesystemDownloadUrlWithResponse( - String resourceGroupName, String workspaceName, String firmwareId, Context context); + Response generateFilesystemDownloadUrlWithResponse(String resourceGroupName, String workspaceName, + String firmwareId, Context context); /** * The operation to a url for tar file download. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param firmwareId The id of the firmware. @@ -146,384 +148,9 @@ Response generateFilesystemDownloadUrlWithResponse( */ UrlToken generateFilesystemDownloadUrl(String resourceGroupName, String workspaceName, String firmwareId); - /** - * The operation to get a scan summary. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return summary result after scanning the firmware along with {@link Response}. - */ - Response generateSummaryWithResponse( - String resourceGroupName, String workspaceName, String firmwareId, Context context); - - /** - * The operation to get a scan summary. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return summary result after scanning the firmware. - */ - FirmwareSummary generateSummary(String resourceGroupName, String workspaceName, String firmwareId); - - /** - * The operation to list all components result for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list result for components as paginated response with {@link PagedIterable}. - */ - PagedIterable listGenerateComponentList( - String resourceGroupName, String workspaceName, String firmwareId); - - /** - * The operation to list all components result for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list result for components as paginated response with {@link PagedIterable}. - */ - PagedIterable listGenerateComponentList( - String resourceGroupName, String workspaceName, String firmwareId, Context context); - - /** - * The operation to get component details for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return component of a firmware along with {@link Response}. - */ - Response generateComponentDetailsWithResponse( - String resourceGroupName, String workspaceName, String firmwareId, Context context); - - /** - * The operation to get component details for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return component of a firmware. - */ - Component generateComponentDetails(String resourceGroupName, String workspaceName, String firmwareId); - - /** - * The operation to list all binary hardening result for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list result for binary hardening as paginated response with {@link PagedIterable}. - */ - PagedIterable listGenerateBinaryHardeningList( - String resourceGroupName, String workspaceName, String firmwareId); - - /** - * The operation to list all binary hardening result for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list result for binary hardening as paginated response with {@link PagedIterable}. - */ - PagedIterable listGenerateBinaryHardeningList( - String resourceGroupName, String workspaceName, String firmwareId, Context context); - - /** - * The operation to list the binary hardening summary percentages for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return binary hardening summary percentages along with {@link Response}. - */ - Response generateBinaryHardeningSummaryWithResponse( - String resourceGroupName, String workspaceName, String firmwareId, Context context); - - /** - * The operation to list the binary hardening summary percentages for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return binary hardening summary percentages. - */ - BinaryHardeningSummary generateBinaryHardeningSummary( - String resourceGroupName, String workspaceName, String firmwareId); - - /** - * The operation to get binary hardening details for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return binary hardening of a firmware along with {@link Response}. - */ - Response generateBinaryHardeningDetailsWithResponse( - String resourceGroupName, String workspaceName, String firmwareId, Context context); - - /** - * The operation to get binary hardening details for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return binary hardening of a firmware. - */ - BinaryHardening generateBinaryHardeningDetails(String resourceGroupName, String workspaceName, String firmwareId); - - /** - * The operation to list all password hashes for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return password hashes list as paginated response with {@link PagedIterable}. - */ - PagedIterable listGeneratePasswordHashList( - String resourceGroupName, String workspaceName, String firmwareId); - - /** - * The operation to list all password hashes for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return password hashes list as paginated response with {@link PagedIterable}. - */ - PagedIterable listGeneratePasswordHashList( - String resourceGroupName, String workspaceName, String firmwareId, Context context); - - /** - * The operation to list all cve results for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list result for CVE as paginated response with {@link PagedIterable}. - */ - PagedIterable listGenerateCveList(String resourceGroupName, String workspaceName, String firmwareId); - - /** - * The operation to list all cve results for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list result for CVE as paginated response with {@link PagedIterable}. - */ - PagedIterable listGenerateCveList( - String resourceGroupName, String workspaceName, String firmwareId, Context context); - - /** - * The operation to provide a high level summary of the CVEs reported for the firmware image. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cVE summary values along with {@link Response}. - */ - Response generateCveSummaryWithResponse( - String resourceGroupName, String workspaceName, String firmwareId, Context context); - - /** - * The operation to provide a high level summary of the CVEs reported for the firmware image. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cVE summary values. - */ - CveSummary generateCveSummary(String resourceGroupName, String workspaceName, String firmwareId); - - /** - * The operation to provide a high level summary of the discovered cryptographic certificates reported for the - * firmware image. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cryptographic certificate summary values along with {@link Response}. - */ - Response generateCryptoCertificateSummaryWithResponse( - String resourceGroupName, String workspaceName, String firmwareId, Context context); - - /** - * The operation to provide a high level summary of the discovered cryptographic certificates reported for the - * firmware image. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cryptographic certificate summary values. - */ - CryptoCertificateSummary generateCryptoCertificateSummary( - String resourceGroupName, String workspaceName, String firmwareId); - - /** - * The operation to provide a high level summary of the discovered cryptographic keys reported for the firmware - * image. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cryptographic key summary values along with {@link Response}. - */ - Response generateCryptoKeySummaryWithResponse( - String resourceGroupName, String workspaceName, String firmwareId, Context context); - - /** - * The operation to provide a high level summary of the discovered cryptographic keys reported for the firmware - * image. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cryptographic key summary values. - */ - CryptoKeySummary generateCryptoKeySummary(String resourceGroupName, String workspaceName, String firmwareId); - - /** - * The operation to list all crypto certificates for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return crypto certificates list as paginated response with {@link PagedIterable}. - */ - PagedIterable listGenerateCryptoCertificateList( - String resourceGroupName, String workspaceName, String firmwareId); - - /** - * The operation to list all crypto certificates for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return crypto certificates list as paginated response with {@link PagedIterable}. - */ - PagedIterable listGenerateCryptoCertificateList( - String resourceGroupName, String workspaceName, String firmwareId, Context context); - - /** - * The operation to list all crypto keys for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return crypto keys list as paginated response with {@link PagedIterable}. - */ - PagedIterable listGenerateCryptoKeyList( - String resourceGroupName, String workspaceName, String firmwareId); - - /** - * The operation to list all crypto keys for a firmware. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the firmware analysis workspace. - * @param firmwareId The id of the firmware. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return crypto keys list as paginated response with {@link PagedIterable}. - */ - PagedIterable listGenerateCryptoKeyList( - String resourceGroupName, String workspaceName, String firmwareId, Context context); - /** * Get firmware. - * + * * @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. @@ -534,7 +161,7 @@ PagedIterable listGenerateCryptoKeyList( /** * Get firmware. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -546,7 +173,7 @@ PagedIterable listGenerateCryptoKeyList( /** * The operation to delete a firmware. - * + * * @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. @@ -556,7 +183,7 @@ PagedIterable listGenerateCryptoKeyList( /** * The operation to delete a firmware. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -568,7 +195,7 @@ PagedIterable listGenerateCryptoKeyList( /** * Begins definition for a new Firmware resource. - * + * * @param name resource name. * @return the first stage of the new Firmware definition. */ diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/GenerateUploadUrlRequest.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/GenerateUploadUrlRequest.java index 85f8fad0c1a74..bdcfd6a4d151b 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/GenerateUploadUrlRequest.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/GenerateUploadUrlRequest.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Properties for generating an upload URL. */ +/** + * Properties for generating an upload URL. + */ @Fluent public final class GenerateUploadUrlRequest { /* @@ -16,13 +18,15 @@ public final class GenerateUploadUrlRequest { @JsonProperty(value = "firmwareId") private String firmwareId; - /** Creates an instance of GenerateUploadUrlRequest class. */ + /** + * Creates an instance of GenerateUploadUrlRequest class. + */ public GenerateUploadUrlRequest() { } /** * Get the firmwareId property: A unique ID for the firmware to be uploaded. - * + * * @return the firmwareId value. */ public String firmwareId() { @@ -31,7 +35,7 @@ public String firmwareId() { /** * Set the firmwareId property: A unique ID for the firmware to be uploaded. - * + * * @param firmwareId the firmwareId value to set. * @return the GenerateUploadUrlRequest object itself. */ @@ -42,7 +46,7 @@ public GenerateUploadUrlRequest withFirmwareId(String firmwareId) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/IsExpired.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/IsExpired.java deleted file mode 100644 index 691c16e148aca..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/IsExpired.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.iotfirmwaredefense.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Indicates if the certificate is expired. */ -public final class IsExpired extends ExpandableStringEnum { - /** Static value True for IsExpired. */ - public static final IsExpired TRUE = fromString("True"); - - /** Static value False for IsExpired. */ - public static final IsExpired FALSE = fromString("False"); - - /** - * Creates a new instance of IsExpired value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public IsExpired() { - } - - /** - * Creates or finds a IsExpired from its string representation. - * - * @param name a name to look for. - * @return the corresponding IsExpired. - */ - @JsonCreator - public static IsExpired fromString(String name) { - return fromString(name, IsExpired.class); - } - - /** - * Gets known IsExpired values. - * - * @return known IsExpired values. - */ - public static Collection values() { - return values(IsExpired.class); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/IsSelfSigned.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/IsSelfSigned.java deleted file mode 100644 index b19757e483b9a..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/IsSelfSigned.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.iotfirmwaredefense.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Indicates if the certificate was self-signed. */ -public final class IsSelfSigned extends ExpandableStringEnum { - /** Static value True for IsSelfSigned. */ - public static final IsSelfSigned TRUE = fromString("True"); - - /** Static value False for IsSelfSigned. */ - public static final IsSelfSigned FALSE = fromString("False"); - - /** - * Creates a new instance of IsSelfSigned value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public IsSelfSigned() { - } - - /** - * Creates or finds a IsSelfSigned from its string representation. - * - * @param name a name to look for. - * @return the corresponding IsSelfSigned. - */ - @JsonCreator - public static IsSelfSigned fromString(String name) { - return fromString(name, IsSelfSigned.class); - } - - /** - * Gets known IsSelfSigned values. - * - * @return known IsSelfSigned values. - */ - public static Collection values() { - return values(IsSelfSigned.class); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/IsShortKeySize.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/IsShortKeySize.java deleted file mode 100644 index 41e04e546c4c9..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/IsShortKeySize.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.iotfirmwaredefense.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Indicates the key size is considered too small to be secure for the algorithm. */ -public final class IsShortKeySize extends ExpandableStringEnum { - /** Static value True for IsShortKeySize. */ - public static final IsShortKeySize TRUE = fromString("True"); - - /** Static value False for IsShortKeySize. */ - public static final IsShortKeySize FALSE = fromString("False"); - - /** - * Creates a new instance of IsShortKeySize value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public IsShortKeySize() { - } - - /** - * Creates or finds a IsShortKeySize from its string representation. - * - * @param name a name to look for. - * @return the corresponding IsShortKeySize. - */ - @JsonCreator - public static IsShortKeySize fromString(String name) { - return fromString(name, IsShortKeySize.class); - } - - /** - * Gets known IsShortKeySize values. - * - * @return known IsShortKeySize values. - */ - public static Collection values() { - return values(IsShortKeySize.class); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/IsUpdateAvailable.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/IsUpdateAvailable.java deleted file mode 100644 index 65d0dc353b270..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/IsUpdateAvailable.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.iotfirmwaredefense.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Flag if new update is available for the component. */ -public final class IsUpdateAvailable extends ExpandableStringEnum { - /** Static value True for IsUpdateAvailable. */ - public static final IsUpdateAvailable TRUE = fromString("True"); - - /** Static value False for IsUpdateAvailable. */ - public static final IsUpdateAvailable FALSE = fromString("False"); - - /** - * Creates a new instance of IsUpdateAvailable value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public IsUpdateAvailable() { - } - - /** - * Creates or finds a IsUpdateAvailable from its string representation. - * - * @param name a name to look for. - * @return the corresponding IsUpdateAvailable. - */ - @JsonCreator - public static IsUpdateAvailable fromString(String name) { - return fromString(name, IsUpdateAvailable.class); - } - - /** - * Gets known IsUpdateAvailable values. - * - * @return known IsUpdateAvailable values. - */ - public static Collection values() { - return values(IsUpdateAvailable.class); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/IsWeakSignature.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/IsWeakSignature.java deleted file mode 100644 index 3bf6c0e7eebc4..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/IsWeakSignature.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.iotfirmwaredefense.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Indicates the signature algorithm used is insecure. */ -public final class IsWeakSignature extends ExpandableStringEnum { - /** Static value True for IsWeakSignature. */ - public static final IsWeakSignature TRUE = fromString("True"); - - /** Static value False for IsWeakSignature. */ - public static final IsWeakSignature FALSE = fromString("False"); - - /** - * Creates a new instance of IsWeakSignature value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public IsWeakSignature() { - } - - /** - * Creates or finds a IsWeakSignature from its string representation. - * - * @param name a name to look for. - * @return the corresponding IsWeakSignature. - */ - @JsonCreator - public static IsWeakSignature fromString(String name) { - return fromString(name, IsWeakSignature.class); - } - - /** - * Gets known IsWeakSignature values. - * - * @return known IsWeakSignature values. - */ - public static Collection values() { - return values(IsWeakSignature.class); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/NxFlag.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/NxFlag.java deleted file mode 100644 index b5d188482ce95..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/NxFlag.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.iotfirmwaredefense.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** NX flag. */ -public final class NxFlag extends ExpandableStringEnum { - /** Static value True for NxFlag. */ - public static final NxFlag TRUE = fromString("True"); - - /** Static value False for NxFlag. */ - public static final NxFlag FALSE = fromString("False"); - - /** - * Creates a new instance of NxFlag value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public NxFlag() { - } - - /** - * Creates or finds a NxFlag from its string representation. - * - * @param name a name to look for. - * @return the corresponding NxFlag. - */ - @JsonCreator - public static NxFlag fromString(String name) { - return fromString(name, NxFlag.class); - } - - /** - * Gets known NxFlag values. - * - * @return known NxFlag values. - */ - public static Collection values() { - return values(NxFlag.class); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Operation.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Operation.java index 39a1f12261227..2cdb4b7cbba9f 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Operation.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Operation.java @@ -6,12 +6,14 @@ import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.OperationInner; -/** An immutable client-side representation of Operation. */ +/** + * An immutable client-side representation of Operation. + */ public interface Operation { /** * Gets the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". - * + * * @return the name value. */ String name(); @@ -19,14 +21,14 @@ public interface Operation { /** * Gets the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane * operations and "false" for ARM/control-plane operations. - * + * * @return the isDataAction value. */ Boolean isDataAction(); /** * Gets the display property: Localized display information for this particular operation. - * + * * @return the display value. */ OperationDisplay display(); @@ -34,7 +36,7 @@ public interface Operation { /** * Gets the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and * audit logs UX. Default value is "user,system". - * + * * @return the origin value. */ Origin origin(); @@ -42,14 +44,14 @@ public interface Operation { /** * Gets the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal * only APIs. - * + * * @return the actionType value. */ ActionType actionType(); /** * Gets the inner com.azure.resourcemanager.iotfirmwaredefense.fluent.models.OperationInner object. - * + * * @return the inner object. */ OperationInner innerModel(); diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/OperationDisplay.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/OperationDisplay.java index 1e43a50036cf0..ac4d6d0797883 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/OperationDisplay.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/OperationDisplay.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Localized display information for this particular operation. */ +/** + * Localized display information for this particular operation. + */ @Immutable public final class OperationDisplay { /* @@ -37,14 +39,16 @@ public final class OperationDisplay { @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) private String description; - /** Creates an instance of OperationDisplay class. */ + /** + * Creates an instance of OperationDisplay class. + */ public OperationDisplay() { } /** * Get the provider property: The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring * Insights" or "Microsoft Compute". - * + * * @return the provider value. */ public String provider() { @@ -54,7 +58,7 @@ public String provider() { /** * Get the resource property: The localized friendly name of the resource type related to this operation. E.g. * "Virtual Machines" or "Job Schedule Collections". - * + * * @return the resource value. */ public String resource() { @@ -64,7 +68,7 @@ public String resource() { /** * Get the operation property: The concise, localized friendly name for the operation; suitable for dropdowns. E.g. * "Create or Update Virtual Machine", "Restart Virtual Machine". - * + * * @return the operation value. */ public String operation() { @@ -74,7 +78,7 @@ public String operation() { /** * Get the description property: The short, localized friendly description of the operation; suitable for tool tips * and detailed views. - * + * * @return the description value. */ public String description() { @@ -83,7 +87,7 @@ public String description() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/OperationListResult.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/OperationListResult.java index 17cf6aedeb8c5..594bf6c944685 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/OperationListResult.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/OperationListResult.java @@ -10,8 +10,8 @@ import java.util.List; /** - * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of - * results. + * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set + * of results. */ @Immutable public final class OperationListResult { @@ -27,13 +27,15 @@ public final class OperationListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of OperationListResult class. */ + /** + * Creates an instance of OperationListResult class. + */ public OperationListResult() { } /** * Get the value property: List of operations supported by the resource provider. - * + * * @return the value value. */ public List value() { @@ -42,7 +44,7 @@ public List value() { /** * Get the nextLink property: URL to get the next set of operation list results (if there are any). - * + * * @return the nextLink value. */ public String nextLink() { @@ -51,7 +53,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Operations.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Operations.java index a82b53b187868..d31c5a67564d0 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Operations.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Operations.java @@ -7,27 +7,29 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -/** Resource collection API of Operations. */ +/** + * Resource collection API of Operations. + */ public interface Operations { /** * Lists the operations for this resource provider. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ PagedIterable list(); /** * Lists the operations for this resource provider. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ PagedIterable list(Context context); } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Origin.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Origin.java index f27c1fb3e4aed..b2737993d57bb 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Origin.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Origin.java @@ -13,18 +13,24 @@ * is "user,system". */ public final class Origin extends ExpandableStringEnum { - /** Static value user for Origin. */ + /** + * Static value user for Origin. + */ public static final Origin USER = fromString("user"); - /** Static value system for Origin. */ + /** + * Static value system for Origin. + */ public static final Origin SYSTEM = fromString("system"); - /** Static value user,system for Origin. */ + /** + * Static value user,system for Origin. + */ public static final Origin USER_SYSTEM = fromString("user,system"); /** * Creates a new instance of Origin value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -33,7 +39,7 @@ public Origin() { /** * Creates or finds a Origin from its string representation. - * + * * @param name a name to look for. * @return the corresponding Origin. */ @@ -44,7 +50,7 @@ public static Origin fromString(String name) { /** * Gets known Origin values. - * + * * @return known Origin values. */ public static Collection values() { diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/PairedKey.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/PairedKey.java index bd643914f449e..8c578015d2a3f 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/PairedKey.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/PairedKey.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Details of a matching paired key or certificate. */ +/** + * Details of a matching paired key or certificate. + */ @Fluent public final class PairedKey { /* @@ -22,19 +24,15 @@ public final class PairedKey { @JsonProperty(value = "type") private String type; - /* - * Additional paired key properties + /** + * Creates an instance of PairedKey class. */ - @JsonProperty(value = "additionalProperties") - private Object additionalProperties; - - /** Creates an instance of PairedKey class. */ public PairedKey() { } /** * Get the id property: ID of the paired key or certificate. - * + * * @return the id value. */ public String id() { @@ -43,7 +41,7 @@ public String id() { /** * Set the id property: ID of the paired key or certificate. - * + * * @param id the id value to set. * @return the PairedKey object itself. */ @@ -54,7 +52,7 @@ public PairedKey withId(String id) { /** * Get the type property: The type indicating whether the paired object is a key or certificate. - * + * * @return the type value. */ public String type() { @@ -63,7 +61,7 @@ public String type() { /** * Set the type property: The type indicating whether the paired object is a key or certificate. - * + * * @param type the type value to set. * @return the PairedKey object itself. */ @@ -72,29 +70,9 @@ public PairedKey withType(String type) { return this; } - /** - * Get the additionalProperties property: Additional paired key properties. - * - * @return the additionalProperties value. - */ - public Object additionalProperties() { - return this.additionalProperties; - } - - /** - * Set the additionalProperties property: Additional paired key properties. - * - * @param additionalProperties the additionalProperties value to set. - * @return the PairedKey object itself. - */ - public PairedKey withAdditionalProperties(Object additionalProperties) { - this.additionalProperties = additionalProperties; - return this; - } - /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/PasswordHashList.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/PasswordHashList.java deleted file mode 100644 index 0086caee3e8cf..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/PasswordHashList.java +++ /dev/null @@ -1,70 +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.iotfirmwaredefense.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.PasswordHashInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Password hashes list. */ -@Fluent -public final class PasswordHashList { - /* - * Password hashes list - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * The uri to fetch the next page of asset. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** Creates an instance of PasswordHashList class. */ - public PasswordHashList() { - } - - /** - * Get the value property: Password hashes list. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The uri to fetch the next page of asset. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The uri to fetch the next page of asset. - * - * @param nextLink the nextLink value to set. - * @return the PasswordHashList object itself. - */ - public PasswordHashList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/PasswordHashListResult.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/PasswordHashListResult.java new file mode 100644 index 0000000000000..1630c7323f419 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/PasswordHashListResult.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.PasswordHashResourceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * List of password hash results. + */ +@Fluent +public final class PasswordHashListResult { + /* + * The list of password hash results. + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private List value; + + /* + * The uri to fetch the next page of resources. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of PasswordHashListResult class. + */ + public PasswordHashListResult() { + } + + /** + * Get the value property: The list of password hash results. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The uri to fetch the next page of resources. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The uri to fetch the next page of resources. + * + * @param nextLink the nextLink value to set. + * @return the PasswordHashListResult object itself. + */ + public PasswordHashListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/PasswordHash.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/PasswordHashResource.java similarity index 58% rename from sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/PasswordHash.java rename to sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/PasswordHashResource.java index d53611186f21a..740ea5503e3bc 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/PasswordHash.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/PasswordHashResource.java @@ -4,63 +4,94 @@ package com.azure.resourcemanager.iotfirmwaredefense.models; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.PasswordHashInner; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.PasswordHashResourceInner; + +/** + * An immutable client-side representation of PasswordHashResource. + */ +public interface PasswordHashResource { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); -/** An immutable client-side representation of PasswordHash. */ -public interface PasswordHash { /** * Gets the passwordHashId property: ID for password hash. - * + * * @return the passwordHashId value. */ String passwordHashId(); /** * Gets the filePath property: File path of the password hash. - * + * * @return the filePath value. */ String filePath(); /** * Gets the salt property: Salt of the password hash. - * + * * @return the salt value. */ String salt(); /** * Gets the hash property: Hash of the password. - * + * * @return the hash value. */ String hash(); /** * Gets the context property: Context of password hash. - * + * * @return the context value. */ String context(); /** * Gets the username property: User name of password hash. - * + * * @return the username value. */ String username(); /** * Gets the algorithm property: Algorithm of the password hash. - * + * * @return the algorithm value. */ String algorithm(); /** - * Gets the inner com.azure.resourcemanager.iotfirmwaredefense.fluent.models.PasswordHashInner object. - * + * Gets the inner com.azure.resourcemanager.iotfirmwaredefense.fluent.models.PasswordHashResourceInner object. + * * @return the inner object. */ - PasswordHashInner innerModel(); + PasswordHashResourceInner innerModel(); } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/PasswordHashes.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/PasswordHashes.java new file mode 100644 index 0000000000000..1f03e53d8d7d5 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/PasswordHashes.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** + * Resource collection API of PasswordHashes. + */ +public interface PasswordHashes { + /** + * Lists password hash analysis results of a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of password hash results as paginated response with {@link PagedIterable}. + */ + PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId); + + /** + * Lists password hash analysis results of a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of password hash results as paginated response with {@link PagedIterable}. + */ + PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId, Context context); +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/PieFlag.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/PieFlag.java deleted file mode 100644 index abfe7add20cf1..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/PieFlag.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.iotfirmwaredefense.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** PIE flag. */ -public final class PieFlag extends ExpandableStringEnum { - /** Static value True for PieFlag. */ - public static final PieFlag TRUE = fromString("True"); - - /** Static value False for PieFlag. */ - public static final PieFlag FALSE = fromString("False"); - - /** - * Creates a new instance of PieFlag value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PieFlag() { - } - - /** - * Creates or finds a PieFlag from its string representation. - * - * @param name a name to look for. - * @return the corresponding PieFlag. - */ - @JsonCreator - public static PieFlag fromString(String name) { - return fromString(name, PieFlag.class); - } - - /** - * Gets known PieFlag values. - * - * @return known PieFlag values. - */ - public static Collection values() { - return values(PieFlag.class); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/ProvisioningState.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/ProvisioningState.java index a010a27772506..2352f14898812 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/ProvisioningState.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/ProvisioningState.java @@ -8,23 +8,33 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Provisioning state of the resource. */ +/** + * Provisioning state of the resource. + */ public final class ProvisioningState extends ExpandableStringEnum { - /** Static value Accepted for ProvisioningState. */ + /** + * Static value Accepted for ProvisioningState. + */ public static final ProvisioningState ACCEPTED = fromString("Accepted"); - /** Static value Succeeded for ProvisioningState. */ + /** + * Static value Succeeded for ProvisioningState. + */ public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Canceled for ProvisioningState. */ + /** + * Static value Canceled for ProvisioningState. + */ public static final ProvisioningState CANCELED = fromString("Canceled"); - /** Static value Failed for ProvisioningState. */ + /** + * Static value Failed for ProvisioningState. + */ public static final ProvisioningState FAILED = fromString("Failed"); /** * Creates a new instance of ProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -33,7 +43,7 @@ public ProvisioningState() { /** * Creates or finds a ProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding ProvisioningState. */ @@ -44,7 +54,7 @@ public static ProvisioningState fromString(String name) { /** * Gets known ProvisioningState values. - * + * * @return known ProvisioningState values. */ public static Collection values() { diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/RelroFlag.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/RelroFlag.java deleted file mode 100644 index fe19992c8b295..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/RelroFlag.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.iotfirmwaredefense.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** RELRO flag. */ -public final class RelroFlag extends ExpandableStringEnum { - /** Static value True for RelroFlag. */ - public static final RelroFlag TRUE = fromString("True"); - - /** Static value False for RelroFlag. */ - public static final RelroFlag FALSE = fromString("False"); - - /** - * Creates a new instance of RelroFlag value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RelroFlag() { - } - - /** - * Creates or finds a RelroFlag from its string representation. - * - * @param name a name to look for. - * @return the corresponding RelroFlag. - */ - @JsonCreator - public static RelroFlag fromString(String name) { - return fromString(name, RelroFlag.class); - } - - /** - * Gets known RelroFlag values. - * - * @return known RelroFlag values. - */ - public static Collection values() { - return values(RelroFlag.class); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoKeyList.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/SbomComponentListResult.java similarity index 66% rename from sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoKeyList.java rename to sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/SbomComponentListResult.java index 182da0e5cddc8..3da5ea803f773 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoKeyList.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/SbomComponentListResult.java @@ -5,41 +5,45 @@ package com.azure.resourcemanager.iotfirmwaredefense.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CryptoKeyInner; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.SbomComponentResourceInner; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Crypto keys list. */ +/** + * List of SBOM results. + */ @Fluent -public final class CryptoKeyList { +public final class SbomComponentListResult { /* - * Crypto keys list + * The list of SBOM components. */ @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; + private List value; /* - * The uri to fetch the next page of asset. + * The uri to fetch the next page of resources. */ @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of CryptoKeyList class. */ - public CryptoKeyList() { + /** + * Creates an instance of SbomComponentListResult class. + */ + public SbomComponentListResult() { } /** - * Get the value property: Crypto keys list. - * + * Get the value property: The list of SBOM components. + * * @return the value value. */ - public List value() { + public List value() { return this.value; } /** - * Get the nextLink property: The uri to fetch the next page of asset. - * + * Get the nextLink property: The uri to fetch the next page of resources. + * * @return the nextLink value. */ public String nextLink() { @@ -47,19 +51,19 @@ public String nextLink() { } /** - * Set the nextLink property: The uri to fetch the next page of asset. - * + * Set the nextLink property: The uri to fetch the next page of resources. + * * @param nextLink the nextLink value to set. - * @return the CryptoKeyList object itself. + * @return the SbomComponentListResult object itself. */ - public CryptoKeyList withNextLink(String nextLink) { + public SbomComponentListResult withNextLink(String nextLink) { this.nextLink = nextLink; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/SbomComponentResource.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/SbomComponentResource.java new file mode 100644 index 0000000000000..b99bbba46f5e2 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/SbomComponentResource.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.SbomComponentResourceInner; +import java.util.List; + +/** + * An immutable client-side representation of SbomComponentResource. + */ +public interface SbomComponentResource { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the componentId property: ID for the component. + * + * @return the componentId value. + */ + String componentId(); + + /** + * Gets the componentName property: Name for the component. + * + * @return the componentName value. + */ + String componentName(); + + /** + * Gets the version property: Version for the component. + * + * @return the version value. + */ + String version(); + + /** + * Gets the license property: License for the component. + * + * @return the license value. + */ + String license(); + + /** + * Gets the filePaths property: File paths related to the component. + * + * @return the filePaths value. + */ + List filePaths(); + + /** + * Gets the inner com.azure.resourcemanager.iotfirmwaredefense.fluent.models.SbomComponentResourceInner object. + * + * @return the inner object. + */ + SbomComponentResourceInner innerModel(); +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/SbomComponents.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/SbomComponents.java new file mode 100644 index 0000000000000..58c9762e44729 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/SbomComponents.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** + * Resource collection API of SbomComponents. + */ +public interface SbomComponents { + /** + * Lists SBOM analysis results of a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of SBOM results as paginated response with {@link PagedIterable}. + */ + PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId); + + /** + * Lists SBOM analysis results of a firmware. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of SBOM results as paginated response with {@link PagedIterable}. + */ + PagedIterable listByFirmware(String resourceGroupName, String workspaceName, + String firmwareId, Context context); +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Status.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Status.java index 6889c079b9ca1..8ac35b1a5ddb6 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Status.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Status.java @@ -8,26 +8,38 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The status of firmware scan. */ +/** + * The status of firmware scan. + */ public final class Status extends ExpandableStringEnum { - /** Static value Pending for Status. */ + /** + * Static value Pending for Status. + */ public static final Status PENDING = fromString("Pending"); - /** Static value Extracting for Status. */ + /** + * Static value Extracting for Status. + */ public static final Status EXTRACTING = fromString("Extracting"); - /** Static value Analyzing for Status. */ + /** + * Static value Analyzing for Status. + */ public static final Status ANALYZING = fromString("Analyzing"); - /** Static value Ready for Status. */ + /** + * Static value Ready for Status. + */ public static final Status READY = fromString("Ready"); - /** Static value Error for Status. */ + /** + * Static value Error for Status. + */ public static final Status ERROR = fromString("Error"); /** * Creates a new instance of Status value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -36,7 +48,7 @@ public Status() { /** * Creates or finds a Status from its string representation. - * + * * @param name a name to look for. * @return the corresponding Status. */ @@ -47,7 +59,7 @@ public static Status fromString(String name) { /** * Gets known Status values. - * + * * @return known Status values. */ public static Collection values() { diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/StatusMessage.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/StatusMessage.java new file mode 100644 index 0000000000000..e94fac77c0a7e --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/StatusMessage.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Error and status message. + */ +@Fluent +public final class StatusMessage { + /* + * The error code + */ + @JsonProperty(value = "errorCode") + private Long errorCode; + + /* + * The error or status message + */ + @JsonProperty(value = "message") + private String message; + + /** + * Creates an instance of StatusMessage class. + */ + public StatusMessage() { + } + + /** + * Get the errorCode property: The error code. + * + * @return the errorCode value. + */ + public Long errorCode() { + return this.errorCode; + } + + /** + * Set the errorCode property: The error code. + * + * @param errorCode the errorCode value to set. + * @return the StatusMessage object itself. + */ + public StatusMessage withErrorCode(Long errorCode) { + this.errorCode = errorCode; + return this; + } + + /** + * Get the message property: The error or status message. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Set the message property: The error or status message. + * + * @param message the message value to set. + * @return the StatusMessage object itself. + */ + public StatusMessage withMessage(String message) { + this.message = message; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/StrippedFlag.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/StrippedFlag.java deleted file mode 100644 index aa0cb1c78750c..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/StrippedFlag.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.iotfirmwaredefense.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Stripped flag. */ -public final class StrippedFlag extends ExpandableStringEnum { - /** Static value True for StrippedFlag. */ - public static final StrippedFlag TRUE = fromString("True"); - - /** Static value False for StrippedFlag. */ - public static final StrippedFlag FALSE = fromString("False"); - - /** - * Creates a new instance of StrippedFlag value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public StrippedFlag() { - } - - /** - * Creates or finds a StrippedFlag from its string representation. - * - * @param name a name to look for. - * @return the corresponding StrippedFlag. - */ - @JsonCreator - public static StrippedFlag fromString(String name) { - return fromString(name, StrippedFlag.class); - } - - /** - * Gets known StrippedFlag values. - * - * @return known StrippedFlag values. - */ - public static Collection values() { - return values(StrippedFlag.class); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Summaries.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Summaries.java new file mode 100644 index 0000000000000..d38ef7b2b510b --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Summaries.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.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 Summaries. + */ +public interface Summaries { + /** + * Lists analysis result summary names of a firmware. To fetch the full summary data, get that summary by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of analysis summaries as paginated response with {@link PagedIterable}. + */ + PagedIterable listByFirmware(String resourceGroupName, String workspaceName, String firmwareId); + + /** + * Lists analysis result summary names of a firmware. To fetch the full summary data, get that summary by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of analysis summaries as paginated response with {@link PagedIterable}. + */ + PagedIterable listByFirmware(String resourceGroupName, String workspaceName, String firmwareId, + Context context); + + /** + * Get an analysis result summary of a firmware by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @param summaryName The Firmware analysis summary name describing the type of summary. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an analysis result summary of a firmware by name along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String workspaceName, String firmwareId, + SummaryName summaryName, Context context); + + /** + * Get an analysis result summary of a firmware by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the firmware analysis workspace. + * @param firmwareId The id of the firmware. + * @param summaryName The Firmware analysis summary name describing the type of summary. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an analysis result summary of a firmware by name. + */ + SummaryResource get(String resourceGroupName, String workspaceName, String firmwareId, SummaryName summaryName); +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoCertificateList.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/SummaryListResult.java similarity index 68% rename from sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoCertificateList.java rename to sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/SummaryListResult.java index 65484a36c6410..0cff22b0e120c 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/CryptoCertificateList.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/SummaryListResult.java @@ -5,41 +5,45 @@ package com.azure.resourcemanager.iotfirmwaredefense.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CryptoCertificateInner; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.SummaryResourceInner; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Crypto certificates list. */ +/** + * List of analysis summaries. + */ @Fluent -public final class CryptoCertificateList { +public final class SummaryListResult { /* - * Crypto certificates list + * The list of summaries. */ @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; + private List value; /* - * The uri to fetch the next page of asset. + * The uri to fetch the next page of resources. */ @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of CryptoCertificateList class. */ - public CryptoCertificateList() { + /** + * Creates an instance of SummaryListResult class. + */ + public SummaryListResult() { } /** - * Get the value property: Crypto certificates list. - * + * Get the value property: The list of summaries. + * * @return the value value. */ - public List value() { + public List value() { return this.value; } /** - * Get the nextLink property: The uri to fetch the next page of asset. - * + * Get the nextLink property: The uri to fetch the next page of resources. + * * @return the nextLink value. */ public String nextLink() { @@ -47,19 +51,19 @@ public String nextLink() { } /** - * Set the nextLink property: The uri to fetch the next page of asset. - * + * Set the nextLink property: The uri to fetch the next page of resources. + * * @param nextLink the nextLink value to set. - * @return the CryptoCertificateList object itself. + * @return the SummaryListResult object itself. */ - public CryptoCertificateList withNextLink(String nextLink) { + public SummaryListResult withNextLink(String nextLink) { this.nextLink = nextLink; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/SummaryName.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/SummaryName.java new file mode 100644 index 0000000000000..8357178f0e4d5 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/SummaryName.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Defines values for SummaryName. + */ +public final class SummaryName extends ExpandableStringEnum { + /** + * Static value Firmware for SummaryName. + */ + public static final SummaryName FIRMWARE = fromString("Firmware"); + + /** + * Static value CVE for SummaryName. + */ + public static final SummaryName CVE = fromString("CVE"); + + /** + * Static value BinaryHardening for SummaryName. + */ + public static final SummaryName BINARY_HARDENING = fromString("BinaryHardening"); + + /** + * Static value CryptoCertificate for SummaryName. + */ + public static final SummaryName CRYPTO_CERTIFICATE = fromString("CryptoCertificate"); + + /** + * Static value CryptoKey for SummaryName. + */ + public static final SummaryName CRYPTO_KEY = fromString("CryptoKey"); + + /** + * Creates a new instance of SummaryName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SummaryName() { + } + + /** + * Creates or finds a SummaryName from its string representation. + * + * @param name a name to look for. + * @return the corresponding SummaryName. + */ + @JsonCreator + public static SummaryName fromString(String name) { + return fromString(name, SummaryName.class); + } + + /** + * Gets known SummaryName values. + * + * @return known SummaryName values. + */ + public static Collection values() { + return values(SummaryName.class); + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/SummaryResource.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/SummaryResource.java new file mode 100644 index 0000000000000..0a5dad26fbafe --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/SummaryResource.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.SummaryResourceInner; + +/** + * An immutable client-side representation of SummaryResource. + */ +public interface SummaryResource { + /** + * 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: Properties of an analysis summary. + * + * @return the properties value. + */ + SummaryResourceProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.iotfirmwaredefense.fluent.models.SummaryResourceInner object. + * + * @return the inner object. + */ + SummaryResourceInner innerModel(); +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/SummaryResourceProperties.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/SummaryResourceProperties.java new file mode 100644 index 0000000000000..678a5fb697354 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/SummaryResourceProperties.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Properties of an analysis summary. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "summaryType", + defaultImpl = SummaryResourceProperties.class) +@JsonTypeName("SummaryResourceProperties") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "Firmware", value = FirmwareSummary.class), + @JsonSubTypes.Type(name = "CVE", value = CveSummary.class), + @JsonSubTypes.Type(name = "BinaryHardening", value = BinaryHardeningSummaryResource.class), + @JsonSubTypes.Type(name = "CryptoCertificate", value = CryptoCertificateSummaryResource.class), + @JsonSubTypes.Type(name = "CryptoKey", value = CryptoKeySummaryResource.class) }) +@Immutable +public class SummaryResourceProperties { + /** + * Creates an instance of SummaryResourceProperties class. + */ + public SummaryResourceProperties() { + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/SummaryType.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/SummaryType.java new file mode 100644 index 0000000000000..fc1daadefba34 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/SummaryType.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Describes the type of summary. + */ +public final class SummaryType extends ExpandableStringEnum { + /** + * Static value Firmware for SummaryType. + */ + public static final SummaryType FIRMWARE = fromString("Firmware"); + + /** + * Static value CVE for SummaryType. + */ + public static final SummaryType CVE = fromString("CVE"); + + /** + * Static value BinaryHardening for SummaryType. + */ + public static final SummaryType BINARY_HARDENING = fromString("BinaryHardening"); + + /** + * Static value CryptoCertificate for SummaryType. + */ + public static final SummaryType CRYPTO_CERTIFICATE = fromString("CryptoCertificate"); + + /** + * Static value CryptoKey for SummaryType. + */ + public static final SummaryType CRYPTO_KEY = fromString("CryptoKey"); + + /** + * Creates a new instance of SummaryType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SummaryType() { + } + + /** + * Creates or finds a SummaryType from its string representation. + * + * @param name a name to look for. + * @return the corresponding SummaryType. + */ + @JsonCreator + public static SummaryType fromString(String name) { + return fromString(name, SummaryType.class); + } + + /** + * Gets known SummaryType values. + * + * @return known SummaryType values. + */ + public static Collection values() { + return values(SummaryType.class); + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/UrlToken.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/UrlToken.java index 0dfd6fe48e003..20c9fafe69cec 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/UrlToken.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/UrlToken.java @@ -6,25 +6,20 @@ import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.UrlTokenInner; -/** An immutable client-side representation of UrlToken. */ +/** + * An immutable client-side representation of UrlToken. + */ public interface UrlToken { /** * Gets the url property: SAS URL for creating or accessing a blob file. - * + * * @return the url value. */ String url(); - /** - * Gets the uploadUrl property: SAS URL for file uploading. Kept for backwards compatibility. - * - * @return the uploadUrl value. - */ - String uploadUrl(); - /** * Gets the inner com.azure.resourcemanager.iotfirmwaredefense.fluent.models.UrlTokenInner object. - * + * * @return the inner object. */ UrlTokenInner innerModel(); diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Workspace.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Workspace.java index 19e1332e5267e..52511306f9259 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Workspace.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Workspace.java @@ -11,104 +11,111 @@ import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.WorkspaceInner; import java.util.Map; -/** An immutable client-side representation of Workspace. */ +/** + * An immutable client-side representation of Workspace. + */ public interface Workspace { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the location property: The geo-location where the resource lives. - * + * * @return the location value. */ String location(); /** * Gets the tags property: Resource tags. - * + * * @return the tags value. */ Map tags(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the provisioningState property: Provisioning state of the resource. - * + * * @return the provisioningState value. */ ProvisioningState provisioningState(); /** * Gets the region of the resource. - * + * * @return the region of the resource. */ Region region(); /** * Gets the name of the resource region. - * + * * @return the name of the resource region. */ String regionName(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.iotfirmwaredefense.fluent.models.WorkspaceInner object. - * + * * @return the inner object. */ WorkspaceInner innerModel(); - /** The entirety of the Workspace definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithCreate { + /** + * The entirety of the Workspace definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { } - /** The Workspace definition stages. */ + /** + * The Workspace definition stages. + */ interface DefinitionStages { - /** The first stage of the Workspace definition. */ + /** + * The first stage of the Workspace definition. + */ interface Blank extends WithLocation { } - /** The stage of the Workspace definition allowing to specify location. */ + /** + * The stage of the Workspace definition allowing to specify location. + */ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ @@ -116,18 +123,20 @@ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ WithResourceGroup withRegion(String location); } - /** The stage of the Workspace definition allowing to specify parent resource. */ + /** + * The stage of the Workspace definition allowing to specify parent resource. + */ interface WithResourceGroup { /** * Specifies resourceGroupName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ @@ -141,25 +150,27 @@ interface WithResourceGroup { interface WithCreate extends DefinitionStages.WithTags { /** * Executes the create request. - * + * * @return the created resource. */ Workspace create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ Workspace create(Context context); } - /** The stage of the Workspace definition allowing to specify tags. */ + /** + * The stage of the Workspace definition allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags.. - * + * * @param tags Resource tags. * @return the next definition stage. */ @@ -169,43 +180,47 @@ interface WithTags { /** * Begins update for the Workspace resource. - * + * * @return the stage of resource update. */ Workspace.Update update(); - /** The template for Workspace update. */ + /** + * The template for Workspace update. + */ interface Update { /** * Executes the update request. - * + * * @return the updated resource. */ Workspace apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ Workspace apply(Context context); } - /** The Workspace update stages. */ + /** + * The Workspace update stages. + */ interface UpdateStages { } /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ Workspace refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ @@ -213,7 +228,7 @@ interface UpdateStages { /** * The operation to get a url for file upload. - * + * * @param generateUploadUrl Parameters when requesting a URL to upload firmware. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -225,7 +240,7 @@ interface UpdateStages { /** * The operation to get a url for file upload. - * + * * @param generateUploadUrl Parameters when requesting a URL to upload firmware. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/WorkspaceList.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/WorkspaceList.java index 0d29f6a2a125d..cefa79a509f29 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/WorkspaceList.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/WorkspaceList.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Return a list of firmware analysis workspaces. */ +/** + * Return a list of firmware analysis workspaces. + */ @Fluent public final class WorkspaceList { /* @@ -24,13 +26,15 @@ public final class WorkspaceList { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of WorkspaceList class. */ + /** + * Creates an instance of WorkspaceList class. + */ public WorkspaceList() { } /** * Get the value property: The list of firmware analysis workspaces. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Get the nextLink property: The uri to fetch the next page of asset. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +52,7 @@ public String nextLink() { /** * Set the nextLink property: The uri to fetch the next page of asset. - * + * * @param nextLink the nextLink value to set. * @return the WorkspaceList object itself. */ @@ -59,7 +63,7 @@ public WorkspaceList withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/WorkspaceUpdateDefinition.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/WorkspaceUpdateDefinition.java index 2a69be24b9974..7d021ea923fd4 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/WorkspaceUpdateDefinition.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/WorkspaceUpdateDefinition.java @@ -8,7 +8,9 @@ import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.WorkspaceProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** Firmware analysis workspace. */ +/** + * Firmware analysis workspace. + */ @Immutable public final class WorkspaceUpdateDefinition { /* @@ -17,13 +19,15 @@ public final class WorkspaceUpdateDefinition { @JsonProperty(value = "properties") private WorkspaceProperties innerProperties; - /** Creates an instance of WorkspaceUpdateDefinition class. */ + /** + * Creates an instance of WorkspaceUpdateDefinition class. + */ public WorkspaceUpdateDefinition() { } /** * Get the innerProperties property: The editable workspace properties. - * + * * @return the innerProperties value. */ private WorkspaceProperties innerProperties() { @@ -32,7 +36,7 @@ private WorkspaceProperties innerProperties() { /** * Get the provisioningState property: Provisioning state of the resource. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -41,7 +45,7 @@ public ProvisioningState provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Workspaces.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Workspaces.java index 1a4f91415054c..602f762fd8edb 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Workspaces.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/Workspaces.java @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Workspaces. */ +/** + * Resource collection API of Workspaces. + */ public interface Workspaces { /** * Lists all of the firmware analysis workspaces in the specified subscription. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return return a list of firmware analysis workspaces as paginated response with {@link PagedIterable}. @@ -21,7 +23,7 @@ public interface Workspaces { /** * Lists all of the firmware analysis workspaces in the specified subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -32,7 +34,7 @@ public interface Workspaces { /** * Lists all of the firmware analysis workspaces in the specified resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -43,7 +45,7 @@ public interface Workspaces { /** * Lists all of the firmware analysis workspaces in the specified resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -55,7 +57,7 @@ public interface Workspaces { /** * The operation to delete a firmware analysis workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param context The context to associate with this operation. @@ -68,7 +70,7 @@ public interface Workspaces { /** * The operation to delete a firmware analysis workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -79,7 +81,7 @@ public interface Workspaces { /** * Get firmware analysis workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param context The context to associate with this operation. @@ -92,7 +94,7 @@ public interface Workspaces { /** * Get firmware analysis workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -104,7 +106,7 @@ public interface Workspaces { /** * The operation to get a url for file upload. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param generateUploadUrl Parameters when requesting a URL to upload firmware. @@ -114,12 +116,12 @@ public interface Workspaces { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return url data for creating or accessing a blob file along with {@link Response}. */ - Response generateUploadUrlWithResponse( - String resourceGroupName, String workspaceName, GenerateUploadUrlRequest generateUploadUrl, Context context); + Response generateUploadUrlWithResponse(String resourceGroupName, String workspaceName, + GenerateUploadUrlRequest generateUploadUrl, Context context); /** * The operation to get a url for file upload. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the firmware analysis workspace. * @param generateUploadUrl Parameters when requesting a URL to upload firmware. @@ -128,12 +130,12 @@ Response generateUploadUrlWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return url data for creating or accessing a blob file. */ - UrlToken generateUploadUrl( - String resourceGroupName, String workspaceName, GenerateUploadUrlRequest generateUploadUrl); + UrlToken generateUploadUrl(String resourceGroupName, String workspaceName, + GenerateUploadUrlRequest generateUploadUrl); /** * Get firmware analysis workspace. - * + * * @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. @@ -144,7 +146,7 @@ UrlToken generateUploadUrl( /** * Get firmware analysis workspace. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -156,7 +158,7 @@ UrlToken generateUploadUrl( /** * The operation to delete a firmware analysis workspace. - * + * * @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. @@ -166,7 +168,7 @@ UrlToken generateUploadUrl( /** * The operation to delete a firmware analysis workspace. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -178,7 +180,7 @@ UrlToken generateUploadUrl( /** * Begins definition for a new Workspace resource. - * + * * @param name resource name. * @return the first stage of the new Workspace definition. */ diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/package-info.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/package-info.java index 2c614579ee6b7..59a8f8f9bdb21 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/package-info.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/models/package-info.java @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the data models for Fist. The definitions and parameters in this swagger specification will be - * used to manage the IoT Firmware Defense resources. + * Package containing the data models for IoTFirmwareDefense. + * Firmware & IoT Security REST API. */ package com.azure.resourcemanager.iotfirmwaredefense.models; diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/package-info.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/package-info.java index 7f678d3e0d000..adbe3ccf3e75d 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/package-info.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/com/azure/resourcemanager/iotfirmwaredefense/package-info.java @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the classes for Fist. The definitions and parameters in this swagger specification will be used to - * manage the IoT Firmware Defense resources. + * Package containing the classes for IoTFirmwareDefense. + * Firmware & IoT Security REST API. */ package com.azure.resourcemanager.iotfirmwaredefense; diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/module-info.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/module-info.java index 8d30e276bd315..9a691f3ca849a 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/module-info.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/java/module-info.java @@ -4,16 +4,10 @@ module com.azure.resourcemanager.iotfirmwaredefense { requires transitive com.azure.core.management; - exports com.azure.resourcemanager.iotfirmwaredefense; exports com.azure.resourcemanager.iotfirmwaredefense.fluent; exports com.azure.resourcemanager.iotfirmwaredefense.fluent.models; exports com.azure.resourcemanager.iotfirmwaredefense.models; - - opens com.azure.resourcemanager.iotfirmwaredefense.fluent.models to - com.azure.core, - com.fasterxml.jackson.databind; - opens com.azure.resourcemanager.iotfirmwaredefense.models to - com.azure.core, - com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.iotfirmwaredefense.fluent.models to com.azure.core, com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.iotfirmwaredefense.models to com.azure.core, com.fasterxml.jackson.databind; } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-iotfirmwaredefense/proxy-config.json b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-iotfirmwaredefense/proxy-config.json new file mode 100644 index 0000000000000..18ede4d0367b3 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-iotfirmwaredefense/proxy-config.json @@ -0,0 +1 @@ +[ [ "com.azure.resourcemanager.iotfirmwaredefense.implementation.BinaryHardeningsClientImpl$BinaryHardeningsService" ], [ "com.azure.resourcemanager.iotfirmwaredefense.implementation.CryptoCertificatesClientImpl$CryptoCertificatesService" ], [ "com.azure.resourcemanager.iotfirmwaredefense.implementation.CryptoKeysClientImpl$CryptoKeysService" ], [ "com.azure.resourcemanager.iotfirmwaredefense.implementation.CvesClientImpl$CvesService" ], [ "com.azure.resourcemanager.iotfirmwaredefense.implementation.FirmwaresClientImpl$FirmwaresService" ], [ "com.azure.resourcemanager.iotfirmwaredefense.implementation.OperationsClientImpl$OperationsService" ], [ "com.azure.resourcemanager.iotfirmwaredefense.implementation.PasswordHashesClientImpl$PasswordHashesService" ], [ "com.azure.resourcemanager.iotfirmwaredefense.implementation.SbomComponentsClientImpl$SbomComponentsService" ], [ "com.azure.resourcemanager.iotfirmwaredefense.implementation.SummariesClientImpl$SummariesService" ], [ "com.azure.resourcemanager.iotfirmwaredefense.implementation.WorkspacesClientImpl$WorkspacesService" ] ] \ No newline at end of file diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-iotfirmwaredefense/reflect-config.json b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-iotfirmwaredefense/reflect-config.json new file mode 100644 index 0000000000000..b5bbd45f95a28 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-iotfirmwaredefense/reflect-config.json @@ -0,0 +1,256 @@ +[ { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.models.BinaryHardeningListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.fluent.models.BinaryHardeningResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.fluent.models.BinaryHardeningResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.fluent.models.BinaryHardeningFeatures", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.models.CryptoCertificateListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CryptoCertificateResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CryptoCertificate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.models.CryptoCertificateEntity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.models.PairedKey", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.models.CryptoKeyListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CryptoKeyResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CryptoKey", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.models.CveListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CveResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CveResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.models.CveComponent", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.models.CveLink", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.models.FirmwareList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.fluent.models.FirmwareInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.fluent.models.FirmwareProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.models.StatusMessage", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.models.FirmwareUpdateDefinition", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.fluent.models.UrlTokenInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.models.OperationListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.fluent.models.OperationInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.models.OperationDisplay", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.models.PasswordHashListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.fluent.models.PasswordHashResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.fluent.models.PasswordHash", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.models.SbomComponentListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.fluent.models.SbomComponentResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.fluent.models.SbomComponent", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.models.SummaryListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.fluent.models.SummaryResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.models.SummaryResourceProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.models.WorkspaceList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.fluent.models.WorkspaceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.fluent.models.WorkspaceProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.models.WorkspaceUpdateDefinition", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.models.GenerateUploadUrlRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.models.FirmwareSummary", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.models.CveSummary", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.models.BinaryHardeningSummaryResource", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.models.CryptoCertificateSummaryResource", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.models.CryptoKeySummaryResource", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.models.Status", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.models.ProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.models.Origin", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.models.ActionType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.models.SummaryType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.iotfirmwaredefense.models.SummaryName", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +} ] \ No newline at end of file diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/BinaryHardeningListByFirmwareSamples.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/BinaryHardeningListByFirmwareSamples.java new file mode 100644 index 0000000000000..0048470863a7f --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/BinaryHardeningListByFirmwareSamples.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.generated; + +/** + * Samples for BinaryHardening ListByFirmware. + */ +public final class BinaryHardeningListByFirmwareSamples { + /* + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * BinaryHardening_ListByFirmware_MinimumSet_Gen.json + */ + /** + * Sample code: BinaryHardening_ListByFirmware_MinimumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void binaryHardeningListByFirmwareMinimumSetGen( + com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + manager.binaryHardenings().listByFirmware("FirmwareAnalysisRG", "default", + "109a9886-50bf-85a8-9d75-000000000000", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * BinaryHardening_ListByFirmware_MaximumSet_Gen.json + */ + /** + * Sample code: BinaryHardening_ListByFirmware_MaximumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void binaryHardeningListByFirmwareMaximumSetGen( + com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + manager.binaryHardenings().listByFirmware("FirmwareAnalysisRG", "default", + "109a9886-50bf-85a8-9d75-000000000000", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CryptoCertificatesListByFirmwareSamples.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CryptoCertificatesListByFirmwareSamples.java new file mode 100644 index 0000000000000..30ebad1861044 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CryptoCertificatesListByFirmwareSamples.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.generated; + +/** + * Samples for CryptoCertificates ListByFirmware. + */ +public final class CryptoCertificatesListByFirmwareSamples { + /* + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * CryptoCertificates_ListByFirmware_MaximumSet_Gen.json + */ + /** + * Sample code: CryptoCertificates_ListByFirmware_MaximumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void cryptoCertificatesListByFirmwareMaximumSetGen( + com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + manager.cryptoCertificates().listByFirmware("FirmwareAnalysisRG", "default", + "109a9886-50bf-85a8-9d75-000000000000", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * CryptoCertificates_ListByFirmware_MinimumSet_Gen.json + */ + /** + * Sample code: CryptoCertificates_ListByFirmware_MinimumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void cryptoCertificatesListByFirmwareMinimumSetGen( + com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + manager.cryptoCertificates().listByFirmware("FirmwareAnalysisRG", "default", + "109a9886-50bf-85a8-9d75-000000000000", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CryptoKeysListByFirmwareSamples.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CryptoKeysListByFirmwareSamples.java new file mode 100644 index 0000000000000..24b31df3d1f42 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CryptoKeysListByFirmwareSamples.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.generated; + +/** + * Samples for CryptoKeys ListByFirmware. + */ +public final class CryptoKeysListByFirmwareSamples { + /* + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * CryptoKeys_ListByFirmware_MinimumSet_Gen.json + */ + /** + * Sample code: CryptoKeys_ListByFirmware_MinimumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void cryptoKeysListByFirmwareMinimumSetGen( + com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + manager.cryptoKeys().listByFirmware("FirmwareAnalysisRG", "default", "109a9886-50bf-85a8-9d75-000000000000", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * CryptoKeys_ListByFirmware_MaximumSet_Gen.json + */ + /** + * Sample code: CryptoKeys_ListByFirmware_MaximumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void cryptoKeysListByFirmwareMaximumSetGen( + com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + manager.cryptoKeys().listByFirmware("FirmwareAnalysisRG", "default", "109a9886-50bf-85a8-9d75-000000000000", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CvesListByFirmwareSamples.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CvesListByFirmwareSamples.java new file mode 100644 index 0000000000000..88c909fc21bb2 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CvesListByFirmwareSamples.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.generated; + +/** + * Samples for Cves ListByFirmware. + */ +public final class CvesListByFirmwareSamples { + /* + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Cves_ListByFirmware_MaximumSet_Gen.json + */ + /** + * Sample code: Cves_ListByFirmware_MaximumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void cvesListByFirmwareMaximumSetGen( + com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + manager.cves().listByFirmware("FirmwareAnalysisRG", "default", "109a9886-50bf-85a8-9d75-000000000000", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Cves_ListByFirmware_MinimumSet_Gen.json + */ + /** + * Sample code: Cves_ListByFirmware_MinimumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void cvesListByFirmwareMinimumSetGen( + com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + manager.cves().listByFirmware("FirmwareAnalysisRG", "default", "109a9886-50bf-85a8-9d75-000000000000", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareCreateSamples.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareCreateSamples.java deleted file mode 100644 index c8269ee45957b..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareCreateSamples.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.iotfirmwaredefense.generated; - -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.iotfirmwaredefense.models.Status; -import java.io.IOException; -import java.util.Arrays; - -/** Samples for Firmware Create. */ -public final class FirmwareCreateSamples { - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_Create_MinimumSet_Gen.json - */ - /** - * Sample code: Firmware_Create_MinimumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareCreateMinimumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager.firmwares().define("umrkdttp").withExistingWorkspace("rgworkspaces-firmwares", "A7").create(); - } - - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_Create_MaximumSet_Gen.json - */ - /** - * Sample code: Firmware_Create_MaximumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareCreateMaximumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) throws IOException { - manager - .firmwares() - .define("umrkdttp") - .withExistingWorkspace("rgworkspaces-firmwares", "A7") - .withFileName("wresexxulcdsdd") - .withVendor("vycmdhgtmepcptyoubztiuudpkcpd") - .withModel("f") - .withVersion("s") - .withDescription("uz") - .withFileSize(17L) - .withStatus(Status.PENDING) - .withStatusMessages( - Arrays - .asList( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"message\":\"ulvhmhokezathzzauiitu\"}", Object.class, SerializerEncoding.JSON))) - .create(); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareDeleteSamples.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareDeleteSamples.java deleted file mode 100644 index 3cab11d210d40..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareDeleteSamples.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.iotfirmwaredefense.generated; - -/** Samples for Firmware Delete. */ -public final class FirmwareDeleteSamples { - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_Delete_MinimumSet_Gen.json - */ - /** - * Sample code: Firmware_Delete_MinimumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareDeleteMinimumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .deleteWithResponse("rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_Delete_MaximumSet_Gen.json - */ - /** - * Sample code: Firmware_Delete_MaximumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareDeleteMaximumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .deleteWithResponse("rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareGenerateBinaryHardeningDetailsSamples.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareGenerateBinaryHardeningDetailsSamples.java deleted file mode 100644 index d4f8107675fc4..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareGenerateBinaryHardeningDetailsSamples.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.iotfirmwaredefense.generated; - -/** Samples for Firmware GenerateBinaryHardeningDetails. */ -public final class FirmwareGenerateBinaryHardeningDetailsSamples { - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateBinaryHardeningDetails_MaximumSet_Gen.json - */ - /** - * Sample code: Firmware_GenerateBinaryHardeningDetails_MaximumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareGenerateBinaryHardeningDetailsMaximumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .generateBinaryHardeningDetailsWithResponse( - "rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateBinaryHardeningDetails_MinimumSet_Gen.json - */ - /** - * Sample code: Firmware_GenerateBinaryHardeningDetails_MinimumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareGenerateBinaryHardeningDetailsMinimumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .generateBinaryHardeningDetailsWithResponse( - "rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareGenerateBinaryHardeningSummarySamples.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareGenerateBinaryHardeningSummarySamples.java deleted file mode 100644 index 20b0d9b246277..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareGenerateBinaryHardeningSummarySamples.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.iotfirmwaredefense.generated; - -/** Samples for Firmware GenerateBinaryHardeningSummary. */ -public final class FirmwareGenerateBinaryHardeningSummarySamples { - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateBinaryHardeningSummary_MaximumSet_Gen.json - */ - /** - * Sample code: Firmware_GenerateBinaryHardeningSummary_MaximumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareGenerateBinaryHardeningSummaryMaximumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .generateBinaryHardeningSummaryWithResponse( - "rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateBinaryHardeningSummary_MinimumSet_Gen.json - */ - /** - * Sample code: Firmware_GenerateBinaryHardeningSummary_MinimumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareGenerateBinaryHardeningSummaryMinimumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .generateBinaryHardeningSummaryWithResponse( - "rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareGenerateComponentDetailsSamples.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareGenerateComponentDetailsSamples.java deleted file mode 100644 index faa549618b2de..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareGenerateComponentDetailsSamples.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.iotfirmwaredefense.generated; - -/** Samples for Firmware GenerateComponentDetails. */ -public final class FirmwareGenerateComponentDetailsSamples { - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateComponentDetails_MinimumSet_Gen.json - */ - /** - * Sample code: Firmware_GenerateComponentDetails_MinimumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareGenerateComponentDetailsMinimumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .generateComponentDetailsWithResponse( - "rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateComponentDetails_MaximumSet_Gen.json - */ - /** - * Sample code: Firmware_GenerateComponentDetails_MaximumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareGenerateComponentDetailsMaximumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .generateComponentDetailsWithResponse( - "rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareGenerateCryptoCertificateSummarySamples.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareGenerateCryptoCertificateSummarySamples.java deleted file mode 100644 index c56f1f5990005..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareGenerateCryptoCertificateSummarySamples.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.iotfirmwaredefense.generated; - -/** Samples for Firmware GenerateCryptoCertificateSummary. */ -public final class FirmwareGenerateCryptoCertificateSummarySamples { - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateCryptoCertificateSummary_MaximumSet_Gen.json - */ - /** - * Sample code: Firmware_GenerateCryptoCertificateSummary_MaximumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareGenerateCryptoCertificateSummaryMaximumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .generateCryptoCertificateSummaryWithResponse( - "FirmwareAnalysisRG", - "default", - "DECAFBAD-0000-0000-0000-BADBADBADBAD", - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateCryptoCertificateSummary_MinimumSet_Gen.json - */ - /** - * Sample code: Firmware_GenerateCryptoCertificateSummary_MinimumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareGenerateCryptoCertificateSummaryMinimumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .generateCryptoCertificateSummaryWithResponse( - "rgworkspaces-firmwares", "j5QE_", "wujtpcgypfpqseyrsebolarkspy", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareGenerateCryptoKeySummarySamples.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareGenerateCryptoKeySummarySamples.java deleted file mode 100644 index 06e5973aaa209..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareGenerateCryptoKeySummarySamples.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.iotfirmwaredefense.generated; - -/** Samples for Firmware GenerateCryptoKeySummary. */ -public final class FirmwareGenerateCryptoKeySummarySamples { - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateCryptoKeySummary_MaximumSet_Gen.json - */ - /** - * Sample code: Firmware_GenerateCryptoKeySummary_MaximumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareGenerateCryptoKeySummaryMaximumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .generateCryptoKeySummaryWithResponse( - "FirmwareAnalysisRG", - "default", - "DECAFBAD-0000-0000-0000-BADBADBADBAD", - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateCryptoKeySummary_MinimumSet_Gen.json - */ - /** - * Sample code: Firmware_GenerateCryptoKeySummary_MinimumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareGenerateCryptoKeySummaryMinimumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .generateCryptoKeySummaryWithResponse( - "rgworkspaces-firmwares", "j5QE_", "wujtpcgypfpqseyrsebolarkspy", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareGenerateCveSummarySamples.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareGenerateCveSummarySamples.java deleted file mode 100644 index 1555d82dd3db3..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareGenerateCveSummarySamples.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.iotfirmwaredefense.generated; - -/** Samples for Firmware GenerateCveSummary. */ -public final class FirmwareGenerateCveSummarySamples { - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateCveSummary_MinimumSet_Gen.json - */ - /** - * Sample code: Firmware_GenerateCveSummary_MinimumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareGenerateCveSummaryMinimumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .generateCveSummaryWithResponse( - "rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateCveSummary_MaximumSet_Gen.json - */ - /** - * Sample code: Firmware_GenerateCveSummary_MaximumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareGenerateCveSummaryMaximumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .generateCveSummaryWithResponse( - "rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareGenerateDownloadUrlSamples.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareGenerateDownloadUrlSamples.java deleted file mode 100644 index 2131b705806ef..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareGenerateDownloadUrlSamples.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.iotfirmwaredefense.generated; - -/** Samples for Firmware GenerateDownloadUrl. */ -public final class FirmwareGenerateDownloadUrlSamples { - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateDownloadUrl_MaximumSet_Gen.json - */ - /** - * Sample code: Firmware_GenerateDownloadUrl_MaximumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareGenerateDownloadUrlMaximumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .generateDownloadUrlWithResponse( - "rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateDownloadUrl_MinimumSet_Gen.json - */ - /** - * Sample code: Firmware_GenerateDownloadUrl_MinimumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareGenerateDownloadUrlMinimumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .generateDownloadUrlWithResponse( - "rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareGenerateFilesystemDownloadUrlSamples.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareGenerateFilesystemDownloadUrlSamples.java deleted file mode 100644 index 9e5eb41afdbd7..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareGenerateFilesystemDownloadUrlSamples.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.iotfirmwaredefense.generated; - -/** Samples for Firmware GenerateFilesystemDownloadUrl. */ -public final class FirmwareGenerateFilesystemDownloadUrlSamples { - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateFilesystemDownloadUrl_MaximumSet_Gen.json - */ - /** - * Sample code: Firmware_GenerateFilesystemDownloadUrl_MaximumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareGenerateFilesystemDownloadUrlMaximumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .generateFilesystemDownloadUrlWithResponse( - "rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateFilesystemDownloadUrl_MinimumSet_Gen.json - */ - /** - * Sample code: Firmware_GenerateFilesystemDownloadUrl_MinimumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareGenerateFilesystemDownloadUrlMinimumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .generateFilesystemDownloadUrlWithResponse( - "rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareGenerateSummarySamples.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareGenerateSummarySamples.java deleted file mode 100644 index 83908a76241ab..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareGenerateSummarySamples.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.iotfirmwaredefense.generated; - -/** Samples for Firmware GenerateSummary. */ -public final class FirmwareGenerateSummarySamples { - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateSummary_MinimumSet_Gen.json - */ - /** - * Sample code: Firmware_GenerateSummary_MinimumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareGenerateSummaryMinimumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .generateSummaryWithResponse("rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateSummary_MaximumSet_Gen.json - */ - /** - * Sample code: Firmware_GenerateSummary_MaximumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareGenerateSummaryMaximumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .generateSummaryWithResponse("rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareGetSamples.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareGetSamples.java deleted file mode 100644 index 15b1e702fa283..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareGetSamples.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.iotfirmwaredefense.generated; - -/** Samples for Firmware Get. */ -public final class FirmwareGetSamples { - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_Get_MinimumSet_Gen.json - */ - /** - * Sample code: Firmware_Get_MinimumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareGetMinimumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .getWithResponse("rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_Get_MaximumSet_Gen.json - */ - /** - * Sample code: Firmware_Get_MaximumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareGetMaximumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .getWithResponse("rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareListGenerateBinaryHardeningListSamples.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareListGenerateBinaryHardeningListSamples.java deleted file mode 100644 index 2954146f65cc4..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareListGenerateBinaryHardeningListSamples.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.iotfirmwaredefense.generated; - -/** Samples for Firmware ListGenerateBinaryHardeningList. */ -public final class FirmwareListGenerateBinaryHardeningListSamples { - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateBinaryHardeningList_MinimumSet_Gen.json - */ - /** - * Sample code: Firmware_ListGenerateBinaryHardeningList_MinimumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareListGenerateBinaryHardeningListMinimumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .listGenerateBinaryHardeningList( - "rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateBinaryHardeningList_MaximumSet_Gen.json - */ - /** - * Sample code: Firmware_ListGenerateBinaryHardeningList_MaximumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareListGenerateBinaryHardeningListMaximumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .listGenerateBinaryHardeningList( - "rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareListGenerateComponentListSamples.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareListGenerateComponentListSamples.java deleted file mode 100644 index 616b2e82ba6ef..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareListGenerateComponentListSamples.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.iotfirmwaredefense.generated; - -/** Samples for Firmware ListGenerateComponentList. */ -public final class FirmwareListGenerateComponentListSamples { - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateComponentList_MaximumSet_Gen.json - */ - /** - * Sample code: Firmware_ListGenerateComponentList_MaximumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareListGenerateComponentListMaximumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .listGenerateComponentList("rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateComponentList_MinimumSet_Gen.json - */ - /** - * Sample code: Firmware_ListGenerateComponentList_MinimumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareListGenerateComponentListMinimumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .listGenerateComponentList("rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareListGenerateCryptoCertificateListSamples.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareListGenerateCryptoCertificateListSamples.java deleted file mode 100644 index d7881e705f373..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareListGenerateCryptoCertificateListSamples.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.iotfirmwaredefense.generated; - -/** Samples for Firmware ListGenerateCryptoCertificateList. */ -public final class FirmwareListGenerateCryptoCertificateListSamples { - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateCryptoCertificateList_MaximumSet_Gen.json - */ - /** - * Sample code: Firmware_ListGenerateCryptoCertificateList_MaximumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareListGenerateCryptoCertificateListMaximumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .listGenerateCryptoCertificateList( - "FirmwareAnalysisRG", - "default", - "DECAFBAD-0000-0000-0000-BADBADBADBAD", - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateCryptoCertificateList_MinimumSet_Gen.json - */ - /** - * Sample code: Firmware_ListGenerateCryptoCertificateList_MinimumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareListGenerateCryptoCertificateListMinimumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .listGenerateCryptoCertificateList( - "rgworkspaces-firmwares", "j5QE_", "wujtpcgypfpqseyrsebolarkspy", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareListGenerateCryptoKeyListSamples.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareListGenerateCryptoKeyListSamples.java deleted file mode 100644 index 0c01feaf5924c..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareListGenerateCryptoKeyListSamples.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.iotfirmwaredefense.generated; - -/** Samples for Firmware ListGenerateCryptoKeyList. */ -public final class FirmwareListGenerateCryptoKeyListSamples { - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateCryptoKeyList_MinimumSet_Gen.json - */ - /** - * Sample code: Firmware_ListGenerateCryptoKeyList_MinimumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareListGenerateCryptoKeyListMinimumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .listGenerateCryptoKeyList( - "rgworkspaces-firmwares", "j5QE_", "wujtpcgypfpqseyrsebolarkspy", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateCryptoKeyList_MaximumSet_Gen.json - */ - /** - * Sample code: Firmware_ListGenerateCryptoKeyList_MaximumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareListGenerateCryptoKeyListMaximumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .listGenerateCryptoKeyList( - "FirmwareAnalysisRG", - "default", - "DECAFBAD-0000-0000-0000-BADBADBADBAD", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareListGenerateCveListSamples.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareListGenerateCveListSamples.java deleted file mode 100644 index ba8a9880a30e9..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareListGenerateCveListSamples.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.iotfirmwaredefense.generated; - -/** Samples for Firmware ListGenerateCveList. */ -public final class FirmwareListGenerateCveListSamples { - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateCveList_MaximumSet_Gen.json - */ - /** - * Sample code: Firmware_ListGenerateCveList_MaximumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareListGenerateCveListMaximumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .listGenerateCveList("rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateCveList_MinimumSet_Gen.json - */ - /** - * Sample code: Firmware_ListGenerateCveList_MinimumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareListGenerateCveListMinimumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .listGenerateCveList("rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareListGeneratePasswordHashListSamples.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareListGeneratePasswordHashListSamples.java deleted file mode 100644 index a207f4ba6e5b3..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareListGeneratePasswordHashListSamples.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.iotfirmwaredefense.generated; - -/** Samples for Firmware ListGeneratePasswordHashList. */ -public final class FirmwareListGeneratePasswordHashListSamples { - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGeneratePasswordHashList_MinimumSet_Gen.json - */ - /** - * Sample code: Firmware_ListGeneratePasswordHashList_MinimumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareListGeneratePasswordHashListMinimumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .listGeneratePasswordHashList("rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGeneratePasswordHashList_MaximumSet_Gen.json - */ - /** - * Sample code: Firmware_ListGeneratePasswordHashList_MaximumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareListGeneratePasswordHashListMaximumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .firmwares() - .listGeneratePasswordHashList("rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareUpdateSamples.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareUpdateSamples.java deleted file mode 100644 index 110f00bd708b9..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareUpdateSamples.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.iotfirmwaredefense.generated; - -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.iotfirmwaredefense.models.Firmware; -import com.azure.resourcemanager.iotfirmwaredefense.models.Status; -import java.io.IOException; -import java.util.Arrays; - -/** Samples for Firmware Update. */ -public final class FirmwareUpdateSamples { - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_Update_MaximumSet_Gen.json - */ - /** - * Sample code: Firmware_Update_MaximumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareUpdateMaximumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) throws IOException { - Firmware resource = - manager - .firmwares() - .getWithResponse("rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withFileName("wresexxulcdsdd") - .withVendor("vycmdhgtmepcptyoubztiuudpkcpd") - .withModel("f") - .withVersion("s") - .withDescription("uz") - .withFileSize(17L) - .withStatus(Status.PENDING) - .withStatusMessages( - Arrays - .asList( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"message\":\"ulvhmhokezathzzauiitu\"}", Object.class, SerializerEncoding.JSON))) - .apply(); - } - - /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_Update_MinimumSet_Gen.json - */ - /** - * Sample code: Firmware_Update_MinimumSet_Gen. - * - * @param manager Entry point to IoTFirmwareDefenseManager. - */ - public static void firmwareUpdateMinimumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - Firmware resource = - manager - .firmwares() - .getWithResponse("rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().apply(); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresCreateSamples.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresCreateSamples.java new file mode 100644 index 0000000000000..6e4d7434616ad --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresCreateSamples.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.generated; + +import com.azure.resourcemanager.iotfirmwaredefense.models.Status; +import com.azure.resourcemanager.iotfirmwaredefense.models.StatusMessage; +import java.util.Arrays; + +/** + * Samples for Firmwares Create. + */ +public final class FirmwaresCreateSamples { + /* + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Firmwares_Create_MaximumSet_Gen.json + */ + /** + * Sample code: Firmwares_Create_MaximumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void + firmwaresCreateMaximumSetGen(com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + manager.firmwares().define("umrkdttp").withExistingWorkspace("rgworkspaces-firmwares", "A7") + .withFileName("wresexxulcdsdd").withVendor("vycmdhgtmepcptyoubztiuudpkcpd").withModel("f").withVersion("s") + .withDescription("uz").withFileSize(17L).withStatus(Status.PENDING) + .withStatusMessages(Arrays.asList(new StatusMessage().withMessage("ulvhmhokezathzzauiitu"))).create(); + } + + /* + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Firmwares_Create_MinimumSet_Gen.json + */ + /** + * Sample code: Firmwares_Create_MinimumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void + firmwaresCreateMinimumSetGen(com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + manager.firmwares().define("umrkdttp").withExistingWorkspace("rgworkspaces-firmwares", "A7").create(); + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresDeleteSamples.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresDeleteSamples.java new file mode 100644 index 0000000000000..dc3b28777b04d --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresDeleteSamples.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.generated; + +/** + * Samples for Firmwares Delete. + */ +public final class FirmwaresDeleteSamples { + /* + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Firmwares_Delete_MinimumSet_Gen.json + */ + /** + * Sample code: Firmwares_Delete_MinimumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void + firmwaresDeleteMinimumSetGen(com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + manager.firmwares().deleteWithResponse("rgworkspaces-firmwares", "A7", "umrkdttp", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Firmwares_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: Firmwares_Delete_MaximumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void + firmwaresDeleteMaximumSetGen(com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + manager.firmwares().deleteWithResponse("rgworkspaces-firmwares", "A7", "umrkdttp", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresGenerateDownloadUrlSamples.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresGenerateDownloadUrlSamples.java new file mode 100644 index 0000000000000..0aa7d926d898b --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresGenerateDownloadUrlSamples.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.generated; + +/** + * Samples for Firmwares GenerateDownloadUrl. + */ +public final class FirmwaresGenerateDownloadUrlSamples { + /* + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Firmwares_GenerateDownloadUrl_MaximumSet_Gen.json + */ + /** + * Sample code: Firmwares_GenerateDownloadUrl_MaximumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void firmwaresGenerateDownloadUrlMaximumSetGen( + com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + manager.firmwares().generateDownloadUrlWithResponse("rgworkspaces-firmwares", "A7", "umrkdttp", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Firmwares_GenerateDownloadUrl_MinimumSet_Gen.json + */ + /** + * Sample code: Firmwares_GenerateDownloadUrl_MinimumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void firmwaresGenerateDownloadUrlMinimumSetGen( + com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + manager.firmwares().generateDownloadUrlWithResponse("rgworkspaces-firmwares", "A7", "umrkdttp", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresGenerateFilesystemDownloadUrlSamples.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresGenerateFilesystemDownloadUrlSamples.java new file mode 100644 index 0000000000000..7f5cb01b37609 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresGenerateFilesystemDownloadUrlSamples.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.generated; + +/** + * Samples for Firmwares GenerateFilesystemDownloadUrl. + */ +public final class FirmwaresGenerateFilesystemDownloadUrlSamples { + /* + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Firmwares_GenerateFilesystemDownloadUrl_MaximumSet_Gen.json + */ + /** + * Sample code: Firmwares_GenerateFilesystemDownloadUrl_MaximumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void firmwaresGenerateFilesystemDownloadUrlMaximumSetGen( + com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + manager.firmwares().generateFilesystemDownloadUrlWithResponse("rgworkspaces-firmwares", "A7", "umrkdttp", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Firmwares_GenerateFilesystemDownloadUrl_MinimumSet_Gen.json + */ + /** + * Sample code: Firmwares_GenerateFilesystemDownloadUrl_MinimumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void firmwaresGenerateFilesystemDownloadUrlMinimumSetGen( + com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + manager.firmwares().generateFilesystemDownloadUrlWithResponse("rgworkspaces-firmwares", "A7", "umrkdttp", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresGetSamples.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresGetSamples.java new file mode 100644 index 0000000000000..0eaa1e2ee2510 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresGetSamples.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.generated; + +/** + * Samples for Firmwares Get. + */ +public final class FirmwaresGetSamples { + /* + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Firmwares_Get_MinimumSet_Gen.json + */ + /** + * Sample code: Firmwares_Get_MinimumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void + firmwaresGetMinimumSetGen(com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + manager.firmwares().getWithResponse("rgworkspaces-firmwares", "A7", "umrkdttp", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Firmwares_Get_MaximumSet_Gen.json + */ + /** + * Sample code: Firmwares_Get_MaximumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void + firmwaresGetMaximumSetGen(com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + manager.firmwares().getWithResponse("rgworkspaces-firmwares", "A7", "umrkdttp", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareListByWorkspaceSamples.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresListByWorkspaceSamples.java similarity index 62% rename from sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareListByWorkspaceSamples.java rename to sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresListByWorkspaceSamples.java index af4e73bbedbb1..5ecab64bd5018 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareListByWorkspaceSamples.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresListByWorkspaceSamples.java @@ -4,30 +4,34 @@ package com.azure.resourcemanager.iotfirmwaredefense.generated; -/** Samples for Firmware ListByWorkspace. */ -public final class FirmwareListByWorkspaceSamples { +/** + * Samples for Firmwares ListByWorkspace. + */ +public final class FirmwaresListByWorkspaceSamples { /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListByWorkspace_MaximumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Firmwares_ListByWorkspace_MaximumSet_Gen.json */ /** - * Sample code: Firmware_ListByWorkspace_MaximumSet_Gen. - * + * Sample code: Firmwares_ListByWorkspace_MaximumSet_Gen. + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void firmwareListByWorkspaceMaximumSetGen( + public static void firmwaresListByWorkspaceMaximumSetGen( com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { manager.firmwares().listByWorkspace("rgworkspaces-firmwares", "A7", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListByWorkspace_MinimumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Firmwares_ListByWorkspace_MinimumSet_Gen.json */ /** - * Sample code: Firmware_ListByWorkspace_MinimumSet_Gen. - * + * Sample code: Firmwares_ListByWorkspace_MinimumSet_Gen. + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void firmwareListByWorkspaceMinimumSetGen( + public static void firmwaresListByWorkspaceMinimumSetGen( com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { manager.firmwares().listByWorkspace("rgworkspaces-firmwares", "A7", com.azure.core.util.Context.NONE); } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresUpdateSamples.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresUpdateSamples.java new file mode 100644 index 0000000000000..1b9e31910bf82 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresUpdateSamples.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.generated; + +import com.azure.resourcemanager.iotfirmwaredefense.models.Firmware; +import com.azure.resourcemanager.iotfirmwaredefense.models.Status; +import com.azure.resourcemanager.iotfirmwaredefense.models.StatusMessage; +import java.util.Arrays; + +/** + * Samples for Firmwares Update. + */ +public final class FirmwaresUpdateSamples { + /* + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Firmwares_Update_MaximumSet_Gen.json + */ + /** + * Sample code: Firmwares_Update_MaximumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void + firmwaresUpdateMaximumSetGen(com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + Firmware resource = manager.firmwares() + .getWithResponse("rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE).getValue(); + resource.update().withFileName("wresexxulcdsdd").withVendor("vycmdhgtmepcptyoubztiuudpkcpd").withModel("f") + .withVersion("s").withDescription("uz").withFileSize(17L).withStatus(Status.PENDING) + .withStatusMessages(Arrays.asList(new StatusMessage().withMessage("ulvhmhokezathzzauiitu"))).apply(); + } + + /* + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Firmwares_Update_MinimumSet_Gen.json + */ + /** + * Sample code: Firmwares_Update_MinimumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void + firmwaresUpdateMinimumSetGen(com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + Firmware resource = manager.firmwares() + .getWithResponse("rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE).getValue(); + resource.update().apply(); + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/OperationsListSamples.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/OperationsListSamples.java index 07e7ab015ddf7..4d86e03e18ca9 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/OperationsListSamples.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/OperationsListSamples.java @@ -4,31 +4,35 @@ package com.azure.resourcemanager.iotfirmwaredefense.generated; -/** Samples for Operations List. */ +/** + * Samples for Operations List. + */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Operations_List_MinimumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Operations_List_MinimumSet_Gen.json */ /** * Sample code: Operations_List_MinimumSet_Gen. - * + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void operationsListMinimumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + public static void + operationsListMinimumSetGen(com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { manager.operations().list(com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Operations_List_MaximumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Operations_List_MaximumSet_Gen.json */ /** * Sample code: Operations_List_MaximumSet_Gen. - * + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void operationsListMaximumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + public static void + operationsListMaximumSetGen(com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { manager.operations().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/PasswordHashesListByFirmwareSamples.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/PasswordHashesListByFirmwareSamples.java new file mode 100644 index 0000000000000..387faa2b4674e --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/PasswordHashesListByFirmwareSamples.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.generated; + +/** + * Samples for PasswordHashes ListByFirmware. + */ +public final class PasswordHashesListByFirmwareSamples { + /* + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * PasswordHashes_ListByFirmware_MaximumSet_Gen.json + */ + /** + * Sample code: PasswordHashes_ListByFirmware_MaximumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void passwordHashesListByFirmwareMaximumSetGen( + com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + manager.passwordHashes().listByFirmware("FirmwareAnalysisRG", "default", "109a9886-50bf-85a8-9d75-000000000000", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * PasswordHashes_ListByFirmware_MinimumSet_Gen.json + */ + /** + * Sample code: PasswordHashes_ListByFirmware_MinimumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void passwordHashesListByFirmwareMinimumSetGen( + com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + manager.passwordHashes().listByFirmware("FirmwareAnalysisRG", "default", "109a9886-50bf-85a8-9d75-000000000000", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SbomComponentsListByFirmwareSamples.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SbomComponentsListByFirmwareSamples.java new file mode 100644 index 0000000000000..82db2c0317ddf --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SbomComponentsListByFirmwareSamples.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.generated; + +/** + * Samples for SbomComponents ListByFirmware. + */ +public final class SbomComponentsListByFirmwareSamples { + /* + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * SbomComponents_ListByFirmware_MinimumSet_Gen.json + */ + /** + * Sample code: SbomComponents_ListByFirmware_MinimumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void sbomComponentsListByFirmwareMinimumSetGen( + com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + manager.sbomComponents().listByFirmware("FirmwareAnalysisRG", "default", "109a9886-50bf-85a8-9d75-000000000000", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * SbomComponents_ListByFirmware_MaximumSet_Gen.json + */ + /** + * Sample code: SbomComponents_ListByFirmware_MaximumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void sbomComponentsListByFirmwareMaximumSetGen( + com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + manager.sbomComponents().listByFirmware("FirmwareAnalysisRG", "default", "109a9886-50bf-85a8-9d75-000000000000", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SummariesGetSamples.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SummariesGetSamples.java new file mode 100644 index 0000000000000..0df6c700a4314 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SummariesGetSamples.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.generated; + +import com.azure.resourcemanager.iotfirmwaredefense.models.SummaryName; + +/** + * Samples for Summaries Get. + */ +public final class SummariesGetSamples { + /* + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Summaries_Get_MaximumSet_Gen.json + */ + /** + * Sample code: Summaries_Get_MaximumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void + summariesGetMaximumSetGen(com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + manager.summaries().getWithResponse("FirmwareAnalysisRG", "default", "109a9886-50bf-85a8-9d75-000000000000", + SummaryName.FIRMWARE, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Summaries_Get_MinimumSet_Gen.json + */ + /** + * Sample code: Summaries_Get_MinimumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void + summariesGetMinimumSetGen(com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + manager.summaries().getWithResponse("FirmwareAnalysisRG", "default", "109a9886-50bf-85a8-9d75-000000000000", + SummaryName.FIRMWARE, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SummariesListByFirmwareSamples.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SummariesListByFirmwareSamples.java new file mode 100644 index 0000000000000..f69b4bd27c403 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SummariesListByFirmwareSamples.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.generated; + +/** + * Samples for Summaries ListByFirmware. + */ +public final class SummariesListByFirmwareSamples { + /* + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Summaries_ListByFirmware_MinimumSet_Gen.json + */ + /** + * Sample code: Summaries_ListByFirmware_MinimumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void summariesListByFirmwareMinimumSetGen( + com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + manager.summaries().listByFirmware("FirmwareAnalysisRG", "default", "109a9886-50bf-85a8-9d75-000000000000", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Summaries_ListByFirmware_MaximumSet_Gen.json + */ + /** + * Sample code: Summaries_ListByFirmware_MaximumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void summariesListByFirmwareMaximumSetGen( + com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + manager.summaries().listByFirmware("FirmwareAnalysisRG", "default", "109a9886-50bf-85a8-9d75-000000000000", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesCreateSamples.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesCreateSamples.java index 92ce135e5cfe4..8296dbf56b92f 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesCreateSamples.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesCreateSamples.java @@ -7,45 +7,41 @@ import java.util.HashMap; import java.util.Map; -/** Samples for Workspaces Create. */ +/** + * Samples for Workspaces Create. + */ public final class WorkspacesCreateSamples { /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_Create_MinimumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Workspaces_Create_MinimumSet_Gen.json */ /** * Sample code: Workspaces_Create_MinimumSet_Gen. - * + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void workspacesCreateMinimumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .workspaces() - .define("E___-3") - .withRegion("jjwbseilitjgdrhbvvkwviqj") - .withExistingResourceGroup("rgworkspaces") - .create(); + public static void + workspacesCreateMinimumSetGen(com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + manager.workspaces().define("E___-3").withRegion("jjwbseilitjgdrhbvvkwviqj") + .withExistingResourceGroup("rgworkspaces").create(); } /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_Create_MaximumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Workspaces_Create_MaximumSet_Gen.json */ /** * Sample code: Workspaces_Create_MaximumSet_Gen. - * + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void workspacesCreateMaximumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .workspaces() - .define("E___-3") - .withRegion("jjwbseilitjgdrhbvvkwviqj") - .withExistingResourceGroup("rgworkspaces") - .withTags(mapOf("key450", "fakeTokenPlaceholder")) - .create(); + public static void + workspacesCreateMaximumSetGen(com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + manager.workspaces().define("E___-3").withRegion("jjwbseilitjgdrhbvvkwviqj") + .withExistingResourceGroup("rgworkspaces").withTags(mapOf("key450", "fakeTokenPlaceholder")).create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesDeleteSamples.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesDeleteSamples.java index 0102ed79b2bee..a72c6353a4aa0 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesDeleteSamples.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesDeleteSamples.java @@ -4,35 +4,37 @@ package com.azure.resourcemanager.iotfirmwaredefense.generated; -/** Samples for Workspaces Delete. */ +/** + * Samples for Workspaces Delete. + */ public final class WorkspacesDeleteSamples { /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_Delete_MinimumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Workspaces_Delete_MinimumSet_Gen.json */ /** * Sample code: Workspaces_Delete_MinimumSet_Gen. - * + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void workspacesDeleteMinimumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .workspaces() - .deleteByResourceGroupWithResponse("rgworkspaces", "E___-3", com.azure.core.util.Context.NONE); + public static void + workspacesDeleteMinimumSetGen(com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + manager.workspaces().deleteByResourceGroupWithResponse("rgworkspaces", "E___-3", + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Workspaces_Delete_MaximumSet_Gen.json */ /** * Sample code: Workspaces_Delete_MaximumSet_Gen. - * + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void workspacesDeleteMaximumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .workspaces() - .deleteByResourceGroupWithResponse("rgworkspaces", "E___-3", com.azure.core.util.Context.NONE); + public static void + workspacesDeleteMaximumSetGen(com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + manager.workspaces().deleteByResourceGroupWithResponse("rgworkspaces", "E___-3", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesGenerateUploadUrlSamples.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesGenerateUploadUrlSamples.java index b516728f10144..41b565f14d2b6 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesGenerateUploadUrlSamples.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesGenerateUploadUrlSamples.java @@ -6,40 +6,37 @@ import com.azure.resourcemanager.iotfirmwaredefense.models.GenerateUploadUrlRequest; -/** Samples for Workspaces GenerateUploadUrl. */ +/** + * Samples for Workspaces GenerateUploadUrl. + */ public final class WorkspacesGenerateUploadUrlSamples { /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_GenerateUploadUrl_MinimumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Workspaces_GenerateUploadUrl_MinimumSet_Gen.json */ /** * Sample code: Workspaces_GenerateUploadUrl_MinimumSet_Gen. - * + * * @param manager Entry point to IoTFirmwareDefenseManager. */ public static void workspacesGenerateUploadUrlMinimumSetGen( com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .workspaces() - .generateUploadUrlWithResponse( - "rgworkspaces", "E___-3", new GenerateUploadUrlRequest(), com.azure.core.util.Context.NONE); + manager.workspaces().generateUploadUrlWithResponse("rgworkspaces", "E___-3", new GenerateUploadUrlRequest(), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_GenerateUploadUrl_MaximumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Workspaces_GenerateUploadUrl_MaximumSet_Gen.json */ /** * Sample code: Workspaces_GenerateUploadUrl_MaximumSet_Gen. - * + * * @param manager Entry point to IoTFirmwareDefenseManager. */ public static void workspacesGenerateUploadUrlMaximumSetGen( com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - manager - .workspaces() - .generateUploadUrlWithResponse( - "rgworkspaces", - "E___-3", - new GenerateUploadUrlRequest().withFirmwareId("ytsfprbywi"), - com.azure.core.util.Context.NONE); + manager.workspaces().generateUploadUrlWithResponse("rgworkspaces", "E___-3", + new GenerateUploadUrlRequest().withFirmwareId("ytsfprbywi"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesGetByResourceGroupSamples.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesGetByResourceGroupSamples.java index 304c6c1076f0d..e76c0567e2aca 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesGetByResourceGroupSamples.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesGetByResourceGroupSamples.java @@ -4,31 +4,35 @@ package com.azure.resourcemanager.iotfirmwaredefense.generated; -/** Samples for Workspaces GetByResourceGroup. */ +/** + * Samples for Workspaces GetByResourceGroup. + */ public final class WorkspacesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Workspaces_Get_MaximumSet_Gen.json */ /** * Sample code: Workspaces_Get_MaximumSet_Gen. - * + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void workspacesGetMaximumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + public static void + workspacesGetMaximumSetGen(com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { manager.workspaces().getByResourceGroupWithResponse("rgworkspaces", "E_US", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_Get_MinimumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Workspaces_Get_MinimumSet_Gen.json */ /** * Sample code: Workspaces_Get_MinimumSet_Gen. - * + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void workspacesGetMinimumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + public static void + workspacesGetMinimumSetGen(com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { manager.workspaces().getByResourceGroupWithResponse("rgworkspaces", "E_US", com.azure.core.util.Context.NONE); } } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesListByResourceGroupSamples.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesListByResourceGroupSamples.java index e249b83391d18..8f0e62efc31b5 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesListByResourceGroupSamples.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesListByResourceGroupSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.iotfirmwaredefense.generated; -/** Samples for Workspaces ListByResourceGroup. */ +/** + * Samples for Workspaces ListByResourceGroup. + */ public final class WorkspacesListByResourceGroupSamples { /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Workspaces_ListByResourceGroup_MaximumSet_Gen.json */ /** * Sample code: Workspaces_ListByResourceGroup_MaximumSet_Gen. - * + * * @param manager Entry point to IoTFirmwareDefenseManager. */ public static void workspacesListByResourceGroupMaximumSetGen( @@ -20,11 +23,12 @@ public static void workspacesListByResourceGroupMaximumSetGen( } /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_ListByResourceGroup_MinimumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Workspaces_ListByResourceGroup_MinimumSet_Gen.json */ /** * Sample code: Workspaces_ListByResourceGroup_MinimumSet_Gen. - * + * * @param manager Entry point to IoTFirmwareDefenseManager. */ public static void workspacesListByResourceGroupMinimumSetGen( diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesListSamples.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesListSamples.java index ebb6535a46ca8..afef1db42652d 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesListSamples.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesListSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.iotfirmwaredefense.generated; -/** Samples for Workspaces List. */ +/** + * Samples for Workspaces List. + */ public final class WorkspacesListSamples { /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Workspaces_ListBySubscription_MaximumSet_Gen.json */ /** * Sample code: Workspaces_ListBySubscription_MaximumSet_Gen. - * + * * @param manager Entry point to IoTFirmwareDefenseManager. */ public static void workspacesListBySubscriptionMaximumSetGen( @@ -20,11 +23,12 @@ public static void workspacesListBySubscriptionMaximumSetGen( } /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_ListBySubscription_MinimumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Workspaces_ListBySubscription_MinimumSet_Gen.json */ /** * Sample code: Workspaces_ListBySubscription_MinimumSet_Gen. - * + * * @param manager Entry point to IoTFirmwareDefenseManager. */ public static void workspacesListBySubscriptionMinimumSetGen( diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesUpdateSamples.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesUpdateSamples.java index e7ae262821b8f..bb5e8c8e5d868 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesUpdateSamples.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/samples/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesUpdateSamples.java @@ -6,41 +6,39 @@ import com.azure.resourcemanager.iotfirmwaredefense.models.Workspace; -/** Samples for Workspaces Update. */ +/** + * Samples for Workspaces Update. + */ public final class WorkspacesUpdateSamples { /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_Update_MaximumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Workspaces_Update_MaximumSet_Gen.json */ /** * Sample code: Workspaces_Update_MaximumSet_Gen. - * + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void workspacesUpdateMaximumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - Workspace resource = - manager - .workspaces() - .getByResourceGroupWithResponse("rgworkspaces", "E___-3", com.azure.core.util.Context.NONE) - .getValue(); + public static void + workspacesUpdateMaximumSetGen(com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + Workspace resource = manager.workspaces() + .getByResourceGroupWithResponse("rgworkspaces", "E___-3", com.azure.core.util.Context.NONE).getValue(); resource.update().apply(); } /* - * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_Update_MinimumSet_Gen.json + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/ + * Workspaces_Update_MinimumSet_Gen.json */ /** * Sample code: Workspaces_Update_MinimumSet_Gen. - * + * * @param manager Entry point to IoTFirmwareDefenseManager. */ - public static void workspacesUpdateMinimumSetGen( - com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { - Workspace resource = - manager - .workspaces() - .getByResourceGroupWithResponse("rgworkspaces", "E___-3", com.azure.core.util.Context.NONE) - .getValue(); + public static void + workspacesUpdateMinimumSetGen(com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager manager) { + Workspace resource = manager.workspaces() + .getByResourceGroupWithResponse("rgworkspaces", "E___-3", com.azure.core.util.Context.NONE).getValue(); resource.update().apply(); } } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/BinaryHardeningFeaturesTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/BinaryHardeningFeaturesTests.java index e0dc62975d6c4..99c2006ddf1ba 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/BinaryHardeningFeaturesTests.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/BinaryHardeningFeaturesTests.java @@ -6,42 +6,30 @@ import com.azure.core.util.BinaryData; import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.BinaryHardeningFeatures; -import com.azure.resourcemanager.iotfirmwaredefense.models.CanaryFlag; -import com.azure.resourcemanager.iotfirmwaredefense.models.NxFlag; -import com.azure.resourcemanager.iotfirmwaredefense.models.PieFlag; -import com.azure.resourcemanager.iotfirmwaredefense.models.RelroFlag; -import com.azure.resourcemanager.iotfirmwaredefense.models.StrippedFlag; import org.junit.jupiter.api.Assertions; public final class BinaryHardeningFeaturesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - BinaryHardeningFeatures model = - BinaryData - .fromString( - "{\"nx\":\"True\",\"pie\":\"True\",\"relro\":\"True\",\"canary\":\"True\",\"stripped\":\"True\"}") + BinaryHardeningFeatures model + = BinaryData.fromString("{\"nx\":false,\"pie\":true,\"relro\":false,\"canary\":true,\"stripped\":false}") .toObject(BinaryHardeningFeatures.class); - Assertions.assertEquals(NxFlag.TRUE, model.nx()); - Assertions.assertEquals(PieFlag.TRUE, model.pie()); - Assertions.assertEquals(RelroFlag.TRUE, model.relro()); - Assertions.assertEquals(CanaryFlag.TRUE, model.canary()); - Assertions.assertEquals(StrippedFlag.TRUE, model.stripped()); + Assertions.assertEquals(false, model.nx()); + Assertions.assertEquals(true, model.pie()); + Assertions.assertEquals(false, model.relro()); + Assertions.assertEquals(true, model.canary()); + Assertions.assertEquals(false, model.stripped()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BinaryHardeningFeatures model = - new BinaryHardeningFeatures() - .withNx(NxFlag.TRUE) - .withPie(PieFlag.TRUE) - .withRelro(RelroFlag.TRUE) - .withCanary(CanaryFlag.TRUE) - .withStripped(StrippedFlag.TRUE); + BinaryHardeningFeatures model = new BinaryHardeningFeatures().withNx(false).withPie(true).withRelro(false) + .withCanary(true).withStripped(false); model = BinaryData.fromObject(model).toObject(BinaryHardeningFeatures.class); - Assertions.assertEquals(NxFlag.TRUE, model.nx()); - Assertions.assertEquals(PieFlag.TRUE, model.pie()); - Assertions.assertEquals(RelroFlag.TRUE, model.relro()); - Assertions.assertEquals(CanaryFlag.TRUE, model.canary()); - Assertions.assertEquals(StrippedFlag.TRUE, model.stripped()); + Assertions.assertEquals(false, model.nx()); + Assertions.assertEquals(true, model.pie()); + Assertions.assertEquals(false, model.relro()); + Assertions.assertEquals(true, model.canary()); + Assertions.assertEquals(false, model.stripped()); } } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/BinaryHardeningInnerTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/BinaryHardeningInnerTests.java deleted file mode 100644 index 90879d02b8b11..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/BinaryHardeningInnerTests.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.iotfirmwaredefense.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.BinaryHardeningInner; -import com.azure.resourcemanager.iotfirmwaredefense.models.CanaryFlag; -import com.azure.resourcemanager.iotfirmwaredefense.models.NxFlag; -import com.azure.resourcemanager.iotfirmwaredefense.models.PieFlag; -import com.azure.resourcemanager.iotfirmwaredefense.models.RelroFlag; -import com.azure.resourcemanager.iotfirmwaredefense.models.StrippedFlag; -import org.junit.jupiter.api.Assertions; - -public final class BinaryHardeningInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BinaryHardeningInner model = - BinaryData - .fromString( - "{\"binaryHardeningId\":\"qedqytbciqfoufl\",\"features\":{\"nx\":\"True\",\"pie\":\"False\",\"relro\":\"True\",\"canary\":\"False\",\"stripped\":\"True\"},\"architecture\":\"ugpbkw\",\"path\":\"utduqktapspwgcu\",\"class\":\"tumkdosvqwhbm\",\"runpath\":\"bbjfddgmbmbexp\",\"rpath\":\"htqqrolfp\"}") - .toObject(BinaryHardeningInner.class); - Assertions.assertEquals("qedqytbciqfoufl", model.binaryHardeningId()); - Assertions.assertEquals("ugpbkw", model.architecture()); - Assertions.assertEquals("utduqktapspwgcu", model.path()); - Assertions.assertEquals("tumkdosvqwhbm", model.classProperty()); - Assertions.assertEquals("bbjfddgmbmbexp", model.runpath()); - Assertions.assertEquals("htqqrolfp", model.rpath()); - Assertions.assertEquals(NxFlag.TRUE, model.nx()); - Assertions.assertEquals(PieFlag.FALSE, model.pie()); - Assertions.assertEquals(RelroFlag.TRUE, model.relro()); - Assertions.assertEquals(CanaryFlag.FALSE, model.canary()); - Assertions.assertEquals(StrippedFlag.TRUE, model.stripped()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BinaryHardeningInner model = - new BinaryHardeningInner() - .withBinaryHardeningId("qedqytbciqfoufl") - .withArchitecture("ugpbkw") - .withPath("utduqktapspwgcu") - .withClassProperty("tumkdosvqwhbm") - .withRunpath("bbjfddgmbmbexp") - .withRpath("htqqrolfp") - .withNx(NxFlag.TRUE) - .withPie(PieFlag.FALSE) - .withRelro(RelroFlag.TRUE) - .withCanary(CanaryFlag.FALSE) - .withStripped(StrippedFlag.TRUE); - model = BinaryData.fromObject(model).toObject(BinaryHardeningInner.class); - Assertions.assertEquals("qedqytbciqfoufl", model.binaryHardeningId()); - Assertions.assertEquals("ugpbkw", model.architecture()); - Assertions.assertEquals("utduqktapspwgcu", model.path()); - Assertions.assertEquals("tumkdosvqwhbm", model.classProperty()); - Assertions.assertEquals("bbjfddgmbmbexp", model.runpath()); - Assertions.assertEquals("htqqrolfp", model.rpath()); - Assertions.assertEquals(NxFlag.TRUE, model.nx()); - Assertions.assertEquals(PieFlag.FALSE, model.pie()); - Assertions.assertEquals(RelroFlag.TRUE, model.relro()); - Assertions.assertEquals(CanaryFlag.FALSE, model.canary()); - Assertions.assertEquals(StrippedFlag.TRUE, model.stripped()); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/BinaryHardeningListResultTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/BinaryHardeningListResultTests.java new file mode 100644 index 0000000000000..d4dec7dc4b561 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/BinaryHardeningListResultTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.iotfirmwaredefense.models.BinaryHardeningListResult; +import org.junit.jupiter.api.Assertions; + +public final class BinaryHardeningListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BinaryHardeningListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"binaryHardeningId\":\"uv\",\"features\":{\"nx\":true,\"pie\":false,\"relro\":false,\"canary\":false,\"stripped\":false},\"architecture\":\"zopbsphrupidgs\",\"filePath\":\"bejhphoycmsxa\",\"class\":\"hdxbmtqio\",\"runpath\":\"zehtbmu\",\"rpath\":\"ownoizhw\"},\"id\":\"xybqsoqij\",\"name\":\"k\",\"type\":\"mbpazlobcufpdzn\"},{\"properties\":{\"binaryHardeningId\":\"cqqjnqglhqgn\",\"features\":{\"nx\":false,\"pie\":false,\"relro\":false,\"canary\":true,\"stripped\":false},\"architecture\":\"saagdf\",\"filePath\":\"lzl\",\"class\":\"xrifkwmrvkts\",\"runpath\":\"nt\",\"rpath\":\"ipa\"},\"id\":\"ajpsquc\",\"name\":\"poyfdkfogkn\",\"type\":\"gjofjd\"},{\"properties\":{\"binaryHardeningId\":\"s\",\"features\":{\"nx\":true,\"pie\":true,\"relro\":true,\"canary\":true,\"stripped\":false},\"architecture\":\"jzyflu\",\"filePath\":\"rh\",\"class\":\"fcqhsmyurkd\",\"runpath\":\"lx\",\"rpath\":\"kuksjtxukcdm\"},\"id\":\"rcryuanzwuxzdxta\",\"name\":\"rlhm\",\"type\":\"hfpmrqobmtukknr\"}],\"nextLink\":\"tihfx\"}") + .toObject(BinaryHardeningListResult.class); + Assertions.assertEquals("tihfx", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BinaryHardeningListResult model = new BinaryHardeningListResult().withNextLink("tihfx"); + model = BinaryData.fromObject(model).toObject(BinaryHardeningListResult.class); + Assertions.assertEquals("tihfx", model.nextLink()); + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/BinaryHardeningListTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/BinaryHardeningListTests.java deleted file mode 100644 index ea1f6e846123d..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/BinaryHardeningListTests.java +++ /dev/null @@ -1,28 +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.iotfirmwaredefense.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.iotfirmwaredefense.models.BinaryHardeningList; -import org.junit.jupiter.api.Assertions; - -public final class BinaryHardeningListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BinaryHardeningList model = - BinaryData - .fromString( - "{\"value\":[{\"binaryHardeningId\":\"gsntnbybkzgcwr\",\"features\":{\"nx\":\"True\",\"pie\":\"False\",\"relro\":\"True\",\"canary\":\"False\",\"stripped\":\"False\"},\"architecture\":\"kcqvkocrc\",\"path\":\"kwt\",\"class\":\"xbnjbiksq\",\"runpath\":\"lssai\",\"rpath\":\"p\"},{\"binaryHardeningId\":\"nzl\",\"features\":{\"nx\":\"False\",\"pie\":\"True\",\"relro\":\"False\",\"canary\":\"True\",\"stripped\":\"True\"},\"architecture\":\"sabkyqduujitcjcz\",\"path\":\"evndh\",\"class\":\"wpdappdsbdkv\",\"runpath\":\"wjfeusnhutjel\",\"rpath\":\"rl\"},{\"binaryHardeningId\":\"ugjzzdatqxhocdge\",\"features\":{\"nx\":\"False\",\"pie\":\"False\",\"relro\":\"True\",\"canary\":\"False\",\"stripped\":\"True\"},\"architecture\":\"kao\",\"path\":\"yiftyhxhuro\",\"class\":\"tyxolniwpwc\",\"runpath\":\"jfkgiawxk\",\"rpath\":\"ypl\"},{\"binaryHardeningId\":\"kbasyypn\",\"features\":{\"nx\":\"True\",\"pie\":\"False\",\"relro\":\"False\",\"canary\":\"False\",\"stripped\":\"True\"},\"architecture\":\"koty\",\"path\":\"gou\",\"class\":\"ndlik\",\"runpath\":\"qkgfgibma\",\"rpath\":\"akeqs\"}],\"nextLink\":\"yb\"}") - .toObject(BinaryHardeningList.class); - Assertions.assertEquals("yb", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BinaryHardeningList model = new BinaryHardeningList().withNextLink("yb"); - model = BinaryData.fromObject(model).toObject(BinaryHardeningList.class); - Assertions.assertEquals("yb", model.nextLink()); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/BinaryHardeningResourceInnerTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/BinaryHardeningResourceInnerTests.java new file mode 100644 index 0000000000000..65195374f2a00 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/BinaryHardeningResourceInnerTests.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.BinaryHardeningResourceInner; +import org.junit.jupiter.api.Assertions; + +public final class BinaryHardeningResourceInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BinaryHardeningResourceInner model = BinaryData.fromString( + "{\"properties\":{\"binaryHardeningId\":\"bpzvgn\",\"features\":{\"nx\":true,\"pie\":false,\"relro\":true,\"canary\":true,\"stripped\":true},\"architecture\":\"kohdbiha\",\"filePath\":\"fhfcb\",\"class\":\"s\",\"runpath\":\"ithxqhabifpi\",\"rpath\":\"wczbys\"},\"id\":\"pqxu\",\"name\":\"ivyqniwbybrkxvd\",\"type\":\"mjgr\"}") + .toObject(BinaryHardeningResourceInner.class); + Assertions.assertEquals("bpzvgn", model.binaryHardeningId()); + Assertions.assertEquals("kohdbiha", model.architecture()); + Assertions.assertEquals("fhfcb", model.filePath()); + Assertions.assertEquals("s", model.classProperty()); + Assertions.assertEquals("ithxqhabifpi", model.runpath()); + Assertions.assertEquals("wczbys", model.rpath()); + Assertions.assertEquals(true, model.nx()); + Assertions.assertEquals(false, model.pie()); + Assertions.assertEquals(true, model.relro()); + Assertions.assertEquals(true, model.canary()); + Assertions.assertEquals(true, model.stripped()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BinaryHardeningResourceInner model = new BinaryHardeningResourceInner().withBinaryHardeningId("bpzvgn") + .withArchitecture("kohdbiha").withFilePath("fhfcb").withClassProperty("s").withRunpath("ithxqhabifpi") + .withRpath("wczbys").withNx(true).withPie(false).withRelro(true).withCanary(true).withStripped(true); + model = BinaryData.fromObject(model).toObject(BinaryHardeningResourceInner.class); + Assertions.assertEquals("bpzvgn", model.binaryHardeningId()); + Assertions.assertEquals("kohdbiha", model.architecture()); + Assertions.assertEquals("fhfcb", model.filePath()); + Assertions.assertEquals("s", model.classProperty()); + Assertions.assertEquals("ithxqhabifpi", model.runpath()); + Assertions.assertEquals("wczbys", model.rpath()); + Assertions.assertEquals(true, model.nx()); + Assertions.assertEquals(false, model.pie()); + Assertions.assertEquals(true, model.relro()); + Assertions.assertEquals(true, model.canary()); + Assertions.assertEquals(true, model.stripped()); + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/BinaryHardeningResultTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/BinaryHardeningResultTests.java new file mode 100644 index 0000000000000..ed31cd0668006 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/BinaryHardeningResultTests.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.BinaryHardeningResult; +import org.junit.jupiter.api.Assertions; + +public final class BinaryHardeningResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BinaryHardeningResult model = BinaryData.fromString( + "{\"binaryHardeningId\":\"wvukx\",\"features\":{\"nx\":false,\"pie\":false,\"relro\":true,\"canary\":false,\"stripped\":true},\"architecture\":\"yejhk\",\"filePath\":\"htnapczwlokjyem\",\"class\":\"vnipjox\",\"runpath\":\"nchgej\",\"rpath\":\"odmailzyd\"}") + .toObject(BinaryHardeningResult.class); + Assertions.assertEquals("wvukx", model.binaryHardeningId()); + Assertions.assertEquals("yejhk", model.architecture()); + Assertions.assertEquals("htnapczwlokjyem", model.filePath()); + Assertions.assertEquals("vnipjox", model.classProperty()); + Assertions.assertEquals("nchgej", model.runpath()); + Assertions.assertEquals("odmailzyd", model.rpath()); + Assertions.assertEquals(false, model.nx()); + Assertions.assertEquals(false, model.pie()); + Assertions.assertEquals(true, model.relro()); + Assertions.assertEquals(false, model.canary()); + Assertions.assertEquals(true, model.stripped()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BinaryHardeningResult model = new BinaryHardeningResult().withBinaryHardeningId("wvukx") + .withArchitecture("yejhk").withFilePath("htnapczwlokjyem").withClassProperty("vnipjox") + .withRunpath("nchgej").withRpath("odmailzyd").withNx(false).withPie(false).withRelro(true).withCanary(false) + .withStripped(true); + model = BinaryData.fromObject(model).toObject(BinaryHardeningResult.class); + Assertions.assertEquals("wvukx", model.binaryHardeningId()); + Assertions.assertEquals("yejhk", model.architecture()); + Assertions.assertEquals("htnapczwlokjyem", model.filePath()); + Assertions.assertEquals("vnipjox", model.classProperty()); + Assertions.assertEquals("nchgej", model.runpath()); + Assertions.assertEquals("odmailzyd", model.rpath()); + Assertions.assertEquals(false, model.nx()); + Assertions.assertEquals(false, model.pie()); + Assertions.assertEquals(true, model.relro()); + Assertions.assertEquals(false, model.canary()); + Assertions.assertEquals(true, model.stripped()); + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/BinaryHardeningSummaryInnerTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/BinaryHardeningSummaryInnerTests.java deleted file mode 100644 index e6d1314b00b38..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/BinaryHardeningSummaryInnerTests.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.iotfirmwaredefense.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.BinaryHardeningSummaryInner; -import org.junit.jupiter.api.Assertions; - -public final class BinaryHardeningSummaryInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BinaryHardeningSummaryInner model = - BinaryData - .fromString( - "{\"totalFiles\":2563543164314318183,\"nx\":1739804762,\"pie\":161079646,\"relro\":243879376,\"canary\":2040036621,\"stripped\":1987698558}") - .toObject(BinaryHardeningSummaryInner.class); - Assertions.assertEquals(2563543164314318183L, model.totalFiles()); - Assertions.assertEquals(1739804762, model.nx()); - Assertions.assertEquals(161079646, model.pie()); - Assertions.assertEquals(243879376, model.relro()); - Assertions.assertEquals(2040036621, model.canary()); - Assertions.assertEquals(1987698558, model.stripped()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BinaryHardeningSummaryInner model = - new BinaryHardeningSummaryInner() - .withTotalFiles(2563543164314318183L) - .withNx(1739804762) - .withPie(161079646) - .withRelro(243879376) - .withCanary(2040036621) - .withStripped(1987698558); - model = BinaryData.fromObject(model).toObject(BinaryHardeningSummaryInner.class); - Assertions.assertEquals(2563543164314318183L, model.totalFiles()); - Assertions.assertEquals(1739804762, model.nx()); - Assertions.assertEquals(161079646, model.pie()); - Assertions.assertEquals(243879376, model.relro()); - Assertions.assertEquals(2040036621, model.canary()); - Assertions.assertEquals(1987698558, model.stripped()); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/BinaryHardeningSummaryResourceTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/BinaryHardeningSummaryResourceTests.java new file mode 100644 index 0000000000000..7c91a0f7e738b --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/BinaryHardeningSummaryResourceTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.iotfirmwaredefense.models.BinaryHardeningSummaryResource; +import org.junit.jupiter.api.Assertions; + +public final class BinaryHardeningSummaryResourceTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BinaryHardeningSummaryResource model = BinaryData.fromString( + "{\"summaryType\":\"BinaryHardening\",\"totalFiles\":1588366635739120038,\"nx\":1840512089,\"pie\":903805755,\"relro\":1405180794,\"canary\":142305050,\"stripped\":1098465372}") + .toObject(BinaryHardeningSummaryResource.class); + Assertions.assertEquals(1588366635739120038L, model.totalFiles()); + Assertions.assertEquals(1840512089, model.nx()); + Assertions.assertEquals(903805755, model.pie()); + Assertions.assertEquals(1405180794, model.relro()); + Assertions.assertEquals(142305050, model.canary()); + Assertions.assertEquals(1098465372, model.stripped()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BinaryHardeningSummaryResource model = new BinaryHardeningSummaryResource().withTotalFiles(1588366635739120038L) + .withNx(1840512089).withPie(903805755).withRelro(1405180794).withCanary(142305050).withStripped(1098465372); + model = BinaryData.fromObject(model).toObject(BinaryHardeningSummaryResource.class); + Assertions.assertEquals(1588366635739120038L, model.totalFiles()); + Assertions.assertEquals(1840512089, model.nx()); + Assertions.assertEquals(903805755, model.pie()); + Assertions.assertEquals(1405180794, model.relro()); + Assertions.assertEquals(142305050, model.canary()); + Assertions.assertEquals(1098465372, model.stripped()); + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/BinaryHardeningsListByFirmwareMockTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/BinaryHardeningsListByFirmwareMockTests.java new file mode 100644 index 0000000000000..46a9b135218d8 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/BinaryHardeningsListByFirmwareMockTests.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager; +import com.azure.resourcemanager.iotfirmwaredefense.models.BinaryHardeningResource; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +public final class BinaryHardeningsListByFirmwareMockTests { + @Test + public void testListByFirmware() throws Exception { + HttpClient httpClient = Mockito.mock(HttpClient.class); + HttpResponse httpResponse = Mockito.mock(HttpResponse.class); + ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + + String responseStr + = "{\"value\":[{\"properties\":{\"binaryHardeningId\":\"rzqlveu\",\"features\":{\"nx\":true,\"pie\":false,\"relro\":true,\"canary\":true,\"stripped\":true},\"architecture\":\"cswsrtjri\",\"filePath\":\"rbpbewtghfgblcg\",\"class\":\"zvlvqhjkbegib\",\"runpath\":\"mxiebw\",\"rpath\":\"loayqcgw\"},\"id\":\"zjuzgwyz\",\"name\":\"htxongmtsavjc\",\"type\":\"pwxqp\"}]}"; + + Mockito.when(httpResponse.getStatusCode()).thenReturn(200); + Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); + Mockito.when(httpResponse.getBody()) + .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); + Mockito.when(httpResponse.getBodyAsByteArray()) + .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + IoTFirmwareDefenseManager manager = IoTFirmwareDefenseManager.configure().withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + PagedIterable response = manager.binaryHardenings().listByFirmware("auwhvylwzbtdhx", + "jznb", "pow", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("rzqlveu", response.iterator().next().binaryHardeningId()); + Assertions.assertEquals("cswsrtjri", response.iterator().next().architecture()); + Assertions.assertEquals("rbpbewtghfgblcg", response.iterator().next().filePath()); + Assertions.assertEquals("zvlvqhjkbegib", response.iterator().next().classProperty()); + Assertions.assertEquals("mxiebw", response.iterator().next().runpath()); + Assertions.assertEquals("loayqcgw", response.iterator().next().rpath()); + Assertions.assertEquals(true, response.iterator().next().nx()); + Assertions.assertEquals(false, response.iterator().next().pie()); + Assertions.assertEquals(true, response.iterator().next().relro()); + Assertions.assertEquals(true, response.iterator().next().canary()); + Assertions.assertEquals(true, response.iterator().next().stripped()); + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/ComponentInnerTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/ComponentInnerTests.java deleted file mode 100644 index d2429ca415aaa..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/ComponentInnerTests.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.iotfirmwaredefense.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.ComponentInner; -import com.azure.resourcemanager.iotfirmwaredefense.models.IsUpdateAvailable; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ComponentInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComponentInner model = - BinaryData - .fromString( - "{\"componentId\":\"iheogna\",\"componentName\":\"zxtheotusivyevcc\",\"version\":\"ihnhun\",\"license\":\"wjzrnfygxgisp\",\"releaseDate\":\"2021-05-03T11:09:18Z\",\"paths\":[\"fkufublj\",\"fxqeof\",\"aeqjhqjbasvms\"],\"isUpdateAvailable\":\"False\"}") - .toObject(ComponentInner.class); - Assertions.assertEquals("iheogna", model.componentId()); - Assertions.assertEquals("zxtheotusivyevcc", model.componentName()); - Assertions.assertEquals("ihnhun", model.version()); - Assertions.assertEquals("wjzrnfygxgisp", model.license()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-03T11:09:18Z"), model.releaseDate()); - Assertions.assertEquals("fkufublj", model.paths().get(0)); - Assertions.assertEquals(IsUpdateAvailable.FALSE, model.isUpdateAvailable()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComponentInner model = - new ComponentInner() - .withComponentId("iheogna") - .withComponentName("zxtheotusivyevcc") - .withVersion("ihnhun") - .withLicense("wjzrnfygxgisp") - .withReleaseDate(OffsetDateTime.parse("2021-05-03T11:09:18Z")) - .withPaths(Arrays.asList("fkufublj", "fxqeof", "aeqjhqjbasvms")) - .withIsUpdateAvailable(IsUpdateAvailable.FALSE); - model = BinaryData.fromObject(model).toObject(ComponentInner.class); - Assertions.assertEquals("iheogna", model.componentId()); - Assertions.assertEquals("zxtheotusivyevcc", model.componentName()); - Assertions.assertEquals("ihnhun", model.version()); - Assertions.assertEquals("wjzrnfygxgisp", model.license()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-03T11:09:18Z"), model.releaseDate()); - Assertions.assertEquals("fkufublj", model.paths().get(0)); - Assertions.assertEquals(IsUpdateAvailable.FALSE, model.isUpdateAvailable()); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/ComponentListTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/ComponentListTests.java deleted file mode 100644 index 6fbeca1c7cae9..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/ComponentListTests.java +++ /dev/null @@ -1,28 +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.iotfirmwaredefense.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.iotfirmwaredefense.models.ComponentList; -import org.junit.jupiter.api.Assertions; - -public final class ComponentListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComponentList model = - BinaryData - .fromString( - "{\"value\":[{\"componentId\":\"f\",\"componentName\":\"s\",\"version\":\"zgvfcjrwz\",\"license\":\"xjtfelluwfzit\",\"releaseDate\":\"2021-10-17T22:50:15Z\",\"paths\":[\"fpjkjlxofp\",\"vhpfxxypininmay\"],\"isUpdateAvailable\":\"True\"}],\"nextLink\":\"bkpodepooginuv\"}") - .toObject(ComponentList.class); - Assertions.assertEquals("bkpodepooginuv", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComponentList model = new ComponentList().withNextLink("bkpodepooginuv"); - model = BinaryData.fromObject(model).toObject(ComponentList.class); - Assertions.assertEquals("bkpodepooginuv", model.nextLink()); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CryptoCertificateEntityTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CryptoCertificateEntityTests.java index f15795f868a17..2d860a6df3546 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CryptoCertificateEntityTests.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CryptoCertificateEntityTests.java @@ -11,32 +11,26 @@ public final class CryptoCertificateEntityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - CryptoCertificateEntity model = - BinaryData - .fromString( - "{\"commonName\":\"daj\",\"organization\":\"ysou\",\"organizationalUnit\":\"e\",\"state\":\"noae\",\"country\":\"fhyhltrpmopjmcma\"}") - .toObject(CryptoCertificateEntity.class); - Assertions.assertEquals("daj", model.commonName()); - Assertions.assertEquals("ysou", model.organization()); - Assertions.assertEquals("e", model.organizationalUnit()); - Assertions.assertEquals("noae", model.state()); - Assertions.assertEquals("fhyhltrpmopjmcma", model.country()); + CryptoCertificateEntity model = BinaryData.fromString( + "{\"commonName\":\"xklrypl\",\"organization\":\"kbasyypn\",\"organizationalUnit\":\"hsgcbacphejkot\",\"state\":\"qgoulznd\",\"country\":\"kwy\"}") + .toObject(CryptoCertificateEntity.class); + Assertions.assertEquals("xklrypl", model.commonName()); + Assertions.assertEquals("kbasyypn", model.organization()); + Assertions.assertEquals("hsgcbacphejkot", model.organizationalUnit()); + Assertions.assertEquals("qgoulznd", model.state()); + Assertions.assertEquals("kwy", model.country()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CryptoCertificateEntity model = - new CryptoCertificateEntity() - .withCommonName("daj") - .withOrganization("ysou") - .withOrganizationalUnit("e") - .withState("noae") - .withCountry("fhyhltrpmopjmcma"); + CryptoCertificateEntity model + = new CryptoCertificateEntity().withCommonName("xklrypl").withOrganization("kbasyypn") + .withOrganizationalUnit("hsgcbacphejkot").withState("qgoulznd").withCountry("kwy"); model = BinaryData.fromObject(model).toObject(CryptoCertificateEntity.class); - Assertions.assertEquals("daj", model.commonName()); - Assertions.assertEquals("ysou", model.organization()); - Assertions.assertEquals("e", model.organizationalUnit()); - Assertions.assertEquals("noae", model.state()); - Assertions.assertEquals("fhyhltrpmopjmcma", model.country()); + Assertions.assertEquals("xklrypl", model.commonName()); + Assertions.assertEquals("kbasyypn", model.organization()); + Assertions.assertEquals("hsgcbacphejkot", model.organizationalUnit()); + Assertions.assertEquals("qgoulznd", model.state()); + Assertions.assertEquals("kwy", model.country()); } } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CveComponentTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CveComponentTests.java new file mode 100644 index 0000000000000..91bd3877b0180 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CveComponentTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.iotfirmwaredefense.models.CveComponent; +import org.junit.jupiter.api.Assertions; + +public final class CveComponentTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CveComponent model + = BinaryData.fromString("{\"componentId\":\"zmyzydagf\",\"name\":\"xbezyiuokktwh\",\"version\":\"xw\"}") + .toObject(CveComponent.class); + Assertions.assertEquals("zmyzydagf", model.componentId()); + Assertions.assertEquals("xbezyiuokktwh", model.name()); + Assertions.assertEquals("xw", model.version()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CveComponent model + = new CveComponent().withComponentId("zmyzydagf").withName("xbezyiuokktwh").withVersion("xw"); + model = BinaryData.fromObject(model).toObject(CveComponent.class); + Assertions.assertEquals("zmyzydagf", model.componentId()); + Assertions.assertEquals("xbezyiuokktwh", model.name()); + Assertions.assertEquals("xw", model.version()); + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CveInnerTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CveInnerTests.java deleted file mode 100644 index 7bddcd88fb7b3..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CveInnerTests.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.iotfirmwaredefense.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CveInner; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class CveInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CveInner model = - BinaryData - .fromString( - "{\"cveId\":\"rzayv\",\"component\":\"datapgvdf\",\"severity\":\"otkftutqxlngx\",\"name\":\"fgugnxkrxdqmid\",\"cvssScore\":\"hzrvqd\",\"cvssVersion\":\"bhj\",\"cvssV2Score\":\"igeho\",\"cvssV3Score\":\"bowsk\",\"publishDate\":\"2021-10-18T00:51:47Z\",\"updatedDate\":\"2020-12-21T07:17:40Z\",\"links\":[{\"href\":\"u\",\"label\":\"wgqyw\"},{\"href\":\"drvyn\",\"label\":\"gpphrcgyn\"},{\"href\":\"cpecfvmmcoofs\",\"label\":\"zevgb\"},{\"href\":\"jqabcypmivkwlzuv\",\"label\":\"fwnfnb\"}],\"description\":\"fionl\"}") - .toObject(CveInner.class); - Assertions.assertEquals("rzayv", model.cveId()); - Assertions.assertEquals("otkftutqxlngx", model.severity()); - Assertions.assertEquals("fgugnxkrxdqmid", model.name()); - Assertions.assertEquals("hzrvqd", model.cvssScore()); - Assertions.assertEquals("bhj", model.cvssVersion()); - Assertions.assertEquals("igeho", model.cvssV2Score()); - Assertions.assertEquals("bowsk", model.cvssV3Score()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-18T00:51:47Z"), model.publishDate()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-21T07:17:40Z"), model.updatedDate()); - Assertions.assertEquals("fionl", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CveInner model = - new CveInner() - .withCveId("rzayv") - .withComponent("datapgvdf") - .withSeverity("otkftutqxlngx") - .withName("fgugnxkrxdqmid") - .withCvssScore("hzrvqd") - .withCvssVersion("bhj") - .withCvssV2Score("igeho") - .withCvssV3Score("bowsk") - .withPublishDate(OffsetDateTime.parse("2021-10-18T00:51:47Z")) - .withUpdatedDate(OffsetDateTime.parse("2020-12-21T07:17:40Z")) - .withDescription("fionl"); - model = BinaryData.fromObject(model).toObject(CveInner.class); - Assertions.assertEquals("rzayv", model.cveId()); - Assertions.assertEquals("otkftutqxlngx", model.severity()); - Assertions.assertEquals("fgugnxkrxdqmid", model.name()); - Assertions.assertEquals("hzrvqd", model.cvssScore()); - Assertions.assertEquals("bhj", model.cvssVersion()); - Assertions.assertEquals("igeho", model.cvssV2Score()); - Assertions.assertEquals("bowsk", model.cvssV3Score()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-18T00:51:47Z"), model.publishDate()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-21T07:17:40Z"), model.updatedDate()); - Assertions.assertEquals("fionl", model.description()); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CveLinkTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CveLinkTests.java index f7a7bbd100099..8e763e0b579d3 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CveLinkTests.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CveLinkTests.java @@ -11,16 +11,17 @@ public final class CveLinkTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - CveLink model = BinaryData.fromString("{\"href\":\"x\",\"label\":\"qgtz\"}").toObject(CveLink.class); - Assertions.assertEquals("x", model.href()); - Assertions.assertEquals("qgtz", model.label()); + CveLink model + = BinaryData.fromString("{\"href\":\"wqsmbsur\",\"label\":\"imoryocfsfksym\"}").toObject(CveLink.class); + Assertions.assertEquals("wqsmbsur", model.href()); + Assertions.assertEquals("imoryocfsfksym", model.label()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CveLink model = new CveLink().withHref("x").withLabel("qgtz"); + CveLink model = new CveLink().withHref("wqsmbsur").withLabel("imoryocfsfksym"); model = BinaryData.fromObject(model).toObject(CveLink.class); - Assertions.assertEquals("x", model.href()); - Assertions.assertEquals("qgtz", model.label()); + Assertions.assertEquals("wqsmbsur", model.href()); + Assertions.assertEquals("imoryocfsfksym", model.label()); } } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CveListResultTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CveListResultTests.java new file mode 100644 index 0000000000000..e20fba94be910 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CveListResultTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.iotfirmwaredefense.models.CveListResult; +import org.junit.jupiter.api.Assertions; + +public final class CveListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CveListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"cveId\":\"qktapspwgcuert\",\"component\":{\"componentId\":\"dosvqwhbmdgbbjf\",\"name\":\"gmbmbexppbh\",\"version\":\"qrolfpf\"},\"severity\":\"algbquxigjyjg\",\"name\":\"aoyfhrtxilnerkuj\",\"cvssScore\":\"vlejuvfqa\",\"cvssVersion\":\"lyxwjkcprbnwbx\",\"cvssV2Score\":\"vtb\",\"cvssV3Score\":\"ysszdnrujqguh\",\"links\":[{\"href\":\"qfprwzwbn\",\"label\":\"itnwuizgazxufi\"},{\"href\":\"ckyfih\",\"label\":\"idf\"}],\"description\":\"wdzuhtymwisd\"},\"id\":\"thwxmnteiwaopvkm\",\"name\":\"jcmmxdcufufsrp\",\"type\":\"mzidnsezcxtb\"},{\"properties\":{\"cveId\":\"fycc\",\"component\":{\"componentId\":\"wmdwzjeiachboo\",\"name\":\"lnrosfqp\",\"version\":\"ehzzvypyqrim\"},\"severity\":\"npvswjdkirso\",\"name\":\"qxhcrmn\",\"cvssScore\":\"jtckwhdso\",\"cvssVersion\":\"iy\",\"cvssV2Score\":\"jxsqwpgrjbz\",\"cvssV3Score\":\"rcjxvsnbyxqabn\",\"links\":[{\"href\":\"cyshurzafbljjgp\",\"label\":\"oq\"}],\"description\":\"mkljavb\"},\"id\":\"dtqajzyulpkudj\",\"name\":\"rlkhbzhfepgzgq\",\"type\":\"xzlocxscp\"},{\"properties\":{\"cveId\":\"rhhbcs\",\"component\":{\"componentId\":\"mmajtjaodx\",\"name\":\"nbdxk\",\"version\":\"xo\"},\"severity\":\"jionpimexgstxgc\",\"name\":\"dg\",\"cvssScore\":\"ajrmvdjwzrlovmc\",\"cvssVersion\":\"hijco\",\"cvssV2Score\":\"ctbzaq\",\"cvssV3Score\":\"sycbkbfk\",\"links\":[{\"href\":\"kexxppof\",\"label\":\"axcfjpgddtocjjx\"},{\"href\":\"pmouexhdz\",\"label\":\"bqe\"}],\"description\":\"nxqbzvddn\"},\"id\":\"ndei\",\"name\":\"btwnpzaoqvuhrhcf\",\"type\":\"cyddglmjthjqk\"},{\"properties\":{\"cveId\":\"eicxmqciwqvhkhi\",\"component\":{\"componentId\":\"gdtopbobjogh\",\"name\":\"w\",\"version\":\"m\"},\"severity\":\"hrzayvvtpgvdf\",\"name\":\"otkftutqxlngx\",\"cvssScore\":\"fgugnxkrxdqmid\",\"cvssVersion\":\"hzrvqd\",\"cvssV2Score\":\"bhj\",\"cvssV3Score\":\"igeho\",\"links\":[{\"href\":\"wska\",\"label\":\"ktzlcuiywg\"},{\"href\":\"wgndrvynhzgpp\",\"label\":\"cgyncocpecf\"}],\"description\":\"mcoo\"},\"id\":\"xlzevgbmqjqabcy\",\"name\":\"mivkwlzuvcc\",\"type\":\"wnfnbacf\"}],\"nextLink\":\"nlebxetqgtzxd\"}") + .toObject(CveListResult.class); + Assertions.assertEquals("nlebxetqgtzxd", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CveListResult model = new CveListResult().withNextLink("nlebxetqgtzxd"); + model = BinaryData.fromObject(model).toObject(CveListResult.class); + Assertions.assertEquals("nlebxetqgtzxd", model.nextLink()); + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CveListTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CveListTests.java deleted file mode 100644 index 1b946e963e266..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CveListTests.java +++ /dev/null @@ -1,28 +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.iotfirmwaredefense.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.iotfirmwaredefense.models.CveList; -import org.junit.jupiter.api.Assertions; - -public final class CveListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CveList model = - BinaryData - .fromString( - "{\"value\":[{\"cveId\":\"bnwbxgjvtbvpyssz\",\"component\":\"datarujqg\",\"severity\":\"muouqfp\",\"name\":\"zw\",\"cvssScore\":\"g\",\"cvssVersion\":\"tnwu\",\"cvssV2Score\":\"gazxuf\",\"cvssV3Score\":\"uckyf\",\"publishDate\":\"2021-05-30T20:21:31Z\",\"updatedDate\":\"2021-03-02T12:22:29Z\",\"links\":[{\"href\":\"zwdzuh\",\"label\":\"mwisdkfthwxmnt\"},{\"href\":\"waopvkmijcmmxd\",\"label\":\"fufsrpymzi\"},{\"href\":\"sezcxtb\",\"label\":\"gfycc\"}],\"description\":\"ewmdw\"},{\"cveId\":\"eiachboosflnr\",\"component\":\"datafqpte\",\"severity\":\"zzvypyqrimzinp\",\"name\":\"wjdk\",\"cvssScore\":\"soodqxhcrmnoh\",\"cvssVersion\":\"ckwhds\",\"cvssV2Score\":\"fiyipjxsqwpgrj\",\"cvssV3Score\":\"norcjxvsnbyxqab\",\"publishDate\":\"2021-01-31T04:10:32Z\",\"updatedDate\":\"2021-11-28T11:46Z\",\"links\":[{\"href\":\"hurzafblj\",\"label\":\"pbtoqcjmkl\"}],\"description\":\"vbqid\"},{\"cveId\":\"ajzyul\",\"component\":\"datau\",\"severity\":\"krlkhbzhfepg\",\"name\":\"qex\",\"cvssScore\":\"ocxscpaierhhbcs\",\"cvssVersion\":\"ummajtjaod\",\"cvssV2Score\":\"bnbdxkqpxokajion\",\"cvssV3Score\":\"mexgstxgcp\",\"publishDate\":\"2021-04-23T14:47:55Z\",\"updatedDate\":\"2020-12-20T13:07:36Z\",\"links\":[{\"href\":\"mvdjwzrlovmc\",\"label\":\"hijco\"},{\"href\":\"ctbzaq\",\"label\":\"sycbkbfk\"},{\"href\":\"kdkexxp\",\"label\":\"fmxa\"}],\"description\":\"fjpgddtocjjxhvp\"},{\"cveId\":\"uexhdzx\",\"component\":\"dataqeojnxqbzvddntw\",\"severity\":\"eic\",\"name\":\"w\",\"cvssScore\":\"zao\",\"cvssVersion\":\"uhrhcffcyddgl\",\"cvssV2Score\":\"t\",\"cvssV3Score\":\"qkwpyeicxmqc\",\"publishDate\":\"2021-08-11T13:08:26Z\",\"updatedDate\":\"2021-01-16T07:23:11Z\",\"links\":[{\"href\":\"xuigdtopbobj\",\"label\":\"hm\"}],\"description\":\"u\"}],\"nextLink\":\"a\"}") - .toObject(CveList.class); - Assertions.assertEquals("a", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CveList model = new CveList().withNextLink("a"); - model = BinaryData.fromObject(model).toObject(CveList.class); - Assertions.assertEquals("a", model.nextLink()); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CveResourceInnerTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CveResourceInnerTests.java new file mode 100644 index 0000000000000..957cbc143e830 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CveResourceInnerTests.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CveResourceInner; +import com.azure.resourcemanager.iotfirmwaredefense.models.CveComponent; +import org.junit.jupiter.api.Assertions; + +public final class CveResourceInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CveResourceInner model = BinaryData.fromString( + "{\"properties\":{\"cveId\":\"bqqwxrj\",\"component\":{\"componentId\":\"llnwsubi\",\"name\":\"jampmngnzscxaqw\",\"version\":\"chcbonqvpkvlrxnj\"},\"severity\":\"seiphe\",\"name\":\"lokeyy\",\"cvssScore\":\"nj\",\"cvssVersion\":\"lwtgrhpdj\",\"cvssV2Score\":\"umasxazjpq\",\"cvssV3Score\":\"gual\",\"links\":[{\"href\":\"hejjz\",\"label\":\"dudgwdslfhot\"},{\"href\":\"cynpwlbjnp\",\"label\":\"cftadeh\"},{\"href\":\"ltyfsop\",\"label\":\"suesnzw\"}],\"description\":\"jbavorxzdm\"},\"id\":\"ctbqvudwx\",\"name\":\"ndnvo\",\"type\":\"gujjugwdkcglh\"}") + .toObject(CveResourceInner.class); + Assertions.assertEquals("bqqwxrj", model.cveId()); + Assertions.assertEquals("llnwsubi", model.component().componentId()); + Assertions.assertEquals("jampmngnzscxaqw", model.component().name()); + Assertions.assertEquals("chcbonqvpkvlrxnj", model.component().version()); + Assertions.assertEquals("seiphe", model.severity()); + Assertions.assertEquals("lokeyy", model.namePropertiesName()); + Assertions.assertEquals("nj", model.cvssScore()); + Assertions.assertEquals("lwtgrhpdj", model.cvssVersion()); + Assertions.assertEquals("umasxazjpq", model.cvssV2Score()); + Assertions.assertEquals("gual", model.cvssV3Score()); + Assertions.assertEquals("jbavorxzdm", model.description()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CveResourceInner model = new CveResourceInner().withCveId("bqqwxrj") + .withComponent(new CveComponent().withComponentId("llnwsubi").withName("jampmngnzscxaqw") + .withVersion("chcbonqvpkvlrxnj")) + .withSeverity("seiphe").withNamePropertiesName("lokeyy").withCvssScore("nj").withCvssVersion("lwtgrhpdj") + .withCvssV2Score("umasxazjpq").withCvssV3Score("gual").withDescription("jbavorxzdm"); + model = BinaryData.fromObject(model).toObject(CveResourceInner.class); + Assertions.assertEquals("bqqwxrj", model.cveId()); + Assertions.assertEquals("llnwsubi", model.component().componentId()); + Assertions.assertEquals("jampmngnzscxaqw", model.component().name()); + Assertions.assertEquals("chcbonqvpkvlrxnj", model.component().version()); + Assertions.assertEquals("seiphe", model.severity()); + Assertions.assertEquals("lokeyy", model.namePropertiesName()); + Assertions.assertEquals("nj", model.cvssScore()); + Assertions.assertEquals("lwtgrhpdj", model.cvssVersion()); + Assertions.assertEquals("umasxazjpq", model.cvssV2Score()); + Assertions.assertEquals("gual", model.cvssV3Score()); + Assertions.assertEquals("jbavorxzdm", model.description()); + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CveResultTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CveResultTests.java new file mode 100644 index 0000000000000..b305f68cf8172 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CveResultTests.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CveResult; +import com.azure.resourcemanager.iotfirmwaredefense.models.CveComponent; +import org.junit.jupiter.api.Assertions; + +public final class CveResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CveResult model = BinaryData.fromString( + "{\"cveId\":\"azjdyggd\",\"component\":{\"componentId\":\"xhbkuofq\",\"name\":\"yk\",\"version\":\"enevfyexfwhybci\"},\"severity\":\"yvdcsitynnaa\",\"name\":\"ectehf\",\"cvssScore\":\"scjeypv\",\"cvssVersion\":\"zrkgqhcjrefovg\",\"cvssV2Score\":\"qsl\",\"cvssV3Score\":\"yvxyqjp\",\"links\":[{\"href\":\"tpngjcrcczsqpjh\",\"label\":\"daj\"},{\"href\":\"ysou\",\"label\":\"e\"},{\"href\":\"noae\",\"label\":\"fhyhltrpmopjmcma\"},{\"href\":\"okth\",\"label\":\"iuaod\"}],\"description\":\"cpkvxodp\"}") + .toObject(CveResult.class); + Assertions.assertEquals("azjdyggd", model.cveId()); + Assertions.assertEquals("xhbkuofq", model.component().componentId()); + Assertions.assertEquals("yk", model.component().name()); + Assertions.assertEquals("enevfyexfwhybci", model.component().version()); + Assertions.assertEquals("yvdcsitynnaa", model.severity()); + Assertions.assertEquals("ectehf", model.name()); + Assertions.assertEquals("scjeypv", model.cvssScore()); + Assertions.assertEquals("zrkgqhcjrefovg", model.cvssVersion()); + Assertions.assertEquals("qsl", model.cvssV2Score()); + Assertions.assertEquals("yvxyqjp", model.cvssV3Score()); + Assertions.assertEquals("cpkvxodp", model.description()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CveResult model = new CveResult().withCveId("azjdyggd") + .withComponent(new CveComponent().withComponentId("xhbkuofq").withName("yk").withVersion("enevfyexfwhybci")) + .withSeverity("yvdcsitynnaa").withName("ectehf").withCvssScore("scjeypv").withCvssVersion("zrkgqhcjrefovg") + .withCvssV2Score("qsl").withCvssV3Score("yvxyqjp").withDescription("cpkvxodp"); + model = BinaryData.fromObject(model).toObject(CveResult.class); + Assertions.assertEquals("azjdyggd", model.cveId()); + Assertions.assertEquals("xhbkuofq", model.component().componentId()); + Assertions.assertEquals("yk", model.component().name()); + Assertions.assertEquals("enevfyexfwhybci", model.component().version()); + Assertions.assertEquals("yvdcsitynnaa", model.severity()); + Assertions.assertEquals("ectehf", model.name()); + Assertions.assertEquals("scjeypv", model.cvssScore()); + Assertions.assertEquals("zrkgqhcjrefovg", model.cvssVersion()); + Assertions.assertEquals("qsl", model.cvssV2Score()); + Assertions.assertEquals("yvxyqjp", model.cvssV3Score()); + Assertions.assertEquals("cpkvxodp", model.description()); + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CveSummaryInnerTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CveSummaryInnerTests.java deleted file mode 100644 index aa285aa876f01..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CveSummaryInnerTests.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.iotfirmwaredefense.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.CveSummaryInner; -import org.junit.jupiter.api.Assertions; - -public final class CveSummaryInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CveSummaryInner model = - BinaryData - .fromString( - "{\"critical\":4368619677721418751,\"high\":7743628540054408847,\"medium\":5911991287657256269,\"low\":2526678259667108543,\"unknown\":1458668924048164836,\"undefined\":383995801038376266}") - .toObject(CveSummaryInner.class); - Assertions.assertEquals(4368619677721418751L, model.critical()); - Assertions.assertEquals(7743628540054408847L, model.high()); - Assertions.assertEquals(5911991287657256269L, model.medium()); - Assertions.assertEquals(2526678259667108543L, model.low()); - Assertions.assertEquals(1458668924048164836L, model.unknown()); - Assertions.assertEquals(383995801038376266L, model.undefined()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CveSummaryInner model = - new CveSummaryInner() - .withCritical(4368619677721418751L) - .withHigh(7743628540054408847L) - .withMedium(5911991287657256269L) - .withLow(2526678259667108543L) - .withUnknown(1458668924048164836L) - .withUndefined(383995801038376266L); - model = BinaryData.fromObject(model).toObject(CveSummaryInner.class); - Assertions.assertEquals(4368619677721418751L, model.critical()); - Assertions.assertEquals(7743628540054408847L, model.high()); - Assertions.assertEquals(5911991287657256269L, model.medium()); - Assertions.assertEquals(2526678259667108543L, model.low()); - Assertions.assertEquals(1458668924048164836L, model.unknown()); - Assertions.assertEquals(383995801038376266L, model.undefined()); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CveSummaryTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CveSummaryTests.java new file mode 100644 index 0000000000000..338aa5fe26582 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CveSummaryTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.iotfirmwaredefense.models.CveSummary; +import org.junit.jupiter.api.Assertions; + +public final class CveSummaryTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CveSummary model = BinaryData.fromString( + "{\"summaryType\":\"CVE\",\"critical\":2851326765545975201,\"high\":3602555477170687906,\"medium\":7412584900785787675,\"low\":7022663417329031305,\"unknown\":6962157826226813076}") + .toObject(CveSummary.class); + Assertions.assertEquals(2851326765545975201L, model.critical()); + Assertions.assertEquals(3602555477170687906L, model.high()); + Assertions.assertEquals(7412584900785787675L, model.medium()); + Assertions.assertEquals(7022663417329031305L, model.low()); + Assertions.assertEquals(6962157826226813076L, model.unknown()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CveSummary model = new CveSummary().withCritical(2851326765545975201L).withHigh(3602555477170687906L) + .withMedium(7412584900785787675L).withLow(7022663417329031305L).withUnknown(6962157826226813076L); + model = BinaryData.fromObject(model).toObject(CveSummary.class); + Assertions.assertEquals(2851326765545975201L, model.critical()); + Assertions.assertEquals(3602555477170687906L, model.high()); + Assertions.assertEquals(7412584900785787675L, model.medium()); + Assertions.assertEquals(7022663417329031305L, model.low()); + Assertions.assertEquals(6962157826226813076L, model.unknown()); + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CvesListByFirmwareMockTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CvesListByFirmwareMockTests.java new file mode 100644 index 0000000000000..c7eb32dba12fd --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/CvesListByFirmwareMockTests.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager; +import com.azure.resourcemanager.iotfirmwaredefense.models.CveResource; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +public final class CvesListByFirmwareMockTests { + @Test + public void testListByFirmware() throws Exception { + HttpClient httpClient = Mockito.mock(HttpClient.class); + HttpResponse httpResponse = Mockito.mock(HttpResponse.class); + ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + + String responseStr + = "{\"value\":[{\"properties\":{\"cveId\":\"pnapnyiropuh\",\"component\":{\"componentId\":\"vpgylgqgitxmed\",\"name\":\"c\",\"version\":\"ynqwwncwzzhxgk\"},\"severity\":\"mgucna\",\"name\":\"t\",\"cvssScore\":\"ellwptfdy\",\"cvssVersion\":\"fqbuaceopzf\",\"cvssV2Score\":\"hhuao\",\"cvssV3Score\":\"pcqeqx\",\"links\":[{\"href\":\"ahzxctobgbk\",\"label\":\"oizpostmgrcfbun\"}],\"description\":\"fqjhhkxbpvjymj\"},\"id\":\"xjyngudivk\",\"name\":\"tswb\",\"type\":\"qzvszjf\"}]}"; + + Mockito.when(httpResponse.getStatusCode()).thenReturn(200); + Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); + Mockito.when(httpResponse.getBody()) + .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); + Mockito.when(httpResponse.getBodyAsByteArray()) + .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + IoTFirmwareDefenseManager manager = IoTFirmwareDefenseManager.configure().withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + PagedIterable response + = manager.cves().listByFirmware("o", "hb", "xknalaulppg", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("pnapnyiropuh", response.iterator().next().cveId()); + Assertions.assertEquals("vpgylgqgitxmed", response.iterator().next().component().componentId()); + Assertions.assertEquals("c", response.iterator().next().component().name()); + Assertions.assertEquals("ynqwwncwzzhxgk", response.iterator().next().component().version()); + Assertions.assertEquals("mgucna", response.iterator().next().severity()); + Assertions.assertEquals("t", response.iterator().next().namePropertiesName()); + Assertions.assertEquals("ellwptfdy", response.iterator().next().cvssScore()); + Assertions.assertEquals("fqbuaceopzf", response.iterator().next().cvssVersion()); + Assertions.assertEquals("hhuao", response.iterator().next().cvssV2Score()); + Assertions.assertEquals("pcqeqx", response.iterator().next().cvssV3Score()); + Assertions.assertEquals("fqjhhkxbpvjymj", response.iterator().next().description()); + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareInnerTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareInnerTests.java deleted file mode 100644 index 31ad01139a11f..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareInnerTests.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.iotfirmwaredefense.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.FirmwareInner; -import com.azure.resourcemanager.iotfirmwaredefense.models.Status; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class FirmwareInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FirmwareInner model = - BinaryData - .fromString( - "{\"properties\":{\"fileName\":\"fcyzkohdbihanufh\",\"vendor\":\"bj\",\"model\":\"a\",\"version\":\"th\",\"description\":\"hab\",\"fileSize\":8979181371698395815,\"status\":\"Analyzing\",\"statusMessages\":[\"datazb\",\"datascnpqxuhivy\"],\"provisioningState\":\"Failed\"},\"id\":\"b\",\"name\":\"br\",\"type\":\"xvd\"}") - .toObject(FirmwareInner.class); - Assertions.assertEquals("fcyzkohdbihanufh", model.fileName()); - Assertions.assertEquals("bj", model.vendor()); - Assertions.assertEquals("a", model.model()); - Assertions.assertEquals("th", model.version()); - Assertions.assertEquals("hab", model.description()); - Assertions.assertEquals(8979181371698395815L, model.fileSize()); - Assertions.assertEquals(Status.ANALYZING, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FirmwareInner model = - new FirmwareInner() - .withFileName("fcyzkohdbihanufh") - .withVendor("bj") - .withModel("a") - .withVersion("th") - .withDescription("hab") - .withFileSize(8979181371698395815L) - .withStatus(Status.ANALYZING) - .withStatusMessages(Arrays.asList("datazb", "datascnpqxuhivy")); - model = BinaryData.fromObject(model).toObject(FirmwareInner.class); - Assertions.assertEquals("fcyzkohdbihanufh", model.fileName()); - Assertions.assertEquals("bj", model.vendor()); - Assertions.assertEquals("a", model.model()); - Assertions.assertEquals("th", model.version()); - Assertions.assertEquals("hab", model.description()); - Assertions.assertEquals(8979181371698395815L, model.fileSize()); - Assertions.assertEquals(Status.ANALYZING, model.status()); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareListTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareListTests.java deleted file mode 100644 index 3fa2511a5d891..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareListTests.java +++ /dev/null @@ -1,28 +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.iotfirmwaredefense.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.iotfirmwaredefense.models.FirmwareList; -import org.junit.jupiter.api.Assertions; - -public final class FirmwareListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FirmwareList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"fileName\":\"uv\",\"vendor\":\"xpyb\",\"model\":\"m\",\"version\":\"mtz\",\"description\":\"bsphrupidgsybbe\",\"fileSize\":1367507172981204915,\"status\":\"Analyzing\",\"statusMessages\":[\"datasx\",\"dataobhdxbmtqioqjze\"],\"provisioningState\":\"Succeeded\"},\"id\":\"ufpo\",\"name\":\"noi\",\"type\":\"hwlrx\"},{\"properties\":{\"fileName\":\"soqijg\",\"vendor\":\"mbpazlobcufpdzn\",\"model\":\"t\",\"version\":\"qjnqglhqgnufoooj\",\"description\":\"ifsqesaagdfmg\",\"fileSize\":5657078495382185794,\"status\":\"Error\",\"statusMessages\":[\"dataf\",\"datawmrvktsizntocipa\",\"datauajpsquc\",\"datapoyfdkfogkn\"],\"provisioningState\":\"Succeeded\"},\"id\":\"fjddeqs\",\"name\":\"deupewnwrei\",\"type\":\"jzyflu\"},{\"properties\":{\"fileName\":\"hmofc\",\"vendor\":\"smy\",\"model\":\"kdtmlxhekuk\",\"version\":\"txukcdmp\",\"description\":\"cryuan\",\"fileSize\":8444265625651342832,\"status\":\"Error\",\"statusMessages\":[\"dataa\"],\"provisioningState\":\"Failed\"},\"id\":\"m\",\"name\":\"hfpmrqobmtukknr\",\"type\":\"rtihfxtijbpz\"}],\"nextLink\":\"nwzsymg\"}") - .toObject(FirmwareList.class); - Assertions.assertEquals("nwzsymg", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FirmwareList model = new FirmwareList().withNextLink("nwzsymg"); - model = BinaryData.fromObject(model).toObject(FirmwareList.class); - Assertions.assertEquals("nwzsymg", model.nextLink()); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwarePropertiesTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwarePropertiesTests.java deleted file mode 100644 index 35ff158065a55..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwarePropertiesTests.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.iotfirmwaredefense.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.FirmwareProperties; -import com.azure.resourcemanager.iotfirmwaredefense.models.Status; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class FirmwarePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FirmwareProperties model = - BinaryData - .fromString( - "{\"fileName\":\"jgrtfwvukxga\",\"vendor\":\"ccsnhsjc\",\"model\":\"ejhkry\",\"version\":\"napczwlokjy\",\"description\":\"kkvnipjox\",\"fileSize\":6610645791355850354,\"status\":\"Extracting\",\"statusMessages\":[\"dataspodmail\",\"dataydehoj\",\"datayahux\",\"datanpmqnjaqwixjspro\"],\"provisioningState\":\"Failed\"}") - .toObject(FirmwareProperties.class); - Assertions.assertEquals("jgrtfwvukxga", model.fileName()); - Assertions.assertEquals("ccsnhsjc", model.vendor()); - Assertions.assertEquals("ejhkry", model.model()); - Assertions.assertEquals("napczwlokjy", model.version()); - Assertions.assertEquals("kkvnipjox", model.description()); - Assertions.assertEquals(6610645791355850354L, model.fileSize()); - Assertions.assertEquals(Status.EXTRACTING, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FirmwareProperties model = - new FirmwareProperties() - .withFileName("jgrtfwvukxga") - .withVendor("ccsnhsjc") - .withModel("ejhkry") - .withVersion("napczwlokjy") - .withDescription("kkvnipjox") - .withFileSize(6610645791355850354L) - .withStatus(Status.EXTRACTING) - .withStatusMessages(Arrays.asList("dataspodmail", "dataydehoj", "datayahux", "datanpmqnjaqwixjspro")); - model = BinaryData.fromObject(model).toObject(FirmwareProperties.class); - Assertions.assertEquals("jgrtfwvukxga", model.fileName()); - Assertions.assertEquals("ccsnhsjc", model.vendor()); - Assertions.assertEquals("ejhkry", model.model()); - Assertions.assertEquals("napczwlokjy", model.version()); - Assertions.assertEquals("kkvnipjox", model.description()); - Assertions.assertEquals(6610645791355850354L, model.fileSize()); - Assertions.assertEquals(Status.EXTRACTING, model.status()); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareSummaryInnerTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareSummaryInnerTests.java deleted file mode 100644 index 1e785b6f7fe78..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareSummaryInnerTests.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.iotfirmwaredefense.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.FirmwareSummaryInner; -import org.junit.jupiter.api.Assertions; - -public final class FirmwareSummaryInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FirmwareSummaryInner model = - BinaryData - .fromString( - "{\"extractedSize\":2192126563466196128,\"fileSize\":1776439872109058737,\"extractedFileCount\":5524797481405641879,\"componentCount\":6443293507210712059,\"binaryCount\":3252772488790490647,\"analysisTimeSeconds\":8622826594592540845,\"rootFileSystems\":2343470507309759072}") - .toObject(FirmwareSummaryInner.class); - Assertions.assertEquals(2192126563466196128L, model.extractedSize()); - Assertions.assertEquals(1776439872109058737L, model.fileSize()); - Assertions.assertEquals(5524797481405641879L, model.extractedFileCount()); - Assertions.assertEquals(6443293507210712059L, model.componentCount()); - Assertions.assertEquals(3252772488790490647L, model.binaryCount()); - Assertions.assertEquals(8622826594592540845L, model.analysisTimeSeconds()); - Assertions.assertEquals(2343470507309759072L, model.rootFileSystems()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FirmwareSummaryInner model = - new FirmwareSummaryInner() - .withExtractedSize(2192126563466196128L) - .withFileSize(1776439872109058737L) - .withExtractedFileCount(5524797481405641879L) - .withComponentCount(6443293507210712059L) - .withBinaryCount(3252772488790490647L) - .withAnalysisTimeSeconds(8622826594592540845L) - .withRootFileSystems(2343470507309759072L); - model = BinaryData.fromObject(model).toObject(FirmwareSummaryInner.class); - Assertions.assertEquals(2192126563466196128L, model.extractedSize()); - Assertions.assertEquals(1776439872109058737L, model.fileSize()); - Assertions.assertEquals(5524797481405641879L, model.extractedFileCount()); - Assertions.assertEquals(6443293507210712059L, model.componentCount()); - Assertions.assertEquals(3252772488790490647L, model.binaryCount()); - Assertions.assertEquals(8622826594592540845L, model.analysisTimeSeconds()); - Assertions.assertEquals(2343470507309759072L, model.rootFileSystems()); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareSummaryTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareSummaryTests.java new file mode 100644 index 0000000000000..f87354e3032d4 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareSummaryTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.iotfirmwaredefense.models.FirmwareSummary; +import org.junit.jupiter.api.Assertions; + +public final class FirmwareSummaryTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + FirmwareSummary model = BinaryData.fromString( + "{\"summaryType\":\"Firmware\",\"extractedSize\":5328487592567211708,\"fileSize\":8973268749707616780,\"extractedFileCount\":4408315824184510745,\"componentCount\":4532260686626458912,\"binaryCount\":3431496164141244398,\"analysisTimeSeconds\":7532014789770741104,\"rootFileSystems\":2762302346763758082}") + .toObject(FirmwareSummary.class); + Assertions.assertEquals(5328487592567211708L, model.extractedSize()); + Assertions.assertEquals(8973268749707616780L, model.fileSize()); + Assertions.assertEquals(4408315824184510745L, model.extractedFileCount()); + Assertions.assertEquals(4532260686626458912L, model.componentCount()); + Assertions.assertEquals(3431496164141244398L, model.binaryCount()); + Assertions.assertEquals(7532014789770741104L, model.analysisTimeSeconds()); + Assertions.assertEquals(2762302346763758082L, model.rootFileSystems()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + FirmwareSummary model = new FirmwareSummary().withExtractedSize(5328487592567211708L) + .withFileSize(8973268749707616780L).withExtractedFileCount(4408315824184510745L) + .withComponentCount(4532260686626458912L).withBinaryCount(3431496164141244398L) + .withAnalysisTimeSeconds(7532014789770741104L).withRootFileSystems(2762302346763758082L); + model = BinaryData.fromObject(model).toObject(FirmwareSummary.class); + Assertions.assertEquals(5328487592567211708L, model.extractedSize()); + Assertions.assertEquals(8973268749707616780L, model.fileSize()); + Assertions.assertEquals(4408315824184510745L, model.extractedFileCount()); + Assertions.assertEquals(4532260686626458912L, model.componentCount()); + Assertions.assertEquals(3431496164141244398L, model.binaryCount()); + Assertions.assertEquals(7532014789770741104L, model.analysisTimeSeconds()); + Assertions.assertEquals(2762302346763758082L, model.rootFileSystems()); + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareUpdateDefinitionTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareUpdateDefinitionTests.java deleted file mode 100644 index 57ae64886d1f7..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwareUpdateDefinitionTests.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.iotfirmwaredefense.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.iotfirmwaredefense.models.FirmwareUpdateDefinition; -import com.azure.resourcemanager.iotfirmwaredefense.models.Status; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class FirmwareUpdateDefinitionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FirmwareUpdateDefinition model = - BinaryData - .fromString( - "{\"properties\":{\"fileName\":\"tegjvwmf\",\"vendor\":\"t\",\"model\":\"mdvpjhulsu\",\"version\":\"mkjozkrwf\",\"description\":\"iodjp\",\"fileSize\":548063352355670740,\"status\":\"Extracting\",\"statusMessages\":[\"datawryoqpsoacc\",\"dataazakl\",\"datalahbcryff\"],\"provisioningState\":\"Succeeded\"}}") - .toObject(FirmwareUpdateDefinition.class); - Assertions.assertEquals("tegjvwmf", model.fileName()); - Assertions.assertEquals("t", model.vendor()); - Assertions.assertEquals("mdvpjhulsu", model.model()); - Assertions.assertEquals("mkjozkrwf", model.version()); - Assertions.assertEquals("iodjp", model.description()); - Assertions.assertEquals(548063352355670740L, model.fileSize()); - Assertions.assertEquals(Status.EXTRACTING, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FirmwareUpdateDefinition model = - new FirmwareUpdateDefinition() - .withFileName("tegjvwmf") - .withVendor("t") - .withModel("mdvpjhulsu") - .withVersion("mkjozkrwf") - .withDescription("iodjp") - .withFileSize(548063352355670740L) - .withStatus(Status.EXTRACTING) - .withStatusMessages(Arrays.asList("datawryoqpsoacc", "dataazakl", "datalahbcryff")); - model = BinaryData.fromObject(model).toObject(FirmwareUpdateDefinition.class); - Assertions.assertEquals("tegjvwmf", model.fileName()); - Assertions.assertEquals("t", model.vendor()); - Assertions.assertEquals("mdvpjhulsu", model.model()); - Assertions.assertEquals("mkjozkrwf", model.version()); - Assertions.assertEquals("iodjp", model.description()); - Assertions.assertEquals(548063352355670740L, model.fileSize()); - Assertions.assertEquals(Status.EXTRACTING, model.status()); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresCreateWithResponseMockTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresCreateWithResponseMockTests.java deleted file mode 100644 index 9778857458e26..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresCreateWithResponseMockTests.java +++ /dev/null @@ -1,87 +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.iotfirmwaredefense.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager; -import com.azure.resourcemanager.iotfirmwaredefense.models.Firmware; -import com.azure.resourcemanager.iotfirmwaredefense.models.Status; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class FirmwaresCreateWithResponseMockTests { - @Test - public void testCreateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"fileName\":\"cfbu\",\"vendor\":\"mfqjhhkxbp\",\"model\":\"ymjhxxjyngudivkr\",\"version\":\"wbxqzvszjfau\",\"description\":\"fdxxivetvtcqaqtd\",\"fileSize\":2614581750064023217,\"status\":\"Ready\",\"statusMessages\":[\"datavxysl\",\"databhsfxob\"],\"provisioningState\":\"Canceled\"},\"id\":\"blmpewww\",\"name\":\"bkrvrnsvshqj\",\"type\":\"hxcr\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - IoTFirmwareDefenseManager manager = - IoTFirmwareDefenseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Firmware response = - manager - .firmwares() - .define("gvpgy") - .withExistingWorkspace("xknalaulppg", "dtpnapnyiropuhp") - .withFileName("git") - .withVendor("edjvcslynqw") - .withModel("cwzzhxgktr") - .withVersion("ucnapkteoellwp") - .withDescription("d") - .withFileSize(4494990539994529771L) - .withStatus(Status.EXTRACTING) - .withStatusMessages(Arrays.asList("dataceopzfqrhhuaopp")) - .create(); - - Assertions.assertEquals("cfbu", response.fileName()); - Assertions.assertEquals("mfqjhhkxbp", response.vendor()); - Assertions.assertEquals("ymjhxxjyngudivkr", response.model()); - Assertions.assertEquals("wbxqzvszjfau", response.version()); - Assertions.assertEquals("fdxxivetvtcqaqtd", response.description()); - Assertions.assertEquals(2614581750064023217L, response.fileSize()); - Assertions.assertEquals(Status.READY, response.status()); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresDeleteWithResponseMockTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresDeleteWithResponseMockTests.java index fbf88d6ece8a5..d7634d6178d1b 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresDeleteWithResponseMockTests.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresDeleteWithResponseMockTests.java @@ -32,32 +32,20 @@ public void testDeleteWithResponse() throws Exception { Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - IoTFirmwareDefenseManager manager = - IoTFirmwareDefenseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .firmwares() - .deleteWithResponse("hibnuqqkpika", "rgvtqag", "buynhijggm", com.azure.core.util.Context.NONE); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + IoTFirmwareDefenseManager manager = IoTFirmwareDefenseManager.configure().withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + manager.firmwares().deleteWithResponse("bfovasrruvwbhsq", "sub", "gjb", com.azure.core.util.Context.NONE); + } } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresGenerateBinaryHardeningDetailsWithResponseMockTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresGenerateBinaryHardeningDetailsWithResponseMockTests.java deleted file mode 100644 index c36c475655416..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresGenerateBinaryHardeningDetailsWithResponseMockTests.java +++ /dev/null @@ -1,85 +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.iotfirmwaredefense.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager; -import com.azure.resourcemanager.iotfirmwaredefense.models.BinaryHardening; -import com.azure.resourcemanager.iotfirmwaredefense.models.CanaryFlag; -import com.azure.resourcemanager.iotfirmwaredefense.models.NxFlag; -import com.azure.resourcemanager.iotfirmwaredefense.models.PieFlag; -import com.azure.resourcemanager.iotfirmwaredefense.models.RelroFlag; -import com.azure.resourcemanager.iotfirmwaredefense.models.StrippedFlag; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class FirmwaresGenerateBinaryHardeningDetailsWithResponseMockTests { - @Test - public void testGenerateBinaryHardeningDetailsWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"binaryHardeningId\":\"fm\",\"features\":{\"nx\":\"True\",\"pie\":\"True\",\"relro\":\"True\",\"canary\":\"False\",\"stripped\":\"True\"},\"architecture\":\"hahvljuahaq\",\"path\":\"c\",\"class\":\"mdua\",\"runpath\":\"exq\",\"rpath\":\"fadmws\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - IoTFirmwareDefenseManager manager = - IoTFirmwareDefenseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - BinaryHardening response = - manager - .firmwares() - .generateBinaryHardeningDetailsWithResponse("v", "us", "tslhspkdeem", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("fm", response.binaryHardeningId()); - Assertions.assertEquals("hahvljuahaq", response.architecture()); - Assertions.assertEquals("c", response.path()); - Assertions.assertEquals("mdua", response.classProperty()); - Assertions.assertEquals("exq", response.runpath()); - Assertions.assertEquals("fadmws", response.rpath()); - Assertions.assertEquals(NxFlag.TRUE, response.nx()); - Assertions.assertEquals(PieFlag.TRUE, response.pie()); - Assertions.assertEquals(RelroFlag.TRUE, response.relro()); - Assertions.assertEquals(CanaryFlag.FALSE, response.canary()); - Assertions.assertEquals(StrippedFlag.TRUE, response.stripped()); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresGenerateBinaryHardeningSummaryWithResponseMockTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresGenerateBinaryHardeningSummaryWithResponseMockTests.java deleted file mode 100644 index 9e6243546bc23..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresGenerateBinaryHardeningSummaryWithResponseMockTests.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.iotfirmwaredefense.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager; -import com.azure.resourcemanager.iotfirmwaredefense.models.BinaryHardeningSummary; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class FirmwaresGenerateBinaryHardeningSummaryWithResponseMockTests { - @Test - public void testGenerateBinaryHardeningSummaryWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"totalFiles\":8812234948991108432,\"nx\":946722582,\"pie\":1666097242,\"relro\":1542253292,\"canary\":1198251199,\"stripped\":849293677}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - IoTFirmwareDefenseManager manager = - IoTFirmwareDefenseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - BinaryHardeningSummary response = - manager - .firmwares() - .generateBinaryHardeningSummaryWithResponse( - "bkyvp", "ca", "uzbpzkafku", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(8812234948991108432L, response.totalFiles()); - Assertions.assertEquals(946722582, response.nx()); - Assertions.assertEquals(1666097242, response.pie()); - Assertions.assertEquals(1542253292, response.relro()); - Assertions.assertEquals(1198251199, response.canary()); - Assertions.assertEquals(849293677, response.stripped()); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresGenerateComponentDetailsWithResponseMockTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresGenerateComponentDetailsWithResponseMockTests.java deleted file mode 100644 index 2ed3d2271e7b3..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresGenerateComponentDetailsWithResponseMockTests.java +++ /dev/null @@ -1,77 +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.iotfirmwaredefense.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager; -import com.azure.resourcemanager.iotfirmwaredefense.models.Component; -import com.azure.resourcemanager.iotfirmwaredefense.models.IsUpdateAvailable; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class FirmwaresGenerateComponentDetailsWithResponseMockTests { - @Test - public void testGenerateComponentDetailsWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"componentId\":\"ilovnot\",\"componentName\":\"jfcn\",\"version\":\"k\",\"license\":\"x\",\"releaseDate\":\"2021-07-21T19:51:01Z\",\"paths\":[\"kphywpnvjto\",\"nermcl\",\"plpho\",\"uscrpabgyepsb\"],\"isUpdateAvailable\":\"False\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - IoTFirmwareDefenseManager manager = - IoTFirmwareDefenseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Component response = - manager - .firmwares() - .generateComponentDetailsWithResponse("g", "wrupqsxvnmicykvc", "o", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ilovnot", response.componentId()); - Assertions.assertEquals("jfcn", response.componentName()); - Assertions.assertEquals("k", response.version()); - Assertions.assertEquals("x", response.license()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-21T19:51:01Z"), response.releaseDate()); - Assertions.assertEquals("kphywpnvjto", response.paths().get(0)); - Assertions.assertEquals(IsUpdateAvailable.FALSE, response.isUpdateAvailable()); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresGenerateCveSummaryWithResponseMockTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresGenerateCveSummaryWithResponseMockTests.java deleted file mode 100644 index 1f09798ac7195..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresGenerateCveSummaryWithResponseMockTests.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.iotfirmwaredefense.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager; -import com.azure.resourcemanager.iotfirmwaredefense.models.CveSummary; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class FirmwaresGenerateCveSummaryWithResponseMockTests { - @Test - public void testGenerateCveSummaryWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"critical\":6671653333153914115,\"high\":6973940601441794238,\"medium\":7890354998634829119,\"low\":7832013398863943919,\"unknown\":9129367680420401865,\"undefined\":7757966335492850327}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - IoTFirmwareDefenseManager manager = - IoTFirmwareDefenseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CveSummary response = - manager - .firmwares() - .generateCveSummaryWithResponse( - "hfxobbcswsrtj", "iplrbpbewtghfgb", "c", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(6671653333153914115L, response.critical()); - Assertions.assertEquals(6973940601441794238L, response.high()); - Assertions.assertEquals(7890354998634829119L, response.medium()); - Assertions.assertEquals(7832013398863943919L, response.low()); - Assertions.assertEquals(9129367680420401865L, response.unknown()); - Assertions.assertEquals(7757966335492850327L, response.undefined()); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresGenerateDownloadUrlWithResponseMockTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresGenerateDownloadUrlWithResponseMockTests.java index 4cd30cdf0bf80..33eff4e77ab4e 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresGenerateDownloadUrlWithResponseMockTests.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresGenerateDownloadUrlWithResponseMockTests.java @@ -29,38 +29,25 @@ public void testGenerateDownloadUrlWithResponse() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = "{\"url\":\"zjancuxr\",\"uploadUrl\":\"wbavxbniwdj\"}"; + String responseStr = "{\"url\":\"hqlkthumaqo\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - IoTFirmwareDefenseManager manager = - IoTFirmwareDefenseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + IoTFirmwareDefenseManager manager = IoTFirmwareDefenseManager.configure().withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + UrlToken response = manager.firmwares().generateDownloadUrlWithResponse("naenqpehindo", "gmifthnzd", + "dslgnayqigynduh", com.azure.core.util.Context.NONE).getValue(); - UrlToken response = - manager - .firmwares() - .generateDownloadUrlWithResponse("bxu", "wbhqwal", "uzyoxaep", com.azure.core.util.Context.NONE) - .getValue(); } } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresGenerateFilesystemDownloadUrlWithResponseMockTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresGenerateFilesystemDownloadUrlWithResponseMockTests.java index 42b75bfd21391..19644d66dd70e 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresGenerateFilesystemDownloadUrlWithResponseMockTests.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresGenerateFilesystemDownloadUrlWithResponseMockTests.java @@ -29,38 +29,25 @@ public void testGenerateFilesystemDownloadUrlWithResponse() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = "{\"url\":\"ytxhp\",\"uploadUrl\":\"bzpfzab\"}"; + String responseStr = "{\"url\":\"n\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - IoTFirmwareDefenseManager manager = - IoTFirmwareDefenseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + IoTFirmwareDefenseManager manager = IoTFirmwareDefenseManager.configure().withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + UrlToken response = manager.firmwares().generateFilesystemDownloadUrlWithResponse("bgycduiertgccym", "aolps", + "lqlfm", com.azure.core.util.Context.NONE).getValue(); - UrlToken response = - manager - .firmwares() - .generateFilesystemDownloadUrlWithResponse("wz", "s", "bpg", com.azure.core.util.Context.NONE) - .getValue(); } } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresGenerateSummaryWithResponseMockTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresGenerateSummaryWithResponseMockTests.java deleted file mode 100644 index 924d011e2f37d..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresGenerateSummaryWithResponseMockTests.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.iotfirmwaredefense.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager; -import com.azure.resourcemanager.iotfirmwaredefense.models.FirmwareSummary; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class FirmwaresGenerateSummaryWithResponseMockTests { - @Test - public void testGenerateSummaryWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"extractedSize\":6050958993805304885,\"fileSize\":988487328349657078,\"extractedFileCount\":4353962267137944263,\"componentCount\":4045271831667825207,\"binaryCount\":5126500575476383860,\"analysisTimeSeconds\":319753834170561939,\"rootFileSystems\":1866971331588926084}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - IoTFirmwareDefenseManager manager = - IoTFirmwareDefenseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - FirmwareSummary response = - manager - .firmwares() - .generateSummaryWithResponse("lcuhxwtctyqiklb", "ovplw", "bhvgy", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(6050958993805304885L, response.extractedSize()); - Assertions.assertEquals(988487328349657078L, response.fileSize()); - Assertions.assertEquals(4353962267137944263L, response.extractedFileCount()); - Assertions.assertEquals(4045271831667825207L, response.componentCount()); - Assertions.assertEquals(5126500575476383860L, response.binaryCount()); - Assertions.assertEquals(319753834170561939L, response.analysisTimeSeconds()); - Assertions.assertEquals(1866971331588926084L, response.rootFileSystems()); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresGetWithResponseMockTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresGetWithResponseMockTests.java deleted file mode 100644 index 7ce768dbd9f96..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresGetWithResponseMockTests.java +++ /dev/null @@ -1,77 +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.iotfirmwaredefense.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager; -import com.azure.resourcemanager.iotfirmwaredefense.models.Firmware; -import com.azure.resourcemanager.iotfirmwaredefense.models.Status; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class FirmwaresGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"fileName\":\"dbhrbnlankxm\",\"vendor\":\"k\",\"model\":\"henbtkcxywnytn\",\"version\":\"yn\",\"description\":\"idybyxczf\",\"fileSize\":3227528533061557739,\"status\":\"Extracting\",\"statusMessages\":[\"dataabphlw\",\"dataqlfktsths\",\"datacocmnyyaztt\"],\"provisioningState\":\"Accepted\"},\"id\":\"rq\",\"name\":\"uedck\",\"type\":\"ywbiexzfeyueax\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - IoTFirmwareDefenseManager manager = - IoTFirmwareDefenseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Firmware response = - manager - .firmwares() - .getWithResponse("bfs", "arbu", "rcvpnazzmhjrunmp", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("dbhrbnlankxm", response.fileName()); - Assertions.assertEquals("k", response.vendor()); - Assertions.assertEquals("henbtkcxywnytn", response.model()); - Assertions.assertEquals("yn", response.version()); - Assertions.assertEquals("idybyxczf", response.description()); - Assertions.assertEquals(3227528533061557739L, response.fileSize()); - Assertions.assertEquals(Status.EXTRACTING, response.status()); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresListByWorkspaceMockTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresListByWorkspaceMockTests.java deleted file mode 100644 index f6ffd5805a187..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresListByWorkspaceMockTests.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.iotfirmwaredefense.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager; -import com.azure.resourcemanager.iotfirmwaredefense.models.Firmware; -import com.azure.resourcemanager.iotfirmwaredefense.models.Status; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class FirmwaresListByWorkspaceMockTests { - @Test - public void testListByWorkspace() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"fileName\":\"nljky\",\"vendor\":\"j\",\"model\":\"ujqgidok\",\"version\":\"ljyoxgvcltb\",\"description\":\"ncghkje\",\"fileSize\":1198495964069172235,\"status\":\"Error\",\"statusMessages\":[\"datatxfvgx\",\"datafsm\",\"datanehmpvecx\",\"dataodebfqkkrbmpu\"],\"provisioningState\":\"Canceled\"},\"id\":\"wflzlfbxzpuzy\",\"name\":\"ispnqzahmgkbrp\",\"type\":\"y\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - IoTFirmwareDefenseManager manager = - IoTFirmwareDefenseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.firmwares().listByWorkspace("fuwutttxf", "jrbirphxepcyv", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("nljky", response.iterator().next().fileName()); - Assertions.assertEquals("j", response.iterator().next().vendor()); - Assertions.assertEquals("ujqgidok", response.iterator().next().model()); - Assertions.assertEquals("ljyoxgvcltb", response.iterator().next().version()); - Assertions.assertEquals("ncghkje", response.iterator().next().description()); - Assertions.assertEquals(1198495964069172235L, response.iterator().next().fileSize()); - Assertions.assertEquals(Status.ERROR, response.iterator().next().status()); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresListGenerateBinaryHardeningListMockTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresListGenerateBinaryHardeningListMockTests.java deleted file mode 100644 index 704bc51f3ae72..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresListGenerateBinaryHardeningListMockTests.java +++ /dev/null @@ -1,85 +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.iotfirmwaredefense.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager; -import com.azure.resourcemanager.iotfirmwaredefense.models.BinaryHardening; -import com.azure.resourcemanager.iotfirmwaredefense.models.CanaryFlag; -import com.azure.resourcemanager.iotfirmwaredefense.models.NxFlag; -import com.azure.resourcemanager.iotfirmwaredefense.models.PieFlag; -import com.azure.resourcemanager.iotfirmwaredefense.models.RelroFlag; -import com.azure.resourcemanager.iotfirmwaredefense.models.StrippedFlag; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class FirmwaresListGenerateBinaryHardeningListMockTests { - @Test - public void testListGenerateBinaryHardeningList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"binaryHardeningId\":\"qkqujidsu\",\"features\":{\"nx\":\"False\",\"pie\":\"True\",\"relro\":\"False\",\"canary\":\"True\",\"stripped\":\"True\"},\"architecture\":\"ccm\",\"path\":\"udxytlmoyrx\",\"class\":\"fudwpznt\",\"runpath\":\"dzhlrq\",\"rpath\":\"hckfrlhrx\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - IoTFirmwareDefenseManager manager = - IoTFirmwareDefenseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .firmwares() - .listGenerateBinaryHardeningList("zq", "gxywpmue", "fjz", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("qkqujidsu", response.iterator().next().binaryHardeningId()); - Assertions.assertEquals("ccm", response.iterator().next().architecture()); - Assertions.assertEquals("udxytlmoyrx", response.iterator().next().path()); - Assertions.assertEquals("fudwpznt", response.iterator().next().classProperty()); - Assertions.assertEquals("dzhlrq", response.iterator().next().runpath()); - Assertions.assertEquals("hckfrlhrx", response.iterator().next().rpath()); - Assertions.assertEquals(NxFlag.FALSE, response.iterator().next().nx()); - Assertions.assertEquals(PieFlag.TRUE, response.iterator().next().pie()); - Assertions.assertEquals(RelroFlag.FALSE, response.iterator().next().relro()); - Assertions.assertEquals(CanaryFlag.TRUE, response.iterator().next().canary()); - Assertions.assertEquals(StrippedFlag.TRUE, response.iterator().next().stripped()); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresListGenerateComponentListMockTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresListGenerateComponentListMockTests.java deleted file mode 100644 index f45e8ffc5c047..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresListGenerateComponentListMockTests.java +++ /dev/null @@ -1,78 +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.iotfirmwaredefense.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager; -import com.azure.resourcemanager.iotfirmwaredefense.models.Component; -import com.azure.resourcemanager.iotfirmwaredefense.models.IsUpdateAvailable; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class FirmwaresListGenerateComponentListMockTests { - @Test - public void testListGenerateComponentList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"componentId\":\"ped\",\"componentName\":\"jn\",\"version\":\"ckhsmtxpsieb\",\"license\":\"hvpesapskrdqm\",\"releaseDate\":\"2021-01-31T10:46:35Z\",\"paths\":[\"tldwkyzxuutk\",\"cwscwsvlx\"],\"isUpdateAvailable\":\"False\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - IoTFirmwareDefenseManager manager = - IoTFirmwareDefenseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .firmwares() - .listGenerateComponentList( - "sxnkjzkdeslpvlo", "wiyighxpkdw", "baiuebbaumny", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ped", response.iterator().next().componentId()); - Assertions.assertEquals("jn", response.iterator().next().componentName()); - Assertions.assertEquals("ckhsmtxpsieb", response.iterator().next().version()); - Assertions.assertEquals("hvpesapskrdqm", response.iterator().next().license()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-31T10:46:35Z"), response.iterator().next().releaseDate()); - Assertions.assertEquals("tldwkyzxuutk", response.iterator().next().paths().get(0)); - Assertions.assertEquals(IsUpdateAvailable.FALSE, response.iterator().next().isUpdateAvailable()); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresListGenerateCveListMockTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresListGenerateCveListMockTests.java deleted file mode 100644 index 8521278be0df0..0000000000000 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/FirmwaresListGenerateCveListMockTests.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.iotfirmwaredefense.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager; -import com.azure.resourcemanager.iotfirmwaredefense.models.Cve; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class FirmwaresListGenerateCveListMockTests { - @Test - public void testListGenerateCveList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"cveId\":\"cwwfvovbvme\",\"component\":\"datacivyhzceuo\",\"severity\":\"jrwjueiotwm\",\"name\":\"ytdxwit\",\"cvssScore\":\"rjaw\",\"cvssVersion\":\"wgxhn\",\"cvssV2Score\":\"kxfbkpycgklwndn\",\"cvssV3Score\":\"dauwhvylwzbtd\",\"publishDate\":\"2021-05-11T10:23:35Z\",\"updatedDate\":\"2021-06-17T22:36:31Z\",\"links\":[{\"href\":\"pow\",\"label\":\"przqlveu\"}],\"description\":\"upjm\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - IoTFirmwareDefenseManager manager = - IoTFirmwareDefenseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .firmwares() - .listGenerateCveList("uhashsfwx", "sowzxcugi", "jooxdjebw", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("cwwfvovbvme", response.iterator().next().cveId()); - Assertions.assertEquals("jrwjueiotwm", response.iterator().next().severity()); - Assertions.assertEquals("ytdxwit", response.iterator().next().name()); - Assertions.assertEquals("rjaw", response.iterator().next().cvssScore()); - Assertions.assertEquals("wgxhn", response.iterator().next().cvssVersion()); - Assertions.assertEquals("kxfbkpycgklwndn", response.iterator().next().cvssV2Score()); - Assertions.assertEquals("dauwhvylwzbtd", response.iterator().next().cvssV3Score()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-11T10:23:35Z"), response.iterator().next().publishDate()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-17T22:36:31Z"), response.iterator().next().updatedDate()); - Assertions.assertEquals("upjm", response.iterator().next().description()); - } -} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/GenerateUploadUrlRequestTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/GenerateUploadUrlRequestTests.java index e2cdd97100687..efab46290700a 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/GenerateUploadUrlRequestTests.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/GenerateUploadUrlRequestTests.java @@ -11,15 +11,15 @@ public final class GenerateUploadUrlRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - GenerateUploadUrlRequest model = - BinaryData.fromString("{\"firmwareId\":\"u\"}").toObject(GenerateUploadUrlRequest.class); - Assertions.assertEquals("u", model.firmwareId()); + GenerateUploadUrlRequest model + = BinaryData.fromString("{\"firmwareId\":\"uecivyhz\"}").toObject(GenerateUploadUrlRequest.class); + Assertions.assertEquals("uecivyhz", model.firmwareId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - GenerateUploadUrlRequest model = new GenerateUploadUrlRequest().withFirmwareId("u"); + GenerateUploadUrlRequest model = new GenerateUploadUrlRequest().withFirmwareId("uecivyhz"); model = BinaryData.fromObject(model).toObject(GenerateUploadUrlRequest.class); - Assertions.assertEquals("u", model.firmwareId()); + Assertions.assertEquals("uecivyhz", model.firmwareId()); } } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/OperationDisplayTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/OperationDisplayTests.java index 0f85e1fe85152..e3fafb56d330c 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/OperationDisplayTests.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/OperationDisplayTests.java @@ -10,11 +10,9 @@ public final class OperationDisplayTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - OperationDisplay model = - BinaryData - .fromString( - "{\"provider\":\"wlrsffrzpwv\",\"resource\":\"dqgbiqylihkaetc\",\"operation\":\"vfcivfsnkymuc\",\"description\":\"hjfbebrjcxe\"}") - .toObject(OperationDisplay.class); + OperationDisplay model = BinaryData.fromString( + "{\"provider\":\"mpvecxgodebfqk\",\"resource\":\"bmpukgriwflz\",\"operation\":\"bxzpuzycisp\",\"description\":\"zahmgkbrpyydhibn\"}") + .toObject(OperationDisplay.class); } @org.junit.jupiter.api.Test diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/OperationInnerTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/OperationInnerTests.java index d0b243ccc2188..e43d95e091a05 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/OperationInnerTests.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/OperationInnerTests.java @@ -11,11 +11,9 @@ public final class OperationInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - OperationInner model = - BinaryData - .fromString( - "{\"name\":\"w\",\"isDataAction\":false,\"display\":{\"provider\":\"mmqhgyxzkonocuk\",\"resource\":\"lyaxuc\",\"operation\":\"uqszfk\",\"description\":\"ypewrmjmwvvjekt\"},\"origin\":\"system\",\"actionType\":\"Internal\"}") - .toObject(OperationInner.class); + OperationInner model = BinaryData.fromString( + "{\"name\":\"pcyvahfnljkyqx\",\"isDataAction\":true,\"display\":{\"provider\":\"qgidokgjljyo\",\"resource\":\"vcltbgsncgh\",\"operation\":\"esz\",\"description\":\"bijhtxfvgxbf\"},\"origin\":\"system\",\"actionType\":\"Internal\"}") + .toObject(OperationInner.class); } @org.junit.jupiter.api.Test diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/OperationListResultTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/OperationListResultTests.java index 678e5018f2723..2b42fe75b5b2a 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/OperationListResultTests.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/OperationListResultTests.java @@ -10,11 +10,9 @@ public final class OperationListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - OperationListResult model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"faxkffeii\",\"isDataAction\":true,\"display\":{\"provider\":\"ez\",\"resource\":\"shxmzsbbzoggigrx\",\"operation\":\"ur\",\"description\":\"xxjnspydptk\"},\"origin\":\"system\",\"actionType\":\"Internal\"},{\"name\":\"knvudwtiukb\",\"isDataAction\":true,\"display\":{\"provider\":\"pocipazyxoegu\",\"resource\":\"jnpiucgyg\",\"operation\":\"qzntypm\",\"description\":\"p\"},\"origin\":\"user\",\"actionType\":\"Internal\"},{\"name\":\"j\",\"isDataAction\":false,\"display\":{\"provider\":\"nfyhx\",\"resource\":\"oejzi\",\"operation\":\"ifsjttgzfbishcb\",\"description\":\"ajdeyeamdphaga\"},\"origin\":\"user\",\"actionType\":\"Internal\"},{\"name\":\"gipwhonowkg\",\"isDataAction\":true,\"display\":{\"provider\":\"kix\",\"resource\":\"injep\",\"operation\":\"tmryw\",\"description\":\"zoqftiyqzrnkcqvy\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}],\"nextLink\":\"sicohoqqnwvlry\"}") - .toObject(OperationListResult.class); + OperationListResult model = BinaryData.fromString( + "{\"value\":[{\"name\":\"drqjsdpy\",\"isDataAction\":false,\"display\":{\"provider\":\"xdeoejzic\",\"resource\":\"fsj\",\"operation\":\"gzfbishcbk\",\"description\":\"jdeyeamdpha\"},\"origin\":\"system\",\"actionType\":\"Internal\"},{\"name\":\"xw\",\"isDataAction\":true,\"display\":{\"provider\":\"onowk\",\"resource\":\"hwankixzbinjepu\",\"operation\":\"mryw\",\"description\":\"zoqftiyqzrnkcqvy\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"},{\"name\":\"sicohoqqnwvlry\",\"isDataAction\":false,\"display\":{\"provider\":\"eun\",\"resource\":\"qhgyxzkonocukok\",\"operation\":\"axuconuq\",\"description\":\"fkbey\"},\"origin\":\"user\",\"actionType\":\"Internal\"},{\"name\":\"mwvvjektcxsenhw\",\"isDataAction\":false,\"display\":{\"provider\":\"rzpwvlqdqgbiq\",\"resource\":\"ihkaetcktvfc\",\"operation\":\"fsnkymuctq\",\"description\":\"fbebrjcxer\"},\"origin\":\"system\",\"actionType\":\"Internal\"}],\"nextLink\":\"txfvjrbirph\"}") + .toObject(OperationListResult.class); } @org.junit.jupiter.api.Test diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/OperationsListMockTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/OperationsListMockTests.java index 84d410e06774b..1ffab7290ce3e 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/OperationsListMockTests.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/OperationsListMockTests.java @@ -30,35 +30,25 @@ public void testList() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"value\":[{\"name\":\"fwdsj\",\"isDataAction\":true,\"display\":{\"provider\":\"utiiswacf\",\"resource\":\"dkzzewkfvhqcrail\",\"operation\":\"n\",\"description\":\"fuflrwdmhdlx\"},\"origin\":\"user\",\"actionType\":\"Internal\"}]}"; + String responseStr + = "{\"value\":[{\"name\":\"dsslswt\",\"isDataAction\":true,\"display\":{\"provider\":\"ofz\",\"resource\":\"qsemwabne\",\"operation\":\"hhszh\",\"description\":\"plvwiwubmwmbes\"},\"origin\":\"user\",\"actionType\":\"Internal\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - IoTFirmwareDefenseManager manager = - IoTFirmwareDefenseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + IoTFirmwareDefenseManager manager = IoTFirmwareDefenseManager.configure().withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); + } } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/PairedKeyTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/PairedKeyTests.java index 159d9915eea4a..6dbfc8ebe00ee 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/PairedKeyTests.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/PairedKeyTests.java @@ -11,19 +11,16 @@ public final class PairedKeyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PairedKey model = - BinaryData - .fromString("{\"id\":\"okth\",\"type\":\"iuaod\",\"additionalProperties\":\"datacpkvxodp\"}") - .toObject(PairedKey.class); - Assertions.assertEquals("okth", model.id()); - Assertions.assertEquals("iuaod", model.type()); + PairedKey model = BinaryData.fromString("{\"id\":\"gfgibm\",\"type\":\"gakeqsr\"}").toObject(PairedKey.class); + Assertions.assertEquals("gfgibm", model.id()); + Assertions.assertEquals("gakeqsr", model.type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PairedKey model = new PairedKey().withId("okth").withType("iuaod").withAdditionalProperties("datacpkvxodp"); + PairedKey model = new PairedKey().withId("gfgibm").withType("gakeqsr"); model = BinaryData.fromObject(model).toObject(PairedKey.class); - Assertions.assertEquals("okth", model.id()); - Assertions.assertEquals("iuaod", model.type()); + Assertions.assertEquals("gfgibm", model.id()); + Assertions.assertEquals("gakeqsr", model.type()); } } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SbomComponentListResultTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SbomComponentListResultTests.java new file mode 100644 index 0000000000000..5f62da781aab3 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SbomComponentListResultTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.iotfirmwaredefense.models.SbomComponentListResult; +import org.junit.jupiter.api.Assertions; + +public final class SbomComponentListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SbomComponentListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"componentId\":\"iarbutrcvpna\",\"componentName\":\"mhjrunmpxttdbhr\",\"version\":\"l\",\"license\":\"kx\",\"filePaths\":[\"k\",\"bhenbtkcxywnyt\",\"rsyn\",\"qidybyx\"]},\"id\":\"fclhaaxdbabphlwr\",\"name\":\"lfktsths\",\"type\":\"cocmnyyaztt\"}],\"nextLink\":\"wwrq\"}") + .toObject(SbomComponentListResult.class); + Assertions.assertEquals("wwrq", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SbomComponentListResult model = new SbomComponentListResult().withNextLink("wwrq"); + model = BinaryData.fromObject(model).toObject(SbomComponentListResult.class); + Assertions.assertEquals("wwrq", model.nextLink()); + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SbomComponentResourceInnerTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SbomComponentResourceInnerTests.java new file mode 100644 index 0000000000000..9adbac5bfabc4 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SbomComponentResourceInnerTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.SbomComponentResourceInner; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class SbomComponentResourceInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SbomComponentResourceInner model = BinaryData.fromString( + "{\"properties\":{\"componentId\":\"dckzywbiexz\",\"componentName\":\"yueaxibxujwb\",\"version\":\"walm\",\"license\":\"yoxa\",\"filePaths\":[\"kzjancuxrhdwbav\",\"bniwdj\",\"wz\"]},\"id\":\"dbpgnxytxhp\",\"name\":\"xbzpfzab\",\"type\":\"lcuhxwtctyqiklb\"}") + .toObject(SbomComponentResourceInner.class); + Assertions.assertEquals("dckzywbiexz", model.componentId()); + Assertions.assertEquals("yueaxibxujwb", model.componentName()); + Assertions.assertEquals("walm", model.version()); + Assertions.assertEquals("yoxa", model.license()); + Assertions.assertEquals("kzjancuxrhdwbav", model.filePaths().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SbomComponentResourceInner model = new SbomComponentResourceInner().withComponentId("dckzywbiexz") + .withComponentName("yueaxibxujwb").withVersion("walm").withLicense("yoxa") + .withFilePaths(Arrays.asList("kzjancuxrhdwbav", "bniwdj", "wz")); + model = BinaryData.fromObject(model).toObject(SbomComponentResourceInner.class); + Assertions.assertEquals("dckzywbiexz", model.componentId()); + Assertions.assertEquals("yueaxibxujwb", model.componentName()); + Assertions.assertEquals("walm", model.version()); + Assertions.assertEquals("yoxa", model.license()); + Assertions.assertEquals("kzjancuxrhdwbav", model.filePaths().get(0)); + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SbomComponentTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SbomComponentTests.java new file mode 100644 index 0000000000000..4fe2b10e886db --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SbomComponentTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.SbomComponent; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class SbomComponentTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SbomComponent model = BinaryData.fromString( + "{\"componentId\":\"vplwzbhv\",\"componentName\":\"u\",\"version\":\"osvmk\",\"license\":\"sxqu\",\"filePaths\":[\"plgmgsxnk\"]}") + .toObject(SbomComponent.class); + Assertions.assertEquals("vplwzbhv", model.componentId()); + Assertions.assertEquals("u", model.componentName()); + Assertions.assertEquals("osvmk", model.version()); + Assertions.assertEquals("sxqu", model.license()); + Assertions.assertEquals("plgmgsxnk", model.filePaths().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SbomComponent model = new SbomComponent().withComponentId("vplwzbhv").withComponentName("u") + .withVersion("osvmk").withLicense("sxqu").withFilePaths(Arrays.asList("plgmgsxnk")); + model = BinaryData.fromObject(model).toObject(SbomComponent.class); + Assertions.assertEquals("vplwzbhv", model.componentId()); + Assertions.assertEquals("u", model.componentName()); + Assertions.assertEquals("osvmk", model.version()); + Assertions.assertEquals("sxqu", model.license()); + Assertions.assertEquals("plgmgsxnk", model.filePaths().get(0)); + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SbomComponentsListByFirmwareMockTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SbomComponentsListByFirmwareMockTests.java new file mode 100644 index 0000000000000..2aafd8062f2b5 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SbomComponentsListByFirmwareMockTests.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager; +import com.azure.resourcemanager.iotfirmwaredefense.models.SbomComponentResource; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +public final class SbomComponentsListByFirmwareMockTests { + @Test + public void testListByFirmware() throws Exception { + HttpClient httpClient = Mockito.mock(HttpClient.class); + HttpResponse httpResponse = Mockito.mock(HttpResponse.class); + ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + + String responseStr + = "{\"value\":[{\"properties\":{\"componentId\":\"lbpodxunk\",\"componentName\":\"bxmubyynt\",\"version\":\"rbqtkoie\",\"license\":\"eotg\",\"filePaths\":[\"ltmuwlauwzizx\"]},\"id\":\"pgcjefuzmuvp\",\"name\":\"ttdumorppxebmnzb\",\"type\":\"bhjpglkfgohdne\"}]}"; + + Mockito.when(httpResponse.getStatusCode()).thenReturn(200); + Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); + Mockito.when(httpResponse.getBody()) + .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); + Mockito.when(httpResponse.getBodyAsByteArray()) + .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + IoTFirmwareDefenseManager manager = IoTFirmwareDefenseManager.configure().withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + PagedIterable response = manager.sbomComponents().listByFirmware("kwobdagxtibq", "xbxwa", + "bogqxndlkzgxhu", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("lbpodxunk", response.iterator().next().componentId()); + Assertions.assertEquals("bxmubyynt", response.iterator().next().componentName()); + Assertions.assertEquals("rbqtkoie", response.iterator().next().version()); + Assertions.assertEquals("eotg", response.iterator().next().license()); + Assertions.assertEquals("ltmuwlauwzizx", response.iterator().next().filePaths().get(0)); + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SummariesGetWithResponseMockTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SummariesGetWithResponseMockTests.java new file mode 100644 index 0000000000000..cb9329a96fc82 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SummariesGetWithResponseMockTests.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager; +import com.azure.resourcemanager.iotfirmwaredefense.models.SummaryName; +import com.azure.resourcemanager.iotfirmwaredefense.models.SummaryResource; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +public final class SummariesGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + HttpClient httpClient = Mockito.mock(HttpClient.class); + HttpResponse httpResponse = Mockito.mock(HttpResponse.class); + ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + + String responseStr + = "{\"properties\":{\"summaryType\":\"SummaryResourceProperties\"},\"id\":\"uflrwd\",\"name\":\"hdlxyjrxsagafcn\",\"type\":\"hgw\"}"; + + Mockito.when(httpResponse.getStatusCode()).thenReturn(200); + Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); + Mockito.when(httpResponse.getBody()) + .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); + Mockito.when(httpResponse.getBodyAsByteArray()) + .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + IoTFirmwareDefenseManager manager = IoTFirmwareDefenseManager.configure().withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + SummaryResource response = manager.summaries().getWithResponse("ljuti", "swacffgdkzz", "wkfvhqcrailvp", + SummaryName.CRYPTO_CERTIFICATE, com.azure.core.util.Context.NONE).getValue(); + + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SummariesListByFirmwareMockTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SummariesListByFirmwareMockTests.java new file mode 100644 index 0000000000000..3bb64271f04e8 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SummariesListByFirmwareMockTests.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.iotfirmwaredefense.IoTFirmwareDefenseManager; +import com.azure.resourcemanager.iotfirmwaredefense.models.SummaryResource; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +public final class SummariesListByFirmwareMockTests { + @Test + public void testListByFirmware() throws Exception { + HttpClient httpClient = Mockito.mock(HttpClient.class); + HttpResponse httpResponse = Mockito.mock(HttpResponse.class); + ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + + String responseStr + = "{\"value\":[{\"properties\":{\"summaryType\":\"SummaryResourceProperties\"},\"id\":\"zx\",\"name\":\"lvithhqzonosgg\",\"type\":\"hcohfwdsjnk\"}]}"; + + Mockito.when(httpResponse.getStatusCode()).thenReturn(200); + Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); + Mockito.when(httpResponse.getBody()) + .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); + Mockito.when(httpResponse.getBodyAsByteArray()) + .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + IoTFirmwareDefenseManager manager = IoTFirmwareDefenseManager.configure().withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + PagedIterable response + = manager.summaries().listByFirmware("el", "phsdyhto", "fikdowwqu", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SummaryListResultTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SummaryListResultTests.java new file mode 100644 index 0000000000000..8d95b23f74c88 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SummaryListResultTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.iotfirmwaredefense.models.SummaryListResult; +import org.junit.jupiter.api.Assertions; + +public final class SummaryListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SummaryListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"summaryType\":\"SummaryResourceProperties\"},\"id\":\"slpvlop\",\"name\":\"i\",\"type\":\"ighxpk\"}],\"nextLink\":\"zb\"}") + .toObject(SummaryListResult.class); + Assertions.assertEquals("zb", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SummaryListResult model = new SummaryListResult().withNextLink("zb"); + model = BinaryData.fromObject(model).toObject(SummaryListResult.class); + Assertions.assertEquals("zb", model.nextLink()); + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SummaryResourceInnerTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SummaryResourceInnerTests.java new file mode 100644 index 0000000000000..fc9637018c044 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SummaryResourceInnerTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.SummaryResourceInner; + +public final class SummaryResourceInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SummaryResourceInner model = BinaryData.fromString( + "{\"properties\":{\"summaryType\":\"SummaryResourceProperties\"},\"id\":\"ebb\",\"name\":\"umnyqu\",\"type\":\"edeojnabc\"}") + .toObject(SummaryResourceInner.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SummaryResourceInner model = new SummaryResourceInner(); + model = BinaryData.fromObject(model).toObject(SummaryResourceInner.class); + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SummaryResourcePropertiesTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SummaryResourcePropertiesTests.java new file mode 100644 index 0000000000000..792256684f7a3 --- /dev/null +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/SummaryResourcePropertiesTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.iotfirmwaredefense.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.iotfirmwaredefense.models.SummaryResourceProperties; + +public final class SummaryResourcePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SummaryResourceProperties model = BinaryData.fromString("{\"summaryType\":\"SummaryResourceProperties\"}") + .toObject(SummaryResourceProperties.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SummaryResourceProperties model = new SummaryResourceProperties(); + model = BinaryData.fromObject(model).toObject(SummaryResourceProperties.class); + } +} diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/UrlTokenInnerTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/UrlTokenInnerTests.java index a72ab7c9f37d9..c20174395e07e 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/UrlTokenInnerTests.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/UrlTokenInnerTests.java @@ -10,8 +10,7 @@ public final class UrlTokenInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - UrlTokenInner model = - BinaryData.fromString("{\"url\":\"sy\",\"uploadUrl\":\"xpaojakhmsbz\"}").toObject(UrlTokenInner.class); + UrlTokenInner model = BinaryData.fromString("{\"url\":\"zntypmrb\"}").toObject(UrlTokenInner.class); } @org.junit.jupiter.api.Test diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspaceInnerTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspaceInnerTests.java index ba984efbb8843..1f5b7b0eca55e 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspaceInnerTests.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspaceInnerTests.java @@ -13,24 +13,23 @@ public final class WorkspaceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WorkspaceInner model = - BinaryData - .fromString( - "{\"properties\":{\"provisioningState\":\"Accepted\"},\"location\":\"ofoskghs\",\"tags\":{\"xieduugidyjrr\":\"imjm\",\"v\":\"byao\"},\"id\":\"xc\",\"name\":\"onpc\",\"type\":\"hocohslkev\"}") - .toObject(WorkspaceInner.class); - Assertions.assertEquals("ofoskghs", model.location()); - Assertions.assertEquals("imjm", model.tags().get("xieduugidyjrr")); + WorkspaceInner model = BinaryData.fromString( + "{\"properties\":{\"provisioningState\":\"Accepted\"},\"location\":\"ualaexqpvfadmw\",\"tags\":{\"vxpvgomz\":\"r\",\"bnbbeldawkz\":\"fmisg\",\"urqhaka\":\"ali\"},\"id\":\"hashsfwxosow\",\"name\":\"xcug\",\"type\":\"cjooxdjebwpucwwf\"}") + .toObject(WorkspaceInner.class); + Assertions.assertEquals("ualaexqpvfadmw", model.location()); + Assertions.assertEquals("r", model.tags().get("vxpvgomz")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkspaceInner model = - new WorkspaceInner().withLocation("ofoskghs").withTags(mapOf("xieduugidyjrr", "imjm", "v", "byao")); + WorkspaceInner model = new WorkspaceInner().withLocation("ualaexqpvfadmw") + .withTags(mapOf("vxpvgomz", "r", "bnbbeldawkz", "fmisg", "urqhaka", "ali")); model = BinaryData.fromObject(model).toObject(WorkspaceInner.class); - Assertions.assertEquals("ofoskghs", model.location()); - Assertions.assertEquals("imjm", model.tags().get("xieduugidyjrr")); + Assertions.assertEquals("ualaexqpvfadmw", model.location()); + Assertions.assertEquals("r", model.tags().get("vxpvgomz")); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspaceListTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspaceListTests.java index 2759db0292d5e..e395e25a91fa9 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspaceListTests.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspaceListTests.java @@ -11,18 +11,16 @@ public final class WorkspaceListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WorkspaceList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\"},\"location\":\"surex\",\"tags\":{\"stkiiuxhqyud\":\"ryocfsfksymdd\"},\"id\":\"o\",\"name\":\"rq\",\"type\":\"b\"},{\"properties\":{\"provisioningState\":\"Canceled\"},\"location\":\"yifqrvkdvjsllrmv\",\"tags\":{\"zwtruwiqzbqjvsov\":\"watkpnpulexxb\"},\"id\":\"yokacspkw\",\"name\":\"hzdobpxjmflbvvnc\",\"type\":\"rkcciwwzjuqk\"}],\"nextLink\":\"sa\"}") - .toObject(WorkspaceList.class); - Assertions.assertEquals("sa", model.nextLink()); + WorkspaceList model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\"},\"location\":\"siebtfhvpesapskr\",\"tags\":{\"ncwscwsvlxoto\":\"hjjdhtldwkyzxuut\",\"cykvceo\":\"twrupqsxvnm\",\"vnotyfjfcnj\":\"eil\",\"nxdhbt\":\"k\"},\"id\":\"kphywpnvjto\",\"name\":\"nermcl\",\"type\":\"plpho\"},{\"properties\":{\"provisioningState\":\"Succeeded\"},\"location\":\"pabgyeps\",\"tags\":{\"wfqkquj\":\"azqugxywpmueefj\",\"cq\":\"dsuyonobgla\",\"g\":\"tcc\",\"wfudwpzntxhdzhl\":\"udxytlmoyrx\"},\"id\":\"qj\",\"name\":\"hckfrlhrx\",\"type\":\"bkyvp\"},{\"properties\":{\"provisioningState\":\"Accepted\"},\"location\":\"z\",\"tags\":{\"hhseyv\":\"kafkuwbcrnwbm\"},\"id\":\"us\",\"name\":\"tslhspkdeem\",\"type\":\"ofmxagkvtmelmqkr\"}],\"nextLink\":\"hvljuahaquh\"}") + .toObject(WorkspaceList.class); + Assertions.assertEquals("hvljuahaquh", model.nextLink()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkspaceList model = new WorkspaceList().withNextLink("sa"); + WorkspaceList model = new WorkspaceList().withNextLink("hvljuahaquh"); model = BinaryData.fromObject(model).toObject(WorkspaceList.class); - Assertions.assertEquals("sa", model.nextLink()); + Assertions.assertEquals("hvljuahaquh", model.nextLink()); } } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacePropertiesTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacePropertiesTests.java index 9925075901ee4..fb5aced72989b 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacePropertiesTests.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacePropertiesTests.java @@ -10,8 +10,8 @@ public final class WorkspacePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WorkspaceProperties model = - BinaryData.fromString("{\"provisioningState\":\"Succeeded\"}").toObject(WorkspaceProperties.class); + WorkspaceProperties model + = BinaryData.fromString("{\"provisioningState\":\"Succeeded\"}").toObject(WorkspaceProperties.class); } @org.junit.jupiter.api.Test diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspaceUpdateDefinitionTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspaceUpdateDefinitionTests.java index 206fd908f3d58..34d2134308d8d 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspaceUpdateDefinitionTests.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspaceUpdateDefinitionTests.java @@ -10,10 +10,8 @@ public final class WorkspaceUpdateDefinitionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WorkspaceUpdateDefinition model = - BinaryData - .fromString("{\"properties\":{\"provisioningState\":\"Failed\"}}") - .toObject(WorkspaceUpdateDefinition.class); + WorkspaceUpdateDefinition model = BinaryData.fromString("{\"properties\":{\"provisioningState\":\"Accepted\"}}") + .toObject(WorkspaceUpdateDefinition.class); } @org.junit.jupiter.api.Test diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesCreateWithResponseMockTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesCreateWithResponseMockTests.java index 5900d666c64d3..ae35515729d39 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesCreateWithResponseMockTests.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesCreateWithResponseMockTests.java @@ -32,48 +32,33 @@ public void testCreateWithResponse() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"properties\":{\"provisioningState\":\"Canceled\"},\"location\":\"ebmnzbtbhjpglk\",\"tags\":{\"dyhtozfikdowwquu\":\"hdneuelfph\",\"ithhqzon\":\"xzxcl\"},\"id\":\"sg\",\"name\":\"b\",\"type\":\"c\"}"; + String responseStr + = "{\"properties\":{\"provisioningState\":\"Failed\"},\"location\":\"rpzbchckqqzqi\",\"tags\":{\"rwyhqmibzyhwitsm\":\"ysuiizynkedya\",\"pcdpumnz\":\"pyy\"},\"id\":\"mwzn\",\"name\":\"abikns\",\"type\":\"rgjhxb\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - IoTFirmwareDefenseManager manager = - IoTFirmwareDefenseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + IoTFirmwareDefenseManager manager = IoTFirmwareDefenseManager.configure().withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); - Workspace response = - manager - .workspaces() - .define("xbxwa") - .withRegion("xndlkzgxhu") - .withExistingResourceGroup("kwobdagxtibq") - .withTags(mapOf("ebxmubyynt", "lbpodxunk", "tkoievseotgq", "lrb", "tmuwlauwzi", "l")) - .create(); + Workspace response = manager.workspaces().define("aeneqnzarrwl").withRegion("fqka") + .withExistingResourceGroup("syrsndsytgadgvra") + .withTags(mapOf("bwwift", "iipfpubj", "ynfs", "hqkvpuvksgplsak")).create(); - Assertions.assertEquals("ebmnzbtbhjpglk", response.location()); - Assertions.assertEquals("hdneuelfph", response.tags().get("dyhtozfikdowwquu")); + Assertions.assertEquals("rpzbchckqqzqi", response.location()); + Assertions.assertEquals("ysuiizynkedya", response.tags().get("rwyhqmibzyhwitsm")); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesDeleteByResourceGroupWithResponseMockTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesDeleteByResourceGroupWithResponseMockTests.java index 05a71df8e7f95..7af9430e6b598 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesDeleteByResourceGroupWithResponseMockTests.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesDeleteByResourceGroupWithResponseMockTests.java @@ -32,30 +32,21 @@ public void testDeleteWithResponse() throws Exception { Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - IoTFirmwareDefenseManager manager = - IoTFirmwareDefenseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.workspaces().deleteByResourceGroupWithResponse("adbzmnvdfznud", "od", com.azure.core.util.Context.NONE); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + IoTFirmwareDefenseManager manager = IoTFirmwareDefenseManager.configure().withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + manager.workspaces().deleteByResourceGroupWithResponse("qibrhosxsdqrhzoy", "i", + com.azure.core.util.Context.NONE); + } } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesGenerateUploadUrlWithResponseMockTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesGenerateUploadUrlWithResponseMockTests.java index ad9c61f0b862d..81b20f7c0e8a1 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesGenerateUploadUrlWithResponseMockTests.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesGenerateUploadUrlWithResponseMockTests.java @@ -30,42 +30,27 @@ public void testGenerateUploadUrlWithResponse() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = "{\"url\":\"sikvmkqzeqqkdlt\",\"uploadUrl\":\"xmhhvhgureo\"}"; + String responseStr = "{\"url\":\"ovvqfovljxywsu\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - IoTFirmwareDefenseManager manager = - IoTFirmwareDefenseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + IoTFirmwareDefenseManager manager = IoTFirmwareDefenseManager.configure().withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + UrlToken response = manager.workspaces() + .generateUploadUrlWithResponse("hykojoxafnndlpic", "koymkcd", + new GenerateUploadUrlRequest().withFirmwareId("bpkkpwdre"), com.azure.core.util.Context.NONE) + .getValue(); - UrlToken response = - manager - .workspaces() - .generateUploadUrlWithResponse( - "pp", - "flcxoga", - new GenerateUploadUrlRequest().withFirmwareId("onz"), - com.azure.core.util.Context.NONE) - .getValue(); } } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesGetByResourceGroupWithResponseMockTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesGetByResourceGroupWithResponseMockTests.java index bb11440ab1c5c..a73bd9acedd45 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesGetByResourceGroupWithResponseMockTests.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesGetByResourceGroupWithResponseMockTests.java @@ -30,42 +30,28 @@ public void testGetByResourceGroupWithResponse() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"properties\":{\"provisioningState\":\"Failed\"},\"location\":\"erscdntne\",\"tags\":{\"tdss\":\"wjmy\",\"tmweriofzpyq\":\"s\",\"hhszh\":\"emwabnet\"},\"id\":\"d\",\"name\":\"lvwiwubmwmbesl\",\"type\":\"nkww\"}"; + String responseStr + = "{\"properties\":{\"provisioningState\":\"Succeeded\"},\"location\":\"uszdtmhrkwof\",\"tags\":{\"iexpbtgiwbwo\":\"oqac\",\"kcnqxwbpo\":\"nwashrtd\",\"aasipqi\":\"ulpiuj\"},\"id\":\"obyu\",\"name\":\"erpqlpqwcciuqg\",\"type\":\"dbutauvfbtkuwhh\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - IoTFirmwareDefenseManager manager = - IoTFirmwareDefenseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + IoTFirmwareDefenseManager manager = IoTFirmwareDefenseManager.configure().withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); - Workspace response = - manager - .workspaces() - .getByResourceGroupWithResponse("xzb", "cblylpstdbhhxsr", com.azure.core.util.Context.NONE) - .getValue(); + Workspace response = manager.workspaces() + .getByResourceGroupWithResponse("m", "qyib", com.azure.core.util.Context.NONE).getValue(); - Assertions.assertEquals("erscdntne", response.location()); - Assertions.assertEquals("wjmy", response.tags().get("tdss")); + Assertions.assertEquals("uszdtmhrkwof", response.location()); + Assertions.assertEquals("oqac", response.tags().get("iexpbtgiwbwo")); } } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesListByResourceGroupMockTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesListByResourceGroupMockTests.java index c6e6f4f6c1702..feee6583d6f49 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesListByResourceGroupMockTests.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesListByResourceGroupMockTests.java @@ -31,39 +31,28 @@ public void testListByResourceGroup() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\"},\"location\":\"havhqlkthumaqolb\",\"tags\":{\"mvaolps\":\"duiertgcc\"},\"id\":\"lqlfm\",\"name\":\"dnbbglzps\",\"type\":\"iydmcwyhzdxs\"}]}"; + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\"},\"location\":\"tmnubexkpzksmon\",\"tags\":{\"whojvp\":\"quxvypomgkop\",\"ysmocmbqfqvmkcxo\":\"jqg\"},\"id\":\"apvhelxprgly\",\"name\":\"tddckcb\",\"type\":\"uejrjxgc\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - IoTFirmwareDefenseManager manager = - IoTFirmwareDefenseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + IoTFirmwareDefenseManager manager = IoTFirmwareDefenseManager.configure().withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response = - manager.workspaces().listByResourceGroup("nayqi", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.workspaces().listByResourceGroup("yhrfouyftaakcpw", com.azure.core.util.Context.NONE); - Assertions.assertEquals("havhqlkthumaqolb", response.iterator().next().location()); - Assertions.assertEquals("duiertgcc", response.iterator().next().tags().get("mvaolps")); + Assertions.assertEquals("tmnubexkpzksmon", response.iterator().next().location()); + Assertions.assertEquals("quxvypomgkop", response.iterator().next().tags().get("whojvp")); } } diff --git a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesListMockTests.java b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesListMockTests.java index b057dc6b5531f..86c9a1b616821 100644 --- a/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesListMockTests.java +++ b/sdk/iotfirmwaredefense/azure-resourcemanager-iotfirmwaredefense/src/test/java/com/azure/resourcemanager/iotfirmwaredefense/generated/WorkspacesListMockTests.java @@ -31,38 +31,27 @@ public void testList() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\"},\"location\":\"asrru\",\"tags\":{\"bsrfbj\":\"hsqfsubcgjbirxbp\",\"otftpvjzbexilz\":\"dtws\",\"qtaruoujmkcjhwq\":\"nfqqnvwp\",\"ervnaenqpehi\":\"tjrybnwjewgdr\"},\"id\":\"doy\",\"name\":\"mifthnzdnd\",\"type\":\"l\"}]}"; + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\"},\"location\":\"dgfbcvkcvqvpke\",\"tags\":{\"sotbob\":\"vdrhvoo\",\"ld\":\"dopcjwvnh\",\"twuoegrpkhjwni\":\"mgxcxrslpm\"},\"id\":\"qsluicp\",\"name\":\"ggkzzlvmbmpa\",\"type\":\"modfvuefywsbpfvm\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - IoTFirmwareDefenseManager manager = - IoTFirmwareDefenseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + IoTFirmwareDefenseManager manager = IoTFirmwareDefenseManager.configure().withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response = manager.workspaces().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("asrru", response.iterator().next().location()); - Assertions.assertEquals("hsqfsubcgjbirxbp", response.iterator().next().tags().get("bsrfbj")); + Assertions.assertEquals("dgfbcvkcvqvpke", response.iterator().next().location()); + Assertions.assertEquals("vdrhvoo", response.iterator().next().tags().get("sotbob")); } }