From 2f22feea91100b71a7fe62079d0b79640420d903 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 12 Jul 2023 05:28:57 +0000 Subject: [PATCH] CodeGen from PR 24781 in Azure/azure-rest-api-specs Merge 53d776b89a38c22411d2b6799e3a22e3a8cf0711 into eabc87b2e8e5ab5d5365cb2db064d7fd25a65f1a --- eng/versioning/version_client.txt | 1 + pom.xml | 1 + .../azure-resourcemanager-fist/CHANGELOG.md | 5 + sdk/fist/azure-resourcemanager-fist/README.md | 105 + sdk/fist/azure-resourcemanager-fist/SAMPLE.md | 1158 +++++ sdk/fist/azure-resourcemanager-fist/pom.xml | 61 + .../fist/IoTFirmwareDefenseManager.java | 317 ++ .../fist/fluent/FirmwaresClient.java | 645 +++ .../resourcemanager/fist/fluent/Fist.java | 67 + .../fist/fluent/OperationsClient.java | 38 + .../fist/fluent/WorkspacesClient.java | 210 + .../models/BinaryHardeningFeatures.java | 159 + .../fluent/models/BinaryHardeningInner.java | 318 ++ .../models/BinaryHardeningSummaryInner.java | 180 + .../fist/fluent/models/ComponentInner.java | 209 + .../fluent/models/CryptoCertificateInner.java | 552 ++ .../models/CryptoCertificateSummaryInner.java | 208 + .../fist/fluent/models/CryptoKeyInner.java | 227 + .../fluent/models/CryptoKeySummaryInner.java | 154 + .../fist/fluent/models/CveInner.java | 334 ++ .../fist/fluent/models/CveSummaryInner.java | 180 + .../fist/fluent/models/FirmwareInner.java | 255 + .../fluent/models/FirmwareProperties.java | 250 + .../fluent/models/FirmwareSummaryInner.java | 206 + .../fist/fluent/models/OperationInner.java | 127 + .../fist/fluent/models/PasswordHashInner.java | 206 + .../fist/fluent/models/UrlTokenInner.java | 54 + .../fist/fluent/models/WorkspaceInner.java | 84 + .../fluent/models/WorkspaceProperties.java | 40 + .../fist/fluent/models/package-info.java | 9 + .../fist/fluent/package-info.java | 9 + .../implementation/BinaryHardeningImpl.java | 77 + .../BinaryHardeningSummaryImpl.java | 53 + .../fist/implementation/ComponentImpl.java | 64 + .../implementation/CryptoCertificateImpl.java | 127 + .../CryptoCertificateSummaryImpl.java | 57 + .../fist/implementation/CryptoKeyImpl.java | 73 + .../implementation/CryptoKeySummaryImpl.java | 48 + .../fist/implementation/CveImpl.java | 84 + .../fist/implementation/CveSummaryImpl.java | 52 + .../fist/implementation/FirmwareImpl.java | 433 ++ .../implementation/FirmwareSummaryImpl.java | 56 + .../implementation/FirmwaresClientImpl.java | 4450 +++++++++++++++++ .../fist/implementation/FirmwaresImpl.java | 536 ++ .../fist/implementation/FistBuilder.java | 144 + .../fist/implementation/FistImpl.java | 318 ++ .../fist/implementation/OperationImpl.java | 50 + .../implementation/OperationsClientImpl.java | 275 + .../fist/implementation/OperationsImpl.java | 45 + .../fist/implementation/PasswordHashImpl.java | 56 + .../fist/implementation/UrlTokenImpl.java | 35 + .../fist/implementation/Utils.java | 204 + .../fist/implementation/WorkspaceImpl.java | 192 + .../implementation/WorkspacesClientImpl.java | 1410 ++++++ .../fist/implementation/WorkspacesImpl.java | 201 + .../fist/implementation/package-info.java | 9 + .../fist/models/ActionType.java | 44 + .../fist/models/BinaryHardening.java | 94 + .../fist/models/BinaryHardeningList.java | 70 + .../fist/models/BinaryHardeningSummary.java | 59 + .../fist/models/CanaryFlag.java | 47 + .../fist/models/Component.java | 68 + .../fist/models/ComponentList.java | 70 + .../fist/models/CryptoCertificate.java | 160 + .../fist/models/CryptoCertificateEntity.java | 154 + .../fist/models/CryptoCertificateList.java | 70 + .../fist/models/CryptoCertificateSummary.java | 67 + .../fist/models/CryptoKey.java | 74 + .../fist/models/CryptoKeyList.java | 70 + .../fist/models/CryptoKeySummary.java | 52 + .../resourcemanager/fist/models/Cve.java | 104 + .../resourcemanager/fist/models/CveLink.java | 76 + .../resourcemanager/fist/models/CveList.java | 70 + .../fist/models/CveSummary.java | 59 + .../resourcemanager/fist/models/Firmware.java | 685 +++ .../fist/models/FirmwareList.java | 70 + .../fist/models/FirmwareSummary.java | 66 + .../fist/models/FirmwareUpdateDefinition.java | 237 + .../fist/models/Firmwares.java | 576 +++ .../fist/models/GenerateUploadUrlRequest.java | 50 + .../fist/models/IsExpired.java | 47 + .../fist/models/IsSelfSigned.java | 47 + .../fist/models/IsShortKeySize.java | 47 + .../fist/models/IsUpdateAvailable.java | 47 + .../fist/models/IsWeakSignature.java | 47 + .../resourcemanager/fist/models/NxFlag.java | 47 + .../fist/models/Operation.java | 56 + .../fist/models/OperationDisplay.java | 91 + .../fist/models/OperationListResult.java | 62 + .../fist/models/Operations.java | 33 + .../resourcemanager/fist/models/Origin.java | 53 + .../fist/models/PairedKey.java | 102 + .../fist/models/PasswordHash.java | 66 + .../fist/models/PasswordHashList.java | 70 + .../resourcemanager/fist/models/PieFlag.java | 47 + .../fist/models/ProvisioningState.java | 53 + .../fist/models/RelroFlag.java | 47 + .../resourcemanager/fist/models/Status.java | 56 + .../fist/models/StrippedFlag.java | 47 + .../resourcemanager/fist/models/UrlToken.java | 31 + .../fist/models/Workspace.java | 228 + .../fist/models/WorkspaceList.java | 70 + .../models/WorkspaceUpdateDefinition.java | 52 + .../fist/models/Workspaces.java | 186 + .../fist/models/package-info.java | 9 + .../resourcemanager/fist/package-info.java | 9 + .../src/main/java/module-info.java | 19 + .../fist/generated/FirmwareCreateSamples.java | 57 + .../fist/generated/FirmwareDeleteSamples.java | 36 + ...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 + .../fist/generated/FirmwareGetSamples.java | 36 + .../FirmwareListByWorkspaceSamples.java | 34 + ...istGenerateBinaryHardeningListSamples.java | 40 + ...mwareListGenerateComponentListSamples.java | 38 + ...tGenerateCryptoCertificateListSamples.java | 43 + ...mwareListGenerateCryptoKeyListSamples.java | 43 + .../FirmwareListGenerateCveListSamples.java | 38 + ...reListGeneratePasswordHashListSamples.java | 38 + .../fist/generated/FirmwareUpdateSamples.java | 66 + .../fist/generated/OperationsListSamples.java | 32 + .../generated/WorkspacesCreateSamples.java | 57 + .../generated/WorkspacesDeleteSamples.java | 36 + .../WorkspacesGenerateUploadUrlSamples.java | 45 + .../WorkspacesGetByResourceGroupSamples.java | 32 + .../WorkspacesListByResourceGroupSamples.java | 34 + .../fist/generated/WorkspacesListSamples.java | 34 + .../generated/WorkspacesUpdateSamples.java | 44 + sdk/fist/ci.yml | 47 + sdk/fist/pom.xml | 15 + 137 files changed, 21388 insertions(+) create mode 100644 sdk/fist/azure-resourcemanager-fist/CHANGELOG.md create mode 100644 sdk/fist/azure-resourcemanager-fist/README.md create mode 100644 sdk/fist/azure-resourcemanager-fist/SAMPLE.md create mode 100644 sdk/fist/azure-resourcemanager-fist/pom.xml create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/IoTFirmwareDefenseManager.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/FirmwaresClient.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/Fist.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/OperationsClient.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/WorkspacesClient.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/BinaryHardeningFeatures.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/BinaryHardeningInner.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/BinaryHardeningSummaryInner.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/ComponentInner.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/CryptoCertificateInner.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/CryptoCertificateSummaryInner.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/CryptoKeyInner.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/CryptoKeySummaryInner.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/CveInner.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/CveSummaryInner.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/FirmwareInner.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/FirmwareProperties.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/FirmwareSummaryInner.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/OperationInner.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/PasswordHashInner.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/UrlTokenInner.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/WorkspaceInner.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/WorkspaceProperties.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/package-info.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/package-info.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/BinaryHardeningImpl.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/BinaryHardeningSummaryImpl.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/ComponentImpl.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/CryptoCertificateImpl.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/CryptoCertificateSummaryImpl.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/CryptoKeyImpl.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/CryptoKeySummaryImpl.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/CveImpl.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/CveSummaryImpl.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/FirmwareImpl.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/FirmwareSummaryImpl.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/FirmwaresClientImpl.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/FirmwaresImpl.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/FistBuilder.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/FistImpl.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/OperationImpl.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/OperationsClientImpl.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/OperationsImpl.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/PasswordHashImpl.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/UrlTokenImpl.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/Utils.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/WorkspaceImpl.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/WorkspacesClientImpl.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/WorkspacesImpl.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/package-info.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/ActionType.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/BinaryHardening.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/BinaryHardeningList.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/BinaryHardeningSummary.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/CanaryFlag.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/Component.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/ComponentList.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/CryptoCertificate.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/CryptoCertificateEntity.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/CryptoCertificateList.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/CryptoCertificateSummary.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/CryptoKey.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/CryptoKeyList.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/CryptoKeySummary.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/Cve.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/CveLink.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/CveList.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/CveSummary.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/Firmware.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/FirmwareList.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/FirmwareSummary.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/FirmwareUpdateDefinition.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/Firmwares.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/GenerateUploadUrlRequest.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/IsExpired.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/IsSelfSigned.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/IsShortKeySize.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/IsUpdateAvailable.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/IsWeakSignature.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/NxFlag.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/Operation.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/OperationDisplay.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/OperationListResult.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/Operations.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/Origin.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/PairedKey.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/PasswordHash.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/PasswordHashList.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/PieFlag.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/ProvisioningState.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/RelroFlag.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/Status.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/StrippedFlag.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/UrlToken.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/Workspace.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/WorkspaceList.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/WorkspaceUpdateDefinition.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/Workspaces.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/package-info.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/package-info.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/main/java/module-info.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareCreateSamples.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareDeleteSamples.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareGenerateBinaryHardeningDetailsSamples.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareGenerateBinaryHardeningSummarySamples.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareGenerateComponentDetailsSamples.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareGenerateCryptoCertificateSummarySamples.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareGenerateCryptoKeySummarySamples.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareGenerateCveSummarySamples.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareGenerateDownloadUrlSamples.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareGenerateFilesystemDownloadUrlSamples.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareGenerateSummarySamples.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareGetSamples.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareListByWorkspaceSamples.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareListGenerateBinaryHardeningListSamples.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareListGenerateComponentListSamples.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareListGenerateCryptoCertificateListSamples.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareListGenerateCryptoKeyListSamples.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareListGenerateCveListSamples.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareListGeneratePasswordHashListSamples.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareUpdateSamples.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/OperationsListSamples.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/WorkspacesCreateSamples.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/WorkspacesDeleteSamples.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/WorkspacesGenerateUploadUrlSamples.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/WorkspacesGetByResourceGroupSamples.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/WorkspacesListByResourceGroupSamples.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/WorkspacesListSamples.java create mode 100644 sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/WorkspacesUpdateSamples.java create mode 100644 sdk/fist/ci.yml create mode 100644 sdk/fist/pom.xml diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 6906a47750d6f..c0b741e4e40be 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -418,6 +418,7 @@ com.azure.resourcemanager:azure-resourcemanager-networkcloud;1.0.0-beta.2;1.0.0- com.azure.resourcemanager:azure-resourcemanager-cosmosdbforpostgresql;1.0.0-beta.1;1.0.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-beta.1;1.0.0-beta.2 +com.azure.resourcemanager:azure-resourcemanager-fist;1.0.0-beta.1;1.0.0-beta.1 com.azure.tools:azure-sdk-archetype;1.0.0;1.2.0-beta.1 com.azure.tools:azure-sdk-build-tool;1.0.0-beta.1;1.0.0-beta.2 diff --git a/pom.xml b/pom.xml index ec8e0f2ae4585..6d03aed5a2a45 100644 --- a/pom.xml +++ b/pom.xml @@ -81,6 +81,7 @@ sdk/eventgrid sdk/eventhubs sdk/extendedlocation + sdk/fist sdk/fluidrelay sdk/formrecognizer sdk/frontdoor diff --git a/sdk/fist/azure-resourcemanager-fist/CHANGELOG.md b/sdk/fist/azure-resourcemanager-fist/CHANGELOG.md new file mode 100644 index 0000000000000..0a421ddabbaf8 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/CHANGELOG.md @@ -0,0 +1,5 @@ +# Release History + +## 1.0.0-beta.1 (2023-07-12) + +- 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). diff --git a/sdk/fist/azure-resourcemanager-fist/README.md b/sdk/fist/azure-resourcemanager-fist/README.md new file mode 100644 index 0000000000000..cfd8bc313667e --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/README.md @@ -0,0 +1,105 @@ +# Azure Resource Manager IoT Firmware Defense client library for Java + +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). + +## We'd love to hear your feedback + +We're always working on improving our products and the way we communicate with our users. So we'd love to learn what's working and how we can do better. + +If you haven't already, please take a few minutes to [complete this short survey][survey] we have put together. + +Thank you in advance for your collaboration. We really appreciate your time! + +## Documentation + +Various documentation is available to help you get started + +- [API reference documentation][docs] + +## Getting started + +### Prerequisites + +- [Java Development Kit (JDK)][jdk] with version 8 or above +- [Azure Subscription][azure_subscription] + +### Adding the package to your product + +[//]: # ({x-version-update-start;com.azure.resourcemanager:azure-resourcemanager-fist;current}) +```xml + + com.azure.resourcemanager + azure-resourcemanager-fist + 1.0.0-beta.1 + +``` +[//]: # ({x-version-update-end}) + +### Include the recommended packages + +Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client. + +[Azure Identity][azure_identity] and [Azure Core Netty HTTP][azure_core_http_netty] packages provide the default implementation. + +### Authentication + +By default, Azure Active Directory 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. +- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate. + +In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable. + +With above configuration, `azure` client can be authenticated using the following code: + +```java +AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); +TokenCredential credential = new DefaultAzureCredentialBuilder() + .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) + .build(); +IoTFirmwareDefenseManager manager = IoTFirmwareDefenseManager + .authenticate(credential, profile); +``` + +The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise. + +See [Authentication][authenticate] for more options. + +## Key concepts + +See [API design][design] for general introduction on design and key concepts on Azure Management Libraries. + +## Examples + +[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/fist/azure-resourcemanager-fist/SAMPLE.md) + + +## Troubleshooting + +## Next steps + +## Contributing + +For details on contributing to this repository, see the [contributing guide][cg]. + +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit . + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact with any additional questions or comments. + + +[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/ +[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 +[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md +[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md +[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md +[coc]: https://opensource.microsoft.com/codeofconduct/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ diff --git a/sdk/fist/azure-resourcemanager-fist/SAMPLE.md b/sdk/fist/azure-resourcemanager-fist/SAMPLE.md new file mode 100644 index 0000000000000..7173c66e123d1 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/SAMPLE.md @@ -0,0 +1,1158 @@ +# 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) + +## Operations + +- [List](#operations_list) + +## Workspaces + +- [Create](#workspaces_create) +- [Delete](#workspaces_delete) +- [GenerateUploadUrl](#workspaces_generateuploadurl) +- [GetByResourceGroup](#workspaces_getbyresourcegroup) +- [List](#workspaces_list) +- [ListByResourceGroup](#workspaces_listbyresourcegroup) +- [Update](#workspaces_update) +### Firmware_Create + +```java +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.fist.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.fist.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.fist.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(); + } +} +``` + +### Firmware_Delete + +```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.fist.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.fist.IoTFirmwareDefenseManager manager) { + manager + .firmwares() + .deleteWithResponse("rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); + } +} +``` + +### Firmware_GenerateBinaryHardeningDetails + +```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.fist.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.fist.IoTFirmwareDefenseManager manager) { + manager + .firmwares() + .generateBinaryHardeningDetailsWithResponse( + "rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); + } +} +``` + +### Firmware_GenerateBinaryHardeningSummary + +```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.fist.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.fist.IoTFirmwareDefenseManager manager) { + manager + .firmwares() + .generateBinaryHardeningSummaryWithResponse( + "rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); + } +} +``` + +### Firmware_GenerateComponentDetails + +```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.fist.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.fist.IoTFirmwareDefenseManager manager) { + manager + .firmwares() + .generateComponentDetailsWithResponse( + "rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); + } +} +``` + +### Firmware_GenerateCryptoCertificateSummary + +```java +/** 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.fist.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.fist.IoTFirmwareDefenseManager manager) { + manager + .firmwares() + .generateCryptoCertificateSummaryWithResponse( + "rgworkspaces-firmwares", "j5QE_", "wujtpcgypfpqseyrsebolarkspy", com.azure.core.util.Context.NONE); + } +} +``` + +### Firmware_GenerateCryptoKeySummary + +```java +/** 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.fist.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.fist.IoTFirmwareDefenseManager manager) { + manager + .firmwares() + .generateCryptoKeySummaryWithResponse( + "rgworkspaces-firmwares", "j5QE_", "wujtpcgypfpqseyrsebolarkspy", com.azure.core.util.Context.NONE); + } +} +``` + +### Firmware_GenerateCveSummary + +```java +/** 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.fist.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.fist.IoTFirmwareDefenseManager manager) { + manager + .firmwares() + .generateCveSummaryWithResponse( + "rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); + } +} +``` + +### Firmware_GenerateDownloadUrl + +```java +/** 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.fist.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.fist.IoTFirmwareDefenseManager manager) { + manager + .firmwares() + .generateDownloadUrlWithResponse( + "rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); + } +} +``` + +### Firmware_GenerateFilesystemDownloadUrl + +```java +/** 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.fist.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.fist.IoTFirmwareDefenseManager manager) { + manager + .firmwares() + .generateFilesystemDownloadUrlWithResponse( + "rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); + } +} +``` + +### Firmware_GenerateSummary + +```java +/** 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.fist.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.fist.IoTFirmwareDefenseManager manager) { + manager + .firmwares() + .generateSummaryWithResponse("rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); + } +} +``` + +### Firmware_Get + +```java +/** 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.fist.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.fist.IoTFirmwareDefenseManager manager) { + manager + .firmwares() + .getWithResponse("rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); + } +} +``` + +### Firmware_ListByWorkspace + +```java +/** Samples for Firmware ListByWorkspace. */ +public final class FirmwareListByWorkspaceSamples { + /* + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListByWorkspace_MaximumSet_Gen.json + */ + /** + * Sample code: Firmware_ListByWorkspace_MaximumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void firmwareListByWorkspaceMaximumSetGen( + com.azure.resourcemanager.fist.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 + */ + /** + * Sample code: Firmware_ListByWorkspace_MinimumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void firmwareListByWorkspaceMinimumSetGen( + com.azure.resourcemanager.fist.IoTFirmwareDefenseManager manager) { + manager.firmwares().listByWorkspace("rgworkspaces-firmwares", "A7", com.azure.core.util.Context.NONE); + } +} +``` + +### Firmware_ListGenerateBinaryHardeningList + +```java +/** 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.fist.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.fist.IoTFirmwareDefenseManager manager) { + manager + .firmwares() + .listGenerateBinaryHardeningList( + "rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); + } +} +``` + +### Firmware_ListGenerateComponentList + +```java +/** 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.fist.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.fist.IoTFirmwareDefenseManager manager) { + manager + .firmwares() + .listGenerateComponentList("rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); + } +} +``` + +### Firmware_ListGenerateCryptoCertificateList + +```java +/** 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.fist.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.fist.IoTFirmwareDefenseManager manager) { + manager + .firmwares() + .listGenerateCryptoCertificateList( + "rgworkspaces-firmwares", "j5QE_", "wujtpcgypfpqseyrsebolarkspy", com.azure.core.util.Context.NONE); + } +} +``` + +### Firmware_ListGenerateCryptoKeyList + +```java +/** 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.fist.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.fist.IoTFirmwareDefenseManager manager) { + manager + .firmwares() + .listGenerateCryptoKeyList( + "FirmwareAnalysisRG", + "default", + "DECAFBAD-0000-0000-0000-BADBADBADBAD", + com.azure.core.util.Context.NONE); + } +} +``` + +### Firmware_ListGenerateCveList + +```java +/** 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.fist.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.fist.IoTFirmwareDefenseManager manager) { + manager + .firmwares() + .listGenerateCveList("rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); + } +} +``` + +### Firmware_ListGeneratePasswordHashList + +```java +/** 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.fist.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.fist.IoTFirmwareDefenseManager manager) { + manager + .firmwares() + .listGeneratePasswordHashList("rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); + } +} +``` + +### Firmware_Update + +```java +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.fist.models.Firmware; +import com.azure.resourcemanager.fist.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.fist.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.fist.IoTFirmwareDefenseManager manager) { + Firmware resource = + manager + .firmwares() + .getWithResponse("rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().apply(); + } +} +``` + +### Operations_List + +```java +/** 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 + */ + /** + * Sample code: Operations_List_MinimumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void operationsListMinimumSetGen(com.azure.resourcemanager.fist.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 + */ + /** + * Sample code: Operations_List_MaximumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void operationsListMaximumSetGen(com.azure.resourcemanager.fist.IoTFirmwareDefenseManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); + } +} +``` + +### Workspaces_Create + +```java +import java.util.HashMap; +import java.util.Map; + +/** 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 + */ + /** + * Sample code: Workspaces_Create_MinimumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void workspacesCreateMinimumSetGen(com.azure.resourcemanager.fist.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 + */ + /** + * Sample code: Workspaces_Create_MaximumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void workspacesCreateMaximumSetGen(com.azure.resourcemanager.fist.IoTFirmwareDefenseManager manager) { + manager + .workspaces() + .define("E___-3") + .withRegion("jjwbseilitjgdrhbvvkwviqj") + .withExistingResourceGroup("rgworkspaces") + .withTags(mapOf("key450", "rzqqumbpfsbibnpirsm")) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Workspaces_Delete + +```java +/** 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 + */ + /** + * Sample code: Workspaces_Delete_MinimumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void workspacesDeleteMinimumSetGen(com.azure.resourcemanager.fist.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 + */ + /** + * Sample code: Workspaces_Delete_MaximumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void workspacesDeleteMaximumSetGen(com.azure.resourcemanager.fist.IoTFirmwareDefenseManager manager) { + manager + .workspaces() + .deleteByResourceGroupWithResponse("rgworkspaces", "E___-3", com.azure.core.util.Context.NONE); + } +} +``` + +### Workspaces_GenerateUploadUrl + +```java +import com.azure.resourcemanager.fist.models.GenerateUploadUrlRequest; + +/** 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 + */ + /** + * Sample code: Workspaces_GenerateUploadUrl_MinimumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void workspacesGenerateUploadUrlMinimumSetGen( + com.azure.resourcemanager.fist.IoTFirmwareDefenseManager manager) { + 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 + */ + /** + * Sample code: Workspaces_GenerateUploadUrl_MaximumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void workspacesGenerateUploadUrlMaximumSetGen( + com.azure.resourcemanager.fist.IoTFirmwareDefenseManager manager) { + manager + .workspaces() + .generateUploadUrlWithResponse( + "rgworkspaces", + "E___-3", + new GenerateUploadUrlRequest().withFirmwareId("ytsfprbywi"), + com.azure.core.util.Context.NONE); + } +} +``` + +### Workspaces_GetByResourceGroup + +```java +/** 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 + */ + /** + * Sample code: Workspaces_Get_MaximumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void workspacesGetMaximumSetGen(com.azure.resourcemanager.fist.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 + */ + /** + * Sample code: Workspaces_Get_MinimumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void workspacesGetMinimumSetGen(com.azure.resourcemanager.fist.IoTFirmwareDefenseManager manager) { + manager.workspaces().getByResourceGroupWithResponse("rgworkspaces", "E_US", com.azure.core.util.Context.NONE); + } +} +``` + +### Workspaces_List + +```java +/** 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 + */ + /** + * Sample code: Workspaces_ListBySubscription_MaximumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void workspacesListBySubscriptionMaximumSetGen( + com.azure.resourcemanager.fist.IoTFirmwareDefenseManager manager) { + manager.workspaces().list(com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_ListBySubscription_MinimumSet_Gen.json + */ + /** + * Sample code: Workspaces_ListBySubscription_MinimumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void workspacesListBySubscriptionMinimumSetGen( + com.azure.resourcemanager.fist.IoTFirmwareDefenseManager manager) { + manager.workspaces().list(com.azure.core.util.Context.NONE); + } +} +``` + +### Workspaces_ListByResourceGroup + +```java +/** 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 + */ + /** + * Sample code: Workspaces_ListByResourceGroup_MaximumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void workspacesListByResourceGroupMaximumSetGen( + com.azure.resourcemanager.fist.IoTFirmwareDefenseManager manager) { + manager.workspaces().listByResourceGroup("rgworkspaces", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_ListByResourceGroup_MinimumSet_Gen.json + */ + /** + * Sample code: Workspaces_ListByResourceGroup_MinimumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void workspacesListByResourceGroupMinimumSetGen( + com.azure.resourcemanager.fist.IoTFirmwareDefenseManager manager) { + manager.workspaces().listByResourceGroup("rgworkspaces", com.azure.core.util.Context.NONE); + } +} +``` + +### Workspaces_Update + +```java +import com.azure.resourcemanager.fist.models.Workspace; + +/** 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 + */ + /** + * Sample code: Workspaces_Update_MaximumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void workspacesUpdateMaximumSetGen(com.azure.resourcemanager.fist.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 + */ + /** + * Sample code: Workspaces_Update_MinimumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void workspacesUpdateMinimumSetGen(com.azure.resourcemanager.fist.IoTFirmwareDefenseManager manager) { + Workspace resource = + manager + .workspaces() + .getByResourceGroupWithResponse("rgworkspaces", "E___-3", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().apply(); + } +} +``` + diff --git a/sdk/fist/azure-resourcemanager-fist/pom.xml b/sdk/fist/azure-resourcemanager-fist/pom.xml new file mode 100644 index 0000000000000..50801e2c22e4e --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/pom.xml @@ -0,0 +1,61 @@ + + + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + + + com.azure.resourcemanager + azure-resourcemanager-fist + 1.0.0-beta.1 + 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. + https://github.com/Azure/azure-sdk-for-java + + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + + https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + microsoft + Microsoft + + + + UTF-8 + 0 + 0 + + + + com.azure + azure-core + 1.41.0 + + + com.azure + azure-core-management + 1.11.3 + + + diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/IoTFirmwareDefenseManager.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/IoTFirmwareDefenseManager.java new file mode 100644 index 0000000000000..475aa324fada5 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/IoTFirmwareDefenseManager.java @@ -0,0 +1,317 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist; + +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.util.Configuration; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.fist.fluent.Fist; +import com.azure.resourcemanager.fist.implementation.FirmwaresImpl; +import com.azure.resourcemanager.fist.implementation.FistBuilder; +import com.azure.resourcemanager.fist.implementation.OperationsImpl; +import com.azure.resourcemanager.fist.implementation.WorkspacesImpl; +import com.azure.resourcemanager.fist.models.Firmwares; +import com.azure.resourcemanager.fist.models.Operations; +import com.azure.resourcemanager.fist.models.Workspaces; +import java.time.Duration; +import java.time.temporal.ChronoUnit; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +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. + */ +public final class IoTFirmwareDefenseManager { + private Firmwares firmwares; + + private Workspaces workspaces; + + private Operations operations; + + private final Fist 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(); + } + + /** + * 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. + */ + public static IoTFirmwareDefenseManager authenticate(TokenCredential credential, AzureProfile profile) { + Objects.requireNonNull(credential, "'credential' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + return configure().authenticate(credential, profile); + } + + /** + * 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. + */ + public static IoTFirmwareDefenseManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { + Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + return new IoTFirmwareDefenseManager(httpPipeline, profile, null); + } + + /** + * 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. */ + public static final class Configurable { + private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); + + private HttpClient httpClient; + private HttpLogOptions httpLogOptions; + private final List policies = new ArrayList<>(); + private final List scopes = new ArrayList<>(); + private RetryPolicy retryPolicy; + private RetryOptions retryOptions; + private Duration defaultPollInterval; + + private Configurable() { + } + + /** + * Sets the http client. + * + * @param httpClient the HTTP client. + * @return the configurable object itself. + */ + public Configurable withHttpClient(HttpClient httpClient) { + this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null."); + return this; + } + + /** + * Sets the logging options to the HTTP pipeline. + * + * @param httpLogOptions the HTTP log options. + * @return the configurable object itself. + */ + public Configurable withLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null."); + return this; + } + + /** + * Adds the pipeline policy to the HTTP pipeline. + * + * @param policy the HTTP pipeline policy. + * @return the configurable object itself. + */ + public Configurable withPolicy(HttpPipelinePolicy policy) { + this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null.")); + return this; + } + + /** + * Adds the scope to permission sets. + * + * @param scope the scope. + * @return the configurable object itself. + */ + public Configurable withScope(String scope) { + this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null.")); + return this; + } + + /** + * Sets the retry policy to the HTTP pipeline. + * + * @param retryPolicy the HTTP pipeline retry policy. + * @return the configurable object itself. + */ + public Configurable withRetryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null."); + return this; + } + + /** + * Sets the retry options for the HTTP pipeline retry policy. + * + *

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. + */ + public Configurable withRetryOptions(RetryOptions retryOptions) { + this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null."); + return this; + } + + /** + * Sets the default poll interval, used when service does not provide "Retry-After" header. + * + * @param defaultPollInterval the default poll interval. + * @return the configurable object itself. + */ + public Configurable withDefaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval = + Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); + if (this.defaultPollInterval.isNegative()) { + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); + } + return this; + } + + /** + * 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. + */ + public IoTFirmwareDefenseManager authenticate(TokenCredential credential, AzureProfile profile) { + Objects.requireNonNull(credential, "'credential' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + + StringBuilder userAgentBuilder = new StringBuilder(); + userAgentBuilder + .append("azsdk-java") + .append("-") + .append("com.azure.resourcemanager.fist") + .append("/") + .append("1.0.0-beta.1"); + 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)"); + } else { + userAgentBuilder.append(" (auto-generated)"); + } + + if (scopes.isEmpty()) { + scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); + } + if (retryPolicy == null) { + if (retryOptions != null) { + retryPolicy = new RetryPolicy(retryOptions); + } else { + retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); + } + } + List policies = new ArrayList<>(); + 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())); + 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())); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(httpLogOptions)); + 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 Firmwares. It manages Firmware. + * + * @return Resource collection API of Firmwares. + */ + public Firmwares firmwares() { + if (this.firmwares == null) { + this.firmwares = new FirmwaresImpl(clientObject.getFirmwares(), this); + } + 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() { + if (this.operations == null) { + this.operations = new OperationsImpl(clientObject.getOperations(), this); + } + return operations; + } + + /** + * @return Wrapped service client Fist providing direct access to the underlying auto-generated API implementation, + * based on Azure REST API. + */ + public Fist serviceClient() { + return this.clientObject; + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/FirmwaresClient.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/FirmwaresClient.java new file mode 100644 index 0000000000000..0671d7192cd02 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/FirmwaresClient.java @@ -0,0 +1,645 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.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.fist.fluent.models.BinaryHardeningInner; +import com.azure.resourcemanager.fist.fluent.models.BinaryHardeningSummaryInner; +import com.azure.resourcemanager.fist.fluent.models.ComponentInner; +import com.azure.resourcemanager.fist.fluent.models.CryptoCertificateInner; +import com.azure.resourcemanager.fist.fluent.models.CryptoCertificateSummaryInner; +import com.azure.resourcemanager.fist.fluent.models.CryptoKeyInner; +import com.azure.resourcemanager.fist.fluent.models.CryptoKeySummaryInner; +import com.azure.resourcemanager.fist.fluent.models.CveInner; +import com.azure.resourcemanager.fist.fluent.models.CveSummaryInner; +import com.azure.resourcemanager.fist.fluent.models.FirmwareInner; +import com.azure.resourcemanager.fist.fluent.models.FirmwareSummaryInner; +import com.azure.resourcemanager.fist.fluent.models.PasswordHashInner; +import com.azure.resourcemanager.fist.fluent.models.UrlTokenInner; +import com.azure.resourcemanager.fist.models.FirmwareUpdateDefinition; + +/** 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. + * @throws com.azure.core.management.exception.ManagementException thrown 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 as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByWorkspace(String resourceGroupName, String workspaceName); + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, 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. + * @param firmware Details of the firmware being created or updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return firmware definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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. + * @param firmware Details of the firmware being created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return firmware definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FirmwareInner create(String resourceGroupName, String workspaceName, String firmwareId, FirmwareInner firmware); + + /** + * 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. + * @param firmware Details of the firmware being created or updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return firmware definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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. + * @param firmware Details of the firmware being created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return firmware definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse( + String resourceGroupName, String 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String firmwareId); + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return firmware along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return firmware. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FirmwareInner get(String resourceGroupName, String workspaceName, String firmwareId); + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + UrlTokenInner generateDownloadUrl(String resourceGroupName, String workspaceName, String firmwareId); + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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. + */ + @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/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/Fist.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/Fist.java new file mode 100644 index 0000000000000..496ee067a8cc3 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/Fist.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.fist.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/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/OperationsClient.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/OperationsClient.java new file mode 100644 index 0000000000000..5538383efd63b --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/OperationsClient.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.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.fist.fluent.models.OperationInner; + +/** 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}. + */ + @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}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/WorkspacesClient.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/WorkspacesClient.java new file mode 100644 index 0000000000000..207cce4b4950c --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/WorkspacesClient.java @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.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.fist.fluent.models.UrlTokenInner; +import com.azure.resourcemanager.fist.fluent.models.WorkspaceInner; +import com.azure.resourcemanager.fist.models.GenerateUploadUrlRequest; +import com.azure.resourcemanager.fist.models.WorkspaceUpdateDefinition; + +/** 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}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + 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 com.azure.core.management.exception.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}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + 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 com.azure.core.management.exception.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}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * 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 com.azure.core.management.exception.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}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return firmware analysis workspace along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return firmware analysis workspace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkspaceInner create(String resourceGroupName, String workspaceName, WorkspaceInner workspace); + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return firmware analysis workspace along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return firmware analysis workspace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceUpdateDefinition workspace); + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse(String resourceGroupName, String workspaceName, Context 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. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return firmware analysis workspace along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return firmware analysis workspace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkspaceInner getByResourceGroup(String resourceGroupName, String workspaceName); + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + UrlTokenInner generateUploadUrl( + String resourceGroupName, String workspaceName, GenerateUploadUrlRequest generateUploadUrl); +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/BinaryHardeningFeatures.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/BinaryHardeningFeatures.java new file mode 100644 index 0000000000000..6b222a73e805b --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/BinaryHardeningFeatures.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.fist.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.fist.models.CanaryFlag; +import com.azure.resourcemanager.fist.models.NxFlag; +import com.azure.resourcemanager.fist.models.PieFlag; +import com.azure.resourcemanager.fist.models.RelroFlag; +import com.azure.resourcemanager.fist.models.StrippedFlag; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Binary hardening features. */ +@Fluent +public final class BinaryHardeningFeatures { + /* + * NX flag. + */ + @JsonProperty(value = "nx") + private NxFlag nx; + + /* + * PIE flag. + */ + @JsonProperty(value = "pie") + private PieFlag pie; + + /* + * RELRO flag. + */ + @JsonProperty(value = "relro") + private RelroFlag relro; + + /* + * Canary flag. + */ + @JsonProperty(value = "canary") + private CanaryFlag canary; + + /* + * Stripped flag. + */ + @JsonProperty(value = "stripped") + private StrippedFlag stripped; + + /** Creates an instance of BinaryHardeningFeatures class. */ + public BinaryHardeningFeatures() { + } + + /** + * Get the nx property: NX flag. + * + * @return the nx value. + */ + public NxFlag nx() { + return this.nx; + } + + /** + * Set the nx property: NX flag. + * + * @param nx the nx value to set. + * @return the BinaryHardeningFeatures object itself. + */ + public BinaryHardeningFeatures withNx(NxFlag nx) { + this.nx = nx; + return this; + } + + /** + * Get the pie property: PIE flag. + * + * @return the pie value. + */ + public PieFlag pie() { + return this.pie; + } + + /** + * Set the pie property: PIE flag. + * + * @param pie the pie value to set. + * @return the BinaryHardeningFeatures object itself. + */ + public BinaryHardeningFeatures withPie(PieFlag pie) { + this.pie = pie; + return this; + } + + /** + * Get the relro property: RELRO flag. + * + * @return the relro value. + */ + public RelroFlag relro() { + return this.relro; + } + + /** + * Set the relro property: RELRO flag. + * + * @param relro the relro value to set. + * @return the BinaryHardeningFeatures object itself. + */ + public BinaryHardeningFeatures withRelro(RelroFlag relro) { + this.relro = relro; + return this; + } + + /** + * Get the canary property: Canary flag. + * + * @return the canary value. + */ + public CanaryFlag canary() { + return this.canary; + } + + /** + * Set the canary property: Canary flag. + * + * @param canary the canary value to set. + * @return the BinaryHardeningFeatures object itself. + */ + public BinaryHardeningFeatures withCanary(CanaryFlag canary) { + this.canary = canary; + return this; + } + + /** + * Get the stripped property: Stripped flag. + * + * @return the stripped value. + */ + public StrippedFlag 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) { + this.stripped = stripped; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/BinaryHardeningInner.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/BinaryHardeningInner.java new file mode 100644 index 0000000000000..e09cb0c678c7a --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/BinaryHardeningInner.java @@ -0,0 +1,318 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.fist.models.CanaryFlag; +import com.azure.resourcemanager.fist.models.NxFlag; +import com.azure.resourcemanager.fist.models.PieFlag; +import com.azure.resourcemanager.fist.models.RelroFlag; +import com.azure.resourcemanager.fist.models.StrippedFlag; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Binary hardening of a firmware. */ +@Fluent +public final class BinaryHardeningInner { + /* + * ID for the binary hardening result. + */ + @JsonProperty(value = "binaryHardeningId") + private String binaryHardeningId; + + /* + * Binary hardening features. + */ + @JsonProperty(value = "features") + private BinaryHardeningFeatures innerFeatures; + + /* + * The architecture of the uploaded firmware. + */ + @JsonProperty(value = "architecture") + private String architecture; + + /* + * path for binary hardening. + */ + @JsonProperty(value = "path") + private String path; + + /* + * class for binary hardening. + */ + @JsonProperty(value = "class") + private String classProperty; + + /* + * The runpath of the uploaded firmware. + */ + @JsonProperty(value = "runpath") + private String runpath; + + /* + * The rpath of the uploaded firmware. + */ + @JsonProperty(value = "rpath") + private String rpath; + + /** Creates an instance of BinaryHardeningInner class. */ + public BinaryHardeningInner() { + } + + /** + * Get the binaryHardeningId property: ID for the binary hardening result. + * + * @return the binaryHardeningId value. + */ + public String binaryHardeningId() { + return this.binaryHardeningId; + } + + /** + * Set the binaryHardeningId property: ID for the binary hardening result. + * + * @param binaryHardeningId the binaryHardeningId value to set. + * @return the BinaryHardeningInner object itself. + */ + public BinaryHardeningInner withBinaryHardeningId(String binaryHardeningId) { + this.binaryHardeningId = binaryHardeningId; + return this; + } + + /** + * Get the innerFeatures property: Binary hardening features. + * + * @return the innerFeatures value. + */ + private BinaryHardeningFeatures innerFeatures() { + return this.innerFeatures; + } + + /** + * Get the architecture property: The architecture of the uploaded firmware. + * + * @return the architecture value. + */ + public String architecture() { + return this.architecture; + } + + /** + * Set the architecture property: The architecture of the uploaded firmware. + * + * @param architecture the architecture value to set. + * @return the BinaryHardeningInner object itself. + */ + public BinaryHardeningInner withArchitecture(String architecture) { + this.architecture = architecture; + return this; + } + + /** + * Get the path property: path for binary hardening. + * + * @return the path value. + */ + public String path() { + return this.path; + } + + /** + * Set the path property: path for binary hardening. + * + * @param path the path value to set. + * @return the BinaryHardeningInner object itself. + */ + public BinaryHardeningInner withPath(String path) { + this.path = path; + return this; + } + + /** + * Get the classProperty property: class for binary hardening. + * + * @return the classProperty value. + */ + public String classProperty() { + return this.classProperty; + } + + /** + * Set the classProperty property: class for binary hardening. + * + * @param classProperty the classProperty value to set. + * @return the BinaryHardeningInner object itself. + */ + public BinaryHardeningInner 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() { + return this.runpath; + } + + /** + * Set the runpath property: The runpath of the uploaded firmware. + * + * @param runpath the runpath value to set. + * @return the BinaryHardeningInner object itself. + */ + public BinaryHardeningInner 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() { + return this.rpath; + } + + /** + * Set the rpath property: The rpath of the uploaded firmware. + * + * @param rpath the rpath value to set. + * @return the BinaryHardeningInner object itself. + */ + public BinaryHardeningInner withRpath(String rpath) { + this.rpath = rpath; + return this; + } + + /** + * Get the nx property: NX flag. + * + * @return the nx value. + */ + public NxFlag nx() { + return this.innerFeatures() == null ? null : this.innerFeatures().nx(); + } + + /** + * Set the nx property: NX flag. + * + * @param nx the nx value to set. + * @return the BinaryHardeningInner object itself. + */ + public BinaryHardeningInner withNx(NxFlag nx) { + if (this.innerFeatures() == null) { + this.innerFeatures = new BinaryHardeningFeatures(); + } + this.innerFeatures().withNx(nx); + return this; + } + + /** + * Get the pie property: PIE flag. + * + * @return the pie value. + */ + public PieFlag pie() { + return this.innerFeatures() == null ? null : this.innerFeatures().pie(); + } + + /** + * Set the pie property: PIE flag. + * + * @param pie the pie value to set. + * @return the BinaryHardeningInner object itself. + */ + public BinaryHardeningInner withPie(PieFlag pie) { + if (this.innerFeatures() == null) { + this.innerFeatures = new BinaryHardeningFeatures(); + } + this.innerFeatures().withPie(pie); + return this; + } + + /** + * Get the relro property: RELRO flag. + * + * @return the relro value. + */ + public RelroFlag relro() { + return this.innerFeatures() == null ? null : this.innerFeatures().relro(); + } + + /** + * Set the relro property: RELRO flag. + * + * @param relro the relro value to set. + * @return the BinaryHardeningInner object itself. + */ + public BinaryHardeningInner withRelro(RelroFlag relro) { + if (this.innerFeatures() == null) { + this.innerFeatures = new BinaryHardeningFeatures(); + } + this.innerFeatures().withRelro(relro); + return this; + } + + /** + * Get the canary property: Canary flag. + * + * @return the canary value. + */ + public CanaryFlag canary() { + return this.innerFeatures() == null ? null : this.innerFeatures().canary(); + } + + /** + * Set the canary property: Canary flag. + * + * @param canary the canary value to set. + * @return the BinaryHardeningInner object itself. + */ + public BinaryHardeningInner withCanary(CanaryFlag canary) { + if (this.innerFeatures() == null) { + this.innerFeatures = new BinaryHardeningFeatures(); + } + this.innerFeatures().withCanary(canary); + return this; + } + + /** + * Get the stripped property: Stripped flag. + * + * @return the stripped value. + */ + public StrippedFlag 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. + */ + public BinaryHardeningInner withStripped(StrippedFlag stripped) { + if (this.innerFeatures() == null) { + this.innerFeatures = new BinaryHardeningFeatures(); + } + this.innerFeatures().withStripped(stripped); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerFeatures() != null) { + innerFeatures().validate(); + } + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/BinaryHardeningSummaryInner.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/BinaryHardeningSummaryInner.java new file mode 100644 index 0000000000000..87960fd4562f0 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/BinaryHardeningSummaryInner.java @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Binary hardening summary percentages. */ +@Fluent +public final class BinaryHardeningSummaryInner { + /* + * Total number of binaries that were analyzed + */ + @JsonProperty(value = "totalFiles") + private Long totalFiles; + + /* + * NX summary percentage + */ + @JsonProperty(value = "nx") + private Integer nx; + + /* + * PIE summary percentage + */ + @JsonProperty(value = "pie") + private Integer pie; + + /* + * RELRO summary percentage + */ + @JsonProperty(value = "relro") + private Integer relro; + + /* + * Canary summary percentage + */ + @JsonProperty(value = "canary") + private Integer canary; + + /* + * Stripped summary percentage + */ + @JsonProperty(value = "stripped") + private Integer stripped; + + /** Creates an instance of BinaryHardeningSummaryInner class. */ + public BinaryHardeningSummaryInner() { + } + + /** + * Get the totalFiles property: Total number of binaries that were analyzed. + * + * @return the totalFiles value. + */ + public Long totalFiles() { + return this.totalFiles; + } + + /** + * Set the totalFiles property: Total number of binaries that were analyzed. + * + * @param totalFiles the totalFiles value to set. + * @return the BinaryHardeningSummaryInner object itself. + */ + public BinaryHardeningSummaryInner withTotalFiles(Long totalFiles) { + this.totalFiles = totalFiles; + return this; + } + + /** + * Get the nx property: NX summary percentage. + * + * @return the nx value. + */ + public Integer nx() { + return this.nx; + } + + /** + * Set the nx property: NX summary percentage. + * + * @param nx the nx value to set. + * @return the BinaryHardeningSummaryInner object itself. + */ + public BinaryHardeningSummaryInner withNx(Integer nx) { + this.nx = nx; + return this; + } + + /** + * Get the pie property: PIE summary percentage. + * + * @return the pie value. + */ + public Integer pie() { + return this.pie; + } + + /** + * Set the pie property: PIE summary percentage. + * + * @param pie the pie value to set. + * @return the BinaryHardeningSummaryInner object itself. + */ + public BinaryHardeningSummaryInner withPie(Integer pie) { + this.pie = pie; + return this; + } + + /** + * Get the relro property: RELRO summary percentage. + * + * @return the relro value. + */ + public Integer relro() { + return this.relro; + } + + /** + * Set the relro property: RELRO summary percentage. + * + * @param relro the relro value to set. + * @return the BinaryHardeningSummaryInner object itself. + */ + public BinaryHardeningSummaryInner withRelro(Integer relro) { + this.relro = relro; + return this; + } + + /** + * Get the canary property: Canary summary percentage. + * + * @return the canary value. + */ + public Integer canary() { + return this.canary; + } + + /** + * Set the canary property: Canary summary percentage. + * + * @param canary the canary value to set. + * @return the BinaryHardeningSummaryInner object itself. + */ + public BinaryHardeningSummaryInner withCanary(Integer canary) { + this.canary = canary; + return this; + } + + /** + * Get the stripped property: Stripped summary percentage. + * + * @return the stripped value. + */ + public Integer stripped() { + return this.stripped; + } + + /** + * Set the stripped property: Stripped summary percentage. + * + * @param stripped the stripped value to set. + * @return the BinaryHardeningSummaryInner object itself. + */ + public BinaryHardeningSummaryInner withStripped(Integer 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/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/ComponentInner.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/ComponentInner.java new file mode 100644 index 0000000000000..ff1cddb915209 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/ComponentInner.java @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.fist.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/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/CryptoCertificateInner.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/CryptoCertificateInner.java new file mode 100644 index 0000000000000..7ff1b00941d25 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/CryptoCertificateInner.java @@ -0,0 +1,552 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.fist.models.CryptoCertificateEntity; +import com.azure.resourcemanager.fist.models.IsExpired; +import com.azure.resourcemanager.fist.models.IsSelfSigned; +import com.azure.resourcemanager.fist.models.IsShortKeySize; +import com.azure.resourcemanager.fist.models.IsWeakSignature; +import com.azure.resourcemanager.fist.models.PairedKey; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** Crypto certificate properties. */ +@Fluent +public final class CryptoCertificateInner { + /* + * ID for the certificate. + */ + @JsonProperty(value = "cryptoCertId") + private String cryptoCertId; + + /* + * Name of the certificate. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Subject information of the certificate. + */ + @JsonProperty(value = "subject") + private CryptoCertificateEntity subject; + + /* + * Issuer information of the certificate. + */ + @JsonProperty(value = "issuer") + private CryptoCertificateEntity issuer; + + /* + * Issue date for the certificate. + */ + @JsonProperty(value = "issuedDate") + private OffsetDateTime issuedDate; + + /* + * Expiration date for the certificate. + */ + @JsonProperty(value = "expirationDate") + private OffsetDateTime expirationDate; + + /* + * Role of the certificate (Root CA, etc) + */ + @JsonProperty(value = "role") + private String role; + + /* + * The signature algorithm used in the certificate. + */ + @JsonProperty(value = "signatureAlgorithm") + private String signatureAlgorithm; + + /* + * Size of the certificate's key in bits + */ + @JsonProperty(value = "keySize") + private Long keySize; + + /* + * Key algorithm used in the certificate. + */ + @JsonProperty(value = "keyAlgorithm") + private String keyAlgorithm; + + /* + * Encoding used for the certificate. + */ + @JsonProperty(value = "encoding") + private String encoding; + + /* + * Serial number of the certificate. + */ + @JsonProperty(value = "serialNumber") + private String serialNumber; + + /* + * Fingerprint of the certificate. + */ + @JsonProperty(value = "fingerprint") + private String fingerprint; + + /* + * List of functions the certificate can fulfill. + */ + @JsonProperty(value = "usage") + private List usage; + + /* + * List of files paths for this certificate + */ + @JsonProperty(value = "filePaths", access = JsonProperty.Access.WRITE_ONLY) + private List filePaths; + + /* + * A matching paired private key. + */ + @JsonProperty(value = "pairedKey") + private PairedKey pairedKey; + + /* + * Indicates if the certificate is expired. + */ + @JsonProperty(value = "isExpired") + private IsExpired isExpired; + + /* + * Indicates if the certificate was self-signed. + */ + @JsonProperty(value = "isSelfSigned") + private IsSelfSigned isSelfSigned; + + /* + * Indicates the signature algorithm used is insecure. + */ + @JsonProperty(value = "isWeakSignature") + private IsWeakSignature isWeakSignature; + + /* + * Indicates the certificate's key size is considered too small to be secure for the key algorithm. + */ + @JsonProperty(value = "isShortKeySize") + private IsShortKeySize isShortKeySize; + + /** Creates an instance of CryptoCertificateInner class. */ + public CryptoCertificateInner() { + } + + /** + * Get the cryptoCertId property: ID for the certificate. + * + * @return the cryptoCertId value. + */ + public String cryptoCertId() { + return this.cryptoCertId; + } + + /** + * Set the cryptoCertId property: ID for the certificate. + * + * @param cryptoCertId the cryptoCertId value to set. + * @return the CryptoCertificateInner object itself. + */ + public CryptoCertificateInner withCryptoCertId(String cryptoCertId) { + this.cryptoCertId = cryptoCertId; + return this; + } + + /** + * Get the name property: Name of the certificate. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the certificate. + * + * @param name the name value to set. + * @return the CryptoCertificateInner object itself. + */ + public CryptoCertificateInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the subject property: Subject information of the certificate. + * + * @return the subject value. + */ + public CryptoCertificateEntity subject() { + return this.subject; + } + + /** + * Set the subject property: Subject information of the certificate. + * + * @param subject the subject value to set. + * @return the CryptoCertificateInner object itself. + */ + public CryptoCertificateInner withSubject(CryptoCertificateEntity subject) { + this.subject = subject; + return this; + } + + /** + * Get the issuer property: Issuer information of the certificate. + * + * @return the issuer value. + */ + public CryptoCertificateEntity issuer() { + return this.issuer; + } + + /** + * Set the issuer property: Issuer information of the certificate. + * + * @param issuer the issuer value to set. + * @return the CryptoCertificateInner object itself. + */ + public CryptoCertificateInner withIssuer(CryptoCertificateEntity issuer) { + this.issuer = issuer; + return this; + } + + /** + * Get the issuedDate property: Issue date for the certificate. + * + * @return the issuedDate value. + */ + public OffsetDateTime issuedDate() { + return this.issuedDate; + } + + /** + * Set the issuedDate property: Issue date for the certificate. + * + * @param issuedDate the issuedDate value to set. + * @return the CryptoCertificateInner object itself. + */ + public CryptoCertificateInner withIssuedDate(OffsetDateTime issuedDate) { + this.issuedDate = issuedDate; + return this; + } + + /** + * Get the expirationDate property: Expiration date for the certificate. + * + * @return the expirationDate value. + */ + public OffsetDateTime expirationDate() { + return this.expirationDate; + } + + /** + * Set the expirationDate property: Expiration date for the certificate. + * + * @param expirationDate the expirationDate value to set. + * @return the CryptoCertificateInner object itself. + */ + public CryptoCertificateInner 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() { + return this.role; + } + + /** + * Set the role property: Role of the certificate (Root CA, etc). + * + * @param role the role value to set. + * @return the CryptoCertificateInner object itself. + */ + public CryptoCertificateInner 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() { + return this.signatureAlgorithm; + } + + /** + * Set the signatureAlgorithm property: The signature algorithm used in the certificate. + * + * @param signatureAlgorithm the signatureAlgorithm value to set. + * @return the CryptoCertificateInner object itself. + */ + public CryptoCertificateInner 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() { + return this.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. + */ + public CryptoCertificateInner 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() { + return this.keyAlgorithm; + } + + /** + * Set the keyAlgorithm property: Key algorithm used in the certificate. + * + * @param keyAlgorithm the keyAlgorithm value to set. + * @return the CryptoCertificateInner object itself. + */ + public CryptoCertificateInner withKeyAlgorithm(String keyAlgorithm) { + this.keyAlgorithm = keyAlgorithm; + return this; + } + + /** + * Get the encoding property: Encoding used for the certificate. + * + * @return the encoding value. + */ + public String encoding() { + return this.encoding; + } + + /** + * Set the encoding property: Encoding used for the certificate. + * + * @param encoding the encoding value to set. + * @return the CryptoCertificateInner object itself. + */ + public CryptoCertificateInner withEncoding(String encoding) { + this.encoding = encoding; + return this; + } + + /** + * Get the serialNumber property: Serial number of the certificate. + * + * @return the serialNumber value. + */ + public String serialNumber() { + return this.serialNumber; + } + + /** + * Set the serialNumber property: Serial number of the certificate. + * + * @param serialNumber the serialNumber value to set. + * @return the CryptoCertificateInner object itself. + */ + public CryptoCertificateInner withSerialNumber(String serialNumber) { + this.serialNumber = serialNumber; + return this; + } + + /** + * Get the fingerprint property: Fingerprint of the certificate. + * + * @return the fingerprint value. + */ + public String fingerprint() { + return this.fingerprint; + } + + /** + * Set the fingerprint property: Fingerprint of the certificate. + * + * @param fingerprint the fingerprint value to set. + * @return the CryptoCertificateInner object itself. + */ + public CryptoCertificateInner 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() { + return this.usage; + } + + /** + * Set the usage property: List of functions the certificate can fulfill. + * + * @param usage the usage value to set. + * @return the CryptoCertificateInner object itself. + */ + public CryptoCertificateInner withUsage(List usage) { + this.usage = usage; + return this; + } + + /** + * Get the filePaths property: List of files paths for this certificate. + * + * @return the filePaths value. + */ + public List filePaths() { + return this.filePaths; + } + + /** + * Get the pairedKey property: A matching paired private key. + * + * @return the pairedKey value. + */ + public PairedKey pairedKey() { + return this.pairedKey; + } + + /** + * Set the pairedKey property: A matching paired private key. + * + * @param pairedKey the pairedKey value to set. + * @return the CryptoCertificateInner object itself. + */ + public CryptoCertificateInner 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() { + 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. + */ + public CryptoCertificateInner withIsExpired(IsExpired isExpired) { + this.isExpired = isExpired; + return this; + } + + /** + * Get the isSelfSigned property: Indicates if the certificate was self-signed. + * + * @return the isSelfSigned value. + */ + public IsSelfSigned isSelfSigned() { + return this.isSelfSigned; + } + + /** + * Set the isSelfSigned property: Indicates if the certificate was self-signed. + * + * @param isSelfSigned the isSelfSigned value to set. + * @return the CryptoCertificateInner object itself. + */ + public CryptoCertificateInner withIsSelfSigned(IsSelfSigned isSelfSigned) { + this.isSelfSigned = isSelfSigned; + return this; + } + + /** + * Get the isWeakSignature property: Indicates the signature algorithm used is insecure. + * + * @return the isWeakSignature value. + */ + public IsWeakSignature 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. + */ + public CryptoCertificateInner withIsWeakSignature(IsWeakSignature isWeakSignature) { + this.isWeakSignature = 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 IsShortKeySize 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. + */ + public CryptoCertificateInner withIsShortKeySize(IsShortKeySize isShortKeySize) { + this.isShortKeySize = isShortKeySize; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (subject() != null) { + subject().validate(); + } + if (issuer() != null) { + issuer().validate(); + } + if (pairedKey() != null) { + pairedKey().validate(); + } + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/CryptoCertificateSummaryInner.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/CryptoCertificateSummaryInner.java new file mode 100644 index 0000000000000..2c638d8700f2c --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/CryptoCertificateSummaryInner.java @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Cryptographic certificate summary values. */ +@Fluent +public final class CryptoCertificateSummaryInner { + /* + * Total number of certificates found. + */ + @JsonProperty(value = "totalCertificates") + private Long totalCertificates; + + /* + * Total number of paired private keys found for the certificates. + */ + @JsonProperty(value = "pairedKeys") + private Long pairedKeys; + + /* + * Total number of expired certificates found. + */ + @JsonProperty(value = "expired") + private Long expired; + + /* + * Total number of nearly expired certificates found. + */ + @JsonProperty(value = "expiringSoon") + private Long expiringSoon; + + /* + * Total number of certificates found using a weak signature algorithm. + */ + @JsonProperty(value = "weakSignature") + private Long weakSignature; + + /* + * Total number of certificates found that are self-signed. + */ + @JsonProperty(value = "selfSigned") + private Long selfSigned; + + /* + * Total number of certificates found that have an insecure key size for the key algorithm. + */ + @JsonProperty(value = "shortKeySize") + private Long shortKeySize; + + /** Creates an instance of CryptoCertificateSummaryInner class. */ + public CryptoCertificateSummaryInner() { + } + + /** + * Get the totalCertificates property: Total number of certificates found. + * + * @return the totalCertificates value. + */ + public Long totalCertificates() { + return this.totalCertificates; + } + + /** + * Set the totalCertificates property: Total number of certificates found. + * + * @param totalCertificates the totalCertificates value to set. + * @return the CryptoCertificateSummaryInner object itself. + */ + public CryptoCertificateSummaryInner 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() { + return this.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. + */ + public CryptoCertificateSummaryInner 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() { + return this.expired; + } + + /** + * Set the expired property: Total number of expired certificates found. + * + * @param expired the expired value to set. + * @return the CryptoCertificateSummaryInner object itself. + */ + public CryptoCertificateSummaryInner 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() { + return this.expiringSoon; + } + + /** + * Set the expiringSoon property: Total number of nearly expired certificates found. + * + * @param expiringSoon the expiringSoon value to set. + * @return the CryptoCertificateSummaryInner object itself. + */ + public CryptoCertificateSummaryInner 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() { + return this.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. + */ + public CryptoCertificateSummaryInner 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() { + return this.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. + */ + public CryptoCertificateSummaryInner withSelfSigned(Long selfSigned) { + this.selfSigned = selfSigned; + return this; + } + + /** + * 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() { + return this.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. + */ + public CryptoCertificateSummaryInner withShortKeySize(Long shortKeySize) { + this.shortKeySize = shortKeySize; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/CryptoKeyInner.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/CryptoKeyInner.java new file mode 100644 index 0000000000000..22c646bfae155 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/CryptoKeyInner.java @@ -0,0 +1,227 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.fist.models.IsShortKeySize; +import com.azure.resourcemanager.fist.models.PairedKey; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Crypto key properties. */ +@Fluent +public final class CryptoKeyInner { + /* + * ID for the key. + */ + @JsonProperty(value = "cryptoKeyId") + private String cryptoKeyId; + + /* + * Type of the key (public or private). + */ + @JsonProperty(value = "keyType") + private String keyType; + + /* + * Size of the key in bits. + */ + @JsonProperty(value = "keySize") + private Long keySize; + + /* + * Key algorithm name. + */ + @JsonProperty(value = "keyAlgorithm") + private String keyAlgorithm; + + /* + * Functions the key can fulfill. + */ + @JsonProperty(value = "usage") + private List usage; + + /* + * List of files paths for this key. + */ + @JsonProperty(value = "filePaths", access = JsonProperty.Access.WRITE_ONLY) + private List filePaths; + + /* + * A matching paired key or certificate. + */ + @JsonProperty(value = "pairedKey") + private PairedKey pairedKey; + + /* + * Indicates the key size is considered too small to be secure for the algorithm. + */ + @JsonProperty(value = "isShortKeySize") + private IsShortKeySize isShortKeySize; + + /** Creates an instance of CryptoKeyInner class. */ + public CryptoKeyInner() { + } + + /** + * Get the cryptoKeyId property: ID for the key. + * + * @return the cryptoKeyId value. + */ + public String cryptoKeyId() { + return this.cryptoKeyId; + } + + /** + * Set the cryptoKeyId property: ID for the key. + * + * @param cryptoKeyId the cryptoKeyId value to set. + * @return the CryptoKeyInner object itself. + */ + public CryptoKeyInner 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() { + return this.keyType; + } + + /** + * Set the keyType property: Type of the key (public or private). + * + * @param keyType the keyType value to set. + * @return the CryptoKeyInner object itself. + */ + public CryptoKeyInner 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() { + return this.keySize; + } + + /** + * Set the keySize property: Size of the key in bits. + * + * @param keySize the keySize value to set. + * @return the CryptoKeyInner object itself. + */ + public CryptoKeyInner withKeySize(Long keySize) { + this.keySize = keySize; + return this; + } + + /** + * Get the keyAlgorithm property: Key algorithm name. + * + * @return the keyAlgorithm value. + */ + public String keyAlgorithm() { + return this.keyAlgorithm; + } + + /** + * Set the keyAlgorithm property: Key algorithm name. + * + * @param keyAlgorithm the keyAlgorithm value to set. + * @return the CryptoKeyInner object itself. + */ + public CryptoKeyInner withKeyAlgorithm(String keyAlgorithm) { + this.keyAlgorithm = keyAlgorithm; + return this; + } + + /** + * Get the usage property: Functions the key can fulfill. + * + * @return the usage value. + */ + public List usage() { + return this.usage; + } + + /** + * Set the usage property: Functions the key can fulfill. + * + * @param usage the usage value to set. + * @return the CryptoKeyInner object itself. + */ + public CryptoKeyInner withUsage(List usage) { + this.usage = usage; + return this; + } + + /** + * Get the filePaths property: List of files paths for this key. + * + * @return the filePaths value. + */ + public List filePaths() { + return this.filePaths; + } + + /** + * Get the pairedKey property: A matching paired key or certificate. + * + * @return the pairedKey value. + */ + public PairedKey pairedKey() { + return this.pairedKey; + } + + /** + * Set the pairedKey property: A matching paired key or certificate. + * + * @param pairedKey the pairedKey value to set. + * @return the CryptoKeyInner object itself. + */ + public CryptoKeyInner 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() { + 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. + */ + public CryptoKeyInner withIsShortKeySize(IsShortKeySize isShortKeySize) { + this.isShortKeySize = isShortKeySize; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (pairedKey() != null) { + pairedKey().validate(); + } + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/CryptoKeySummaryInner.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/CryptoKeySummaryInner.java new file mode 100644 index 0000000000000..8fc5c9186e986 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/CryptoKeySummaryInner.java @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Cryptographic key summary values. */ +@Fluent +public final class CryptoKeySummaryInner { + /* + * Total number of cryptographic keys found. + */ + @JsonProperty(value = "totalKeys") + private Long totalKeys; + + /* + * Total number of (non-certificate) public keys found. + */ + @JsonProperty(value = "publicKeys") + private Long publicKeys; + + /* + * Total number of private keys found. + */ + @JsonProperty(value = "privateKeys") + private Long privateKeys; + + /* + * Total number of keys found that have a matching paired key or certificate. + */ + @JsonProperty(value = "pairedKeys") + private Long pairedKeys; + + /* + * Total number of keys found that have an insecure key size for the algorithm. + */ + @JsonProperty(value = "shortKeySize") + private Long shortKeySize; + + /** Creates an instance of CryptoKeySummaryInner class. */ + public CryptoKeySummaryInner() { + } + + /** + * Get the totalKeys property: Total number of cryptographic keys found. + * + * @return the totalKeys value. + */ + public Long totalKeys() { + return this.totalKeys; + } + + /** + * Set the totalKeys property: Total number of cryptographic keys found. + * + * @param totalKeys the totalKeys value to set. + * @return the CryptoKeySummaryInner object itself. + */ + public CryptoKeySummaryInner 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() { + return this.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. + */ + public CryptoKeySummaryInner 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() { + return this.privateKeys; + } + + /** + * Set the privateKeys property: Total number of private keys found. + * + * @param privateKeys the privateKeys value to set. + * @return the CryptoKeySummaryInner object itself. + */ + public CryptoKeySummaryInner 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() { + return this.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. + */ + public CryptoKeySummaryInner 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() { + return this.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. + */ + public CryptoKeySummaryInner withShortKeySize(Long shortKeySize) { + this.shortKeySize = shortKeySize; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/CveInner.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/CveInner.java new file mode 100644 index 0000000000000..3920a1ab3266d --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/CveInner.java @@ -0,0 +1,334 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.fist.models.CveLink; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** Known CVEs of a firmware. */ +@Fluent +public final class CveInner { + /* + * ID of CVE + */ + @JsonProperty(value = "cveId") + private String cveId; + + /* + * Component of CVE + */ + @JsonProperty(value = "component") + private Object component; + + /* + * Severity of CVE + */ + @JsonProperty(value = "severity") + private String severity; + + /* + * Name of 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 + */ + @JsonProperty(value = "cvssScore") + private String cvssScore; + + /* + * Cvss version of CVE + */ + @JsonProperty(value = "cvssVersion") + private String cvssVersion; + + /* + * Cvss V2 score of CVE + */ + @JsonProperty(value = "cvssV2Score") + private String cvssV2Score; + + /* + * Cvss V3 score of 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. + */ + @JsonProperty(value = "links", access = JsonProperty.Access.WRITE_ONLY) + private List links; + + /* + * Description of CVE + */ + @JsonProperty(value = "description") + private String description; + + /** Creates an instance of CveInner class. */ + public CveInner() { + } + + /** + * Get the cveId property: ID of CVE. + * + * @return the cveId value. + */ + public String cveId() { + return this.cveId; + } + + /** + * Set the cveId property: ID of CVE. + * + * @param cveId the cveId value to set. + * @return the CveInner object itself. + */ + public CveInner withCveId(String cveId) { + this.cveId = cveId; + return this; + } + + /** + * Get the component property: Component of CVE. + * + * @return the component value. + */ + public Object component() { + return this.component; + } + + /** + * Set the component property: Component of CVE. + * + * @param component the component value to set. + * @return the CveInner object itself. + */ + public CveInner withComponent(Object component) { + this.component = component; + return this; + } + + /** + * Get the severity property: Severity of CVE. + * + * @return the severity value. + */ + public String severity() { + return this.severity; + } + + /** + * Set the severity property: Severity of CVE. + * + * @param severity the severity value to set. + * @return the CveInner object itself. + */ + public CveInner withSeverity(String severity) { + this.severity = severity; + return this; + } + + /** + * Get the name property: Name of CVE. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of CVE. + * + * @param name the name value to set. + * @return the CveInner object itself. + */ + public CveInner withName(String name) { + this.name = 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.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. + */ + public CveInner withCvssScore(String cvssScore) { + this.cvssScore = cvssScore; + return this; + } + + /** + * Get the cvssVersion property: Cvss version of CVE. + * + * @return the cvssVersion value. + */ + public String cvssVersion() { + return this.cvssVersion; + } + + /** + * Set the cvssVersion property: Cvss version of CVE. + * + * @param cvssVersion the cvssVersion value to set. + * @return the CveInner object itself. + */ + public CveInner withCvssVersion(String cvssVersion) { + this.cvssVersion = cvssVersion; + return this; + } + + /** + * Get the cvssV2Score property: Cvss V2 score of CVE. + * + * @return the cvssV2Score value. + */ + public String cvssV2Score() { + return this.cvssV2Score; + } + + /** + * Set the cvssV2Score property: Cvss V2 score of CVE. + * + * @param cvssV2Score the cvssV2Score value to set. + * @return the CveInner object itself. + */ + public CveInner withCvssV2Score(String cvssV2Score) { + this.cvssV2Score = cvssV2Score; + return this; + } + + /** + * Get the cvssV3Score property: Cvss V3 score of CVE. + * + * @return the cvssV3Score value. + */ + public String cvssV3Score() { + return this.cvssV3Score; + } + + /** + * Set the cvssV3Score property: Cvss V3 score of CVE. + * + * @param cvssV3Score the cvssV3Score value to set. + * @return the CveInner object itself. + */ + public CveInner 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. + * + * @return the links value. + */ + public List links() { + return this.links; + } + + /** + * Get the description property: Description of CVE. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Description of CVE. + * + * @param description the description value to set. + * @return the CveInner object itself. + */ + public CveInner withDescription(String description) { + this.description = description; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (links() != null) { + links().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/CveSummaryInner.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/CveSummaryInner.java new file mode 100644 index 0000000000000..289326d2a7121 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/CveSummaryInner.java @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.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/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/FirmwareInner.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/FirmwareInner.java new file mode 100644 index 0000000000000..ccf63efa292a6 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/FirmwareInner.java @@ -0,0 +1,255 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.fist.models.ProvisioningState; +import com.azure.resourcemanager.fist.models.Status; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Firmware definition. */ +@Fluent +public final class FirmwareInner extends ProxyResource { + /* + * The properties of a firmware + */ + @JsonProperty(value = "properties") + private FirmwareProperties 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 FirmwareInner class. */ + public FirmwareInner() { + } + + /** + * Get the innerProperties property: The properties of a firmware. + * + * @return the innerProperties value. + */ + private FirmwareProperties 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 fileName property: File name for a firmware that user uploaded. + * + * @return the fileName value. + */ + public String fileName() { + return this.innerProperties() == null ? null : this.innerProperties().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. + */ + public FirmwareInner withFileName(String fileName) { + if (this.innerProperties() == null) { + this.innerProperties = new FirmwareProperties(); + } + this.innerProperties().withFileName(fileName); + return this; + } + + /** + * Get the vendor property: Firmware vendor. + * + * @return the vendor value. + */ + public String vendor() { + return this.innerProperties() == null ? null : this.innerProperties().vendor(); + } + + /** + * Set the vendor property: Firmware vendor. + * + * @param vendor the vendor value to set. + * @return the FirmwareInner object itself. + */ + public FirmwareInner withVendor(String vendor) { + if (this.innerProperties() == null) { + this.innerProperties = new FirmwareProperties(); + } + this.innerProperties().withVendor(vendor); + return this; + } + + /** + * Get the model property: Firmware model. + * + * @return the model value. + */ + public String model() { + return this.innerProperties() == null ? null : this.innerProperties().model(); + } + + /** + * Set the model property: Firmware model. + * + * @param model the model value to set. + * @return the FirmwareInner object itself. + */ + public FirmwareInner withModel(String model) { + if (this.innerProperties() == null) { + this.innerProperties = new FirmwareProperties(); + } + this.innerProperties().withModel(model); + return this; + } + + /** + * Get the version property: Firmware version. + * + * @return the version value. + */ + public String version() { + return this.innerProperties() == null ? null : this.innerProperties().version(); + } + + /** + * Set the version property: Firmware version. + * + * @param version the version value to set. + * @return the FirmwareInner object itself. + */ + public FirmwareInner withVersion(String version) { + if (this.innerProperties() == null) { + this.innerProperties = new FirmwareProperties(); + } + this.innerProperties().withVersion(version); + return this; + } + + /** + * Get the description property: User-specified description of the firmware. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: User-specified description of the firmware. + * + * @param description the description value to set. + * @return the FirmwareInner object itself. + */ + public FirmwareInner withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new FirmwareProperties(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Get the fileSize property: File size of the uploaded firmware image. + * + * @return the fileSize value. + */ + public Long fileSize() { + return this.innerProperties() == null ? null : this.innerProperties().fileSize(); + } + + /** + * Set the fileSize property: File size of the uploaded firmware image. + * + * @param fileSize the fileSize value to set. + * @return the FirmwareInner object itself. + */ + public FirmwareInner withFileSize(Long fileSize) { + if (this.innerProperties() == null) { + this.innerProperties = new FirmwareProperties(); + } + this.innerProperties().withFileSize(fileSize); + return this; + } + + /** + * Get the status property: The status of firmware scan. + * + * @return the status value. + */ + public Status status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); + } + + /** + * Set the status property: The status of firmware scan. + * + * @param status the status value to set. + * @return the FirmwareInner object itself. + */ + public FirmwareInner withStatus(Status status) { + if (this.innerProperties() == null) { + this.innerProperties = new FirmwareProperties(); + } + this.innerProperties().withStatus(status); + return this; + } + + /** + * Get the statusMessages property: A list of errors or other messages generated during firmware analysis. + * + * @return the statusMessages value. + */ + 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) { + if (this.innerProperties() == null) { + this.innerProperties = new FirmwareProperties(); + } + this.innerProperties().withStatusMessages(statusMessages); + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/FirmwareProperties.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/FirmwareProperties.java new file mode 100644 index 0000000000000..a4c94ec99f088 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/FirmwareProperties.java @@ -0,0 +1,250 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.fist.models.ProvisioningState; +import com.azure.resourcemanager.fist.models.Status; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Firmware properties. */ +@Fluent +public final class FirmwareProperties { + /* + * File name for a firmware that user uploaded. + */ + @JsonProperty(value = "fileName") + private String fileName; + + /* + * Firmware vendor. + */ + @JsonProperty(value = "vendor") + private String vendor; + + /* + * Firmware model. + */ + @JsonProperty(value = "model") + private String model; + + /* + * Firmware version. + */ + @JsonProperty(value = "version") + private String version; + + /* + * User-specified description of the firmware. + */ + @JsonProperty(value = "description") + private String description; + + /* + * File size of the uploaded firmware image. + */ + @JsonProperty(value = "fileSize") + private Long fileSize; + + /* + * The status of firmware scan. + */ + @JsonProperty(value = "status") + private Status status; + + /* + * A list of errors or other messages generated during firmware analysis + */ + @JsonProperty(value = "statusMessages") + private List statusMessages; + + /* + * Provisioning state of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** 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() { + return this.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. + */ + public FirmwareProperties withFileName(String fileName) { + this.fileName = fileName; + return this; + } + + /** + * Get the vendor property: Firmware vendor. + * + * @return the vendor value. + */ + public String vendor() { + return this.vendor; + } + + /** + * Set the vendor property: Firmware vendor. + * + * @param vendor the vendor value to set. + * @return the FirmwareProperties object itself. + */ + public FirmwareProperties withVendor(String vendor) { + this.vendor = vendor; + return this; + } + + /** + * Get the model property: Firmware model. + * + * @return the model value. + */ + public String model() { + return this.model; + } + + /** + * Set the model property: Firmware model. + * + * @param model the model value to set. + * @return the FirmwareProperties object itself. + */ + public FirmwareProperties withModel(String model) { + this.model = model; + return this; + } + + /** + * Get the version property: Firmware version. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: Firmware version. + * + * @param version the version value to set. + * @return the FirmwareProperties object itself. + */ + public FirmwareProperties withVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the description property: User-specified description of the firmware. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: User-specified description of the firmware. + * + * @param description the description value to set. + * @return the FirmwareProperties object itself. + */ + public FirmwareProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the fileSize property: File size of the uploaded firmware image. + * + * @return the fileSize value. + */ + public Long fileSize() { + return this.fileSize; + } + + /** + * Set the fileSize property: File size of the uploaded firmware image. + * + * @param fileSize the fileSize value to set. + * @return the FirmwareProperties object itself. + */ + public FirmwareProperties withFileSize(Long fileSize) { + this.fileSize = fileSize; + return this; + } + + /** + * Get the status property: The status of firmware scan. + * + * @return the status value. + */ + public Status status() { + return this.status; + } + + /** + * Set the status property: The status of firmware scan. + * + * @param status the status value to set. + * @return the FirmwareProperties object itself. + */ + public FirmwareProperties withStatus(Status status) { + this.status = status; + return this; + } + + /** + * Get the statusMessages property: A list of errors or other messages generated during firmware analysis. + * + * @return the statusMessages value. + */ + 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) { + this.statusMessages = statusMessages; + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/FirmwareSummaryInner.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/FirmwareSummaryInner.java new file mode 100644 index 0000000000000..1bffe3af983da --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/FirmwareSummaryInner.java @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.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/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/OperationInner.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/OperationInner.java new file mode 100644 index 0000000000000..d2318fcd6926c --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/OperationInner.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.fist.models.ActionType; +import com.azure.resourcemanager.fist.models.OperationDisplay; +import com.azure.resourcemanager.fist.models.Origin; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * REST API Operation + * + *

