From 02283e80ed5774a03ec2280422cf853185a6c5cb Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Thu, 26 Dec 2024 05:02:21 +0000 Subject: [PATCH 1/4] [Automation] External Change --- eng/versioning/version_client.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index dc0a188f4510..760f6369d3d1 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -405,7 +405,7 @@ com.azure.resourcemanager:azure-resourcemanager-appcontainers;1.0.0;1.1.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-scvmm;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-hardwaresecuritymodules;1.0.0-beta.3;1.0.0-beta.4 com.azure.resourcemanager:azure-resourcemanager-workloads;1.1.0;1.2.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-confidentialledger;1.0.0-beta.5;1.0.0-beta.6 +com.azure.resourcemanager:azure-resourcemanager-confidentialledger;1.0.0-beta.5;1.0.0 com.azure.resourcemanager:azure-resourcemanager-dynatrace;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-deviceupdate;1.1.0;1.2.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-machinelearning;1.1.0;1.2.0-beta.1 From fd97ebe0fd9fece1a014b72c4df2fcdec98ff403 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Thu, 26 Dec 2024 05:02:46 +0000 Subject: [PATCH 2/4] [Automation] Generate Fluent Lite from Swagger confidentialledger#package-2022-05-13 --- .../CHANGELOG.md | 77 +- .../README.md | 4 +- .../SAMPLE.md | 381 +--- .../pom.xml | 5 +- .../ConfidentialLedgerManager.java | 18 +- .../ConfidentialLedgerManagementClient.java | 9 +- .../fluent/LedgersClient.java | 180 +- .../fluent/ManagedCcfsClient.java | 449 ---- ...ConfidentialLedgerBackupResponseInner.java | 83 - .../models/ConfidentialLedgerInner.java | 90 +- ...onfidentialLedgerRestoreResponseInner.java | 83 - .../models/ManagedCcfBackupResponseInner.java | 82 - .../fluent/models/ManagedCcfInner.java | 192 -- .../ManagedCcfRestoreResponseInner.java | 82 - .../ConfidentialLedgerBackupResponseImpl.java | 32 - .../ConfidentialLedgerImpl.java | 36 +- ...identialLedgerManagementClientBuilder.java | 4 +- ...onfidentialLedgerManagementClientImpl.java | 25 +- ...ConfidentialLedgerRestoreResponseImpl.java | 32 - .../implementation/LedgersClientImpl.java | 639 +----- .../implementation/LedgersImpl.java | 50 - .../ManagedCcfBackupResponseImpl.java | 32 - .../implementation/ManagedCcfImpl.java | 184 -- .../ManagedCcfRestoreResponseImpl.java | 32 - .../implementation/ManagedCcfsClientImpl.java | 1958 ----------------- .../implementation/ManagedCcfsImpl.java | 193 -- .../models/ConfidentialLedger.java | 139 +- .../models/ConfidentialLedgerBackup.java | 129 -- .../ConfidentialLedgerBackupResponse.java | 27 - .../models/ConfidentialLedgerRestore.java | 167 -- .../ConfidentialLedgerRestoreResponse.java | 27 - .../models/DeploymentType.java | 124 -- .../models/LanguageRuntime.java | 51 - .../models/LedgerProperties.java | 56 - .../confidentialledger/models/LedgerSku.java | 56 - .../confidentialledger/models/Ledgers.java | 78 +- .../confidentialledger/models/ManagedCcf.java | 319 --- .../models/ManagedCcfBackup.java | 131 -- .../models/ManagedCcfBackupResponse.java | 26 - .../models/ManagedCcfList.java | 127 -- .../models/ManagedCcfProperties.java | 255 --- .../models/ManagedCcfRestore.java | 167 -- .../models/ManagedCcfRestoreResponse.java | 26 - .../models/ManagedCcfs.java | 251 --- .../models/MemberIdentityCertificate.java | 151 -- .../models/ResourceLocation.java | 93 + .../models/RunningState.java | 66 - .../confidentialledger/models/Tags.java | 95 + .../proxy-config.json | 2 +- .../generated/LedgerBackupSamples.java | 30 - .../generated/LedgerCreateSamples.java | 8 +- .../generated/LedgerDeleteSamples.java | 4 +- .../LedgerGetByResourceGroupSamples.java | 4 +- .../LedgerListByResourceGroupSamples.java | 4 +- .../generated/LedgerListSamples.java | 4 +- .../generated/LedgerRestoreSamples.java | 32 - .../generated/LedgerUpdateSamples.java | 4 +- .../generated/ManagedCcfBackupSamples.java | 30 - .../generated/ManagedCcfCreateSamples.java | 64 - .../generated/ManagedCcfDeleteSamples.java | 25 - .../ManagedCcfGetByResourceGroupSamples.java | 26 - .../ManagedCcfListByResourceGroupSamples.java | 24 - .../generated/ManagedCcfListSamples.java | 25 - .../generated/ManagedCcfRestoreSamples.java | 32 - .../generated/ManagedCcfUpdateSamples.java | 54 - .../generated/OperationsListSamples.java | 4 +- ...eProviderCheckNameAvailabilitySamples.java | 4 +- .../AadBasedSecurityPrincipalTests.java | 20 +- .../CertBasedSecurityPrincipalTests.java | 12 +- ...dentialLedgerBackupResponseInnerTests.java | 22 - .../ConfidentialLedgerBackupTests.java | 28 - .../ConfidentialLedgerInnerTests.java | 64 +- .../ConfidentialLedgerListTests.java | 137 +- ...entialLedgerRestoreResponseInnerTests.java | 22 - .../ConfidentialLedgerRestoreTests.java | 32 - .../generated/DeploymentTypeTests.java | 28 - .../generated/LedgerPropertiesTests.java | 57 +- .../generated/LedgersBackupMockTests.java | 38 - .../generated/LedgersCreateMockTests.java | 61 +- .../generated/LedgersDeleteMockTests.java | 2 +- ...tByResourceGroupWithResponseMockTests.java | 21 +- .../LedgersListByResourceGroupMockTests.java | 22 +- .../generated/LedgersListMockTests.java | 20 +- .../generated/LedgersRestoreMockTests.java | 40 - .../ManagedCcfBackupResponseInnerTests.java | 22 - .../generated/ManagedCcfBackupTests.java | 27 - .../ManagedCcfRestoreResponseInnerTests.java | 22 - .../generated/ManagedCcfRestoreTests.java | 32 - .../generated/ManagedCcfsBackupMockTests.java | 37 - .../generated/ManagedCcfsDeleteMockTests.java | 33 - .../ManagedCcfsRestoreMockTests.java | 38 - .../generated/OperationsListMockTests.java | 12 +- .../generated/ResourceLocationTests.java | 24 + ...NameAvailabilityWithResponseMockTests.java | 9 +- .../generated/TagsTests.java | 41 + 95 files changed, 733 insertions(+), 8083 deletions(-) delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/ManagedCcfsClient.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/ConfidentialLedgerBackupResponseInner.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/ConfidentialLedgerRestoreResponseInner.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/ManagedCcfBackupResponseInner.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/ManagedCcfInner.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/ManagedCcfRestoreResponseInner.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ConfidentialLedgerBackupResponseImpl.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ConfidentialLedgerRestoreResponseImpl.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ManagedCcfBackupResponseImpl.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ManagedCcfImpl.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ManagedCcfRestoreResponseImpl.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ManagedCcfsClientImpl.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ManagedCcfsImpl.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ConfidentialLedgerBackup.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ConfidentialLedgerBackupResponse.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ConfidentialLedgerRestore.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ConfidentialLedgerRestoreResponse.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/DeploymentType.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/LanguageRuntime.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/LedgerSku.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ManagedCcf.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ManagedCcfBackup.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ManagedCcfBackupResponse.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ManagedCcfList.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ManagedCcfProperties.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ManagedCcfRestore.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ManagedCcfRestoreResponse.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ManagedCcfs.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/MemberIdentityCertificate.java create mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ResourceLocation.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/RunningState.java create mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/Tags.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/LedgerBackupSamples.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/LedgerRestoreSamples.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfBackupSamples.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfCreateSamples.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfDeleteSamples.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfGetByResourceGroupSamples.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfListByResourceGroupSamples.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfListSamples.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfRestoreSamples.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfUpdateSamples.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ConfidentialLedgerBackupResponseInnerTests.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ConfidentialLedgerBackupTests.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ConfidentialLedgerRestoreResponseInnerTests.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ConfidentialLedgerRestoreTests.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/DeploymentTypeTests.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/LedgersBackupMockTests.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/LedgersRestoreMockTests.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfBackupResponseInnerTests.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfBackupTests.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfRestoreResponseInnerTests.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfRestoreTests.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfsBackupMockTests.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfsDeleteMockTests.java delete mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfsRestoreMockTests.java create mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ResourceLocationTests.java create mode 100644 sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/TagsTests.java diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/CHANGELOG.md b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/CHANGELOG.md index d6d4f6e5ba5e..f8fb1ccd1c67 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/CHANGELOG.md +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/CHANGELOG.md @@ -1,14 +1,83 @@ # Release History -## 1.0.0-beta.6 (Unreleased) +## 1.0.0 (2024-12-26) -### Features Added +- Azure Resource Manager ConfidentialLedger client library for Java. This package contains Microsoft Azure SDK for ConfidentialLedger Management SDK. Microsoft Azure Confidential Compute Ledger Control Plane REST API version 2020-12-01-preview. Package tag package-2022-05-13. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Breaking Changes -### Bugs Fixed +#### `models.MemberIdentityCertificate` was removed + +#### `models.ManagedCcfRestore` was removed + +#### `models.LanguageRuntime` was removed + +#### `models.ManagedCcf$Update` was removed + +#### `models.ManagedCcfBackup` was removed + +#### `models.ConfidentialLedgerBackup` was removed + +#### `models.ManagedCcf$UpdateStages` was removed + +#### `models.ManagedCcf$Definition` was removed + +#### `models.ManagedCcf$DefinitionStages` was removed + +#### `models.ManagedCcfs` was removed + +#### `models.ConfidentialLedgerBackupResponse` was removed + +#### `models.ManagedCcfRestoreResponse` was removed + +#### `models.ManagedCcfProperties` was removed + +#### `models.ManagedCcfList` was removed + +#### `models.ManagedCcf` was removed + +#### `models.ConfidentialLedgerRestore` was removed + +#### `models.ManagedCcfBackupResponse` was removed + +#### `models.RunningState` was removed + +#### `models.DeploymentType` was removed + +#### `models.ConfidentialLedgerRestoreResponse` was removed + +#### `models.LedgerSku` was removed + +#### `models.LedgerProperties` was modified + +* `runningState()` was removed +* `ledgerSku()` was removed +* `withRunningState(models.RunningState)` was removed +* `withLedgerSku(models.LedgerSku)` was removed + +#### `ConfidentialLedgerManager` was modified + +* `managedCcfs()` was removed + +#### `models.ConfidentialLedger` was modified + +* `backup(models.ConfidentialLedgerBackup)` was removed +* `backup(models.ConfidentialLedgerBackup,com.azure.core.util.Context)` was removed +* `restore(models.ConfidentialLedgerRestore,com.azure.core.util.Context)` was removed +* `restore(models.ConfidentialLedgerRestore)` was removed + +#### `models.Ledgers` was modified + +* `backup(java.lang.String,java.lang.String,models.ConfidentialLedgerBackup,com.azure.core.util.Context)` was removed +* `restore(java.lang.String,java.lang.String,models.ConfidentialLedgerRestore,com.azure.core.util.Context)` was removed +* `backup(java.lang.String,java.lang.String,models.ConfidentialLedgerBackup)` was removed +* `restore(java.lang.String,java.lang.String,models.ConfidentialLedgerRestore)` was removed + +### Features Added + +* `models.ResourceLocation` was added -### Other Changes +* `models.Tags` was added ## 1.0.0-beta.5 (2024-12-04) diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/README.md b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/README.md index 3b998501ae64..bd4804ef6782 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/README.md +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/README.md @@ -2,7 +2,7 @@ Azure Resource Manager ConfidentialLedger client library for Java. -This package contains Microsoft Azure SDK for ConfidentialLedger Management SDK. Microsoft Azure Confidential Compute Ledger Control Plane REST API version 2020-12-01-preview. Package tag package-preview-2023-06. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for ConfidentialLedger Management SDK. Microsoft Azure Confidential Compute Ledger Control Plane REST API version 2020-12-01-preview. Package tag package-2022-05-13. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-confidentialledger - 1.0.0-beta.5 + 1.0.0 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/SAMPLE.md b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/SAMPLE.md index 1bbff4a8970b..7cb8826238fc 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/SAMPLE.md +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/SAMPLE.md @@ -3,26 +3,13 @@ ## Ledger -- [Backup](#ledger_backup) - [Create](#ledger_create) - [Delete](#ledger_delete) - [GetByResourceGroup](#ledger_getbyresourcegroup) - [List](#ledger_list) - [ListByResourceGroup](#ledger_listbyresourcegroup) -- [Restore](#ledger_restore) - [Update](#ledger_update) -## ManagedCcf - -- [Backup](#managedccf_backup) -- [Create](#managedccf_create) -- [Delete](#managedccf_delete) -- [GetByResourceGroup](#managedccf_getbyresourcegroup) -- [List](#managedccf_list) -- [ListByResourceGroup](#managedccf_listbyresourcegroup) -- [Restore](#managedccf_restore) -- [Update](#managedccf_update) - ## Operations - [List](#operations_list) @@ -30,35 +17,6 @@ ## ResourceProvider - [CheckNameAvailability](#resourceprovider_checknameavailability) -### Ledger_Backup - -```java -import com.azure.resourcemanager.confidentialledger.models.ConfidentialLedgerBackup; - -/** - * Samples for Ledger Backup. - */ -public final class LedgerBackupSamples { - /* - * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-06-28-preview/ - * examples/ConfidentialLedger_Backup.json - */ - /** - * Sample code: ConfidentialLedgerBackup. - * - * @param manager Entry point to ConfidentialLedgerManager. - */ - public static void - confidentialLedgerBackup(com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { - manager.ledgers() - .backup("DummyResourceGroupName", "DummyLedgerName", - new ConfidentialLedgerBackup().withRestoreRegion("EastUS").withUri("DummySASUri"), - com.azure.core.util.Context.NONE); - } -} -``` - ### Ledger_Create ```java @@ -66,7 +24,6 @@ import com.azure.resourcemanager.confidentialledger.models.AadBasedSecurityPrinc import com.azure.resourcemanager.confidentialledger.models.CertBasedSecurityPrincipal; import com.azure.resourcemanager.confidentialledger.models.LedgerProperties; import com.azure.resourcemanager.confidentialledger.models.LedgerRoleName; -import com.azure.resourcemanager.confidentialledger.models.LedgerSku; import com.azure.resourcemanager.confidentialledger.models.LedgerType; import java.util.Arrays; import java.util.HashMap; @@ -78,8 +35,8 @@ import java.util.Map; public final class LedgerCreateSamples { /* * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-06-28-preview/ - * examples/ConfidentialLedger_Create.json + * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/stable/2022-05-13/examples/ + * ConfidentialLedger_Create.json */ /** * Sample code: ConfidentialLedgerCreate. @@ -90,11 +47,10 @@ public final class LedgerCreateSamples { confidentialLedgerCreate(com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { manager.ledgers() .define("DummyLedgerName") - .withRegion("EastUS") .withExistingResourceGroup("DummyResourceGroupName") + .withRegion("EastUS") .withTags(mapOf("additionalProps1", "additional properties")) .withProperties(new LedgerProperties().withLedgerType(LedgerType.PUBLIC) - .withLedgerSku(LedgerSku.STANDARD) .withAadBasedSecurityPrincipals(Arrays .asList(new AadBasedSecurityPrincipal().withPrincipalId("34621747-6fc8-4771-a2eb-72f31c461f2e") .withTenantId("bce123b9-2b7b-4975-8360-5ca0b9b1cd08") @@ -128,8 +84,8 @@ public final class LedgerCreateSamples { public final class LedgerDeleteSamples { /* * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-06-28-preview/ - * examples/ConfidentialLedger_Delete.json + * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/stable/2022-05-13/examples/ + * ConfidentialLedger_Delete.json */ /** * Sample code: ConfidentialLedgerDelete. @@ -152,8 +108,8 @@ public final class LedgerDeleteSamples { public final class LedgerGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-06-28-preview/ - * examples/ConfidentialLedger_Get.json + * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/stable/2022-05-13/examples/ + * ConfidentialLedger_Get.json */ /** * Sample code: ConfidentialLedgerGet. @@ -178,8 +134,8 @@ public final class LedgerGetByResourceGroupSamples { public final class LedgerListSamples { /* * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-06-28-preview/ - * examples/ConfidentialLedger_ListBySub.json + * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/stable/2022-05-13/examples/ + * ConfidentialLedger_ListBySub.json */ /** * Sample code: ConfidentialLedgerListBySub. @@ -202,8 +158,8 @@ public final class LedgerListSamples { public final class LedgerListByResourceGroupSamples { /* * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-06-28-preview/ - * examples/ConfidentialLedger_List.json + * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/stable/2022-05-13/examples/ + * ConfidentialLedger_List.json */ /** * Sample code: ConfidentialLedgerList. @@ -217,37 +173,6 @@ public final class LedgerListByResourceGroupSamples { } ``` -### Ledger_Restore - -```java -import com.azure.resourcemanager.confidentialledger.models.ConfidentialLedgerRestore; - -/** - * Samples for Ledger Restore. - */ -public final class LedgerRestoreSamples { - /* - * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-06-28-preview/ - * examples/ConfidentialLedger_Restore.json - */ - /** - * Sample code: ConfidentialLedgerRestore. - * - * @param manager Entry point to ConfidentialLedgerManager. - */ - public static void - confidentialLedgerRestore(com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { - manager.ledgers() - .restore("DummyResourceGroupName", "DummyLedgerName", - new ConfidentialLedgerRestore().withFileShareName("DummyFileShareName") - .withRestoreRegion("EastUS") - .withUri("DummySASUri"), - com.azure.core.util.Context.NONE); - } -} -``` - ### Ledger_Update ```java @@ -267,8 +192,8 @@ import java.util.Map; public final class LedgerUpdateSamples { /* * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-06-28-preview/ - * examples/ConfidentialLedger_Update.json + * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/stable/2022-05-13/examples/ + * ConfidentialLedger_Update.json */ /** * Sample code: ConfidentialLedgerUpdate. @@ -308,278 +233,6 @@ public final class LedgerUpdateSamples { } ``` -### ManagedCcf_Backup - -```java -import com.azure.resourcemanager.confidentialledger.models.ManagedCcfBackup; - -/** - * Samples for ManagedCcf Backup. - */ -public final class ManagedCcfBackupSamples { - /* - * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-06-28-preview/ - * examples/ManagedCCF_Backup.json - */ - /** - * Sample code: ManagedCCFBackup. - * - * @param manager Entry point to ConfidentialLedgerManager. - */ - public static void - managedCCFBackup(com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { - manager.managedCcfs() - .backup("DummyResourceGroupName", "DummyMccfAppName", - new ManagedCcfBackup().withRestoreRegion("EastUS").withUri("DummySASUri"), - com.azure.core.util.Context.NONE); - } -} -``` - -### ManagedCcf_Create - -```java -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.confidentialledger.models.DeploymentType; -import com.azure.resourcemanager.confidentialledger.models.LanguageRuntime; -import com.azure.resourcemanager.confidentialledger.models.ManagedCcfProperties; -import com.azure.resourcemanager.confidentialledger.models.MemberIdentityCertificate; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for ManagedCcf Create. - */ -public final class ManagedCcfCreateSamples { - /* - * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-06-28-preview/ - * examples/ManagedCCF_Create.json - */ - /** - * Sample code: ManagedCCFCreate. - * - * @param manager Entry point to ConfidentialLedgerManager. - */ - public static void managedCCFCreate(com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) - throws IOException { - manager.managedCcfs() - .define("DummyMccfAppName") - .withRegion("EastUS") - .withExistingResourceGroup("DummyResourceGroupName") - .withTags(mapOf("additionalProps1", "additional properties")) - .withProperties(new ManagedCcfProperties() - .withMemberIdentityCertificates(Arrays.asList(new MemberIdentityCertificate().withCertificate( - "-----BEGIN CERTIFICATE-----MIIBsjCCATigAwIBAgIUZWIbyG79TniQLd2UxJuU74tqrKcwCgYIKoZIzj0EAwMwEDEOMAwGA1UEAwwFdXNlcjAwHhcNMjEwMzE2MTgwNjExWhcNMjIwMzE2MTgwNjExWjAQMQ4wDAYDVQQDDAV1c2VyMDB2MBAGByqGSM49AgEGBSuBBAAiA2IABBiWSo/j8EFit7aUMm5lF+lUmCu+IgfnpFD+7QMgLKtxRJ3aGSqgS/GpqcYVGddnODtSarNE/HyGKUFUolLPQ5ybHcouUk0kyfA7XMeSoUA4lBz63Wha8wmXo+NdBRo39qNTMFEwHQYDVR0OBBYEFPtuhrwgGjDFHeUUT4nGsXaZn69KMB8GA1UdIwQYMBaAFPtuhrwgGjDFHeUUT4nGsXaZn69KMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwMDaAAwZQIxAOnozm2CyqRwSSQLls5r+mUHRGRyXHXwYtM4Dcst/VEZdmS9fqvHRCHbjUlO/+HNfgIwMWZ4FmsjD3wnPxONOm9YdVn/PRD7SsPRPbOjwBiE4EBGaHDsLjYAGDSGi7NJnSkA-----END CERTIFICATE-----") - .withEncryptionkey("fakeTokenPlaceholder") - .withTags(SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{\"additionalProps1\":\"additional properties\"}", Object.class, - SerializerEncoding.JSON)))) - .withDeploymentType(new DeploymentType().withLanguageRuntime(LanguageRuntime.CPP) - .withAppSourceUri( - "https://myaccount.blob.core.windows.net/storage/mccfsource?sv=2022-02-11%st=2022-03-11")) - .withNodeCount(5)) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} -``` - -### ManagedCcf_Delete - -```java -/** - * Samples for ManagedCcf Delete. - */ -public final class ManagedCcfDeleteSamples { - /* - * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-06-28-preview/ - * examples/ManagedCCF_Delete.json - */ - /** - * Sample code: ConfidentialLedgerDelete. - * - * @param manager Entry point to ConfidentialLedgerManager. - */ - public static void - confidentialLedgerDelete(com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { - manager.managedCcfs().delete("DummyResourceGroupName", "DummyMccfAppName", com.azure.core.util.Context.NONE); - } -} -``` - -### ManagedCcf_GetByResourceGroup - -```java -/** - * Samples for ManagedCcf GetByResourceGroup. - */ -public final class ManagedCcfGetByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-06-28-preview/ - * examples/ManagedCCF_Get.json - */ - /** - * Sample code: ManagedCCFGet. - * - * @param manager Entry point to ConfidentialLedgerManager. - */ - public static void managedCCFGet(com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { - manager.managedCcfs() - .getByResourceGroupWithResponse("DummyResourceGroupName", "DummyMccfAppName", - com.azure.core.util.Context.NONE); - } -} -``` - -### ManagedCcf_List - -```java -/** - * Samples for ManagedCcf List. - */ -public final class ManagedCcfListSamples { - /* - * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-06-28-preview/ - * examples/ManagedCCF_ListBySub.json - */ - /** - * Sample code: ManagedCCFListBySub. - * - * @param manager Entry point to ConfidentialLedgerManager. - */ - public static void - managedCCFListBySub(com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { - manager.managedCcfs().list(null, com.azure.core.util.Context.NONE); - } -} -``` - -### ManagedCcf_ListByResourceGroup - -```java -/** - * Samples for ManagedCcf ListByResourceGroup. - */ -public final class ManagedCcfListByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-06-28-preview/ - * examples/ManagedCCF_List.json - */ - /** - * Sample code: ManagedCCFList. - * - * @param manager Entry point to ConfidentialLedgerManager. - */ - public static void managedCCFList(com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { - manager.managedCcfs().listByResourceGroup("DummyResourceGroupName", null, com.azure.core.util.Context.NONE); - } -} -``` - -### ManagedCcf_Restore - -```java -import com.azure.resourcemanager.confidentialledger.models.ManagedCcfRestore; - -/** - * Samples for ManagedCcf Restore. - */ -public final class ManagedCcfRestoreSamples { - /* - * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-06-28-preview/ - * examples/ManagedCCF_Restore.json - */ - /** - * Sample code: ManagedCCFRestore. - * - * @param manager Entry point to ConfidentialLedgerManager. - */ - public static void - managedCCFRestore(com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { - manager.managedCcfs() - .restore("DummyResourceGroupName", "DummyMccfAppName", - new ManagedCcfRestore().withFileShareName("DummyFileShareName") - .withRestoreRegion("EastUS") - .withUri("DummySASUri"), - com.azure.core.util.Context.NONE); - } -} -``` - -### ManagedCcf_Update - -```java -import com.azure.resourcemanager.confidentialledger.models.DeploymentType; -import com.azure.resourcemanager.confidentialledger.models.LanguageRuntime; -import com.azure.resourcemanager.confidentialledger.models.ManagedCcf; -import com.azure.resourcemanager.confidentialledger.models.ManagedCcfProperties; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for ManagedCcf Update. - */ -public final class ManagedCcfUpdateSamples { - /* - * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-06-28-preview/ - * examples/ManagedCCF_Update.json - */ - /** - * Sample code: ManagedCCFUpdate. - * - * @param manager Entry point to ConfidentialLedgerManager. - */ - public static void - managedCCFUpdate(com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { - ManagedCcf resource = manager.managedCcfs() - .getByResourceGroupWithResponse("DummyResourceGroupName", "DummyMccfAppName", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withTags(mapOf("additionalProps1", "additional properties")) - .withProperties(new ManagedCcfProperties() - .withDeploymentType(new DeploymentType().withLanguageRuntime(LanguageRuntime.CPP) - .withAppSourceUri( - "https://myaccount.blob.core.windows.net/storage/mccfsource?sv=2022-02-11%st=2022-03-11"))) - .apply(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} -``` - ### Operations_List ```java @@ -589,8 +242,8 @@ public final class ManagedCcfUpdateSamples { public final class OperationsListSamples { /* * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-06-28-preview/ - * examples/Operations_Get.json + * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/stable/2022-05-13/examples/ + * Operations_Get.json */ /** * Sample code: OperationsGet. @@ -614,8 +267,8 @@ import com.azure.resourcemanager.confidentialledger.models.CheckNameAvailability public final class ResourceProviderCheckNameAvailabilitySamples { /* * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-06-28-preview/ - * examples/CheckNameAvailability.json + * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/stable/2022-05-13/examples/ + * CheckNameAvailability.json */ /** * Sample code: CheckNameAvailability. diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/pom.xml b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/pom.xml index 9a6a642084a1..5491796985b6 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/pom.xml +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/pom.xml @@ -14,11 +14,11 @@ com.azure.resourcemanager azure-resourcemanager-confidentialledger - 1.0.0-beta.6 + 1.0.0 jar Microsoft Azure SDK for ConfidentialLedger Management - This package contains Microsoft Azure SDK for ConfidentialLedger Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Microsoft Azure Confidential Compute Ledger Control Plane REST API version 2020-12-01-preview. Package tag package-preview-2023-06. + This package contains Microsoft Azure SDK for ConfidentialLedger Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Microsoft Azure Confidential Compute Ledger Control Plane REST API version 2020-12-01-preview. Package tag package-2022-05-13. https://github.com/Azure/azure-sdk-for-java @@ -45,7 +45,6 @@ UTF-8 0 0 - true false diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/ConfidentialLedgerManager.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/ConfidentialLedgerManager.java index 878786488234..3f098803c32d 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/ConfidentialLedgerManager.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/ConfidentialLedgerManager.java @@ -26,11 +26,9 @@ import com.azure.resourcemanager.confidentialledger.fluent.ConfidentialLedgerManagementClient; import com.azure.resourcemanager.confidentialledger.implementation.ConfidentialLedgerManagementClientBuilder; import com.azure.resourcemanager.confidentialledger.implementation.LedgersImpl; -import com.azure.resourcemanager.confidentialledger.implementation.ManagedCcfsImpl; import com.azure.resourcemanager.confidentialledger.implementation.OperationsImpl; import com.azure.resourcemanager.confidentialledger.implementation.ResourceProvidersImpl; import com.azure.resourcemanager.confidentialledger.models.Ledgers; -import com.azure.resourcemanager.confidentialledger.models.ManagedCcfs; import com.azure.resourcemanager.confidentialledger.models.Operations; import com.azure.resourcemanager.confidentialledger.models.ResourceProviders; import java.time.Duration; @@ -51,8 +49,6 @@ public final class ConfidentialLedgerManager { private Ledgers ledgers; - private ManagedCcfs managedCcfs; - private final ConfidentialLedgerManagementClient clientObject; private ConfidentialLedgerManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { @@ -217,7 +213,7 @@ public ConfidentialLedgerManager authenticate(TokenCredential credential, AzureP .append("-") .append("com.azure.resourcemanager.confidentialledger") .append("/") - .append("1.0.0-beta.5"); + .append("1.0.0"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder.append(" (") .append(Configuration.getGlobalConfiguration().get("java.version")) @@ -299,18 +295,6 @@ public Ledgers ledgers() { return ledgers; } - /** - * Gets the resource collection API of ManagedCcfs. It manages ManagedCcf. - * - * @return Resource collection API of ManagedCcfs. - */ - public ManagedCcfs managedCcfs() { - if (this.managedCcfs == null) { - this.managedCcfs = new ManagedCcfsImpl(clientObject.getManagedCcfs(), this); - } - return managedCcfs; - } - /** * Gets wrapped service client ConfidentialLedgerManagementClient providing direct access to the underlying * auto-generated API implementation, based on Azure REST API. diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/ConfidentialLedgerManagementClient.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/ConfidentialLedgerManagementClient.java index 4bfa02bd49e2..098f53a329dc 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/ConfidentialLedgerManagementClient.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/ConfidentialLedgerManagementClient.java @@ -12,7 +12,7 @@ */ public interface ConfidentialLedgerManagementClient { /** - * Gets The ID of the target subscription. + * Gets The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). * * @return the subscriptionId value. */ @@ -66,11 +66,4 @@ public interface ConfidentialLedgerManagementClient { * @return the LedgersClient object. */ LedgersClient getLedgers(); - - /** - * Gets the ManagedCcfsClient object to access its operations. - * - * @return the ManagedCcfsClient object. - */ - ManagedCcfsClient getManagedCcfs(); } diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/LedgersClient.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/LedgersClient.java index a1900481b154..aef23c8f36eb 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/LedgersClient.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/LedgersClient.java @@ -11,11 +11,7 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.confidentialledger.fluent.models.ConfidentialLedgerBackupResponseInner; import com.azure.resourcemanager.confidentialledger.fluent.models.ConfidentialLedgerInner; -import com.azure.resourcemanager.confidentialledger.fluent.models.ConfidentialLedgerRestoreResponseInner; -import com.azure.resourcemanager.confidentialledger.models.ConfidentialLedgerBackup; -import com.azure.resourcemanager.confidentialledger.models.ConfidentialLedgerRestore; /** * An instance of this class provides access to all the operations defined in LedgersClient. @@ -26,7 +22,7 @@ public interface LedgersClient { * * Retrieves the properties of a Confidential Ledger. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -43,7 +39,7 @@ Response getByResourceGroupWithResponse(String resource * * Retrieves the properties of a Confidential Ledger. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -58,7 +54,7 @@ Response getByResourceGroupWithResponse(String resource * * Deletes an existing Confidential Ledger. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -73,7 +69,7 @@ Response getByResourceGroupWithResponse(String resource * * Deletes an existing Confidential Ledger. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -89,7 +85,7 @@ Response getByResourceGroupWithResponse(String resource * * Deletes an existing Confidential Ledger. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -103,7 +99,7 @@ Response getByResourceGroupWithResponse(String resource * * Deletes an existing Confidential Ledger. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -118,7 +114,7 @@ Response getByResourceGroupWithResponse(String resource * * Creates a Confidential Ledger with the specified ledger parameters. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @param confidentialLedger Confidential Ledger Create Request Body. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -135,7 +131,7 @@ SyncPoller, ConfidentialLedgerInner> beginCr * * Creates a Confidential Ledger with the specified ledger parameters. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @param confidentialLedger Confidential Ledger Create Request Body. * @param context The context to associate with this operation. @@ -153,7 +149,7 @@ SyncPoller, ConfidentialLedgerInner> beginCr * * Creates a Confidential Ledger with the specified ledger parameters. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @param confidentialLedger Confidential Ledger Create Request Body. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -170,7 +166,7 @@ ConfidentialLedgerInner create(String resourceGroupName, String ledgerName, * * Creates a Confidential Ledger with the specified ledger parameters. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @param confidentialLedger Confidential Ledger Create Request Body. * @param context The context to associate with this operation. @@ -188,7 +184,7 @@ ConfidentialLedgerInner create(String resourceGroupName, String ledgerName, * * Updates properties of Confidential Ledger. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @param confidentialLedger Confidential Ledger request body for Updating Ledger. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -205,7 +201,7 @@ SyncPoller, ConfidentialLedgerInner> beginUp * * Updates properties of Confidential Ledger. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @param confidentialLedger Confidential Ledger request body for Updating Ledger. * @param context The context to associate with this operation. @@ -223,7 +219,7 @@ SyncPoller, ConfidentialLedgerInner> beginUp * * Updates properties of Confidential Ledger. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @param confidentialLedger Confidential Ledger request body for Updating Ledger. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -240,7 +236,7 @@ ConfidentialLedgerInner update(String resourceGroupName, String ledgerName, * * Updates properties of Confidential Ledger. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @param confidentialLedger Confidential Ledger request body for Updating Ledger. * @param context The context to associate with this operation. @@ -258,7 +254,7 @@ ConfidentialLedgerInner update(String resourceGroupName, String ledgerName, * * Retrieves the properties of all Confidential Ledgers. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -273,7 +269,7 @@ ConfidentialLedgerInner update(String resourceGroupName, String ledgerName, * * Retrieves the properties of all Confidential Ledgers. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -314,148 +310,4 @@ PagedIterable listByResourceGroup(String resourceGroupN */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String filter, Context context); - - /** - * Performs the backup operation on a Confidential Ledger Resource. - * - * Backs up a Confidential Ledger Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger Backup Request Body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of object representing the backup response of a Confidential Ledger - * Resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ConfidentialLedgerBackupResponseInner> - beginBackup(String resourceGroupName, String ledgerName, ConfidentialLedgerBackup confidentialLedger); - - /** - * Performs the backup operation on a Confidential Ledger Resource. - * - * Backs up a Confidential Ledger Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger Backup Request Body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of object representing the backup response of a Confidential Ledger - * Resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ConfidentialLedgerBackupResponseInner> beginBackup( - String resourceGroupName, String ledgerName, ConfidentialLedgerBackup confidentialLedger, Context context); - - /** - * Performs the backup operation on a Confidential Ledger Resource. - * - * Backs up a Confidential Ledger Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger Backup Request Body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the backup response of a Confidential Ledger Resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ConfidentialLedgerBackupResponseInner backup(String resourceGroupName, String ledgerName, - ConfidentialLedgerBackup confidentialLedger); - - /** - * Performs the backup operation on a Confidential Ledger Resource. - * - * Backs up a Confidential Ledger Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger Backup Request Body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the backup response of a Confidential Ledger Resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ConfidentialLedgerBackupResponseInner backup(String resourceGroupName, String ledgerName, - ConfidentialLedgerBackup confidentialLedger, Context context); - - /** - * Performs the restore operation to spin up a newly restored Confidential Ledger Resource. - * - * Restores a Confidential Ledger Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger Restore Request Body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of object representing the restore response of a Confidential Ledger - * Resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ConfidentialLedgerRestoreResponseInner> - beginRestore(String resourceGroupName, String ledgerName, ConfidentialLedgerRestore confidentialLedger); - - /** - * Performs the restore operation to spin up a newly restored Confidential Ledger Resource. - * - * Restores a Confidential Ledger Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger Restore Request Body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of object representing the restore response of a Confidential Ledger - * Resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ConfidentialLedgerRestoreResponseInner> beginRestore( - String resourceGroupName, String ledgerName, ConfidentialLedgerRestore confidentialLedger, Context context); - - /** - * Performs the restore operation to spin up a newly restored Confidential Ledger Resource. - * - * Restores a Confidential Ledger Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger Restore Request Body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the restore response of a Confidential Ledger Resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ConfidentialLedgerRestoreResponseInner restore(String resourceGroupName, String ledgerName, - ConfidentialLedgerRestore confidentialLedger); - - /** - * Performs the restore operation to spin up a newly restored Confidential Ledger Resource. - * - * Restores a Confidential Ledger Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger Restore Request Body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the restore response of a Confidential Ledger Resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ConfidentialLedgerRestoreResponseInner restore(String resourceGroupName, String ledgerName, - ConfidentialLedgerRestore confidentialLedger, Context context); } diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/ManagedCcfsClient.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/ManagedCcfsClient.java deleted file mode 100644 index 0a65f53a7008..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/ManagedCcfsClient.java +++ /dev/null @@ -1,449 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.confidentialledger.fluent.models.ManagedCcfBackupResponseInner; -import com.azure.resourcemanager.confidentialledger.fluent.models.ManagedCcfInner; -import com.azure.resourcemanager.confidentialledger.fluent.models.ManagedCcfRestoreResponseInner; -import com.azure.resourcemanager.confidentialledger.models.ManagedCcfBackup; -import com.azure.resourcemanager.confidentialledger.models.ManagedCcfRestore; - -/** - * An instance of this class provides access to all the operations defined in ManagedCcfsClient. - */ -public interface ManagedCcfsClient { - /** - * Retrieves information about a Managed CCF resource. - * - * Retrieves the properties of a Managed CCF app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed CCF along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String appName, Context context); - - /** - * Retrieves information about a Managed CCF resource. - * - * Retrieves the properties of a Managed CCF app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed CCF. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedCcfInner getByResourceGroup(String resourceGroupName, String appName); - - /** - * Deletes a Managed CCF resource. - * - * Deletes an existing Managed CCF. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String appName); - - /** - * Deletes a Managed CCF resource. - * - * Deletes an existing Managed CCF. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String appName, Context context); - - /** - * Deletes a Managed CCF resource. - * - * Deletes an existing Managed CCF. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 appName); - - /** - * Deletes a Managed CCF resource. - * - * Deletes an existing Managed CCF. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 appName, Context context); - - /** - * Creates a Managed CCF. - * - * Creates a Managed CCF with the specified Managed CCF parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Managed CCF Create Request Body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of managed CCF. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedCcfInner> beginCreate(String resourceGroupName, String appName, - ManagedCcfInner managedCcf); - - /** - * Creates a Managed CCF. - * - * Creates a Managed CCF with the specified Managed CCF parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Managed CCF Create Request Body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of managed CCF. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedCcfInner> beginCreate(String resourceGroupName, String appName, - ManagedCcfInner managedCcf, Context context); - - /** - * Creates a Managed CCF. - * - * Creates a Managed CCF with the specified Managed CCF parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Managed CCF Create Request Body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed CCF. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedCcfInner create(String resourceGroupName, String appName, ManagedCcfInner managedCcf); - - /** - * Creates a Managed CCF. - * - * Creates a Managed CCF with the specified Managed CCF parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Managed CCF Create Request Body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed CCF. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedCcfInner create(String resourceGroupName, String appName, ManagedCcfInner managedCcf, Context context); - - /** - * Update Managed CCF properties - * - * Updates properties of Managed CCF. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Request body for Updating Managed CCF App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of managed CCF. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedCcfInner> beginUpdate(String resourceGroupName, String appName, - ManagedCcfInner managedCcf); - - /** - * Update Managed CCF properties - * - * Updates properties of Managed CCF. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Request body for Updating Managed CCF App. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of managed CCF. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedCcfInner> beginUpdate(String resourceGroupName, String appName, - ManagedCcfInner managedCcf, Context context); - - /** - * Update Managed CCF properties - * - * Updates properties of Managed CCF. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Request body for Updating Managed CCF App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed CCF. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedCcfInner update(String resourceGroupName, String appName, ManagedCcfInner managedCcf); - - /** - * Update Managed CCF properties - * - * Updates properties of Managed CCF. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Request body for Updating Managed CCF App. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed CCF. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedCcfInner update(String resourceGroupName, String appName, ManagedCcfInner managedCcf, Context context); - - /** - * Retrieves information about all Managed CCF resources under the given subscription and resource group - * - * Retrieves the properties of all Managed CCF apps. - * - * @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 object that includes an array of Managed CCF and a possible link for next set as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Retrieves information about all Managed CCF resources under the given subscription and resource group - * - * Retrieves the properties of all Managed CCF apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object that includes an array of Managed CCF and a possible link for next set as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, String filter, Context context); - - /** - * Retrieves information about all Managed CCF resources under the given subscription - * - * Retrieves the properties of all Managed CCF. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object that includes an array of Managed CCF and a possible link for next set as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Retrieves information about all Managed CCF resources under the given subscription - * - * Retrieves the properties of all Managed CCF. - * - * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object that includes an array of Managed CCF and a possible link for next set as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String filter, Context context); - - /** - * Performs the backup operation on a Managed CCF Resource. - * - * Backs up a Managed CCF Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Managed CCF Backup Request Body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of object representing the backup response of a Managed CCF Resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedCcfBackupResponseInner> - beginBackup(String resourceGroupName, String appName, ManagedCcfBackup managedCcf); - - /** - * Performs the backup operation on a Managed CCF Resource. - * - * Backs up a Managed CCF Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Managed CCF Backup Request Body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of object representing the backup response of a Managed CCF Resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedCcfBackupResponseInner> - beginBackup(String resourceGroupName, String appName, ManagedCcfBackup managedCcf, Context context); - - /** - * Performs the backup operation on a Managed CCF Resource. - * - * Backs up a Managed CCF Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Managed CCF Backup Request Body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the backup response of a Managed CCF Resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedCcfBackupResponseInner backup(String resourceGroupName, String appName, ManagedCcfBackup managedCcf); - - /** - * Performs the backup operation on a Managed CCF Resource. - * - * Backs up a Managed CCF Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Managed CCF Backup Request Body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the backup response of a Managed CCF Resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedCcfBackupResponseInner backup(String resourceGroupName, String appName, ManagedCcfBackup managedCcf, - Context context); - - /** - * Performs the restore operation to spin up a newly restored Managed CCF Resource. - * - * Restores a Managed CCF Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Managed CCF Restore Request Body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of object representing the restore response of a Managed CCF Resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedCcfRestoreResponseInner> - beginRestore(String resourceGroupName, String appName, ManagedCcfRestore managedCcf); - - /** - * Performs the restore operation to spin up a newly restored Managed CCF Resource. - * - * Restores a Managed CCF Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Managed CCF Restore Request Body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of object representing the restore response of a Managed CCF Resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedCcfRestoreResponseInner> - beginRestore(String resourceGroupName, String appName, ManagedCcfRestore managedCcf, Context context); - - /** - * Performs the restore operation to spin up a newly restored Managed CCF Resource. - * - * Restores a Managed CCF Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Managed CCF Restore Request Body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the restore response of a Managed CCF Resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedCcfRestoreResponseInner restore(String resourceGroupName, String appName, ManagedCcfRestore managedCcf); - - /** - * Performs the restore operation to spin up a newly restored Managed CCF Resource. - * - * Restores a Managed CCF Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Managed CCF Restore Request Body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the restore response of a Managed CCF Resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedCcfRestoreResponseInner restore(String resourceGroupName, String appName, ManagedCcfRestore managedCcf, - Context context); -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/ConfidentialLedgerBackupResponseInner.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/ConfidentialLedgerBackupResponseInner.java deleted file mode 100644 index 6f19139e33aa..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/ConfidentialLedgerBackupResponseInner.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Object representing the backup response of a Confidential Ledger Resource. - */ -@Immutable -public final class ConfidentialLedgerBackupResponseInner - implements JsonSerializable { - /* - * Response body stating if the ledger is being backed up. - */ - private String message; - - /** - * Creates an instance of ConfidentialLedgerBackupResponseInner class. - */ - public ConfidentialLedgerBackupResponseInner() { - } - - /** - * Get the message property: Response body stating if the ledger is being backed up. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ConfidentialLedgerBackupResponseInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ConfidentialLedgerBackupResponseInner if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ConfidentialLedgerBackupResponseInner. - */ - public static ConfidentialLedgerBackupResponseInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ConfidentialLedgerBackupResponseInner deserializedConfidentialLedgerBackupResponseInner - = new ConfidentialLedgerBackupResponseInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("message".equals(fieldName)) { - deserializedConfidentialLedgerBackupResponseInner.message = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedConfidentialLedgerBackupResponseInner; - }); - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/ConfidentialLedgerInner.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/ConfidentialLedgerInner.java index b9bff945a29e..a047c1687562 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/ConfidentialLedgerInner.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/ConfidentialLedgerInner.java @@ -5,7 +5,7 @@ package com.azure.resourcemanager.confidentialledger.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; +import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.json.JsonReader; import com.azure.json.JsonToken; @@ -18,17 +18,27 @@ * Confidential Ledger. Contains the properties of Confidential Ledger Resource. */ @Fluent -public final class ConfidentialLedgerInner extends Resource { +public final class ConfidentialLedgerInner extends ProxyResource { /* * Properties of Confidential Ledger Resource. */ private LedgerProperties properties; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Metadata pertaining to creation and last modification of the resource */ private SystemData systemData; + /* + * The Azure location where the Confidential Ledger is running. + */ + private String location; + + /* + * Additional tags for Confidential Ledger + */ + private Map tags; + /* * The type of the resource. */ @@ -71,7 +81,7 @@ public ConfidentialLedgerInner withProperties(LedgerProperties properties) { } /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Get the systemData property: Metadata pertaining to creation and last modification of the resource. * * @return the systemData value. */ @@ -79,6 +89,46 @@ public SystemData systemData() { return this.systemData; } + /** + * Get the location property: The Azure location where the Confidential Ledger is running. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The Azure location where the Confidential Ledger is running. + * + * @param location the location value to set. + * @return the ConfidentialLedgerInner object itself. + */ + public ConfidentialLedgerInner withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the tags property: Additional tags for Confidential Ledger. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Additional tags for Confidential Ledger. + * + * @param tags the tags value to set. + * @return the ConfidentialLedgerInner object itself. + */ + public ConfidentialLedgerInner withTags(Map tags) { + this.tags = tags; + return this; + } + /** * Get the type property: The type of the resource. * @@ -109,24 +159,6 @@ public String id() { return this.id; } - /** - * {@inheritDoc} - */ - @Override - public ConfidentialLedgerInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ConfidentialLedgerInner withTags(Map tags) { - super.withTags(tags); - return this; - } - /** * Validates the instance. * @@ -144,9 +176,9 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeStringField("location", this.location); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } @@ -172,15 +204,15 @@ public static ConfidentialLedgerInner fromJson(JsonReader jsonReader) throws IOE deserializedConfidentialLedgerInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedConfidentialLedgerInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedConfidentialLedgerInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedConfidentialLedgerInner.withTags(tags); } else if ("properties".equals(fieldName)) { deserializedConfidentialLedgerInner.properties = LedgerProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedConfidentialLedgerInner.systemData = SystemData.fromJson(reader); + } else if ("location".equals(fieldName)) { + deserializedConfidentialLedgerInner.location = reader.getString(); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedConfidentialLedgerInner.tags = tags; } else { reader.skipChildren(); } diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/ConfidentialLedgerRestoreResponseInner.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/ConfidentialLedgerRestoreResponseInner.java deleted file mode 100644 index 7b5e99637d5e..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/ConfidentialLedgerRestoreResponseInner.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Object representing the restore response of a Confidential Ledger Resource. - */ -@Immutable -public final class ConfidentialLedgerRestoreResponseInner - implements JsonSerializable { - /* - * Response body stating if the ledger is being restored. - */ - private String message; - - /** - * Creates an instance of ConfidentialLedgerRestoreResponseInner class. - */ - public ConfidentialLedgerRestoreResponseInner() { - } - - /** - * Get the message property: Response body stating if the ledger is being restored. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ConfidentialLedgerRestoreResponseInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ConfidentialLedgerRestoreResponseInner if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ConfidentialLedgerRestoreResponseInner. - */ - public static ConfidentialLedgerRestoreResponseInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ConfidentialLedgerRestoreResponseInner deserializedConfidentialLedgerRestoreResponseInner - = new ConfidentialLedgerRestoreResponseInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("message".equals(fieldName)) { - deserializedConfidentialLedgerRestoreResponseInner.message = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedConfidentialLedgerRestoreResponseInner; - }); - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/ManagedCcfBackupResponseInner.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/ManagedCcfBackupResponseInner.java deleted file mode 100644 index 319840d92641..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/ManagedCcfBackupResponseInner.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Object representing the backup response of a Managed CCF Resource. - */ -@Immutable -public final class ManagedCcfBackupResponseInner implements JsonSerializable { - /* - * Response body stating if the managed CCF resource is being backed up. - */ - private String message; - - /** - * Creates an instance of ManagedCcfBackupResponseInner class. - */ - public ManagedCcfBackupResponseInner() { - } - - /** - * Get the message property: Response body stating if the managed CCF resource is being backed up. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedCcfBackupResponseInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedCcfBackupResponseInner if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ManagedCcfBackupResponseInner. - */ - public static ManagedCcfBackupResponseInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedCcfBackupResponseInner deserializedManagedCcfBackupResponseInner - = new ManagedCcfBackupResponseInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("message".equals(fieldName)) { - deserializedManagedCcfBackupResponseInner.message = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedCcfBackupResponseInner; - }); - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/ManagedCcfInner.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/ManagedCcfInner.java deleted file mode 100644 index 5a7b7ccb4400..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/ManagedCcfInner.java +++ /dev/null @@ -1,192 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.confidentialledger.models.ManagedCcfProperties; -import java.io.IOException; -import java.util.Map; - -/** - * Managed CCF. Contains the properties of Managed CCF Resource. - */ -@Fluent -public final class ManagedCcfInner extends Resource { - /* - * Properties of Managed CCF Resource. - */ - private ManagedCcfProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of ManagedCcfInner class. - */ - public ManagedCcfInner() { - } - - /** - * Get the properties property: Properties of Managed CCF Resource. - * - * @return the properties value. - */ - public ManagedCcfProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Properties of Managed CCF Resource. - * - * @param properties the properties value to set. - * @return the ManagedCcfInner object itself. - */ - public ManagedCcfInner withProperties(ManagedCcfProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedCcfInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedCcfInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedCcfInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedCcfInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ManagedCcfInner. - */ - public static ManagedCcfInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedCcfInner deserializedManagedCcfInner = new ManagedCcfInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedManagedCcfInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedManagedCcfInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedManagedCcfInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedManagedCcfInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedManagedCcfInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedManagedCcfInner.properties = ManagedCcfProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedManagedCcfInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedCcfInner; - }); - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/ManagedCcfRestoreResponseInner.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/ManagedCcfRestoreResponseInner.java deleted file mode 100644 index c7fb5b5ba588..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/ManagedCcfRestoreResponseInner.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Object representing the restore response of a Managed CCF Resource. - */ -@Immutable -public final class ManagedCcfRestoreResponseInner implements JsonSerializable { - /* - * Response body stating if the managed CCF resource is being restored. - */ - private String message; - - /** - * Creates an instance of ManagedCcfRestoreResponseInner class. - */ - public ManagedCcfRestoreResponseInner() { - } - - /** - * Get the message property: Response body stating if the managed CCF resource is being restored. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedCcfRestoreResponseInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedCcfRestoreResponseInner if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ManagedCcfRestoreResponseInner. - */ - public static ManagedCcfRestoreResponseInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedCcfRestoreResponseInner deserializedManagedCcfRestoreResponseInner - = new ManagedCcfRestoreResponseInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("message".equals(fieldName)) { - deserializedManagedCcfRestoreResponseInner.message = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedCcfRestoreResponseInner; - }); - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ConfidentialLedgerBackupResponseImpl.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ConfidentialLedgerBackupResponseImpl.java deleted file mode 100644 index 747cced4c87b..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ConfidentialLedgerBackupResponseImpl.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.implementation; - -import com.azure.resourcemanager.confidentialledger.fluent.models.ConfidentialLedgerBackupResponseInner; -import com.azure.resourcemanager.confidentialledger.models.ConfidentialLedgerBackupResponse; - -public final class ConfidentialLedgerBackupResponseImpl implements ConfidentialLedgerBackupResponse { - private ConfidentialLedgerBackupResponseInner innerObject; - - private final com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager serviceManager; - - ConfidentialLedgerBackupResponseImpl(ConfidentialLedgerBackupResponseInner innerObject, - com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String message() { - return this.innerModel().message(); - } - - public ConfidentialLedgerBackupResponseInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ConfidentialLedgerImpl.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ConfidentialLedgerImpl.java index 969486f13479..93df037fb33a 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ConfidentialLedgerImpl.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ConfidentialLedgerImpl.java @@ -9,10 +9,6 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.confidentialledger.fluent.models.ConfidentialLedgerInner; import com.azure.resourcemanager.confidentialledger.models.ConfidentialLedger; -import com.azure.resourcemanager.confidentialledger.models.ConfidentialLedgerBackup; -import com.azure.resourcemanager.confidentialledger.models.ConfidentialLedgerBackupResponse; -import com.azure.resourcemanager.confidentialledger.models.ConfidentialLedgerRestore; -import com.azure.resourcemanager.confidentialledger.models.ConfidentialLedgerRestoreResponse; import com.azure.resourcemanager.confidentialledger.models.LedgerProperties; import java.util.Collections; import java.util.Map; @@ -35,6 +31,14 @@ public String type() { return this.innerModel().type(); } + public LedgerProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String location() { return this.innerModel().location(); } @@ -48,14 +52,6 @@ public Map tags() { } } - public LedgerProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - public Region region() { return Region.fromName(this.regionName()); } @@ -148,22 +144,6 @@ public ConfidentialLedger refresh(Context context) { return this; } - public ConfidentialLedgerBackupResponse backup(ConfidentialLedgerBackup confidentialLedger) { - return serviceManager.ledgers().backup(resourceGroupName, ledgerName, confidentialLedger); - } - - public ConfidentialLedgerBackupResponse backup(ConfidentialLedgerBackup confidentialLedger, Context context) { - return serviceManager.ledgers().backup(resourceGroupName, ledgerName, confidentialLedger, context); - } - - public ConfidentialLedgerRestoreResponse restore(ConfidentialLedgerRestore confidentialLedger) { - return serviceManager.ledgers().restore(resourceGroupName, ledgerName, confidentialLedger); - } - - public ConfidentialLedgerRestoreResponse restore(ConfidentialLedgerRestore confidentialLedger, Context context) { - return serviceManager.ledgers().restore(resourceGroupName, ledgerName, confidentialLedger, context); - } - public ConfidentialLedgerImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ConfidentialLedgerManagementClientBuilder.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ConfidentialLedgerManagementClientBuilder.java index 3890ed977512..423e782c50cb 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ConfidentialLedgerManagementClientBuilder.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ConfidentialLedgerManagementClientBuilder.java @@ -20,12 +20,12 @@ @ServiceClientBuilder(serviceClients = { ConfidentialLedgerManagementClientImpl.class }) public final class ConfidentialLedgerManagementClientBuilder { /* - * The ID of the target subscription. + * The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) */ private String subscriptionId; /** - * Sets The ID of the target subscription. + * Sets The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). * * @param subscriptionId the subscriptionId value. * @return the ConfidentialLedgerManagementClientBuilder. diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ConfidentialLedgerManagementClientImpl.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ConfidentialLedgerManagementClientImpl.java index e254a75a6758..987ac7148d0c 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ConfidentialLedgerManagementClientImpl.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ConfidentialLedgerManagementClientImpl.java @@ -25,7 +25,6 @@ import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.confidentialledger.fluent.ConfidentialLedgerManagementClient; import com.azure.resourcemanager.confidentialledger.fluent.LedgersClient; -import com.azure.resourcemanager.confidentialledger.fluent.ManagedCcfsClient; import com.azure.resourcemanager.confidentialledger.fluent.OperationsClient; import com.azure.resourcemanager.confidentialledger.fluent.ResourceProvidersClient; import java.io.IOException; @@ -43,12 +42,12 @@ @ServiceClient(builder = ConfidentialLedgerManagementClientBuilder.class) public final class ConfidentialLedgerManagementClientImpl implements ConfidentialLedgerManagementClient { /** - * The ID of the target subscription. + * The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). */ private final String subscriptionId; /** - * Gets The ID of the target subscription. + * Gets The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). * * @return the subscriptionId value. */ @@ -168,20 +167,6 @@ public LedgersClient getLedgers() { return this.ledgers; } - /** - * The ManagedCcfsClient object to access its operations. - */ - private final ManagedCcfsClient managedCcfs; - - /** - * Gets the ManagedCcfsClient object to access its operations. - * - * @return the ManagedCcfsClient object. - */ - public ManagedCcfsClient getManagedCcfs() { - return this.managedCcfs; - } - /** * Initializes an instance of ConfidentialLedgerManagementClient client. * @@ -189,7 +174,8 @@ public ManagedCcfsClient getManagedCcfs() { * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. * @param environment The Azure environment. - * @param subscriptionId The ID of the target subscription. + * @param subscriptionId The Azure subscription ID. This is a GUID-formatted string (e.g. + * 00000000-0000-0000-0000-000000000000). * @param endpoint server parameter. */ ConfidentialLedgerManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, @@ -199,11 +185,10 @@ public ManagedCcfsClient getManagedCcfs() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2023-06-28-preview"; + this.apiVersion = "2022-05-13"; this.operations = new OperationsClientImpl(this); this.resourceProviders = new ResourceProvidersClientImpl(this); this.ledgers = new LedgersClientImpl(this); - this.managedCcfs = new ManagedCcfsClientImpl(this); } /** diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ConfidentialLedgerRestoreResponseImpl.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ConfidentialLedgerRestoreResponseImpl.java deleted file mode 100644 index f6f6989d8f35..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ConfidentialLedgerRestoreResponseImpl.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.implementation; - -import com.azure.resourcemanager.confidentialledger.fluent.models.ConfidentialLedgerRestoreResponseInner; -import com.azure.resourcemanager.confidentialledger.models.ConfidentialLedgerRestoreResponse; - -public final class ConfidentialLedgerRestoreResponseImpl implements ConfidentialLedgerRestoreResponse { - private ConfidentialLedgerRestoreResponseInner innerObject; - - private final com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager serviceManager; - - ConfidentialLedgerRestoreResponseImpl(ConfidentialLedgerRestoreResponseInner innerObject, - com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String message() { - return this.innerModel().message(); - } - - public ConfidentialLedgerRestoreResponseInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/LedgersClientImpl.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/LedgersClientImpl.java index 4c0bc628fe3b..2bc4c9c928af 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/LedgersClientImpl.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/LedgersClientImpl.java @@ -14,7 +14,6 @@ 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; @@ -34,12 +33,8 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.confidentialledger.fluent.LedgersClient; -import com.azure.resourcemanager.confidentialledger.fluent.models.ConfidentialLedgerBackupResponseInner; import com.azure.resourcemanager.confidentialledger.fluent.models.ConfidentialLedgerInner; -import com.azure.resourcemanager.confidentialledger.fluent.models.ConfidentialLedgerRestoreResponseInner; -import com.azure.resourcemanager.confidentialledger.models.ConfidentialLedgerBackup; import com.azure.resourcemanager.confidentialledger.models.ConfidentialLedgerList; -import com.azure.resourcemanager.confidentialledger.models.ConfidentialLedgerRestore; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -130,26 +125,6 @@ Mono> list(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/ledgers/{ledgerName}/backup") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> backup(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ledgerName") String ledgerName, - @BodyParam("application/json") ConfidentialLedgerBackup confidentialLedger, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/ledgers/{ledgerName}/restore") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> restore(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ledgerName") String ledgerName, - @BodyParam("application/json") ConfidentialLedgerRestore confidentialLedger, - @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @@ -172,7 +147,7 @@ Mono> listBySubscriptionNext( * * Retrieves the properties of a Confidential Ledger. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -209,7 +184,7 @@ private Mono> getByResourceGroupWithResponseAs * * Retrieves the properties of a Confidential Ledger. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -246,7 +221,7 @@ private Mono> getByResourceGroupWithResponseAs * * Retrieves the properties of a Confidential Ledger. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -264,7 +239,7 @@ private Mono getByResourceGroupAsync(String resourceGro * * Retrieves the properties of a Confidential Ledger. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -283,7 +258,7 @@ public Response getByResourceGroupWithResponse(String r * * Retrieves the properties of a Confidential Ledger. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -300,7 +275,7 @@ public ConfidentialLedgerInner getByResourceGroup(String resourceGroupName, Stri * * Deletes an existing Confidential Ledger. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -336,7 +311,7 @@ private Mono>> deleteWithResponseAsync(String resource * * Deletes an existing Confidential Ledger. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -373,7 +348,7 @@ private Mono>> deleteWithResponseAsync(String resource * * Deletes an existing Confidential Ledger. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -392,7 +367,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * * Deletes an existing Confidential Ledger. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -414,7 +389,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * * Deletes an existing Confidential Ledger. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -431,7 +406,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * * Deletes an existing Confidential Ledger. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -450,7 +425,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * * Deletes an existing Confidential Ledger. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -467,7 +442,7 @@ private Mono deleteAsync(String resourceGroupName, String ledgerName) { * * Deletes an existing Confidential Ledger. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -486,7 +461,7 @@ private Mono deleteAsync(String resourceGroupName, String ledgerName, Cont * * Deletes an existing Confidential Ledger. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -502,7 +477,7 @@ public void delete(String resourceGroupName, String ledgerName) { * * Deletes an existing Confidential Ledger. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -519,7 +494,7 @@ public void delete(String resourceGroupName, String ledgerName, Context context) * * Creates a Confidential Ledger with the specified ledger parameters. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @param confidentialLedger Confidential Ledger Create Request Body. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -563,7 +538,7 @@ private Mono>> createWithResponseAsync(String resource * * Creates a Confidential Ledger with the specified ledger parameters. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @param confidentialLedger Confidential Ledger Create Request Body. * @param context The context to associate with this operation. @@ -607,7 +582,7 @@ private Mono>> createWithResponseAsync(String resource * * Creates a Confidential Ledger with the specified ledger parameters. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @param confidentialLedger Confidential Ledger Create Request Body. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -630,7 +605,7 @@ private Mono>> createWithResponseAsync(String resource * * Creates a Confidential Ledger with the specified ledger parameters. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @param confidentialLedger Confidential Ledger Create Request Body. * @param context The context to associate with this operation. @@ -654,7 +629,7 @@ private PollerFlux, ConfidentialLedgerInner> * * Creates a Confidential Ledger with the specified ledger parameters. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @param confidentialLedger Confidential Ledger Create Request Body. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -673,7 +648,7 @@ private PollerFlux, ConfidentialLedgerInner> * * Creates a Confidential Ledger with the specified ledger parameters. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @param confidentialLedger Confidential Ledger Create Request Body. * @param context The context to associate with this operation. @@ -693,7 +668,7 @@ public SyncPoller, ConfidentialLedgerInner> * * Creates a Confidential Ledger with the specified ledger parameters. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @param confidentialLedger Confidential Ledger Create Request Body. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -713,7 +688,7 @@ private Mono createAsync(String resourceGroupName, Stri * * Creates a Confidential Ledger with the specified ledger parameters. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @param confidentialLedger Confidential Ledger Create Request Body. * @param context The context to associate with this operation. @@ -734,7 +709,7 @@ private Mono createAsync(String resourceGroupName, Stri * * Creates a Confidential Ledger with the specified ledger parameters. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @param confidentialLedger Confidential Ledger Create Request Body. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -753,7 +728,7 @@ public ConfidentialLedgerInner create(String resourceGroupName, String ledgerNam * * Creates a Confidential Ledger with the specified ledger parameters. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @param confidentialLedger Confidential Ledger Create Request Body. * @param context The context to associate with this operation. @@ -773,7 +748,7 @@ public ConfidentialLedgerInner create(String resourceGroupName, String ledgerNam * * Updates properties of Confidential Ledger. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @param confidentialLedger Confidential Ledger request body for Updating Ledger. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -817,7 +792,7 @@ private Mono>> updateWithResponseAsync(String resource * * Updates properties of Confidential Ledger. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @param confidentialLedger Confidential Ledger request body for Updating Ledger. * @param context The context to associate with this operation. @@ -861,7 +836,7 @@ private Mono>> updateWithResponseAsync(String resource * * Updates properties of Confidential Ledger. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @param confidentialLedger Confidential Ledger request body for Updating Ledger. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -884,7 +859,7 @@ private Mono>> updateWithResponseAsync(String resource * * Updates properties of Confidential Ledger. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @param confidentialLedger Confidential Ledger request body for Updating Ledger. * @param context The context to associate with this operation. @@ -908,7 +883,7 @@ private PollerFlux, ConfidentialLedgerInner> * * Updates properties of Confidential Ledger. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @param confidentialLedger Confidential Ledger request body for Updating Ledger. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -927,7 +902,7 @@ private PollerFlux, ConfidentialLedgerInner> * * Updates properties of Confidential Ledger. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @param confidentialLedger Confidential Ledger request body for Updating Ledger. * @param context The context to associate with this operation. @@ -947,7 +922,7 @@ public SyncPoller, ConfidentialLedgerInner> * * Updates properties of Confidential Ledger. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @param confidentialLedger Confidential Ledger request body for Updating Ledger. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -967,7 +942,7 @@ private Mono updateAsync(String resourceGroupName, Stri * * Updates properties of Confidential Ledger. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @param confidentialLedger Confidential Ledger request body for Updating Ledger. * @param context The context to associate with this operation. @@ -988,7 +963,7 @@ private Mono updateAsync(String resourceGroupName, Stri * * Updates properties of Confidential Ledger. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @param confidentialLedger Confidential Ledger request body for Updating Ledger. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1007,7 +982,7 @@ public ConfidentialLedgerInner update(String resourceGroupName, String ledgerNam * * Updates properties of Confidential Ledger. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @param confidentialLedger Confidential Ledger request body for Updating Ledger. * @param context The context to associate with this operation. @@ -1027,7 +1002,7 @@ public ConfidentialLedgerInner update(String resourceGroupName, String ledgerNam * * Retrieves the properties of all Confidential Ledgers. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1064,7 +1039,7 @@ private Mono> listByResourceGroupSinglePa * * Retrieves the properties of all Confidential Ledgers. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1102,7 +1077,7 @@ private Mono> listByResourceGroupSinglePa * * Retrieves the properties of all Confidential Ledgers. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1121,7 +1096,7 @@ private PagedFlux listByResourceGroupAsync(String resou * * Retrieves the properties of all Confidential Ledgers. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1140,7 +1115,7 @@ private PagedFlux listByResourceGroupAsync(String resou * * Retrieves the properties of all Confidential Ledgers. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1161,7 +1136,7 @@ private PagedFlux listByResourceGroupAsync(String resou * * Retrieves the properties of all Confidential Ledgers. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1179,7 +1154,7 @@ public PagedIterable listByResourceGroup(String resourc * * Retrieves the properties of all Confidential Ledgers. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1345,536 +1320,6 @@ public PagedIterable list(String filter, Context contex return new PagedIterable<>(listAsync(filter, context)); } - /** - * Performs the backup operation on a Confidential Ledger Resource. - * - * Backs up a Confidential Ledger Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger Backup Request Body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the backup response of a Confidential Ledger Resource along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> backupWithResponseAsync(String resourceGroupName, String ledgerName, - ConfidentialLedgerBackup confidentialLedger) { - 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 (ledgerName == null) { - return Mono.error(new IllegalArgumentException("Parameter ledgerName is required and cannot be null.")); - } - if (confidentialLedger == null) { - return Mono - .error(new IllegalArgumentException("Parameter confidentialLedger is required and cannot be null.")); - } else { - confidentialLedger.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.backup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, ledgerName, confidentialLedger, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Performs the backup operation on a Confidential Ledger Resource. - * - * Backs up a Confidential Ledger Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger Backup Request Body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the backup response of a Confidential Ledger Resource along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> backupWithResponseAsync(String resourceGroupName, String ledgerName, - ConfidentialLedgerBackup confidentialLedger, 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 (ledgerName == null) { - return Mono.error(new IllegalArgumentException("Parameter ledgerName is required and cannot be null.")); - } - if (confidentialLedger == null) { - return Mono - .error(new IllegalArgumentException("Parameter confidentialLedger is required and cannot be null.")); - } else { - confidentialLedger.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.backup(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, ledgerName, confidentialLedger, accept, context); - } - - /** - * Performs the backup operation on a Confidential Ledger Resource. - * - * Backs up a Confidential Ledger Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger Backup Request Body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of object representing the backup response of a Confidential Ledger - * Resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ConfidentialLedgerBackupResponseInner> - beginBackupAsync(String resourceGroupName, String ledgerName, ConfidentialLedgerBackup confidentialLedger) { - Mono>> mono - = backupWithResponseAsync(resourceGroupName, ledgerName, confidentialLedger); - return this.client.getLroResult( - mono, this.client.getHttpPipeline(), ConfidentialLedgerBackupResponseInner.class, - ConfidentialLedgerBackupResponseInner.class, this.client.getContext()); - } - - /** - * Performs the backup operation on a Confidential Ledger Resource. - * - * Backs up a Confidential Ledger Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger Backup Request Body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of object representing the backup response of a Confidential Ledger - * Resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ConfidentialLedgerBackupResponseInner> - beginBackupAsync(String resourceGroupName, String ledgerName, ConfidentialLedgerBackup confidentialLedger, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = backupWithResponseAsync(resourceGroupName, ledgerName, confidentialLedger, context); - return this.client.getLroResult( - mono, this.client.getHttpPipeline(), ConfidentialLedgerBackupResponseInner.class, - ConfidentialLedgerBackupResponseInner.class, context); - } - - /** - * Performs the backup operation on a Confidential Ledger Resource. - * - * Backs up a Confidential Ledger Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger Backup Request Body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of object representing the backup response of a Confidential Ledger - * Resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ConfidentialLedgerBackupResponseInner> - beginBackup(String resourceGroupName, String ledgerName, ConfidentialLedgerBackup confidentialLedger) { - return this.beginBackupAsync(resourceGroupName, ledgerName, confidentialLedger).getSyncPoller(); - } - - /** - * Performs the backup operation on a Confidential Ledger Resource. - * - * Backs up a Confidential Ledger Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger Backup Request Body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of object representing the backup response of a Confidential Ledger - * Resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ConfidentialLedgerBackupResponseInner> - beginBackup(String resourceGroupName, String ledgerName, ConfidentialLedgerBackup confidentialLedger, - Context context) { - return this.beginBackupAsync(resourceGroupName, ledgerName, confidentialLedger, context).getSyncPoller(); - } - - /** - * Performs the backup operation on a Confidential Ledger Resource. - * - * Backs up a Confidential Ledger Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger Backup Request Body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the backup response of a Confidential Ledger Resource on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono backupAsync(String resourceGroupName, String ledgerName, - ConfidentialLedgerBackup confidentialLedger) { - return beginBackupAsync(resourceGroupName, ledgerName, confidentialLedger).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Performs the backup operation on a Confidential Ledger Resource. - * - * Backs up a Confidential Ledger Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger Backup Request Body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the backup response of a Confidential Ledger Resource on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono backupAsync(String resourceGroupName, String ledgerName, - ConfidentialLedgerBackup confidentialLedger, Context context) { - return beginBackupAsync(resourceGroupName, ledgerName, confidentialLedger, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Performs the backup operation on a Confidential Ledger Resource. - * - * Backs up a Confidential Ledger Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger Backup Request Body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the backup response of a Confidential Ledger Resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ConfidentialLedgerBackupResponseInner backup(String resourceGroupName, String ledgerName, - ConfidentialLedgerBackup confidentialLedger) { - return backupAsync(resourceGroupName, ledgerName, confidentialLedger).block(); - } - - /** - * Performs the backup operation on a Confidential Ledger Resource. - * - * Backs up a Confidential Ledger Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger Backup Request Body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the backup response of a Confidential Ledger Resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ConfidentialLedgerBackupResponseInner backup(String resourceGroupName, String ledgerName, - ConfidentialLedgerBackup confidentialLedger, Context context) { - return backupAsync(resourceGroupName, ledgerName, confidentialLedger, context).block(); - } - - /** - * Performs the restore operation to spin up a newly restored Confidential Ledger Resource. - * - * Restores a Confidential Ledger Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger Restore Request Body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the restore response of a Confidential Ledger Resource along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> restoreWithResponseAsync(String resourceGroupName, String ledgerName, - ConfidentialLedgerRestore confidentialLedger) { - 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 (ledgerName == null) { - return Mono.error(new IllegalArgumentException("Parameter ledgerName is required and cannot be null.")); - } - if (confidentialLedger == null) { - return Mono - .error(new IllegalArgumentException("Parameter confidentialLedger is required and cannot be null.")); - } else { - confidentialLedger.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.restore(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, ledgerName, confidentialLedger, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Performs the restore operation to spin up a newly restored Confidential Ledger Resource. - * - * Restores a Confidential Ledger Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger Restore Request Body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the restore response of a Confidential Ledger Resource along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> restoreWithResponseAsync(String resourceGroupName, String ledgerName, - ConfidentialLedgerRestore confidentialLedger, 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 (ledgerName == null) { - return Mono.error(new IllegalArgumentException("Parameter ledgerName is required and cannot be null.")); - } - if (confidentialLedger == null) { - return Mono - .error(new IllegalArgumentException("Parameter confidentialLedger is required and cannot be null.")); - } else { - confidentialLedger.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.restore(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, ledgerName, confidentialLedger, accept, context); - } - - /** - * Performs the restore operation to spin up a newly restored Confidential Ledger Resource. - * - * Restores a Confidential Ledger Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger Restore Request Body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of object representing the restore response of a Confidential Ledger - * Resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ConfidentialLedgerRestoreResponseInner> - beginRestoreAsync(String resourceGroupName, String ledgerName, ConfidentialLedgerRestore confidentialLedger) { - Mono>> mono - = restoreWithResponseAsync(resourceGroupName, ledgerName, confidentialLedger); - return this.client.getLroResult( - mono, this.client.getHttpPipeline(), ConfidentialLedgerRestoreResponseInner.class, - ConfidentialLedgerRestoreResponseInner.class, this.client.getContext()); - } - - /** - * Performs the restore operation to spin up a newly restored Confidential Ledger Resource. - * - * Restores a Confidential Ledger Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger Restore Request Body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of object representing the restore response of a Confidential Ledger - * Resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ConfidentialLedgerRestoreResponseInner> - beginRestoreAsync(String resourceGroupName, String ledgerName, ConfidentialLedgerRestore confidentialLedger, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = restoreWithResponseAsync(resourceGroupName, ledgerName, confidentialLedger, context); - return this.client.getLroResult( - mono, this.client.getHttpPipeline(), ConfidentialLedgerRestoreResponseInner.class, - ConfidentialLedgerRestoreResponseInner.class, context); - } - - /** - * Performs the restore operation to spin up a newly restored Confidential Ledger Resource. - * - * Restores a Confidential Ledger Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger Restore Request Body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of object representing the restore response of a Confidential Ledger - * Resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ConfidentialLedgerRestoreResponseInner> - beginRestore(String resourceGroupName, String ledgerName, ConfidentialLedgerRestore confidentialLedger) { - return this.beginRestoreAsync(resourceGroupName, ledgerName, confidentialLedger).getSyncPoller(); - } - - /** - * Performs the restore operation to spin up a newly restored Confidential Ledger Resource. - * - * Restores a Confidential Ledger Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger Restore Request Body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of object representing the restore response of a Confidential Ledger - * Resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ConfidentialLedgerRestoreResponseInner> - beginRestore(String resourceGroupName, String ledgerName, ConfidentialLedgerRestore confidentialLedger, - Context context) { - return this.beginRestoreAsync(resourceGroupName, ledgerName, confidentialLedger, context).getSyncPoller(); - } - - /** - * Performs the restore operation to spin up a newly restored Confidential Ledger Resource. - * - * Restores a Confidential Ledger Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger Restore Request Body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the restore response of a Confidential Ledger Resource on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono restoreAsync(String resourceGroupName, String ledgerName, - ConfidentialLedgerRestore confidentialLedger) { - return beginRestoreAsync(resourceGroupName, ledgerName, confidentialLedger).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Performs the restore operation to spin up a newly restored Confidential Ledger Resource. - * - * Restores a Confidential Ledger Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger Restore Request Body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the restore response of a Confidential Ledger Resource on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono restoreAsync(String resourceGroupName, String ledgerName, - ConfidentialLedgerRestore confidentialLedger, Context context) { - return beginRestoreAsync(resourceGroupName, ledgerName, confidentialLedger, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Performs the restore operation to spin up a newly restored Confidential Ledger Resource. - * - * Restores a Confidential Ledger Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger Restore Request Body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the restore response of a Confidential Ledger Resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ConfidentialLedgerRestoreResponseInner restore(String resourceGroupName, String ledgerName, - ConfidentialLedgerRestore confidentialLedger) { - return restoreAsync(resourceGroupName, ledgerName, confidentialLedger).block(); - } - - /** - * Performs the restore operation to spin up a newly restored Confidential Ledger Resource. - * - * Restores a Confidential Ledger Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger Restore Request Body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the restore response of a Confidential Ledger Resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ConfidentialLedgerRestoreResponseInner restore(String resourceGroupName, String ledgerName, - ConfidentialLedgerRestore confidentialLedger, Context context) { - return restoreAsync(resourceGroupName, ledgerName, confidentialLedger, context).block(); - } - /** * Get the next page of items. * diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/LedgersImpl.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/LedgersImpl.java index 1ccd164b8026..c1fd74b71707 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/LedgersImpl.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/LedgersImpl.java @@ -10,14 +10,8 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.confidentialledger.fluent.LedgersClient; -import com.azure.resourcemanager.confidentialledger.fluent.models.ConfidentialLedgerBackupResponseInner; import com.azure.resourcemanager.confidentialledger.fluent.models.ConfidentialLedgerInner; -import com.azure.resourcemanager.confidentialledger.fluent.models.ConfidentialLedgerRestoreResponseInner; import com.azure.resourcemanager.confidentialledger.models.ConfidentialLedger; -import com.azure.resourcemanager.confidentialledger.models.ConfidentialLedgerBackup; -import com.azure.resourcemanager.confidentialledger.models.ConfidentialLedgerBackupResponse; -import com.azure.resourcemanager.confidentialledger.models.ConfidentialLedgerRestore; -import com.azure.resourcemanager.confidentialledger.models.ConfidentialLedgerRestoreResponse; import com.azure.resourcemanager.confidentialledger.models.Ledgers; public final class LedgersImpl implements Ledgers { @@ -84,50 +78,6 @@ public PagedIterable list(String filter, Context context) { return ResourceManagerUtils.mapPage(inner, inner1 -> new ConfidentialLedgerImpl(inner1, this.manager())); } - public ConfidentialLedgerBackupResponse backup(String resourceGroupName, String ledgerName, - ConfidentialLedgerBackup confidentialLedger) { - ConfidentialLedgerBackupResponseInner inner - = this.serviceClient().backup(resourceGroupName, ledgerName, confidentialLedger); - if (inner != null) { - return new ConfidentialLedgerBackupResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public ConfidentialLedgerBackupResponse backup(String resourceGroupName, String ledgerName, - ConfidentialLedgerBackup confidentialLedger, Context context) { - ConfidentialLedgerBackupResponseInner inner - = this.serviceClient().backup(resourceGroupName, ledgerName, confidentialLedger, context); - if (inner != null) { - return new ConfidentialLedgerBackupResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public ConfidentialLedgerRestoreResponse restore(String resourceGroupName, String ledgerName, - ConfidentialLedgerRestore confidentialLedger) { - ConfidentialLedgerRestoreResponseInner inner - = this.serviceClient().restore(resourceGroupName, ledgerName, confidentialLedger); - if (inner != null) { - return new ConfidentialLedgerRestoreResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public ConfidentialLedgerRestoreResponse restore(String resourceGroupName, String ledgerName, - ConfidentialLedgerRestore confidentialLedger, Context context) { - ConfidentialLedgerRestoreResponseInner inner - = this.serviceClient().restore(resourceGroupName, ledgerName, confidentialLedger, context); - if (inner != null) { - return new ConfidentialLedgerRestoreResponseImpl(inner, this.manager()); - } else { - return null; - } - } - public ConfidentialLedger getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ManagedCcfBackupResponseImpl.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ManagedCcfBackupResponseImpl.java deleted file mode 100644 index 813496a8e0a3..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ManagedCcfBackupResponseImpl.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.implementation; - -import com.azure.resourcemanager.confidentialledger.fluent.models.ManagedCcfBackupResponseInner; -import com.azure.resourcemanager.confidentialledger.models.ManagedCcfBackupResponse; - -public final class ManagedCcfBackupResponseImpl implements ManagedCcfBackupResponse { - private ManagedCcfBackupResponseInner innerObject; - - private final com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager serviceManager; - - ManagedCcfBackupResponseImpl(ManagedCcfBackupResponseInner innerObject, - com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String message() { - return this.innerModel().message(); - } - - public ManagedCcfBackupResponseInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ManagedCcfImpl.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ManagedCcfImpl.java deleted file mode 100644 index 59312c523ab6..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ManagedCcfImpl.java +++ /dev/null @@ -1,184 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.implementation; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.confidentialledger.fluent.models.ManagedCcfInner; -import com.azure.resourcemanager.confidentialledger.models.ManagedCcf; -import com.azure.resourcemanager.confidentialledger.models.ManagedCcfBackup; -import com.azure.resourcemanager.confidentialledger.models.ManagedCcfBackupResponse; -import com.azure.resourcemanager.confidentialledger.models.ManagedCcfProperties; -import com.azure.resourcemanager.confidentialledger.models.ManagedCcfRestore; -import com.azure.resourcemanager.confidentialledger.models.ManagedCcfRestoreResponse; -import java.util.Collections; -import java.util.Map; - -public final class ManagedCcfImpl implements ManagedCcf, ManagedCcf.Definition, ManagedCcf.Update { - private ManagedCcfInner innerObject; - - private final com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager 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 ManagedCcfProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public ManagedCcfInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String appName; - - public ManagedCcfImpl withExistingResourceGroup(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - public ManagedCcf create() { - this.innerObject = serviceManager.serviceClient() - .getManagedCcfs() - .create(resourceGroupName, appName, this.innerModel(), Context.NONE); - return this; - } - - public ManagedCcf create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getManagedCcfs() - .create(resourceGroupName, appName, this.innerModel(), context); - return this; - } - - ManagedCcfImpl(String name, com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager serviceManager) { - this.innerObject = new ManagedCcfInner(); - this.serviceManager = serviceManager; - this.appName = name; - } - - public ManagedCcfImpl update() { - return this; - } - - public ManagedCcf apply() { - this.innerObject = serviceManager.serviceClient() - .getManagedCcfs() - .update(resourceGroupName, appName, this.innerModel(), Context.NONE); - return this; - } - - public ManagedCcf apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getManagedCcfs() - .update(resourceGroupName, appName, this.innerModel(), context); - return this; - } - - ManagedCcfImpl(ManagedCcfInner innerObject, - com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.appName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "managedCCFs"); - } - - public ManagedCcf refresh() { - this.innerObject = serviceManager.serviceClient() - .getManagedCcfs() - .getByResourceGroupWithResponse(resourceGroupName, appName, Context.NONE) - .getValue(); - return this; - } - - public ManagedCcf refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getManagedCcfs() - .getByResourceGroupWithResponse(resourceGroupName, appName, context) - .getValue(); - return this; - } - - public ManagedCcfBackupResponse backup(ManagedCcfBackup managedCcf) { - return serviceManager.managedCcfs().backup(resourceGroupName, appName, managedCcf); - } - - public ManagedCcfBackupResponse backup(ManagedCcfBackup managedCcf, Context context) { - return serviceManager.managedCcfs().backup(resourceGroupName, appName, managedCcf, context); - } - - public ManagedCcfRestoreResponse restore(ManagedCcfRestore managedCcf) { - return serviceManager.managedCcfs().restore(resourceGroupName, appName, managedCcf); - } - - public ManagedCcfRestoreResponse restore(ManagedCcfRestore managedCcf, Context context) { - return serviceManager.managedCcfs().restore(resourceGroupName, appName, managedCcf, context); - } - - public ManagedCcfImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public ManagedCcfImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public ManagedCcfImpl withTags(Map tags) { - this.innerModel().withTags(tags); - return this; - } - - public ManagedCcfImpl withProperties(ManagedCcfProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ManagedCcfRestoreResponseImpl.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ManagedCcfRestoreResponseImpl.java deleted file mode 100644 index 8414175f7591..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ManagedCcfRestoreResponseImpl.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.implementation; - -import com.azure.resourcemanager.confidentialledger.fluent.models.ManagedCcfRestoreResponseInner; -import com.azure.resourcemanager.confidentialledger.models.ManagedCcfRestoreResponse; - -public final class ManagedCcfRestoreResponseImpl implements ManagedCcfRestoreResponse { - private ManagedCcfRestoreResponseInner innerObject; - - private final com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager serviceManager; - - ManagedCcfRestoreResponseImpl(ManagedCcfRestoreResponseInner innerObject, - com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String message() { - return this.innerModel().message(); - } - - public ManagedCcfRestoreResponseInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ManagedCcfsClientImpl.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ManagedCcfsClientImpl.java deleted file mode 100644 index 0c944af0fc8c..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ManagedCcfsClientImpl.java +++ /dev/null @@ -1,1958 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.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.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.confidentialledger.fluent.ManagedCcfsClient; -import com.azure.resourcemanager.confidentialledger.fluent.models.ManagedCcfBackupResponseInner; -import com.azure.resourcemanager.confidentialledger.fluent.models.ManagedCcfInner; -import com.azure.resourcemanager.confidentialledger.fluent.models.ManagedCcfRestoreResponseInner; -import com.azure.resourcemanager.confidentialledger.models.ManagedCcfBackup; -import com.azure.resourcemanager.confidentialledger.models.ManagedCcfList; -import com.azure.resourcemanager.confidentialledger.models.ManagedCcfRestore; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ManagedCcfsClient. - */ -public final class ManagedCcfsClientImpl implements ManagedCcfsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ManagedCcfsService service; - - /** - * The service client containing this operation class. - */ - private final ConfidentialLedgerManagementClientImpl client; - - /** - * Initializes an instance of ManagedCcfsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ManagedCcfsClientImpl(ConfidentialLedgerManagementClientImpl client) { - this.service - = RestProxy.create(ManagedCcfsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ConfidentialLedgerManagementClientManagedCcfs to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ConfidentialLedgerMa") - public interface ManagedCcfsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/managedCCFs/{appName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("appName") String appName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/managedCCFs/{appName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("appName") String appName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/managedCCFs/{appName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("appName") String appName, - @BodyParam("application/json") ManagedCcfInner managedCcf, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/managedCCFs/{appName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("appName") String appName, - @BodyParam("application/json") ManagedCcfInner managedCcf, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/managedCCFs") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$filter") String filter, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ConfidentialLedger/managedCCFs/") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/managedCCFs/{appName}/backup") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> backup(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("appName") String appName, - @BodyParam("application/json") ManagedCcfBackup managedCcf, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/managedCCFs/{appName}/restore") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> restore(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("appName") String appName, - @BodyParam("application/json") ManagedCcfRestore managedCcf, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Retrieves information about a Managed CCF resource. - * - * Retrieves the properties of a Managed CCF app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed CCF along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String appName) { - 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 (appName == null) { - return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, appName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Retrieves information about a Managed CCF resource. - * - * Retrieves the properties of a Managed CCF app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed CCF along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String appName, 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 (appName == null) { - return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, appName, accept, context); - } - - /** - * Retrieves information about a Managed CCF resource. - * - * Retrieves the properties of a Managed CCF app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed CCF on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String appName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, appName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Retrieves information about a Managed CCF resource. - * - * Retrieves the properties of a Managed CCF app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed CCF along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String appName, - Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, appName, context).block(); - } - - /** - * Retrieves information about a Managed CCF resource. - * - * Retrieves the properties of a Managed CCF app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed CCF. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedCcfInner getByResourceGroup(String resourceGroupName, String appName) { - return getByResourceGroupWithResponse(resourceGroupName, appName, Context.NONE).getValue(); - } - - /** - * Deletes a Managed CCF resource. - * - * Deletes an existing Managed CCF. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 appName) { - 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 (appName == null) { - return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, appName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a Managed CCF resource. - * - * Deletes an existing Managed CCF. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 appName, - 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 (appName == null) { - return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, appName, accept, context); - } - - /** - * Deletes a Managed CCF resource. - * - * Deletes an existing Managed CCF. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String appName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, appName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes a Managed CCF resource. - * - * Deletes an existing Managed CCF. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String appName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, appName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes a Managed CCF resource. - * - * Deletes an existing Managed CCF. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String appName) { - return this.beginDeleteAsync(resourceGroupName, appName).getSyncPoller(); - } - - /** - * Deletes a Managed CCF resource. - * - * Deletes an existing Managed CCF. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String appName, Context context) { - return this.beginDeleteAsync(resourceGroupName, appName, context).getSyncPoller(); - } - - /** - * Deletes a Managed CCF resource. - * - * Deletes an existing Managed CCF. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 appName) { - return beginDeleteAsync(resourceGroupName, appName).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a Managed CCF resource. - * - * Deletes an existing Managed CCF. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 appName, Context context) { - return beginDeleteAsync(resourceGroupName, appName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a Managed CCF resource. - * - * Deletes an existing Managed CCF. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 appName) { - deleteAsync(resourceGroupName, appName).block(); - } - - /** - * Deletes a Managed CCF resource. - * - * Deletes an existing Managed CCF. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 appName, Context context) { - deleteAsync(resourceGroupName, appName, context).block(); - } - - /** - * Creates a Managed CCF. - * - * Creates a Managed CCF with the specified Managed CCF parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Managed CCF Create Request Body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed CCF along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String appName, - ManagedCcfInner managedCcf) { - 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 (appName == null) { - return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); - } - if (managedCcf == null) { - return Mono.error(new IllegalArgumentException("Parameter managedCcf is required and cannot be null.")); - } else { - managedCcf.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, appName, managedCcf, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates a Managed CCF. - * - * Creates a Managed CCF with the specified Managed CCF parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Managed CCF Create Request Body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed CCF along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String appName, - ManagedCcfInner managedCcf, 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 (appName == null) { - return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); - } - if (managedCcf == null) { - return Mono.error(new IllegalArgumentException("Parameter managedCcf is required and cannot be null.")); - } else { - managedCcf.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, appName, managedCcf, accept, context); - } - - /** - * Creates a Managed CCF. - * - * Creates a Managed CCF with the specified Managed CCF parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Managed CCF Create Request Body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of managed CCF. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ManagedCcfInner> beginCreateAsync(String resourceGroupName, - String appName, ManagedCcfInner managedCcf) { - Mono>> mono = createWithResponseAsync(resourceGroupName, appName, managedCcf); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ManagedCcfInner.class, ManagedCcfInner.class, this.client.getContext()); - } - - /** - * Creates a Managed CCF. - * - * Creates a Managed CCF with the specified Managed CCF parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Managed CCF Create Request Body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of managed CCF. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ManagedCcfInner> beginCreateAsync(String resourceGroupName, - String appName, ManagedCcfInner managedCcf, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, appName, managedCcf, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ManagedCcfInner.class, ManagedCcfInner.class, context); - } - - /** - * Creates a Managed CCF. - * - * Creates a Managed CCF with the specified Managed CCF parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Managed CCF Create Request Body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of managed CCF. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedCcfInner> beginCreate(String resourceGroupName, - String appName, ManagedCcfInner managedCcf) { - return this.beginCreateAsync(resourceGroupName, appName, managedCcf).getSyncPoller(); - } - - /** - * Creates a Managed CCF. - * - * Creates a Managed CCF with the specified Managed CCF parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Managed CCF Create Request Body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of managed CCF. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedCcfInner> beginCreate(String resourceGroupName, - String appName, ManagedCcfInner managedCcf, Context context) { - return this.beginCreateAsync(resourceGroupName, appName, managedCcf, context).getSyncPoller(); - } - - /** - * Creates a Managed CCF. - * - * Creates a Managed CCF with the specified Managed CCF parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Managed CCF Create Request Body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed CCF on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String appName, ManagedCcfInner managedCcf) { - return beginCreateAsync(resourceGroupName, appName, managedCcf).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates a Managed CCF. - * - * Creates a Managed CCF with the specified Managed CCF parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Managed CCF Create Request Body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed CCF on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String appName, ManagedCcfInner managedCcf, - Context context) { - return beginCreateAsync(resourceGroupName, appName, managedCcf, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates a Managed CCF. - * - * Creates a Managed CCF with the specified Managed CCF parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Managed CCF Create Request Body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed CCF. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedCcfInner create(String resourceGroupName, String appName, ManagedCcfInner managedCcf) { - return createAsync(resourceGroupName, appName, managedCcf).block(); - } - - /** - * Creates a Managed CCF. - * - * Creates a Managed CCF with the specified Managed CCF parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Managed CCF Create Request Body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed CCF. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedCcfInner create(String resourceGroupName, String appName, ManagedCcfInner managedCcf, - Context context) { - return createAsync(resourceGroupName, appName, managedCcf, context).block(); - } - - /** - * Update Managed CCF properties - * - * Updates properties of Managed CCF. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Request body for Updating Managed CCF App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed CCF along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String appName, - ManagedCcfInner managedCcf) { - 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 (appName == null) { - return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); - } - if (managedCcf == null) { - return Mono.error(new IllegalArgumentException("Parameter managedCcf is required and cannot be null.")); - } else { - managedCcf.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, appName, managedCcf, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update Managed CCF properties - * - * Updates properties of Managed CCF. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Request body for Updating Managed CCF App. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed CCF along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String appName, - ManagedCcfInner managedCcf, 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 (appName == null) { - return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); - } - if (managedCcf == null) { - return Mono.error(new IllegalArgumentException("Parameter managedCcf is required and cannot be null.")); - } else { - managedCcf.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, appName, managedCcf, accept, context); - } - - /** - * Update Managed CCF properties - * - * Updates properties of Managed CCF. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Request body for Updating Managed CCF App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of managed CCF. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ManagedCcfInner> beginUpdateAsync(String resourceGroupName, - String appName, ManagedCcfInner managedCcf) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, appName, managedCcf); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ManagedCcfInner.class, ManagedCcfInner.class, this.client.getContext()); - } - - /** - * Update Managed CCF properties - * - * Updates properties of Managed CCF. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Request body for Updating Managed CCF App. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of managed CCF. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ManagedCcfInner> beginUpdateAsync(String resourceGroupName, - String appName, ManagedCcfInner managedCcf, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, appName, managedCcf, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ManagedCcfInner.class, ManagedCcfInner.class, context); - } - - /** - * Update Managed CCF properties - * - * Updates properties of Managed CCF. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Request body for Updating Managed CCF App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of managed CCF. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedCcfInner> beginUpdate(String resourceGroupName, - String appName, ManagedCcfInner managedCcf) { - return this.beginUpdateAsync(resourceGroupName, appName, managedCcf).getSyncPoller(); - } - - /** - * Update Managed CCF properties - * - * Updates properties of Managed CCF. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Request body for Updating Managed CCF App. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of managed CCF. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedCcfInner> beginUpdate(String resourceGroupName, - String appName, ManagedCcfInner managedCcf, Context context) { - return this.beginUpdateAsync(resourceGroupName, appName, managedCcf, context).getSyncPoller(); - } - - /** - * Update Managed CCF properties - * - * Updates properties of Managed CCF. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Request body for Updating Managed CCF App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed CCF on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String appName, ManagedCcfInner managedCcf) { - return beginUpdateAsync(resourceGroupName, appName, managedCcf).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update Managed CCF properties - * - * Updates properties of Managed CCF. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Request body for Updating Managed CCF App. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed CCF on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String appName, ManagedCcfInner managedCcf, - Context context) { - return beginUpdateAsync(resourceGroupName, appName, managedCcf, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update Managed CCF properties - * - * Updates properties of Managed CCF. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Request body for Updating Managed CCF App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed CCF. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedCcfInner update(String resourceGroupName, String appName, ManagedCcfInner managedCcf) { - return updateAsync(resourceGroupName, appName, managedCcf).block(); - } - - /** - * Update Managed CCF properties - * - * Updates properties of Managed CCF. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Request body for Updating Managed CCF App. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed CCF. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedCcfInner update(String resourceGroupName, String appName, ManagedCcfInner managedCcf, - Context context) { - return updateAsync(resourceGroupName, appName, managedCcf, context).block(); - } - - /** - * Retrieves information about all Managed CCF resources under the given subscription and resource group - * - * Retrieves the properties of all Managed CCF apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object that includes an array of Managed CCF and a possible link for next set along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - String filter) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, filter, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Retrieves information about all Managed CCF resources under the given subscription and resource group - * - * Retrieves the properties of all Managed CCF apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object that includes an array of Managed CCF and a possible link for next set along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - String filter, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, filter, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Retrieves information about all Managed CCF resources under the given subscription and resource group - * - * Retrieves the properties of all Managed CCF apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object that includes an array of Managed CCF and a possible link for next set as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, String filter) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Retrieves information about all Managed CCF resources under the given subscription and resource group - * - * Retrieves the properties of all Managed CCF apps. - * - * @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 object that includes an array of Managed CCF and a possible link for next set as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - final String filter = null; - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Retrieves information about all Managed CCF resources under the given subscription and resource group - * - * Retrieves the properties of all Managed CCF apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object that includes an array of Managed CCF and a possible link for next set as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, String filter, - Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); - } - - /** - * Retrieves information about all Managed CCF resources under the given subscription and resource group - * - * Retrieves the properties of all Managed CCF apps. - * - * @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 object that includes an array of Managed CCF and a possible link for next set as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - final String filter = null; - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, filter)); - } - - /** - * Retrieves information about all Managed CCF resources under the given subscription and resource group - * - * Retrieves the properties of all Managed CCF apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object that includes an array of Managed CCF and a possible link for next set as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, String filter, - Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, filter, context)); - } - - /** - * Retrieves information about all Managed CCF resources under the given subscription - * - * Retrieves the properties of all Managed CCF. - * - * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object that includes an array of Managed CCF and a possible link for next set along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String filter) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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.getApiVersion(), - this.client.getSubscriptionId(), filter, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Retrieves information about all Managed CCF resources under the given subscription - * - * Retrieves the properties of all Managed CCF. - * - * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object that includes an array of Managed CCF and a possible link for next set along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String filter, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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.getApiVersion(), this.client.getSubscriptionId(), filter, - accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Retrieves information about all Managed CCF resources under the given subscription - * - * Retrieves the properties of all Managed CCF. - * - * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object that includes an array of Managed CCF and a possible link for next set as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String filter) { - return new PagedFlux<>(() -> listSinglePageAsync(filter), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * Retrieves information about all Managed CCF resources under the given subscription - * - * Retrieves the properties of all Managed CCF. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object that includes an array of Managed CCF and a possible link for next set as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - final String filter = null; - return new PagedFlux<>(() -> listSinglePageAsync(filter), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * Retrieves information about all Managed CCF resources under the given subscription - * - * Retrieves the properties of all Managed CCF. - * - * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object that includes an array of Managed CCF and a possible link for next set as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String filter, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(filter, context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); - } - - /** - * Retrieves information about all Managed CCF resources under the given subscription - * - * Retrieves the properties of all Managed CCF. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object that includes an array of Managed CCF and a possible link for next set as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - final String filter = null; - return new PagedIterable<>(listAsync(filter)); - } - - /** - * Retrieves information about all Managed CCF resources under the given subscription - * - * Retrieves the properties of all Managed CCF. - * - * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object that includes an array of Managed CCF and a possible link for next set as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String filter, Context context) { - return new PagedIterable<>(listAsync(filter, context)); - } - - /** - * Performs the backup operation on a Managed CCF Resource. - * - * Backs up a Managed CCF Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Managed CCF Backup Request Body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the backup response of a Managed CCF Resource along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> backupWithResponseAsync(String resourceGroupName, String appName, - ManagedCcfBackup managedCcf) { - 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 (appName == null) { - return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); - } - if (managedCcf == null) { - return Mono.error(new IllegalArgumentException("Parameter managedCcf is required and cannot be null.")); - } else { - managedCcf.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.backup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, appName, managedCcf, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Performs the backup operation on a Managed CCF Resource. - * - * Backs up a Managed CCF Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Managed CCF Backup Request Body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the backup response of a Managed CCF Resource along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> backupWithResponseAsync(String resourceGroupName, String appName, - ManagedCcfBackup managedCcf, 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 (appName == null) { - return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); - } - if (managedCcf == null) { - return Mono.error(new IllegalArgumentException("Parameter managedCcf is required and cannot be null.")); - } else { - managedCcf.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.backup(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, appName, managedCcf, accept, context); - } - - /** - * Performs the backup operation on a Managed CCF Resource. - * - * Backs up a Managed CCF Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Managed CCF Backup Request Body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of object representing the backup response of a Managed CCF Resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ManagedCcfBackupResponseInner> - beginBackupAsync(String resourceGroupName, String appName, ManagedCcfBackup managedCcf) { - Mono>> mono = backupWithResponseAsync(resourceGroupName, appName, managedCcf); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ManagedCcfBackupResponseInner.class, ManagedCcfBackupResponseInner.class, - this.client.getContext()); - } - - /** - * Performs the backup operation on a Managed CCF Resource. - * - * Backs up a Managed CCF Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Managed CCF Backup Request Body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of object representing the backup response of a Managed CCF Resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ManagedCcfBackupResponseInner> - beginBackupAsync(String resourceGroupName, String appName, ManagedCcfBackup managedCcf, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = backupWithResponseAsync(resourceGroupName, appName, managedCcf, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ManagedCcfBackupResponseInner.class, ManagedCcfBackupResponseInner.class, - context); - } - - /** - * Performs the backup operation on a Managed CCF Resource. - * - * Backs up a Managed CCF Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Managed CCF Backup Request Body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of object representing the backup response of a Managed CCF Resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedCcfBackupResponseInner> - beginBackup(String resourceGroupName, String appName, ManagedCcfBackup managedCcf) { - return this.beginBackupAsync(resourceGroupName, appName, managedCcf).getSyncPoller(); - } - - /** - * Performs the backup operation on a Managed CCF Resource. - * - * Backs up a Managed CCF Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Managed CCF Backup Request Body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of object representing the backup response of a Managed CCF Resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedCcfBackupResponseInner> - beginBackup(String resourceGroupName, String appName, ManagedCcfBackup managedCcf, Context context) { - return this.beginBackupAsync(resourceGroupName, appName, managedCcf, context).getSyncPoller(); - } - - /** - * Performs the backup operation on a Managed CCF Resource. - * - * Backs up a Managed CCF Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Managed CCF Backup Request Body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the backup response of a Managed CCF Resource on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono backupAsync(String resourceGroupName, String appName, - ManagedCcfBackup managedCcf) { - return beginBackupAsync(resourceGroupName, appName, managedCcf).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Performs the backup operation on a Managed CCF Resource. - * - * Backs up a Managed CCF Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Managed CCF Backup Request Body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the backup response of a Managed CCF Resource on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono backupAsync(String resourceGroupName, String appName, - ManagedCcfBackup managedCcf, Context context) { - return beginBackupAsync(resourceGroupName, appName, managedCcf, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Performs the backup operation on a Managed CCF Resource. - * - * Backs up a Managed CCF Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Managed CCF Backup Request Body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the backup response of a Managed CCF Resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedCcfBackupResponseInner backup(String resourceGroupName, String appName, ManagedCcfBackup managedCcf) { - return backupAsync(resourceGroupName, appName, managedCcf).block(); - } - - /** - * Performs the backup operation on a Managed CCF Resource. - * - * Backs up a Managed CCF Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Managed CCF Backup Request Body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the backup response of a Managed CCF Resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedCcfBackupResponseInner backup(String resourceGroupName, String appName, ManagedCcfBackup managedCcf, - Context context) { - return backupAsync(resourceGroupName, appName, managedCcf, context).block(); - } - - /** - * Performs the restore operation to spin up a newly restored Managed CCF Resource. - * - * Restores a Managed CCF Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Managed CCF Restore Request Body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the restore response of a Managed CCF Resource along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> restoreWithResponseAsync(String resourceGroupName, String appName, - ManagedCcfRestore managedCcf) { - 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 (appName == null) { - return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); - } - if (managedCcf == null) { - return Mono.error(new IllegalArgumentException("Parameter managedCcf is required and cannot be null.")); - } else { - managedCcf.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.restore(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, appName, managedCcf, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Performs the restore operation to spin up a newly restored Managed CCF Resource. - * - * Restores a Managed CCF Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Managed CCF Restore Request Body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the restore response of a Managed CCF Resource along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> restoreWithResponseAsync(String resourceGroupName, String appName, - ManagedCcfRestore managedCcf, 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 (appName == null) { - return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); - } - if (managedCcf == null) { - return Mono.error(new IllegalArgumentException("Parameter managedCcf is required and cannot be null.")); - } else { - managedCcf.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.restore(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, appName, managedCcf, accept, context); - } - - /** - * Performs the restore operation to spin up a newly restored Managed CCF Resource. - * - * Restores a Managed CCF Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Managed CCF Restore Request Body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of object representing the restore response of a Managed CCF Resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ManagedCcfRestoreResponseInner> - beginRestoreAsync(String resourceGroupName, String appName, ManagedCcfRestore managedCcf) { - Mono>> mono = restoreWithResponseAsync(resourceGroupName, appName, managedCcf); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ManagedCcfRestoreResponseInner.class, ManagedCcfRestoreResponseInner.class, - this.client.getContext()); - } - - /** - * Performs the restore operation to spin up a newly restored Managed CCF Resource. - * - * Restores a Managed CCF Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Managed CCF Restore Request Body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of object representing the restore response of a Managed CCF Resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ManagedCcfRestoreResponseInner> - beginRestoreAsync(String resourceGroupName, String appName, ManagedCcfRestore managedCcf, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = restoreWithResponseAsync(resourceGroupName, appName, managedCcf, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ManagedCcfRestoreResponseInner.class, ManagedCcfRestoreResponseInner.class, - context); - } - - /** - * Performs the restore operation to spin up a newly restored Managed CCF Resource. - * - * Restores a Managed CCF Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Managed CCF Restore Request Body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of object representing the restore response of a Managed CCF Resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedCcfRestoreResponseInner> - beginRestore(String resourceGroupName, String appName, ManagedCcfRestore managedCcf) { - return this.beginRestoreAsync(resourceGroupName, appName, managedCcf).getSyncPoller(); - } - - /** - * Performs the restore operation to spin up a newly restored Managed CCF Resource. - * - * Restores a Managed CCF Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Managed CCF Restore Request Body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of object representing the restore response of a Managed CCF Resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedCcfRestoreResponseInner> - beginRestore(String resourceGroupName, String appName, ManagedCcfRestore managedCcf, Context context) { - return this.beginRestoreAsync(resourceGroupName, appName, managedCcf, context).getSyncPoller(); - } - - /** - * Performs the restore operation to spin up a newly restored Managed CCF Resource. - * - * Restores a Managed CCF Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Managed CCF Restore Request Body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the restore response of a Managed CCF Resource on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono restoreAsync(String resourceGroupName, String appName, - ManagedCcfRestore managedCcf) { - return beginRestoreAsync(resourceGroupName, appName, managedCcf).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Performs the restore operation to spin up a newly restored Managed CCF Resource. - * - * Restores a Managed CCF Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Managed CCF Restore Request Body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the restore response of a Managed CCF Resource on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono restoreAsync(String resourceGroupName, String appName, - ManagedCcfRestore managedCcf, Context context) { - return beginRestoreAsync(resourceGroupName, appName, managedCcf, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Performs the restore operation to spin up a newly restored Managed CCF Resource. - * - * Restores a Managed CCF Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Managed CCF Restore Request Body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the restore response of a Managed CCF Resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedCcfRestoreResponseInner restore(String resourceGroupName, String appName, - ManagedCcfRestore managedCcf) { - return restoreAsync(resourceGroupName, appName, managedCcf).block(); - } - - /** - * Performs the restore operation to spin up a newly restored Managed CCF Resource. - * - * Restores a Managed CCF Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Managed CCF Restore Request Body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the restore response of a Managed CCF Resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedCcfRestoreResponseInner restore(String resourceGroupName, String appName, - ManagedCcfRestore managedCcf, Context context) { - return restoreAsync(resourceGroupName, appName, managedCcf, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object that includes an array of Managed CCF and a possible link for next set 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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object that includes an array of Managed CCF and a possible link for next set along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object that includes an array of Managed CCF and a possible link for next set 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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object that includes an array of Managed CCF and a possible link for next set along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ManagedCcfsImpl.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ManagedCcfsImpl.java deleted file mode 100644 index 9e3a07e28ac4..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ManagedCcfsImpl.java +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.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.confidentialledger.fluent.ManagedCcfsClient; -import com.azure.resourcemanager.confidentialledger.fluent.models.ManagedCcfBackupResponseInner; -import com.azure.resourcemanager.confidentialledger.fluent.models.ManagedCcfInner; -import com.azure.resourcemanager.confidentialledger.fluent.models.ManagedCcfRestoreResponseInner; -import com.azure.resourcemanager.confidentialledger.models.ManagedCcf; -import com.azure.resourcemanager.confidentialledger.models.ManagedCcfBackup; -import com.azure.resourcemanager.confidentialledger.models.ManagedCcfBackupResponse; -import com.azure.resourcemanager.confidentialledger.models.ManagedCcfRestore; -import com.azure.resourcemanager.confidentialledger.models.ManagedCcfRestoreResponse; -import com.azure.resourcemanager.confidentialledger.models.ManagedCcfs; - -public final class ManagedCcfsImpl implements ManagedCcfs { - private static final ClientLogger LOGGER = new ClientLogger(ManagedCcfsImpl.class); - - private final ManagedCcfsClient innerClient; - - private final com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager serviceManager; - - public ManagedCcfsImpl(ManagedCcfsClient innerClient, - com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getByResourceGroupWithResponse(String resourceGroupName, String appName, - Context context) { - Response inner - = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, appName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ManagedCcfImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ManagedCcf getByResourceGroup(String resourceGroupName, String appName) { - ManagedCcfInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, appName); - if (inner != null) { - return new ManagedCcfImpl(inner, this.manager()); - } else { - return null; - } - } - - public void deleteByResourceGroup(String resourceGroupName, String appName) { - this.serviceClient().delete(resourceGroupName, appName); - } - - public void delete(String resourceGroupName, String appName, Context context) { - this.serviceClient().delete(resourceGroupName, appName, context); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ManagedCcfImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, String filter, Context context) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName, filter, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ManagedCcfImpl(inner1, this.manager())); - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ManagedCcfImpl(inner1, this.manager())); - } - - public PagedIterable list(String filter, Context context) { - PagedIterable inner = this.serviceClient().list(filter, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ManagedCcfImpl(inner1, this.manager())); - } - - public ManagedCcfBackupResponse backup(String resourceGroupName, String appName, ManagedCcfBackup managedCcf) { - ManagedCcfBackupResponseInner inner = this.serviceClient().backup(resourceGroupName, appName, managedCcf); - if (inner != null) { - return new ManagedCcfBackupResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public ManagedCcfBackupResponse backup(String resourceGroupName, String appName, ManagedCcfBackup managedCcf, - Context context) { - ManagedCcfBackupResponseInner inner - = this.serviceClient().backup(resourceGroupName, appName, managedCcf, context); - if (inner != null) { - return new ManagedCcfBackupResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public ManagedCcfRestoreResponse restore(String resourceGroupName, String appName, ManagedCcfRestore managedCcf) { - ManagedCcfRestoreResponseInner inner = this.serviceClient().restore(resourceGroupName, appName, managedCcf); - if (inner != null) { - return new ManagedCcfRestoreResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public ManagedCcfRestoreResponse restore(String resourceGroupName, String appName, ManagedCcfRestore managedCcf, - Context context) { - ManagedCcfRestoreResponseInner inner - = this.serviceClient().restore(resourceGroupName, appName, managedCcf, context); - if (inner != null) { - return new ManagedCcfRestoreResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public ManagedCcf getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String appName = ResourceManagerUtils.getValueFromIdByName(id, "managedCCFs"); - if (appName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'managedCCFs'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, appName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String appName = ResourceManagerUtils.getValueFromIdByName(id, "managedCCFs"); - if (appName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'managedCCFs'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, appName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String appName = ResourceManagerUtils.getValueFromIdByName(id, "managedCCFs"); - if (appName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'managedCCFs'.", id))); - } - this.delete(resourceGroupName, appName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String appName = ResourceManagerUtils.getValueFromIdByName(id, "managedCCFs"); - if (appName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'managedCCFs'.", id))); - } - this.delete(resourceGroupName, appName, context); - } - - private ManagedCcfsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager() { - return this.serviceManager; - } - - public ManagedCcfImpl define(String name) { - return new ManagedCcfImpl(name, this.manager()); - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ConfidentialLedger.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ConfidentialLedger.java index c2be1187faec..6f37f33fb9a4 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ConfidentialLedger.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ConfidentialLedger.java @@ -36,32 +36,32 @@ public interface ConfidentialLedger { String type(); /** - * Gets the location property: The geo-location where the resource lives. + * Gets the properties property: Properties of Confidential Ledger Resource. * - * @return the location value. + * @return the properties value. */ - String location(); + LedgerProperties properties(); /** - * Gets the tags property: Resource tags. + * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. * - * @return the tags value. + * @return the systemData value. */ - Map tags(); + SystemData systemData(); /** - * Gets the properties property: Properties of Confidential Ledger Resource. + * Gets the location property: The Azure location where the Confidential Ledger is running. * - * @return the properties value. + * @return the location value. */ - LedgerProperties properties(); + String location(); /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Gets the tags property: Additional tags for Confidential Ledger. * - * @return the systemData value. + * @return the tags value. */ - SystemData systemData(); + Map tags(); /** * Gets the region of the resource. @@ -94,8 +94,8 @@ public interface ConfidentialLedger { /** * The entirety of the ConfidentialLedger definition. */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { } /** @@ -105,28 +105,7 @@ interface DefinitionStages { /** * The first stage of the ConfidentialLedger definition. */ - interface Blank extends WithLocation { - } - - /** - * The stage of the ConfidentialLedger 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); + interface Blank extends WithResourceGroup { } /** @@ -136,7 +115,7 @@ interface WithResourceGroup { /** * Specifies resourceGroupName. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @return the next definition stage. */ WithCreate withExistingResourceGroup(String resourceGroupName); @@ -146,7 +125,8 @@ interface WithResourceGroup { * The stage of the ConfidentialLedger definition which contains all the minimum required properties for the * resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithProperties { + interface WithCreate + extends DefinitionStages.WithLocation, DefinitionStages.WithTags, DefinitionStages.WithProperties { /** * Executes the create request. * @@ -163,14 +143,35 @@ interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithPro ConfidentialLedger create(Context context); } + /** + * The stage of the ConfidentialLedger definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The Azure location where the Confidential Ledger is running. + * @return the next definition stage. + */ + WithCreate withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The Azure location where the Confidential Ledger is running. + * @return the next definition stage. + */ + WithCreate withRegion(String location); + } + /** * The stage of the ConfidentialLedger definition allowing to specify tags. */ interface WithTags { /** - * Specifies the tags property: Resource tags.. + * Specifies the tags property: Additional tags for Confidential Ledger. * - * @param tags Resource tags. + * @param tags Additional tags for Confidential Ledger. * @return the next definition stage. */ WithCreate withTags(Map tags); @@ -226,9 +227,9 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: Resource tags.. + * Specifies the tags property: Additional tags for Confidential Ledger. * - * @param tags Resource tags. + * @param tags Additional tags for Confidential Ledger. * @return the next definition stage. */ Update withTags(Map tags); @@ -262,58 +263,4 @@ interface WithProperties { * @return the refreshed resource. */ ConfidentialLedger refresh(Context context); - - /** - * Performs the backup operation on a Confidential Ledger Resource. - * - * Backs up a Confidential Ledger Resource. - * - * @param confidentialLedger Confidential Ledger Backup Request Body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the backup response of a Confidential Ledger Resource. - */ - ConfidentialLedgerBackupResponse backup(ConfidentialLedgerBackup confidentialLedger); - - /** - * Performs the backup operation on a Confidential Ledger Resource. - * - * Backs up a Confidential Ledger Resource. - * - * @param confidentialLedger Confidential Ledger Backup Request Body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the backup response of a Confidential Ledger Resource. - */ - ConfidentialLedgerBackupResponse backup(ConfidentialLedgerBackup confidentialLedger, Context context); - - /** - * Performs the restore operation to spin up a newly restored Confidential Ledger Resource. - * - * Restores a Confidential Ledger Resource. - * - * @param confidentialLedger Confidential Ledger Restore Request Body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the restore response of a Confidential Ledger Resource. - */ - ConfidentialLedgerRestoreResponse restore(ConfidentialLedgerRestore confidentialLedger); - - /** - * Performs the restore operation to spin up a newly restored Confidential Ledger Resource. - * - * Restores a Confidential Ledger Resource. - * - * @param confidentialLedger Confidential Ledger Restore Request Body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the restore response of a Confidential Ledger Resource. - */ - ConfidentialLedgerRestoreResponse restore(ConfidentialLedgerRestore confidentialLedger, Context context); } diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ConfidentialLedgerBackup.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ConfidentialLedgerBackup.java deleted file mode 100644 index a722419b3f94..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ConfidentialLedgerBackup.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Object representing Backup properties of a Confidential Ledger Resource. - */ -@Fluent -public final class ConfidentialLedgerBackup implements JsonSerializable { - /* - * The region where the backup of the ledger will eventually be restored to. - */ - private String restoreRegion; - - /* - * SAS URI used to access the backup Fileshare. - */ - private String uri; - - /** - * Creates an instance of ConfidentialLedgerBackup class. - */ - public ConfidentialLedgerBackup() { - } - - /** - * Get the restoreRegion property: The region where the backup of the ledger will eventually be restored to. - * - * @return the restoreRegion value. - */ - public String restoreRegion() { - return this.restoreRegion; - } - - /** - * Set the restoreRegion property: The region where the backup of the ledger will eventually be restored to. - * - * @param restoreRegion the restoreRegion value to set. - * @return the ConfidentialLedgerBackup object itself. - */ - public ConfidentialLedgerBackup withRestoreRegion(String restoreRegion) { - this.restoreRegion = restoreRegion; - return this; - } - - /** - * Get the uri property: SAS URI used to access the backup Fileshare. - * - * @return the uri value. - */ - public String uri() { - return this.uri; - } - - /** - * Set the uri property: SAS URI used to access the backup Fileshare. - * - * @param uri the uri value to set. - * @return the ConfidentialLedgerBackup object itself. - */ - public ConfidentialLedgerBackup withUri(String uri) { - this.uri = uri; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (uri() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property uri in model ConfidentialLedgerBackup")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ConfidentialLedgerBackup.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("uri", this.uri); - jsonWriter.writeStringField("restoreRegion", this.restoreRegion); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ConfidentialLedgerBackup from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ConfidentialLedgerBackup if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ConfidentialLedgerBackup. - */ - public static ConfidentialLedgerBackup fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ConfidentialLedgerBackup deserializedConfidentialLedgerBackup = new ConfidentialLedgerBackup(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("uri".equals(fieldName)) { - deserializedConfidentialLedgerBackup.uri = reader.getString(); - } else if ("restoreRegion".equals(fieldName)) { - deserializedConfidentialLedgerBackup.restoreRegion = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedConfidentialLedgerBackup; - }); - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ConfidentialLedgerBackupResponse.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ConfidentialLedgerBackupResponse.java deleted file mode 100644 index 4c9bf9204f26..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ConfidentialLedgerBackupResponse.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.models; - -import com.azure.resourcemanager.confidentialledger.fluent.models.ConfidentialLedgerBackupResponseInner; - -/** - * An immutable client-side representation of ConfidentialLedgerBackupResponse. - */ -public interface ConfidentialLedgerBackupResponse { - /** - * Gets the message property: Response body stating if the ledger is being backed up. - * - * @return the message value. - */ - String message(); - - /** - * Gets the inner com.azure.resourcemanager.confidentialledger.fluent.models.ConfidentialLedgerBackupResponseInner - * object. - * - * @return the inner object. - */ - ConfidentialLedgerBackupResponseInner innerModel(); -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ConfidentialLedgerRestore.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ConfidentialLedgerRestore.java deleted file mode 100644 index ebcf2097df77..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ConfidentialLedgerRestore.java +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Object representing Restore properties of a Confidential Ledger Resource. - */ -@Fluent -public final class ConfidentialLedgerRestore implements JsonSerializable { - /* - * Fileshare where the ledger backup is stored. - */ - private String fileShareName; - - /* - * The region the ledger is being restored to. - */ - private String restoreRegion; - - /* - * SAS URI used to access the backup fileshare. - */ - private String uri; - - /** - * Creates an instance of ConfidentialLedgerRestore class. - */ - public ConfidentialLedgerRestore() { - } - - /** - * Get the fileShareName property: Fileshare where the ledger backup is stored. - * - * @return the fileShareName value. - */ - public String fileShareName() { - return this.fileShareName; - } - - /** - * Set the fileShareName property: Fileshare where the ledger backup is stored. - * - * @param fileShareName the fileShareName value to set. - * @return the ConfidentialLedgerRestore object itself. - */ - public ConfidentialLedgerRestore withFileShareName(String fileShareName) { - this.fileShareName = fileShareName; - return this; - } - - /** - * Get the restoreRegion property: The region the ledger is being restored to. - * - * @return the restoreRegion value. - */ - public String restoreRegion() { - return this.restoreRegion; - } - - /** - * Set the restoreRegion property: The region the ledger is being restored to. - * - * @param restoreRegion the restoreRegion value to set. - * @return the ConfidentialLedgerRestore object itself. - */ - public ConfidentialLedgerRestore withRestoreRegion(String restoreRegion) { - this.restoreRegion = restoreRegion; - return this; - } - - /** - * Get the uri property: SAS URI used to access the backup fileshare. - * - * @return the uri value. - */ - public String uri() { - return this.uri; - } - - /** - * Set the uri property: SAS URI used to access the backup fileshare. - * - * @param uri the uri value to set. - * @return the ConfidentialLedgerRestore object itself. - */ - public ConfidentialLedgerRestore withUri(String uri) { - this.uri = uri; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (fileShareName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property fileShareName in model ConfidentialLedgerRestore")); - } - if (restoreRegion() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property restoreRegion in model ConfidentialLedgerRestore")); - } - if (uri() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property uri in model ConfidentialLedgerRestore")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ConfidentialLedgerRestore.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("fileShareName", this.fileShareName); - jsonWriter.writeStringField("restoreRegion", this.restoreRegion); - jsonWriter.writeStringField("uri", this.uri); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ConfidentialLedgerRestore from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ConfidentialLedgerRestore if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ConfidentialLedgerRestore. - */ - public static ConfidentialLedgerRestore fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ConfidentialLedgerRestore deserializedConfidentialLedgerRestore = new ConfidentialLedgerRestore(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("fileShareName".equals(fieldName)) { - deserializedConfidentialLedgerRestore.fileShareName = reader.getString(); - } else if ("restoreRegion".equals(fieldName)) { - deserializedConfidentialLedgerRestore.restoreRegion = reader.getString(); - } else if ("uri".equals(fieldName)) { - deserializedConfidentialLedgerRestore.uri = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedConfidentialLedgerRestore; - }); - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ConfidentialLedgerRestoreResponse.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ConfidentialLedgerRestoreResponse.java deleted file mode 100644 index 73646e13fe9f..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ConfidentialLedgerRestoreResponse.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.models; - -import com.azure.resourcemanager.confidentialledger.fluent.models.ConfidentialLedgerRestoreResponseInner; - -/** - * An immutable client-side representation of ConfidentialLedgerRestoreResponse. - */ -public interface ConfidentialLedgerRestoreResponse { - /** - * Gets the message property: Response body stating if the ledger is being restored. - * - * @return the message value. - */ - String message(); - - /** - * Gets the inner com.azure.resourcemanager.confidentialledger.fluent.models.ConfidentialLedgerRestoreResponseInner - * object. - * - * @return the inner object. - */ - ConfidentialLedgerRestoreResponseInner innerModel(); -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/DeploymentType.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/DeploymentType.java deleted file mode 100644 index 97fe12b67590..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/DeploymentType.java +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * DeploymentType - * - * Object representing DeploymentType for Managed CCF. - */ -@Fluent -public final class DeploymentType implements JsonSerializable { - /* - * Unique name for the Managed CCF. - */ - private LanguageRuntime languageRuntime; - - /* - * Source Uri containing ManagedCCF code - */ - private String appSourceUri; - - /** - * Creates an instance of DeploymentType class. - */ - public DeploymentType() { - } - - /** - * Get the languageRuntime property: Unique name for the Managed CCF. - * - * @return the languageRuntime value. - */ - public LanguageRuntime languageRuntime() { - return this.languageRuntime; - } - - /** - * Set the languageRuntime property: Unique name for the Managed CCF. - * - * @param languageRuntime the languageRuntime value to set. - * @return the DeploymentType object itself. - */ - public DeploymentType withLanguageRuntime(LanguageRuntime languageRuntime) { - this.languageRuntime = languageRuntime; - return this; - } - - /** - * Get the appSourceUri property: Source Uri containing ManagedCCF code. - * - * @return the appSourceUri value. - */ - public String appSourceUri() { - return this.appSourceUri; - } - - /** - * Set the appSourceUri property: Source Uri containing ManagedCCF code. - * - * @param appSourceUri the appSourceUri value to set. - * @return the DeploymentType object itself. - */ - public DeploymentType withAppSourceUri(String appSourceUri) { - this.appSourceUri = appSourceUri; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("languageRuntime", - this.languageRuntime == null ? null : this.languageRuntime.toString()); - jsonWriter.writeStringField("appSourceUri", this.appSourceUri); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DeploymentType from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DeploymentType if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the DeploymentType. - */ - public static DeploymentType fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DeploymentType deserializedDeploymentType = new DeploymentType(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("languageRuntime".equals(fieldName)) { - deserializedDeploymentType.languageRuntime = LanguageRuntime.fromString(reader.getString()); - } else if ("appSourceUri".equals(fieldName)) { - deserializedDeploymentType.appSourceUri = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDeploymentType; - }); - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/LanguageRuntime.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/LanguageRuntime.java deleted file mode 100644 index 1df98a84607c..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/LanguageRuntime.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Object representing LanguageRuntime for Manged CCF. - */ -public final class LanguageRuntime extends ExpandableStringEnum { - /** - * Static value CPP for LanguageRuntime. - */ - public static final LanguageRuntime CPP = fromString("CPP"); - - /** - * Static value JS for LanguageRuntime. - */ - public static final LanguageRuntime JS = fromString("JS"); - - /** - * Creates a new instance of LanguageRuntime value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public LanguageRuntime() { - } - - /** - * Creates or finds a LanguageRuntime from its string representation. - * - * @param name a name to look for. - * @return the corresponding LanguageRuntime. - */ - public static LanguageRuntime fromString(String name) { - return fromString(name, LanguageRuntime.class); - } - - /** - * Gets known LanguageRuntime values. - * - * @return known LanguageRuntime values. - */ - public static Collection values() { - return values(LanguageRuntime.class); - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/LedgerProperties.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/LedgerProperties.java index 9fcdfb4e3d58..edf15050d0b0 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/LedgerProperties.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/LedgerProperties.java @@ -39,11 +39,6 @@ public final class LedgerProperties implements JsonSerializable writer.writeJson(element)); jsonWriter.writeArrayField("certBasedSecurityPrincipals", this.certBasedSecurityPrincipals, @@ -274,14 +222,10 @@ public static LedgerProperties fromJson(JsonReader jsonReader) throws IOExceptio deserializedLedgerProperties.identityServiceUri = reader.getString(); } else if ("ledgerInternalNamespace".equals(fieldName)) { deserializedLedgerProperties.ledgerInternalNamespace = reader.getString(); - } else if ("runningState".equals(fieldName)) { - deserializedLedgerProperties.runningState = RunningState.fromString(reader.getString()); } else if ("ledgerType".equals(fieldName)) { deserializedLedgerProperties.ledgerType = LedgerType.fromString(reader.getString()); } else if ("provisioningState".equals(fieldName)) { deserializedLedgerProperties.provisioningState = ProvisioningState.fromString(reader.getString()); - } else if ("ledgerSku".equals(fieldName)) { - deserializedLedgerProperties.ledgerSku = LedgerSku.fromString(reader.getString()); } else if ("aadBasedSecurityPrincipals".equals(fieldName)) { List aadBasedSecurityPrincipals = reader.readArray(reader1 -> AadBasedSecurityPrincipal.fromJson(reader1)); diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/LedgerSku.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/LedgerSku.java deleted file mode 100644 index 59e140f0a0b2..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/LedgerSku.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * SKU associated with the ledger resource. - */ -public final class LedgerSku extends ExpandableStringEnum { - /** - * Static value Standard for LedgerSku. - */ - public static final LedgerSku STANDARD = fromString("Standard"); - - /** - * Static value Basic for LedgerSku. - */ - public static final LedgerSku BASIC = fromString("Basic"); - - /** - * Static value Unknown for LedgerSku. - */ - public static final LedgerSku UNKNOWN = fromString("Unknown"); - - /** - * Creates a new instance of LedgerSku value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public LedgerSku() { - } - - /** - * Creates or finds a LedgerSku from its string representation. - * - * @param name a name to look for. - * @return the corresponding LedgerSku. - */ - public static LedgerSku fromString(String name) { - return fromString(name, LedgerSku.class); - } - - /** - * Gets known LedgerSku values. - * - * @return known LedgerSku values. - */ - public static Collection values() { - return values(LedgerSku.class); - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/Ledgers.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/Ledgers.java index 051e722c7032..c44f584064b8 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/Ledgers.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/Ledgers.java @@ -17,7 +17,7 @@ public interface Ledgers { * * Retrieves the properties of a Confidential Ledger. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -33,7 +33,7 @@ Response getByResourceGroupWithResponse(String resourceGroup * * Retrieves the properties of a Confidential Ledger. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -47,7 +47,7 @@ Response getByResourceGroupWithResponse(String resourceGroup * * Deletes an existing Confidential Ledger. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -60,7 +60,7 @@ Response getByResourceGroupWithResponse(String resourceGroup * * Deletes an existing Confidential Ledger. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param ledgerName Name of the Confidential Ledger. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -74,7 +74,7 @@ Response getByResourceGroupWithResponse(String resourceGroup * * Retrieves the properties of all Confidential Ledgers. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -88,7 +88,7 @@ Response getByResourceGroupWithResponse(String resourceGroup * * Retrieves the properties of all Confidential Ledgers. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -126,72 +126,6 @@ Response getByResourceGroupWithResponse(String resourceGroup */ PagedIterable list(String filter, Context context); - /** - * Performs the backup operation on a Confidential Ledger Resource. - * - * Backs up a Confidential Ledger Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger Backup Request Body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the backup response of a Confidential Ledger Resource. - */ - ConfidentialLedgerBackupResponse backup(String resourceGroupName, String ledgerName, - ConfidentialLedgerBackup confidentialLedger); - - /** - * Performs the backup operation on a Confidential Ledger Resource. - * - * Backs up a Confidential Ledger Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger Backup Request Body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the backup response of a Confidential Ledger Resource. - */ - ConfidentialLedgerBackupResponse backup(String resourceGroupName, String ledgerName, - ConfidentialLedgerBackup confidentialLedger, Context context); - - /** - * Performs the restore operation to spin up a newly restored Confidential Ledger Resource. - * - * Restores a Confidential Ledger Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger Restore Request Body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the restore response of a Confidential Ledger Resource. - */ - ConfidentialLedgerRestoreResponse restore(String resourceGroupName, String ledgerName, - ConfidentialLedgerRestore confidentialLedger); - - /** - * Performs the restore operation to spin up a newly restored Confidential Ledger Resource. - * - * Restores a Confidential Ledger Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger Restore Request Body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the restore response of a Confidential Ledger Resource. - */ - ConfidentialLedgerRestoreResponse restore(String resourceGroupName, String ledgerName, - ConfidentialLedgerRestore confidentialLedger, Context context); - /** * Retrieves information about a Confidential Ledger resource. * diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ManagedCcf.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ManagedCcf.java deleted file mode 100644 index 9ca9b6a6ae61..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ManagedCcf.java +++ /dev/null @@ -1,319 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.models; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.confidentialledger.fluent.models.ManagedCcfInner; -import java.util.Map; - -/** - * An immutable client-side representation of ManagedCcf. - */ -public interface ManagedCcf { - /** - * 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 properties property: Properties of Managed CCF Resource. - * - * @return the properties value. - */ - ManagedCcfProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * 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.confidentialledger.fluent.models.ManagedCcfInner object. - * - * @return the inner object. - */ - ManagedCcfInner innerModel(); - - /** - * The entirety of the ManagedCcf definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { - } - - /** - * The ManagedCcf definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the ManagedCcf definition. - */ - interface Blank extends WithLocation { - } - - /** - * The stage of the ManagedCcf 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 ManagedCcf 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 ManagedCcf definition which contains all the minimum required properties for the resource to - * be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - ManagedCcf create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ManagedCcf create(Context context); - } - - /** - * The stage of the ManagedCcf definition allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - - /** - * The stage of the ManagedCcf definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: Properties of Managed CCF Resource.. - * - * @param properties Properties of Managed CCF Resource. - * @return the next definition stage. - */ - WithCreate withProperties(ManagedCcfProperties properties); - } - } - - /** - * Begins update for the ManagedCcf resource. - * - * @return the stage of resource update. - */ - ManagedCcf.Update update(); - - /** - * The template for ManagedCcf update. - */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - ManagedCcf apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - ManagedCcf apply(Context context); - } - - /** - * The ManagedCcf update stages. - */ - interface UpdateStages { - /** - * The stage of the ManagedCcf update allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - - /** - * The stage of the ManagedCcf update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: Properties of Managed CCF Resource.. - * - * @param properties Properties of Managed CCF Resource. - * @return the next definition stage. - */ - Update withProperties(ManagedCcfProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ManagedCcf refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ManagedCcf refresh(Context context); - - /** - * Performs the backup operation on a Managed CCF Resource. - * - * Backs up a Managed CCF Resource. - * - * @param managedCcf Managed CCF Backup Request Body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the backup response of a Managed CCF Resource. - */ - ManagedCcfBackupResponse backup(ManagedCcfBackup managedCcf); - - /** - * Performs the backup operation on a Managed CCF Resource. - * - * Backs up a Managed CCF Resource. - * - * @param managedCcf Managed CCF Backup Request Body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the backup response of a Managed CCF Resource. - */ - ManagedCcfBackupResponse backup(ManagedCcfBackup managedCcf, Context context); - - /** - * Performs the restore operation to spin up a newly restored Managed CCF Resource. - * - * Restores a Managed CCF Resource. - * - * @param managedCcf Managed CCF Restore Request Body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the restore response of a Managed CCF Resource. - */ - ManagedCcfRestoreResponse restore(ManagedCcfRestore managedCcf); - - /** - * Performs the restore operation to spin up a newly restored Managed CCF Resource. - * - * Restores a Managed CCF Resource. - * - * @param managedCcf Managed CCF Restore Request Body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the restore response of a Managed CCF Resource. - */ - ManagedCcfRestoreResponse restore(ManagedCcfRestore managedCcf, Context context); -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ManagedCcfBackup.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ManagedCcfBackup.java deleted file mode 100644 index c09a0a6d24cc..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ManagedCcfBackup.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Object representing Backup properties of a Managed CCF Resource. - */ -@Fluent -public final class ManagedCcfBackup implements JsonSerializable { - /* - * The region where the backup of the managed CCF resource will eventually be restored to. - */ - private String restoreRegion; - - /* - * SAS URI used to access the backup Fileshare. - */ - private String uri; - - /** - * Creates an instance of ManagedCcfBackup class. - */ - public ManagedCcfBackup() { - } - - /** - * Get the restoreRegion property: The region where the backup of the managed CCF resource will eventually be - * restored to. - * - * @return the restoreRegion value. - */ - public String restoreRegion() { - return this.restoreRegion; - } - - /** - * Set the restoreRegion property: The region where the backup of the managed CCF resource will eventually be - * restored to. - * - * @param restoreRegion the restoreRegion value to set. - * @return the ManagedCcfBackup object itself. - */ - public ManagedCcfBackup withRestoreRegion(String restoreRegion) { - this.restoreRegion = restoreRegion; - return this; - } - - /** - * Get the uri property: SAS URI used to access the backup Fileshare. - * - * @return the uri value. - */ - public String uri() { - return this.uri; - } - - /** - * Set the uri property: SAS URI used to access the backup Fileshare. - * - * @param uri the uri value to set. - * @return the ManagedCcfBackup object itself. - */ - public ManagedCcfBackup withUri(String uri) { - this.uri = uri; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (uri() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property uri in model ManagedCcfBackup")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ManagedCcfBackup.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("uri", this.uri); - jsonWriter.writeStringField("restoreRegion", this.restoreRegion); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedCcfBackup from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedCcfBackup if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ManagedCcfBackup. - */ - public static ManagedCcfBackup fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedCcfBackup deserializedManagedCcfBackup = new ManagedCcfBackup(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("uri".equals(fieldName)) { - deserializedManagedCcfBackup.uri = reader.getString(); - } else if ("restoreRegion".equals(fieldName)) { - deserializedManagedCcfBackup.restoreRegion = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedCcfBackup; - }); - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ManagedCcfBackupResponse.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ManagedCcfBackupResponse.java deleted file mode 100644 index 266d0f042da7..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ManagedCcfBackupResponse.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.models; - -import com.azure.resourcemanager.confidentialledger.fluent.models.ManagedCcfBackupResponseInner; - -/** - * An immutable client-side representation of ManagedCcfBackupResponse. - */ -public interface ManagedCcfBackupResponse { - /** - * Gets the message property: Response body stating if the managed CCF resource is being backed up. - * - * @return the message value. - */ - String message(); - - /** - * Gets the inner com.azure.resourcemanager.confidentialledger.fluent.models.ManagedCcfBackupResponseInner object. - * - * @return the inner object. - */ - ManagedCcfBackupResponseInner innerModel(); -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ManagedCcfList.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ManagedCcfList.java deleted file mode 100644 index 00223d869772..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ManagedCcfList.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.confidentialledger.fluent.models.ManagedCcfInner; -import java.io.IOException; -import java.util.List; - -/** - * Object that includes an array of Managed CCF and a possible link for next set. - */ -@Fluent -public final class ManagedCcfList implements JsonSerializable { - /* - * List of Managed CCF - */ - private List value; - - /* - * The URL the client should use to fetch the next page (per server side paging). - */ - private String nextLink; - - /** - * Creates an instance of ManagedCcfList class. - */ - public ManagedCcfList() { - } - - /** - * Get the value property: List of Managed CCF. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: List of Managed CCF. - * - * @param value the value value to set. - * @return the ManagedCcfList object itself. - */ - public ManagedCcfList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The URL the client should use to fetch the next page (per server side paging). - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The URL the client should use to fetch the next page (per server side paging). - * - * @param nextLink the nextLink value to set. - * @return the ManagedCcfList object itself. - */ - public ManagedCcfList 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedCcfList from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedCcfList if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ManagedCcfList. - */ - public static ManagedCcfList fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedCcfList deserializedManagedCcfList = new ManagedCcfList(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> ManagedCcfInner.fromJson(reader1)); - deserializedManagedCcfList.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedManagedCcfList.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedCcfList; - }); - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ManagedCcfProperties.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ManagedCcfProperties.java deleted file mode 100644 index e629337ea3d1..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ManagedCcfProperties.java +++ /dev/null @@ -1,255 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * ManagedCCFProperties - * - * Additional Managed CCF properties. - */ -@Fluent -public final class ManagedCcfProperties implements JsonSerializable { - /* - * Unique name for the Managed CCF. - */ - private String appName; - - /* - * Endpoint for calling Managed CCF Service. - */ - private String appUri; - - /* - * Endpoint for accessing network identity. - */ - private String identityServiceUri; - - /* - * List of member identity certificates for Managed CCF - */ - private List memberIdentityCertificates; - - /* - * Deployment Type of Managed CCF - */ - private DeploymentType deploymentType; - - /* - * Object representing RunningState for Managed CCF. - */ - private RunningState runningState; - - /* - * Provisioning state of Managed CCF Resource - */ - private ProvisioningState provisioningState; - - /* - * Number of CCF nodes in the Managed CCF. - */ - private Integer nodeCount; - - /** - * Creates an instance of ManagedCcfProperties class. - */ - public ManagedCcfProperties() { - } - - /** - * Get the appName property: Unique name for the Managed CCF. - * - * @return the appName value. - */ - public String appName() { - return this.appName; - } - - /** - * Get the appUri property: Endpoint for calling Managed CCF Service. - * - * @return the appUri value. - */ - public String appUri() { - return this.appUri; - } - - /** - * Get the identityServiceUri property: Endpoint for accessing network identity. - * - * @return the identityServiceUri value. - */ - public String identityServiceUri() { - return this.identityServiceUri; - } - - /** - * Get the memberIdentityCertificates property: List of member identity certificates for Managed CCF. - * - * @return the memberIdentityCertificates value. - */ - public List memberIdentityCertificates() { - return this.memberIdentityCertificates; - } - - /** - * Set the memberIdentityCertificates property: List of member identity certificates for Managed CCF. - * - * @param memberIdentityCertificates the memberIdentityCertificates value to set. - * @return the ManagedCcfProperties object itself. - */ - public ManagedCcfProperties - withMemberIdentityCertificates(List memberIdentityCertificates) { - this.memberIdentityCertificates = memberIdentityCertificates; - return this; - } - - /** - * Get the deploymentType property: Deployment Type of Managed CCF. - * - * @return the deploymentType value. - */ - public DeploymentType deploymentType() { - return this.deploymentType; - } - - /** - * Set the deploymentType property: Deployment Type of Managed CCF. - * - * @param deploymentType the deploymentType value to set. - * @return the ManagedCcfProperties object itself. - */ - public ManagedCcfProperties withDeploymentType(DeploymentType deploymentType) { - this.deploymentType = deploymentType; - return this; - } - - /** - * Get the runningState property: Object representing RunningState for Managed CCF. - * - * @return the runningState value. - */ - public RunningState runningState() { - return this.runningState; - } - - /** - * Set the runningState property: Object representing RunningState for Managed CCF. - * - * @param runningState the runningState value to set. - * @return the ManagedCcfProperties object itself. - */ - public ManagedCcfProperties withRunningState(RunningState runningState) { - this.runningState = runningState; - return this; - } - - /** - * Get the provisioningState property: Provisioning state of Managed CCF Resource. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the nodeCount property: Number of CCF nodes in the Managed CCF. - * - * @return the nodeCount value. - */ - public Integer nodeCount() { - return this.nodeCount; - } - - /** - * Set the nodeCount property: Number of CCF nodes in the Managed CCF. - * - * @param nodeCount the nodeCount value to set. - * @return the ManagedCcfProperties object itself. - */ - public ManagedCcfProperties withNodeCount(Integer nodeCount) { - this.nodeCount = nodeCount; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (memberIdentityCertificates() != null) { - memberIdentityCertificates().forEach(e -> e.validate()); - } - if (deploymentType() != null) { - deploymentType().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("memberIdentityCertificates", this.memberIdentityCertificates, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("deploymentType", this.deploymentType); - jsonWriter.writeStringField("runningState", this.runningState == null ? null : this.runningState.toString()); - jsonWriter.writeNumberField("nodeCount", this.nodeCount); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedCcfProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedCcfProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ManagedCcfProperties. - */ - public static ManagedCcfProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedCcfProperties deserializedManagedCcfProperties = new ManagedCcfProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("appName".equals(fieldName)) { - deserializedManagedCcfProperties.appName = reader.getString(); - } else if ("appUri".equals(fieldName)) { - deserializedManagedCcfProperties.appUri = reader.getString(); - } else if ("identityServiceUri".equals(fieldName)) { - deserializedManagedCcfProperties.identityServiceUri = reader.getString(); - } else if ("memberIdentityCertificates".equals(fieldName)) { - List memberIdentityCertificates - = reader.readArray(reader1 -> MemberIdentityCertificate.fromJson(reader1)); - deserializedManagedCcfProperties.memberIdentityCertificates = memberIdentityCertificates; - } else if ("deploymentType".equals(fieldName)) { - deserializedManagedCcfProperties.deploymentType = DeploymentType.fromJson(reader); - } else if ("runningState".equals(fieldName)) { - deserializedManagedCcfProperties.runningState = RunningState.fromString(reader.getString()); - } else if ("provisioningState".equals(fieldName)) { - deserializedManagedCcfProperties.provisioningState - = ProvisioningState.fromString(reader.getString()); - } else if ("nodeCount".equals(fieldName)) { - deserializedManagedCcfProperties.nodeCount = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedCcfProperties; - }); - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ManagedCcfRestore.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ManagedCcfRestore.java deleted file mode 100644 index 22ffcb4a0703..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ManagedCcfRestore.java +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Object representing Restore properties of Managed CCF Resource. - */ -@Fluent -public final class ManagedCcfRestore implements JsonSerializable { - /* - * Fileshare where the managed CCF resource backup is stored. - */ - private String fileShareName; - - /* - * The region the managed CCF resource is being restored to. - */ - private String restoreRegion; - - /* - * SAS URI used to access the backup Fileshare. - */ - private String uri; - - /** - * Creates an instance of ManagedCcfRestore class. - */ - public ManagedCcfRestore() { - } - - /** - * Get the fileShareName property: Fileshare where the managed CCF resource backup is stored. - * - * @return the fileShareName value. - */ - public String fileShareName() { - return this.fileShareName; - } - - /** - * Set the fileShareName property: Fileshare where the managed CCF resource backup is stored. - * - * @param fileShareName the fileShareName value to set. - * @return the ManagedCcfRestore object itself. - */ - public ManagedCcfRestore withFileShareName(String fileShareName) { - this.fileShareName = fileShareName; - return this; - } - - /** - * Get the restoreRegion property: The region the managed CCF resource is being restored to. - * - * @return the restoreRegion value. - */ - public String restoreRegion() { - return this.restoreRegion; - } - - /** - * Set the restoreRegion property: The region the managed CCF resource is being restored to. - * - * @param restoreRegion the restoreRegion value to set. - * @return the ManagedCcfRestore object itself. - */ - public ManagedCcfRestore withRestoreRegion(String restoreRegion) { - this.restoreRegion = restoreRegion; - return this; - } - - /** - * Get the uri property: SAS URI used to access the backup Fileshare. - * - * @return the uri value. - */ - public String uri() { - return this.uri; - } - - /** - * Set the uri property: SAS URI used to access the backup Fileshare. - * - * @param uri the uri value to set. - * @return the ManagedCcfRestore object itself. - */ - public ManagedCcfRestore withUri(String uri) { - this.uri = uri; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (fileShareName() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property fileShareName in model ManagedCcfRestore")); - } - if (restoreRegion() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property restoreRegion in model ManagedCcfRestore")); - } - if (uri() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property uri in model ManagedCcfRestore")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ManagedCcfRestore.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("fileShareName", this.fileShareName); - jsonWriter.writeStringField("restoreRegion", this.restoreRegion); - jsonWriter.writeStringField("uri", this.uri); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedCcfRestore from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedCcfRestore if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ManagedCcfRestore. - */ - public static ManagedCcfRestore fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedCcfRestore deserializedManagedCcfRestore = new ManagedCcfRestore(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("fileShareName".equals(fieldName)) { - deserializedManagedCcfRestore.fileShareName = reader.getString(); - } else if ("restoreRegion".equals(fieldName)) { - deserializedManagedCcfRestore.restoreRegion = reader.getString(); - } else if ("uri".equals(fieldName)) { - deserializedManagedCcfRestore.uri = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedCcfRestore; - }); - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ManagedCcfRestoreResponse.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ManagedCcfRestoreResponse.java deleted file mode 100644 index 398f4301a584..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ManagedCcfRestoreResponse.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.models; - -import com.azure.resourcemanager.confidentialledger.fluent.models.ManagedCcfRestoreResponseInner; - -/** - * An immutable client-side representation of ManagedCcfRestoreResponse. - */ -public interface ManagedCcfRestoreResponse { - /** - * Gets the message property: Response body stating if the managed CCF resource is being restored. - * - * @return the message value. - */ - String message(); - - /** - * Gets the inner com.azure.resourcemanager.confidentialledger.fluent.models.ManagedCcfRestoreResponseInner object. - * - * @return the inner object. - */ - ManagedCcfRestoreResponseInner innerModel(); -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ManagedCcfs.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ManagedCcfs.java deleted file mode 100644 index b0ec1b6d9fa4..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ManagedCcfs.java +++ /dev/null @@ -1,251 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.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 ManagedCcfs. - */ -public interface ManagedCcfs { - /** - * Retrieves information about a Managed CCF resource. - * - * Retrieves the properties of a Managed CCF app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed CCF along with {@link Response}. - */ - Response getByResourceGroupWithResponse(String resourceGroupName, String appName, Context context); - - /** - * Retrieves information about a Managed CCF resource. - * - * Retrieves the properties of a Managed CCF app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed CCF. - */ - ManagedCcf getByResourceGroup(String resourceGroupName, String appName); - - /** - * Deletes a Managed CCF resource. - * - * Deletes an existing Managed CCF. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 appName); - - /** - * Deletes a Managed CCF resource. - * - * Deletes an existing Managed CCF. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 appName, Context context); - - /** - * Retrieves information about all Managed CCF resources under the given subscription and resource group - * - * Retrieves the properties of all Managed CCF apps. - * - * @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 object that includes an array of Managed CCF and a possible link for next set as paginated response with - * {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Retrieves information about all Managed CCF resources under the given subscription and resource group - * - * Retrieves the properties of all Managed CCF apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object that includes an array of Managed CCF and a possible link for next set as paginated response with - * {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName, String filter, Context context); - - /** - * Retrieves information about all Managed CCF resources under the given subscription - * - * Retrieves the properties of all Managed CCF. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object that includes an array of Managed CCF and a possible link for next set as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * Retrieves information about all Managed CCF resources under the given subscription - * - * Retrieves the properties of all Managed CCF. - * - * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object that includes an array of Managed CCF and a possible link for next set as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String filter, Context context); - - /** - * Performs the backup operation on a Managed CCF Resource. - * - * Backs up a Managed CCF Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Managed CCF Backup Request Body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the backup response of a Managed CCF Resource. - */ - ManagedCcfBackupResponse backup(String resourceGroupName, String appName, ManagedCcfBackup managedCcf); - - /** - * Performs the backup operation on a Managed CCF Resource. - * - * Backs up a Managed CCF Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Managed CCF Backup Request Body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the backup response of a Managed CCF Resource. - */ - ManagedCcfBackupResponse backup(String resourceGroupName, String appName, ManagedCcfBackup managedCcf, - Context context); - - /** - * Performs the restore operation to spin up a newly restored Managed CCF Resource. - * - * Restores a Managed CCF Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Managed CCF Restore Request Body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the restore response of a Managed CCF Resource. - */ - ManagedCcfRestoreResponse restore(String resourceGroupName, String appName, ManagedCcfRestore managedCcf); - - /** - * Performs the restore operation to spin up a newly restored Managed CCF Resource. - * - * Restores a Managed CCF Resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Managed CCF. - * @param managedCcf Managed CCF Restore Request Body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the restore response of a Managed CCF Resource. - */ - ManagedCcfRestoreResponse restore(String resourceGroupName, String appName, ManagedCcfRestore managedCcf, - Context context); - - /** - * Retrieves information about a Managed CCF resource. - * - * Retrieves the properties of a Managed CCF app. - * - * @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 managed CCF along with {@link Response}. - */ - ManagedCcf getById(String id); - - /** - * Retrieves information about a Managed CCF resource. - * - * Retrieves the properties of a Managed CCF app. - * - * @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 managed CCF along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes a Managed CCF resource. - * - * Deletes an existing Managed CCF. - * - * @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); - - /** - * Deletes a Managed CCF resource. - * - * Deletes an existing Managed CCF. - * - * @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. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new ManagedCcf resource. - * - * @param name resource name. - * @return the first stage of the new ManagedCcf definition. - */ - ManagedCcf.DefinitionStages.Blank define(String name); -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/MemberIdentityCertificate.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/MemberIdentityCertificate.java deleted file mode 100644 index b154361a1431..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/MemberIdentityCertificate.java +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * MemberIdentityCertificate - * - * Object representing MemberIdentityCertificate for Managed CCF. - */ -@Fluent -public final class MemberIdentityCertificate implements JsonSerializable { - /* - * Member Identity Certificate - */ - private String certificate; - - /* - * Member Identity Certificate Encryption Key - */ - private String encryptionkey; - - /* - * Anything - */ - private Object tags; - - /** - * Creates an instance of MemberIdentityCertificate class. - */ - public MemberIdentityCertificate() { - } - - /** - * Get the certificate property: Member Identity Certificate. - * - * @return the certificate value. - */ - public String certificate() { - return this.certificate; - } - - /** - * Set the certificate property: Member Identity Certificate. - * - * @param certificate the certificate value to set. - * @return the MemberIdentityCertificate object itself. - */ - public MemberIdentityCertificate withCertificate(String certificate) { - this.certificate = certificate; - return this; - } - - /** - * Get the encryptionkey property: Member Identity Certificate Encryption Key. - * - * @return the encryptionkey value. - */ - public String encryptionkey() { - return this.encryptionkey; - } - - /** - * Set the encryptionkey property: Member Identity Certificate Encryption Key. - * - * @param encryptionkey the encryptionkey value to set. - * @return the MemberIdentityCertificate object itself. - */ - public MemberIdentityCertificate withEncryptionkey(String encryptionkey) { - this.encryptionkey = encryptionkey; - return this; - } - - /** - * Get the tags property: Anything. - * - * @return the tags value. - */ - public Object tags() { - return this.tags; - } - - /** - * Set the tags property: Anything. - * - * @param tags the tags value to set. - * @return the MemberIdentityCertificate object itself. - */ - public MemberIdentityCertificate withTags(Object tags) { - this.tags = tags; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("certificate", this.certificate); - jsonWriter.writeStringField("encryptionkey", this.encryptionkey); - jsonWriter.writeUntypedField("tags", this.tags); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MemberIdentityCertificate from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MemberIdentityCertificate if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the MemberIdentityCertificate. - */ - public static MemberIdentityCertificate fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MemberIdentityCertificate deserializedMemberIdentityCertificate = new MemberIdentityCertificate(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("certificate".equals(fieldName)) { - deserializedMemberIdentityCertificate.certificate = reader.getString(); - } else if ("encryptionkey".equals(fieldName)) { - deserializedMemberIdentityCertificate.encryptionkey = reader.getString(); - } else if ("tags".equals(fieldName)) { - deserializedMemberIdentityCertificate.tags = reader.readUntyped(); - } else { - reader.skipChildren(); - } - } - - return deserializedMemberIdentityCertificate; - }); - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ResourceLocation.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ResourceLocation.java new file mode 100644 index 000000000000..534d39d5559f --- /dev/null +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ResourceLocation.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confidentialledger.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Location of the ARM Resource. + */ +@Fluent +public class ResourceLocation implements JsonSerializable { + /* + * The Azure location where the Confidential Ledger is running. + */ + private String location; + + /** + * Creates an instance of ResourceLocation class. + */ + public ResourceLocation() { + } + + /** + * Get the location property: The Azure location where the Confidential Ledger is running. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The Azure location where the Confidential Ledger is running. + * + * @param location the location value to set. + * @return the ResourceLocation object itself. + */ + public ResourceLocation withLocation(String location) { + this.location = location; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", this.location); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceLocation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceLocation if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ResourceLocation. + */ + public static ResourceLocation fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceLocation deserializedResourceLocation = new ResourceLocation(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("location".equals(fieldName)) { + deserializedResourceLocation.location = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceLocation; + }); + } +} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/RunningState.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/RunningState.java deleted file mode 100644 index 5af5b28920d7..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/RunningState.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Object representing RunningState for Confidential Ledger. - */ -public final class RunningState extends ExpandableStringEnum { - /** - * Static value Active for RunningState. - */ - public static final RunningState ACTIVE = fromString("Active"); - - /** - * Static value Paused for RunningState. - */ - public static final RunningState PAUSED = fromString("Paused"); - - /** - * Static value Unknown for RunningState. - */ - public static final RunningState UNKNOWN = fromString("Unknown"); - - /** - * Static value Pausing for RunningState. - */ - public static final RunningState PAUSING = fromString("Pausing"); - - /** - * Static value Resuming for RunningState. - */ - public static final RunningState RESUMING = fromString("Resuming"); - - /** - * Creates a new instance of RunningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RunningState() { - } - - /** - * Creates or finds a RunningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding RunningState. - */ - public static RunningState fromString(String name) { - return fromString(name, RunningState.class); - } - - /** - * Gets known RunningState values. - * - * @return known RunningState values. - */ - public static Collection values() { - return values(RunningState.class); - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/Tags.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/Tags.java new file mode 100644 index 000000000000..16a8df88ed8b --- /dev/null +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/Tags.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confidentialledger.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * Tags for Confidential Ledger Resource. + */ +@Fluent +public class Tags implements JsonSerializable { + /* + * Additional tags for Confidential Ledger + */ + private Map tags; + + /** + * Creates an instance of Tags class. + */ + public Tags() { + } + + /** + * Get the tags property: Additional tags for Confidential Ledger. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Additional tags for Confidential Ledger. + * + * @param tags the tags value to set. + * @return the Tags object itself. + */ + public Tags withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Tags from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Tags if the JsonReader was pointing to an instance of it, or null if it was pointing to + * JSON null. + * @throws IOException If an error occurs while reading the Tags. + */ + public static Tags fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Tags deserializedTags = new Tags(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedTags.tags = tags; + } else { + reader.skipChildren(); + } + } + + return deserializedTags; + }); + } +} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-confidentialledger/proxy-config.json b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-confidentialledger/proxy-config.json index ec5982867cfd..d307eb3fcb47 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-confidentialledger/proxy-config.json +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-confidentialledger/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.confidentialledger.implementation.LedgersClientImpl$LedgersService"],["com.azure.resourcemanager.confidentialledger.implementation.ManagedCcfsClientImpl$ManagedCcfsService"],["com.azure.resourcemanager.confidentialledger.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.confidentialledger.implementation.ResourceProvidersClientImpl$ResourceProvidersService"]] \ No newline at end of file +[["com.azure.resourcemanager.confidentialledger.implementation.LedgersClientImpl$LedgersService"],["com.azure.resourcemanager.confidentialledger.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.confidentialledger.implementation.ResourceProvidersClientImpl$ResourceProvidersService"]] \ No newline at end of file diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/LedgerBackupSamples.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/LedgerBackupSamples.java deleted file mode 100644 index db734cf4b939..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/LedgerBackupSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.generated; - -import com.azure.resourcemanager.confidentialledger.models.ConfidentialLedgerBackup; - -/** - * Samples for Ledger Backup. - */ -public final class LedgerBackupSamples { - /* - * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-06-28-preview/ - * examples/ConfidentialLedger_Backup.json - */ - /** - * Sample code: ConfidentialLedgerBackup. - * - * @param manager Entry point to ConfidentialLedgerManager. - */ - public static void - confidentialLedgerBackup(com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { - manager.ledgers() - .backup("DummyResourceGroupName", "DummyLedgerName", - new ConfidentialLedgerBackup().withRestoreRegion("EastUS").withUri("DummySASUri"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/LedgerCreateSamples.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/LedgerCreateSamples.java index 5c790caa2f42..5ae82ffa688f 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/LedgerCreateSamples.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/LedgerCreateSamples.java @@ -8,7 +8,6 @@ import com.azure.resourcemanager.confidentialledger.models.CertBasedSecurityPrincipal; import com.azure.resourcemanager.confidentialledger.models.LedgerProperties; import com.azure.resourcemanager.confidentialledger.models.LedgerRoleName; -import com.azure.resourcemanager.confidentialledger.models.LedgerSku; import com.azure.resourcemanager.confidentialledger.models.LedgerType; import java.util.Arrays; import java.util.HashMap; @@ -20,8 +19,8 @@ public final class LedgerCreateSamples { /* * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-06-28-preview/ - * examples/ConfidentialLedger_Create.json + * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/stable/2022-05-13/examples/ + * ConfidentialLedger_Create.json */ /** * Sample code: ConfidentialLedgerCreate. @@ -32,11 +31,10 @@ public final class LedgerCreateSamples { confidentialLedgerCreate(com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { manager.ledgers() .define("DummyLedgerName") - .withRegion("EastUS") .withExistingResourceGroup("DummyResourceGroupName") + .withRegion("EastUS") .withTags(mapOf("additionalProps1", "additional properties")) .withProperties(new LedgerProperties().withLedgerType(LedgerType.PUBLIC) - .withLedgerSku(LedgerSku.STANDARD) .withAadBasedSecurityPrincipals(Arrays .asList(new AadBasedSecurityPrincipal().withPrincipalId("34621747-6fc8-4771-a2eb-72f31c461f2e") .withTenantId("bce123b9-2b7b-4975-8360-5ca0b9b1cd08") diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/LedgerDeleteSamples.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/LedgerDeleteSamples.java index 9ba9ff879a1c..fc03140a011c 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/LedgerDeleteSamples.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/LedgerDeleteSamples.java @@ -10,8 +10,8 @@ public final class LedgerDeleteSamples { /* * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-06-28-preview/ - * examples/ConfidentialLedger_Delete.json + * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/stable/2022-05-13/examples/ + * ConfidentialLedger_Delete.json */ /** * Sample code: ConfidentialLedgerDelete. diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/LedgerGetByResourceGroupSamples.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/LedgerGetByResourceGroupSamples.java index ef227299f1bb..5da3f1711484 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/LedgerGetByResourceGroupSamples.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/LedgerGetByResourceGroupSamples.java @@ -10,8 +10,8 @@ public final class LedgerGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-06-28-preview/ - * examples/ConfidentialLedger_Get.json + * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/stable/2022-05-13/examples/ + * ConfidentialLedger_Get.json */ /** * Sample code: ConfidentialLedgerGet. diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/LedgerListByResourceGroupSamples.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/LedgerListByResourceGroupSamples.java index bf9b4bf1eb6d..ed585901821e 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/LedgerListByResourceGroupSamples.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/LedgerListByResourceGroupSamples.java @@ -10,8 +10,8 @@ public final class LedgerListByResourceGroupSamples { /* * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-06-28-preview/ - * examples/ConfidentialLedger_List.json + * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/stable/2022-05-13/examples/ + * ConfidentialLedger_List.json */ /** * Sample code: ConfidentialLedgerList. diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/LedgerListSamples.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/LedgerListSamples.java index 3760f568a74b..c13c05152424 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/LedgerListSamples.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/LedgerListSamples.java @@ -10,8 +10,8 @@ public final class LedgerListSamples { /* * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-06-28-preview/ - * examples/ConfidentialLedger_ListBySub.json + * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/stable/2022-05-13/examples/ + * ConfidentialLedger_ListBySub.json */ /** * Sample code: ConfidentialLedgerListBySub. diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/LedgerRestoreSamples.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/LedgerRestoreSamples.java deleted file mode 100644 index 74cef2750da2..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/LedgerRestoreSamples.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.generated; - -import com.azure.resourcemanager.confidentialledger.models.ConfidentialLedgerRestore; - -/** - * Samples for Ledger Restore. - */ -public final class LedgerRestoreSamples { - /* - * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-06-28-preview/ - * examples/ConfidentialLedger_Restore.json - */ - /** - * Sample code: ConfidentialLedgerRestore. - * - * @param manager Entry point to ConfidentialLedgerManager. - */ - public static void - confidentialLedgerRestore(com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { - manager.ledgers() - .restore("DummyResourceGroupName", "DummyLedgerName", - new ConfidentialLedgerRestore().withFileShareName("DummyFileShareName") - .withRestoreRegion("EastUS") - .withUri("DummySASUri"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/LedgerUpdateSamples.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/LedgerUpdateSamples.java index 1e6d064b2b55..cc38bc51766e 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/LedgerUpdateSamples.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/LedgerUpdateSamples.java @@ -20,8 +20,8 @@ public final class LedgerUpdateSamples { /* * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-06-28-preview/ - * examples/ConfidentialLedger_Update.json + * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/stable/2022-05-13/examples/ + * ConfidentialLedger_Update.json */ /** * Sample code: ConfidentialLedgerUpdate. diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfBackupSamples.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfBackupSamples.java deleted file mode 100644 index 09b01164c249..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfBackupSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.generated; - -import com.azure.resourcemanager.confidentialledger.models.ManagedCcfBackup; - -/** - * Samples for ManagedCcf Backup. - */ -public final class ManagedCcfBackupSamples { - /* - * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-06-28-preview/ - * examples/ManagedCCF_Backup.json - */ - /** - * Sample code: ManagedCCFBackup. - * - * @param manager Entry point to ConfidentialLedgerManager. - */ - public static void - managedCCFBackup(com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { - manager.managedCcfs() - .backup("DummyResourceGroupName", "DummyMccfAppName", - new ManagedCcfBackup().withRestoreRegion("EastUS").withUri("DummySASUri"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfCreateSamples.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfCreateSamples.java deleted file mode 100644 index 45897b3d29b1..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfCreateSamples.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.generated; - -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.confidentialledger.models.DeploymentType; -import com.azure.resourcemanager.confidentialledger.models.LanguageRuntime; -import com.azure.resourcemanager.confidentialledger.models.ManagedCcfProperties; -import com.azure.resourcemanager.confidentialledger.models.MemberIdentityCertificate; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for ManagedCcf Create. - */ -public final class ManagedCcfCreateSamples { - /* - * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-06-28-preview/ - * examples/ManagedCCF_Create.json - */ - /** - * Sample code: ManagedCCFCreate. - * - * @param manager Entry point to ConfidentialLedgerManager. - */ - public static void managedCCFCreate(com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) - throws IOException { - manager.managedCcfs() - .define("DummyMccfAppName") - .withRegion("EastUS") - .withExistingResourceGroup("DummyResourceGroupName") - .withTags(mapOf("additionalProps1", "additional properties")) - .withProperties(new ManagedCcfProperties() - .withMemberIdentityCertificates(Arrays.asList(new MemberIdentityCertificate().withCertificate( - "-----BEGIN CERTIFICATE-----MIIBsjCCATigAwIBAgIUZWIbyG79TniQLd2UxJuU74tqrKcwCgYIKoZIzj0EAwMwEDEOMAwGA1UEAwwFdXNlcjAwHhcNMjEwMzE2MTgwNjExWhcNMjIwMzE2MTgwNjExWjAQMQ4wDAYDVQQDDAV1c2VyMDB2MBAGByqGSM49AgEGBSuBBAAiA2IABBiWSo/j8EFit7aUMm5lF+lUmCu+IgfnpFD+7QMgLKtxRJ3aGSqgS/GpqcYVGddnODtSarNE/HyGKUFUolLPQ5ybHcouUk0kyfA7XMeSoUA4lBz63Wha8wmXo+NdBRo39qNTMFEwHQYDVR0OBBYEFPtuhrwgGjDFHeUUT4nGsXaZn69KMB8GA1UdIwQYMBaAFPtuhrwgGjDFHeUUT4nGsXaZn69KMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwMDaAAwZQIxAOnozm2CyqRwSSQLls5r+mUHRGRyXHXwYtM4Dcst/VEZdmS9fqvHRCHbjUlO/+HNfgIwMWZ4FmsjD3wnPxONOm9YdVn/PRD7SsPRPbOjwBiE4EBGaHDsLjYAGDSGi7NJnSkA-----END CERTIFICATE-----") - .withEncryptionkey("fakeTokenPlaceholder") - .withTags(SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{\"additionalProps1\":\"additional properties\"}", Object.class, - SerializerEncoding.JSON)))) - .withDeploymentType(new DeploymentType().withLanguageRuntime(LanguageRuntime.CPP) - .withAppSourceUri( - "https://myaccount.blob.core.windows.net/storage/mccfsource?sv=2022-02-11%st=2022-03-11")) - .withNodeCount(5)) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfDeleteSamples.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfDeleteSamples.java deleted file mode 100644 index 9bf1ea31fdc2..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.generated; - -/** - * Samples for ManagedCcf Delete. - */ -public final class ManagedCcfDeleteSamples { - /* - * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-06-28-preview/ - * examples/ManagedCCF_Delete.json - */ - /** - * Sample code: ConfidentialLedgerDelete. - * - * @param manager Entry point to ConfidentialLedgerManager. - */ - public static void - confidentialLedgerDelete(com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { - manager.managedCcfs().delete("DummyResourceGroupName", "DummyMccfAppName", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfGetByResourceGroupSamples.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfGetByResourceGroupSamples.java deleted file mode 100644 index ad440dd09488..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfGetByResourceGroupSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.generated; - -/** - * Samples for ManagedCcf GetByResourceGroup. - */ -public final class ManagedCcfGetByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-06-28-preview/ - * examples/ManagedCCF_Get.json - */ - /** - * Sample code: ManagedCCFGet. - * - * @param manager Entry point to ConfidentialLedgerManager. - */ - public static void managedCCFGet(com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { - manager.managedCcfs() - .getByResourceGroupWithResponse("DummyResourceGroupName", "DummyMccfAppName", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfListByResourceGroupSamples.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfListByResourceGroupSamples.java deleted file mode 100644 index 41b618af1f1d..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfListByResourceGroupSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.generated; - -/** - * Samples for ManagedCcf ListByResourceGroup. - */ -public final class ManagedCcfListByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-06-28-preview/ - * examples/ManagedCCF_List.json - */ - /** - * Sample code: ManagedCCFList. - * - * @param manager Entry point to ConfidentialLedgerManager. - */ - public static void managedCCFList(com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { - manager.managedCcfs().listByResourceGroup("DummyResourceGroupName", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfListSamples.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfListSamples.java deleted file mode 100644 index daf71398fd2b..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfListSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.generated; - -/** - * Samples for ManagedCcf List. - */ -public final class ManagedCcfListSamples { - /* - * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-06-28-preview/ - * examples/ManagedCCF_ListBySub.json - */ - /** - * Sample code: ManagedCCFListBySub. - * - * @param manager Entry point to ConfidentialLedgerManager. - */ - public static void - managedCCFListBySub(com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { - manager.managedCcfs().list(null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfRestoreSamples.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfRestoreSamples.java deleted file mode 100644 index 7432c27dc529..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfRestoreSamples.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.generated; - -import com.azure.resourcemanager.confidentialledger.models.ManagedCcfRestore; - -/** - * Samples for ManagedCcf Restore. - */ -public final class ManagedCcfRestoreSamples { - /* - * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-06-28-preview/ - * examples/ManagedCCF_Restore.json - */ - /** - * Sample code: ManagedCCFRestore. - * - * @param manager Entry point to ConfidentialLedgerManager. - */ - public static void - managedCCFRestore(com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { - manager.managedCcfs() - .restore("DummyResourceGroupName", "DummyMccfAppName", - new ManagedCcfRestore().withFileShareName("DummyFileShareName") - .withRestoreRegion("EastUS") - .withUri("DummySASUri"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfUpdateSamples.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfUpdateSamples.java deleted file mode 100644 index c3dca3d2e88f..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfUpdateSamples.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.generated; - -import com.azure.resourcemanager.confidentialledger.models.DeploymentType; -import com.azure.resourcemanager.confidentialledger.models.LanguageRuntime; -import com.azure.resourcemanager.confidentialledger.models.ManagedCcf; -import com.azure.resourcemanager.confidentialledger.models.ManagedCcfProperties; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for ManagedCcf Update. - */ -public final class ManagedCcfUpdateSamples { - /* - * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-06-28-preview/ - * examples/ManagedCCF_Update.json - */ - /** - * Sample code: ManagedCCFUpdate. - * - * @param manager Entry point to ConfidentialLedgerManager. - */ - public static void - managedCCFUpdate(com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { - ManagedCcf resource = manager.managedCcfs() - .getByResourceGroupWithResponse("DummyResourceGroupName", "DummyMccfAppName", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withTags(mapOf("additionalProps1", "additional properties")) - .withProperties(new ManagedCcfProperties() - .withDeploymentType(new DeploymentType().withLanguageRuntime(LanguageRuntime.CPP) - .withAppSourceUri( - "https://myaccount.blob.core.windows.net/storage/mccfsource?sv=2022-02-11%st=2022-03-11"))) - .apply(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/OperationsListSamples.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/OperationsListSamples.java index ccf5230ebd33..102d5d7337b3 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/OperationsListSamples.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/OperationsListSamples.java @@ -10,8 +10,8 @@ public final class OperationsListSamples { /* * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-06-28-preview/ - * examples/Operations_Get.json + * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/stable/2022-05-13/examples/ + * Operations_Get.json */ /** * Sample code: OperationsGet. diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/ResourceProviderCheckNameAvailabilitySamples.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/ResourceProviderCheckNameAvailabilitySamples.java index 4453ca450857..bf8525effead 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/ResourceProviderCheckNameAvailabilitySamples.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/ResourceProviderCheckNameAvailabilitySamples.java @@ -12,8 +12,8 @@ public final class ResourceProviderCheckNameAvailabilitySamples { /* * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-06-28-preview/ - * examples/CheckNameAvailability.json + * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/stable/2022-05-13/examples/ + * CheckNameAvailability.json */ /** * Sample code: CheckNameAvailability. diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/AadBasedSecurityPrincipalTests.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/AadBasedSecurityPrincipalTests.java index fe32e4ebad86..195ea7285502 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/AadBasedSecurityPrincipalTests.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/AadBasedSecurityPrincipalTests.java @@ -13,21 +13,21 @@ public final class AadBasedSecurityPrincipalTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AadBasedSecurityPrincipal model = BinaryData - .fromString("{\"principalId\":\"ljofxqeofjaeqjh\",\"tenantId\":\"b\",\"ledgerRoleName\":\"Reader\"}") + .fromString("{\"principalId\":\"qi\",\"tenantId\":\"hungbwjzrnf\",\"ledgerRoleName\":\"Administrator\"}") .toObject(AadBasedSecurityPrincipal.class); - Assertions.assertEquals("ljofxqeofjaeqjh", model.principalId()); - Assertions.assertEquals("b", model.tenantId()); - Assertions.assertEquals(LedgerRoleName.READER, model.ledgerRoleName()); + Assertions.assertEquals("qi", model.principalId()); + Assertions.assertEquals("hungbwjzrnf", model.tenantId()); + Assertions.assertEquals(LedgerRoleName.ADMINISTRATOR, model.ledgerRoleName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AadBasedSecurityPrincipal model = new AadBasedSecurityPrincipal().withPrincipalId("ljofxqeofjaeqjh") - .withTenantId("b") - .withLedgerRoleName(LedgerRoleName.READER); + AadBasedSecurityPrincipal model = new AadBasedSecurityPrincipal().withPrincipalId("qi") + .withTenantId("hungbwjzrnf") + .withLedgerRoleName(LedgerRoleName.ADMINISTRATOR); model = BinaryData.fromObject(model).toObject(AadBasedSecurityPrincipal.class); - Assertions.assertEquals("ljofxqeofjaeqjh", model.principalId()); - Assertions.assertEquals("b", model.tenantId()); - Assertions.assertEquals(LedgerRoleName.READER, model.ledgerRoleName()); + Assertions.assertEquals("qi", model.principalId()); + Assertions.assertEquals("hungbwjzrnf", model.tenantId()); + Assertions.assertEquals(LedgerRoleName.ADMINISTRATOR, model.ledgerRoleName()); } } diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/CertBasedSecurityPrincipalTests.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/CertBasedSecurityPrincipalTests.java index f6613ec4429e..98675d354c14 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/CertBasedSecurityPrincipalTests.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/CertBasedSecurityPrincipalTests.java @@ -13,18 +13,18 @@ public final class CertBasedSecurityPrincipalTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CertBasedSecurityPrincipal model - = BinaryData.fromString("{\"cert\":\"smjqulngsntnbyb\",\"ledgerRoleName\":\"Reader\"}") + = BinaryData.fromString("{\"cert\":\"ispe\",\"ledgerRoleName\":\"Contributor\"}") .toObject(CertBasedSecurityPrincipal.class); - Assertions.assertEquals("smjqulngsntnbyb", model.cert()); - Assertions.assertEquals(LedgerRoleName.READER, model.ledgerRoleName()); + Assertions.assertEquals("ispe", model.cert()); + Assertions.assertEquals(LedgerRoleName.CONTRIBUTOR, model.ledgerRoleName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { CertBasedSecurityPrincipal model - = new CertBasedSecurityPrincipal().withCert("smjqulngsntnbyb").withLedgerRoleName(LedgerRoleName.READER); + = new CertBasedSecurityPrincipal().withCert("ispe").withLedgerRoleName(LedgerRoleName.CONTRIBUTOR); model = BinaryData.fromObject(model).toObject(CertBasedSecurityPrincipal.class); - Assertions.assertEquals("smjqulngsntnbyb", model.cert()); - Assertions.assertEquals(LedgerRoleName.READER, model.ledgerRoleName()); + Assertions.assertEquals("ispe", model.cert()); + Assertions.assertEquals(LedgerRoleName.CONTRIBUTOR, model.ledgerRoleName()); } } diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ConfidentialLedgerBackupResponseInnerTests.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ConfidentialLedgerBackupResponseInnerTests.java deleted file mode 100644 index 1f0306426123..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ConfidentialLedgerBackupResponseInnerTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.confidentialledger.fluent.models.ConfidentialLedgerBackupResponseInner; - -public final class ConfidentialLedgerBackupResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ConfidentialLedgerBackupResponseInner model - = BinaryData.fromString("{\"message\":\"majtjaod\"}").toObject(ConfidentialLedgerBackupResponseInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ConfidentialLedgerBackupResponseInner model = new ConfidentialLedgerBackupResponseInner(); - model = BinaryData.fromObject(model).toObject(ConfidentialLedgerBackupResponseInner.class); - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ConfidentialLedgerBackupTests.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ConfidentialLedgerBackupTests.java deleted file mode 100644 index 8f78095cb352..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ConfidentialLedgerBackupTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.confidentialledger.models.ConfidentialLedgerBackup; -import org.junit.jupiter.api.Assertions; - -public final class ConfidentialLedgerBackupTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ConfidentialLedgerBackup model = BinaryData.fromString("{\"restoreRegion\":\"ocxscpaierhhbcs\",\"uri\":\"l\"}") - .toObject(ConfidentialLedgerBackup.class); - Assertions.assertEquals("ocxscpaierhhbcs", model.restoreRegion()); - Assertions.assertEquals("l", model.uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ConfidentialLedgerBackup model - = new ConfidentialLedgerBackup().withRestoreRegion("ocxscpaierhhbcs").withUri("l"); - model = BinaryData.fromObject(model).toObject(ConfidentialLedgerBackup.class); - Assertions.assertEquals("ocxscpaierhhbcs", model.restoreRegion()); - Assertions.assertEquals("l", model.uri()); - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ConfidentialLedgerInnerTests.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ConfidentialLedgerInnerTests.java index 1a6e1432ceaa..6167c2e27fbe 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ConfidentialLedgerInnerTests.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ConfidentialLedgerInnerTests.java @@ -10,9 +10,7 @@ import com.azure.resourcemanager.confidentialledger.models.CertBasedSecurityPrincipal; import com.azure.resourcemanager.confidentialledger.models.LedgerProperties; import com.azure.resourcemanager.confidentialledger.models.LedgerRoleName; -import com.azure.resourcemanager.confidentialledger.models.LedgerSku; import com.azure.resourcemanager.confidentialledger.models.LedgerType; -import com.azure.resourcemanager.confidentialledger.models.RunningState; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -22,57 +20,51 @@ public final class ConfidentialLedgerInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ConfidentialLedgerInner model = BinaryData.fromString( - "{\"properties\":{\"ledgerName\":\"lzufcyzkohdbi\",\"ledgerUri\":\"nufhf\",\"identityServiceUri\":\"jysagith\",\"ledgerInternalNamespace\":\"hab\",\"runningState\":\"Pausing\",\"ledgerType\":\"Private\",\"provisioningState\":\"Updating\",\"ledgerSku\":\"Basic\",\"aadBasedSecurityPrincipals\":[{\"principalId\":\"cnpqxuhivyqniwby\",\"tenantId\":\"k\",\"ledgerRoleName\":\"Contributor\"},{\"principalId\":\"mjgr\",\"tenantId\":\"wvukx\",\"ledgerRoleName\":\"Administrator\"}],\"certBasedSecurityPrincipals\":[{\"cert\":\"snhsjcnyejhkryh\",\"ledgerRoleName\":\"Reader\"},{\"cert\":\"czwlokjyem\",\"ledgerRoleName\":\"Administrator\"}]},\"location\":\"ipjoxzjnchgejs\",\"tags\":{\"ahuxinpm\":\"mailzydehojw\",\"vcputegj\":\"njaqwixjspro\",\"uuvmkjozkrwfnd\":\"wmfdatscmdvpjhul\",\"vwryoqpso\":\"odjpslwejd\"},\"id\":\"cctazakljlahbc\",\"name\":\"yffdfdos\",\"type\":\"gexpaojakhmsbz\"}") + "{\"properties\":{\"ledgerName\":\"lzufcyzkohdbi\",\"ledgerUri\":\"nufhf\",\"identityServiceUri\":\"jysagith\",\"ledgerInternalNamespace\":\"hab\",\"ledgerType\":\"Private\",\"provisioningState\":\"Canceled\",\"aadBasedSecurityPrincipals\":[{\"principalId\":\"zb\",\"tenantId\":\"cnpqxuhivyqniwby\",\"ledgerRoleName\":\"Contributor\"},{\"principalId\":\"vd\",\"tenantId\":\"jgrtfwvukxga\",\"ledgerRoleName\":\"Contributor\"}],\"certBasedSecurityPrincipals\":[{\"cert\":\"h\",\"ledgerRoleName\":\"Administrator\"},{\"cert\":\"yejhk\",\"ledgerRoleName\":\"Contributor\"},{\"cert\":\"napczwlokjy\",\"ledgerRoleName\":\"Contributor\"},{\"cert\":\"vnipjox\",\"ledgerRoleName\":\"Reader\"}]},\"location\":\"gejspodmailzyde\",\"tags\":{\"wixjsprozvcp\":\"wyahuxinpmqnja\",\"atscmd\":\"tegjvwmf\",\"zkrwfn\":\"pjhulsuuvmkj\",\"lwejdpv\":\"iodjp\"},\"id\":\"ryo\",\"name\":\"psoacctazakljl\",\"type\":\"hbcryffdfdosyge\"}") .toObject(ConfidentialLedgerInner.class); - Assertions.assertEquals("ipjoxzjnchgejs", model.location()); - Assertions.assertEquals("mailzydehojw", model.tags().get("ahuxinpm")); - Assertions.assertEquals(RunningState.PAUSING, model.properties().runningState()); Assertions.assertEquals(LedgerType.PRIVATE, model.properties().ledgerType()); - Assertions.assertEquals(LedgerSku.BASIC, model.properties().ledgerSku()); - Assertions.assertEquals("cnpqxuhivyqniwby", - model.properties().aadBasedSecurityPrincipals().get(0).principalId()); - Assertions.assertEquals("k", model.properties().aadBasedSecurityPrincipals().get(0).tenantId()); + Assertions.assertEquals("zb", model.properties().aadBasedSecurityPrincipals().get(0).principalId()); + Assertions.assertEquals("cnpqxuhivyqniwby", model.properties().aadBasedSecurityPrincipals().get(0).tenantId()); Assertions.assertEquals(LedgerRoleName.CONTRIBUTOR, model.properties().aadBasedSecurityPrincipals().get(0).ledgerRoleName()); - Assertions.assertEquals("snhsjcnyejhkryh", model.properties().certBasedSecurityPrincipals().get(0).cert()); - Assertions.assertEquals(LedgerRoleName.READER, + Assertions.assertEquals("h", model.properties().certBasedSecurityPrincipals().get(0).cert()); + Assertions.assertEquals(LedgerRoleName.ADMINISTRATOR, model.properties().certBasedSecurityPrincipals().get(0).ledgerRoleName()); + Assertions.assertEquals("gejspodmailzyde", model.location()); + Assertions.assertEquals("wyahuxinpmqnja", model.tags().get("wixjsprozvcp")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ConfidentialLedgerInner model = new ConfidentialLedgerInner().withLocation("ipjoxzjnchgejs") - .withTags(mapOf("ahuxinpm", "mailzydehojw", "vcputegj", "njaqwixjspro", "uuvmkjozkrwfnd", - "wmfdatscmdvpjhul", "vwryoqpso", "odjpslwejd")) - .withProperties(new LedgerProperties().withRunningState(RunningState.PAUSING) - .withLedgerType(LedgerType.PRIVATE) - .withLedgerSku(LedgerSku.BASIC) + ConfidentialLedgerInner model = new ConfidentialLedgerInner() + .withProperties(new LedgerProperties().withLedgerType(LedgerType.PRIVATE) .withAadBasedSecurityPrincipals(Arrays.asList( - new AadBasedSecurityPrincipal().withPrincipalId("cnpqxuhivyqniwby") - .withTenantId("k") + new AadBasedSecurityPrincipal().withPrincipalId("zb") + .withTenantId("cnpqxuhivyqniwby") .withLedgerRoleName(LedgerRoleName.CONTRIBUTOR), - new AadBasedSecurityPrincipal().withPrincipalId("mjgr") - .withTenantId("wvukx") - .withLedgerRoleName(LedgerRoleName.ADMINISTRATOR))) + new AadBasedSecurityPrincipal().withPrincipalId("vd") + .withTenantId("jgrtfwvukxga") + .withLedgerRoleName(LedgerRoleName.CONTRIBUTOR))) .withCertBasedSecurityPrincipals(Arrays.asList( - new CertBasedSecurityPrincipal().withCert("snhsjcnyejhkryh") - .withLedgerRoleName(LedgerRoleName.READER), - new CertBasedSecurityPrincipal().withCert("czwlokjyem") - .withLedgerRoleName(LedgerRoleName.ADMINISTRATOR)))); + new CertBasedSecurityPrincipal().withCert("h").withLedgerRoleName(LedgerRoleName.ADMINISTRATOR), + new CertBasedSecurityPrincipal().withCert("yejhk").withLedgerRoleName(LedgerRoleName.CONTRIBUTOR), + new CertBasedSecurityPrincipal().withCert("napczwlokjy") + .withLedgerRoleName(LedgerRoleName.CONTRIBUTOR), + new CertBasedSecurityPrincipal().withCert("vnipjox").withLedgerRoleName(LedgerRoleName.READER)))) + .withLocation("gejspodmailzyde") + .withTags(mapOf("wixjsprozvcp", "wyahuxinpmqnja", "atscmd", "tegjvwmf", "zkrwfn", "pjhulsuuvmkj", "lwejdpv", + "iodjp")); model = BinaryData.fromObject(model).toObject(ConfidentialLedgerInner.class); - Assertions.assertEquals("ipjoxzjnchgejs", model.location()); - Assertions.assertEquals("mailzydehojw", model.tags().get("ahuxinpm")); - Assertions.assertEquals(RunningState.PAUSING, model.properties().runningState()); Assertions.assertEquals(LedgerType.PRIVATE, model.properties().ledgerType()); - Assertions.assertEquals(LedgerSku.BASIC, model.properties().ledgerSku()); - Assertions.assertEquals("cnpqxuhivyqniwby", - model.properties().aadBasedSecurityPrincipals().get(0).principalId()); - Assertions.assertEquals("k", model.properties().aadBasedSecurityPrincipals().get(0).tenantId()); + Assertions.assertEquals("zb", model.properties().aadBasedSecurityPrincipals().get(0).principalId()); + Assertions.assertEquals("cnpqxuhivyqniwby", model.properties().aadBasedSecurityPrincipals().get(0).tenantId()); Assertions.assertEquals(LedgerRoleName.CONTRIBUTOR, model.properties().aadBasedSecurityPrincipals().get(0).ledgerRoleName()); - Assertions.assertEquals("snhsjcnyejhkryh", model.properties().certBasedSecurityPrincipals().get(0).cert()); - Assertions.assertEquals(LedgerRoleName.READER, + Assertions.assertEquals("h", model.properties().certBasedSecurityPrincipals().get(0).cert()); + Assertions.assertEquals(LedgerRoleName.ADMINISTRATOR, model.properties().certBasedSecurityPrincipals().get(0).ledgerRoleName()); + Assertions.assertEquals("gejspodmailzyde", model.location()); + Assertions.assertEquals("wyahuxinpmqnja", model.tags().get("wixjsprozvcp")); } // Use "Map.of" if available diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ConfidentialLedgerListTests.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ConfidentialLedgerListTests.java index 629242ec5699..d509e96f7e17 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ConfidentialLedgerListTests.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ConfidentialLedgerListTests.java @@ -11,9 +11,7 @@ import com.azure.resourcemanager.confidentialledger.models.ConfidentialLedgerList; import com.azure.resourcemanager.confidentialledger.models.LedgerProperties; import com.azure.resourcemanager.confidentialledger.models.LedgerRoleName; -import com.azure.resourcemanager.confidentialledger.models.LedgerSku; import com.azure.resourcemanager.confidentialledger.models.LedgerType; -import com.azure.resourcemanager.confidentialledger.models.RunningState; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -23,111 +21,70 @@ public final class ConfidentialLedgerListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ConfidentialLedgerList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"ledgerName\":\"clxxwrljdo\",\"ledgerUri\":\"kcqvkocrc\",\"identityServiceUri\":\"kwt\",\"ledgerInternalNamespace\":\"xbnjbiksq\",\"runningState\":\"Unknown\",\"ledgerType\":\"Public\",\"provisioningState\":\"Failed\",\"ledgerSku\":\"Standard\",\"aadBasedSecurityPrincipals\":[{\"principalId\":\"nzl\",\"tenantId\":\"fmppe\",\"ledgerRoleName\":\"Contributor\"},{\"principalId\":\"gxsabkyq\",\"tenantId\":\"ujitcjcz\",\"ledgerRoleName\":\"Contributor\"},{\"principalId\":\"ndhkrw\",\"tenantId\":\"appd\",\"ledgerRoleName\":\"Reader\"}],\"certBasedSecurityPrincipals\":[{\"cert\":\"rwjfe\",\"ledgerRoleName\":\"Reader\"},{\"cert\":\"utjeltmrldhugj\",\"ledgerRoleName\":\"Reader\"}]},\"location\":\"tqxhocdgeab\",\"tags\":{\"wyiftyhxhur\":\"huticndvkao\"},\"id\":\"k\",\"name\":\"tyxolniwpwc\",\"type\":\"kjfkg\"},{\"properties\":{\"ledgerName\":\"xklrypl\",\"ledgerUri\":\"kbasyypn\",\"identityServiceUri\":\"hsgcbacphejkot\",\"ledgerInternalNamespace\":\"qgoulznd\",\"runningState\":\"Active\",\"ledgerType\":\"Public\",\"provisioningState\":\"Creating\",\"ledgerSku\":\"Unknown\",\"aadBasedSecurityPrincipals\":[{\"principalId\":\"madgakeqsrxyb\",\"tenantId\":\"qedqytbciqfoufl\",\"ledgerRoleName\":\"Contributor\"},{\"principalId\":\"zsm\",\"tenantId\":\"mglougpbkw\",\"ledgerRoleName\":\"Contributor\"},{\"principalId\":\"duqkt\",\"tenantId\":\"spwgcuertumkdosv\",\"ledgerRoleName\":\"Reader\"},{\"principalId\":\"mdgbbjfdd\",\"tenantId\":\"bmbexppbhtqqro\",\"ledgerRoleName\":\"Reader\"}],\"certBasedSecurityPrincipals\":[{\"cert\":\"algbquxigjyjg\",\"ledgerRoleName\":\"Administrator\"},{\"cert\":\"yfhrtxilnerkujy\",\"ledgerRoleName\":\"Contributor\"},{\"cert\":\"juvf\",\"ledgerRoleName\":\"Reader\"}]},\"location\":\"lyxwjkcprbnwbx\",\"tags\":{\"qguhmuo\":\"tbvpysszdnru\"},\"id\":\"qfprwzwbn\",\"name\":\"uitnwuiz\",\"type\":\"a\"},{\"properties\":{\"ledgerName\":\"fizuckyf\",\"ledgerUri\":\"rfidfvzwdz\",\"identityServiceUri\":\"tymw\",\"ledgerInternalNamespace\":\"dkfthwxmnt\",\"runningState\":\"Paused\",\"ledgerType\":\"Unknown\",\"provisioningState\":\"Succeeded\",\"ledgerSku\":\"Standard\",\"aadBasedSecurityPrincipals\":[{\"principalId\":\"mmxdcu\",\"tenantId\":\"fsrpymzidnse\",\"ledgerRoleName\":\"Contributor\"},{\"principalId\":\"bzsgfyccsne\",\"tenantId\":\"dwzjeiach\",\"ledgerRoleName\":\"Contributor\"},{\"principalId\":\"flnrosfqpteehzz\",\"tenantId\":\"pyqr\",\"ledgerRoleName\":\"Reader\"},{\"principalId\":\"npvswjdkirso\",\"tenantId\":\"qxhcrmn\",\"ledgerRoleName\":\"Administrator\"}],\"certBasedSecurityPrincipals\":[{\"cert\":\"whdsoifiyip\",\"ledgerRoleName\":\"Contributor\"},{\"cert\":\"wpgrjbzno\",\"ledgerRoleName\":\"Reader\"}]},\"location\":\"vsnb\",\"tags\":{\"zafb\":\"abnmocpcyshu\",\"oq\":\"jjgpb\"},\"id\":\"jmkljavbqidtqajz\",\"name\":\"ulpkudjkrl\",\"type\":\"hbzhfepg\"}],\"nextLink\":\"qex\"}") + "{\"value\":[{\"properties\":{\"ledgerName\":\"nzl\",\"ledgerUri\":\"fmppe\",\"identityServiceUri\":\"vmgxsab\",\"ledgerInternalNamespace\":\"qduujitcjczdz\",\"ledgerType\":\"Unknown\",\"provisioningState\":\"Creating\",\"aadBasedSecurityPrincipals\":[{\"principalId\":\"pdappds\",\"tenantId\":\"kvwrwjfeu\",\"ledgerRoleName\":\"Administrator\"},{\"principalId\":\"tjelt\",\"tenantId\":\"ldhugjzzdatqxh\",\"ledgerRoleName\":\"Reader\"},{\"principalId\":\"eablg\",\"tenantId\":\"uticndvkaozwyif\",\"ledgerRoleName\":\"Reader\"},{\"principalId\":\"hurokftyxoln\",\"tenantId\":\"pwcukjfkgiawxk\",\"ledgerRoleName\":\"Contributor\"}],\"certBasedSecurityPrincipals\":[{\"cert\":\"ckbasyypndd\",\"ledgerRoleName\":\"Administrator\"},{\"cert\":\"bacphejko\",\"ledgerRoleName\":\"Reader\"},{\"cert\":\"gou\",\"ledgerRoleName\":\"Administrator\"},{\"cert\":\"likwyqkgfgib\",\"ledgerRoleName\":\"Administrator\"}]},\"location\":\"keqsrxybzqqedq\",\"tags\":{\"lmmnkzsmodmglo\":\"ciqfou\",\"uqktap\":\"gpbkwtmut\",\"kdosvqw\":\"pwgcuertu\"},\"id\":\"bmdg\",\"name\":\"bjf\",\"type\":\"dgmb\"}],\"nextLink\":\"ex\"}") .toObject(ConfidentialLedgerList.class); - Assertions.assertEquals("tqxhocdgeab", model.value().get(0).location()); - Assertions.assertEquals("huticndvkao", model.value().get(0).tags().get("wyiftyhxhur")); - Assertions.assertEquals(RunningState.UNKNOWN, model.value().get(0).properties().runningState()); - Assertions.assertEquals(LedgerType.PUBLIC, model.value().get(0).properties().ledgerType()); - Assertions.assertEquals(LedgerSku.STANDARD, model.value().get(0).properties().ledgerSku()); - Assertions.assertEquals("nzl", + Assertions.assertEquals(LedgerType.UNKNOWN, model.value().get(0).properties().ledgerType()); + Assertions.assertEquals("pdappds", model.value().get(0).properties().aadBasedSecurityPrincipals().get(0).principalId()); - Assertions.assertEquals("fmppe", + Assertions.assertEquals("kvwrwjfeu", model.value().get(0).properties().aadBasedSecurityPrincipals().get(0).tenantId()); - Assertions.assertEquals(LedgerRoleName.CONTRIBUTOR, + Assertions.assertEquals(LedgerRoleName.ADMINISTRATOR, model.value().get(0).properties().aadBasedSecurityPrincipals().get(0).ledgerRoleName()); - Assertions.assertEquals("rwjfe", model.value().get(0).properties().certBasedSecurityPrincipals().get(0).cert()); - Assertions.assertEquals(LedgerRoleName.READER, + Assertions.assertEquals("ckbasyypndd", + model.value().get(0).properties().certBasedSecurityPrincipals().get(0).cert()); + Assertions.assertEquals(LedgerRoleName.ADMINISTRATOR, model.value().get(0).properties().certBasedSecurityPrincipals().get(0).ledgerRoleName()); - Assertions.assertEquals("qex", model.nextLink()); + Assertions.assertEquals("keqsrxybzqqedq", model.value().get(0).location()); + Assertions.assertEquals("ciqfou", model.value().get(0).tags().get("lmmnkzsmodmglo")); + Assertions.assertEquals("ex", model.nextLink()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ConfidentialLedgerList model = new ConfidentialLedgerList().withValue(Arrays.asList( - new ConfidentialLedgerInner().withLocation("tqxhocdgeab") - .withTags(mapOf("wyiftyhxhur", "huticndvkao")) - .withProperties(new LedgerProperties().withRunningState(RunningState.UNKNOWN) - .withLedgerType(LedgerType.PUBLIC) - .withLedgerSku(LedgerSku.STANDARD) - .withAadBasedSecurityPrincipals(Arrays.asList( - new AadBasedSecurityPrincipal().withPrincipalId("nzl") - .withTenantId("fmppe") - .withLedgerRoleName(LedgerRoleName.CONTRIBUTOR), - new AadBasedSecurityPrincipal().withPrincipalId("gxsabkyq") - .withTenantId("ujitcjcz") - .withLedgerRoleName(LedgerRoleName.CONTRIBUTOR), - new AadBasedSecurityPrincipal().withPrincipalId("ndhkrw") - .withTenantId("appd") - .withLedgerRoleName(LedgerRoleName.READER))) - .withCertBasedSecurityPrincipals(Arrays.asList( - new CertBasedSecurityPrincipal().withCert("rwjfe").withLedgerRoleName(LedgerRoleName.READER), - new CertBasedSecurityPrincipal().withCert("utjeltmrldhugj") - .withLedgerRoleName(LedgerRoleName.READER)))), - new ConfidentialLedgerInner().withLocation("lyxwjkcprbnwbx") - .withTags(mapOf("qguhmuo", "tbvpysszdnru")) - .withProperties(new LedgerProperties().withRunningState(RunningState.ACTIVE) - .withLedgerType(LedgerType.PUBLIC) - .withLedgerSku(LedgerSku.UNKNOWN) - .withAadBasedSecurityPrincipals(Arrays.asList( - new AadBasedSecurityPrincipal().withPrincipalId("madgakeqsrxyb") - .withTenantId("qedqytbciqfoufl") - .withLedgerRoleName(LedgerRoleName.CONTRIBUTOR), - new AadBasedSecurityPrincipal().withPrincipalId("zsm") - .withTenantId("mglougpbkw") - .withLedgerRoleName(LedgerRoleName.CONTRIBUTOR), - new AadBasedSecurityPrincipal().withPrincipalId("duqkt") - .withTenantId("spwgcuertumkdosv") - .withLedgerRoleName(LedgerRoleName.READER), - new AadBasedSecurityPrincipal().withPrincipalId("mdgbbjfdd") - .withTenantId("bmbexppbhtqqro") - .withLedgerRoleName(LedgerRoleName.READER))) - .withCertBasedSecurityPrincipals(Arrays.asList( - new CertBasedSecurityPrincipal().withCert("algbquxigjyjg") - .withLedgerRoleName(LedgerRoleName.ADMINISTRATOR), - new CertBasedSecurityPrincipal().withCert("yfhrtxilnerkujy") - .withLedgerRoleName(LedgerRoleName.CONTRIBUTOR), - new CertBasedSecurityPrincipal().withCert("juvf").withLedgerRoleName(LedgerRoleName.READER)))), - new ConfidentialLedgerInner().withLocation("vsnb") - .withTags(mapOf("zafb", "abnmocpcyshu", "oq", "jjgpb")) - .withProperties(new LedgerProperties().withRunningState(RunningState.PAUSED) + ConfidentialLedgerList model = new ConfidentialLedgerList() + .withValue(Arrays.asList(new ConfidentialLedgerInner() + .withProperties(new LedgerProperties() .withLedgerType(LedgerType.UNKNOWN) - .withLedgerSku(LedgerSku.STANDARD) .withAadBasedSecurityPrincipals(Arrays.asList( - new AadBasedSecurityPrincipal().withPrincipalId("mmxdcu") - .withTenantId("fsrpymzidnse") - .withLedgerRoleName(LedgerRoleName.CONTRIBUTOR), - new AadBasedSecurityPrincipal().withPrincipalId("bzsgfyccsne") - .withTenantId("dwzjeiach") - .withLedgerRoleName(LedgerRoleName.CONTRIBUTOR), - new AadBasedSecurityPrincipal().withPrincipalId("flnrosfqpteehzz") - .withTenantId("pyqr") + new AadBasedSecurityPrincipal().withPrincipalId("pdappds") + .withTenantId("kvwrwjfeu") + .withLedgerRoleName(LedgerRoleName.ADMINISTRATOR), + new AadBasedSecurityPrincipal().withPrincipalId("tjelt") + .withTenantId("ldhugjzzdatqxh") + .withLedgerRoleName(LedgerRoleName.READER), + new AadBasedSecurityPrincipal().withPrincipalId("eablg") + .withTenantId("uticndvkaozwyif") .withLedgerRoleName(LedgerRoleName.READER), - new AadBasedSecurityPrincipal().withPrincipalId("npvswjdkirso") - .withTenantId("qxhcrmn") - .withLedgerRoleName(LedgerRoleName.ADMINISTRATOR))) - .withCertBasedSecurityPrincipals(Arrays.asList( - new CertBasedSecurityPrincipal().withCert("whdsoifiyip") - .withLedgerRoleName(LedgerRoleName.CONTRIBUTOR), - new CertBasedSecurityPrincipal().withCert("wpgrjbzno") - .withLedgerRoleName(LedgerRoleName.READER)))))) - .withNextLink("qex"); + new AadBasedSecurityPrincipal().withPrincipalId("hurokftyxoln") + .withTenantId("pwcukjfkgiawxk") + .withLedgerRoleName(LedgerRoleName.CONTRIBUTOR))) + .withCertBasedSecurityPrincipals(Arrays.asList(new CertBasedSecurityPrincipal() + .withCert("ckbasyypndd") + .withLedgerRoleName(LedgerRoleName.ADMINISTRATOR), + new CertBasedSecurityPrincipal().withCert("bacphejko") + .withLedgerRoleName(LedgerRoleName.READER), + new CertBasedSecurityPrincipal().withCert("gou") + .withLedgerRoleName(LedgerRoleName.ADMINISTRATOR), + new CertBasedSecurityPrincipal().withCert("likwyqkgfgib") + .withLedgerRoleName(LedgerRoleName.ADMINISTRATOR)))) + .withLocation("keqsrxybzqqedq") + .withTags(mapOf("lmmnkzsmodmglo", "ciqfou", "uqktap", "gpbkwtmut", "kdosvqw", "pwgcuertu")))) + .withNextLink("ex"); model = BinaryData.fromObject(model).toObject(ConfidentialLedgerList.class); - Assertions.assertEquals("tqxhocdgeab", model.value().get(0).location()); - Assertions.assertEquals("huticndvkao", model.value().get(0).tags().get("wyiftyhxhur")); - Assertions.assertEquals(RunningState.UNKNOWN, model.value().get(0).properties().runningState()); - Assertions.assertEquals(LedgerType.PUBLIC, model.value().get(0).properties().ledgerType()); - Assertions.assertEquals(LedgerSku.STANDARD, model.value().get(0).properties().ledgerSku()); - Assertions.assertEquals("nzl", + Assertions.assertEquals(LedgerType.UNKNOWN, model.value().get(0).properties().ledgerType()); + Assertions.assertEquals("pdappds", model.value().get(0).properties().aadBasedSecurityPrincipals().get(0).principalId()); - Assertions.assertEquals("fmppe", + Assertions.assertEquals("kvwrwjfeu", model.value().get(0).properties().aadBasedSecurityPrincipals().get(0).tenantId()); - Assertions.assertEquals(LedgerRoleName.CONTRIBUTOR, + Assertions.assertEquals(LedgerRoleName.ADMINISTRATOR, model.value().get(0).properties().aadBasedSecurityPrincipals().get(0).ledgerRoleName()); - Assertions.assertEquals("rwjfe", model.value().get(0).properties().certBasedSecurityPrincipals().get(0).cert()); - Assertions.assertEquals(LedgerRoleName.READER, + Assertions.assertEquals("ckbasyypndd", + model.value().get(0).properties().certBasedSecurityPrincipals().get(0).cert()); + Assertions.assertEquals(LedgerRoleName.ADMINISTRATOR, model.value().get(0).properties().certBasedSecurityPrincipals().get(0).ledgerRoleName()); - Assertions.assertEquals("qex", model.nextLink()); + Assertions.assertEquals("keqsrxybzqqedq", model.value().get(0).location()); + Assertions.assertEquals("ciqfou", model.value().get(0).tags().get("lmmnkzsmodmglo")); + Assertions.assertEquals("ex", model.nextLink()); } // Use "Map.of" if available diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ConfidentialLedgerRestoreResponseInnerTests.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ConfidentialLedgerRestoreResponseInnerTests.java deleted file mode 100644 index 4c930531b027..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ConfidentialLedgerRestoreResponseInnerTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.confidentialledger.fluent.models.ConfidentialLedgerRestoreResponseInner; - -public final class ConfidentialLedgerRestoreResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ConfidentialLedgerRestoreResponseInner model = BinaryData.fromString("{\"message\":\"maajrmvdjwzrlo\"}") - .toObject(ConfidentialLedgerRestoreResponseInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ConfidentialLedgerRestoreResponseInner model = new ConfidentialLedgerRestoreResponseInner(); - model = BinaryData.fromObject(model).toObject(ConfidentialLedgerRestoreResponseInner.class); - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ConfidentialLedgerRestoreTests.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ConfidentialLedgerRestoreTests.java deleted file mode 100644 index 957a718a6c94..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ConfidentialLedgerRestoreTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.confidentialledger.models.ConfidentialLedgerRestore; -import org.junit.jupiter.api.Assertions; - -public final class ConfidentialLedgerRestoreTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ConfidentialLedgerRestore model = BinaryData - .fromString("{\"fileShareName\":\"obnbdxkqpxokaj\",\"restoreRegion\":\"onpimexgstxg\",\"uri\":\"po\"}") - .toObject(ConfidentialLedgerRestore.class); - Assertions.assertEquals("obnbdxkqpxokaj", model.fileShareName()); - Assertions.assertEquals("onpimexgstxg", model.restoreRegion()); - Assertions.assertEquals("po", model.uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ConfidentialLedgerRestore model = new ConfidentialLedgerRestore().withFileShareName("obnbdxkqpxokaj") - .withRestoreRegion("onpimexgstxg") - .withUri("po"); - model = BinaryData.fromObject(model).toObject(ConfidentialLedgerRestore.class); - Assertions.assertEquals("obnbdxkqpxokaj", model.fileShareName()); - Assertions.assertEquals("onpimexgstxg", model.restoreRegion()); - Assertions.assertEquals("po", model.uri()); - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/DeploymentTypeTests.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/DeploymentTypeTests.java deleted file mode 100644 index 179faf4e0983..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/DeploymentTypeTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.confidentialledger.models.DeploymentType; -import com.azure.resourcemanager.confidentialledger.models.LanguageRuntime; -import org.junit.jupiter.api.Assertions; - -public final class DeploymentTypeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DeploymentType model = BinaryData.fromString("{\"languageRuntime\":\"JS\",\"appSourceUri\":\"dtopbob\"}") - .toObject(DeploymentType.class); - Assertions.assertEquals(LanguageRuntime.JS, model.languageRuntime()); - Assertions.assertEquals("dtopbob", model.appSourceUri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeploymentType model = new DeploymentType().withLanguageRuntime(LanguageRuntime.JS).withAppSourceUri("dtopbob"); - model = BinaryData.fromObject(model).toObject(DeploymentType.class); - Assertions.assertEquals(LanguageRuntime.JS, model.languageRuntime()); - Assertions.assertEquals("dtopbob", model.appSourceUri()); - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/LedgerPropertiesTests.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/LedgerPropertiesTests.java index f9cc06c0c060..96c8cd328dae 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/LedgerPropertiesTests.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/LedgerPropertiesTests.java @@ -9,9 +9,7 @@ import com.azure.resourcemanager.confidentialledger.models.CertBasedSecurityPrincipal; import com.azure.resourcemanager.confidentialledger.models.LedgerProperties; import com.azure.resourcemanager.confidentialledger.models.LedgerRoleName; -import com.azure.resourcemanager.confidentialledger.models.LedgerSku; import com.azure.resourcemanager.confidentialledger.models.LedgerType; -import com.azure.resourcemanager.confidentialledger.models.RunningState; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -19,47 +17,38 @@ public final class LedgerPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { LedgerProperties model = BinaryData.fromString( - "{\"ledgerName\":\"crzevdphlx\",\"ledgerUri\":\"lthqtrgqjbp\",\"identityServiceUri\":\"fsinzgvfcjrwzoxx\",\"ledgerInternalNamespace\":\"felluwfzitonpe\",\"runningState\":\"Paused\",\"ledgerType\":\"Unknown\",\"provisioningState\":\"Canceled\",\"ledgerSku\":\"Standard\",\"aadBasedSecurityPrincipals\":[{\"principalId\":\"vhpfxxypininmay\",\"tenantId\":\"ybb\",\"ledgerRoleName\":\"Contributor\"},{\"principalId\":\"epoo\",\"tenantId\":\"nuvamiheogna\",\"ledgerRoleName\":\"Administrator\"},{\"principalId\":\"theotusiv\",\"tenantId\":\"v\",\"ledgerRoleName\":\"Administrator\"}],\"certBasedSecurityPrincipals\":[{\"cert\":\"nhungbw\",\"ledgerRoleName\":\"Administrator\"},{\"cert\":\"fygxgispemvtzfk\",\"ledgerRoleName\":\"Reader\"}]}") + "{\"ledgerName\":\"aojakhmsbzjhcrz\",\"ledgerUri\":\"dphlxaolt\",\"identityServiceUri\":\"trg\",\"ledgerInternalNamespace\":\"bpf\",\"ledgerType\":\"Unknown\",\"provisioningState\":\"Unknown\",\"aadBasedSecurityPrincipals\":[{\"principalId\":\"f\",\"tenantId\":\"rwzoxxjtfelluwf\",\"ledgerRoleName\":\"Reader\"},{\"principalId\":\"np\",\"tenantId\":\"fpjkjlxofp\",\"ledgerRoleName\":\"Reader\"}],\"certBasedSecurityPrincipals\":[{\"cert\":\"xypininmayhuybbk\",\"ledgerRoleName\":\"Reader\"},{\"cert\":\"po\",\"ledgerRoleName\":\"Contributor\"},{\"cert\":\"uvamiheognarxzxt\",\"ledgerRoleName\":\"Administrator\"},{\"cert\":\"usivye\",\"ledgerRoleName\":\"Administrator\"}]}") .toObject(LedgerProperties.class); - Assertions.assertEquals(RunningState.PAUSED, model.runningState()); Assertions.assertEquals(LedgerType.UNKNOWN, model.ledgerType()); - Assertions.assertEquals(LedgerSku.STANDARD, model.ledgerSku()); - Assertions.assertEquals("vhpfxxypininmay", model.aadBasedSecurityPrincipals().get(0).principalId()); - Assertions.assertEquals("ybb", model.aadBasedSecurityPrincipals().get(0).tenantId()); - Assertions.assertEquals(LedgerRoleName.CONTRIBUTOR, model.aadBasedSecurityPrincipals().get(0).ledgerRoleName()); - Assertions.assertEquals("nhungbw", model.certBasedSecurityPrincipals().get(0).cert()); - Assertions.assertEquals(LedgerRoleName.ADMINISTRATOR, - model.certBasedSecurityPrincipals().get(0).ledgerRoleName()); + Assertions.assertEquals("f", model.aadBasedSecurityPrincipals().get(0).principalId()); + Assertions.assertEquals("rwzoxxjtfelluwf", model.aadBasedSecurityPrincipals().get(0).tenantId()); + Assertions.assertEquals(LedgerRoleName.READER, model.aadBasedSecurityPrincipals().get(0).ledgerRoleName()); + Assertions.assertEquals("xypininmayhuybbk", model.certBasedSecurityPrincipals().get(0).cert()); + Assertions.assertEquals(LedgerRoleName.READER, model.certBasedSecurityPrincipals().get(0).ledgerRoleName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - LedgerProperties model = new LedgerProperties().withRunningState(RunningState.PAUSED) - .withLedgerType(LedgerType.UNKNOWN) - .withLedgerSku(LedgerSku.STANDARD) + LedgerProperties model = new LedgerProperties().withLedgerType(LedgerType.UNKNOWN) .withAadBasedSecurityPrincipals(Arrays.asList( - new AadBasedSecurityPrincipal().withPrincipalId("vhpfxxypininmay") - .withTenantId("ybb") - .withLedgerRoleName(LedgerRoleName.CONTRIBUTOR), - new AadBasedSecurityPrincipal().withPrincipalId("epoo") - .withTenantId("nuvamiheogna") - .withLedgerRoleName(LedgerRoleName.ADMINISTRATOR), - new AadBasedSecurityPrincipal().withPrincipalId("theotusiv") - .withTenantId("v") - .withLedgerRoleName(LedgerRoleName.ADMINISTRATOR))) + new AadBasedSecurityPrincipal().withPrincipalId("f") + .withTenantId("rwzoxxjtfelluwf") + .withLedgerRoleName(LedgerRoleName.READER), + new AadBasedSecurityPrincipal().withPrincipalId("np") + .withTenantId("fpjkjlxofp") + .withLedgerRoleName(LedgerRoleName.READER))) .withCertBasedSecurityPrincipals(Arrays.asList( - new CertBasedSecurityPrincipal().withCert("nhungbw").withLedgerRoleName(LedgerRoleName.ADMINISTRATOR), - new CertBasedSecurityPrincipal().withCert("fygxgispemvtzfk") - .withLedgerRoleName(LedgerRoleName.READER))); + new CertBasedSecurityPrincipal().withCert("xypininmayhuybbk").withLedgerRoleName(LedgerRoleName.READER), + new CertBasedSecurityPrincipal().withCert("po").withLedgerRoleName(LedgerRoleName.CONTRIBUTOR), + new CertBasedSecurityPrincipal().withCert("uvamiheognarxzxt") + .withLedgerRoleName(LedgerRoleName.ADMINISTRATOR), + new CertBasedSecurityPrincipal().withCert("usivye").withLedgerRoleName(LedgerRoleName.ADMINISTRATOR))); model = BinaryData.fromObject(model).toObject(LedgerProperties.class); - Assertions.assertEquals(RunningState.PAUSED, model.runningState()); Assertions.assertEquals(LedgerType.UNKNOWN, model.ledgerType()); - Assertions.assertEquals(LedgerSku.STANDARD, model.ledgerSku()); - Assertions.assertEquals("vhpfxxypininmay", model.aadBasedSecurityPrincipals().get(0).principalId()); - Assertions.assertEquals("ybb", model.aadBasedSecurityPrincipals().get(0).tenantId()); - Assertions.assertEquals(LedgerRoleName.CONTRIBUTOR, model.aadBasedSecurityPrincipals().get(0).ledgerRoleName()); - Assertions.assertEquals("nhungbw", model.certBasedSecurityPrincipals().get(0).cert()); - Assertions.assertEquals(LedgerRoleName.ADMINISTRATOR, - model.certBasedSecurityPrincipals().get(0).ledgerRoleName()); + Assertions.assertEquals("f", model.aadBasedSecurityPrincipals().get(0).principalId()); + Assertions.assertEquals("rwzoxxjtfelluwf", model.aadBasedSecurityPrincipals().get(0).tenantId()); + Assertions.assertEquals(LedgerRoleName.READER, model.aadBasedSecurityPrincipals().get(0).ledgerRoleName()); + Assertions.assertEquals("xypininmayhuybbk", model.certBasedSecurityPrincipals().get(0).cert()); + Assertions.assertEquals(LedgerRoleName.READER, model.certBasedSecurityPrincipals().get(0).ledgerRoleName()); } } diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/LedgersBackupMockTests.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/LedgersBackupMockTests.java deleted file mode 100644 index ea013cd7a051..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/LedgersBackupMockTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager; -import com.azure.resourcemanager.confidentialledger.models.ConfidentialLedgerBackup; -import com.azure.resourcemanager.confidentialledger.models.ConfidentialLedgerBackupResponse; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class LedgersBackupMockTests { - @Test - public void testBackup() throws Exception { - String responseStr = "{\"message\":\"qjsdpydnfyhxdeo\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ConfidentialLedgerManager manager = ConfidentialLedgerManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ConfidentialLedgerBackupResponse response = manager.ledgers() - .backup("yxoegukgjnp", "ucgygevqz", - new ConfidentialLedgerBackup().withRestoreRegion("yp").withUri("rbpizc"), - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/LedgersCreateMockTests.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/LedgersCreateMockTests.java index 256d8b510969..eeeb2e767a45 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/LedgersCreateMockTests.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/LedgersCreateMockTests.java @@ -15,9 +15,7 @@ import com.azure.resourcemanager.confidentialledger.models.ConfidentialLedger; import com.azure.resourcemanager.confidentialledger.models.LedgerProperties; import com.azure.resourcemanager.confidentialledger.models.LedgerRoleName; -import com.azure.resourcemanager.confidentialledger.models.LedgerSku; import com.azure.resourcemanager.confidentialledger.models.LedgerType; -import com.azure.resourcemanager.confidentialledger.models.RunningState; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import java.util.Arrays; @@ -31,7 +29,7 @@ public final class LedgersCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"ledgerName\":\"pnq\",\"ledgerUri\":\"hmgkbrpyy\",\"identityServiceUri\":\"ibnuqqkpik\",\"ledgerInternalNamespace\":\"rgvtqag\",\"runningState\":\"Paused\",\"ledgerType\":\"Private\",\"provisioningState\":\"Succeeded\",\"ledgerSku\":\"Unknown\",\"aadBasedSecurityPrincipals\":[{\"principalId\":\"bfs\",\"tenantId\":\"rbu\",\"ledgerRoleName\":\"Reader\"}],\"certBasedSecurityPrincipals\":[{\"cert\":\"azzmhjrunmpxt\",\"ledgerRoleName\":\"Administrator\"},{\"cert\":\"rbnlankxmyskp\",\"ledgerRoleName\":\"Reader\"}]},\"location\":\"btkcxywnytnrsyn\",\"tags\":{\"dbabp\":\"dybyxczfclhaa\",\"fkts\":\"lwrq\",\"nyyazttbtwwrqpue\":\"hsucoc\"},\"id\":\"ckzywbiexzfeyue\",\"name\":\"xibxujwbhqwalm\",\"type\":\"zyoxaepdkzjan\"}"; + = "{\"properties\":{\"ledgerName\":\"leyyvx\",\"ledgerUri\":\"jpkcattpng\",\"identityServiceUri\":\"rcczsqpjhvmd\",\"ledgerInternalNamespace\":\"v\",\"ledgerType\":\"Unknown\",\"provisioningState\":\"Succeeded\",\"aadBasedSecurityPrincipals\":[{\"principalId\":\"canoaeupf\",\"tenantId\":\"hltrpmopjmcmatuo\",\"ledgerRoleName\":\"Contributor\"}],\"certBasedSecurityPrincipals\":[{\"cert\":\"uaodsfcpk\",\"ledgerRoleName\":\"Contributor\"},{\"cert\":\"puozmyzydag\",\"ledgerRoleName\":\"Contributor\"},{\"cert\":\"bezy\",\"ledgerRoleName\":\"Reader\"},{\"cert\":\"ktwh\",\"ledgerRoleName\":\"Reader\"}]},\"location\":\"ywqsmbsurexim\",\"tags\":{\"ksymd\":\"ocfs\"},\"id\":\"ys\",\"name\":\"kiiuxhqyudxor\",\"type\":\"qn\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -41,41 +39,44 @@ public void testCreate() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); ConfidentialLedger response = manager.ledgers() - .define("yqzrnkcqvyxlw") - .withRegion("wutttxfvjrbi") - .withExistingResourceGroup("uzoqft") - .withTags(mapOf("jky", "xepcyvahfn", "ljyoxgvcltb", "xjvuujqgidokg", "bijhtxfvgxbf", "sncghkjeszz", "ec", - "mxnehmp")) - .withProperties(new LedgerProperties().withRunningState(RunningState.PAUSING) - .withLedgerType(LedgerType.UNKNOWN) - .withLedgerSku(LedgerSku.STANDARD) + .define("ebxetqgtzxdp") + .withExistingResourceGroup("ccfwnfnbacfion") + .withRegion("lhslazjdyggdtj") + .withTags(mapOf("uofqwe", "b", "enevfyexfwhybci", "kh", "tynnaamdectehfi", "vyvdcs")) + .withProperties(new LedgerProperties().withLedgerType(LedgerType.PRIVATE) .withAadBasedSecurityPrincipals(Arrays.asList( - new AadBasedSecurityPrincipal().withPrincipalId("fkbey") - .withTenantId("wrmjmwvvjektc") - .withLedgerRoleName(LedgerRoleName.READER), - new AadBasedSecurityPrincipal().withPrincipalId("hwlrsf") - .withTenantId("zpwv") - .withLedgerRoleName(LedgerRoleName.CONTRIBUTOR))) + new AadBasedSecurityPrincipal().withPrincipalId("nqvpkvlrxnje") + .withTenantId("eipheoflokeyy") + .withLedgerRoleName(LedgerRoleName.ADMINISTRATOR), + new AadBasedSecurityPrincipal().withPrincipalId("bdlwtgrhpdjpj") + .withTenantId("asxazjpqyegualhb") + .withLedgerRoleName(LedgerRoleName.CONTRIBUTOR), + new AadBasedSecurityPrincipal().withPrincipalId("jj") + .withTenantId("v") + .withLedgerRoleName(LedgerRoleName.CONTRIBUTOR), + new AadBasedSecurityPrincipal().withPrincipalId("wdslfhotwmcy") + .withTenantId("wlbjnpgacftade") + .withLedgerRoleName(LedgerRoleName.READER))) .withCertBasedSecurityPrincipals(Arrays.asList( - new CertBasedSecurityPrincipal().withCert("iqylihkaetck").withLedgerRoleName(LedgerRoleName.READER), - new CertBasedSecurityPrincipal().withCert("ivfsnk") + new CertBasedSecurityPrincipal().withCert("fsoppusuesnzw") .withLedgerRoleName(LedgerRoleName.ADMINISTRATOR), - new CertBasedSecurityPrincipal().withCert("tqhjfbebrjcx") + new CertBasedSecurityPrincipal().withCert("avo").withLedgerRoleName(LedgerRoleName.READER), + new CertBasedSecurityPrincipal().withCert("mohctb").withLedgerRoleName(LedgerRoleName.CONTRIBUTOR), + new CertBasedSecurityPrincipal().withCert("wxdndnvowgujjug") .withLedgerRoleName(LedgerRoleName.CONTRIBUTOR)))) .create(); - Assertions.assertEquals("btkcxywnytnrsyn", response.location()); - Assertions.assertEquals("dybyxczfclhaa", response.tags().get("dbabp")); - Assertions.assertEquals(RunningState.PAUSED, response.properties().runningState()); - Assertions.assertEquals(LedgerType.PRIVATE, response.properties().ledgerType()); - Assertions.assertEquals(LedgerSku.UNKNOWN, response.properties().ledgerSku()); - Assertions.assertEquals("bfs", response.properties().aadBasedSecurityPrincipals().get(0).principalId()); - Assertions.assertEquals("rbu", response.properties().aadBasedSecurityPrincipals().get(0).tenantId()); - Assertions.assertEquals(LedgerRoleName.READER, + Assertions.assertEquals(LedgerType.UNKNOWN, response.properties().ledgerType()); + Assertions.assertEquals("canoaeupf", response.properties().aadBasedSecurityPrincipals().get(0).principalId()); + Assertions.assertEquals("hltrpmopjmcmatuo", + response.properties().aadBasedSecurityPrincipals().get(0).tenantId()); + Assertions.assertEquals(LedgerRoleName.CONTRIBUTOR, response.properties().aadBasedSecurityPrincipals().get(0).ledgerRoleName()); - Assertions.assertEquals("azzmhjrunmpxt", response.properties().certBasedSecurityPrincipals().get(0).cert()); - Assertions.assertEquals(LedgerRoleName.ADMINISTRATOR, + Assertions.assertEquals("uaodsfcpk", response.properties().certBasedSecurityPrincipals().get(0).cert()); + Assertions.assertEquals(LedgerRoleName.CONTRIBUTOR, response.properties().certBasedSecurityPrincipals().get(0).ledgerRoleName()); + Assertions.assertEquals("ywqsmbsurexim", response.location()); + Assertions.assertEquals("ocfs", response.tags().get("ksymd")); } // Use "Map.of" if available diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/LedgersDeleteMockTests.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/LedgersDeleteMockTests.java index ec062db058cc..c54f020b72db 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/LedgersDeleteMockTests.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/LedgersDeleteMockTests.java @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.ledgers().delete("yggdtjixh", "kuofqweykhme", com.azure.core.util.Context.NONE); + manager.ledgers().delete("khbzhfepgzg", "e", com.azure.core.util.Context.NONE); } } diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/LedgersGetByResourceGroupWithResponseMockTests.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/LedgersGetByResourceGroupWithResponseMockTests.java index fde9dfb17130..a56427f19f9b 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/LedgersGetByResourceGroupWithResponseMockTests.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/LedgersGetByResourceGroupWithResponseMockTests.java @@ -12,9 +12,7 @@ import com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager; import com.azure.resourcemanager.confidentialledger.models.ConfidentialLedger; import com.azure.resourcemanager.confidentialledger.models.LedgerRoleName; -import com.azure.resourcemanager.confidentialledger.models.LedgerSku; import com.azure.resourcemanager.confidentialledger.models.LedgerType; -import com.azure.resourcemanager.confidentialledger.models.RunningState; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -25,7 +23,7 @@ public final class LedgersGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"ledgerName\":\"c\",\"ledgerUri\":\"qwoochcbon\",\"identityServiceUri\":\"pkvlrxn\",\"ledgerInternalNamespace\":\"ase\",\"runningState\":\"Pausing\",\"ledgerType\":\"Unknown\",\"provisioningState\":\"Canceled\",\"ledgerSku\":\"Basic\",\"aadBasedSecurityPrincipals\":[{\"principalId\":\"ienjbdlwtgr\",\"tenantId\":\"djpjumasxazjpq\",\"ledgerRoleName\":\"Reader\"},{\"principalId\":\"alhbx\",\"tenantId\":\"e\",\"ledgerRoleName\":\"Contributor\"}],\"certBasedSecurityPrincipals\":[{\"cert\":\"udgwdslfho\",\"ledgerRoleName\":\"Reader\"}]},\"location\":\"ynpwlbj\",\"tags\":{\"ehxnltyfsop\":\"acfta\",\"nzwdejba\":\"usue\",\"xdn\":\"orxzdmohctbqvud\"},\"id\":\"nvowgujju\",\"name\":\"wdkcglhsl\",\"type\":\"zj\"}"; + = "{\"properties\":{\"ledgerName\":\"ckyfih\",\"ledgerUri\":\"idf\",\"identityServiceUri\":\"wdzuhtymwisd\",\"ledgerInternalNamespace\":\"thwxmnteiwaopvkm\",\"ledgerType\":\"Public\",\"provisioningState\":\"Updating\",\"aadBasedSecurityPrincipals\":[{\"principalId\":\"ufufsrp\",\"tenantId\":\"zidnsezcxtbzsgfy\",\"ledgerRoleName\":\"Reader\"}],\"certBasedSecurityPrincipals\":[{\"cert\":\"mdwzjeiachboo\",\"ledgerRoleName\":\"Reader\"},{\"cert\":\"ro\",\"ledgerRoleName\":\"Administrator\"}]},\"location\":\"eeh\",\"tags\":{\"swjdkirso\":\"ypyqrimzinp\",\"soifiyipjxsqw\":\"dqxhcrmnohjtckwh\",\"bznorcjxvsnby\":\"gr\",\"cyshurzafbljjgp\":\"qabnmoc\"},\"id\":\"toqcjmklja\",\"name\":\"bqidtqaj\",\"type\":\"yulpkudjkr\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,20 +33,19 @@ public void testGetByResourceGroupWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); ConfidentialLedger response = manager.ledgers() - .getByResourceGroupWithResponse("xrjfeallnwsub", "snjampmng", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("prwzwbnguitnwui", "gazxuf", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("ynpwlbj", response.location()); - Assertions.assertEquals("acfta", response.tags().get("ehxnltyfsop")); - Assertions.assertEquals(RunningState.PAUSING, response.properties().runningState()); - Assertions.assertEquals(LedgerType.UNKNOWN, response.properties().ledgerType()); - Assertions.assertEquals(LedgerSku.BASIC, response.properties().ledgerSku()); - Assertions.assertEquals("ienjbdlwtgr", response.properties().aadBasedSecurityPrincipals().get(0).principalId()); - Assertions.assertEquals("djpjumasxazjpq", response.properties().aadBasedSecurityPrincipals().get(0).tenantId()); + Assertions.assertEquals(LedgerType.PUBLIC, response.properties().ledgerType()); + Assertions.assertEquals("ufufsrp", response.properties().aadBasedSecurityPrincipals().get(0).principalId()); + Assertions.assertEquals("zidnsezcxtbzsgfy", + response.properties().aadBasedSecurityPrincipals().get(0).tenantId()); Assertions.assertEquals(LedgerRoleName.READER, response.properties().aadBasedSecurityPrincipals().get(0).ledgerRoleName()); - Assertions.assertEquals("udgwdslfho", response.properties().certBasedSecurityPrincipals().get(0).cert()); + Assertions.assertEquals("mdwzjeiachboo", response.properties().certBasedSecurityPrincipals().get(0).cert()); Assertions.assertEquals(LedgerRoleName.READER, response.properties().certBasedSecurityPrincipals().get(0).ledgerRoleName()); + Assertions.assertEquals("eeh", response.location()); + Assertions.assertEquals("ypyqrimzinp", response.tags().get("swjdkirso")); } } diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/LedgersListByResourceGroupMockTests.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/LedgersListByResourceGroupMockTests.java index 130bb59bbd77..70a55166589c 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/LedgersListByResourceGroupMockTests.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/LedgersListByResourceGroupMockTests.java @@ -13,9 +13,7 @@ import com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager; import com.azure.resourcemanager.confidentialledger.models.ConfidentialLedger; import com.azure.resourcemanager.confidentialledger.models.LedgerRoleName; -import com.azure.resourcemanager.confidentialledger.models.LedgerSku; import com.azure.resourcemanager.confidentialledger.models.LedgerType; -import com.azure.resourcemanager.confidentialledger.models.RunningState; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -26,7 +24,7 @@ public final class LedgersListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"ledgerName\":\"ctehfiqscjey\",\"ledgerUri\":\"hezrkgq\",\"identityServiceUri\":\"jrefovgmkqsle\",\"ledgerInternalNamespace\":\"vxyqjpkcattpngjc\",\"runningState\":\"Resuming\",\"ledgerType\":\"Private\",\"provisioningState\":\"Unknown\",\"ledgerSku\":\"Standard\",\"aadBasedSecurityPrincipals\":[{\"principalId\":\"ajvnysounqe\",\"tenantId\":\"noae\",\"ledgerRoleName\":\"Administrator\"},{\"principalId\":\"yhltrpmopjmcm\",\"tenantId\":\"u\",\"ledgerRoleName\":\"Reader\"}],\"certBasedSecurityPrincipals\":[{\"cert\":\"iuaod\",\"ledgerRoleName\":\"Administrator\"}]},\"location\":\"kvxod\",\"tags\":{\"axbezyiuo\":\"zmyzydagf\",\"dxwzywqsmbsurexi\":\"ktwh\",\"yocf\":\"o\"},\"id\":\"fksymddystki\",\"name\":\"uxh\",\"type\":\"yudxorrqnbp\"}]}"; + = "{\"value\":[{\"properties\":{\"ledgerName\":\"hbcsgl\",\"ledgerUri\":\"majtjaod\",\"identityServiceUri\":\"bnbdxkqpxokajion\",\"ledgerInternalNamespace\":\"mexgstxgcp\",\"ledgerType\":\"Public\",\"provisioningState\":\"Canceled\",\"aadBasedSecurityPrincipals\":[{\"principalId\":\"mvdjwzrlovmc\",\"tenantId\":\"hijco\",\"ledgerRoleName\":\"Administrator\"},{\"principalId\":\"bzaqsqsycbkbfk\",\"tenantId\":\"kdkexxp\",\"ledgerRoleName\":\"Contributor\"},{\"principalId\":\"xaxcfjpgddtocjjx\",\"tenantId\":\"pmouexhdz\",\"ledgerRoleName\":\"Reader\"}],\"certBasedSecurityPrincipals\":[{\"cert\":\"jnxqbzvddntwn\",\"ledgerRoleName\":\"Contributor\"},{\"cert\":\"btwnpzaoqvuhrhcf\",\"ledgerRoleName\":\"Contributor\"},{\"cert\":\"dglmjthjqkwp\",\"ledgerRoleName\":\"Contributor\"}]},\"location\":\"mqc\",\"tags\":{\"gdtopbobjogh\":\"vhkhixu\"},\"id\":\"e\",\"name\":\"u\",\"type\":\"m\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -36,22 +34,20 @@ public void testListByResourceGroup() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response - = manager.ledgers().listByResourceGroup("evfyexfwhybcib", "yvdcsitynnaa", com.azure.core.util.Context.NONE); + = manager.ledgers().listByResourceGroup("zloc", "scpai", com.azure.core.util.Context.NONE); - Assertions.assertEquals("kvxod", response.iterator().next().location()); - Assertions.assertEquals("zmyzydagf", response.iterator().next().tags().get("axbezyiuo")); - Assertions.assertEquals(RunningState.RESUMING, response.iterator().next().properties().runningState()); - Assertions.assertEquals(LedgerType.PRIVATE, response.iterator().next().properties().ledgerType()); - Assertions.assertEquals(LedgerSku.STANDARD, response.iterator().next().properties().ledgerSku()); - Assertions.assertEquals("ajvnysounqe", + Assertions.assertEquals(LedgerType.PUBLIC, response.iterator().next().properties().ledgerType()); + Assertions.assertEquals("mvdjwzrlovmc", response.iterator().next().properties().aadBasedSecurityPrincipals().get(0).principalId()); - Assertions.assertEquals("noae", + Assertions.assertEquals("hijco", response.iterator().next().properties().aadBasedSecurityPrincipals().get(0).tenantId()); Assertions.assertEquals(LedgerRoleName.ADMINISTRATOR, response.iterator().next().properties().aadBasedSecurityPrincipals().get(0).ledgerRoleName()); - Assertions.assertEquals("iuaod", + Assertions.assertEquals("jnxqbzvddntwn", response.iterator().next().properties().certBasedSecurityPrincipals().get(0).cert()); - Assertions.assertEquals(LedgerRoleName.ADMINISTRATOR, + Assertions.assertEquals(LedgerRoleName.CONTRIBUTOR, response.iterator().next().properties().certBasedSecurityPrincipals().get(0).ledgerRoleName()); + Assertions.assertEquals("mqc", response.iterator().next().location()); + Assertions.assertEquals("vhkhixu", response.iterator().next().tags().get("gdtopbobjogh")); } } diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/LedgersListMockTests.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/LedgersListMockTests.java index 9ab81c8d7bcb..e50be956841a 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/LedgersListMockTests.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/LedgersListMockTests.java @@ -13,9 +13,7 @@ import com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager; import com.azure.resourcemanager.confidentialledger.models.ConfidentialLedger; import com.azure.resourcemanager.confidentialledger.models.LedgerRoleName; -import com.azure.resourcemanager.confidentialledger.models.LedgerSku; import com.azure.resourcemanager.confidentialledger.models.LedgerType; -import com.azure.resourcemanager.confidentialledger.models.RunningState; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -26,7 +24,7 @@ public final class LedgersListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"ledgerName\":\"dvjsllrmvvdf\",\"ledgerUri\":\"t\",\"identityServiceUri\":\"n\",\"ledgerInternalNamespace\":\"lexxbczwtru\",\"runningState\":\"Resuming\",\"ledgerType\":\"Private\",\"provisioningState\":\"Failed\",\"ledgerSku\":\"Basic\",\"aadBasedSecurityPrincipals\":[{\"principalId\":\"yokacspkw\",\"tenantId\":\"zdobpxjmflbvvnch\",\"ledgerRoleName\":\"Reader\"},{\"principalId\":\"iwwzjuqk\",\"tenantId\":\"sa\",\"ledgerRoleName\":\"Administrator\"},{\"principalId\":\"uo\",\"tenantId\":\"skghsauuimj\",\"ledgerRoleName\":\"Administrator\"}],\"certBasedSecurityPrincipals\":[{\"cert\":\"uugidyjrrfby\",\"ledgerRoleName\":\"Contributor\"},{\"cert\":\"e\",\"ledgerRoleName\":\"Reader\"}]},\"location\":\"npc\",\"tags\":{\"eggzfb\":\"cohslkev\",\"ithlvmezyvshxm\":\"hfmvfaxkffe\",\"gigr\":\"sbbzo\"},\"id\":\"wburvjxxjnspydpt\",\"name\":\"oenkouknvudwti\",\"type\":\"kbldngkpocipa\"}]}"; + = "{\"value\":[{\"properties\":{\"ledgerName\":\"dfgiot\",\"ledgerUri\":\"tutqxlngxlefgug\",\"identityServiceUri\":\"krxd\",\"ledgerInternalNamespace\":\"i\",\"ledgerType\":\"Unknown\",\"provisioningState\":\"Updating\",\"aadBasedSecurityPrincipals\":[{\"principalId\":\"drabhjybige\",\"tenantId\":\"qfbow\",\"ledgerRoleName\":\"Reader\"},{\"principalId\":\"yktz\",\"tenantId\":\"u\",\"ledgerRoleName\":\"Administrator\"}],\"certBasedSecurityPrincipals\":[{\"cert\":\"wgndrvynhzgpp\",\"ledgerRoleName\":\"Contributor\"}]},\"location\":\"nc\",\"tags\":{\"oo\":\"ecfvmm\"},\"id\":\"sxlzevgbmqj\",\"name\":\"abcypmivk\",\"type\":\"lzu\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -36,22 +34,20 @@ public void testList() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response - = manager.ledgers().list("czvyifq", com.azure.core.util.Context.NONE); + = manager.ledgers().list("uhrzayvvt", com.azure.core.util.Context.NONE); - Assertions.assertEquals("npc", response.iterator().next().location()); - Assertions.assertEquals("cohslkev", response.iterator().next().tags().get("eggzfb")); - Assertions.assertEquals(RunningState.RESUMING, response.iterator().next().properties().runningState()); - Assertions.assertEquals(LedgerType.PRIVATE, response.iterator().next().properties().ledgerType()); - Assertions.assertEquals(LedgerSku.BASIC, response.iterator().next().properties().ledgerSku()); - Assertions.assertEquals("yokacspkw", + Assertions.assertEquals(LedgerType.UNKNOWN, response.iterator().next().properties().ledgerType()); + Assertions.assertEquals("drabhjybige", response.iterator().next().properties().aadBasedSecurityPrincipals().get(0).principalId()); - Assertions.assertEquals("zdobpxjmflbvvnch", + Assertions.assertEquals("qfbow", response.iterator().next().properties().aadBasedSecurityPrincipals().get(0).tenantId()); Assertions.assertEquals(LedgerRoleName.READER, response.iterator().next().properties().aadBasedSecurityPrincipals().get(0).ledgerRoleName()); - Assertions.assertEquals("uugidyjrrfby", + Assertions.assertEquals("wgndrvynhzgpp", response.iterator().next().properties().certBasedSecurityPrincipals().get(0).cert()); Assertions.assertEquals(LedgerRoleName.CONTRIBUTOR, response.iterator().next().properties().certBasedSecurityPrincipals().get(0).ledgerRoleName()); + Assertions.assertEquals("nc", response.iterator().next().location()); + Assertions.assertEquals("ecfvmm", response.iterator().next().tags().get("oo")); } } diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/LedgersRestoreMockTests.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/LedgersRestoreMockTests.java deleted file mode 100644 index 3b6c7a745e85..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/LedgersRestoreMockTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager; -import com.azure.resourcemanager.confidentialledger.models.ConfidentialLedgerRestore; -import com.azure.resourcemanager.confidentialledger.models.ConfidentialLedgerRestoreResponse; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class LedgersRestoreMockTests { - @Test - public void testRestore() throws Exception { - String responseStr = "{\"message\":\"ixzbinjeputtmryw\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ConfidentialLedgerManager manager = ConfidentialLedgerManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ConfidentialLedgerRestoreResponse response = manager.ledgers() - .restore("jzicwifsjt", "gzfbishcbk", - new ConfidentialLedgerRestore().withFileShareName("ajdeyeamdphaga") - .withRestoreRegion("pbuxwgipwhon") - .withUri("wkgshwa"), - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfBackupResponseInnerTests.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfBackupResponseInnerTests.java deleted file mode 100644 index 6fffaa2116ea..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfBackupResponseInnerTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.confidentialledger.fluent.models.ManagedCcfBackupResponseInner; - -public final class ManagedCcfBackupResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedCcfBackupResponseInner model - = BinaryData.fromString("{\"message\":\"qdrabhjybigehoqf\"}").toObject(ManagedCcfBackupResponseInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedCcfBackupResponseInner model = new ManagedCcfBackupResponseInner(); - model = BinaryData.fromObject(model).toObject(ManagedCcfBackupResponseInner.class); - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfBackupTests.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfBackupTests.java deleted file mode 100644 index 46393592d2aa..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfBackupTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.confidentialledger.models.ManagedCcfBackup; -import org.junit.jupiter.api.Assertions; - -public final class ManagedCcfBackupTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedCcfBackup model = BinaryData.fromString("{\"restoreRegion\":\"fgugnxkrxdqmid\",\"uri\":\"thz\"}") - .toObject(ManagedCcfBackup.class); - Assertions.assertEquals("fgugnxkrxdqmid", model.restoreRegion()); - Assertions.assertEquals("thz", model.uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedCcfBackup model = new ManagedCcfBackup().withRestoreRegion("fgugnxkrxdqmid").withUri("thz"); - model = BinaryData.fromObject(model).toObject(ManagedCcfBackup.class); - Assertions.assertEquals("fgugnxkrxdqmid", model.restoreRegion()); - Assertions.assertEquals("thz", model.uri()); - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfRestoreResponseInnerTests.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfRestoreResponseInnerTests.java deleted file mode 100644 index 69b94cf07ea7..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfRestoreResponseInnerTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.confidentialledger.fluent.models.ManagedCcfRestoreResponseInner; - -public final class ManagedCcfRestoreResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedCcfRestoreResponseInner model - = BinaryData.fromString("{\"message\":\"hrc\"}").toObject(ManagedCcfRestoreResponseInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedCcfRestoreResponseInner model = new ManagedCcfRestoreResponseInner(); - model = BinaryData.fromObject(model).toObject(ManagedCcfRestoreResponseInner.class); - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfRestoreTests.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfRestoreTests.java deleted file mode 100644 index 0ccd63d193d8..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfRestoreTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.confidentialledger.models.ManagedCcfRestore; -import org.junit.jupiter.api.Assertions; - -public final class ManagedCcfRestoreTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedCcfRestore model = BinaryData - .fromString("{\"fileShareName\":\"owskanyktz\",\"restoreRegion\":\"cuiywgqyw\",\"uri\":\"ndrvynhzg\"}") - .toObject(ManagedCcfRestore.class); - Assertions.assertEquals("owskanyktz", model.fileShareName()); - Assertions.assertEquals("cuiywgqyw", model.restoreRegion()); - Assertions.assertEquals("ndrvynhzg", model.uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedCcfRestore model = new ManagedCcfRestore().withFileShareName("owskanyktz") - .withRestoreRegion("cuiywgqyw") - .withUri("ndrvynhzg"); - model = BinaryData.fromObject(model).toObject(ManagedCcfRestore.class); - Assertions.assertEquals("owskanyktz", model.fileShareName()); - Assertions.assertEquals("cuiywgqyw", model.restoreRegion()); - Assertions.assertEquals("ndrvynhzg", model.uri()); - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfsBackupMockTests.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfsBackupMockTests.java deleted file mode 100644 index 6c39f2c617a8..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfsBackupMockTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager; -import com.azure.resourcemanager.confidentialledger.models.ManagedCcfBackup; -import com.azure.resourcemanager.confidentialledger.models.ManagedCcfBackupResponse; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ManagedCcfsBackupMockTests { - @Test - public void testBackup() throws Exception { - String responseStr = "{\"message\":\"njbkcnxdhbttkph\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ConfidentialLedgerManager manager = ConfidentialLedgerManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ManagedCcfBackupResponse response = manager.managedCcfs() - .backup("twrupqsxvnm", "cykvceo", new ManagedCcfBackup().withRestoreRegion("ilovnot").withUri("fj"), - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfsDeleteMockTests.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfsDeleteMockTests.java deleted file mode 100644 index ef34e0237091..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfsDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ManagedCcfsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ConfidentialLedgerManager manager = ConfidentialLedgerManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.managedCcfs().delete("ovplw", "bhvgy", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfsRestoreMockTests.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfsRestoreMockTests.java deleted file mode 100644 index 3f34a40ca4f7..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfsRestoreMockTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.confidentialledger.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager; -import com.azure.resourcemanager.confidentialledger.models.ManagedCcfRestore; -import com.azure.resourcemanager.confidentialledger.models.ManagedCcfRestoreResponse; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ManagedCcfsRestoreMockTests { - @Test - public void testRestore() throws Exception { - String responseStr = "{\"message\":\"ugxywpmueef\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ConfidentialLedgerManager manager = ConfidentialLedgerManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ManagedCcfRestoreResponse response = manager.managedCcfs() - .restore("wpn", "jtoqne", - new ManagedCcfRestore().withFileShareName("mclfplphoxuscr").withRestoreRegion("abgy").withUri("psbjta"), - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/OperationsListMockTests.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/OperationsListMockTests.java index 7aacae9ba26b..a3604e0ed453 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/OperationsListMockTests.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/OperationsListMockTests.java @@ -22,7 +22,7 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"nc\",\"isDataAction\":false,\"display\":{\"provider\":\"fvm\",\"resource\":\"oo\",\"operation\":\"xlzevgbmqjqabcy\",\"description\":\"ivkwlzuvccfwnfnb\"}}]}"; + = "{\"value\":[{\"name\":\"bhtqqrolfpfpsa\",\"isDataAction\":false,\"display\":{\"provider\":\"xigjyjgzjaoyfhr\",\"resource\":\"ilnerkujysvlejuv\",\"operation\":\"awrlyx\",\"description\":\"kcprbnw\"}}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,11 +34,11 @@ public void testList() throws Exception { PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("nc", response.iterator().next().name()); + Assertions.assertEquals("bhtqqrolfpfpsa", response.iterator().next().name()); Assertions.assertEquals(false, response.iterator().next().isDataAction()); - Assertions.assertEquals("fvm", response.iterator().next().display().provider()); - Assertions.assertEquals("oo", response.iterator().next().display().resource()); - Assertions.assertEquals("xlzevgbmqjqabcy", response.iterator().next().display().operation()); - Assertions.assertEquals("ivkwlzuvccfwnfnb", response.iterator().next().display().description()); + Assertions.assertEquals("xigjyjgzjaoyfhr", response.iterator().next().display().provider()); + Assertions.assertEquals("ilnerkujysvlejuv", response.iterator().next().display().resource()); + Assertions.assertEquals("awrlyx", response.iterator().next().display().operation()); + Assertions.assertEquals("kcprbnw", response.iterator().next().display().description()); } } diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ResourceLocationTests.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ResourceLocationTests.java new file mode 100644 index 000000000000..76825a7e7cc9 --- /dev/null +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ResourceLocationTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confidentialledger.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.confidentialledger.models.ResourceLocation; +import org.junit.jupiter.api.Assertions; + +public final class ResourceLocationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ResourceLocation model = BinaryData.fromString("{\"location\":\"fkufublj\"}").toObject(ResourceLocation.class); + Assertions.assertEquals("fkufublj", model.location()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ResourceLocation model = new ResourceLocation().withLocation("fkufublj"); + model = BinaryData.fromObject(model).toObject(ResourceLocation.class); + Assertions.assertEquals("fkufublj", model.location()); + } +} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ResourceProvidersCheckNameAvailabilityWithResponseMockTests.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ResourceProvidersCheckNameAvailabilityWithResponseMockTests.java index eedb54195361..d360516e191e 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ResourceProvidersCheckNameAvailabilityWithResponseMockTests.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ResourceProvidersCheckNameAvailabilityWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class ResourceProvidersCheckNameAvailabilityWithResponseMockTests { @Test public void testCheckNameAvailabilityWithResponse() throws Exception { - String responseStr = "{\"nameAvailable\":false,\"reason\":\"AlreadyExists\",\"message\":\"xdpnqbqq\"}"; + String responseStr = "{\"nameAvailable\":true,\"reason\":\"AlreadyExists\",\"message\":\"uouq\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,12 +32,13 @@ public void testCheckNameAvailabilityWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); CheckNameAvailabilityResponse response = manager.resourceProviders() - .checkNameAvailabilityWithResponse(new CheckNameAvailabilityRequest().withName("fionl").withType("x"), + .checkNameAvailabilityWithResponse( + new CheckNameAvailabilityRequest().withName("gjvtbv").withType("sszdnru"), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(false, response.nameAvailable()); + Assertions.assertEquals(true, response.nameAvailable()); Assertions.assertEquals(CheckNameAvailabilityReason.ALREADY_EXISTS, response.reason()); - Assertions.assertEquals("xdpnqbqq", response.message()); + Assertions.assertEquals("uouq", response.message()); } } diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/TagsTests.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/TagsTests.java new file mode 100644 index 000000000000..d452fb765698 --- /dev/null +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/TagsTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confidentialledger.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.confidentialledger.models.Tags; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class TagsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Tags model = BinaryData.fromString( + "{\"tags\":{\"aeqjhqjbasvms\":\"qeof\",\"gsntnbybkzgcwr\":\"jqul\",\"skcqvkocrcjd\":\"clxxwrljdo\",\"lssai\":\"wtnhxbnjbiksqr\"}}") + .toObject(Tags.class); + Assertions.assertEquals("qeof", model.tags().get("aeqjhqjbasvms")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + Tags model = new Tags().withTags(mapOf("aeqjhqjbasvms", "qeof", "gsntnbybkzgcwr", "jqul", "skcqvkocrcjd", + "clxxwrljdo", "lssai", "wtnhxbnjbiksqr")); + model = BinaryData.fromObject(model).toObject(Tags.class); + Assertions.assertEquals("qeof", model.tags().get("aeqjhqjbasvms")); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} From 6da52579b162bf4f17bb8bc127f62dc4afad8636 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Thu, 26 Dec 2024 13:06:24 +0800 Subject: [PATCH 3/4] Update CHANGELOG for Azure ConfidentialLedger --- .../CHANGELOG.md | 77 +------------------ 1 file changed, 3 insertions(+), 74 deletions(-) diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/CHANGELOG.md b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/CHANGELOG.md index f8fb1ccd1c67..eef10fc38f78 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/CHANGELOG.md +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/CHANGELOG.md @@ -2,82 +2,11 @@ ## 1.0.0 (2024-12-26) -- Azure Resource Manager ConfidentialLedger client library for Java. This package contains Microsoft Azure SDK for ConfidentialLedger Management SDK. Microsoft Azure Confidential Compute Ledger Control Plane REST API version 2020-12-01-preview. Package tag package-2022-05-13. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). - -### Breaking Changes - -#### `models.MemberIdentityCertificate` was removed - -#### `models.ManagedCcfRestore` was removed - -#### `models.LanguageRuntime` was removed - -#### `models.ManagedCcf$Update` was removed - -#### `models.ManagedCcfBackup` was removed - -#### `models.ConfidentialLedgerBackup` was removed - -#### `models.ManagedCcf$UpdateStages` was removed - -#### `models.ManagedCcf$Definition` was removed - -#### `models.ManagedCcf$DefinitionStages` was removed - -#### `models.ManagedCcfs` was removed - -#### `models.ConfidentialLedgerBackupResponse` was removed - -#### `models.ManagedCcfRestoreResponse` was removed - -#### `models.ManagedCcfProperties` was removed - -#### `models.ManagedCcfList` was removed - -#### `models.ManagedCcf` was removed - -#### `models.ConfidentialLedgerRestore` was removed - -#### `models.ManagedCcfBackupResponse` was removed - -#### `models.RunningState` was removed - -#### `models.DeploymentType` was removed - -#### `models.ConfidentialLedgerRestoreResponse` was removed - -#### `models.LedgerSku` was removed - -#### `models.LedgerProperties` was modified - -* `runningState()` was removed -* `ledgerSku()` was removed -* `withRunningState(models.RunningState)` was removed -* `withLedgerSku(models.LedgerSku)` was removed - -#### `ConfidentialLedgerManager` was modified - -* `managedCcfs()` was removed - -#### `models.ConfidentialLedger` was modified - -* `backup(models.ConfidentialLedgerBackup)` was removed -* `backup(models.ConfidentialLedgerBackup,com.azure.core.util.Context)` was removed -* `restore(models.ConfidentialLedgerRestore,com.azure.core.util.Context)` was removed -* `restore(models.ConfidentialLedgerRestore)` was removed - -#### `models.Ledgers` was modified - -* `backup(java.lang.String,java.lang.String,models.ConfidentialLedgerBackup,com.azure.core.util.Context)` was removed -* `restore(java.lang.String,java.lang.String,models.ConfidentialLedgerRestore,com.azure.core.util.Context)` was removed -* `backup(java.lang.String,java.lang.String,models.ConfidentialLedgerBackup)` was removed -* `restore(java.lang.String,java.lang.String,models.ConfidentialLedgerRestore)` was removed - -### Features Added +- Azure Resource Manager ConfidentialLedger client library for Java. This package contains Microsoft Azure SDK for ConfidentialLedger Management SDK. Package tag package-2022-05-13. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). -* `models.ResourceLocation` was added +### Other Changes -* `models.Tags` was added +- Release for Azure Resource Manager ConfidentialLedger client library for Java. ## 1.0.0-beta.5 (2024-12-04) From edc965e7a7eb3547f548afa414327b365a3706f6 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Thu, 26 Dec 2024 13:30:21 +0800 Subject: [PATCH 4/4] remove --- .../ConfidentialLedgerManagementOperations.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/ConfidentialLedgerManagementOperations.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/ConfidentialLedgerManagementOperations.java index ea3e44ff0b30..ee8a14e1ba73 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/ConfidentialLedgerManagementOperations.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/ConfidentialLedgerManagementOperations.java @@ -25,7 +25,7 @@ public void createLedger(String ledgerName, String resourceGroupName, String loc List certBasedMembers) { ledgerManager.ledgers() .define(ledgerName) - .withRegion(location) + // .withRegion(location) .withExistingResourceGroup(resourceGroupName) .withTags(tags) .withProperties(new LedgerProperties().withLedgerType(ledgerType) @@ -37,7 +37,7 @@ public void createLedger(String ledgerName, String resourceGroupName, String loc public void createLedger(String ledgerName, String resourceGroupName, String location) { ledgerManager.ledgers() .define(ledgerName) - .withRegion(location) + // .withRegion(location) .withExistingResourceGroup(resourceGroupName) .create(); }