Details of a REST API operation, returned from the Resource Provider Operations API. + */ +@Fluent +public final class OperationInner { + /* + * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for + * ARM/control-plane operations. + */ + @JsonProperty(value = "isDataAction", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isDataAction; + + /* + * Localized display information for this particular operation. + */ + @JsonProperty(value = "display") + private OperationDisplay display; + + /* + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default + * value is "user,system" + */ + @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY) + private Origin origin; + + /* + * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + */ + @JsonProperty(value = "actionType", access = JsonProperty.Access.WRITE_ONLY) + private ActionType actionType; + + /** 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() { + return this.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() { + return this.isDataAction; + } + + /** + * Get the display property: Localized display information for this particular operation. + * + * @return the display value. + */ + public OperationDisplay display() { + return this.display; + } + + /** + * Set the display property: Localized display information for this particular operation. + * + * @param display the display value to set. + * @return the OperationInner object itself. + */ + public OperationInner withDisplay(OperationDisplay display) { + this.display = display; + return this; + } + + /** + * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and + * audit logs UX. Default value is "user,system". + * + * @return the origin value. + */ + public Origin origin() { + return this.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() { + return this.actionType; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (display() != null) { + display().validate(); + } + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/PasswordHashInner.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/PasswordHashInner.java new file mode 100644 index 0000000000000..1bda460aa1f9f --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/PasswordHashInner.java @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Password hash properties. */ +@Fluent +public final class PasswordHashInner { + /* + * ID for password hash + */ + @JsonProperty(value = "passwordHashId") + private String passwordHashId; + + /* + * File path of the password hash + */ + @JsonProperty(value = "filePath") + private String filePath; + + /* + * Salt of the password hash + */ + @JsonProperty(value = "salt") + private String salt; + + /* + * Hash of the password + */ + @JsonProperty(value = "hash") + private String hash; + + /* + * Context of password hash + */ + @JsonProperty(value = "context") + private String context; + + /* + * User name of password hash + */ + @JsonProperty(value = "username") + private String username; + + /* + * Algorithm of the password hash + */ + @JsonProperty(value = "algorithm") + private String algorithm; + + /** Creates an instance of PasswordHashInner class. */ + public PasswordHashInner() { + } + + /** + * Get the passwordHashId property: ID for password hash. + * + * @return the passwordHashId value. + */ + public String passwordHashId() { + return this.passwordHashId; + } + + /** + * Set the passwordHashId property: ID for password hash. + * + * @param passwordHashId the passwordHashId value to set. + * @return the PasswordHashInner object itself. + */ + public PasswordHashInner 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() { + return this.filePath; + } + + /** + * Set the filePath property: File path of the password hash. + * + * @param filePath the filePath value to set. + * @return the PasswordHashInner object itself. + */ + public PasswordHashInner withFilePath(String filePath) { + this.filePath = filePath; + return this; + } + + /** + * Get the salt property: Salt of the password hash. + * + * @return the salt value. + */ + public String salt() { + return this.salt; + } + + /** + * Set the salt property: Salt of the password hash. + * + * @param salt the salt value to set. + * @return the PasswordHashInner object itself. + */ + public PasswordHashInner withSalt(String salt) { + this.salt = salt; + return this; + } + + /** + * Get the hash property: Hash of the password. + * + * @return the hash value. + */ + public String hash() { + return this.hash; + } + + /** + * Set the hash property: Hash of the password. + * + * @param hash the hash value to set. + * @return the PasswordHashInner object itself. + */ + public PasswordHashInner withHash(String hash) { + this.hash = hash; + return this; + } + + /** + * Get the context property: Context of password hash. + * + * @return the context value. + */ + public String context() { + return this.context; + } + + /** + * Set the context property: Context of password hash. + * + * @param context the context value to set. + * @return the PasswordHashInner object itself. + */ + public PasswordHashInner withContext(String context) { + this.context = context; + return this; + } + + /** + * Get the username property: User name of password hash. + * + * @return the username value. + */ + public String username() { + return this.username; + } + + /** + * Set the username property: User name of password hash. + * + * @param username the username value to set. + * @return the PasswordHashInner object itself. + */ + public PasswordHashInner withUsername(String username) { + this.username = username; + return this; + } + + /** + * Get the algorithm property: Algorithm of the password hash. + * + * @return the algorithm value. + */ + public String algorithm() { + return this.algorithm; + } + + /** + * Set the algorithm property: Algorithm of the password hash. + * + * @param algorithm the algorithm value to set. + * @return the PasswordHashInner object itself. + */ + public PasswordHashInner 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/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/UrlTokenInner.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/UrlTokenInner.java new file mode 100644 index 0000000000000..bbb3f2ebbdc83 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/UrlTokenInner.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Url data for creating or accessing a blob file. */ +@Immutable +public final class UrlTokenInner { + /* + * SAS URL for creating or accessing a blob file. + */ + @JsonProperty(value = "url", access = JsonProperty.Access.WRITE_ONLY) + private String url; + + /* + * SAS URL for file uploading. Kept for backwards compatibility + */ + @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/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/WorkspaceInner.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/WorkspaceInner.java new file mode 100644 index 0000000000000..43c2da21521db --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/WorkspaceInner.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.fist.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.fist.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Firmware analysis workspace. */ +@Fluent +public final class WorkspaceInner extends Resource { + /* + * Workspace properties. + */ + @JsonProperty(value = "properties") + private WorkspaceProperties 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 WorkspaceInner class. */ + public WorkspaceInner() { + } + + /** + * Get the innerProperties property: Workspace properties. + * + * @return the innerProperties value. + */ + private WorkspaceProperties 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; + } + + /** {@inheritDoc} */ + @Override + public WorkspaceInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public WorkspaceInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/WorkspaceProperties.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/WorkspaceProperties.java new file mode 100644 index 0000000000000..38830c570e0b7 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/WorkspaceProperties.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.fist.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.fist.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Workspace properties. */ +@Immutable +public final class WorkspaceProperties { + /* + * Provisioning state of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** Creates an instance of WorkspaceProperties class. */ + public WorkspaceProperties() { + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/package-info.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/package-info.java new file mode 100644 index 0000000000000..d29c106b28943 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/models/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// 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 com.azure.resourcemanager.fist.fluent.models; diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/package-info.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/package-info.java new file mode 100644 index 0000000000000..edb8075b51a88 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/fluent/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// 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 com.azure.resourcemanager.fist.fluent; diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/BinaryHardeningImpl.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/BinaryHardeningImpl.java new file mode 100644 index 0000000000000..0406778946f1a --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/BinaryHardeningImpl.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.implementation; + +import com.azure.resourcemanager.fist.fluent.models.BinaryHardeningInner; +import com.azure.resourcemanager.fist.models.BinaryHardening; +import com.azure.resourcemanager.fist.models.CanaryFlag; +import com.azure.resourcemanager.fist.models.NxFlag; +import com.azure.resourcemanager.fist.models.PieFlag; +import com.azure.resourcemanager.fist.models.RelroFlag; +import com.azure.resourcemanager.fist.models.StrippedFlag; + +public final class BinaryHardeningImpl implements BinaryHardening { + private BinaryHardeningInner innerObject; + + private final com.azure.resourcemanager.fist.IoTFirmwareDefenseManager serviceManager; + + BinaryHardeningImpl( + BinaryHardeningInner innerObject, com.azure.resourcemanager.fist.IoTFirmwareDefenseManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String binaryHardeningId() { + return this.innerModel().binaryHardeningId(); + } + + public String architecture() { + return this.innerModel().architecture(); + } + + public String path() { + return this.innerModel().path(); + } + + public String classProperty() { + return this.innerModel().classProperty(); + } + + public String runpath() { + return this.innerModel().runpath(); + } + + public String rpath() { + return this.innerModel().rpath(); + } + + public NxFlag nx() { + return this.innerModel().nx(); + } + + public PieFlag pie() { + return this.innerModel().pie(); + } + + public RelroFlag relro() { + return this.innerModel().relro(); + } + + public CanaryFlag canary() { + return this.innerModel().canary(); + } + + public StrippedFlag stripped() { + return this.innerModel().stripped(); + } + + public BinaryHardeningInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.fist.IoTFirmwareDefenseManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/BinaryHardeningSummaryImpl.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/BinaryHardeningSummaryImpl.java new file mode 100644 index 0000000000000..227b1b0cf02c7 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/BinaryHardeningSummaryImpl.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.implementation; + +import com.azure.resourcemanager.fist.fluent.models.BinaryHardeningSummaryInner; +import com.azure.resourcemanager.fist.models.BinaryHardeningSummary; + +public final class BinaryHardeningSummaryImpl implements BinaryHardeningSummary { + private BinaryHardeningSummaryInner innerObject; + + private final com.azure.resourcemanager.fist.IoTFirmwareDefenseManager serviceManager; + + BinaryHardeningSummaryImpl( + BinaryHardeningSummaryInner innerObject, + com.azure.resourcemanager.fist.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.fist.IoTFirmwareDefenseManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/ComponentImpl.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/ComponentImpl.java new file mode 100644 index 0000000000000..742cc12d41acc --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/ComponentImpl.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.fist.implementation; + +import com.azure.resourcemanager.fist.fluent.models.ComponentInner; +import com.azure.resourcemanager.fist.models.Component; +import com.azure.resourcemanager.fist.models.IsUpdateAvailable; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; + +public final class ComponentImpl implements Component { + private ComponentInner innerObject; + + private final com.azure.resourcemanager.fist.IoTFirmwareDefenseManager serviceManager; + + ComponentImpl(ComponentInner innerObject, com.azure.resourcemanager.fist.IoTFirmwareDefenseManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String componentId() { + return this.innerModel().componentId(); + } + + public String componentName() { + return this.innerModel().componentName(); + } + + public String version() { + return this.innerModel().version(); + } + + public String license() { + return this.innerModel().license(); + } + + public OffsetDateTime releaseDate() { + return this.innerModel().releaseDate(); + } + + public List paths() { + List inner = this.innerModel().paths(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public IsUpdateAvailable isUpdateAvailable() { + return this.innerModel().isUpdateAvailable(); + } + + public ComponentInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.fist.IoTFirmwareDefenseManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/CryptoCertificateImpl.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/CryptoCertificateImpl.java new file mode 100644 index 0000000000000..f163b00557f0a --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/CryptoCertificateImpl.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.implementation; + +import com.azure.resourcemanager.fist.fluent.models.CryptoCertificateInner; +import com.azure.resourcemanager.fist.models.CryptoCertificate; +import com.azure.resourcemanager.fist.models.CryptoCertificateEntity; +import com.azure.resourcemanager.fist.models.IsExpired; +import com.azure.resourcemanager.fist.models.IsSelfSigned; +import com.azure.resourcemanager.fist.models.IsShortKeySize; +import com.azure.resourcemanager.fist.models.IsWeakSignature; +import com.azure.resourcemanager.fist.models.PairedKey; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; + +public final class CryptoCertificateImpl implements CryptoCertificate { + private CryptoCertificateInner innerObject; + + private final com.azure.resourcemanager.fist.IoTFirmwareDefenseManager serviceManager; + + CryptoCertificateImpl( + CryptoCertificateInner innerObject, com.azure.resourcemanager.fist.IoTFirmwareDefenseManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String cryptoCertId() { + return this.innerModel().cryptoCertId(); + } + + public String name() { + return this.innerModel().name(); + } + + public CryptoCertificateEntity subject() { + return this.innerModel().subject(); + } + + public CryptoCertificateEntity issuer() { + return this.innerModel().issuer(); + } + + public OffsetDateTime issuedDate() { + return this.innerModel().issuedDate(); + } + + public OffsetDateTime expirationDate() { + return this.innerModel().expirationDate(); + } + + public String role() { + return this.innerModel().role(); + } + + public String signatureAlgorithm() { + return this.innerModel().signatureAlgorithm(); + } + + public Long keySize() { + return this.innerModel().keySize(); + } + + public String keyAlgorithm() { + return this.innerModel().keyAlgorithm(); + } + + public String encoding() { + return this.innerModel().encoding(); + } + + public String serialNumber() { + return this.innerModel().serialNumber(); + } + + public String fingerprint() { + return this.innerModel().fingerprint(); + } + + public List usage() { + List inner = this.innerModel().usage(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List filePaths() { + List inner = this.innerModel().filePaths(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public PairedKey pairedKey() { + return this.innerModel().pairedKey(); + } + + public IsExpired isExpired() { + return this.innerModel().isExpired(); + } + + public IsSelfSigned isSelfSigned() { + return this.innerModel().isSelfSigned(); + } + + public IsWeakSignature isWeakSignature() { + return this.innerModel().isWeakSignature(); + } + + public IsShortKeySize isShortKeySize() { + return this.innerModel().isShortKeySize(); + } + + public CryptoCertificateInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.fist.IoTFirmwareDefenseManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/CryptoCertificateSummaryImpl.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/CryptoCertificateSummaryImpl.java new file mode 100644 index 0000000000000..22e2efb406329 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/CryptoCertificateSummaryImpl.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.implementation; + +import com.azure.resourcemanager.fist.fluent.models.CryptoCertificateSummaryInner; +import com.azure.resourcemanager.fist.models.CryptoCertificateSummary; + +public final class CryptoCertificateSummaryImpl implements CryptoCertificateSummary { + private CryptoCertificateSummaryInner innerObject; + + private final com.azure.resourcemanager.fist.IoTFirmwareDefenseManager serviceManager; + + CryptoCertificateSummaryImpl( + CryptoCertificateSummaryInner innerObject, + com.azure.resourcemanager.fist.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.fist.IoTFirmwareDefenseManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/CryptoKeyImpl.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/CryptoKeyImpl.java new file mode 100644 index 0000000000000..0f5eefb9b8508 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/CryptoKeyImpl.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.implementation; + +import com.azure.resourcemanager.fist.fluent.models.CryptoKeyInner; +import com.azure.resourcemanager.fist.models.CryptoKey; +import com.azure.resourcemanager.fist.models.IsShortKeySize; +import com.azure.resourcemanager.fist.models.PairedKey; +import java.util.Collections; +import java.util.List; + +public final class CryptoKeyImpl implements CryptoKey { + private CryptoKeyInner innerObject; + + private final com.azure.resourcemanager.fist.IoTFirmwareDefenseManager serviceManager; + + CryptoKeyImpl(CryptoKeyInner innerObject, com.azure.resourcemanager.fist.IoTFirmwareDefenseManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String cryptoKeyId() { + return this.innerModel().cryptoKeyId(); + } + + public String keyType() { + return this.innerModel().keyType(); + } + + public Long keySize() { + return this.innerModel().keySize(); + } + + public String keyAlgorithm() { + return this.innerModel().keyAlgorithm(); + } + + public List usage() { + List inner = this.innerModel().usage(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List filePaths() { + List inner = this.innerModel().filePaths(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public PairedKey pairedKey() { + return this.innerModel().pairedKey(); + } + + public IsShortKeySize isShortKeySize() { + return this.innerModel().isShortKeySize(); + } + + public CryptoKeyInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.fist.IoTFirmwareDefenseManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/CryptoKeySummaryImpl.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/CryptoKeySummaryImpl.java new file mode 100644 index 0000000000000..148599b3954f1 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/CryptoKeySummaryImpl.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.fist.implementation; + +import com.azure.resourcemanager.fist.fluent.models.CryptoKeySummaryInner; +import com.azure.resourcemanager.fist.models.CryptoKeySummary; + +public final class CryptoKeySummaryImpl implements CryptoKeySummary { + private CryptoKeySummaryInner innerObject; + + private final com.azure.resourcemanager.fist.IoTFirmwareDefenseManager serviceManager; + + CryptoKeySummaryImpl( + CryptoKeySummaryInner innerObject, com.azure.resourcemanager.fist.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.fist.IoTFirmwareDefenseManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/CveImpl.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/CveImpl.java new file mode 100644 index 0000000000000..3d3b281bac807 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/CveImpl.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.fist.implementation; + +import com.azure.resourcemanager.fist.fluent.models.CveInner; +import com.azure.resourcemanager.fist.models.Cve; +import com.azure.resourcemanager.fist.models.CveLink; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; + +public final class CveImpl implements Cve { + private CveInner innerObject; + + private final com.azure.resourcemanager.fist.IoTFirmwareDefenseManager serviceManager; + + CveImpl(CveInner innerObject, com.azure.resourcemanager.fist.IoTFirmwareDefenseManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String cveId() { + return this.innerModel().cveId(); + } + + public Object component() { + return this.innerModel().component(); + } + + public String severity() { + return this.innerModel().severity(); + } + + public String name() { + return this.innerModel().name(); + } + + public String cvssScore() { + return this.innerModel().cvssScore(); + } + + public String cvssVersion() { + return this.innerModel().cvssVersion(); + } + + public String cvssV2Score() { + return this.innerModel().cvssV2Score(); + } + + 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) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String description() { + return this.innerModel().description(); + } + + public CveInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.fist.IoTFirmwareDefenseManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/CveSummaryImpl.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/CveSummaryImpl.java new file mode 100644 index 0000000000000..044462bf90692 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/CveSummaryImpl.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.implementation; + +import com.azure.resourcemanager.fist.fluent.models.CveSummaryInner; +import com.azure.resourcemanager.fist.models.CveSummary; + +public final class CveSummaryImpl implements CveSummary { + private CveSummaryInner innerObject; + + private final com.azure.resourcemanager.fist.IoTFirmwareDefenseManager serviceManager; + + CveSummaryImpl( + CveSummaryInner innerObject, com.azure.resourcemanager.fist.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.fist.IoTFirmwareDefenseManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/FirmwareImpl.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/FirmwareImpl.java new file mode 100644 index 0000000000000..143dba2b423de --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/FirmwareImpl.java @@ -0,0 +1,433 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.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.fist.fluent.models.FirmwareInner; +import com.azure.resourcemanager.fist.models.BinaryHardening; +import com.azure.resourcemanager.fist.models.BinaryHardeningSummary; +import com.azure.resourcemanager.fist.models.Component; +import com.azure.resourcemanager.fist.models.CryptoCertificate; +import com.azure.resourcemanager.fist.models.CryptoCertificateSummary; +import com.azure.resourcemanager.fist.models.CryptoKey; +import com.azure.resourcemanager.fist.models.CryptoKeySummary; +import com.azure.resourcemanager.fist.models.Cve; +import com.azure.resourcemanager.fist.models.CveSummary; +import com.azure.resourcemanager.fist.models.Firmware; +import com.azure.resourcemanager.fist.models.FirmwareSummary; +import com.azure.resourcemanager.fist.models.FirmwareUpdateDefinition; +import com.azure.resourcemanager.fist.models.PasswordHash; +import com.azure.resourcemanager.fist.models.ProvisioningState; +import com.azure.resourcemanager.fist.models.Status; +import com.azure.resourcemanager.fist.models.UrlToken; +import java.util.Collections; +import java.util.List; + +public final class FirmwareImpl implements Firmware, Firmware.Definition, Firmware.Update { + private FirmwareInner innerObject; + + private final com.azure.resourcemanager.fist.IoTFirmwareDefenseManager 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 fileName() { + return this.innerModel().fileName(); + } + + public String vendor() { + return this.innerModel().vendor(); + } + + public String model() { + return this.innerModel().model(); + } + + public String version() { + return this.innerModel().version(); + } + + public String description() { + return this.innerModel().description(); + } + + public Long fileSize() { + return this.innerModel().fileSize(); + } + + public Status status() { + return this.innerModel().status(); + } + + public List statusMessages() { + List inner = this.innerModel().statusMessages(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public FirmwareInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.fist.IoTFirmwareDefenseManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String workspaceName; + + private String firmwareId; + + private FirmwareUpdateDefinition updateFirmware; + + public FirmwareImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + return this; + } + + public Firmware create() { + 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(); + return this; + } + + FirmwareImpl(String name, com.azure.resourcemanager.fist.IoTFirmwareDefenseManager serviceManager) { + this.innerObject = new FirmwareInner(); + this.serviceManager = serviceManager; + this.firmwareId = name; + } + + public FirmwareImpl update() { + this.updateFirmware = new FirmwareUpdateDefinition(); + return this; + } + + public Firmware apply() { + 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(); + return this; + } + + FirmwareImpl(FirmwareInner innerObject, com.azure.resourcemanager.fist.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"); + } + + public Firmware refresh() { + 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(); + return this; + } + + public Response generateDownloadUrlWithResponse(Context context) { + return serviceManager + .firmwares() + .generateDownloadUrlWithResponse(resourceGroupName, workspaceName, firmwareId, context); + } + + public UrlToken generateDownloadUrl() { + return serviceManager.firmwares().generateDownloadUrl(resourceGroupName, workspaceName, firmwareId); + } + + public Response generateFilesystemDownloadUrlWithResponse(Context 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); + return this; + } else { + this.updateFirmware.withFileName(fileName); + return this; + } + } + + public FirmwareImpl withVendor(String vendor) { + if (isInCreateMode()) { + this.innerModel().withVendor(vendor); + return this; + } else { + this.updateFirmware.withVendor(vendor); + return this; + } + } + + public FirmwareImpl withModel(String model) { + if (isInCreateMode()) { + this.innerModel().withModel(model); + return this; + } else { + this.updateFirmware.withModel(model); + return this; + } + } + + public FirmwareImpl withVersion(String version) { + if (isInCreateMode()) { + this.innerModel().withVersion(version); + return this; + } else { + this.updateFirmware.withVersion(version); + return this; + } + } + + public FirmwareImpl withDescription(String description) { + if (isInCreateMode()) { + this.innerModel().withDescription(description); + return this; + } else { + this.updateFirmware.withDescription(description); + return this; + } + } + + public FirmwareImpl withFileSize(Long fileSize) { + if (isInCreateMode()) { + this.innerModel().withFileSize(fileSize); + return this; + } else { + this.updateFirmware.withFileSize(fileSize); + return this; + } + } + + public FirmwareImpl withStatus(Status status) { + if (isInCreateMode()) { + this.innerModel().withStatus(status); + return this; + } else { + this.updateFirmware.withStatus(status); + return this; + } + } + + public FirmwareImpl withStatusMessages(List statusMessages) { + if (isInCreateMode()) { + this.innerModel().withStatusMessages(statusMessages); + return this; + } else { + this.updateFirmware.withStatusMessages(statusMessages); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/FirmwareSummaryImpl.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/FirmwareSummaryImpl.java new file mode 100644 index 0000000000000..1cc804d739525 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/FirmwareSummaryImpl.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.implementation; + +import com.azure.resourcemanager.fist.fluent.models.FirmwareSummaryInner; +import com.azure.resourcemanager.fist.models.FirmwareSummary; + +public final class FirmwareSummaryImpl implements FirmwareSummary { + private FirmwareSummaryInner innerObject; + + private final com.azure.resourcemanager.fist.IoTFirmwareDefenseManager serviceManager; + + FirmwareSummaryImpl( + FirmwareSummaryInner innerObject, com.azure.resourcemanager.fist.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.fist.IoTFirmwareDefenseManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/FirmwaresClientImpl.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/FirmwaresClientImpl.java new file mode 100644 index 0000000000000..3b68f2cdc1329 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/FirmwaresClientImpl.java @@ -0,0 +1,4450 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +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.fist.fluent.FirmwaresClient; +import com.azure.resourcemanager.fist.fluent.models.BinaryHardeningInner; +import com.azure.resourcemanager.fist.fluent.models.BinaryHardeningSummaryInner; +import com.azure.resourcemanager.fist.fluent.models.ComponentInner; +import com.azure.resourcemanager.fist.fluent.models.CryptoCertificateInner; +import com.azure.resourcemanager.fist.fluent.models.CryptoCertificateSummaryInner; +import com.azure.resourcemanager.fist.fluent.models.CryptoKeyInner; +import com.azure.resourcemanager.fist.fluent.models.CryptoKeySummaryInner; +import com.azure.resourcemanager.fist.fluent.models.CveInner; +import com.azure.resourcemanager.fist.fluent.models.CveSummaryInner; +import com.azure.resourcemanager.fist.fluent.models.FirmwareInner; +import com.azure.resourcemanager.fist.fluent.models.FirmwareSummaryInner; +import com.azure.resourcemanager.fist.fluent.models.PasswordHashInner; +import com.azure.resourcemanager.fist.fluent.models.UrlTokenInner; +import com.azure.resourcemanager.fist.models.BinaryHardeningList; +import com.azure.resourcemanager.fist.models.ComponentList; +import com.azure.resourcemanager.fist.models.CryptoCertificateList; +import com.azure.resourcemanager.fist.models.CryptoKeyList; +import com.azure.resourcemanager.fist.models.CveList; +import com.azure.resourcemanager.fist.models.FirmwareList; +import com.azure.resourcemanager.fist.models.FirmwareUpdateDefinition; +import com.azure.resourcemanager.fist.models.PasswordHashList; +import reactor.core.publisher.Mono; + +/** 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. */ + private final FirmwaresService service; + + /** The service client containing this operation class. */ + private final FistImpl 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()); + this.client = client; + } + + /** + * The interface defining all the services for FistFirmwares to be used by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "FistFirmwares") + 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}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> generateSummary( + @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); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/generateCveList") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listGenerateCveList( + @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}/generateCveSummary") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> generateCveSummary( + @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}/generateCryptoCertificateSummary") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> generateCryptoCertificateSummary( + @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}/generateCryptoKeySummary") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> generateCryptoKeySummary( + @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}/generateCryptoCertificateList") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listGenerateCryptoCertificateList( + @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}/generateCryptoKeyList") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listGenerateCryptoKeyList( + @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); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listGenerateCryptoKeyListNext( + @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. + * @throws ManagementException thrown 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> 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.")); + } + 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.")); + } + 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)) + .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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> 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.")); + } + 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.")); + } + 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)); + } + + /** + * 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. + * @throws ManagementException thrown 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 as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByWorkspaceAsync(String resourceGroupName, String 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 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), + 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. + * @throws ManagementException thrown 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 as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName) { + return new PagedIterable<>(listByWorkspaceAsync(resourceGroupName, workspaceName)); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + 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. + * @param firmware Details of the firmware being created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @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) { + 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 (firmware == null) { + return Mono.error(new IllegalArgumentException("Parameter firmware is required and cannot be null.")); + } else { + firmware.validate(); + } + 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)) + .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. + * @param firmware Details of the firmware being created or updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @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) { + 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 (firmware == null) { + return Mono.error(new IllegalArgumentException("Parameter firmware is required and cannot be null.")); + } else { + firmware.validate(); + } + 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); + } + + /** + * 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. + * @param firmware Details of the firmware being created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return firmware definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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. + * @param firmware Details of the firmware being created or updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return firmware definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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. + * @param firmware Details of the firmware being created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return firmware definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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. + * @param firmware Details of the firmware being created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @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) { + 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 (firmware == null) { + return Mono.error(new IllegalArgumentException("Parameter firmware is required and cannot be null.")); + } else { + firmware.validate(); + } + 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)) + .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. + * @param firmware Details of the firmware being created or updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @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) { + 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 (firmware == null) { + return Mono.error(new IllegalArgumentException("Parameter firmware is required and cannot be null.")); + } else { + firmware.validate(); + } + 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); + } + + /** + * 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. + * @param firmware Details of the firmware being created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return firmware definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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. + * @param firmware Details of the firmware being created or updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return firmware definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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. + * @param firmware Details of the firmware being created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return firmware definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String 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 + .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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String 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 + .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String workspaceName, String firmwareId) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, firmwareId).flatMap(ignored -> Mono.empty()); + } + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse( + String resourceGroupName, String 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String workspaceName, String firmwareId) { + deleteWithResponse(resourceGroupName, workspaceName, firmwareId, Context.NONE); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @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) { + 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 + .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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @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) { + 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 + .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return firmware on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String workspaceName, String firmwareId) { + return getWithResponseAsync(resourceGroupName, workspaceName, firmwareId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return firmware along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return firmware. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FirmwareInner get(String resourceGroupName, String workspaceName, String firmwareId) { + return getWithResponse(resourceGroupName, workspaceName, firmwareId, Context.NONE).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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + 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 + .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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + 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 + .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public UrlTokenInner generateDownloadUrl(String resourceGroupName, String workspaceName, String firmwareId) { + return generateDownloadUrlWithResponse(resourceGroupName, workspaceName, firmwareId, Context.NONE).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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + 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 + .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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + 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 + .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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}. + */ + @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.")); + } + 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 + .generateSummary( + 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 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} 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.")); + } + 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.")); + } + 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)); + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/FirmwaresImpl.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/FirmwaresImpl.java new file mode 100644 index 0000000000000..57012a89b708e --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/FirmwaresImpl.java @@ -0,0 +1,536 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.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.fist.fluent.FirmwaresClient; +import com.azure.resourcemanager.fist.fluent.models.BinaryHardeningInner; +import com.azure.resourcemanager.fist.fluent.models.BinaryHardeningSummaryInner; +import com.azure.resourcemanager.fist.fluent.models.ComponentInner; +import com.azure.resourcemanager.fist.fluent.models.CryptoCertificateInner; +import com.azure.resourcemanager.fist.fluent.models.CryptoCertificateSummaryInner; +import com.azure.resourcemanager.fist.fluent.models.CryptoKeyInner; +import com.azure.resourcemanager.fist.fluent.models.CryptoKeySummaryInner; +import com.azure.resourcemanager.fist.fluent.models.CveInner; +import com.azure.resourcemanager.fist.fluent.models.CveSummaryInner; +import com.azure.resourcemanager.fist.fluent.models.FirmwareInner; +import com.azure.resourcemanager.fist.fluent.models.FirmwareSummaryInner; +import com.azure.resourcemanager.fist.fluent.models.PasswordHashInner; +import com.azure.resourcemanager.fist.fluent.models.UrlTokenInner; +import com.azure.resourcemanager.fist.models.BinaryHardening; +import com.azure.resourcemanager.fist.models.BinaryHardeningSummary; +import com.azure.resourcemanager.fist.models.Component; +import com.azure.resourcemanager.fist.models.CryptoCertificate; +import com.azure.resourcemanager.fist.models.CryptoCertificateSummary; +import com.azure.resourcemanager.fist.models.CryptoKey; +import com.azure.resourcemanager.fist.models.CryptoKeySummary; +import com.azure.resourcemanager.fist.models.Cve; +import com.azure.resourcemanager.fist.models.CveSummary; +import com.azure.resourcemanager.fist.models.Firmware; +import com.azure.resourcemanager.fist.models.FirmwareSummary; +import com.azure.resourcemanager.fist.models.Firmwares; +import com.azure.resourcemanager.fist.models.PasswordHash; +import com.azure.resourcemanager.fist.models.UrlToken; + +public final class FirmwaresImpl implements Firmwares { + private static final ClientLogger LOGGER = new ClientLogger(FirmwaresImpl.class); + + private final FirmwaresClient innerClient; + + private final com.azure.resourcemanager.fist.IoTFirmwareDefenseManager serviceManager; + + public FirmwaresImpl( + FirmwaresClient innerClient, com.azure.resourcemanager.fist.IoTFirmwareDefenseManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName) { + PagedIterable inner = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName); + return Utils.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())); + } + + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String firmwareId, Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, firmwareId, context); + } + + public void delete(String resourceGroupName, String workspaceName, String firmwareId) { + 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); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new FirmwareImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Firmware get(String resourceGroupName, String workspaceName, String firmwareId) { + FirmwareInner inner = this.serviceClient().get(resourceGroupName, workspaceName, firmwareId); + if (inner != null) { + return new FirmwareImpl(inner, this.manager()); + } else { + return null; + } + } + + 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(), + new UrlTokenImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public UrlToken generateDownloadUrl(String resourceGroupName, String workspaceName, String firmwareId) { + UrlTokenInner inner = this.serviceClient().generateDownloadUrl(resourceGroupName, workspaceName, firmwareId); + if (inner != null) { + return new UrlTokenImpl(inner, this.manager()); + } else { + return null; + } + } + + 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(), + new UrlTokenImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public UrlToken generateFilesystemDownloadUrl(String resourceGroupName, String workspaceName, String firmwareId) { + UrlTokenInner inner = + this.serviceClient().generateFilesystemDownloadUrl(resourceGroupName, workspaceName, firmwareId); + if (inner != null) { + return new UrlTokenImpl(inner, this.manager()); + } else { + return null; + } + } + + 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"); + if (resourceGroupName == null) { + 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"); + if (workspaceName == null) { + 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"); + if (firmwareId == null) { + 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"); + if (resourceGroupName == null) { + 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"); + if (workspaceName == null) { + 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"); + if (firmwareId == null) { + 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"); + if (resourceGroupName == null) { + 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"); + if (workspaceName == null) { + 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"); + if (firmwareId == null) { + 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"); + if (resourceGroupName == null) { + 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"); + if (workspaceName == null) { + 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"); + if (firmwareId == null) { + 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); + } + + private FirmwaresClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.fist.IoTFirmwareDefenseManager manager() { + return this.serviceManager; + } + + public FirmwareImpl define(String name) { + return new FirmwareImpl(name, this.manager()); + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/FistBuilder.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/FistBuilder.java new file mode 100644 index 0000000000000..ae25688072fe3 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/FistBuilder.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.implementation; + +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerAdapter; +import java.time.Duration; + +/** A builder for creating a new instance of the FistImpl type. */ +@ServiceClientBuilder(serviceClients = {FistImpl.class}) +public final class FistBuilder { + /* + * The ID of the target subscription. + */ + private String subscriptionId; + + /** + * Sets The ID of the target subscription. + * + * @param subscriptionId the subscriptionId value. + * @return the FistBuilder. + */ + public FistBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /* + * server parameter + */ + private String endpoint; + + /** + * Sets server parameter. + * + * @param endpoint the endpoint value. + * @return the FistBuilder. + */ + public FistBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * The environment to connect to + */ + private AzureEnvironment environment; + + /** + * Sets The environment to connect to. + * + * @param environment the environment value. + * @return the FistBuilder. + */ + public FistBuilder environment(AzureEnvironment environment) { + this.environment = environment; + return this; + } + + /* + * The HTTP pipeline to send requests through + */ + private HttpPipeline pipeline; + + /** + * Sets The HTTP pipeline to send requests through. + * + * @param pipeline the pipeline value. + * @return the FistBuilder. + */ + public FistBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; + return this; + } + + /* + * The default poll interval for long-running operation + */ + private Duration defaultPollInterval; + + /** + * Sets The default poll interval for long-running operation. + * + * @param defaultPollInterval the defaultPollInterval value. + * @return the FistBuilder. + */ + public FistBuilder defaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval = defaultPollInterval; + return this; + } + + /* + * The serializer to serialize an object into a string + */ + private SerializerAdapter serializerAdapter; + + /** + * Sets The serializer to serialize an object into a string. + * + * @param serializerAdapter the serializerAdapter value. + * @return the FistBuilder. + */ + public FistBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + this.serializerAdapter = serializerAdapter; + return this; + } + + /** + * Builds an instance of FistImpl with the provided parameters. + * + * @return an instance of FistImpl. + */ + public FistImpl 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); + return client; + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/FistImpl.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/FistImpl.java new file mode 100644 index 0000000000000..556f0c0807d80 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/FistImpl.java @@ -0,0 +1,318 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.implementation; + +import com.azure.core.annotation.ServiceClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpResponse; +import com.azure.core.http.rest.Response; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.management.polling.PollerFactory; +import com.azure.core.util.Context; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.AsyncPollResponse; +import com.azure.core.util.polling.LongRunningOperationStatus; +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.fist.fluent.FirmwaresClient; +import com.azure.resourcemanager.fist.fluent.Fist; +import com.azure.resourcemanager.fist.fluent.OperationsClient; +import com.azure.resourcemanager.fist.fluent.WorkspacesClient; +import java.io.IOException; +import java.lang.reflect.Type; +import java.nio.ByteBuffer; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +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. */ + private final String subscriptionId; + + /** + * Gets The ID of the target subscription. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + + /** server parameter. */ + private final String endpoint; + + /** + * Gets server parameter. + * + * @return the endpoint value. + */ + public String getEndpoint() { + return this.endpoint; + } + + /** 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. */ + 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. */ + 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. */ + 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. */ + 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. + */ + 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() { + return this.operations; + } + + /** + * Initializes an instance of Fist 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 endpoint server parameter. + */ + FistImpl( + 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.firmwares = new FirmwaresClientImpl(this); + this.workspaces = new WorkspacesClientImpl(this); + this.operations = new OperationsClientImpl(this); + } + + /** + * Gets default client context. + * + * @return the default client context. + */ + public Context getContext() { + return Context.NONE; + } + + /** + * Merges default client context with provided context. + * + * @param context the context to be merged with default client context. + * @return the merged context. + */ + public Context mergeContext(Context context) { + return CoreUtils.mergeContexts(this.getContext(), context); + } + + /** + * Gets long running operation result. + * + * @param activationResponse the response of activation operation. + * @param httpPipeline the http pipeline. + * @param pollResultType type of poll result. + * @param finalResultType type of final result. + * @param context the context shared by all requests. + * @param type of poll result. + * @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); + } + + /** + * 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. + * @return the final result, or an error. + */ + public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) { + if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) { + String errorMessage; + ManagementError managementError = null; + HttpResponse errorResponse = null; + PollResult.Error lroError = response.getValue().getError(); + if (lroError != null) { + 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); + if (managementError.getCode() == null || managementError.getMessage() == null) { + managementError = null; + } + } catch (IOException | RuntimeException ioe) { + LOGGER.logThrowableAsWarning(ioe); + } + } + } else { + // fallback to default error message + errorMessage = "Long running operation failed."; + } + if (managementError == null) { + // fallback to default ManagementError + managementError = new ManagementError(response.getStatus().toString(), errorMessage); + } + return Mono.error(new ManagementException(errorMessage, errorResponse, managementError)); + } else { + return response.getFinalResult(); + } + } + + private static final class HttpResponseImpl extends HttpResponse { + private final int statusCode; + + private final byte[] responseBody; + + private final HttpHeaders httpHeaders; + + HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) { + super(null); + this.statusCode = statusCode; + this.httpHeaders = httpHeaders; + this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8); + } + + public int getStatusCode() { + return statusCode; + } + + public String getHeaderValue(String s) { + return httpHeaders.getValue(s); + } + + public HttpHeaders getHeaders() { + return httpHeaders; + } + + public Flux getBody() { + return Flux.just(ByteBuffer.wrap(responseBody)); + } + + public Mono getBodyAsByteArray() { + return Mono.just(responseBody); + } + + public Mono getBodyAsString() { + return Mono.just(new String(responseBody, StandardCharsets.UTF_8)); + } + + public Mono getBodyAsString(Charset charset) { + return Mono.just(new String(responseBody, charset)); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(FistImpl.class); +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/OperationImpl.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/OperationImpl.java new file mode 100644 index 0000000000000..bdfa445b885fb --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/OperationImpl.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.fist.implementation; + +import com.azure.resourcemanager.fist.fluent.models.OperationInner; +import com.azure.resourcemanager.fist.models.ActionType; +import com.azure.resourcemanager.fist.models.Operation; +import com.azure.resourcemanager.fist.models.OperationDisplay; +import com.azure.resourcemanager.fist.models.Origin; + +public final class OperationImpl implements Operation { + private OperationInner innerObject; + + private final com.azure.resourcemanager.fist.IoTFirmwareDefenseManager serviceManager; + + OperationImpl(OperationInner innerObject, com.azure.resourcemanager.fist.IoTFirmwareDefenseManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String name() { + return this.innerModel().name(); + } + + public Boolean isDataAction() { + return this.innerModel().isDataAction(); + } + + public OperationDisplay display() { + return this.innerModel().display(); + } + + public Origin origin() { + return this.innerModel().origin(); + } + + public ActionType actionType() { + return this.innerModel().actionType(); + } + + public OperationInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.fist.IoTFirmwareDefenseManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/OperationsClientImpl.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/OperationsClientImpl.java new file mode 100644 index 0000000000000..38ef40d7b80f1 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/OperationsClientImpl.java @@ -0,0 +1,275 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.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.fist.fluent.OperationsClient; +import com.azure.resourcemanager.fist.fluent.models.OperationInner; +import com.azure.resourcemanager.fist.models.OperationListResult; +import reactor.core.publisher.Mono; + +/** 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. */ + private final OperationsService service; + + /** The service client containing this operation class. */ + private final FistImpl 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()); + this.client = client; + } + + /** + * The interface defining all the services for FistOperations to be used by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "FistOperations") + public interface OperationsService { + @Headers({"Content-Type: application/json"}) + @Get("/providers/Microsoft.IoTFirmwareDefense/operations") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * 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}. + */ + @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.")); + } + 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)) + .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}. + */ + @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.")); + } + 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)); + } + + /** + * 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}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * 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}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context 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}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(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 + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(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 a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/OperationsImpl.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/OperationsImpl.java new file mode 100644 index 0000000000000..facce6be4e171 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/OperationsImpl.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.fist.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.fist.fluent.OperationsClient; +import com.azure.resourcemanager.fist.fluent.models.OperationInner; +import com.azure.resourcemanager.fist.models.Operation; +import com.azure.resourcemanager.fist.models.Operations; + +public final class OperationsImpl implements Operations { + private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); + + private final OperationsClient innerClient; + + private final com.azure.resourcemanager.fist.IoTFirmwareDefenseManager serviceManager; + + public OperationsImpl( + OperationsClient innerClient, com.azure.resourcemanager.fist.IoTFirmwareDefenseManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + } + + private OperationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.fist.IoTFirmwareDefenseManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/PasswordHashImpl.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/PasswordHashImpl.java new file mode 100644 index 0000000000000..ab04e78796d02 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/PasswordHashImpl.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.implementation; + +import com.azure.resourcemanager.fist.fluent.models.PasswordHashInner; +import com.azure.resourcemanager.fist.models.PasswordHash; + +public final class PasswordHashImpl implements PasswordHash { + private PasswordHashInner innerObject; + + private final com.azure.resourcemanager.fist.IoTFirmwareDefenseManager serviceManager; + + PasswordHashImpl( + PasswordHashInner innerObject, com.azure.resourcemanager.fist.IoTFirmwareDefenseManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String passwordHashId() { + return this.innerModel().passwordHashId(); + } + + public String filePath() { + return this.innerModel().filePath(); + } + + public String salt() { + return this.innerModel().salt(); + } + + public String hash() { + return this.innerModel().hash(); + } + + public String context() { + return this.innerModel().context(); + } + + public String username() { + return this.innerModel().username(); + } + + public String algorithm() { + return this.innerModel().algorithm(); + } + + public PasswordHashInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.fist.IoTFirmwareDefenseManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/UrlTokenImpl.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/UrlTokenImpl.java new file mode 100644 index 0000000000000..4981a38a81b78 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/UrlTokenImpl.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.fist.implementation; + +import com.azure.resourcemanager.fist.fluent.models.UrlTokenInner; +import com.azure.resourcemanager.fist.models.UrlToken; + +public final class UrlTokenImpl implements UrlToken { + private UrlTokenInner innerObject; + + private final com.azure.resourcemanager.fist.IoTFirmwareDefenseManager serviceManager; + + UrlTokenImpl(UrlTokenInner innerObject, com.azure.resourcemanager.fist.IoTFirmwareDefenseManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String url() { + return this.innerModel().url(); + } + + public String uploadUrl() { + return this.innerModel().uploadUrl(); + } + + public UrlTokenInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.fist.IoTFirmwareDefenseManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/Utils.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/Utils.java new file mode 100644 index 0000000000000..91ae9411974bc --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/Utils.java @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.implementation; + +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.util.CoreUtils; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; +import java.util.function.Function; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import reactor.core.publisher.Flux; + +final class Utils { + static String getValueFromIdByName(String id, String name) { + if (id == null) { + return null; + } + Iterator itr = Arrays.stream(id.split("/")).iterator(); + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && !part.trim().isEmpty()) { + if (part.equalsIgnoreCase(name)) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + } + return null; + } + + static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { + if (id == null || pathTemplate == null) { + return null; + } + String parameterNameParentheses = "{" + parameterName + "}"; + List idSegmentsReverted = Arrays.asList(id.split("/")); + List pathSegments = Arrays.asList(pathTemplate.split("/")); + Collections.reverse(idSegmentsReverted); + Iterator idItrReverted = idSegmentsReverted.iterator(); + int pathIndex = pathSegments.size(); + while (idItrReverted.hasNext() && pathIndex > 0) { + String idSegment = idItrReverted.next(); + String pathSegment = pathSegments.get(--pathIndex); + if (!CoreUtils.isNullOrEmpty(idSegment) && !CoreUtils.isNullOrEmpty(pathSegment)) { + if (pathSegment.equalsIgnoreCase(parameterNameParentheses)) { + if (pathIndex == 0 || (pathIndex == 1 && pathSegments.get(0).isEmpty())) { + List segments = new ArrayList<>(); + segments.add(idSegment); + idItrReverted.forEachRemaining(segments::add); + Collections.reverse(segments); + if (segments.size() > 0 && segments.get(0).isEmpty()) { + segments.remove(0); + } + return String.join("/", segments); + } else { + return idSegment; + } + } + } + } + return null; + } + + static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { + return new PagedIterableImpl(pageIterable, mapper); + } + + private static final class PagedIterableImpl extends PagedIterable { + + private final PagedIterable pagedIterable; + private final Function mapper; + private final Function, PagedResponse> pageMapper; + + private PagedIterableImpl(PagedIterable pagedIterable, Function 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); + } + + @Override + public Stream stream() { + return pagedIterable.stream().map(mapper); + } + + @Override + public Stream> streamByPage() { + return pagedIterable.streamByPage().map(pageMapper); + } + + @Override + public Stream> streamByPage(String continuationToken) { + return pagedIterable.streamByPage(continuationToken).map(pageMapper); + } + + @Override + public Stream> streamByPage(int preferredPageSize) { + return pagedIterable.streamByPage(preferredPageSize).map(pageMapper); + } + + @Override + public Stream> streamByPage(String continuationToken, int preferredPageSize) { + return pagedIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper); + } + + @Override + public Iterator iterator() { + return new IteratorImpl(pagedIterable.iterator(), mapper); + } + + @Override + public Iterable> iterableByPage() { + return new IterableImpl, PagedResponse>(pagedIterable.iterableByPage(), pageMapper); + } + + @Override + public Iterable> iterableByPage(String continuationToken) { + return new IterableImpl, PagedResponse>( + pagedIterable.iterableByPage(continuationToken), pageMapper); + } + + @Override + public Iterable> iterableByPage(int preferredPageSize) { + return new IterableImpl, PagedResponse>( + pagedIterable.iterableByPage(preferredPageSize), pageMapper); + } + + @Override + public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { + return new IterableImpl, PagedResponse>( + pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); + } + } + + private static final class IteratorImpl implements Iterator { + + private final Iterator iterator; + private final Function mapper; + + private IteratorImpl(Iterator iterator, Function mapper) { + this.iterator = iterator; + this.mapper = mapper; + } + + @Override + public boolean hasNext() { + return iterator.hasNext(); + } + + @Override + public S next() { + return mapper.apply(iterator.next()); + } + + @Override + public void remove() { + iterator.remove(); + } + } + + private static final class IterableImpl implements Iterable { + + private final Iterable iterable; + private final Function mapper; + + private IterableImpl(Iterable iterable, Function mapper) { + this.iterable = iterable; + this.mapper = mapper; + } + + @Override + public Iterator iterator() { + return new IteratorImpl(iterable.iterator(), mapper); + } + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/WorkspaceImpl.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/WorkspaceImpl.java new file mode 100644 index 0000000000000..a26c6d0300b8b --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/WorkspaceImpl.java @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.fist.fluent.models.WorkspaceInner; +import com.azure.resourcemanager.fist.models.GenerateUploadUrlRequest; +import com.azure.resourcemanager.fist.models.ProvisioningState; +import com.azure.resourcemanager.fist.models.UrlToken; +import com.azure.resourcemanager.fist.models.Workspace; +import com.azure.resourcemanager.fist.models.WorkspaceUpdateDefinition; +import java.util.Collections; +import java.util.Map; + +public final class WorkspaceImpl implements Workspace, Workspace.Definition, Workspace.Update { + private WorkspaceInner innerObject; + + private final com.azure.resourcemanager.fist.IoTFirmwareDefenseManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public WorkspaceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.fist.IoTFirmwareDefenseManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String workspaceName; + + private WorkspaceUpdateDefinition updateWorkspace; + + public WorkspaceImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public Workspace create() { + 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(); + return this; + } + + WorkspaceImpl(String name, com.azure.resourcemanager.fist.IoTFirmwareDefenseManager serviceManager) { + this.innerObject = new WorkspaceInner(); + this.serviceManager = serviceManager; + this.workspaceName = name; + } + + public WorkspaceImpl update() { + this.updateWorkspace = new WorkspaceUpdateDefinition(); + return this; + } + + public Workspace apply() { + 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(); + return this; + } + + WorkspaceImpl(WorkspaceInner innerObject, com.azure.resourcemanager.fist.IoTFirmwareDefenseManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); + } + + public Workspace refresh() { + 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(); + return this; + } + + public Response generateUploadUrlWithResponse( + GenerateUploadUrlRequest generateUploadUrl, Context context) { + return serviceManager + .workspaces() + .generateUploadUrlWithResponse(resourceGroupName, workspaceName, generateUploadUrl, context); + } + + public UrlToken generateUploadUrl(GenerateUploadUrlRequest generateUploadUrl) { + return serviceManager.workspaces().generateUploadUrl(resourceGroupName, workspaceName, generateUploadUrl); + } + + public WorkspaceImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public WorkspaceImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public WorkspaceImpl withTags(Map tags) { + this.innerModel().withTags(tags); + return this; + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/WorkspacesClientImpl.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/WorkspacesClientImpl.java new file mode 100644 index 0000000000000..e9f027a9c0f91 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/WorkspacesClientImpl.java @@ -0,0 +1,1410 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +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.fist.fluent.WorkspacesClient; +import com.azure.resourcemanager.fist.fluent.models.UrlTokenInner; +import com.azure.resourcemanager.fist.fluent.models.WorkspaceInner; +import com.azure.resourcemanager.fist.models.GenerateUploadUrlRequest; +import com.azure.resourcemanager.fist.models.WorkspaceList; +import com.azure.resourcemanager.fist.models.WorkspaceUpdateDefinition; +import reactor.core.publisher.Mono; + +/** 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. */ + private final WorkspacesService service; + + /** The service client containing this operation class. */ + private final FistImpl 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()); + this.client = client; + } + + /** + * The interface defining all the services for FistWorkspaces to be used by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "FistWorkspaces") + public interface WorkspacesService { + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.IoTFirmwareDefense/workspaces") + @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); + + @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, + @PathParam("subscriptionId") String subscriptionId, + @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}) + @UnexpectedResponseExceptionType(ManagementException.class) + 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); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @QueryParam("api-version") String apiVersion, + @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}) + @UnexpectedResponseExceptionType(ManagementException.class) + 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); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}") + @ExpectedResponses({200, 304}) + @UnexpectedResponseExceptionType(ManagementException.class) + 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); + + @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, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") GenerateUploadUrlRequest generateUploadUrl, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String 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)) + .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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return 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)); + } + + /** + * 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)); + } + + /** + * 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 as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context 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}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * 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 as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(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}. + */ + @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.")); + } + 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.")); + } + 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)) + .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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync( + String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + 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)); + } + + /** + * 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 as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String 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. + * @throws 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 listByResourceGroupAsync(String resourceGroupName, Context 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. + * @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}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * 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 as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @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) { + 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 (workspace == null) { + return Mono.error(new IllegalArgumentException("Parameter workspace is required and cannot be null.")); + } else { + workspace.validate(); + } + 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)) + .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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @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) { + 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 (workspace == null) { + return Mono.error(new IllegalArgumentException("Parameter workspace is required and cannot be null.")); + } else { + workspace.validate(); + } + 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); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return firmware analysis workspace on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String workspaceName, WorkspaceInner workspace) { + return createWithResponseAsync(resourceGroupName, workspaceName, workspace) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return firmware analysis workspace along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return firmware analysis workspace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkspaceInner create(String resourceGroupName, String workspaceName, WorkspaceInner workspace) { + return createWithResponse(resourceGroupName, workspaceName, workspace, Context.NONE).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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @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) { + 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 (workspace == null) { + return Mono.error(new IllegalArgumentException("Parameter workspace is required and cannot be null.")); + } else { + workspace.validate(); + } + 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)) + .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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @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) { + 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 (workspace == null) { + return Mono.error(new IllegalArgumentException("Parameter workspace is required and cannot be null.")); + } else { + workspace.validate(); + } + 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); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return firmware analysis workspace on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return firmware analysis workspace along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return firmware analysis workspace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceUpdateDefinition workspace) { + return updateWithResponse(resourceGroupName, workspaceName, workspace, Context.NONE).getValue(); + } + + /** + * 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. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName) { + 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.")); + } + final String accept = "application/json"; + return FluxUtil + .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String workspaceName, 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.")); + } + 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); + } + + /** + * 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. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String workspaceName) { + return deleteWithResponseAsync(resourceGroupName, workspaceName).flatMap(ignored -> Mono.empty()); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String resourceGroupName, String workspaceName, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, context).block(); + } + + /** + * 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. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String workspaceName) { + deleteWithResponse(resourceGroupName, workspaceName, Context.NONE); + } + + /** + * 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. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @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) { + 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.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @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) { + 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.")); + } + 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); + } + + /** + * 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. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return firmware analysis workspace on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String workspaceName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, workspaceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return firmware analysis workspace along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return firmware analysis workspace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkspaceInner getByResourceGroup(String resourceGroupName, String workspaceName) { + return getByResourceGroupWithResponse(resourceGroupName, workspaceName, Context.NONE).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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + 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 (generateUploadUrl == null) { + return Mono + .error(new IllegalArgumentException("Parameter generateUploadUrl is required and cannot be null.")); + } else { + generateUploadUrl.validate(); + } + 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)) + .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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + 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 (generateUploadUrl == null) { + return Mono + .error(new IllegalArgumentException("Parameter generateUploadUrl is required and cannot be null.")); + } else { + generateUploadUrl.validate(); + } + 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); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

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

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return return a list of firmware analysis workspaces along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/WorkspacesImpl.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/WorkspacesImpl.java new file mode 100644 index 0000000000000..b702d713920ec --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/WorkspacesImpl.java @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.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.fist.fluent.WorkspacesClient; +import com.azure.resourcemanager.fist.fluent.models.UrlTokenInner; +import com.azure.resourcemanager.fist.fluent.models.WorkspaceInner; +import com.azure.resourcemanager.fist.models.GenerateUploadUrlRequest; +import com.azure.resourcemanager.fist.models.UrlToken; +import com.azure.resourcemanager.fist.models.Workspace; +import com.azure.resourcemanager.fist.models.Workspaces; + +public final class WorkspacesImpl implements Workspaces { + private static final ClientLogger LOGGER = new ClientLogger(WorkspacesImpl.class); + + private final WorkspacesClient innerClient; + + private final com.azure.resourcemanager.fist.IoTFirmwareDefenseManager serviceManager; + + public WorkspacesImpl( + WorkspacesClient innerClient, com.azure.resourcemanager.fist.IoTFirmwareDefenseManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.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())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return Utils.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())); + } + + public Response deleteByResourceGroupWithResponse( + String resourceGroupName, String workspaceName, Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, context); + } + + 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); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new WorkspaceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Workspace getByResourceGroup(String resourceGroupName, String workspaceName) { + WorkspaceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, workspaceName); + if (inner != null) { + return new WorkspaceImpl(inner, this.manager()); + } else { + return null; + } + } + + 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(), + 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); + if (inner != null) { + return new UrlTokenImpl(inner, this.manager()); + } else { + return null; + } + } + + public Workspace getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = Utils.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))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = Utils.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))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, workspaceName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = Utils.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))); + } + this.deleteByResourceGroupWithResponse(resourceGroupName, workspaceName, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = Utils.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))); + } + return this.deleteByResourceGroupWithResponse(resourceGroupName, workspaceName, context); + } + + private WorkspacesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.fist.IoTFirmwareDefenseManager manager() { + return this.serviceManager; + } + + public WorkspaceImpl define(String name) { + return new WorkspaceImpl(name, this.manager()); + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/package-info.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/package-info.java new file mode 100644 index 0000000000000..9f3becc3efacf --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/implementation/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// 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 com.azure.resourcemanager.fist.implementation; diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/ActionType.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/ActionType.java new file mode 100644 index 0000000000000..f6c3b42b8f9f3 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/ActionType.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.models; + +import com.azure.core.util.ExpandableStringEnum; +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. */ +public final class ActionType extends ExpandableStringEnum { + /** Static value Internal for ActionType. */ + public static final ActionType INTERNAL = fromString("Internal"); + + /** + * Creates a new instance of ActionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ActionType() { + } + + /** + * Creates or finds a ActionType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ActionType. + */ + @JsonCreator + public static ActionType fromString(String name) { + return fromString(name, ActionType.class); + } + + /** + * Gets known ActionType values. + * + * @return known ActionType values. + */ + public static Collection values() { + return values(ActionType.class); + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/BinaryHardening.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/BinaryHardening.java new file mode 100644 index 0000000000000..c14445c87922a --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/BinaryHardening.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.models; + +import com.azure.resourcemanager.fist.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.fist.fluent.models.BinaryHardeningInner object. + * + * @return the inner object. + */ + BinaryHardeningInner innerModel(); +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/BinaryHardeningList.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/BinaryHardeningList.java new file mode 100644 index 0000000000000..d69cb568dd03e --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/BinaryHardeningList.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.fist.fluent.models.BinaryHardeningInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** List result for binary hardening. */ +@Fluent +public final class BinaryHardeningList { + /* + * The list of binary hardening results. + */ + @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 BinaryHardeningList class. */ + public BinaryHardeningList() { + } + + /** + * Get the value property: The list of binary hardening results. + * + * @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 BinaryHardeningList object itself. + */ + public BinaryHardeningList 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/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/BinaryHardeningSummary.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/BinaryHardeningSummary.java new file mode 100644 index 0000000000000..51060b11304ac --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/BinaryHardeningSummary.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.models; + +import com.azure.resourcemanager.fist.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.fist.fluent.models.BinaryHardeningSummaryInner object. + * + * @return the inner object. + */ + BinaryHardeningSummaryInner innerModel(); +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/CanaryFlag.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/CanaryFlag.java new file mode 100644 index 0000000000000..8893713a78aaf --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/CanaryFlag.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.fist.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/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/Component.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/Component.java new file mode 100644 index 0000000000000..141539cb9ca7e --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/Component.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.fist.models; + +import com.azure.resourcemanager.fist.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.fist.fluent.models.ComponentInner object. + * + * @return the inner object. + */ + ComponentInner innerModel(); +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/ComponentList.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/ComponentList.java new file mode 100644 index 0000000000000..80783344cd4a1 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/ComponentList.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.fist.fluent.models.ComponentInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** List result for components. */ +@Fluent +public final class ComponentList { + /* + * The list of components. + */ + @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 ComponentList class. */ + public ComponentList() { + } + + /** + * Get the value property: The list of components. + * + * @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 ComponentList object itself. + */ + public ComponentList 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/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/CryptoCertificate.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/CryptoCertificate.java new file mode 100644 index 0000000000000..7182bde8711f4 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/CryptoCertificate.java @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.models; + +import com.azure.resourcemanager.fist.fluent.models.CryptoCertificateInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** An immutable client-side representation of CryptoCertificate. */ +public interface CryptoCertificate { + /** + * Gets the cryptoCertId property: ID for the certificate. + * + * @return the cryptoCertId value. + */ + String cryptoCertId(); + + /** + * Gets the name property: Name of the certificate. + * + * @return the name value. + */ + String name(); + + /** + * 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. + * + * @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(); + + /** + * Gets the isSelfSigned property: Indicates if the certificate was self-signed. + * + * @return the isSelfSigned value. + */ + IsSelfSigned isSelfSigned(); + + /** + * Gets the isWeakSignature property: Indicates the signature algorithm used is insecure. + * + * @return the isWeakSignature value. + */ + IsWeakSignature 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(); + + /** + * Gets the inner com.azure.resourcemanager.fist.fluent.models.CryptoCertificateInner object. + * + * @return the inner object. + */ + CryptoCertificateInner innerModel(); +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/CryptoCertificateEntity.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/CryptoCertificateEntity.java new file mode 100644 index 0000000000000..c8289ed86be1d --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/CryptoCertificateEntity.java @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Information on an entity (distinguished name) in a cryptographic certificate. */ +@Fluent +public final class CryptoCertificateEntity { + /* + * Common name of the certificate entity. + */ + @JsonProperty(value = "commonName") + private String commonName; + + /* + * Organization of the certificate entity. + */ + @JsonProperty(value = "organization") + private String organization; + + /* + * The organizational unit of the certificate entity. + */ + @JsonProperty(value = "organizationalUnit") + private String organizationalUnit; + + /* + * Geographical state or province of the certificate entity. + */ + @JsonProperty(value = "state") + private String state; + + /* + * Country code of the certificate entity. + */ + @JsonProperty(value = "country") + private String country; + + /** 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() { + return this.commonName; + } + + /** + * Set the commonName property: Common name of the certificate entity. + * + * @param commonName the commonName value to set. + * @return the CryptoCertificateEntity object itself. + */ + public CryptoCertificateEntity withCommonName(String commonName) { + this.commonName = commonName; + return this; + } + + /** + * Get the organization property: Organization of the certificate entity. + * + * @return the organization value. + */ + public String organization() { + return this.organization; + } + + /** + * Set the organization property: Organization of the certificate entity. + * + * @param organization the organization value to set. + * @return the CryptoCertificateEntity object itself. + */ + public CryptoCertificateEntity withOrganization(String organization) { + this.organization = organization; + return this; + } + + /** + * Get the organizationalUnit property: The organizational unit of the certificate entity. + * + * @return the organizationalUnit value. + */ + public String organizationalUnit() { + return this.organizationalUnit; + } + + /** + * Set the organizationalUnit property: The organizational unit of the certificate entity. + * + * @param organizationalUnit the organizationalUnit value to set. + * @return the CryptoCertificateEntity object itself. + */ + public CryptoCertificateEntity withOrganizationalUnit(String organizationalUnit) { + this.organizationalUnit = organizationalUnit; + return this; + } + + /** + * Get the state property: Geographical state or province of the certificate entity. + * + * @return the state value. + */ + public String state() { + return this.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. + */ + public CryptoCertificateEntity withState(String state) { + this.state = state; + return this; + } + + /** + * Get the country property: Country code of the certificate entity. + * + * @return the country value. + */ + public String country() { + return this.country; + } + + /** + * Set the country property: Country code of the certificate entity. + * + * @param country the country value to set. + * @return the CryptoCertificateEntity object itself. + */ + public CryptoCertificateEntity withCountry(String country) { + this.country = country; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/CryptoCertificateList.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/CryptoCertificateList.java new file mode 100644 index 0000000000000..952d1bf782478 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/CryptoCertificateList.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.fist.fluent.models.CryptoCertificateInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Crypto certificates list. */ +@Fluent +public final class CryptoCertificateList { + /* + * Crypto certificates 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 CryptoCertificateList class. */ + public CryptoCertificateList() { + } + + /** + * Get the value property: Crypto certificates 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 CryptoCertificateList object itself. + */ + public CryptoCertificateList 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/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/CryptoCertificateSummary.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/CryptoCertificateSummary.java new file mode 100644 index 0000000000000..4a64b842a1238 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/CryptoCertificateSummary.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.fist.models; + +import com.azure.resourcemanager.fist.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.fist.fluent.models.CryptoCertificateSummaryInner object. + * + * @return the inner object. + */ + CryptoCertificateSummaryInner innerModel(); +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/CryptoKey.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/CryptoKey.java new file mode 100644 index 0000000000000..d240e41da85bc --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/CryptoKey.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.fist.models; + +import com.azure.resourcemanager.fist.fluent.models.CryptoKeyInner; +import java.util.List; + +/** An immutable client-side representation of CryptoKey. */ +public interface CryptoKey { + /** + * Gets the cryptoKeyId property: ID for the key. + * + * @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. + * + * @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(); + + /** + * Gets the inner com.azure.resourcemanager.fist.fluent.models.CryptoKeyInner object. + * + * @return the inner object. + */ + CryptoKeyInner innerModel(); +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/CryptoKeyList.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/CryptoKeyList.java new file mode 100644 index 0000000000000..ee112a81ca485 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/CryptoKeyList.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.fist.fluent.models.CryptoKeyInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Crypto keys list. */ +@Fluent +public final class CryptoKeyList { + /* + * Crypto keys 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 CryptoKeyList class. */ + public CryptoKeyList() { + } + + /** + * Get the value property: Crypto keys 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 CryptoKeyList object itself. + */ + public CryptoKeyList 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/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/CryptoKeySummary.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/CryptoKeySummary.java new file mode 100644 index 0000000000000..03cad6af08f8f --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/CryptoKeySummary.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.models; + +import com.azure.resourcemanager.fist.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.fist.fluent.models.CryptoKeySummaryInner object. + * + * @return the inner object. + */ + CryptoKeySummaryInner innerModel(); +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/Cve.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/Cve.java new file mode 100644 index 0000000000000..348530e1dddbd --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/Cve.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.models; + +import com.azure.resourcemanager.fist.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.fist.fluent.models.CveInner object. + * + * @return the inner object. + */ + CveInner innerModel(); +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/CveLink.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/CveLink.java new file mode 100644 index 0000000000000..b7820b9f906a5 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/CveLink.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Link for CVE. */ +@Fluent +public final class CveLink { + /* + * Href of CVE link + */ + @JsonProperty(value = "href") + private String href; + + /* + * Label of CVE link + */ + @JsonProperty(value = "label") + private String label; + + /** Creates an instance of CveLink class. */ + public CveLink() { + } + + /** + * Get the href property: Href of CVE link. + * + * @return the href value. + */ + public String href() { + return this.href; + } + + /** + * Set the href property: Href of CVE link. + * + * @param href the href value to set. + * @return the CveLink object itself. + */ + public CveLink withHref(String href) { + this.href = href; + return this; + } + + /** + * Get the label property: Label of CVE link. + * + * @return the label value. + */ + public String label() { + return this.label; + } + + /** + * Set the label property: Label of CVE link. + * + * @param label the label value to set. + * @return the CveLink object itself. + */ + public CveLink withLabel(String label) { + this.label = label; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/CveList.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/CveList.java new file mode 100644 index 0000000000000..8855a4910e8a9 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/CveList.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.fist.fluent.models.CveInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** List result for CVE. */ +@Fluent +public final class CveList { + /* + * The list of CVE results. + */ + @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 CveList class. */ + public CveList() { + } + + /** + * Get the value property: The list of CVE results. + * + * @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 CveList object itself. + */ + public CveList 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/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/CveSummary.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/CveSummary.java new file mode 100644 index 0000000000000..f58a5758c4d4f --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/CveSummary.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.models; + +import com.azure.resourcemanager.fist.fluent.models.CveSummaryInner; + +/** An immutable client-side representation of CveSummary. */ +public interface CveSummary { + /** + * Gets the critical property: The total number of critical severity CVEs detected. + * + * @return the critical value. + */ + Long critical(); + + /** + * Gets the high property: The total number of high severity CVEs detected. + * + * @return the high value. + */ + Long high(); + + /** + * Gets the medium property: The total number of medium severity CVEs detected. + * + * @return the medium value. + */ + Long medium(); + + /** + * Gets the low property: The total number of low severity CVEs detected. + * + * @return the low value. + */ + Long low(); + + /** + * Gets the unknown property: The total number of unknown severity CVEs detected. + * + * @return the unknown value. + */ + Long unknown(); + + /** + * Gets the undefined property: The total number of undefined severity CVEs detected. + * + * @return the undefined value. + */ + Long undefined(); + + /** + * Gets the inner com.azure.resourcemanager.fist.fluent.models.CveSummaryInner object. + * + * @return the inner object. + */ + CveSummaryInner innerModel(); +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/Firmware.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/Firmware.java new file mode 100644 index 0000000000000..04c0617794f1d --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/Firmware.java @@ -0,0 +1,685 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.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.fist.fluent.models.FirmwareInner; +import java.util.List; + +/** 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(); + + /** + * 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.fist.fluent.models.FirmwareInner object. + * + * @return the inner object. + */ + FirmwareInner innerModel(); + + /** The entirety of the Firmware definition. */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + /** The Firmware definition stages. */ + interface DefinitionStages { + /** The first stage of the Firmware definition. */ + interface Blank extends WithParentResource { + } + /** 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. + */ + WithCreate withExistingWorkspace(String resourceGroupName, String workspaceName); + } + /** + * 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 { + /** + * 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. */ + 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. */ + 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. */ + 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. */ + 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. */ + 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. */ + 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. */ + 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. */ + 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); + } + } + /** + * 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 { + /** + * 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. */ + interface UpdateStages { + /** 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. */ + 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. */ + 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. */ + 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. */ + 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. */ + 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. */ + 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. */ + 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); + } + } + /** + * 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. + */ + Firmware refresh(Context context); + + /** + * 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. + * @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(Context context); + + /** + * 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. + */ + UrlToken generateDownloadUrl(); + + /** + * 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. + * @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(Context context); + + /** + * 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/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/FirmwareList.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/FirmwareList.java new file mode 100644 index 0000000000000..73abdce31943d --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/FirmwareList.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.fist.fluent.models.FirmwareInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** List of firmwares. */ +@Fluent +public final class FirmwareList { + /* + * The list of firmwares. + */ + @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 FirmwareList class. */ + public FirmwareList() { + } + + /** + * Get the value property: The list of firmwares. + * + * @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 FirmwareList object itself. + */ + public FirmwareList 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/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/FirmwareSummary.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/FirmwareSummary.java new file mode 100644 index 0000000000000..1ccb2ffb980bf --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/FirmwareSummary.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.models; + +import com.azure.resourcemanager.fist.fluent.models.FirmwareSummaryInner; + +/** An immutable client-side representation of FirmwareSummary. */ +public interface FirmwareSummary { + /** + * Gets the extractedSize property: Total extracted size of the firmware in bytes. + * + * @return the extractedSize value. + */ + Long extractedSize(); + + /** + * Gets the fileSize property: Firmware file size in bytes. + * + * @return the fileSize value. + */ + Long fileSize(); + + /** + * Gets the extractedFileCount property: Extracted file count. + * + * @return the extractedFileCount value. + */ + Long extractedFileCount(); + + /** + * Gets the componentCount property: Components count. + * + * @return the componentCount value. + */ + Long componentCount(); + + /** + * Gets the binaryCount property: Binary count. + * + * @return the binaryCount value. + */ + Long binaryCount(); + + /** + * Gets the analysisTimeSeconds property: Time used for analysis. + * + * @return the analysisTimeSeconds value. + */ + Long analysisTimeSeconds(); + + /** + * Gets the rootFileSystems property: The number of root file systems found. + * + * @return the rootFileSystems value. + */ + Long rootFileSystems(); + + /** + * Gets the inner com.azure.resourcemanager.fist.fluent.models.FirmwareSummaryInner object. + * + * @return the inner object. + */ + FirmwareSummaryInner innerModel(); +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/FirmwareUpdateDefinition.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/FirmwareUpdateDefinition.java new file mode 100644 index 0000000000000..cea40f0aa2985 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/FirmwareUpdateDefinition.java @@ -0,0 +1,237 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.fist.fluent.models.FirmwareProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Firmware definition. */ +@Fluent +public final class FirmwareUpdateDefinition { + /* + * The editable properties of a firmware + */ + @JsonProperty(value = "properties") + private FirmwareProperties innerProperties; + + /** 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() { + return this.innerProperties; + } + + /** + * Get the fileName property: File name for a firmware that user uploaded. + * + * @return the fileName value. + */ + public String fileName() { + return this.innerProperties() == null ? null : this.innerProperties().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. + */ + public FirmwareUpdateDefinition withFileName(String fileName) { + if (this.innerProperties() == null) { + this.innerProperties = new FirmwareProperties(); + } + this.innerProperties().withFileName(fileName); + return this; + } + + /** + * Get the vendor property: Firmware vendor. + * + * @return the vendor value. + */ + public String vendor() { + return this.innerProperties() == null ? null : this.innerProperties().vendor(); + } + + /** + * Set the vendor property: Firmware vendor. + * + * @param vendor the vendor value to set. + * @return the FirmwareUpdateDefinition object itself. + */ + public FirmwareUpdateDefinition withVendor(String vendor) { + if (this.innerProperties() == null) { + this.innerProperties = new FirmwareProperties(); + } + this.innerProperties().withVendor(vendor); + return this; + } + + /** + * Get the model property: Firmware model. + * + * @return the model value. + */ + public String model() { + return this.innerProperties() == null ? null : this.innerProperties().model(); + } + + /** + * Set the model property: Firmware model. + * + * @param model the model value to set. + * @return the FirmwareUpdateDefinition object itself. + */ + public FirmwareUpdateDefinition withModel(String model) { + if (this.innerProperties() == null) { + this.innerProperties = new FirmwareProperties(); + } + this.innerProperties().withModel(model); + return this; + } + + /** + * Get the version property: Firmware version. + * + * @return the version value. + */ + public String version() { + return this.innerProperties() == null ? null : this.innerProperties().version(); + } + + /** + * Set the version property: Firmware version. + * + * @param version the version value to set. + * @return the FirmwareUpdateDefinition object itself. + */ + public FirmwareUpdateDefinition withVersion(String version) { + if (this.innerProperties() == null) { + this.innerProperties = new FirmwareProperties(); + } + this.innerProperties().withVersion(version); + return this; + } + + /** + * Get the description property: User-specified description of the firmware. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: User-specified description of the firmware. + * + * @param description the description value to set. + * @return the FirmwareUpdateDefinition object itself. + */ + public FirmwareUpdateDefinition withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new FirmwareProperties(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Get the fileSize property: File size of the uploaded firmware image. + * + * @return the fileSize value. + */ + public Long fileSize() { + return this.innerProperties() == null ? null : this.innerProperties().fileSize(); + } + + /** + * Set the fileSize property: File size of the uploaded firmware image. + * + * @param fileSize the fileSize value to set. + * @return the FirmwareUpdateDefinition object itself. + */ + public FirmwareUpdateDefinition withFileSize(Long fileSize) { + if (this.innerProperties() == null) { + this.innerProperties = new FirmwareProperties(); + } + this.innerProperties().withFileSize(fileSize); + return this; + } + + /** + * Get the status property: The status of firmware scan. + * + * @return the status value. + */ + public Status status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); + } + + /** + * Set the status property: The status of firmware scan. + * + * @param status the status value to set. + * @return the FirmwareUpdateDefinition object itself. + */ + public FirmwareUpdateDefinition withStatus(Status status) { + if (this.innerProperties() == null) { + this.innerProperties = new FirmwareProperties(); + } + this.innerProperties().withStatus(status); + return this; + } + + /** + * Get the statusMessages property: A list of errors or other messages generated during firmware analysis. + * + * @return the statusMessages value. + */ + 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) { + if (this.innerProperties() == null) { + this.innerProperties = new FirmwareProperties(); + } + this.innerProperties().withStatusMessages(statusMessages); + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/Firmwares.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/Firmwares.java new file mode 100644 index 0000000000000..1dc77b29bf6b7 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/Firmwares.java @@ -0,0 +1,576 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.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 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. + * @throws com.azure.core.management.exception.ManagementException thrown 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 as paginated response with {@link PagedIterable}. + */ + PagedIterable listByWorkspace(String resourceGroupName, String workspaceName); + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 as paginated response with {@link PagedIterable}. + */ + PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteWithResponse( + String resourceGroupName, String 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String workspaceName, String firmwareId); + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @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); + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return firmware. + */ + Firmware get(String resourceGroupName, String workspaceName, String firmwareId); + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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}. + */ + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 generateDownloadUrl(String resourceGroupName, String workspaceName, String firmwareId); + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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}. + */ + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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(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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return firmware along with {@link Response}. + */ + Firmware getById(String id); + + /** + * Get firmware. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return firmware along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * 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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * 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. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new Firmware resource. + * + * @param name resource name. + * @return the first stage of the new Firmware definition. + */ + Firmware.DefinitionStages.Blank define(String name); +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/GenerateUploadUrlRequest.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/GenerateUploadUrlRequest.java new file mode 100644 index 0000000000000..a6c685097c387 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/GenerateUploadUrlRequest.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.fist.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Properties for generating an upload URL. */ +@Fluent +public final class GenerateUploadUrlRequest { + /* + * A unique ID for the firmware to be uploaded. + */ + @JsonProperty(value = "firmwareId") + private String firmwareId; + + /** 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() { + return this.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. + */ + public GenerateUploadUrlRequest withFirmwareId(String firmwareId) { + this.firmwareId = firmwareId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/IsExpired.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/IsExpired.java new file mode 100644 index 0000000000000..bf0c02035c98a --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/IsExpired.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.fist.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/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/IsSelfSigned.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/IsSelfSigned.java new file mode 100644 index 0000000000000..a8b77413ece22 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/IsSelfSigned.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.fist.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/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/IsShortKeySize.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/IsShortKeySize.java new file mode 100644 index 0000000000000..1dfbe35b59437 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/IsShortKeySize.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.fist.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/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/IsUpdateAvailable.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/IsUpdateAvailable.java new file mode 100644 index 0000000000000..3ca605ba56621 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/IsUpdateAvailable.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.fist.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/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/IsWeakSignature.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/IsWeakSignature.java new file mode 100644 index 0000000000000..17fd4291955ab --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/IsWeakSignature.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.fist.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/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/NxFlag.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/NxFlag.java new file mode 100644 index 0000000000000..ebc1cb9b5d37b --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/NxFlag.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.fist.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/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/Operation.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/Operation.java new file mode 100644 index 0000000000000..fb671d1803d4f --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/Operation.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.models; + +import com.azure.resourcemanager.fist.fluent.models.OperationInner; + +/** An immutable client-side representation of Operation. */ +public interface Operation { + /** + * Gets the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". + * + * @return the name value. + */ + String name(); + + /** + * Gets the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane + * operations and "false" for ARM/control-plane operations. + * + * @return the isDataAction value. + */ + Boolean isDataAction(); + + /** + * Gets the display property: Localized display information for this particular operation. + * + * @return the display value. + */ + OperationDisplay display(); + + /** + * Gets the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and + * audit logs UX. Default value is "user,system". + * + * @return the origin value. + */ + Origin origin(); + + /** + * Gets the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal + * only APIs. + * + * @return the actionType value. + */ + ActionType actionType(); + + /** + * Gets the inner com.azure.resourcemanager.fist.fluent.models.OperationInner object. + * + * @return the inner object. + */ + OperationInner innerModel(); +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/OperationDisplay.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/OperationDisplay.java new file mode 100644 index 0000000000000..0d4f46b7bf49e --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/OperationDisplay.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Localized display information for this particular operation. */ +@Immutable +public final class OperationDisplay { + /* + * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft + * Compute". + */ + @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY) + private String provider; + + /* + * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job + * Schedule Collections". + */ + @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY) + private String resource; + + /* + * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual + * Machine", "Restart Virtual Machine". + */ + @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY) + private String operation; + + /* + * The short, localized friendly description of the operation; suitable for tool tips and detailed views. + */ + @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /** 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() { + return this.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() { + return this.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() { + return this.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() { + return this.description; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/OperationListResult.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/OperationListResult.java new file mode 100644 index 0000000000000..4cd2427483d51 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/OperationListResult.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.fist.fluent.models.OperationInner; +import com.fasterxml.jackson.annotation.JsonProperty; +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. + */ +@Immutable +public final class OperationListResult { + /* + * List of operations supported by the resource provider + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private List value; + + /* + * URL to get the next set of operation list results (if there are any). + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** 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() { + return this.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() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/Operations.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/Operations.java new file mode 100644 index 0000000000000..5979a75547ccf --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/Operations.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** 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}. + */ + 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}. + */ + PagedIterable list(Context context); +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/Origin.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/Origin.java new file mode 100644 index 0000000000000..2a048dfff445c --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/Origin.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value + * is "user,system". + */ +public final class Origin extends ExpandableStringEnum { + /** Static value user for Origin. */ + public static final Origin USER = fromString("user"); + + /** Static value system for Origin. */ + public static final Origin SYSTEM = fromString("system"); + + /** Static value user,system for Origin. */ + public static final Origin USER_SYSTEM = fromString("user,system"); + + /** + * Creates a new instance of Origin value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Origin() { + } + + /** + * Creates or finds a Origin from its string representation. + * + * @param name a name to look for. + * @return the corresponding Origin. + */ + @JsonCreator + public static Origin fromString(String name) { + return fromString(name, Origin.class); + } + + /** + * Gets known Origin values. + * + * @return known Origin values. + */ + public static Collection values() { + return values(Origin.class); + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/PairedKey.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/PairedKey.java new file mode 100644 index 0000000000000..e2b6c77b23109 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/PairedKey.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Details of a matching paired key or certificate. */ +@Fluent +public final class PairedKey { + /* + * ID of the paired key or certificate. + */ + @JsonProperty(value = "id") + private String id; + + /* + * The type indicating whether the paired object is a key or certificate. + */ + @JsonProperty(value = "type") + private String type; + + /* + * Additional paired key properties + */ + @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() { + return this.id; + } + + /** + * Set the id property: ID of the paired key or certificate. + * + * @param id the id value to set. + * @return the PairedKey object itself. + */ + public PairedKey withId(String id) { + this.id = id; + return this; + } + + /** + * Get the type property: The type indicating whether the paired object is a key or certificate. + * + * @return the type value. + */ + public String type() { + return this.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. + */ + public PairedKey withType(String type) { + this.type = 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/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/PasswordHash.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/PasswordHash.java new file mode 100644 index 0000000000000..f1ac1d2971296 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/PasswordHash.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.models; + +import com.azure.resourcemanager.fist.fluent.models.PasswordHashInner; + +/** 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.fist.fluent.models.PasswordHashInner object. + * + * @return the inner object. + */ + PasswordHashInner innerModel(); +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/PasswordHashList.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/PasswordHashList.java new file mode 100644 index 0000000000000..0fb8397afd503 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/PasswordHashList.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.fist.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/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/PieFlag.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/PieFlag.java new file mode 100644 index 0000000000000..2d9d934491d50 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/PieFlag.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.fist.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/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/ProvisioningState.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/ProvisioningState.java new file mode 100644 index 0000000000000..9f458634d6910 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/ProvisioningState.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Provisioning state of the resource. */ +public final class ProvisioningState extends ExpandableStringEnum { + /** Static value Accepted for ProvisioningState. */ + public static final ProvisioningState ACCEPTED = fromString("Accepted"); + + /** Static value Succeeded for ProvisioningState. */ + public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Canceled for ProvisioningState. */ + public static final ProvisioningState CANCELED = fromString("Canceled"); + + /** 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 + public ProvisioningState() { + } + + /** + * Creates or finds a ProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ProvisioningState. + */ + @JsonCreator + public static ProvisioningState fromString(String name) { + return fromString(name, ProvisioningState.class); + } + + /** + * Gets known ProvisioningState values. + * + * @return known ProvisioningState values. + */ + public static Collection values() { + return values(ProvisioningState.class); + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/RelroFlag.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/RelroFlag.java new file mode 100644 index 0000000000000..3d09f94a70695 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/RelroFlag.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.fist.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/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/Status.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/Status.java new file mode 100644 index 0000000000000..5d94604dd0277 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/Status.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The status of firmware scan. */ +public final class Status extends ExpandableStringEnum { + /** Static value Pending for Status. */ + public static final Status PENDING = fromString("Pending"); + + /** Static value Extracting for Status. */ + public static final Status EXTRACTING = fromString("Extracting"); + + /** Static value Analyzing for Status. */ + public static final Status ANALYZING = fromString("Analyzing"); + + /** Static value Ready for Status. */ + public static final Status READY = fromString("Ready"); + + /** 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 + public Status() { + } + + /** + * Creates or finds a Status from its string representation. + * + * @param name a name to look for. + * @return the corresponding Status. + */ + @JsonCreator + public static Status fromString(String name) { + return fromString(name, Status.class); + } + + /** + * Gets known Status values. + * + * @return known Status values. + */ + public static Collection values() { + return values(Status.class); + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/StrippedFlag.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/StrippedFlag.java new file mode 100644 index 0000000000000..cf5be6c7ede6d --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/StrippedFlag.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.fist.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/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/UrlToken.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/UrlToken.java new file mode 100644 index 0000000000000..ab9d10c05f0b6 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/UrlToken.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.fist.models; + +import com.azure.resourcemanager.fist.fluent.models.UrlTokenInner; + +/** 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.fist.fluent.models.UrlTokenInner object. + * + * @return the inner object. + */ + UrlTokenInner innerModel(); +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/Workspace.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/Workspace.java new file mode 100644 index 0000000000000..dc13ac2669d55 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/Workspace.java @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.fist.fluent.models.WorkspaceInner; +import java.util.Map; + +/** 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.fist.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 Workspace definition stages. */ + interface DefinitionStages { + /** The first stage of the Workspace definition. */ + interface Blank extends WithLocation { + } + /** 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. + */ + WithResourceGroup withRegion(Region location); + + /** + * 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. */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + /** + * The stage of the Workspace definition which contains all the minimum required properties for the resource to + * be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithTags { + /** + * 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. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + } + /** + * Begins update for the Workspace resource. + * + * @return the stage of resource update. + */ + Workspace.Update 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. */ + 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. + */ + Workspace refresh(Context context); + + /** + * 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. + * @throws com.azure.core.management.exception.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}. + */ + Response generateUploadUrlWithResponse(GenerateUploadUrlRequest generateUploadUrl, Context context); + + /** + * 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. + * @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(GenerateUploadUrlRequest generateUploadUrl); +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/WorkspaceList.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/WorkspaceList.java new file mode 100644 index 0000000000000..354d7f3358f0a --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/WorkspaceList.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.fist.fluent.models.WorkspaceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Return a list of firmware analysis workspaces. */ +@Fluent +public final class WorkspaceList { + /* + * The list of firmware analysis workspaces. + */ + @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 WorkspaceList class. */ + public WorkspaceList() { + } + + /** + * Get the value property: The list of firmware analysis workspaces. + * + * @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 WorkspaceList object itself. + */ + public WorkspaceList 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/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/WorkspaceUpdateDefinition.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/WorkspaceUpdateDefinition.java new file mode 100644 index 0000000000000..524ec7b5a60fa --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/WorkspaceUpdateDefinition.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.fist.fluent.models.WorkspaceProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Firmware analysis workspace. */ +@Immutable +public final class WorkspaceUpdateDefinition { + /* + * The editable workspace properties. + */ + @JsonProperty(value = "properties") + private WorkspaceProperties innerProperties; + + /** Creates an instance of WorkspaceUpdateDefinition class. */ + public WorkspaceUpdateDefinition() { + } + + /** + * Get the innerProperties property: The editable workspace properties. + * + * @return the innerProperties value. + */ + private WorkspaceProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/Workspaces.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/Workspaces.java new file mode 100644 index 0000000000000..9122aa8948fb6 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/Workspaces.java @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.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 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}. + */ + 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 com.azure.core.management.exception.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}. + */ + 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 com.azure.core.management.exception.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}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * 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 com.azure.core.management.exception.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}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteByResourceGroupWithResponse(String resourceGroupName, String workspaceName, Context 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. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByResourceGroup(String resourceGroupName, String 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return firmware analysis workspace along with {@link Response}. + */ + 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. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return firmware analysis workspace. + */ + Workspace getByResourceGroup(String resourceGroupName, String workspaceName); + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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}. + */ + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return firmware analysis workspace along with {@link Response}. + */ + Workspace getById(String id); + + /** + * 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. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return firmware analysis workspace along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * 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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * 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. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new Workspace resource. + * + * @param name resource name. + * @return the first stage of the new Workspace definition. + */ + Workspace.DefinitionStages.Blank define(String name); +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/package-info.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/package-info.java new file mode 100644 index 0000000000000..48ff4cbb7638e --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/models/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// 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 com.azure.resourcemanager.fist.models; diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/package-info.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/package-info.java new file mode 100644 index 0000000000000..578cd2920755a --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/com/azure/resourcemanager/fist/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// 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 com.azure.resourcemanager.fist; diff --git a/sdk/fist/azure-resourcemanager-fist/src/main/java/module-info.java b/sdk/fist/azure-resourcemanager-fist/src/main/java/module-info.java new file mode 100644 index 0000000000000..d0073b2fc8982 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/main/java/module-info.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +module com.azure.resourcemanager.fist { + requires transitive com.azure.core.management; + + exports com.azure.resourcemanager.fist; + exports com.azure.resourcemanager.fist.fluent; + exports com.azure.resourcemanager.fist.fluent.models; + exports com.azure.resourcemanager.fist.models; + + opens com.azure.resourcemanager.fist.fluent.models to + com.azure.core, + com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.fist.models to + com.azure.core, + com.fasterxml.jackson.databind; +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareCreateSamples.java b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareCreateSamples.java new file mode 100644 index 0000000000000..3bb183fcb560b --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareCreateSamples.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.generated; + +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.fist.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.fist.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.fist.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/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareDeleteSamples.java b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareDeleteSamples.java new file mode 100644 index 0000000000000..20899ce48d940 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareDeleteSamples.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.fist.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.fist.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.fist.IoTFirmwareDefenseManager manager) { + manager + .firmwares() + .deleteWithResponse("rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareGenerateBinaryHardeningDetailsSamples.java b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareGenerateBinaryHardeningDetailsSamples.java new file mode 100644 index 0000000000000..47afc191714c8 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareGenerateBinaryHardeningDetailsSamples.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.fist.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.fist.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.fist.IoTFirmwareDefenseManager manager) { + manager + .firmwares() + .generateBinaryHardeningDetailsWithResponse( + "rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareGenerateBinaryHardeningSummarySamples.java b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareGenerateBinaryHardeningSummarySamples.java new file mode 100644 index 0000000000000..70083068fb815 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareGenerateBinaryHardeningSummarySamples.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.fist.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.fist.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.fist.IoTFirmwareDefenseManager manager) { + manager + .firmwares() + .generateBinaryHardeningSummaryWithResponse( + "rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareGenerateComponentDetailsSamples.java b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareGenerateComponentDetailsSamples.java new file mode 100644 index 0000000000000..914f89510cf97 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareGenerateComponentDetailsSamples.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.fist.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.fist.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.fist.IoTFirmwareDefenseManager manager) { + manager + .firmwares() + .generateComponentDetailsWithResponse( + "rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareGenerateCryptoCertificateSummarySamples.java b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareGenerateCryptoCertificateSummarySamples.java new file mode 100644 index 0000000000000..23d1fccc07587 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareGenerateCryptoCertificateSummarySamples.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.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.fist.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.fist.IoTFirmwareDefenseManager manager) { + manager + .firmwares() + .generateCryptoCertificateSummaryWithResponse( + "rgworkspaces-firmwares", "j5QE_", "wujtpcgypfpqseyrsebolarkspy", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareGenerateCryptoKeySummarySamples.java b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareGenerateCryptoKeySummarySamples.java new file mode 100644 index 0000000000000..664f4e0fd231d --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareGenerateCryptoKeySummarySamples.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.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.fist.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.fist.IoTFirmwareDefenseManager manager) { + manager + .firmwares() + .generateCryptoKeySummaryWithResponse( + "rgworkspaces-firmwares", "j5QE_", "wujtpcgypfpqseyrsebolarkspy", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareGenerateCveSummarySamples.java b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareGenerateCveSummarySamples.java new file mode 100644 index 0000000000000..2979061f8ec2f --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareGenerateCveSummarySamples.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.fist.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.fist.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.fist.IoTFirmwareDefenseManager manager) { + manager + .firmwares() + .generateCveSummaryWithResponse( + "rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareGenerateDownloadUrlSamples.java b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareGenerateDownloadUrlSamples.java new file mode 100644 index 0000000000000..3197bf32d517d --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareGenerateDownloadUrlSamples.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.fist.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.fist.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.fist.IoTFirmwareDefenseManager manager) { + manager + .firmwares() + .generateDownloadUrlWithResponse( + "rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareGenerateFilesystemDownloadUrlSamples.java b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareGenerateFilesystemDownloadUrlSamples.java new file mode 100644 index 0000000000000..87e466f347c2c --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareGenerateFilesystemDownloadUrlSamples.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.fist.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.fist.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.fist.IoTFirmwareDefenseManager manager) { + manager + .firmwares() + .generateFilesystemDownloadUrlWithResponse( + "rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareGenerateSummarySamples.java b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareGenerateSummarySamples.java new file mode 100644 index 0000000000000..ad5aca5259ab2 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareGenerateSummarySamples.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.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.fist.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.fist.IoTFirmwareDefenseManager manager) { + manager + .firmwares() + .generateSummaryWithResponse("rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareGetSamples.java b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareGetSamples.java new file mode 100644 index 0000000000000..6078be9af2290 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareGetSamples.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.fist.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.fist.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.fist.IoTFirmwareDefenseManager manager) { + manager + .firmwares() + .getWithResponse("rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareListByWorkspaceSamples.java b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareListByWorkspaceSamples.java new file mode 100644 index 0000000000000..84875baa10c54 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareListByWorkspaceSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.generated; + +/** Samples for Firmware ListByWorkspace. */ +public final class FirmwareListByWorkspaceSamples { + /* + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListByWorkspace_MaximumSet_Gen.json + */ + /** + * Sample code: Firmware_ListByWorkspace_MaximumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void firmwareListByWorkspaceMaximumSetGen( + com.azure.resourcemanager.fist.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 + */ + /** + * Sample code: Firmware_ListByWorkspace_MinimumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void firmwareListByWorkspaceMinimumSetGen( + com.azure.resourcemanager.fist.IoTFirmwareDefenseManager manager) { + manager.firmwares().listByWorkspace("rgworkspaces-firmwares", "A7", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareListGenerateBinaryHardeningListSamples.java b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareListGenerateBinaryHardeningListSamples.java new file mode 100644 index 0000000000000..0097d85e62fd1 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareListGenerateBinaryHardeningListSamples.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.fist.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.fist.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.fist.IoTFirmwareDefenseManager manager) { + manager + .firmwares() + .listGenerateBinaryHardeningList( + "rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareListGenerateComponentListSamples.java b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareListGenerateComponentListSamples.java new file mode 100644 index 0000000000000..c4b851597e1eb --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareListGenerateComponentListSamples.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.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.fist.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.fist.IoTFirmwareDefenseManager manager) { + manager + .firmwares() + .listGenerateComponentList("rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareListGenerateCryptoCertificateListSamples.java b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareListGenerateCryptoCertificateListSamples.java new file mode 100644 index 0000000000000..f8e7e45ebafa1 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareListGenerateCryptoCertificateListSamples.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.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.fist.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.fist.IoTFirmwareDefenseManager manager) { + manager + .firmwares() + .listGenerateCryptoCertificateList( + "rgworkspaces-firmwares", "j5QE_", "wujtpcgypfpqseyrsebolarkspy", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareListGenerateCryptoKeyListSamples.java b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareListGenerateCryptoKeyListSamples.java new file mode 100644 index 0000000000000..67d3488c88001 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareListGenerateCryptoKeyListSamples.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.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.fist.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.fist.IoTFirmwareDefenseManager manager) { + manager + .firmwares() + .listGenerateCryptoKeyList( + "FirmwareAnalysisRG", + "default", + "DECAFBAD-0000-0000-0000-BADBADBADBAD", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareListGenerateCveListSamples.java b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareListGenerateCveListSamples.java new file mode 100644 index 0000000000000..5be34c3b35914 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareListGenerateCveListSamples.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.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.fist.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.fist.IoTFirmwareDefenseManager manager) { + manager + .firmwares() + .listGenerateCveList("rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareListGeneratePasswordHashListSamples.java b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareListGeneratePasswordHashListSamples.java new file mode 100644 index 0000000000000..0a0e94ac050f8 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareListGeneratePasswordHashListSamples.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.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.fist.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.fist.IoTFirmwareDefenseManager manager) { + manager + .firmwares() + .listGeneratePasswordHashList("rgworkspaces-firmwares", "A7", "umrkdttp", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareUpdateSamples.java b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareUpdateSamples.java new file mode 100644 index 0000000000000..dd0c0467d19d1 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/FirmwareUpdateSamples.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.generated; + +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.fist.models.Firmware; +import com.azure.resourcemanager.fist.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.fist.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.fist.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/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/OperationsListSamples.java b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/OperationsListSamples.java new file mode 100644 index 0000000000000..96b0510a7a951 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/OperationsListSamples.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.generated; + +/** 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 + */ + /** + * Sample code: Operations_List_MinimumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void operationsListMinimumSetGen(com.azure.resourcemanager.fist.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 + */ + /** + * Sample code: Operations_List_MaximumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void operationsListMaximumSetGen(com.azure.resourcemanager.fist.IoTFirmwareDefenseManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/WorkspacesCreateSamples.java b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/WorkspacesCreateSamples.java new file mode 100644 index 0000000000000..9f1147ec75805 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/WorkspacesCreateSamples.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.generated; + +import java.util.HashMap; +import java.util.Map; + +/** 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 + */ + /** + * Sample code: Workspaces_Create_MinimumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void workspacesCreateMinimumSetGen(com.azure.resourcemanager.fist.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 + */ + /** + * Sample code: Workspaces_Create_MaximumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void workspacesCreateMaximumSetGen(com.azure.resourcemanager.fist.IoTFirmwareDefenseManager manager) { + manager + .workspaces() + .define("E___-3") + .withRegion("jjwbseilitjgdrhbvvkwviqj") + .withExistingResourceGroup("rgworkspaces") + .withTags(mapOf("key450", "rzqqumbpfsbibnpirsm")) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/WorkspacesDeleteSamples.java b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/WorkspacesDeleteSamples.java new file mode 100644 index 0000000000000..42fa2503758eb --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/WorkspacesDeleteSamples.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.fist.generated; + +/** 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 + */ + /** + * Sample code: Workspaces_Delete_MinimumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void workspacesDeleteMinimumSetGen(com.azure.resourcemanager.fist.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 + */ + /** + * Sample code: Workspaces_Delete_MaximumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void workspacesDeleteMaximumSetGen(com.azure.resourcemanager.fist.IoTFirmwareDefenseManager manager) { + manager + .workspaces() + .deleteByResourceGroupWithResponse("rgworkspaces", "E___-3", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/WorkspacesGenerateUploadUrlSamples.java b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/WorkspacesGenerateUploadUrlSamples.java new file mode 100644 index 0000000000000..0a31e6a23174f --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/WorkspacesGenerateUploadUrlSamples.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.fist.generated; + +import com.azure.resourcemanager.fist.models.GenerateUploadUrlRequest; + +/** 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 + */ + /** + * Sample code: Workspaces_GenerateUploadUrl_MinimumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void workspacesGenerateUploadUrlMinimumSetGen( + com.azure.resourcemanager.fist.IoTFirmwareDefenseManager manager) { + 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 + */ + /** + * Sample code: Workspaces_GenerateUploadUrl_MaximumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void workspacesGenerateUploadUrlMaximumSetGen( + com.azure.resourcemanager.fist.IoTFirmwareDefenseManager manager) { + manager + .workspaces() + .generateUploadUrlWithResponse( + "rgworkspaces", + "E___-3", + new GenerateUploadUrlRequest().withFirmwareId("ytsfprbywi"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/WorkspacesGetByResourceGroupSamples.java b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/WorkspacesGetByResourceGroupSamples.java new file mode 100644 index 0000000000000..d0d8a612423a1 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/WorkspacesGetByResourceGroupSamples.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.generated; + +/** 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 + */ + /** + * Sample code: Workspaces_Get_MaximumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void workspacesGetMaximumSetGen(com.azure.resourcemanager.fist.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 + */ + /** + * Sample code: Workspaces_Get_MinimumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void workspacesGetMinimumSetGen(com.azure.resourcemanager.fist.IoTFirmwareDefenseManager manager) { + manager.workspaces().getByResourceGroupWithResponse("rgworkspaces", "E_US", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/WorkspacesListByResourceGroupSamples.java b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/WorkspacesListByResourceGroupSamples.java new file mode 100644 index 0000000000000..1226819e30256 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/WorkspacesListByResourceGroupSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.generated; + +/** 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 + */ + /** + * Sample code: Workspaces_ListByResourceGroup_MaximumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void workspacesListByResourceGroupMaximumSetGen( + com.azure.resourcemanager.fist.IoTFirmwareDefenseManager manager) { + manager.workspaces().listByResourceGroup("rgworkspaces", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_ListByResourceGroup_MinimumSet_Gen.json + */ + /** + * Sample code: Workspaces_ListByResourceGroup_MinimumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void workspacesListByResourceGroupMinimumSetGen( + com.azure.resourcemanager.fist.IoTFirmwareDefenseManager manager) { + manager.workspaces().listByResourceGroup("rgworkspaces", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/WorkspacesListSamples.java b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/WorkspacesListSamples.java new file mode 100644 index 0000000000000..84ecc6fa42b16 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/WorkspacesListSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.generated; + +/** 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 + */ + /** + * Sample code: Workspaces_ListBySubscription_MaximumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void workspacesListBySubscriptionMaximumSetGen( + com.azure.resourcemanager.fist.IoTFirmwareDefenseManager manager) { + manager.workspaces().list(com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_ListBySubscription_MinimumSet_Gen.json + */ + /** + * Sample code: Workspaces_ListBySubscription_MinimumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void workspacesListBySubscriptionMinimumSetGen( + com.azure.resourcemanager.fist.IoTFirmwareDefenseManager manager) { + manager.workspaces().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/WorkspacesUpdateSamples.java b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/WorkspacesUpdateSamples.java new file mode 100644 index 0000000000000..fa653baee1c20 --- /dev/null +++ b/sdk/fist/azure-resourcemanager-fist/src/samples/java/com/azure/resourcemanager/fist/generated/WorkspacesUpdateSamples.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.fist.generated; + +import com.azure.resourcemanager.fist.models.Workspace; + +/** 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 + */ + /** + * Sample code: Workspaces_Update_MaximumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void workspacesUpdateMaximumSetGen(com.azure.resourcemanager.fist.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 + */ + /** + * Sample code: Workspaces_Update_MinimumSet_Gen. + * + * @param manager Entry point to IoTFirmwareDefenseManager. + */ + public static void workspacesUpdateMinimumSetGen(com.azure.resourcemanager.fist.IoTFirmwareDefenseManager manager) { + Workspace resource = + manager + .workspaces() + .getByResourceGroupWithResponse("rgworkspaces", "E___-3", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().apply(); + } +} diff --git a/sdk/fist/ci.yml b/sdk/fist/ci.yml new file mode 100644 index 0000000000000..bbfa0214c9efb --- /dev/null +++ b/sdk/fist/ci.yml @@ -0,0 +1,47 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: + branches: + include: + - main + - hotfix/* + - release/* + paths: + include: + - sdk/fist/ci.yml + - sdk/fist/azure-resourcemanager-fist/ + exclude: + - sdk/fist/pom.xml + - sdk/fist/azure-resourcemanager-fist/pom.xml + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/fist/ci.yml + - sdk/fist/azure-resourcemanager-fist/ + exclude: + - sdk/fist/pom.xml + - sdk/fist/azure-resourcemanager-fist/pom.xml + +parameters: + - name: release_azureresourcemanagerfist + displayName: azure-resourcemanager-fist + type: boolean + default: false + +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: fist + EnableBatchRelease: true + Artifacts: + - name: azure-resourcemanager-fist + groupId: com.azure.resourcemanager + safeName: azureresourcemanagerfist + releaseInBatch: ${{ parameters.release_azureresourcemanagerfist }} diff --git a/sdk/fist/pom.xml b/sdk/fist/pom.xml new file mode 100644 index 0000000000000..8e893b4ce5167 --- /dev/null +++ b/sdk/fist/pom.xml @@ -0,0 +1,15 @@ + + + 4.0.0 + com.azure + azure-fist-service + pom + 1.0.0 + + + azure-resourcemanager-fist + +