diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/CHANGELOG.md b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/CHANGELOG.md index acdcbec66a2e..13e52a98196f 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/CHANGELOG.md +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/CHANGELOG.md @@ -1,14 +1,84 @@ # Release History -## 1.1.0-beta.2 (Unreleased) +## 1.1.0-beta.2 (2026-03-04) -### 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 Managed CCF Control Plane REST API version 2025-06-10-preview. Package api-version 2025-06-10-preview. 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.ConfidentialLedgerList` was removed -### Other Changes +#### `models.ManagedCcfList` was removed + +#### `models.ResourceProviderOperationList` was removed + +#### `models.MemberIdentityCertificate` was modified + +* `java.lang.Object tags()` -> `com.azure.core.util.BinaryData tags()` +* `validate()` was removed +* `withTags(java.lang.Object)` was removed + +#### `models.AadBasedSecurityPrincipal` was modified + +* `validate()` was removed + +#### `models.ManagedCcfRestore` was modified + +* `validate()` was removed + +#### `models.ManagedCcfBackup` was modified + +* `validate()` was removed + +#### `models.ConfidentialLedgerBackup` was modified + +* `validate()` was removed + +#### `models.CertBasedSecurityPrincipal` was modified + +* `validate()` was removed + +#### `models.CheckNameAvailabilityRequest` was modified + +* `validate()` was removed + +#### `models.LedgerProperties` was modified + +* `validate()` was removed +* `withEnclavePlatform(models.EnclavePlatform)` was removed + +#### `models.ManagedCcfProperties` was modified + +* `withEnclavePlatform(models.EnclavePlatform)` was removed +* `validate()` was removed + +#### `models.ConfidentialLedgerRestore` was modified + +* `validate()` was removed + +#### `models.ResourceProviderOperationDisplay` was modified + +* `ResourceProviderOperationDisplay()` was changed to private access +* `withProvider(java.lang.String)` was removed +* `withResource(java.lang.String)` was removed +* `withOperation(java.lang.String)` was removed +* `validate()` was removed +* `withDescription(java.lang.String)` was removed + +#### `models.DeploymentType` was modified + +* `validate()` was removed + +### Features Added + +#### `models.MemberIdentityCertificate` was modified + +* `withTags(com.azure.core.util.BinaryData)` was added + +#### `models.LedgerProperties` was modified + +* `scittConfiguration()` was added +* `withScittConfiguration(java.lang.String)` was added ## 1.1.0-beta.1 (2025-05-15) diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/README.md b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/README.md index 89d83195c45f..317b88061040 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-2024-09. 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 Managed CCF Control Plane REST API version 2025-06-10-preview. Package api-version 2025-06-10-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-confidentialledger - 1.1.0-beta.1 + 1.1.0-beta.2 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/SAMPLE.md b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/SAMPLE.md index 98cc916510f0..9939e16af032 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/SAMPLE.md +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/SAMPLE.md @@ -12,17 +12,6 @@ - [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) @@ -32,30 +21,6 @@ - [CheckNameAvailability](#resourceprovider_checknameavailability) ### Ledger_Backup -```java -/** - * Samples for Ledger ListByResourceGroup. - */ -public final class LedgerListByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2024-09-19-preview/ - * examples/ConfidentialLedger_List.json - */ - /** - * Sample code: ConfidentialLedgerList. - * - * @param manager Entry point to ConfidentialLedgerManager. - */ - public static void - confidentialLedgerList(com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { - manager.ledgers().listByResourceGroup("DummyResourceGroupName", null, com.azure.core.util.Context.NONE); - } -} -``` - -### Ledger_Create - ```java import com.azure.resourcemanager.confidentialledger.models.ConfidentialLedgerBackup; @@ -64,9 +29,7 @@ import com.azure.resourcemanager.confidentialledger.models.ConfidentialLedgerBac */ public final class LedgerBackupSamples { /* - * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2024-09-19-preview/ - * examples/ConfidentialLedger_Backup.json + * x-ms-original-file: 2025-06-10-preview/ConfidentialLedger_Backup.json */ /** * Sample code: ConfidentialLedgerBackup. @@ -83,52 +46,53 @@ public final class LedgerBackupSamples { } ``` -### Ledger_Delete +### Ledger_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 com.azure.resourcemanager.confidentialledger.models.AadBasedSecurityPrincipal; +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; import java.util.Map; /** - * Samples for ManagedCcf Create. + * Samples for Ledger Create. */ -public final class ManagedCcfCreateSamples { +public final class LedgerCreateSamples { /* - * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2024-09-19-preview/ - * examples/ManagedCCF_Create.json + * x-ms-original-file: 2025-06-10-preview/ConfidentialLedger_Create.json */ /** - * Sample code: ManagedCCFCreate. + * Sample code: ConfidentialLedgerCreate. * * @param manager Entry point to ConfidentialLedgerManager. */ - public static void managedCCFCreate(com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) - throws IOException { - manager.managedCcfs() - .define("DummyMccfAppName") + public static void + confidentialLedgerCreate(com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { + manager.ledgers() + .define("DummyLedgerName") .withRegion("EastUS") .withExistingResourceGroup("DummyResourceGroupName") .withTags(mapOf("additionalProps1", "additional properties")) - .withProperties(new ManagedCcfProperties() - .withMemberIdentityCertificates(Arrays.asList(new MemberIdentityCertificate().withCertificate( + .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") + .withLedgerRoleName(LedgerRoleName.ADMINISTRATOR))) + .withCertBasedSecurityPrincipals(Arrays.asList(new CertBasedSecurityPrincipal().withCert( "-----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)) + .withLedgerRoleName(LedgerRoleName.READER))) + .withHostLevel("Info") + .withMaxBodySizeInMb(1) + .withSubjectName("CN=CCF Node") + .withNodeCount(3) + .withWriteLBAddressPrefix("write") + .withWorkerThreads(0)) .create(); } @@ -146,138 +110,7 @@ public final class ManagedCcfCreateSamples { } ``` -### Ledger_GetByResourceGroup - -```java -/** - * Samples for ManagedCcf ListByResourceGroup. - */ -public final class ManagedCcfListByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2024-09-19-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); - } -} -``` - -### Ledger_List - -```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/2024-09-19-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); - } -} -``` - -### Ledger_ListByResourceGroup - -```java -/** - * Samples for Operations List. - */ -public final class OperationsListSamples { - /* - * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2024-09-19-preview/ - * examples/Operations_Get.json - */ - /** - * Sample code: OperationsGet. - * - * @param manager Entry point to ConfidentialLedgerManager. - */ - public static void operationsGet(com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { - manager.operations().list(com.azure.core.util.Context.NONE); - } -} -``` - -### Ledger_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/2024-09-19-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); - } -} -``` - -### Ledger_Update - -```java -/** - * Samples for ManagedCcf GetByResourceGroup. - */ -public final class ManagedCcfGetByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2024-09-19-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_Backup +### Ledger_Delete ```java /** @@ -285,9 +118,7 @@ public final class ManagedCcfGetByResourceGroupSamples { */ public final class LedgerDeleteSamples { /* - * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2024-09-19-preview/ - * examples/ConfidentialLedger_Delete.json + * x-ms-original-file: 2025-06-10-preview/ConfidentialLedger_Delete.json */ /** * Sample code: ConfidentialLedgerDelete. @@ -301,136 +132,104 @@ public final class LedgerDeleteSamples { } ``` -### ManagedCcf_Create +### Ledger_GetByResourceGroup ```java /** - * Samples for ManagedCcf List. + * Samples for Ledger GetByResourceGroup. */ -public final class ManagedCcfListSamples { +public final class LedgerGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2024-09-19-preview/ - * examples/ManagedCCF_ListBySub.json + * x-ms-original-file: 2025-06-10-preview/ConfidentialLedger_Get.json */ /** - * Sample code: ManagedCCFListBySub. + * Sample code: ConfidentialLedgerGet. * * @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); + confidentialLedgerGet(com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { + manager.ledgers() + .getByResourceGroupWithResponse("DummyResourceGroupName", "DummyLedgerName", + com.azure.core.util.Context.NONE); } } ``` -### ManagedCcf_Delete +### Ledger_List ```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. + * Samples for Ledger List. */ -public final class ManagedCcfUpdateSamples { +public final class LedgerListSamples { /* - * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2024-09-19-preview/ - * examples/ManagedCCF_Update.json + * x-ms-original-file: 2025-06-10-preview/ConfidentialLedger_ListBySub.json */ /** - * Sample code: ManagedCCFUpdate. + * Sample code: ConfidentialLedgerListBySub. * * @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; + confidentialLedgerListBySub(com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { + manager.ledgers().list(null, com.azure.core.util.Context.NONE); } } ``` -### ManagedCcf_GetByResourceGroup +### Ledger_ListByResourceGroup ```java -import com.azure.resourcemanager.confidentialledger.models.CheckNameAvailabilityRequest; - /** - * Samples for ResourceProvider CheckNameAvailability. + * Samples for Ledger ListByResourceGroup. */ -public final class ResourceProviderCheckNameAvailabilitySamples { +public final class LedgerListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2024-09-19-preview/ - * examples/CheckNameAvailability.json + * x-ms-original-file: 2025-06-10-preview/ConfidentialLedger_List.json */ /** - * Sample code: CheckNameAvailability. + * Sample code: ConfidentialLedgerList. * * @param manager Entry point to ConfidentialLedgerManager. */ public static void - checkNameAvailability(com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { - manager.resourceProviders() - .checkNameAvailabilityWithResponse(new CheckNameAvailabilityRequest().withName("sample-name") - .withType("Microsoft.ConfidentialLedger/ledgers"), com.azure.core.util.Context.NONE); + confidentialLedgerList(com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { + manager.ledgers().listByResourceGroup("DummyResourceGroupName", null, com.azure.core.util.Context.NONE); } } ``` -### ManagedCcf_List +### Ledger_Restore ```java +import com.azure.resourcemanager.confidentialledger.models.ConfidentialLedgerRestore; + /** - * Samples for Ledger List. + * Samples for Ledger Restore. */ -public final class LedgerListSamples { +public final class LedgerRestoreSamples { /* - * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2024-09-19-preview/ - * examples/ConfidentialLedger_ListBySub.json + * x-ms-original-file: 2025-06-10-preview/ConfidentialLedger_Restore.json */ /** - * Sample code: ConfidentialLedgerListBySub. + * Sample code: ConfidentialLedgerRestore. * * @param manager Entry point to ConfidentialLedgerManager. */ public static void - confidentialLedgerListBySub(com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { - manager.ledgers().list(null, com.azure.core.util.Context.NONE); + 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); } } ``` -### ManagedCcf_ListByResourceGroup +### Ledger_Update ```java import com.azure.resourcemanager.confidentialledger.models.AadBasedSecurityPrincipal; @@ -448,9 +247,7 @@ import java.util.Map; */ public final class LedgerUpdateSamples { /* - * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2024-09-19-preview/ - * examples/ConfidentialLedger_Update.json + * x-ms-original-file: 2025-06-10-preview/ConfidentialLedger_Update.json */ /** * Sample code: ConfidentialLedgerUpdate. @@ -472,74 +269,10 @@ public final class LedgerUpdateSamples { .withLedgerRoleName(LedgerRoleName.ADMINISTRATOR))) .withCertBasedSecurityPrincipals(Arrays.asList(new CertBasedSecurityPrincipal().withCert( "-----BEGIN CERTIFICATE-----\nMIIDUjCCAjqgAwIBAgIQJ2IrDBawSkiAbkBYmiAopDANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDExtTeW50aGV0aWNzIExlZGdlciBVc2VyIENlcnQwHhcNMjAwOTIzMjIxODQ2WhcNMjEwOTIzMjIyODQ2WjAmMSQwIgYDVQQDExtTeW50aGV0aWNzIExlZGdlciBVc2VyIENlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCX2s/Eu4q/eQ63N+Ugeg5oAciZua/YCJr41c/696szvSY7Zg1SNJlW88/nbz70+QpO55OmqlEE3QCU+T0Vl/h0Gf//n1PYcoBbTGUnYEmV+fTTHict6rFiEwrGJ62tvcpYgwapInSLyEeUzjki0zhOLJ1OfRnYd1eGnFVMpE5aVjiS8Q5dmTEUyd51EIprGE8RYAW9aeWSwTH7gjHUsRlJnHKcdhaK/v5QKJnNu5bzPFUcpC0ZBcizoMPAtroLAD4B68Jl0z3op18MgZe6lRrVoWuxfqnk5GojuB/Vu8ohAZKoFhQ6NB6r+LL2AUs+Zr7Bt26IkEdR178n9JMEA4gHAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBS/a7PU9iOfOKEyZCp11Oen5VSuuDAdBgNVHQ4EFgQUv2uz1PYjnzihMmQqddTnp+VUrrgwDQYJKoZIhvcNAQELBQADggEBAF5q2fDwnse8egXhfaJCqqM969E9gSacqFmASpoDJPRPEX7gqoO7v1ww7nqRtRDoRiBvo/yNk7jlSAkRN3nRRnZLZZ3MYQdmCr4FGyIqRg4Y94+nja+Du9pDD761rxRktMVPSOaAVM/E5DQvscDlPvlPYe9mkcrLCE4DXYpiMmLT8Tm55LJJq5m07dVDgzAIR1L/hmEcbK0pnLgzciMtMLxGO2udnyyW/UW9WxnjvrrD2JluTHH9mVbb+XQP1oFtlRBfH7aui1ZgWfKvxrdP4zdK9QoWSUvRux3TLsGmHRBjBMtqYDY3y5mB+aNjLelvWpeVb0m2aOSVXynrLwNCAVA=\n-----END CERTIFICATE-----") - .withLedgerRoleName(LedgerRoleName.READER)))) - .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; - } -} -``` - -### ManagedCcf_Restore - -```java -import com.azure.resourcemanager.confidentialledger.models.AadBasedSecurityPrincipal; -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; -import java.util.Map; - -/** - * Samples for Ledger Create. - */ -public final class LedgerCreateSamples { - /* - * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2024-09-19-preview/ - * examples/ConfidentialLedger_Create.json - */ - /** - * Sample code: ConfidentialLedgerCreate. - * - * @param manager Entry point to ConfidentialLedgerManager. - */ - public static void - confidentialLedgerCreate(com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { - manager.ledgers() - .define("DummyLedgerName") - .withRegion("EastUS") - .withExistingResourceGroup("DummyResourceGroupName") - .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") - .withLedgerRoleName(LedgerRoleName.ADMINISTRATOR))) - .withCertBasedSecurityPrincipals(Arrays.asList(new CertBasedSecurityPrincipal().withCert( - "-----BEGIN CERTIFICATE-----MIIBsjCCATigAwIBAgIUZWIbyG79TniQLd2UxJuU74tqrKcwCgYIKoZIzj0EAwMwEDEOMAwGA1UEAwwFdXNlcjAwHhcNMjEwMzE2MTgwNjExWhcNMjIwMzE2MTgwNjExWjAQMQ4wDAYDVQQDDAV1c2VyMDB2MBAGByqGSM49AgEGBSuBBAAiA2IABBiWSo/j8EFit7aUMm5lF+lUmCu+IgfnpFD+7QMgLKtxRJ3aGSqgS/GpqcYVGddnODtSarNE/HyGKUFUolLPQ5ybHcouUk0kyfA7XMeSoUA4lBz63Wha8wmXo+NdBRo39qNTMFEwHQYDVR0OBBYEFPtuhrwgGjDFHeUUT4nGsXaZn69KMB8GA1UdIwQYMBaAFPtuhrwgGjDFHeUUT4nGsXaZn69KMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwMDaAAwZQIxAOnozm2CyqRwSSQLls5r+mUHRGRyXHXwYtM4Dcst/VEZdmS9fqvHRCHbjUlO/+HNfgIwMWZ4FmsjD3wnPxONOm9YdVn/PRD7SsPRPbOjwBiE4EBGaHDsLjYAGDSGi7NJnSkA-----END CERTIFICATE-----") .withLedgerRoleName(LedgerRoleName.READER))) - .withHostLevel("Info") - .withMaxBodySizeInMb(1) - .withSubjectName("CN=CCF Node") - .withNodeCount(3) - .withWriteLBAddressPrefix("write") - .withWorkerThreads(0)) - .create(); + .withScittConfiguration( + "{\r\n \"configuration\": {\r\n \"policy\": {\r\n \"policyScript\": \"export function apply(phdr) { if (!phdr.issuer) {return 'Issuer not found'} else if (phdr.issuer !== 'did:x509:0:sha256:HnwZ4lezuxq/GVcl/Sk7YWW170qAD0DZBLXilXet0jg=::eku:1.3.6.1.4.1.311.10.3.13') { return 'Invalid issuer'; } return true; }\"\r\n },\r\n \"authentication\": {\r\n \"allowUnauthenticated\": false,\r\n \"jwt\": {\r\n \"requiredClaims\": {\r\n \"aud\": \"scitt\",\r\n \"iss\": \"https://authserver.com/\",\r\n \"http://unique.claim/department_id\": \"654987\"\r\n }\r\n }\r\n }\r\n }\r\n }")) + .apply(); } // Use "Map.of" if available @@ -556,59 +289,23 @@ public final class LedgerCreateSamples { } ``` -### ManagedCcf_Update - -```java -/** - * Samples for Ledger GetByResourceGroup. - */ -public final class LedgerGetByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2024-09-19-preview/ - * examples/ConfidentialLedger_Get.json - */ - /** - * Sample code: ConfidentialLedgerGet. - * - * @param manager Entry point to ConfidentialLedgerManager. - */ - public static void - confidentialLedgerGet(com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { - manager.ledgers() - .getByResourceGroupWithResponse("DummyResourceGroupName", "DummyLedgerName", - com.azure.core.util.Context.NONE); - } -} -``` - ### Operations_List ```java -import com.azure.resourcemanager.confidentialledger.models.ConfidentialLedgerRestore; - /** - * Samples for Ledger Restore. + * Samples for Operations List. */ -public final class LedgerRestoreSamples { +public final class OperationsListSamples { /* - * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2024-09-19-preview/ - * examples/ConfidentialLedger_Restore.json + * x-ms-original-file: 2025-06-10-preview/Operations_Get.json */ /** - * Sample code: ConfidentialLedgerRestore. + * Sample code: OperationsGet. * * @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); + public static void operationsGet(com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); } } ``` @@ -616,23 +313,25 @@ public final class LedgerRestoreSamples { ### ResourceProvider_CheckNameAvailability ```java +import com.azure.resourcemanager.confidentialledger.models.CheckNameAvailabilityRequest; + /** - * Samples for ManagedCcf Delete. + * Samples for ResourceProvider CheckNameAvailability. */ -public final class ManagedCcfDeleteSamples { +public final class ResourceProviderCheckNameAvailabilitySamples { /* - * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2024-09-19-preview/ - * examples/ManagedCCF_Delete.json + * x-ms-original-file: 2025-06-10-preview/CheckNameAvailability.json */ /** - * Sample code: ConfidentialLedgerDelete. + * Sample code: CheckNameAvailability. * * @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); + checkNameAvailability(com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { + manager.resourceProviders() + .checkNameAvailabilityWithResponse(new CheckNameAvailabilityRequest().withName("sample-name") + .withType("Microsoft.ConfidentialLedger/ledgers"), com.azure.core.util.Context.NONE); } } ``` diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/pom.xml b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/pom.xml index 4b92b77f2d75..b6382709a254 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/pom.xml +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/pom.xml @@ -1,9 +1,9 @@ - + 4.0.0 com.azure @@ -18,7 +18,7 @@ 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-2024-09. + 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 Managed CCF Control Plane REST API version 2025-06-10-preview. Package api-version 2025-06-10-preview. https://github.com/Azure/azure-sdk-for-java 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 159b0fc7895e..9f38787eae1a 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger; @@ -44,13 +44,13 @@ /** * Entry point to ConfidentialLedgerManager. - * Microsoft Azure Confidential Compute Ledger Control Plane REST API version 2020-12-01-preview. + * Microsoft Azure Confidential Compute Ledger Managed CCF Control Plane REST API version 2025-06-10-preview. */ public final class ConfidentialLedgerManager { - private Operations operations; - private ResourceProviders resourceProviders; + private Operations operations; + private Ledgers ledgers; private ManagedCcfs managedCcfs; @@ -270,18 +270,6 @@ public ConfidentialLedgerManager authenticate(TokenCredential credential, AzureP } } - /** - * Gets the resource collection API of Operations. - * - * @return Resource collection API of Operations. - */ - public Operations operations() { - if (this.operations == null) { - this.operations = new OperationsImpl(clientObject.getOperations(), this); - } - return operations; - } - /** * Gets the resource collection API of ResourceProviders. * @@ -294,6 +282,18 @@ public ResourceProviders resourceProviders() { return resourceProviders; } + /** + * Gets the resource collection API of Operations. + * + * @return Resource collection API of Operations. + */ + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(clientObject.getOperations(), this); + } + return operations; + } + /** * Gets the resource collection API of Ledgers. It manages ConfidentialLedger. * 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..0724862098ff 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.fluent; @@ -12,26 +12,26 @@ */ public interface ConfidentialLedgerManagementClient { /** - * Gets The ID of the target subscription. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets server parameter. + * Gets Service host. * * @return the endpoint value. */ String getEndpoint(); /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ String getApiVersion(); + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + String getSubscriptionId(); + /** * Gets The HTTP pipeline to send requests through. * @@ -47,18 +47,18 @@ public interface ConfidentialLedgerManagementClient { Duration getDefaultPollInterval(); /** - * Gets the OperationsClient object to access its operations. + * Gets the ResourceProvidersClient object to access its operations. * - * @return the OperationsClient object. + * @return the ResourceProvidersClient object. */ - OperationsClient getOperations(); + ResourceProvidersClient getResourceProviders(); /** - * Gets the ResourceProvidersClient object to access its operations. + * Gets the OperationsClient object to access its operations. * - * @return the ResourceProvidersClient object. + * @return the OperationsClient object. */ - ResourceProvidersClient getResourceProviders(); + OperationsClient getOperations(); /** * Gets the LedgersClient object to access its operations. 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..82d7e539088e 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.fluent; @@ -22,8 +22,6 @@ */ public interface LedgersClient { /** - * Retrieves information about a Confidential Ledger resource. - * * Retrieves the properties of a Confidential Ledger. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -39,8 +37,6 @@ Response getByResourceGroupWithResponse(String resource Context context); /** - * Retrieves information about a Confidential Ledger resource. - * * Retrieves the properties of a Confidential Ledger. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -54,90 +50,88 @@ Response getByResourceGroupWithResponse(String resource ConfidentialLedgerInner getByResourceGroup(String resourceGroupName, String ledgerName); /** - * Deletes a Confidential Ledger resource. - * - * Deletes an existing Confidential Ledger. + * Creates a Confidential Ledger with the specified ledger parameters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger. + * @param confidentialLedger Confidential Ledger 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 long-running operation. + * @return the {@link SyncPoller} for polling of confidential Ledger. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String ledgerName); + SyncPoller, ConfidentialLedgerInner> beginCreate(String resourceGroupName, + String ledgerName, ConfidentialLedgerInner confidentialLedger); /** - * Deletes a Confidential Ledger resource. - * - * Deletes an existing Confidential Ledger. + * Creates a Confidential Ledger with the specified ledger parameters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger. + * @param confidentialLedger Confidential Ledger 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 long-running operation. + * @return the {@link SyncPoller} for polling of confidential Ledger. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String ledgerName, Context context); + SyncPoller, ConfidentialLedgerInner> beginCreate(String resourceGroupName, + String ledgerName, ConfidentialLedgerInner confidentialLedger, Context context); /** - * Deletes a Confidential Ledger resource. - * - * Deletes an existing Confidential Ledger. + * Creates a Confidential Ledger with the specified ledger parameters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger. + * @param confidentialLedger Confidential Ledger 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 confidential Ledger. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String ledgerName); + ConfidentialLedgerInner create(String resourceGroupName, String ledgerName, + ConfidentialLedgerInner confidentialLedger); /** - * Deletes a Confidential Ledger resource. - * - * Deletes an existing Confidential Ledger. + * Creates a Confidential Ledger with the specified ledger parameters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger. + * @param confidentialLedger Confidential Ledger 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 confidential Ledger. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String ledgerName, Context context); + ConfidentialLedgerInner create(String resourceGroupName, String ledgerName, + ConfidentialLedgerInner confidentialLedger, Context context); /** - * Creates a Confidential Ledger. - * - * Creates a Confidential Ledger with the specified ledger parameters. + * Updates properties of Confidential Ledger. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger Create Request Body. + * @param confidentialLedger Confidential Ledger request body for Updating Ledger. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 confidential Ledger. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ConfidentialLedgerInner> beginCreate(String resourceGroupName, + SyncPoller, ConfidentialLedgerInner> beginUpdate(String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger); /** - * Creates a Confidential Ledger. - * - * Creates a Confidential Ledger with the specified ledger parameters. + * Updates properties of Confidential Ledger. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger Create Request Body. + * @param confidentialLedger Confidential Ledger request body for Updating Ledger. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -145,34 +139,30 @@ SyncPoller, ConfidentialLedgerInner> beginCr * @return the {@link SyncPoller} for polling of confidential Ledger. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ConfidentialLedgerInner> beginCreate(String resourceGroupName, + SyncPoller, ConfidentialLedgerInner> beginUpdate(String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger, Context context); /** - * Creates a Confidential Ledger. - * - * Creates a Confidential Ledger with the specified ledger parameters. + * Updates properties of Confidential Ledger. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger Create Request Body. + * @param confidentialLedger Confidential Ledger request body for Updating Ledger. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return confidential Ledger. */ @ServiceMethod(returns = ReturnType.SINGLE) - ConfidentialLedgerInner create(String resourceGroupName, String ledgerName, + ConfidentialLedgerInner update(String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger); /** - * Creates a Confidential Ledger. - * - * Creates a Confidential Ledger with the specified ledger parameters. + * Updates properties of Confidential Ledger. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger Create Request Body. + * @param confidentialLedger Confidential Ledger request body for Updating Ledger. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -180,82 +170,62 @@ ConfidentialLedgerInner create(String resourceGroupName, String ledgerName, * @return confidential Ledger. */ @ServiceMethod(returns = ReturnType.SINGLE) - ConfidentialLedgerInner create(String resourceGroupName, String ledgerName, + ConfidentialLedgerInner update(String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger, Context context); /** - * Update Confidential Ledger properties - * - * Updates properties of Confidential Ledger. + * Deletes an existing Confidential Ledger. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger request body for Updating Ledger. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 confidential Ledger. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ConfidentialLedgerInner> beginUpdate(String resourceGroupName, - String ledgerName, ConfidentialLedgerInner confidentialLedger); + SyncPoller, Void> beginDelete(String resourceGroupName, String ledgerName); /** - * Update Confidential Ledger properties - * - * Updates properties of Confidential Ledger. + * Deletes an existing Confidential Ledger. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 confidential Ledger. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ConfidentialLedgerInner> beginUpdate(String resourceGroupName, - String ledgerName, ConfidentialLedgerInner confidentialLedger, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String ledgerName, Context context); /** - * Update Confidential Ledger properties - * - * Updates properties of Confidential Ledger. + * Deletes an existing Confidential Ledger. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger request body for Updating Ledger. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return confidential Ledger. */ @ServiceMethod(returns = ReturnType.SINGLE) - ConfidentialLedgerInner update(String resourceGroupName, String ledgerName, - ConfidentialLedgerInner confidentialLedger); + void delete(String resourceGroupName, String ledgerName); /** - * Update Confidential Ledger properties - * - * Updates properties of Confidential Ledger. + * Deletes an existing Confidential Ledger. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return confidential Ledger. */ @ServiceMethod(returns = ReturnType.SINGLE) - ConfidentialLedgerInner update(String resourceGroupName, String ledgerName, - ConfidentialLedgerInner confidentialLedger, Context context); + void delete(String resourceGroupName, String ledgerName, Context context); /** - * Retrieves information about all Confidential Ledger resources under the given subscription and resource group - * * Retrieves the properties of all Confidential Ledgers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -269,8 +239,6 @@ ConfidentialLedgerInner update(String resourceGroupName, String ledgerName, PagedIterable listByResourceGroup(String resourceGroupName); /** - * Retrieves information about all Confidential Ledger resources under the given subscription and resource group - * * Retrieves the properties of all Confidential Ledgers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -287,8 +255,6 @@ PagedIterable listByResourceGroup(String resourceGroupN Context context); /** - * Retrieves information about all Confidential Ledger resources under the given subscription - * * Retrieves the properties of all Confidential Ledgers. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -300,8 +266,6 @@ PagedIterable listByResourceGroup(String resourceGroupN PagedIterable list(); /** - * Retrieves information about all Confidential Ledger resources under the given subscription - * * Retrieves the properties of all Confidential Ledgers. * * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. @@ -316,8 +280,6 @@ PagedIterable listByResourceGroup(String resourceGroupN 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. @@ -326,16 +288,13 @@ PagedIterable listByResourceGroup(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @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. @@ -345,16 +304,13 @@ PagedIterable listByResourceGroup(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @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. @@ -363,15 +319,13 @@ SyncPoller, ConfidentialLedger * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. + * @return the response. */ @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. @@ -381,15 +335,13 @@ ConfidentialLedgerBackupResponseInner backup(String resourceGroupName, String le * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. + * @return the response. */ @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. @@ -398,16 +350,13 @@ ConfidentialLedgerBackupResponseInner backup(String resourceGroupName, String le * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @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. @@ -417,16 +366,13 @@ ConfidentialLedgerBackupResponseInner backup(String resourceGroupName, String le * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @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. @@ -435,15 +381,13 @@ SyncPoller, ConfidentialLedge * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. + * @return the response. */ @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. @@ -453,7 +397,7 @@ ConfidentialLedgerRestoreResponseInner restore(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) ConfidentialLedgerRestoreResponseInner restore(String resourceGroupName, String ledgerName, 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 index 0a65f53a7008..e539f9f988fa 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.fluent; @@ -22,8 +22,6 @@ */ 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. @@ -38,8 +36,6 @@ public interface ManagedCcfsClient { 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. @@ -53,90 +49,86 @@ public interface ManagedCcfsClient { ManagedCcfInner getByResourceGroup(String resourceGroupName, String appName); /** - * Deletes a Managed CCF resource. - * - * Deletes an existing 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 long-running operation. + * @return the {@link SyncPoller} for polling of managed CCF. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String appName); + SyncPoller, ManagedCcfInner> beginCreate(String resourceGroupName, String appName, + ManagedCcfInner managedCCF); /** - * Deletes a Managed CCF resource. - * - * Deletes an existing 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 long-running operation. + * @return the {@link SyncPoller} for polling of managed CCF. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String appName, Context context); + SyncPoller, ManagedCcfInner> beginCreate(String resourceGroupName, String appName, + ManagedCcfInner managedCCF, Context context); /** - * Deletes a Managed CCF resource. - * - * Deletes an existing 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) - void delete(String resourceGroupName, String appName); + ManagedCcfInner create(String resourceGroupName, String appName, ManagedCcfInner managedCCF); /** - * Deletes a Managed CCF resource. - * - * Deletes an existing 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) - void delete(String resourceGroupName, String appName, Context context); + ManagedCcfInner create(String resourceGroupName, String appName, ManagedCcfInner managedCCF, Context context); /** - * Creates a Managed CCF. - * - * Creates a Managed CCF with the specified Managed CCF parameters. + * 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 Managed CCF Create Request Body. + * @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> beginCreate(String resourceGroupName, String appName, - ManagedCcfInner managedCcf); + SyncPoller, ManagedCcfInner> beginUpdate(String resourceGroupName, String appName, + ManagedCcfInner managedCCF); /** - * Creates a Managed CCF. - * - * Creates a Managed CCF with the specified Managed CCF parameters. + * 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 Managed CCF Create Request Body. + * @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. @@ -144,33 +136,29 @@ SyncPoller, ManagedCcfInner> beginCreate(String reso * @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); + SyncPoller, ManagedCcfInner> beginUpdate(String resourceGroupName, String appName, + ManagedCcfInner managedCCF, Context context); /** - * Creates a Managed CCF. - * - * Creates a Managed CCF with the specified Managed CCF parameters. + * 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 Managed CCF Create Request Body. + * @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 create(String resourceGroupName, String appName, ManagedCcfInner managedCcf); + ManagedCcfInner update(String resourceGroupName, String appName, ManagedCcfInner managedCCF); /** - * Creates a Managed CCF. - * - * Creates a Managed CCF with the specified Managed CCF parameters. + * 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 Managed CCF Create Request Body. + * @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. @@ -178,79 +166,61 @@ SyncPoller, ManagedCcfInner> beginCreate(String reso * @return managed CCF. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedCcfInner create(String resourceGroupName, String appName, ManagedCcfInner managedCcf, Context context); + ManagedCcfInner update(String resourceGroupName, String appName, ManagedCcfInner managedCCF, Context context); /** - * Update Managed CCF properties - * - * Updates properties of Managed CCF. + * 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 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedCcfInner> beginUpdate(String resourceGroupName, String appName, - ManagedCcfInner managedCcf); + SyncPoller, Void> beginDelete(String resourceGroupName, String appName); /** - * Update Managed CCF properties - * - * Updates properties of Managed CCF. + * 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 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedCcfInner> beginUpdate(String resourceGroupName, String appName, - ManagedCcfInner managedCcf, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String appName, Context context); /** - * Update Managed CCF properties - * - * Updates properties of Managed CCF. + * 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 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); + void delete(String resourceGroupName, String appName); /** - * Update Managed CCF properties - * - * Updates properties of Managed CCF. + * 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 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); + 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. @@ -264,8 +234,6 @@ SyncPoller, ManagedCcfInner> beginUpdate(String reso 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. @@ -281,8 +249,6 @@ SyncPoller, ManagedCcfInner> beginUpdate(String reso 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. @@ -294,8 +260,6 @@ SyncPoller, ManagedCcfInner> beginUpdate(String reso 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'. @@ -310,140 +274,124 @@ SyncPoller, ManagedCcfInner> beginUpdate(String reso 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. + * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ManagedCcfBackupResponseInner> - beginBackup(String resourceGroupName, String appName, ManagedCcfBackup managedCcf); + 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 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ManagedCcfBackupResponseInner> - beginBackup(String resourceGroupName, String appName, ManagedCcfBackup managedCcf, Context context); + 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. + * @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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedCcfBackupResponseInner backup(String resourceGroupName, String appName, ManagedCcfBackup managedCcf); + 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 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedCcfBackupResponseInner backup(String resourceGroupName, String appName, ManagedCcfBackup managedCcf, + 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. + * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ManagedCcfRestoreResponseInner> - beginRestore(String resourceGroupName, String appName, ManagedCcfRestore managedCcf); + 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 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ManagedCcfRestoreResponseInner> - beginRestore(String resourceGroupName, String appName, ManagedCcfRestore managedCcf, Context context); + 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. + * @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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedCcfRestoreResponseInner restore(String resourceGroupName, String appName, ManagedCcfRestore managedCcf); + 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 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedCcfRestoreResponseInner restore(String resourceGroupName, String appName, ManagedCcfRestore managedCcf, + 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/OperationsClient.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/OperationsClient.java index 535ff9a2ca5c..75d1b1323dd7 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/OperationsClient.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/OperationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.fluent; @@ -15,9 +15,7 @@ */ public interface OperationsClient { /** - * Retrieves a list of available API operations under this Resource Provider. - * - * Retrieves a list of available API operations. + * List the operations for the provider. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -28,9 +26,7 @@ public interface OperationsClient { PagedIterable list(); /** - * Retrieves a list of available API operations under this Resource Provider. - * - * Retrieves a list of available API operations. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/ResourceProvidersClient.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/ResourceProvidersClient.java index b0146514b10d..b1ae788e2fc1 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/ResourceProvidersClient.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/ResourceProvidersClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.fluent; @@ -18,7 +18,7 @@ public interface ResourceProvidersClient { /** * To check whether a resource name is available. * - * @param nameAvailabilityRequest Name availability request payload. + * @param nameAvailabilityRequest The 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. @@ -32,7 +32,7 @@ public interface ResourceProvidersClient { /** * To check whether a resource name is available. * - * @param nameAvailabilityRequest Name availability request payload. + * @param nameAvailabilityRequest The 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. diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/CheckNameAvailabilityResponseInner.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/CheckNameAvailabilityResponseInner.java index 0ecada728141..75524d62a8d5 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/CheckNameAvailabilityResponseInner.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/CheckNameAvailabilityResponseInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * The check availability result. */ -@Fluent +@Immutable public final class CheckNameAvailabilityResponseInner implements JsonSerializable { /* * Indicates if the resource name is available. @@ -28,14 +28,14 @@ public final class CheckNameAvailabilityResponseInner implements JsonSerializabl private CheckNameAvailabilityReason reason; /* - * Detailed reason why the given name is available. + * Detailed reason why the given name is not available. */ private String message; /** * Creates an instance of CheckNameAvailabilityResponseInner class. */ - public CheckNameAvailabilityResponseInner() { + private CheckNameAvailabilityResponseInner() { } /** @@ -47,17 +47,6 @@ public Boolean nameAvailable() { return this.nameAvailable; } - /** - * Set the nameAvailable property: Indicates if the resource name is available. - * - * @param nameAvailable the nameAvailable value to set. - * @return the CheckNameAvailabilityResponseInner object itself. - */ - public CheckNameAvailabilityResponseInner withNameAvailable(Boolean nameAvailable) { - this.nameAvailable = nameAvailable; - return this; - } - /** * Get the reason property: The reason why the given name is not available. * @@ -68,18 +57,7 @@ public CheckNameAvailabilityReason reason() { } /** - * Set the reason property: The reason why the given name is not available. - * - * @param reason the reason value to set. - * @return the CheckNameAvailabilityResponseInner object itself. - */ - public CheckNameAvailabilityResponseInner withReason(CheckNameAvailabilityReason reason) { - this.reason = reason; - return this; - } - - /** - * Get the message property: Detailed reason why the given name is available. + * Get the message property: Detailed reason why the given name is not available. * * @return the message value. */ @@ -87,25 +65,6 @@ public String message() { return this.message; } - /** - * Set the message property: Detailed reason why the given name is available. - * - * @param message the message value to set. - * @return the CheckNameAvailabilityResponseInner object itself. - */ - public CheckNameAvailabilityResponseInner withMessage(String message) { - this.message = message; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 index 6f19139e33aa..d9550e3f23b8 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.fluent.models; @@ -25,7 +25,7 @@ public final class ConfidentialLedgerBackupResponseInner /** * Creates an instance of ConfidentialLedgerBackupResponseInner class. */ - public ConfidentialLedgerBackupResponseInner() { + private ConfidentialLedgerBackupResponseInner() { } /** @@ -37,14 +37,6 @@ public String message() { return this.message; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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..288b5fa3ce17 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.fluent.models; @@ -127,17 +127,6 @@ public ConfidentialLedgerInner withTags(Map tags) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - /** * {@inheritDoc} */ 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 index 7b5e99637d5e..f12ecce1a264 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.fluent.models; @@ -25,7 +25,7 @@ public final class ConfidentialLedgerRestoreResponseInner /** * Creates an instance of ConfidentialLedgerRestoreResponseInner class. */ - public ConfidentialLedgerRestoreResponseInner() { + private ConfidentialLedgerRestoreResponseInner() { } /** @@ -37,14 +37,6 @@ public String message() { return this.message; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 index 319840d92641..cf9769cf6cc5 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.fluent.models; @@ -24,7 +24,7 @@ public final class ManagedCcfBackupResponseInner implements JsonSerializable tags) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - /** * {@inheritDoc} */ 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 index c7fb5b5ba588..7f44061c4027 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.fluent.models; @@ -24,7 +24,7 @@ public final class ManagedCcfRestoreResponseInner implements JsonSerializable { /* @@ -36,7 +36,7 @@ public final class ResourceProviderOperationDefinitionInner /** * Creates an instance of ResourceProviderOperationDefinitionInner class. */ - public ResourceProviderOperationDefinitionInner() { + private ResourceProviderOperationDefinitionInner() { } /** @@ -48,17 +48,6 @@ public String name() { return this.name; } - /** - * Set the name property: Resource provider operation name. - * - * @param name the name value to set. - * @return the ResourceProviderOperationDefinitionInner object itself. - */ - public ResourceProviderOperationDefinitionInner withName(String name) { - this.name = name; - return this; - } - /** * Get the isDataAction property: Indicates whether the operation is data action or not. * @@ -68,17 +57,6 @@ public Boolean isDataAction() { return this.isDataAction; } - /** - * Set the isDataAction property: Indicates whether the operation is data action or not. - * - * @param isDataAction the isDataAction value to set. - * @return the ResourceProviderOperationDefinitionInner object itself. - */ - public ResourceProviderOperationDefinitionInner withIsDataAction(Boolean isDataAction) { - this.isDataAction = isDataAction; - return this; - } - /** * Get the display property: Details about the operations. * @@ -88,28 +66,6 @@ public ResourceProviderOperationDisplay display() { return this.display; } - /** - * Set the display property: Details about the operations. - * - * @param display the display value to set. - * @return the ResourceProviderOperationDefinitionInner object itself. - */ - public ResourceProviderOperationDefinitionInner withDisplay(ResourceProviderOperationDisplay display) { - this.display = display; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (display() != null) { - display().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/package-info.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/package-info.java index 96883961c342..faa3bb8dd9ae 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/package-info.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** * Package containing the inner data models for ConfidentialLedgerManagementClient. - * Microsoft Azure Confidential Compute Ledger Control Plane REST API version 2020-12-01-preview. + * Microsoft Azure Confidential Compute Ledger Managed CCF Control Plane REST API version 2025-06-10-preview. */ package com.azure.resourcemanager.confidentialledger.fluent.models; diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/package-info.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/package-info.java index 190001716db3..cda6e6203ed3 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/package-info.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** * Package containing the service clients for ConfidentialLedgerManagementClient. - * Microsoft Azure Confidential Compute Ledger Control Plane REST API version 2020-12-01-preview. + * Microsoft Azure Confidential Compute Ledger Managed CCF Control Plane REST API version 2025-06-10-preview. */ package com.azure.resourcemanager.confidentialledger.fluent; diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/CheckNameAvailabilityResponseImpl.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/CheckNameAvailabilityResponseImpl.java index 664c459cf239..32b74fa5abb6 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/CheckNameAvailabilityResponseImpl.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/CheckNameAvailabilityResponseImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.implementation; 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 index 747cced4c87b..3be624ca66fe 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.implementation; 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..4c84a7d4d6d7 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.implementation; 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..4593b9fe046c 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.implementation; @@ -20,34 +20,34 @@ @ServiceClientBuilder(serviceClients = { ConfidentialLedgerManagementClientImpl.class }) public final class ConfidentialLedgerManagementClientBuilder { /* - * The ID of the target subscription. + * Service host */ - private String subscriptionId; + private String endpoint; /** - * Sets The ID of the target subscription. + * Sets Service host. * - * @param subscriptionId the subscriptionId value. + * @param endpoint the endpoint value. * @return the ConfidentialLedgerManagementClientBuilder. */ - public ConfidentialLedgerManagementClientBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; + public ConfidentialLedgerManagementClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; return this; } /* - * server parameter + * The ID of the target subscription. The value must be an UUID. */ - private String endpoint; + private String subscriptionId; /** - * Sets server parameter. + * Sets The ID of the target subscription. The value must be an UUID. * - * @param endpoint the endpoint value. + * @param subscriptionId the subscriptionId value. * @return the ConfidentialLedgerManagementClientBuilder. */ - public ConfidentialLedgerManagementClientBuilder endpoint(String endpoint) { - this.endpoint = endpoint; + public ConfidentialLedgerManagementClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; return this; } @@ -132,7 +132,7 @@ public ConfidentialLedgerManagementClientImpl buildClient() { ? serializerAdapter : SerializerFactory.createDefaultManagementSerializerAdapter(); ConfidentialLedgerManagementClientImpl client = new ConfidentialLedgerManagementClientImpl(localPipeline, - localSerializerAdapter, localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); + localSerializerAdapter, localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId); return client; } } 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 84c8b961cda7..6f0208195e5d 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.implementation; @@ -46,26 +46,12 @@ @ServiceClient(builder = ConfidentialLedgerManagementClientBuilder.class) public final class ConfidentialLedgerManagementClientImpl implements ConfidentialLedgerManagementClient { /** - * The ID of the target subscription. - */ - private final String subscriptionId; - - /** - * Gets The ID of the target subscription. - * - * @return the subscriptionId value. - */ - public String getSubscriptionId() { - return this.subscriptionId; - } - - /** - * server parameter. + * Service host. */ private final String endpoint; /** - * Gets server parameter. + * Gets Service host. * * @return the endpoint value. */ @@ -74,12 +60,12 @@ public String getEndpoint() { } /** - * Api Version. + * Version parameter. */ private final String apiVersion; /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ @@ -87,6 +73,20 @@ public String getApiVersion() { return this.apiVersion; } + /** + * The ID of the target subscription. The value must be an UUID. + */ + private final String subscriptionId; + + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + /** * The HTTP pipeline to send requests through. */ @@ -130,31 +130,31 @@ public Duration getDefaultPollInterval() { } /** - * The OperationsClient object to access its operations. + * The ResourceProvidersClient object to access its operations. */ - private final OperationsClient operations; + private final ResourceProvidersClient resourceProviders; /** - * Gets the OperationsClient object to access its operations. + * Gets the ResourceProvidersClient object to access its operations. * - * @return the OperationsClient object. + * @return the ResourceProvidersClient object. */ - public OperationsClient getOperations() { - return this.operations; + public ResourceProvidersClient getResourceProviders() { + return this.resourceProviders; } /** - * The ResourceProvidersClient object to access its operations. + * The OperationsClient object to access its operations. */ - private final ResourceProvidersClient resourceProviders; + private final OperationsClient operations; /** - * Gets the ResourceProvidersClient object to access its operations. + * Gets the OperationsClient object to access its operations. * - * @return the ResourceProvidersClient object. + * @return the OperationsClient object. */ - public ResourceProvidersClient getResourceProviders() { - return this.resourceProviders; + public OperationsClient getOperations() { + return this.operations; } /** @@ -192,19 +192,19 @@ 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 endpoint server parameter. + * @param endpoint Service host. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. */ ConfidentialLedgerManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, - Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { + Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; - this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2024-09-19-preview"; - this.operations = new OperationsClientImpl(this); + this.subscriptionId = subscriptionId; + this.apiVersion = "2025-06-10-preview"; this.resourceProviders = new ResourceProvidersClientImpl(this); + this.operations = new OperationsClientImpl(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 index f6f6989d8f35..0bd05544415a 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.implementation; 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 dad0f11f86ef..b6a777558b14 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.implementation; @@ -32,15 +32,14 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; 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.implementation.models.ConfidentialLedgerList; 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; @@ -74,14 +73,14 @@ public final class LedgersClientImpl implements LedgersClient { * The interface defining all the services for ConfidentialLedgerManagementClientLedgers to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "ConfidentialLedgerMa") + @Host("{endpoint}") + @ServiceInterface(name = "ConfidentialLedgerManagementClientLedgers") public interface LedgersService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/ledgers/{ledgerName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ledgerName") String ledgerName, @HeaderParam("Accept") String accept, Context context); @@ -90,74 +89,70 @@ Mono> getByResourceGroup(@HostParam("$host") S @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/ledgers/{ledgerName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getByResourceGroupSync(@HostParam("$host") String endpoint, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ledgerName") String ledgerName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/ledgers/{ledgerName}") - @ExpectedResponses({ 200, 202, 204 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/ledgers/{ledgerName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> create(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ledgerName") String ledgerName, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ConfidentialLedgerInner confidentialLedger, Context context); - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/ledgers/{ledgerName}") - @ExpectedResponses({ 200, 202, 204 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/ledgers/{ledgerName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, + Response createSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ledgerName") String ledgerName, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ConfidentialLedgerInner confidentialLedger, Context context); - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/ledgers/{ledgerName}") + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/ledgers/{ledgerName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ledgerName") String ledgerName, - @BodyParam("application/json") ConfidentialLedgerInner confidentialLedger, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ConfidentialLedgerInner confidentialLedger, Context context); - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/ledgers/{ledgerName}") + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/ledgers/{ledgerName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createSync(@HostParam("$host") String endpoint, + Response updateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ledgerName") String ledgerName, - @BodyParam("application/json") ConfidentialLedgerInner confidentialLedger, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ConfidentialLedgerInner confidentialLedger, Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/ledgers/{ledgerName}") - @ExpectedResponses({ 200, 201 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/ledgers/{ledgerName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ledgerName") String ledgerName, - @BodyParam("application/json") ConfidentialLedgerInner confidentialLedger, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/ledgers/{ledgerName}") - @ExpectedResponses({ 200, 201 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/ledgers/{ledgerName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ledgerName") String ledgerName, - @BodyParam("application/json") ConfidentialLedgerInner confidentialLedger, - @HeaderParam("Accept") String accept, Context context); + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/ledgers") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, + Mono> listByResourceGroup(@HostParam("endpoint") 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); @@ -166,73 +161,69 @@ Mono> listByResourceGroup(@HostParam("$host") S @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/ledgers") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupSync(@HostParam("$host") String endpoint, + Response listByResourceGroupSync(@HostParam("endpoint") 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/ledgers/") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ConfidentialLedger/ledgers") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") 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" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ConfidentialLedger/ledgers/") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ConfidentialLedger/ledgers") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, + Response listSync(@HostParam("endpoint") 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, + Mono>> backup(@HostParam("endpoint") 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); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ConfidentialLedgerBackup confidentialLedger, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/ledgers/{ledgerName}/backup") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response backupSync(@HostParam("$host") String endpoint, + Response backupSync(@HostParam("endpoint") 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); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ConfidentialLedgerBackup confidentialLedger, 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, + Mono>> restore(@HostParam("endpoint") 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); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ConfidentialLedgerRestore confidentialLedger, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/ledgers/{ledgerName}/restore") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response restoreSync(@HostParam("$host") String endpoint, + Response restoreSync(@HostParam("endpoint") 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); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ConfidentialLedgerRestore confidentialLedger, 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, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -240,7 +231,7 @@ Mono> listByResourceGroupNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByResourceGroupNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -248,7 +239,7 @@ Response listByResourceGroupNextSync( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -256,13 +247,11 @@ Mono> listBySubscriptionNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listBySubscriptionNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Retrieves information about a Confidential Ledger resource. - * * Retrieves the properties of a Confidential Ledger. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -275,21 +264,6 @@ Response listBySubscriptionNextSync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String ledgerName) { - 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.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), @@ -298,8 +272,6 @@ private Mono> getByResourceGroupWithResponseAs } /** - * Retrieves information about a Confidential Ledger resource. - * * Retrieves the properties of a Confidential Ledger. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -316,8 +288,6 @@ private Mono getByResourceGroupAsync(String resourceGro } /** - * Retrieves information about a Confidential Ledger resource. - * * Retrieves the properties of a Confidential Ledger. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -331,32 +301,12 @@ private Mono getByResourceGroupAsync(String resourceGro @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse(String resourceGroupName, String ledgerName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (ledgerName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter ledgerName is required and cannot be null.")); - } final String accept = "application/json"; return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, ledgerName, accept, context); } /** - * Retrieves information about a Confidential Ledger resource. - * * Retrieves the properties of a Confidential Ledger. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -372,320 +322,234 @@ public ConfidentialLedgerInner getByResourceGroup(String resourceGroupName, Stri } /** - * Deletes a Confidential Ledger resource. - * - * Deletes an existing Confidential Ledger. + * Creates a Confidential Ledger with the specified ledger parameters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger. + * @param confidentialLedger Confidential Ledger 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 Response} on successful completion of {@link Mono}. + * @return confidential Ledger along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String ledgerName) { - 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.")); - } + private Mono>> createWithResponseAsync(String resourceGroupName, String ledgerName, + ConfidentialLedgerInner confidentialLedger) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, ledgerName, accept, context)) + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ledgerName, contentType, accept, confidentialLedger, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a Confidential Ledger resource. - * - * Deletes an existing Confidential Ledger. + * Creates a Confidential Ledger with the specified ledger parameters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger. + * @param confidentialLedger Confidential Ledger 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 response body along with {@link Response}. + * @return confidential Ledger along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String ledgerName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (ledgerName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter ledgerName is required and cannot be null.")); - } + private Response createWithResponse(String resourceGroupName, String ledgerName, + ConfidentialLedgerInner confidentialLedger) { + final String contentType = "application/json"; final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, ledgerName, accept, Context.NONE); + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ledgerName, contentType, accept, confidentialLedger, + Context.NONE); } /** - * Deletes a Confidential Ledger resource. - * - * Deletes an existing Confidential Ledger. + * Creates a Confidential Ledger with the specified ledger parameters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger. + * @param confidentialLedger Confidential Ledger 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 response body along with {@link Response}. + * @return confidential Ledger along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String ledgerName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (ledgerName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter ledgerName is required and cannot be null.")); - } + private Response createWithResponse(String resourceGroupName, String ledgerName, + ConfidentialLedgerInner confidentialLedger, Context context) { + final String contentType = "application/json"; final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, ledgerName, accept, context); + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ledgerName, contentType, accept, confidentialLedger, + context); } /** - * Deletes a Confidential Ledger resource. - * - * Deletes an existing Confidential Ledger. + * Creates a Confidential Ledger with the specified ledger parameters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger. + * @param confidentialLedger Confidential Ledger 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 long-running operation. + * @return the {@link PollerFlux} for polling of confidential Ledger. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String ledgerName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, ledgerName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + private PollerFlux, ConfidentialLedgerInner> + beginCreateAsync(String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, ledgerName, confidentialLedger); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ConfidentialLedgerInner.class, ConfidentialLedgerInner.class, this.client.getContext()); } /** - * Deletes a Confidential Ledger resource. - * - * Deletes an existing Confidential Ledger. + * Creates a Confidential Ledger with the specified ledger parameters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger. + * @param confidentialLedger Confidential Ledger 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 long-running operation. + * @return the {@link SyncPoller} for polling of confidential Ledger. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String ledgerName) { - Response response = deleteWithResponse(resourceGroupName, ledgerName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + public SyncPoller, ConfidentialLedgerInner> + beginCreate(String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger) { + Response response = createWithResponse(resourceGroupName, ledgerName, confidentialLedger); + return this.client.getLroResult(response, + ConfidentialLedgerInner.class, ConfidentialLedgerInner.class, Context.NONE); } /** - * Deletes a Confidential Ledger resource. - * - * Deletes an existing Confidential Ledger. + * Creates a Confidential Ledger with the specified ledger parameters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger. + * @param confidentialLedger Confidential Ledger 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 long-running operation. + * @return the {@link SyncPoller} for polling of confidential Ledger. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String ledgerName, - Context context) { - Response response = deleteWithResponse(resourceGroupName, ledgerName, context); - return this.client.getLroResult(response, Void.class, Void.class, context); + public SyncPoller, ConfidentialLedgerInner> beginCreate( + String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger, Context context) { + Response response = createWithResponse(resourceGroupName, ledgerName, confidentialLedger, context); + return this.client.getLroResult(response, + ConfidentialLedgerInner.class, ConfidentialLedgerInner.class, context); } /** - * Deletes a Confidential Ledger resource. - * - * Deletes an existing Confidential Ledger. + * Creates a Confidential Ledger with the specified ledger parameters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger. + * @param confidentialLedger Confidential Ledger 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 A {@link Mono} that completes when a successful response is received. + * @return confidential Ledger on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String ledgerName) { - return beginDeleteAsync(resourceGroupName, ledgerName).last().flatMap(this.client::getLroFinalResultOrError); + private Mono createAsync(String resourceGroupName, String ledgerName, + ConfidentialLedgerInner confidentialLedger) { + return beginCreateAsync(resourceGroupName, ledgerName, confidentialLedger).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Deletes a Confidential Ledger resource. - * - * Deletes an existing Confidential Ledger. + * Creates a Confidential Ledger with the specified ledger parameters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger. + * @param confidentialLedger Confidential Ledger 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 confidential Ledger. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String ledgerName) { - beginDelete(resourceGroupName, ledgerName).getFinalResult(); + public ConfidentialLedgerInner create(String resourceGroupName, String ledgerName, + ConfidentialLedgerInner confidentialLedger) { + return beginCreate(resourceGroupName, ledgerName, confidentialLedger).getFinalResult(); } /** - * Deletes a Confidential Ledger resource. - * - * Deletes an existing Confidential Ledger. + * Creates a Confidential Ledger with the specified ledger parameters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger. + * @param confidentialLedger Confidential Ledger 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 confidential Ledger. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String ledgerName, Context context) { - beginDelete(resourceGroupName, ledgerName, context).getFinalResult(); + public ConfidentialLedgerInner create(String resourceGroupName, String ledgerName, + ConfidentialLedgerInner confidentialLedger, Context context) { + return beginCreate(resourceGroupName, ledgerName, confidentialLedger, context).getFinalResult(); } /** - * Creates a Confidential Ledger. - * - * Creates a Confidential Ledger with the specified ledger parameters. + * Updates properties of Confidential Ledger. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger Create Request Body. + * @param confidentialLedger Confidential Ledger request body for Updating Ledger. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return confidential Ledger along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String ledgerName, + private Mono>> updateWithResponseAsync(String resourceGroupName, String ledgerName, ConfidentialLedgerInner 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, ledgerName, confidentialLedger, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ledgerName, contentType, accept, confidentialLedger, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates a Confidential Ledger. - * - * Creates a Confidential Ledger with the specified ledger parameters. + * Updates properties of Confidential Ledger. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger Create Request Body. + * @param confidentialLedger Confidential Ledger request body for Updating Ledger. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return confidential Ledger along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response createWithResponse(String resourceGroupName, String ledgerName, + private Response updateWithResponse(String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (ledgerName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter ledgerName is required and cannot be null.")); - } - if (confidentialLedger == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter confidentialLedger is required and cannot be null.")); - } else { - confidentialLedger.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, ledgerName, confidentialLedger, accept, Context.NONE); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ledgerName, contentType, accept, confidentialLedger, + Context.NONE); } /** - * Creates a Confidential Ledger. - * - * Creates a Confidential Ledger with the specified ledger parameters. + * Updates properties of Confidential Ledger. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger Create Request Body. + * @param confidentialLedger Confidential Ledger request body for Updating Ledger. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -693,45 +557,21 @@ private Response createWithResponse(String resourceGroupName, String * @return confidential Ledger along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response createWithResponse(String resourceGroupName, String ledgerName, + private Response updateWithResponse(String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (ledgerName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter ledgerName is required and cannot be null.")); - } - if (confidentialLedger == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter confidentialLedger is required and cannot be null.")); - } else { - confidentialLedger.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, ledgerName, confidentialLedger, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ledgerName, contentType, accept, confidentialLedger, + context); } /** - * Creates a Confidential Ledger. - * - * Creates a Confidential Ledger with the specified ledger parameters. + * Updates properties of Confidential Ledger. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger Create Request Body. + * @param confidentialLedger Confidential Ledger request body for Updating Ledger. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -739,22 +579,20 @@ private Response createWithResponse(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ConfidentialLedgerInner> - beginCreateAsync(String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger) { + beginUpdateAsync(String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger) { Mono>> mono - = createWithResponseAsync(resourceGroupName, ledgerName, confidentialLedger); + = updateWithResponseAsync(resourceGroupName, ledgerName, confidentialLedger); return this.client.getLroResult(mono, this.client.getHttpPipeline(), ConfidentialLedgerInner.class, ConfidentialLedgerInner.class, this.client.getContext()); } /** - * Creates a Confidential Ledger. - * - * Creates a Confidential Ledger with the specified ledger parameters. + * Updates properties of Confidential Ledger. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger Create Request Body. + * @param confidentialLedger Confidential Ledger request body for Updating Ledger. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -762,20 +600,18 @@ private Response createWithResponse(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ConfidentialLedgerInner> - beginCreate(String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger) { - Response response = createWithResponse(resourceGroupName, ledgerName, confidentialLedger); + beginUpdate(String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger) { + Response response = updateWithResponse(resourceGroupName, ledgerName, confidentialLedger); return this.client.getLroResult(response, ConfidentialLedgerInner.class, ConfidentialLedgerInner.class, Context.NONE); } /** - * Creates a Confidential Ledger. - * - * Creates a Confidential Ledger with the specified ledger parameters. + * Updates properties of Confidential Ledger. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger Create Request Body. + * @param confidentialLedger Confidential Ledger request body for Updating Ledger. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -783,60 +619,54 @@ private Response createWithResponse(String resourceGroupName, String * @return the {@link SyncPoller} for polling of confidential Ledger. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ConfidentialLedgerInner> beginCreate( + public SyncPoller, ConfidentialLedgerInner> beginUpdate( String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger, Context context) { - Response response = createWithResponse(resourceGroupName, ledgerName, confidentialLedger, context); + Response response = updateWithResponse(resourceGroupName, ledgerName, confidentialLedger, context); return this.client.getLroResult(response, ConfidentialLedgerInner.class, ConfidentialLedgerInner.class, context); } /** - * Creates a Confidential Ledger. - * - * Creates a Confidential Ledger with the specified ledger parameters. + * Updates properties of Confidential Ledger. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger Create Request Body. + * @param confidentialLedger Confidential Ledger request body for Updating Ledger. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return confidential Ledger on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String ledgerName, + private Mono updateAsync(String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger) { - return beginCreateAsync(resourceGroupName, ledgerName, confidentialLedger).last() + return beginUpdateAsync(resourceGroupName, ledgerName, confidentialLedger).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Creates a Confidential Ledger. - * - * Creates a Confidential Ledger with the specified ledger parameters. + * Updates properties of Confidential Ledger. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger Create Request Body. + * @param confidentialLedger Confidential Ledger request body for Updating Ledger. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return confidential Ledger. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ConfidentialLedgerInner create(String resourceGroupName, String ledgerName, + public ConfidentialLedgerInner update(String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger) { - return beginCreate(resourceGroupName, ledgerName, confidentialLedger).getFinalResult(); + return beginUpdate(resourceGroupName, ledgerName, confidentialLedger).getFinalResult(); } /** - * Creates a Confidential Ledger. - * - * Creates a Confidential Ledger with the specified ledger parameters. + * Updates properties of Confidential Ledger. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger Create Request Body. + * @param confidentialLedger Confidential Ledger request body for Updating Ledger. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -844,274 +674,158 @@ public ConfidentialLedgerInner create(String resourceGroupName, String ledgerNam * @return confidential Ledger. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ConfidentialLedgerInner create(String resourceGroupName, String ledgerName, + public ConfidentialLedgerInner update(String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger, Context context) { - return beginCreate(resourceGroupName, ledgerName, confidentialLedger, context).getFinalResult(); + return beginUpdate(resourceGroupName, ledgerName, confidentialLedger, context).getFinalResult(); } /** - * Update Confidential Ledger properties - * - * Updates properties of Confidential Ledger. + * Deletes an existing Confidential Ledger. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger request body for Updating Ledger. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return confidential Ledger along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String ledgerName, - ConfidentialLedgerInner 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"; + private Mono>> deleteWithResponseAsync(String resourceGroupName, String ledgerName) { return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, ledgerName, confidentialLedger, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ledgerName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Update Confidential Ledger properties - * - * Updates properties of Confidential Ledger. + * Deletes an existing Confidential Ledger. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger request body for Updating Ledger. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return confidential Ledger along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String ledgerName, - ConfidentialLedgerInner confidentialLedger) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (ledgerName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter ledgerName is required and cannot be null.")); - } - if (confidentialLedger == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter confidentialLedger is required and cannot be null.")); - } else { - confidentialLedger.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, ledgerName, confidentialLedger, accept, Context.NONE); + private Response deleteWithResponse(String resourceGroupName, String ledgerName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ledgerName, Context.NONE); } /** - * Update Confidential Ledger properties - * - * Updates properties of Confidential Ledger. + * Deletes an existing Confidential Ledger. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return confidential Ledger along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String ledgerName, - ConfidentialLedgerInner confidentialLedger, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (ledgerName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter ledgerName is required and cannot be null.")); - } - if (confidentialLedger == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter confidentialLedger is required and cannot be null.")); - } else { - confidentialLedger.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, ledgerName, confidentialLedger, accept, context); + private Response deleteWithResponse(String resourceGroupName, String ledgerName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ledgerName, context); } /** - * Update Confidential Ledger properties - * - * Updates properties of Confidential Ledger. + * Deletes an existing Confidential Ledger. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger request body for Updating Ledger. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 confidential Ledger. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ConfidentialLedgerInner> - beginUpdateAsync(String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, ledgerName, confidentialLedger); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ConfidentialLedgerInner.class, ConfidentialLedgerInner.class, + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String ledgerName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, ledgerName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Update Confidential Ledger properties - * - * Updates properties of Confidential Ledger. + * Deletes an existing Confidential Ledger. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger request body for Updating Ledger. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 confidential Ledger. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ConfidentialLedgerInner> - beginUpdate(String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger) { - Response response = updateWithResponse(resourceGroupName, ledgerName, confidentialLedger); - return this.client.getLroResult(response, - ConfidentialLedgerInner.class, ConfidentialLedgerInner.class, Context.NONE); + public SyncPoller, Void> beginDelete(String resourceGroupName, String ledgerName) { + Response response = deleteWithResponse(resourceGroupName, ledgerName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Update Confidential Ledger properties - * - * Updates properties of Confidential Ledger. + * Deletes an existing Confidential Ledger. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 confidential Ledger. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ConfidentialLedgerInner> beginUpdate( - String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger, Context context) { - Response response = updateWithResponse(resourceGroupName, ledgerName, confidentialLedger, context); - return this.client.getLroResult(response, - ConfidentialLedgerInner.class, ConfidentialLedgerInner.class, context); + public SyncPoller, Void> beginDelete(String resourceGroupName, String ledgerName, + Context context) { + Response response = deleteWithResponse(resourceGroupName, ledgerName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Update Confidential Ledger properties - * - * Updates properties of Confidential Ledger. + * Deletes an existing Confidential Ledger. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger request body for Updating Ledger. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return confidential Ledger on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String ledgerName, - ConfidentialLedgerInner confidentialLedger) { - return beginUpdateAsync(resourceGroupName, ledgerName, confidentialLedger).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono deleteAsync(String resourceGroupName, String ledgerName) { + return beginDeleteAsync(resourceGroupName, ledgerName).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Update Confidential Ledger properties - * - * Updates properties of Confidential Ledger. + * Deletes an existing Confidential Ledger. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger. - * @param confidentialLedger Confidential Ledger request body for Updating Ledger. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return confidential Ledger. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ConfidentialLedgerInner update(String resourceGroupName, String ledgerName, - ConfidentialLedgerInner confidentialLedger) { - return beginUpdate(resourceGroupName, ledgerName, confidentialLedger).getFinalResult(); + public void delete(String resourceGroupName, String ledgerName) { + beginDelete(resourceGroupName, ledgerName).getFinalResult(); } /** - * Update Confidential Ledger properties - * - * Updates properties of Confidential Ledger. + * Deletes an existing Confidential Ledger. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return confidential Ledger. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ConfidentialLedgerInner update(String resourceGroupName, String ledgerName, - ConfidentialLedgerInner confidentialLedger, Context context) { - return beginUpdate(resourceGroupName, ledgerName, confidentialLedger, context).getFinalResult(); + public void delete(String resourceGroupName, String ledgerName, Context context) { + beginDelete(resourceGroupName, ledgerName, context).getFinalResult(); } /** - * Retrieves information about all Confidential Ledger resources under the given subscription and resource group - * * Retrieves the properties of all Confidential Ledgers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1125,18 +839,6 @@ public ConfidentialLedgerInner update(String resourceGroupName, String ledgerNam @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(), @@ -1147,8 +849,6 @@ private Mono> listByResourceGroupSinglePa } /** - * Retrieves information about all Confidential Ledger resources under the given subscription and resource group - * * Retrieves the properties of all Confidential Ledgers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1166,8 +866,6 @@ private PagedFlux listByResourceGroupAsync(String resou } /** - * Retrieves information about all Confidential Ledger resources under the given subscription and resource group - * * Retrieves the properties of all Confidential Ledgers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1185,8 +883,6 @@ private PagedFlux listByResourceGroupAsync(String resou } /** - * Retrieves information about all Confidential Ledger resources under the given subscription and resource group - * * Retrieves the properties of all Confidential Ledgers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1200,20 +896,6 @@ private PagedFlux listByResourceGroupAsync(String resou @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String filter) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -1223,8 +905,6 @@ private PagedResponse listByResourceGroupSinglePage(Str } /** - * Retrieves information about all Confidential Ledger resources under the given subscription and resource group - * * Retrieves the properties of all Confidential Ledgers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1239,20 +919,6 @@ private PagedResponse listByResourceGroupSinglePage(Str @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String filter, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, filter, accept, context); @@ -1261,8 +927,6 @@ private PagedResponse listByResourceGroupSinglePage(Str } /** - * Retrieves information about all Confidential Ledger resources under the given subscription and resource group - * * Retrieves the properties of all Confidential Ledgers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1280,8 +944,6 @@ public PagedIterable listByResourceGroup(String resourc } /** - * Retrieves information about all Confidential Ledger resources under the given subscription and resource group - * * Retrieves the properties of all Confidential Ledgers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1301,8 +963,6 @@ public PagedIterable listByResourceGroup(String resourc } /** - * Retrieves information about all Confidential Ledger resources under the given subscription - * * Retrieves the properties of all Confidential Ledgers. * * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. @@ -1314,14 +974,6 @@ public PagedIterable listByResourceGroup(String resourc */ @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(), @@ -1332,8 +984,6 @@ private Mono> listSinglePageAsync(String } /** - * Retrieves information about all Confidential Ledger resources under the given subscription - * * Retrieves the properties of all Confidential Ledgers. * * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. @@ -1350,8 +1000,6 @@ private PagedFlux listAsync(String filter) { } /** - * Retrieves information about all Confidential Ledger resources under the given subscription - * * Retrieves the properties of all Confidential Ledgers. * * @throws ManagementException thrown if the request is rejected by server. @@ -1367,8 +1015,6 @@ private PagedFlux listAsync() { } /** - * Retrieves information about all Confidential Ledger resources under the given subscription - * * Retrieves the properties of all Confidential Ledgers. * * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. @@ -1380,16 +1026,6 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String filter) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), filter, accept, Context.NONE); @@ -1398,8 +1034,6 @@ private PagedResponse listSinglePage(String filter) { } /** - * Retrieves information about all Confidential Ledger resources under the given subscription - * * Retrieves the properties of all Confidential Ledgers. * * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. @@ -1412,16 +1046,6 @@ private PagedResponse listSinglePage(String filter) { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String filter, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), filter, accept, context); @@ -1430,8 +1054,6 @@ private PagedResponse listSinglePage(String filter, Con } /** - * Retrieves information about all Confidential Ledger resources under the given subscription - * * Retrieves the properties of all Confidential Ledgers. * * @throws ManagementException thrown if the request is rejected by server. @@ -1447,8 +1069,6 @@ public PagedIterable list() { } /** - * Retrieves information about all Confidential Ledger resources under the given subscription - * * Retrieves the properties of all Confidential Ledgers. * * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. @@ -1466,8 +1086,6 @@ public PagedIterable list(String filter, Context contex } /** - * 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. @@ -1476,43 +1094,21 @@ public PagedIterable list(String filter, Context contex * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @return the response body 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 contentType = "application/json"; 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)) + this.client.getSubscriptionId(), resourceGroupName, ledgerName, contentType, accept, confidentialLedger, + 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. @@ -1521,43 +1117,19 @@ private Mono>> backupWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object representing the backup response of a Confidential Ledger Resource along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response backupWithResponse(String resourceGroupName, String ledgerName, ConfidentialLedgerBackup confidentialLedger) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (ledgerName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter ledgerName is required and cannot be null.")); - } - if (confidentialLedger == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter confidentialLedger is required and cannot be null.")); - } else { - confidentialLedger.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return service.backupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, ledgerName, confidentialLedger, accept, Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, ledgerName, contentType, accept, confidentialLedger, + Context.NONE); } /** - * 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. @@ -1567,43 +1139,19 @@ private Response backupWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response backupWithResponse(String resourceGroupName, String ledgerName, ConfidentialLedgerBackup confidentialLedger, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (ledgerName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter ledgerName is required and cannot be null.")); - } - if (confidentialLedger == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter confidentialLedger is required and cannot be null.")); - } else { - confidentialLedger.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return service.backupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, ledgerName, confidentialLedger, accept, context); + this.client.getSubscriptionId(), resourceGroupName, ledgerName, contentType, accept, confidentialLedger, + 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. @@ -1612,8 +1160,7 @@ private Response backupWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ConfidentialLedgerBackupResponseInner> @@ -1626,8 +1173,6 @@ private Response backupWithResponse(String resourceGroupName, String } /** - * 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. @@ -1636,8 +1181,7 @@ private Response backupWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ConfidentialLedgerBackupResponseInner> @@ -1649,8 +1193,6 @@ private Response backupWithResponse(String resourceGroupName, String } /** - * 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. @@ -1660,8 +1202,7 @@ private Response backupWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ConfidentialLedgerBackupResponseInner> @@ -1674,8 +1215,6 @@ private Response backupWithResponse(String resourceGroupName, String } /** - * 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. @@ -1684,8 +1223,7 @@ private Response backupWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono backupAsync(String resourceGroupName, String ledgerName, @@ -1695,8 +1233,6 @@ private Mono backupAsync(String resourceG } /** - * 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. @@ -1705,7 +1241,7 @@ private Mono backupAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public ConfidentialLedgerBackupResponseInner backup(String resourceGroupName, String ledgerName, @@ -1714,8 +1250,6 @@ public ConfidentialLedgerBackupResponseInner backup(String resourceGroupName, St } /** - * 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. @@ -1725,7 +1259,7 @@ public ConfidentialLedgerBackupResponseInner backup(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public ConfidentialLedgerBackupResponseInner backup(String resourceGroupName, String ledgerName, @@ -1734,8 +1268,6 @@ public ConfidentialLedgerBackupResponseInner backup(String resourceGroupName, St } /** - * 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. @@ -1744,43 +1276,21 @@ public ConfidentialLedgerBackupResponseInner backup(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @return the response body 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 contentType = "application/json"; 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)) + this.client.getSubscriptionId(), resourceGroupName, ledgerName, contentType, accept, confidentialLedger, + 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. @@ -1789,43 +1299,19 @@ private Mono>> restoreWithResponseAsync(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response restoreWithResponse(String resourceGroupName, String ledgerName, ConfidentialLedgerRestore confidentialLedger) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (ledgerName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter ledgerName is required and cannot be null.")); - } - if (confidentialLedger == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter confidentialLedger is required and cannot be null.")); - } else { - confidentialLedger.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return service.restoreSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, ledgerName, confidentialLedger, accept, Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, ledgerName, contentType, accept, confidentialLedger, + Context.NONE); } /** - * 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. @@ -1835,43 +1321,19 @@ private Response restoreWithResponse(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response restoreWithResponse(String resourceGroupName, String ledgerName, ConfidentialLedgerRestore confidentialLedger, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (ledgerName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter ledgerName is required and cannot be null.")); - } - if (confidentialLedger == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter confidentialLedger is required and cannot be null.")); - } else { - confidentialLedger.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return service.restoreSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, ledgerName, confidentialLedger, accept, context); + this.client.getSubscriptionId(), resourceGroupName, ledgerName, contentType, accept, confidentialLedger, + 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. @@ -1880,8 +1342,7 @@ private Response restoreWithResponse(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ConfidentialLedgerRestoreResponseInner> @@ -1894,8 +1355,6 @@ private Response restoreWithResponse(String resourceGroupName, Strin } /** - * 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. @@ -1904,8 +1363,7 @@ private Response restoreWithResponse(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ConfidentialLedgerRestoreResponseInner> @@ -1917,8 +1375,6 @@ private Response restoreWithResponse(String resourceGroupName, Strin } /** - * 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. @@ -1928,8 +1384,7 @@ private Response restoreWithResponse(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ConfidentialLedgerRestoreResponseInner> @@ -1942,8 +1397,6 @@ private Response restoreWithResponse(String resourceGroupName, Strin } /** - * 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. @@ -1952,8 +1405,7 @@ private Response restoreWithResponse(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono restoreAsync(String resourceGroupName, String ledgerName, @@ -1963,8 +1415,6 @@ private Mono restoreAsync(String resourc } /** - * 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. @@ -1973,7 +1423,7 @@ private Mono restoreAsync(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public ConfidentialLedgerRestoreResponseInner restore(String resourceGroupName, String ledgerName, @@ -1982,8 +1432,6 @@ public ConfidentialLedgerRestoreResponseInner restore(String resourceGroupName, } /** - * 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. @@ -1993,7 +1441,7 @@ public ConfidentialLedgerRestoreResponseInner restore(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public ConfidentialLedgerRestoreResponseInner restore(String resourceGroupName, String ledgerName, @@ -2013,13 +1461,6 @@ public ConfidentialLedgerRestoreResponseInner restore(String resourceGroupName, */ @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( @@ -2041,15 +1482,6 @@ private Mono> listByResourceGroupNextSing */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -2070,15 +1502,6 @@ private PagedResponse listByResourceGroupNextSinglePage */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); @@ -2098,13 +1521,6 @@ private PagedResponse listByResourceGroupNextSinglePage */ @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( @@ -2126,15 +1542,6 @@ private Mono> listBySubscriptionNextSingl */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -2155,21 +1562,10 @@ private PagedResponse listBySubscriptionNextSinglePage( */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(LedgersClientImpl.class); } 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..2d7fd0557fba 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.implementation; 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 index 813496a8e0a3..7de7f349a239 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.implementation; 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 index 59312c523ab6..55daa7c224c3 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.implementation; @@ -146,20 +146,20 @@ public ManagedCcf refresh(Context context) { return this; } - public ManagedCcfBackupResponse backup(ManagedCcfBackup managedCcf) { - return serviceManager.managedCcfs().backup(resourceGroupName, appName, managedCcf); + 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 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) { + return serviceManager.managedCcfs().restore(resourceGroupName, appName, managedCCF); } - public ManagedCcfRestoreResponse restore(ManagedCcfRestore managedCcf, Context context) { - return serviceManager.managedCcfs().restore(resourceGroupName, appName, managedCcf, context); + public ManagedCcfRestoreResponse restore(ManagedCcfRestore managedCCF, Context context) { + return serviceManager.managedCcfs().restore(resourceGroupName, appName, managedCCF, context); } public ManagedCcfImpl withRegion(Region location) { 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 index 8414175f7591..dda75fa57c90 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.implementation; 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 index e53d1c6ef45c..50f3b9d1871e 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.implementation; @@ -32,15 +32,14 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; 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.implementation.models.ManagedCCFList; 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; @@ -75,14 +74,14 @@ public final class ManagedCcfsClientImpl implements ManagedCcfsClient { * The interface defining all the services for ConfidentialLedgerManagementClientManagedCcfs to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "ConfidentialLedgerMa") + @Host("{endpoint}") + @ServiceInterface(name = "ConfidentialLedgerManagementClientManagedCcfs") 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, + Mono> getByResourceGroup(@HostParam("endpoint") 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); @@ -91,74 +90,70 @@ Mono> getByResourceGroup(@HostParam("$host") String en @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/managedCCFs/{appName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getByResourceGroupSync(@HostParam("$host") String endpoint, + Response getByResourceGroupSync(@HostParam("endpoint") 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" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/managedCCFs/{appName}") - @ExpectedResponses({ 200, 202, 204 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/managedCCFs/{appName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, + Mono>> create(@HostParam("endpoint") 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); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ManagedCcfInner managedCCF, 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, + Response createSync(@HostParam("endpoint") 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); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ManagedCcfInner managedCCF, Context context); - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/managedCCFs/{appName}") - @ExpectedResponses({ 200, 201 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/managedCCFs/{appName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createSync(@HostParam("$host") String endpoint, + Mono>> update(@HostParam("endpoint") 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); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ManagedCcfInner managedCCF, 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, + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("appName") String appName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ManagedCcfInner managedCCF, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/managedCCFs/{appName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") 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 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/managedCCFs/{appName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, + Response deleteSync(@HostParam("endpoint") 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, + Mono> listByResourceGroup(@HostParam("endpoint") 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); @@ -167,103 +162,97 @@ Mono> listByResourceGroup(@HostParam("$host") String en @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/managedCCFs") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupSync(@HostParam("$host") String endpoint, + Response listByResourceGroupSync(@HostParam("endpoint") 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/") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ConfidentialLedger/managedCCFs") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") 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" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ConfidentialLedger/managedCCFs/") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ConfidentialLedger/managedCCFs") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, + Response listSync(@HostParam("endpoint") 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, + Mono>> backup(@HostParam("endpoint") 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); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ManagedCcfBackup managedCCF, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/managedCCFs/{appName}/backup") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response backupSync(@HostParam("$host") String endpoint, + Response backupSync(@HostParam("endpoint") 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); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ManagedCcfBackup managedCCF, 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, + Mono>> restore(@HostParam("endpoint") 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); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ManagedCcfRestore managedCCF, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/managedCCFs/{appName}/restore") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response restoreSync(@HostParam("$host") String endpoint, + Response restoreSync(@HostParam("endpoint") 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); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ManagedCcfRestore managedCCF, 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, + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") 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, + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listBySubscriptionNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") 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. @@ -276,21 +265,6 @@ Response listBySubscriptionNextSync( @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(), @@ -299,8 +273,6 @@ private Mono> getByResourceGroupWithResponseAsync(Stri } /** - * 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. @@ -317,8 +289,6 @@ private Mono getByResourceGroupAsync(String resourceGroupName, } /** - * 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. @@ -332,32 +302,12 @@ private Mono getByResourceGroupAsync(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse(String resourceGroupName, String appName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (appName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter appName is required and cannot be null.")); - } final String accept = "application/json"; return service.getByResourceGroupSync(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. @@ -373,318 +323,225 @@ public ManagedCcfInner getByResourceGroup(String resourceGroupName, String appNa } /** - * Deletes a Managed CCF resource. - * - * Deletes an existing 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 Response} on successful completion of {@link Mono}. + * @return managed CCF along with {@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.")); - } + private Mono>> createWithResponseAsync(String resourceGroupName, String appName, + ManagedCcfInner managedCCF) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, appName, accept, context)) + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, appName, contentType, accept, managedCCF, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a Managed CCF resource. - * - * Deletes an existing 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 response body along with {@link Response}. + * @return managed CCF along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String appName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (appName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter appName is required and cannot be null.")); - } + private Response createWithResponse(String resourceGroupName, String appName, + ManagedCcfInner managedCCF) { + final String contentType = "application/json"; final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, appName, accept, Context.NONE); + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, appName, contentType, accept, managedCCF, Context.NONE); } /** - * Deletes a Managed CCF resource. - * - * Deletes an existing 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 response body along with {@link Response}. + * @return managed CCF along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String appName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (appName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter appName is required and cannot be null.")); - } + private Response createWithResponse(String resourceGroupName, String appName, + ManagedCcfInner managedCCF, Context context) { + final String contentType = "application/json"; final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, appName, accept, context); + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, appName, contentType, accept, managedCCF, context); } /** - * Deletes a Managed CCF resource. - * - * Deletes an existing 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 long-running operation. + * @return the {@link PollerFlux} for polling of managed CCF. */ @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()); + 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()); } /** - * Deletes a Managed CCF resource. - * - * Deletes an existing 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 long-running operation. + * @return the {@link SyncPoller} for polling of managed CCF. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String appName) { - Response response = deleteWithResponse(resourceGroupName, appName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + public SyncPoller, ManagedCcfInner> beginCreate(String resourceGroupName, + String appName, ManagedCcfInner managedCCF) { + Response response = createWithResponse(resourceGroupName, appName, managedCCF); + return this.client.getLroResult(response, ManagedCcfInner.class, + ManagedCcfInner.class, Context.NONE); } /** - * Deletes a Managed CCF resource. - * - * Deletes an existing 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 long-running operation. + * @return the {@link SyncPoller} for polling of managed CCF. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String appName, Context context) { - Response response = deleteWithResponse(resourceGroupName, appName, context); - return this.client.getLroResult(response, Void.class, Void.class, context); + public SyncPoller, ManagedCcfInner> beginCreate(String resourceGroupName, + String appName, ManagedCcfInner managedCCF, Context context) { + Response response = createWithResponse(resourceGroupName, appName, managedCCF, context); + return this.client.getLroResult(response, ManagedCcfInner.class, + ManagedCcfInner.class, context); } /** - * Deletes a Managed CCF resource. - * - * Deletes an existing 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 A {@link Mono} that completes when a successful response is received. + * @return managed CCF on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String appName) { - return beginDeleteAsync(resourceGroupName, appName).last().flatMap(this.client::getLroFinalResultOrError); + private Mono createAsync(String resourceGroupName, String appName, ManagedCcfInner managedCCF) { + return beginCreateAsync(resourceGroupName, appName, managedCCF).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Deletes a Managed CCF resource. - * - * Deletes an existing 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 void delete(String resourceGroupName, String appName) { - beginDelete(resourceGroupName, appName).getFinalResult(); + public ManagedCcfInner create(String resourceGroupName, String appName, ManagedCcfInner managedCCF) { + return beginCreate(resourceGroupName, appName, managedCCF).getFinalResult(); } /** - * Deletes a Managed CCF resource. - * - * Deletes an existing 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 void delete(String resourceGroupName, String appName, Context context) { - beginDelete(resourceGroupName, appName, context).getFinalResult(); + public ManagedCcfInner create(String resourceGroupName, String appName, ManagedCcfInner managedCCF, + Context context) { + return beginCreate(resourceGroupName, appName, managedCCF, context).getFinalResult(); } /** - * Creates a Managed CCF. - * - * Creates a Managed CCF with the specified Managed CCF parameters. + * 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 Managed CCF Create Request Body. + * @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>> 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(); - } + private Mono>> updateWithResponseAsync(String resourceGroupName, String appName, + ManagedCcfInner managedCCF) { + final String contentType = "application/json"; 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)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, appName, contentType, accept, managedCCF, 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. + * 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 Managed CCF Create Request Body. + * @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}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response createWithResponse(String resourceGroupName, String appName, - ManagedCcfInner managedCcf) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (appName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter appName is required and cannot be null.")); - } - if (managedCcf == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter managedCcf is required and cannot be null.")); - } else { - managedCcf.validate(); - } + private Response updateWithResponse(String resourceGroupName, String appName, + ManagedCcfInner managedCCF) { + final String contentType = "application/json"; final String accept = "application/json"; - return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, appName, managedCcf, accept, Context.NONE); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, appName, contentType, accept, managedCCF, Context.NONE); } /** - * Creates a Managed CCF. - * - * Creates a Managed CCF with the specified Managed CCF parameters. + * 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 Managed CCF Create Request Body. + * @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. @@ -692,87 +549,58 @@ private Response createWithResponse(String resourceGroupName, String * @return managed CCF along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response createWithResponse(String resourceGroupName, String appName, - ManagedCcfInner managedCcf, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (appName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter appName is required and cannot be null.")); - } - if (managedCcf == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter managedCcf is required and cannot be null.")); - } else { - managedCcf.validate(); - } + private Response updateWithResponse(String resourceGroupName, String appName, + ManagedCcfInner managedCCF, Context context) { + final String contentType = "application/json"; final String accept = "application/json"; - return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, appName, managedCcf, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, appName, contentType, accept, managedCCF, context); } /** - * Creates a Managed CCF. - * - * Creates a Managed CCF with the specified Managed CCF parameters. + * 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 Managed CCF Create Request Body. + * @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> beginCreateAsync(String resourceGroupName, - String appName, ManagedCcfInner managedCcf) { - Mono>> mono = createWithResponseAsync(resourceGroupName, appName, managedCcf); + 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()); } /** - * Creates a Managed CCF. - * - * Creates a Managed CCF with the specified Managed CCF parameters. + * 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 Managed CCF Create Request Body. + * @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> beginCreate(String resourceGroupName, - String appName, ManagedCcfInner managedCcf) { - Response response = createWithResponse(resourceGroupName, appName, managedCcf); + public SyncPoller, ManagedCcfInner> beginUpdate(String resourceGroupName, + String appName, ManagedCcfInner managedCCF) { + Response response = updateWithResponse(resourceGroupName, appName, managedCCF); return this.client.getLroResult(response, ManagedCcfInner.class, ManagedCcfInner.class, Context.NONE); } /** - * Creates a Managed CCF. - * - * Creates a Managed CCF with the specified Managed CCF parameters. + * 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 Managed CCF Create Request Body. + * @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. @@ -780,58 +608,52 @@ public SyncPoller, ManagedCcfInner> beginCreate(Stri * @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) { - Response response = createWithResponse(resourceGroupName, appName, managedCcf, context); + public SyncPoller, ManagedCcfInner> beginUpdate(String resourceGroupName, + String appName, ManagedCcfInner managedCCF, Context context) { + Response response = updateWithResponse(resourceGroupName, appName, managedCCF, context); return this.client.getLroResult(response, ManagedCcfInner.class, ManagedCcfInner.class, context); } /** - * Creates a Managed CCF. - * - * Creates a Managed CCF with the specified Managed CCF parameters. + * 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 Managed CCF Create Request Body. + * @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 createAsync(String resourceGroupName, String appName, ManagedCcfInner managedCcf) { - return beginCreateAsync(resourceGroupName, appName, managedCcf).last() + private Mono updateAsync(String resourceGroupName, String appName, ManagedCcfInner managedCCF) { + return beginUpdateAsync(resourceGroupName, appName, managedCCF).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Creates a Managed CCF. - * - * Creates a Managed CCF with the specified Managed CCF parameters. + * 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 Managed CCF Create Request Body. + * @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 create(String resourceGroupName, String appName, ManagedCcfInner managedCcf) { - return beginCreate(resourceGroupName, appName, managedCcf).getFinalResult(); + public ManagedCcfInner update(String resourceGroupName, String appName, ManagedCcfInner managedCCF) { + return beginUpdate(resourceGroupName, appName, managedCCF).getFinalResult(); } /** - * Creates a Managed CCF. - * - * Creates a Managed CCF with the specified Managed CCF parameters. + * 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 Managed CCF Create Request Body. + * @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. @@ -839,269 +661,157 @@ public ManagedCcfInner create(String resourceGroupName, String appName, ManagedC * @return managed CCF. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedCcfInner create(String resourceGroupName, String appName, ManagedCcfInner managedCcf, + public ManagedCcfInner update(String resourceGroupName, String appName, ManagedCcfInner managedCCF, Context context) { - return beginCreate(resourceGroupName, appName, managedCcf, context).getFinalResult(); + return beginUpdate(resourceGroupName, appName, managedCCF, context).getFinalResult(); } /** - * Update Managed CCF properties - * - * Updates properties of Managed CCF. + * 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 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}. + * @return the {@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"; + private Mono>> deleteWithResponseAsync(String resourceGroupName, String appName) { return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, appName, managedCcf, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, appName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Update Managed CCF properties - * - * Updates properties of Managed CCF. + * 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 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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String appName, - ManagedCcfInner managedCcf) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (appName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter appName is required and cannot be null.")); - } - if (managedCcf == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter managedCcf is required and cannot be null.")); - } else { - managedCcf.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, appName, managedCcf, accept, Context.NONE); + private Response deleteWithResponse(String resourceGroupName, String appName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, appName, Context.NONE); } /** - * Update Managed CCF properties - * - * Updates properties of Managed CCF. + * 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 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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String appName, - ManagedCcfInner managedCcf, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (appName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter appName is required and cannot be null.")); - } - if (managedCcf == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter managedCcf is required and cannot be null.")); - } else { - managedCcf.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, appName, managedCcf, accept, context); + private Response deleteWithResponse(String resourceGroupName, String appName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, appName, context); } /** - * Update Managed CCF properties - * - * Updates properties of Managed CCF. + * 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 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @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()); + 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()); } /** - * Update Managed CCF properties - * - * Updates properties of Managed CCF. + * 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 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedCcfInner> beginUpdate(String resourceGroupName, - String appName, ManagedCcfInner managedCcf) { - Response response = updateWithResponse(resourceGroupName, appName, managedCcf); - return this.client.getLroResult(response, ManagedCcfInner.class, - ManagedCcfInner.class, Context.NONE); + public SyncPoller, Void> beginDelete(String resourceGroupName, String appName) { + Response response = deleteWithResponse(resourceGroupName, appName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Update Managed CCF properties - * - * Updates properties of Managed CCF. + * 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 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedCcfInner> beginUpdate(String resourceGroupName, - String appName, ManagedCcfInner managedCcf, Context context) { - Response response = updateWithResponse(resourceGroupName, appName, managedCcf, context); - return this.client.getLroResult(response, ManagedCcfInner.class, - ManagedCcfInner.class, context); + public SyncPoller, Void> beginDelete(String resourceGroupName, String appName, Context context) { + Response response = deleteWithResponse(resourceGroupName, appName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Update Managed CCF properties - * - * Updates properties of Managed CCF. + * 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 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}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String appName, ManagedCcfInner managedCcf) { - return beginUpdateAsync(resourceGroupName, appName, managedCcf).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono deleteAsync(String resourceGroupName, String appName) { + return beginDeleteAsync(resourceGroupName, appName).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Update Managed CCF properties - * - * Updates properties of Managed CCF. + * 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 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 beginUpdate(resourceGroupName, appName, managedCcf).getFinalResult(); + public void delete(String resourceGroupName, String appName) { + beginDelete(resourceGroupName, appName).getFinalResult(); } /** - * Update Managed CCF properties - * - * Updates properties of Managed CCF. + * 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 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 beginUpdate(resourceGroupName, appName, managedCcf, context).getFinalResult(); + public void delete(String resourceGroupName, String appName, Context context) { + beginDelete(resourceGroupName, appName, context).getFinalResult(); } /** - * 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. @@ -1115,18 +825,6 @@ public ManagedCcfInner update(String resourceGroupName, String appName, ManagedC @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(), @@ -1137,8 +835,6 @@ private Mono> listByResourceGroupSinglePageAsync( } /** - * 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. @@ -1156,8 +852,6 @@ private PagedFlux listByResourceGroupAsync(String resourceGroup } /** - * 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. @@ -1175,8 +869,6 @@ private PagedFlux listByResourceGroupAsync(String resourceGroup } /** - * 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. @@ -1189,22 +881,8 @@ private PagedFlux listByResourceGroupAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String filter) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } final String accept = "application/json"; - Response res + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, filter, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), @@ -1212,8 +890,6 @@ private PagedResponse listByResourceGroupSinglePage(String reso } /** - * 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. @@ -1228,30 +904,14 @@ private PagedResponse listByResourceGroupSinglePage(String reso @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String filter, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } final String accept = "application/json"; - Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, filter, accept, context); return 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. @@ -1269,8 +929,6 @@ public PagedIterable listByResourceGroup(String resourceGroupNa } /** - * 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. @@ -1290,8 +948,6 @@ public PagedIterable listByResourceGroup(String resourceGroupNa } /** - * 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'. @@ -1303,14 +959,6 @@ public PagedIterable listByResourceGroup(String resourceGroupNa */ @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(), @@ -1321,8 +969,6 @@ private Mono> listSinglePageAsync(String 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'. @@ -1339,8 +985,6 @@ private PagedFlux listAsync(String filter) { } /** - * 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. @@ -1356,8 +1000,6 @@ private PagedFlux listAsync() { } /** - * 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'. @@ -1369,26 +1011,14 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String filter) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), filter, accept, Context.NONE); return 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'. @@ -1401,26 +1031,14 @@ private PagedResponse listSinglePage(String filter) { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String filter, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), filter, accept, context); return 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. * * @throws ManagementException thrown if the request is rejected by server. @@ -1436,8 +1054,6 @@ public 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'. @@ -1455,522 +1071,352 @@ public 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. + * @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}. + * @return the response body 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(); - } + ManagedCcfBackup managedCCF) { + final String contentType = "application/json"; 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)) + this.client.getSubscriptionId(), resourceGroupName, appName, contentType, accept, managedCCF, 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 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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response backupWithResponse(String resourceGroupName, String appName, - ManagedCcfBackup managedCcf) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (appName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter appName is required and cannot be null.")); - } - if (managedCcf == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter managedCcf is required and cannot be null.")); - } else { - managedCcf.validate(); - } + ManagedCcfBackup managedCCF) { + final String contentType = "application/json"; final String accept = "application/json"; return service.backupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, appName, managedCcf, accept, Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, appName, contentType, accept, managedCCF, Context.NONE); } /** - * 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 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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response backupWithResponse(String resourceGroupName, String appName, - ManagedCcfBackup managedCcf, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (appName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter appName is required and cannot be null.")); - } - if (managedCcf == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter managedCcf is required and cannot be null.")); - } else { - managedCcf.validate(); - } + ManagedCcfBackup managedCCF, Context context) { + final String contentType = "application/json"; final String accept = "application/json"; return service.backupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, appName, managedCcf, accept, context); + this.client.getSubscriptionId(), resourceGroupName, appName, contentType, accept, managedCCF, 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. + * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ManagedCcfBackupResponseInner> - beginBackupAsync(String resourceGroupName, String appName, ManagedCcfBackup managedCcf) { - Mono>> mono = backupWithResponseAsync(resourceGroupName, appName, managedCcf); + 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 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ManagedCcfBackupResponseInner> - beginBackup(String resourceGroupName, String appName, ManagedCcfBackup managedCcf) { - Response response = backupWithResponse(resourceGroupName, appName, managedCcf); + beginBackup(String resourceGroupName, String appName, ManagedCcfBackup managedCCF) { + Response response = backupWithResponse(resourceGroupName, appName, managedCCF); return this.client.getLroResult(response, ManagedCcfBackupResponseInner.class, ManagedCcfBackupResponseInner.class, Context.NONE); } /** - * 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 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ManagedCcfBackupResponseInner> - beginBackup(String resourceGroupName, String appName, ManagedCcfBackup managedCcf, Context context) { - Response response = backupWithResponse(resourceGroupName, appName, managedCcf, context); + beginBackup(String resourceGroupName, String appName, ManagedCcfBackup managedCCF, Context context) { + Response response = backupWithResponse(resourceGroupName, appName, managedCCF, context); return this.client.getLroResult(response, 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. + * @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}. + * @return the response body 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() + 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 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedCcfBackupResponseInner backup(String resourceGroupName, String appName, ManagedCcfBackup managedCcf) { - return beginBackup(resourceGroupName, appName, managedCcf).getFinalResult(); + public ManagedCcfBackupResponseInner backup(String resourceGroupName, String appName, ManagedCcfBackup managedCCF) { + return beginBackup(resourceGroupName, appName, managedCCF).getFinalResult(); } /** - * 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 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedCcfBackupResponseInner backup(String resourceGroupName, String appName, ManagedCcfBackup managedCcf, + public ManagedCcfBackupResponseInner backup(String resourceGroupName, String appName, ManagedCcfBackup managedCCF, Context context) { - return beginBackup(resourceGroupName, appName, managedCcf, context).getFinalResult(); + return beginBackup(resourceGroupName, appName, managedCCF, context).getFinalResult(); } /** - * 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 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}. + * @return the response body 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(); - } + ManagedCcfRestore managedCCF) { + final String contentType = "application/json"; 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)) + this.client.getSubscriptionId(), resourceGroupName, appName, contentType, accept, managedCCF, 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 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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response restoreWithResponse(String resourceGroupName, String appName, - ManagedCcfRestore managedCcf) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (appName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter appName is required and cannot be null.")); - } - if (managedCcf == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter managedCcf is required and cannot be null.")); - } else { - managedCcf.validate(); - } + ManagedCcfRestore managedCCF) { + final String contentType = "application/json"; final String accept = "application/json"; return service.restoreSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, appName, managedCcf, accept, Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, appName, contentType, accept, managedCCF, Context.NONE); } /** - * 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 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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response restoreWithResponse(String resourceGroupName, String appName, - ManagedCcfRestore managedCcf, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (appName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter appName is required and cannot be null.")); - } - if (managedCcf == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter managedCcf is required and cannot be null.")); - } else { - managedCcf.validate(); - } + ManagedCcfRestore managedCCF, Context context) { + final String contentType = "application/json"; final String accept = "application/json"; return service.restoreSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, appName, managedCcf, accept, context); + this.client.getSubscriptionId(), resourceGroupName, appName, contentType, accept, managedCCF, 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. + * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ManagedCcfRestoreResponseInner> - beginRestoreAsync(String resourceGroupName, String appName, ManagedCcfRestore managedCcf) { - Mono>> mono = restoreWithResponseAsync(resourceGroupName, appName, managedCcf); + 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 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ManagedCcfRestoreResponseInner> - beginRestore(String resourceGroupName, String appName, ManagedCcfRestore managedCcf) { - Response response = restoreWithResponse(resourceGroupName, appName, managedCcf); + beginRestore(String resourceGroupName, String appName, ManagedCcfRestore managedCCF) { + Response response = restoreWithResponse(resourceGroupName, appName, managedCCF); return this.client.getLroResult(response, ManagedCcfRestoreResponseInner.class, ManagedCcfRestoreResponseInner.class, Context.NONE); } /** - * 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 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ManagedCcfRestoreResponseInner> - beginRestore(String resourceGroupName, String appName, ManagedCcfRestore managedCcf, Context context) { - Response response = restoreWithResponse(resourceGroupName, appName, managedCcf, context); + beginRestore(String resourceGroupName, String appName, ManagedCcfRestore managedCCF, Context context) { + Response response = restoreWithResponse(resourceGroupName, appName, managedCCF, context); return this.client.getLroResult(response, 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. + * @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}. + * @return the response body 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() + 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 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public ManagedCcfRestoreResponseInner restore(String resourceGroupName, String appName, - ManagedCcfRestore managedCcf) { - return beginRestore(resourceGroupName, appName, managedCcf).getFinalResult(); + ManagedCcfRestore managedCCF) { + return beginRestore(resourceGroupName, appName, managedCCF).getFinalResult(); } /** - * 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 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public ManagedCcfRestoreResponseInner restore(String resourceGroupName, String appName, - ManagedCcfRestore managedCcf, Context context) { - return beginRestore(resourceGroupName, appName, managedCcf, context).getFinalResult(); + ManagedCcfRestore managedCCF, Context context) { + return beginRestore(resourceGroupName, appName, managedCCF, context).getFinalResult(); } /** @@ -1985,13 +1431,6 @@ public ManagedCcfRestoreResponseInner restore(String resourceGroupName, String a */ @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( @@ -2013,17 +1452,8 @@ private Mono> listByResourceGroupNextSinglePageAs */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; - Response res + Response res = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); @@ -2042,17 +1472,8 @@ private PagedResponse listByResourceGroupNextSinglePage(String */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; - Response res + Response res = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); @@ -2070,13 +1491,6 @@ private PagedResponse listByResourceGroupNextSinglePage(String */ @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( @@ -2098,17 +1512,8 @@ private Mono> listBySubscriptionNextSinglePageAsy */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; - Response res + Response res = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); @@ -2127,21 +1532,10 @@ private PagedResponse listBySubscriptionNextSinglePage(String n */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; - Response res + Response res = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(ManagedCcfsClientImpl.class); } 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 index 9e3a07e28ac4..8b566600791f 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.implementation; @@ -83,8 +83,8 @@ public PagedIterable list(String filter, Context 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); + 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 { @@ -92,10 +92,10 @@ public ManagedCcfBackupResponse backup(String resourceGroupName, String appName, } } - public ManagedCcfBackupResponse backup(String resourceGroupName, String appName, ManagedCcfBackup managedCcf, + public ManagedCcfBackupResponse backup(String resourceGroupName, String appName, ManagedCcfBackup managedCCF, Context context) { ManagedCcfBackupResponseInner inner - = this.serviceClient().backup(resourceGroupName, appName, managedCcf, context); + = this.serviceClient().backup(resourceGroupName, appName, managedCCF, context); if (inner != null) { return new ManagedCcfBackupResponseImpl(inner, this.manager()); } else { @@ -103,8 +103,8 @@ public ManagedCcfBackupResponse backup(String resourceGroupName, String appName, } } - public ManagedCcfRestoreResponse restore(String resourceGroupName, String appName, ManagedCcfRestore managedCcf) { - ManagedCcfRestoreResponseInner inner = this.serviceClient().restore(resourceGroupName, appName, managedCcf); + 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 { @@ -112,10 +112,10 @@ public ManagedCcfRestoreResponse restore(String resourceGroupName, String appNam } } - public ManagedCcfRestoreResponse restore(String resourceGroupName, String appName, ManagedCcfRestore managedCcf, + public ManagedCcfRestoreResponse restore(String resourceGroupName, String appName, ManagedCcfRestore managedCCF, Context context) { ManagedCcfRestoreResponseInner inner - = this.serviceClient().restore(resourceGroupName, appName, managedCcf, context); + = this.serviceClient().restore(resourceGroupName, appName, managedCCF, context); if (inner != null) { return new ManagedCcfRestoreResponseImpl(inner, this.manager()); } else { diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/OperationsClientImpl.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/OperationsClientImpl.java index 14ec1adc929a..e374f98f451c 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/OperationsClientImpl.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/OperationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.implementation; @@ -25,10 +25,9 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.confidentialledger.fluent.OperationsClient; import com.azure.resourcemanager.confidentialledger.fluent.models.ResourceProviderOperationDefinitionInner; -import com.azure.resourcemanager.confidentialledger.models.ResourceProviderOperationList; +import com.azure.resourcemanager.confidentialledger.implementation.models.ResourceProviderOperationList; import reactor.core.publisher.Mono; /** @@ -60,21 +59,21 @@ public final class OperationsClientImpl implements OperationsClient { * The interface defining all the services for ConfidentialLedgerManagementClientOperations to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "ConfidentialLedgerMa") + @Host("{endpoint}") + @ServiceInterface(name = "ConfidentialLedgerManagementClientOperations") public interface OperationsService { @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.ConfidentialLedger/operations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.ConfidentialLedger/operations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, + Response listSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -82,7 +81,7 @@ Response listSync(@HostParam("$host") String endp @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -90,14 +89,12 @@ Mono> listNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Retrieves a list of available API operations under this Resource Provider. - * - * Retrieves a list of available API operations. + * List the operations for the provider. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -106,10 +103,6 @@ Response listNextSync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -121,9 +114,7 @@ private Mono> listSingle } /** - * Retrieves a list of available API operations under this Resource Provider. - * - * Retrieves a list of available API operations. + * List the operations for the provider. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -136,9 +127,7 @@ private PagedFlux listAsync() { } /** - * Retrieves a list of available API operations under this Resource Provider. - * - * Retrieves a list of available API operations. + * List the operations for the provider. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -146,11 +135,6 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage() { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, Context.NONE); @@ -159,9 +143,7 @@ private PagedResponse listSinglePage() } /** - * Retrieves a list of available API operations under this Resource Provider. - * - * Retrieves a list of available API operations. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -171,11 +153,6 @@ private PagedResponse listSinglePage() */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, context); @@ -184,9 +161,7 @@ private PagedResponse listSinglePage(C } /** - * Retrieves a list of available API operations under this Resource Provider. - * - * Retrieves a list of available API operations. + * List the operations for the provider. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -199,9 +174,7 @@ public PagedIterable list() { } /** - * Retrieves a list of available API operations under this Resource Provider. - * - * Retrieves a list of available API operations. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -227,13 +200,6 @@ public PagedIterable list(Context cont */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) .>map( @@ -253,15 +219,6 @@ private Mono> listNextSi */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -282,21 +239,10 @@ private PagedResponse listNextSinglePa @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(OperationsClientImpl.class); } diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/OperationsImpl.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/OperationsImpl.java index 8f598ee24588..24095d73a063 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/OperationsImpl.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/OperationsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.implementation; diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ResourceManagerUtils.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ResourceManagerUtils.java index 7e4f41eb0bb1..77cec4ac1cf4 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ResourceManagerUtils.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ResourceManagerUtils.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.implementation; diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ResourceProviderOperationDefinitionImpl.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ResourceProviderOperationDefinitionImpl.java index b24badee7040..4a5b4342ccfa 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ResourceProviderOperationDefinitionImpl.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ResourceProviderOperationDefinitionImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.implementation; diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ResourceProvidersClientImpl.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ResourceProvidersClientImpl.java index fac0557d2238..0a5de07e76e6 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ResourceProvidersClientImpl.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ResourceProvidersClientImpl.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.implementation; import com.azure.core.annotation.BodyParam; import com.azure.core.annotation.ExpectedResponses; import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; import com.azure.core.annotation.PathParam; @@ -22,7 +21,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.confidentialledger.fluent.ResourceProvidersClient; import com.azure.resourcemanager.confidentialledger.fluent.models.CheckNameAvailabilityResponseInner; import com.azure.resourcemanager.confidentialledger.models.CheckNameAvailabilityRequest; @@ -57,32 +55,30 @@ public final class ResourceProvidersClientImpl implements ResourceProvidersClien * The interface defining all the services for ConfidentialLedgerManagementClientResourceProviders to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "ConfidentialLedgerMa") + @Host("{endpoint}") + @ServiceInterface(name = "ConfidentialLedgerManagementClientResourceProviders") public interface ResourceProvidersService { - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ConfidentialLedger/checkNameAvailability") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> checkNameAvailability(@HostParam("$host") String endpoint, + Mono> checkNameAvailability(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") CheckNameAvailabilityRequest nameAvailabilityRequest, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") CheckNameAvailabilityRequest nameAvailabilityRequest, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ConfidentialLedger/checkNameAvailability") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response checkNameAvailabilitySync(@HostParam("$host") String endpoint, + Response checkNameAvailabilitySync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") CheckNameAvailabilityRequest nameAvailabilityRequest, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") CheckNameAvailabilityRequest nameAvailabilityRequest, Context context); } /** * To check whether a resource name is available. * - * @param nameAvailabilityRequest Name availability request payload. + * @param nameAvailabilityRequest The 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. @@ -91,31 +87,19 @@ Response checkNameAvailabilitySync(@HostPara @ServiceMethod(returns = ReturnType.SINGLE) private Mono> checkNameAvailabilityWithResponseAsync(CheckNameAvailabilityRequest nameAvailabilityRequest) { - 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 (nameAvailabilityRequest == null) { - return Mono.error( - new IllegalArgumentException("Parameter nameAvailabilityRequest is required and cannot be null.")); - } else { - nameAvailabilityRequest.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.checkNameAvailability(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), nameAvailabilityRequest, accept, context)) + .withContext( + context -> service.checkNameAvailability(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), contentType, accept, nameAvailabilityRequest, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * To check whether a resource name is available. * - * @param nameAvailabilityRequest Name availability request payload. + * @param nameAvailabilityRequest The 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. @@ -131,7 +115,7 @@ Response checkNameAvailabilitySync(@HostPara /** * To check whether a resource name is available. * - * @param nameAvailabilityRequest Name availability request payload. + * @param nameAvailabilityRequest The 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. @@ -141,31 +125,16 @@ Response checkNameAvailabilitySync(@HostPara @ServiceMethod(returns = ReturnType.SINGLE) public Response checkNameAvailabilityWithResponse(CheckNameAvailabilityRequest nameAvailabilityRequest, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (nameAvailabilityRequest == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nameAvailabilityRequest is required and cannot be null.")); - } else { - nameAvailabilityRequest.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return service.checkNameAvailabilitySync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), nameAvailabilityRequest, accept, context); + this.client.getSubscriptionId(), contentType, accept, nameAvailabilityRequest, context); } /** * To check whether a resource name is available. * - * @param nameAvailabilityRequest Name availability request payload. + * @param nameAvailabilityRequest The 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. @@ -176,6 +145,4 @@ Response checkNameAvailabilitySync(@HostPara checkNameAvailability(CheckNameAvailabilityRequest nameAvailabilityRequest) { return checkNameAvailabilityWithResponse(nameAvailabilityRequest, Context.NONE).getValue(); } - - private static final ClientLogger LOGGER = new ClientLogger(ResourceProvidersClientImpl.class); } diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ResourceProvidersImpl.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ResourceProvidersImpl.java index 047c22492ca4..e68f6f3955c7 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ResourceProvidersImpl.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ResourceProvidersImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.implementation; diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ConfidentialLedgerList.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/models/ConfidentialLedgerList.java similarity index 65% rename from sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ConfidentialLedgerList.java rename to sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/models/ConfidentialLedgerList.java index 63b6b4c20090..75dfb355feed 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ConfidentialLedgerList.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/models/ConfidentialLedgerList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.confidentialledger.models; +package com.azure.resourcemanager.confidentialledger.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * Object that includes an array of Confidential Ledgers and a possible link for next set. */ -@Fluent +@Immutable public final class ConfidentialLedgerList implements JsonSerializable { /* - * List of Confidential Ledgers + * The ConfidentialLedger items on this page */ private List value; /* - * The URL the client should use to fetch the next page (per server side paging). + * The link to the next page of items */ private String nextLink; /** * Creates an instance of ConfidentialLedgerList class. */ - public ConfidentialLedgerList() { + private ConfidentialLedgerList() { } /** - * Get the value property: List of Confidential Ledgers. + * Get the value property: The ConfidentialLedger items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: List of Confidential Ledgers. - * - * @param value the value value to set. - * @return the ConfidentialLedgerList object itself. - */ - public ConfidentialLedgerList 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). + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ 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 ConfidentialLedgerList object itself. - */ - public ConfidentialLedgerList 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} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ConfidentialLedgerList 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 ConfidentialLedgerList. */ public static ConfidentialLedgerList fromJson(JsonReader jsonReader) throws IOException { 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/implementation/models/ManagedCCFList.java similarity index 50% rename from sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ManagedCcfList.java rename to sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/models/ManagedCCFList.java index 00223d869772..ddb347b7a186 100644 --- 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/implementation/models/ManagedCCFList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.confidentialledger.models; +package com.azure.resourcemanager.confidentialledger.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * Object that includes an array of Managed CCF and a possible link for next set. */ -@Fluent -public final class ManagedCcfList implements JsonSerializable { +@Immutable +public final class ManagedCCFList implements JsonSerializable { /* - * List of Managed CCF + * The ManagedCCF items on this page */ private List value; /* - * The URL the client should use to fetch the next page (per server side paging). + * The link to the next page of items */ private String nextLink; /** - * Creates an instance of ManagedCcfList class. + * Creates an instance of ManagedCCFList class. */ - public ManagedCcfList() { + private ManagedCCFList() { } /** - * Get the value property: List of Managed CCF. + * Get the value property: The ManagedCCF items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List 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). + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ 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} */ @@ -97,31 +64,32 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of ManagedCcfList from the JsonReader. + * 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 + * @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. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ManagedCCFList. */ - public static ManagedCcfList fromJson(JsonReader jsonReader) throws IOException { + public static ManagedCCFList fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - ManagedCcfList deserializedManagedCcfList = new ManagedCcfList(); + 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; + deserializedManagedCCFList.value = value; } else if ("nextLink".equals(fieldName)) { - deserializedManagedCcfList.nextLink = reader.getString(); + deserializedManagedCCFList.nextLink = reader.getString(); } else { reader.skipChildren(); } } - return deserializedManagedCcfList; + return deserializedManagedCCFList; }); } } diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ResourceProviderOperationList.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/models/ResourceProviderOperationList.java similarity index 79% rename from sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ResourceProviderOperationList.java rename to sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/models/ResourceProviderOperationList.java index 3107ac0668a7..1d3027d81e20 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ResourceProviderOperationList.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/models/ResourceProviderOperationList.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.confidentialledger.models; +package com.azure.resourcemanager.confidentialledger.implementation.models; import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; @@ -19,23 +19,23 @@ @Immutable public final class ResourceProviderOperationList implements JsonSerializable { /* - * Resource provider operations list. + * The list of operations. */ private List value; /* - * The URI that can be used to request the next page for list of Azure operations. + * The URL to get the next set of results, if any. */ private String nextLink; /** * Creates an instance of ResourceProviderOperationList class. */ - public ResourceProviderOperationList() { + private ResourceProviderOperationList() { } /** - * Get the value property: Resource provider operations list. + * Get the value property: The list of operations. * * @return the value value. */ @@ -44,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The URI that can be used to request the next page for list of Azure operations. + * Get the nextLink property: The URL to get the next set of results, if any. * * @return the nextLink value. */ @@ -52,23 +52,13 @@ public String nextLink() { return this.nextLink; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/package-info.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/package-info.java index f6d000d1f767..7c7706dedf48 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/package-info.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** * Package containing the implementations for ConfidentialLedgerManagementClient. - * Microsoft Azure Confidential Compute Ledger Control Plane REST API version 2020-12-01-preview. + * Microsoft Azure Confidential Compute Ledger Managed CCF Control Plane REST API version 2025-06-10-preview. */ package com.azure.resourcemanager.confidentialledger.implementation; diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/AadBasedSecurityPrincipal.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/AadBasedSecurityPrincipal.java index d4b099313420..db146207ef91 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/AadBasedSecurityPrincipal.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/AadBasedSecurityPrincipal.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.models; @@ -97,14 +97,6 @@ public AadBasedSecurityPrincipal withLedgerRoleName(LedgerRoleName ledgerRoleNam return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ApplicationType.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ApplicationType.java index ebd98e297670..75874f1e5e2a 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ApplicationType.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ApplicationType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.models; diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/CertBasedSecurityPrincipal.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/CertBasedSecurityPrincipal.java index 4ea3c1137520..a38b691a2db0 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/CertBasedSecurityPrincipal.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/CertBasedSecurityPrincipal.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.models; @@ -72,14 +72,6 @@ public CertBasedSecurityPrincipal withLedgerRoleName(LedgerRoleName ledgerRoleNa return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/CheckNameAvailabilityReason.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/CheckNameAvailabilityReason.java index 3af9f9b3e15e..6df760da996c 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/CheckNameAvailabilityReason.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/CheckNameAvailabilityReason.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.models; @@ -8,16 +8,16 @@ import java.util.Collection; /** - * The reason why the given name is not available. + * Possible reasons for a name not being available. */ public final class CheckNameAvailabilityReason extends ExpandableStringEnum { /** - * Static value Invalid for CheckNameAvailabilityReason. + * Name is invalid. */ public static final CheckNameAvailabilityReason INVALID = fromString("Invalid"); /** - * Static value AlreadyExists for CheckNameAvailabilityReason. + * Name already exists. */ public static final CheckNameAvailabilityReason ALREADY_EXISTS = fromString("AlreadyExists"); diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/CheckNameAvailabilityRequest.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/CheckNameAvailabilityRequest.java index 37776217908d..57d6c5070927 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/CheckNameAvailabilityRequest.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/CheckNameAvailabilityRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.models; @@ -72,14 +72,6 @@ public CheckNameAvailabilityRequest withType(String type) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/CheckNameAvailabilityResponse.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/CheckNameAvailabilityResponse.java index 7e03eed1c1f7..3a5507faab35 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/CheckNameAvailabilityResponse.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/CheckNameAvailabilityResponse.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.models; @@ -25,7 +25,7 @@ public interface CheckNameAvailabilityResponse { CheckNameAvailabilityReason reason(); /** - * Gets the message property: Detailed reason why the given name is available. + * Gets the message property: Detailed reason why the given name is not available. * * @return the message value. */ 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..0d378d452003 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.models; @@ -264,21 +264,17 @@ interface WithProperties { 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. + * @return the response. */ 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. @@ -286,26 +282,22 @@ interface WithProperties { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. + * @return the response. */ 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. + * @return the response. */ 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. @@ -313,7 +305,7 @@ interface WithProperties { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. + * @return the response. */ 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 index a722419b3f94..aef580c31dfa 100644 --- 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 @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.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; @@ -73,20 +72,6 @@ public ConfidentialLedgerBackup withUri(String 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} */ 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 index 4c9bf9204f26..901c302d65e2 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.models; 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 index ebcf2097df77..d903a3efb6f6 100644 --- 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 @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.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; @@ -98,30 +97,6 @@ public ConfidentialLedgerRestore withUri(String 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} */ 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 index 73646e13fe9f..1487b108b6e3 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.models; 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 index 97fe12b67590..f49333defd5f 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.models; @@ -12,8 +12,6 @@ import java.io.IOException; /** - * DeploymentType - * * Object representing DeploymentType for Managed CCF. */ @Fluent @@ -74,14 +72,6 @@ public DeploymentType withAppSourceUri(String appSourceUri) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/EnclavePlatform.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/EnclavePlatform.java index c0a7b3f90948..f2e1d83f8bbe 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/EnclavePlatform.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/EnclavePlatform.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.models; 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 index 1df98a84607c..8347f1cfa5ee 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.models; 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 bf5ba4797a05..6b76c55315a4 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.models; @@ -13,8 +13,6 @@ import java.util.List; /** - * LedgerProperties - * * Additional Confidential Ledger properties. */ @Fluent @@ -109,6 +107,11 @@ public final class LedgerProperties implements JsonSerializable e.validate()); - } - if (certBasedSecurityPrincipals() != null) { - certBasedSecurityPrincipals().forEach(e -> e.validate()); - } + public LedgerProperties withScittConfiguration(String scittConfiguration) { + this.scittConfiguration = scittConfiguration; + return this; } /** @@ -460,10 +458,9 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeNumberField("nodeCount", this.nodeCount); jsonWriter.writeStringField("writeLBAddressPrefix", this.writeLBAddressPrefix); jsonWriter.writeNumberField("workerThreads", this.workerThreads); - jsonWriter.writeStringField("enclavePlatform", - this.enclavePlatform == null ? null : this.enclavePlatform.toString()); jsonWriter.writeStringField("applicationType", this.applicationType == null ? null : this.applicationType.toString()); + jsonWriter.writeStringField("scittConfiguration", this.scittConfiguration); return jsonWriter.writeEndObject(); } @@ -522,6 +519,8 @@ public static LedgerProperties fromJson(JsonReader jsonReader) throws IOExceptio deserializedLedgerProperties.enclavePlatform = EnclavePlatform.fromString(reader.getString()); } else if ("applicationType".equals(fieldName)) { deserializedLedgerProperties.applicationType = ApplicationType.fromString(reader.getString()); + } else if ("scittConfiguration".equals(fieldName)) { + deserializedLedgerProperties.scittConfiguration = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/LedgerRoleName.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/LedgerRoleName.java index cc04c08d1b3d..baa844348bd7 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/LedgerRoleName.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/LedgerRoleName.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.models; 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 index 59e140f0a0b2..130518f765f0 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.models; diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/LedgerType.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/LedgerType.java index 0783f13e65a3..5f8704207228 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/LedgerType.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/LedgerType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.models; 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..bcc74e82f06d 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.models; @@ -13,8 +13,6 @@ */ public interface Ledgers { /** - * Retrieves information about a Confidential Ledger resource. - * * Retrieves the properties of a Confidential Ledger. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -29,8 +27,6 @@ Response getByResourceGroupWithResponse(String resourceGroup Context context); /** - * Retrieves information about a Confidential Ledger resource. - * * Retrieves the properties of a Confidential Ledger. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -43,8 +39,6 @@ Response getByResourceGroupWithResponse(String resourceGroup ConfidentialLedger getByResourceGroup(String resourceGroupName, String ledgerName); /** - * Deletes a Confidential Ledger resource. - * * Deletes an existing Confidential Ledger. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -56,8 +50,6 @@ Response getByResourceGroupWithResponse(String resourceGroup void deleteByResourceGroup(String resourceGroupName, String ledgerName); /** - * Deletes a Confidential Ledger resource. - * * Deletes an existing Confidential Ledger. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -70,8 +62,6 @@ Response getByResourceGroupWithResponse(String resourceGroup void delete(String resourceGroupName, String ledgerName, Context context); /** - * Retrieves information about all Confidential Ledger resources under the given subscription and resource group - * * Retrieves the properties of all Confidential Ledgers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -84,8 +74,6 @@ Response getByResourceGroupWithResponse(String resourceGroup PagedIterable listByResourceGroup(String resourceGroupName); /** - * Retrieves information about all Confidential Ledger resources under the given subscription and resource group - * * Retrieves the properties of all Confidential Ledgers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -100,8 +88,6 @@ Response getByResourceGroupWithResponse(String resourceGroup PagedIterable listByResourceGroup(String resourceGroupName, String filter, Context context); /** - * Retrieves information about all Confidential Ledger resources under the given subscription - * * Retrieves the properties of all Confidential Ledgers. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -112,8 +98,6 @@ Response getByResourceGroupWithResponse(String resourceGroup PagedIterable list(); /** - * Retrieves information about all Confidential Ledger resources under the given subscription - * * Retrieves the properties of all Confidential Ledgers. * * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. @@ -127,8 +111,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. @@ -137,14 +119,12 @@ Response getByResourceGroupWithResponse(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. + * @return the response. */ 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. @@ -154,14 +134,12 @@ ConfidentialLedgerBackupResponse backup(String resourceGroupName, String ledgerN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. + * @return the response. */ 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. @@ -170,14 +148,12 @@ ConfidentialLedgerBackupResponse backup(String resourceGroupName, String ledgerN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. + * @return the response. */ 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. @@ -187,14 +163,12 @@ ConfidentialLedgerRestoreResponse restore(String resourceGroupName, String ledge * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. + * @return the response. */ ConfidentialLedgerRestoreResponse restore(String resourceGroupName, String ledgerName, ConfidentialLedgerRestore confidentialLedger, Context context); /** - * Retrieves information about a Confidential Ledger resource. - * * Retrieves the properties of a Confidential Ledger. * * @param id the resource ID. @@ -206,8 +180,6 @@ ConfidentialLedgerRestoreResponse restore(String resourceGroupName, String ledge ConfidentialLedger getById(String id); /** - * Retrieves information about a Confidential Ledger resource. - * * Retrieves the properties of a Confidential Ledger. * * @param id the resource ID. @@ -220,8 +192,6 @@ ConfidentialLedgerRestoreResponse restore(String resourceGroupName, String ledge Response getByIdWithResponse(String id, Context context); /** - * Deletes a Confidential Ledger resource. - * * Deletes an existing Confidential Ledger. * * @param id the resource ID. @@ -232,8 +202,6 @@ ConfidentialLedgerRestoreResponse restore(String resourceGroupName, String ledge void deleteById(String id); /** - * Deletes a Confidential Ledger resource. - * * Deletes an existing Confidential Ledger. * * @param id the resource ID. 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 index 9ca9b6a6ae61..cbb112f3d617 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.models; @@ -264,56 +264,48 @@ interface WithProperties { 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. + * @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. + * @return the response. */ - ManagedCcfBackupResponse backup(ManagedCcfBackup managedCcf); + 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 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. + * @return the response. */ - ManagedCcfBackupResponse backup(ManagedCcfBackup managedCcf, Context context); + 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. + * @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. + * @return the response. */ - ManagedCcfRestoreResponse restore(ManagedCcfRestore managedCcf); + 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 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. + * @return the response. */ - ManagedCcfRestoreResponse restore(ManagedCcfRestore managedCcf, Context context); + 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 index c09a0a6d24cc..0f6066478b78 100644 --- 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 @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.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; @@ -75,20 +74,6 @@ public ManagedCcfBackup withUri(String 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} */ 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 index 266d0f042da7..d73b9ab9f008 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.models; 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 index cee091f0c6ba..1cd7801ff9d7 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.models; @@ -13,8 +13,6 @@ import java.util.List; /** - * ManagedCCFProperties - * * Additional Managed CCF properties. */ @Fluent @@ -196,31 +194,6 @@ public EnclavePlatform enclavePlatform() { return this.enclavePlatform; } - /** - * Set the enclavePlatform property: Enclave platform of Managed CCF. - * - * @param enclavePlatform the enclavePlatform value to set. - * @return the ManagedCcfProperties object itself. - */ - public ManagedCcfProperties withEnclavePlatform(EnclavePlatform enclavePlatform) { - this.enclavePlatform = enclavePlatform; - 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} */ @@ -232,8 +205,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("deploymentType", this.deploymentType); jsonWriter.writeStringField("runningState", this.runningState == null ? null : this.runningState.toString()); jsonWriter.writeNumberField("nodeCount", this.nodeCount); - jsonWriter.writeStringField("enclavePlatform", - this.enclavePlatform == null ? null : this.enclavePlatform.toString()); return jsonWriter.writeEndObject(); } 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 index 22ffcb4a0703..5a1b3098c58e 100644 --- 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 @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.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; @@ -98,30 +97,6 @@ public ManagedCcfRestore withUri(String 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} */ 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 index 398f4301a584..f75068b832e6 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.models; 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 index b0ec1b6d9fa4..ee15aed6096a 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.models; @@ -13,8 +13,6 @@ */ 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. @@ -28,8 +26,6 @@ public interface ManagedCcfs { 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. @@ -42,8 +38,6 @@ public interface ManagedCcfs { 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. @@ -55,8 +49,6 @@ public interface ManagedCcfs { 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. @@ -69,8 +61,6 @@ public interface ManagedCcfs { 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. @@ -83,8 +73,6 @@ public interface ManagedCcfs { 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. @@ -99,8 +87,6 @@ public interface ManagedCcfs { 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. @@ -111,8 +97,6 @@ public interface ManagedCcfs { 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'. @@ -126,72 +110,62 @@ public interface ManagedCcfs { 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. + * @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. + * @return the response. */ - ManagedCcfBackupResponse backup(String resourceGroupName, String appName, ManagedCcfBackup managedCcf); + 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 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. + * @return the response. */ - ManagedCcfBackupResponse backup(String resourceGroupName, String appName, ManagedCcfBackup managedCcf, + 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. + * @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. + * @return the response. */ - ManagedCcfRestoreResponse restore(String resourceGroupName, String appName, ManagedCcfRestore managedCcf); + 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 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. + * @return the response. */ - ManagedCcfRestoreResponse restore(String resourceGroupName, String appName, ManagedCcfRestore managedCcf, + 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. @@ -203,8 +177,6 @@ ManagedCcfRestoreResponse restore(String resourceGroupName, String appName, Mana ManagedCcf getById(String id); /** - * Retrieves information about a Managed CCF resource. - * * Retrieves the properties of a Managed CCF app. * * @param id the resource ID. @@ -217,8 +189,6 @@ ManagedCcfRestoreResponse restore(String resourceGroupName, String appName, Mana Response getByIdWithResponse(String id, Context context); /** - * Deletes a Managed CCF resource. - * * Deletes an existing Managed CCF. * * @param id the resource ID. @@ -229,8 +199,6 @@ ManagedCcfRestoreResponse restore(String resourceGroupName, String appName, Mana void deleteById(String id); /** - * Deletes a Managed CCF resource. - * * Deletes an existing Managed CCF. * * @param id the resource ID. 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 index 186e38dfee73..8ca6ed5feabc 100644 --- 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 @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.BinaryData; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -12,8 +13,6 @@ import java.io.IOException; /** - * MemberIdentityCertificate - * * Object representing MemberIdentityCertificate for Managed CCF. */ @Fluent @@ -31,7 +30,7 @@ public final class MemberIdentityCertificate implements JsonSerializable BinaryData.fromObject(nonNullReader.readUntyped())); } else { reader.skipChildren(); } diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/Operations.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/Operations.java index 350cb2010e64..8d9ad6365837 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/Operations.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/Operations.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.models; @@ -12,9 +12,7 @@ */ public interface Operations { /** - * Retrieves a list of available API operations under this Resource Provider. - * - * Retrieves a list of available API operations. + * List the operations for the provider. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -24,9 +22,7 @@ public interface Operations { PagedIterable list(); /** - * Retrieves a list of available API operations under this Resource Provider. - * - * Retrieves a list of available API operations. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ProvisioningState.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ProvisioningState.java index 156de82f4791..918f3ef52a10 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ProvisioningState.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.models; diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ResourceProviderOperationDefinition.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ResourceProviderOperationDefinition.java index 71f31bef74a3..3629e2b1f921 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ResourceProviderOperationDefinition.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ResourceProviderOperationDefinition.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.models; diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ResourceProviderOperationDisplay.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ResourceProviderOperationDisplay.java index 7436e5648c38..ec086dc34ef3 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ResourceProviderOperationDisplay.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ResourceProviderOperationDisplay.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Describes the properties of the Operation. */ -@Fluent +@Immutable public final class ResourceProviderOperationDisplay implements JsonSerializable { /* * Name of the resource provider. @@ -39,7 +39,7 @@ public final class ResourceProviderOperationDisplay implements JsonSerializable< /** * Creates an instance of ResourceProviderOperationDisplay class. */ - public ResourceProviderOperationDisplay() { + private ResourceProviderOperationDisplay() { } /** @@ -51,17 +51,6 @@ public String provider() { return this.provider; } - /** - * Set the provider property: Name of the resource provider. - * - * @param provider the provider value to set. - * @return the ResourceProviderOperationDisplay object itself. - */ - public ResourceProviderOperationDisplay withProvider(String provider) { - this.provider = provider; - return this; - } - /** * Get the resource property: Name of the resource type. * @@ -71,17 +60,6 @@ public String resource() { return this.resource; } - /** - * Set the resource property: Name of the resource type. - * - * @param resource the resource value to set. - * @return the ResourceProviderOperationDisplay object itself. - */ - public ResourceProviderOperationDisplay withResource(String resource) { - this.resource = resource; - return this; - } - /** * Get the operation property: Name of the resource provider operation. * @@ -91,17 +69,6 @@ public String operation() { return this.operation; } - /** - * Set the operation property: Name of the resource provider operation. - * - * @param operation the operation value to set. - * @return the ResourceProviderOperationDisplay object itself. - */ - public ResourceProviderOperationDisplay withOperation(String operation) { - this.operation = operation; - return this; - } - /** * Get the description property: Description of the resource provider operation. * @@ -111,25 +78,6 @@ public String description() { return this.description; } - /** - * Set the description property: Description of the resource provider operation. - * - * @param description the description value to set. - * @return the ResourceProviderOperationDisplay object itself. - */ - public ResourceProviderOperationDisplay withDescription(String description) { - this.description = description; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ResourceProviders.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ResourceProviders.java index d9fe621ab7e1..51b10d65b231 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ResourceProviders.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ResourceProviders.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.models; @@ -14,7 +14,7 @@ public interface ResourceProviders { /** * To check whether a resource name is available. * - * @param nameAvailabilityRequest Name availability request payload. + * @param nameAvailabilityRequest The 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. @@ -27,7 +27,7 @@ public interface ResourceProviders { /** * To check whether a resource name is available. * - * @param nameAvailabilityRequest Name availability request payload. + * @param nameAvailabilityRequest The 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. 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 index 5af5b28920d7..945aea155f96 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.models; diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/package-info.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/package-info.java index d61bdc8f4f56..e6b17088fc0b 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/package-info.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** * Package containing the data models for ConfidentialLedgerManagementClient. - * Microsoft Azure Confidential Compute Ledger Control Plane REST API version 2020-12-01-preview. + * Microsoft Azure Confidential Compute Ledger Managed CCF Control Plane REST API version 2025-06-10-preview. */ package com.azure.resourcemanager.confidentialledger.models; diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/package-info.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/package-info.java index 53576b31c29c..4441c8f85691 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/package-info.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** * Package containing the classes for ConfidentialLedgerManagementClient. - * Microsoft Azure Confidential Compute Ledger Control Plane REST API version 2020-12-01-preview. + * Microsoft Azure Confidential Compute Ledger Managed CCF Control Plane REST API version 2025-06-10-preview. */ package com.azure.resourcemanager.confidentialledger; diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/module-info.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/module-info.java index f4385cb29ad4..ddeade1de094 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/module-info.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/module-info.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. module com.azure.resourcemanager.confidentialledger { requires transitive com.azure.core.management; @@ -12,4 +12,5 @@ opens com.azure.resourcemanager.confidentialledger.fluent.models to com.azure.core; opens com.azure.resourcemanager.confidentialledger.models to com.azure.core; + opens com.azure.resourcemanager.confidentialledger.implementation.models to com.azure.core; } diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/resources/META-INF/azure-resourcemanager-confidentialledger_metadata.json b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/resources/META-INF/azure-resourcemanager-confidentialledger_metadata.json new file mode 100644 index 000000000000..6c1342a80148 --- /dev/null +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/resources/META-INF/azure-resourcemanager-confidentialledger_metadata.json @@ -0,0 +1 @@ +{"flavor":"azure","apiVersions":{"Microsoft.ConfidentialLedger":"2025-06-10-preview"},"crossLanguageDefinitions":{"com.azure.resourcemanager.confidentialledger.fluent.ConfidentialLedgerManagementClient":"Microsoft.ConfidentialLedger","com.azure.resourcemanager.confidentialledger.fluent.LedgersClient":"Microsoft.ConfidentialLedger","com.azure.resourcemanager.confidentialledger.fluent.LedgersClient.backup":"Microsoft.ConfidentialLedger.ConfidentialLedgers.backup","com.azure.resourcemanager.confidentialledger.fluent.LedgersClient.beginBackup":"Microsoft.ConfidentialLedger.ConfidentialLedgers.backup","com.azure.resourcemanager.confidentialledger.fluent.LedgersClient.beginCreate":"Microsoft.ConfidentialLedger.ConfidentialLedgers.create","com.azure.resourcemanager.confidentialledger.fluent.LedgersClient.beginDelete":"Microsoft.ConfidentialLedger.ConfidentialLedgers.delete","com.azure.resourcemanager.confidentialledger.fluent.LedgersClient.beginRestore":"Microsoft.ConfidentialLedger.ConfidentialLedgers.restore","com.azure.resourcemanager.confidentialledger.fluent.LedgersClient.beginUpdate":"Microsoft.ConfidentialLedger.ConfidentialLedgers.update","com.azure.resourcemanager.confidentialledger.fluent.LedgersClient.create":"Microsoft.ConfidentialLedger.ConfidentialLedgers.create","com.azure.resourcemanager.confidentialledger.fluent.LedgersClient.delete":"Microsoft.ConfidentialLedger.ConfidentialLedgers.delete","com.azure.resourcemanager.confidentialledger.fluent.LedgersClient.getByResourceGroup":"Microsoft.ConfidentialLedger.ConfidentialLedgers.get","com.azure.resourcemanager.confidentialledger.fluent.LedgersClient.getByResourceGroupWithResponse":"Microsoft.ConfidentialLedger.ConfidentialLedgers.get","com.azure.resourcemanager.confidentialledger.fluent.LedgersClient.list":"Microsoft.ConfidentialLedger.ConfidentialLedgers.listBySubscription","com.azure.resourcemanager.confidentialledger.fluent.LedgersClient.listByResourceGroup":"Microsoft.ConfidentialLedger.ConfidentialLedgers.listByResourceGroup","com.azure.resourcemanager.confidentialledger.fluent.LedgersClient.restore":"Microsoft.ConfidentialLedger.ConfidentialLedgers.restore","com.azure.resourcemanager.confidentialledger.fluent.LedgersClient.update":"Microsoft.ConfidentialLedger.ConfidentialLedgers.update","com.azure.resourcemanager.confidentialledger.fluent.ManagedCcfsClient":"Microsoft.ConfidentialLedger","com.azure.resourcemanager.confidentialledger.fluent.ManagedCcfsClient.backup":"Microsoft.ConfidentialLedger.ManagedCCFs.backup","com.azure.resourcemanager.confidentialledger.fluent.ManagedCcfsClient.beginBackup":"Microsoft.ConfidentialLedger.ManagedCCFs.backup","com.azure.resourcemanager.confidentialledger.fluent.ManagedCcfsClient.beginCreate":"Microsoft.ConfidentialLedger.ManagedCCFs.create","com.azure.resourcemanager.confidentialledger.fluent.ManagedCcfsClient.beginDelete":"Microsoft.ConfidentialLedger.ManagedCCFs.delete","com.azure.resourcemanager.confidentialledger.fluent.ManagedCcfsClient.beginRestore":"Microsoft.ConfidentialLedger.ManagedCCFs.restore","com.azure.resourcemanager.confidentialledger.fluent.ManagedCcfsClient.beginUpdate":"Microsoft.ConfidentialLedger.ManagedCCFs.update","com.azure.resourcemanager.confidentialledger.fluent.ManagedCcfsClient.create":"Microsoft.ConfidentialLedger.ManagedCCFs.create","com.azure.resourcemanager.confidentialledger.fluent.ManagedCcfsClient.delete":"Microsoft.ConfidentialLedger.ManagedCCFs.delete","com.azure.resourcemanager.confidentialledger.fluent.ManagedCcfsClient.getByResourceGroup":"Microsoft.ConfidentialLedger.ManagedCCFs.get","com.azure.resourcemanager.confidentialledger.fluent.ManagedCcfsClient.getByResourceGroupWithResponse":"Microsoft.ConfidentialLedger.ManagedCCFs.get","com.azure.resourcemanager.confidentialledger.fluent.ManagedCcfsClient.list":"Microsoft.ConfidentialLedger.ManagedCCFs.listBySubscription","com.azure.resourcemanager.confidentialledger.fluent.ManagedCcfsClient.listByResourceGroup":"Microsoft.ConfidentialLedger.ManagedCCFs.listByResourceGroup","com.azure.resourcemanager.confidentialledger.fluent.ManagedCcfsClient.restore":"Microsoft.ConfidentialLedger.ManagedCCFs.restore","com.azure.resourcemanager.confidentialledger.fluent.ManagedCcfsClient.update":"Microsoft.ConfidentialLedger.ManagedCCFs.update","com.azure.resourcemanager.confidentialledger.fluent.OperationsClient":"Microsoft.ConfidentialLedger.Operations","com.azure.resourcemanager.confidentialledger.fluent.OperationsClient.list":"Azure.ResourceManager.Legacy.Operations.list","com.azure.resourcemanager.confidentialledger.fluent.ResourceProvidersClient":"Microsoft.ConfidentialLedger","com.azure.resourcemanager.confidentialledger.fluent.ResourceProvidersClient.checkNameAvailability":"Microsoft.ConfidentialLedger.checkNameAvailability","com.azure.resourcemanager.confidentialledger.fluent.ResourceProvidersClient.checkNameAvailabilityWithResponse":"Microsoft.ConfidentialLedger.checkNameAvailability","com.azure.resourcemanager.confidentialledger.fluent.models.CheckNameAvailabilityResponseInner":"Azure.ResourceManager.CommonTypes.CheckNameAvailabilityResponse","com.azure.resourcemanager.confidentialledger.fluent.models.ConfidentialLedgerBackupResponseInner":"Microsoft.ConfidentialLedger.ConfidentialLedgerBackupResponse","com.azure.resourcemanager.confidentialledger.fluent.models.ConfidentialLedgerInner":"Microsoft.ConfidentialLedger.ConfidentialLedger","com.azure.resourcemanager.confidentialledger.fluent.models.ConfidentialLedgerRestoreResponseInner":"Microsoft.ConfidentialLedger.ConfidentialLedgerRestoreResponse","com.azure.resourcemanager.confidentialledger.fluent.models.ManagedCcfBackupResponseInner":"Microsoft.ConfidentialLedger.ManagedCCFBackupResponse","com.azure.resourcemanager.confidentialledger.fluent.models.ManagedCcfInner":"Microsoft.ConfidentialLedger.ManagedCCF","com.azure.resourcemanager.confidentialledger.fluent.models.ManagedCcfRestoreResponseInner":"Microsoft.ConfidentialLedger.ManagedCCFRestoreResponse","com.azure.resourcemanager.confidentialledger.fluent.models.ResourceProviderOperationDefinitionInner":"Microsoft.ConfidentialLedger.ResourceProviderOperationDefinition","com.azure.resourcemanager.confidentialledger.implementation.ConfidentialLedgerManagementClientBuilder":"Microsoft.ConfidentialLedger","com.azure.resourcemanager.confidentialledger.implementation.models.ConfidentialLedgerList":"Microsoft.ConfidentialLedger.ConfidentialLedgerList","com.azure.resourcemanager.confidentialledger.implementation.models.ManagedCCFList":"Microsoft.ConfidentialLedger.ManagedCCFList","com.azure.resourcemanager.confidentialledger.implementation.models.ResourceProviderOperationList":"Microsoft.ConfidentialLedger.ResourceProviderOperationList","com.azure.resourcemanager.confidentialledger.models.AadBasedSecurityPrincipal":"Microsoft.ConfidentialLedger.AADBasedSecurityPrincipal","com.azure.resourcemanager.confidentialledger.models.ApplicationType":"Microsoft.ConfidentialLedger.ApplicationType","com.azure.resourcemanager.confidentialledger.models.CertBasedSecurityPrincipal":"Microsoft.ConfidentialLedger.CertBasedSecurityPrincipal","com.azure.resourcemanager.confidentialledger.models.CheckNameAvailabilityReason":"Azure.ResourceManager.CommonTypes.CheckNameAvailabilityReason","com.azure.resourcemanager.confidentialledger.models.CheckNameAvailabilityRequest":"Azure.ResourceManager.CommonTypes.CheckNameAvailabilityRequest","com.azure.resourcemanager.confidentialledger.models.ConfidentialLedgerBackup":"Microsoft.ConfidentialLedger.ConfidentialLedgerBackup","com.azure.resourcemanager.confidentialledger.models.ConfidentialLedgerRestore":"Microsoft.ConfidentialLedger.ConfidentialLedgerRestore","com.azure.resourcemanager.confidentialledger.models.DeploymentType":"Microsoft.ConfidentialLedger.DeploymentType","com.azure.resourcemanager.confidentialledger.models.EnclavePlatform":"Microsoft.ConfidentialLedger.EnclavePlatform","com.azure.resourcemanager.confidentialledger.models.LanguageRuntime":"Microsoft.ConfidentialLedger.LanguageRuntime","com.azure.resourcemanager.confidentialledger.models.LedgerProperties":"Microsoft.ConfidentialLedger.LedgerProperties","com.azure.resourcemanager.confidentialledger.models.LedgerRoleName":"Microsoft.ConfidentialLedger.LedgerRoleName","com.azure.resourcemanager.confidentialledger.models.LedgerSku":"Microsoft.ConfidentialLedger.LedgerSku","com.azure.resourcemanager.confidentialledger.models.LedgerType":"Microsoft.ConfidentialLedger.LedgerType","com.azure.resourcemanager.confidentialledger.models.ManagedCcfBackup":"Microsoft.ConfidentialLedger.ManagedCCFBackup","com.azure.resourcemanager.confidentialledger.models.ManagedCcfProperties":"Microsoft.ConfidentialLedger.ManagedCCFProperties","com.azure.resourcemanager.confidentialledger.models.ManagedCcfRestore":"Microsoft.ConfidentialLedger.ManagedCCFRestore","com.azure.resourcemanager.confidentialledger.models.MemberIdentityCertificate":"Microsoft.ConfidentialLedger.MemberIdentityCertificate","com.azure.resourcemanager.confidentialledger.models.ProvisioningState":"Microsoft.ConfidentialLedger.ProvisioningState","com.azure.resourcemanager.confidentialledger.models.ResourceProviderOperationDisplay":"Microsoft.ConfidentialLedger.ResourceProviderOperationDisplay","com.azure.resourcemanager.confidentialledger.models.RunningState":"Microsoft.ConfidentialLedger.RunningState"},"generatedFiles":["src/main/java/com/azure/resourcemanager/confidentialledger/ConfidentialLedgerManager.java","src/main/java/com/azure/resourcemanager/confidentialledger/fluent/ConfidentialLedgerManagementClient.java","src/main/java/com/azure/resourcemanager/confidentialledger/fluent/LedgersClient.java","src/main/java/com/azure/resourcemanager/confidentialledger/fluent/ManagedCcfsClient.java","src/main/java/com/azure/resourcemanager/confidentialledger/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/confidentialledger/fluent/ResourceProvidersClient.java","src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/CheckNameAvailabilityResponseInner.java","src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/ConfidentialLedgerBackupResponseInner.java","src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/ConfidentialLedgerInner.java","src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/ConfidentialLedgerRestoreResponseInner.java","src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/ManagedCcfBackupResponseInner.java","src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/ManagedCcfInner.java","src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/ManagedCcfRestoreResponseInner.java","src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/ResourceProviderOperationDefinitionInner.java","src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/confidentialledger/fluent/package-info.java","src/main/java/com/azure/resourcemanager/confidentialledger/implementation/CheckNameAvailabilityResponseImpl.java","src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ConfidentialLedgerBackupResponseImpl.java","src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ConfidentialLedgerImpl.java","src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ConfidentialLedgerManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ConfidentialLedgerManagementClientImpl.java","src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ConfidentialLedgerRestoreResponseImpl.java","src/main/java/com/azure/resourcemanager/confidentialledger/implementation/LedgersClientImpl.java","src/main/java/com/azure/resourcemanager/confidentialledger/implementation/LedgersImpl.java","src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ManagedCcfBackupResponseImpl.java","src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ManagedCcfImpl.java","src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ManagedCcfRestoreResponseImpl.java","src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ManagedCcfsClientImpl.java","src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ManagedCcfsImpl.java","src/main/java/com/azure/resourcemanager/confidentialledger/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/confidentialledger/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ResourceProviderOperationDefinitionImpl.java","src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ResourceProvidersClientImpl.java","src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ResourceProvidersImpl.java","src/main/java/com/azure/resourcemanager/confidentialledger/implementation/models/ConfidentialLedgerList.java","src/main/java/com/azure/resourcemanager/confidentialledger/implementation/models/ManagedCCFList.java","src/main/java/com/azure/resourcemanager/confidentialledger/implementation/models/ResourceProviderOperationList.java","src/main/java/com/azure/resourcemanager/confidentialledger/implementation/package-info.java","src/main/java/com/azure/resourcemanager/confidentialledger/models/AadBasedSecurityPrincipal.java","src/main/java/com/azure/resourcemanager/confidentialledger/models/ApplicationType.java","src/main/java/com/azure/resourcemanager/confidentialledger/models/CertBasedSecurityPrincipal.java","src/main/java/com/azure/resourcemanager/confidentialledger/models/CheckNameAvailabilityReason.java","src/main/java/com/azure/resourcemanager/confidentialledger/models/CheckNameAvailabilityRequest.java","src/main/java/com/azure/resourcemanager/confidentialledger/models/CheckNameAvailabilityResponse.java","src/main/java/com/azure/resourcemanager/confidentialledger/models/ConfidentialLedger.java","src/main/java/com/azure/resourcemanager/confidentialledger/models/ConfidentialLedgerBackup.java","src/main/java/com/azure/resourcemanager/confidentialledger/models/ConfidentialLedgerBackupResponse.java","src/main/java/com/azure/resourcemanager/confidentialledger/models/ConfidentialLedgerRestore.java","src/main/java/com/azure/resourcemanager/confidentialledger/models/ConfidentialLedgerRestoreResponse.java","src/main/java/com/azure/resourcemanager/confidentialledger/models/DeploymentType.java","src/main/java/com/azure/resourcemanager/confidentialledger/models/EnclavePlatform.java","src/main/java/com/azure/resourcemanager/confidentialledger/models/LanguageRuntime.java","src/main/java/com/azure/resourcemanager/confidentialledger/models/LedgerProperties.java","src/main/java/com/azure/resourcemanager/confidentialledger/models/LedgerRoleName.java","src/main/java/com/azure/resourcemanager/confidentialledger/models/LedgerSku.java","src/main/java/com/azure/resourcemanager/confidentialledger/models/LedgerType.java","src/main/java/com/azure/resourcemanager/confidentialledger/models/Ledgers.java","src/main/java/com/azure/resourcemanager/confidentialledger/models/ManagedCcf.java","src/main/java/com/azure/resourcemanager/confidentialledger/models/ManagedCcfBackup.java","src/main/java/com/azure/resourcemanager/confidentialledger/models/ManagedCcfBackupResponse.java","src/main/java/com/azure/resourcemanager/confidentialledger/models/ManagedCcfProperties.java","src/main/java/com/azure/resourcemanager/confidentialledger/models/ManagedCcfRestore.java","src/main/java/com/azure/resourcemanager/confidentialledger/models/ManagedCcfRestoreResponse.java","src/main/java/com/azure/resourcemanager/confidentialledger/models/ManagedCcfs.java","src/main/java/com/azure/resourcemanager/confidentialledger/models/MemberIdentityCertificate.java","src/main/java/com/azure/resourcemanager/confidentialledger/models/Operations.java","src/main/java/com/azure/resourcemanager/confidentialledger/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/confidentialledger/models/ResourceProviderOperationDefinition.java","src/main/java/com/azure/resourcemanager/confidentialledger/models/ResourceProviderOperationDisplay.java","src/main/java/com/azure/resourcemanager/confidentialledger/models/ResourceProviders.java","src/main/java/com/azure/resourcemanager/confidentialledger/models/RunningState.java","src/main/java/com/azure/resourcemanager/confidentialledger/models/package-info.java","src/main/java/com/azure/resourcemanager/confidentialledger/package-info.java","src/main/java/module-info.java"]} \ 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 index fa56e6189007..069b993d7924 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.generated; @@ -11,9 +11,7 @@ */ public final class LedgerBackupSamples { /* - * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2024-09-19-preview/ - * examples/ConfidentialLedger_Backup.json + * x-ms-original-file: 2025-06-10-preview/ConfidentialLedger_Backup.json */ /** * Sample code: ConfidentialLedgerBackup. 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 d0781130d29e..b14102d7c3a5 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.generated; @@ -19,9 +19,7 @@ */ public final class LedgerCreateSamples { /* - * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2024-09-19-preview/ - * examples/ConfidentialLedger_Create.json + * x-ms-original-file: 2025-06-10-preview/ConfidentialLedger_Create.json */ /** * Sample code: ConfidentialLedgerCreate. 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 916b6c78d82b..b2d1da66b11c 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.generated; @@ -9,9 +9,7 @@ */ public final class LedgerDeleteSamples { /* - * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2024-09-19-preview/ - * examples/ConfidentialLedger_Delete.json + * x-ms-original-file: 2025-06-10-preview/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 212fe0a55b8b..abf2ff1e24bc 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.generated; @@ -9,9 +9,7 @@ */ public final class LedgerGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2024-09-19-preview/ - * examples/ConfidentialLedger_Get.json + * x-ms-original-file: 2025-06-10-preview/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 7bcb1790375f..11de584e59c5 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.generated; @@ -9,9 +9,7 @@ */ public final class LedgerListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2024-09-19-preview/ - * examples/ConfidentialLedger_List.json + * x-ms-original-file: 2025-06-10-preview/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 f808390b4450..3d855e6914e5 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.generated; @@ -9,9 +9,7 @@ */ public final class LedgerListSamples { /* - * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2024-09-19-preview/ - * examples/ConfidentialLedger_ListBySub.json + * x-ms-original-file: 2025-06-10-preview/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 index 5b719d310a00..2da3b33e0ee2 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.generated; @@ -11,9 +11,7 @@ */ public final class LedgerRestoreSamples { /* - * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2024-09-19-preview/ - * examples/ConfidentialLedger_Restore.json + * x-ms-original-file: 2025-06-10-preview/ConfidentialLedger_Restore.json */ /** * Sample code: ConfidentialLedgerRestore. 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 c4a11881176d..8b2b6d8bfdb0 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.generated; @@ -19,9 +19,7 @@ */ public final class LedgerUpdateSamples { /* - * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2024-09-19-preview/ - * examples/ConfidentialLedger_Update.json + * x-ms-original-file: 2025-06-10-preview/ConfidentialLedger_Update.json */ /** * Sample code: ConfidentialLedgerUpdate. @@ -43,7 +41,9 @@ public final class LedgerUpdateSamples { .withLedgerRoleName(LedgerRoleName.ADMINISTRATOR))) .withCertBasedSecurityPrincipals(Arrays.asList(new CertBasedSecurityPrincipal().withCert( "-----BEGIN CERTIFICATE-----\nMIIDUjCCAjqgAwIBAgIQJ2IrDBawSkiAbkBYmiAopDANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDExtTeW50aGV0aWNzIExlZGdlciBVc2VyIENlcnQwHhcNMjAwOTIzMjIxODQ2WhcNMjEwOTIzMjIyODQ2WjAmMSQwIgYDVQQDExtTeW50aGV0aWNzIExlZGdlciBVc2VyIENlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCX2s/Eu4q/eQ63N+Ugeg5oAciZua/YCJr41c/696szvSY7Zg1SNJlW88/nbz70+QpO55OmqlEE3QCU+T0Vl/h0Gf//n1PYcoBbTGUnYEmV+fTTHict6rFiEwrGJ62tvcpYgwapInSLyEeUzjki0zhOLJ1OfRnYd1eGnFVMpE5aVjiS8Q5dmTEUyd51EIprGE8RYAW9aeWSwTH7gjHUsRlJnHKcdhaK/v5QKJnNu5bzPFUcpC0ZBcizoMPAtroLAD4B68Jl0z3op18MgZe6lRrVoWuxfqnk5GojuB/Vu8ohAZKoFhQ6NB6r+LL2AUs+Zr7Bt26IkEdR178n9JMEA4gHAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBS/a7PU9iOfOKEyZCp11Oen5VSuuDAdBgNVHQ4EFgQUv2uz1PYjnzihMmQqddTnp+VUrrgwDQYJKoZIhvcNAQELBQADggEBAF5q2fDwnse8egXhfaJCqqM969E9gSacqFmASpoDJPRPEX7gqoO7v1ww7nqRtRDoRiBvo/yNk7jlSAkRN3nRRnZLZZ3MYQdmCr4FGyIqRg4Y94+nja+Du9pDD761rxRktMVPSOaAVM/E5DQvscDlPvlPYe9mkcrLCE4DXYpiMmLT8Tm55LJJq5m07dVDgzAIR1L/hmEcbK0pnLgzciMtMLxGO2udnyyW/UW9WxnjvrrD2JluTHH9mVbb+XQP1oFtlRBfH7aui1ZgWfKvxrdP4zdK9QoWSUvRux3TLsGmHRBjBMtqYDY3y5mB+aNjLelvWpeVb0m2aOSVXynrLwNCAVA=\n-----END CERTIFICATE-----") - .withLedgerRoleName(LedgerRoleName.READER)))) + .withLedgerRoleName(LedgerRoleName.READER))) + .withScittConfiguration( + "{\r\n \"configuration\": {\r\n \"policy\": {\r\n \"policyScript\": \"export function apply(phdr) { if (!phdr.issuer) {return 'Issuer not found'} else if (phdr.issuer !== 'did:x509:0:sha256:HnwZ4lezuxq/GVcl/Sk7YWW170qAD0DZBLXilXet0jg=::eku:1.3.6.1.4.1.311.10.3.13') { return 'Invalid issuer'; } return true; }\"\r\n },\r\n \"authentication\": {\r\n \"allowUnauthenticated\": false,\r\n \"jwt\": {\r\n \"requiredClaims\": {\r\n \"aud\": \"scitt\",\r\n \"iss\": \"https://authserver.com/\",\r\n \"http://unique.claim/department_id\": \"654987\"\r\n }\r\n }\r\n }\r\n }\r\n }")) .apply(); } 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 82361cbfff22..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/2024-09-19-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 746852f48e4d..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/2024-09-19-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 ec34c147b3ff..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/2024-09-19-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 52e2a5e34058..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/2024-09-19-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 460bf7c60961..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/2024-09-19-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 6285bf779d29..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/2024-09-19-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 5feb702710a6..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/2024-09-19-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 28053956d8c0..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/2024-09-19-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 06451f06a17e..28f030ed7c6c 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.generated; @@ -9,9 +9,7 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2024-09-19-preview/ - * examples/Operations_Get.json + * x-ms-original-file: 2025-06-10-preview/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 e218b0c98887..e0998cfe82c5 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.generated; @@ -11,9 +11,7 @@ */ public final class ResourceProviderCheckNameAvailabilitySamples { /* - * x-ms-original-file: - * specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2024-09-19-preview/ - * examples/CheckNameAvailability.json + * x-ms-original-file: 2025-06-10-preview/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 new file mode 100644 index 000000000000..ee071bc18b3d --- /dev/null +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/AadBasedSecurityPrincipalTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.confidentialledger.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.confidentialledger.models.AadBasedSecurityPrincipal; +import com.azure.resourcemanager.confidentialledger.models.LedgerRoleName; +import org.junit.jupiter.api.Assertions; + +public final class AadBasedSecurityPrincipalTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AadBasedSecurityPrincipal model = BinaryData + .fromString("{\"principalId\":\"hpf\",\"tenantId\":\"ypininm\",\"ledgerRoleName\":\"Administrator\"}") + .toObject(AadBasedSecurityPrincipal.class); + Assertions.assertEquals("hpf", model.principalId()); + Assertions.assertEquals("ypininm", model.tenantId()); + Assertions.assertEquals(LedgerRoleName.ADMINISTRATOR, model.ledgerRoleName()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AadBasedSecurityPrincipal model = new AadBasedSecurityPrincipal().withPrincipalId("hpf") + .withTenantId("ypininm") + .withLedgerRoleName(LedgerRoleName.ADMINISTRATOR); + model = BinaryData.fromObject(model).toObject(AadBasedSecurityPrincipal.class); + Assertions.assertEquals("hpf", model.principalId()); + Assertions.assertEquals("ypininm", 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 new file mode 100644 index 000000000000..d03325860676 --- /dev/null +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/CertBasedSecurityPrincipalTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.confidentialledger.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.confidentialledger.models.CertBasedSecurityPrincipal; +import com.azure.resourcemanager.confidentialledger.models.LedgerRoleName; +import org.junit.jupiter.api.Assertions; + +public final class CertBasedSecurityPrincipalTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CertBasedSecurityPrincipal model + = BinaryData.fromString("{\"cert\":\"ybb\",\"ledgerRoleName\":\"Contributor\"}") + .toObject(CertBasedSecurityPrincipal.class); + Assertions.assertEquals("ybb", model.cert()); + Assertions.assertEquals(LedgerRoleName.CONTRIBUTOR, model.ledgerRoleName()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CertBasedSecurityPrincipal model + = new CertBasedSecurityPrincipal().withCert("ybb").withLedgerRoleName(LedgerRoleName.CONTRIBUTOR); + model = BinaryData.fromObject(model).toObject(CertBasedSecurityPrincipal.class); + Assertions.assertEquals("ybb", model.cert()); + Assertions.assertEquals(LedgerRoleName.CONTRIBUTOR, model.ledgerRoleName()); + } +} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/CheckNameAvailabilityRequestTests.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/CheckNameAvailabilityRequestTests.java new file mode 100644 index 000000000000..e988e3597c59 --- /dev/null +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/CheckNameAvailabilityRequestTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.confidentialledger.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.confidentialledger.models.CheckNameAvailabilityRequest; +import org.junit.jupiter.api.Assertions; + +public final class CheckNameAvailabilityRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CheckNameAvailabilityRequest model + = BinaryData.fromString("{\"name\":\"mhquvgjxp\",\"type\":\"czmehmtzopbsp\"}") + .toObject(CheckNameAvailabilityRequest.class); + Assertions.assertEquals("mhquvgjxp", model.name()); + Assertions.assertEquals("czmehmtzopbsp", model.type()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CheckNameAvailabilityRequest model + = new CheckNameAvailabilityRequest().withName("mhquvgjxp").withType("czmehmtzopbsp"); + model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityRequest.class); + Assertions.assertEquals("mhquvgjxp", model.name()); + Assertions.assertEquals("czmehmtzopbsp", model.type()); + } +} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/CheckNameAvailabilityResponseInnerTests.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/CheckNameAvailabilityResponseInnerTests.java new file mode 100644 index 000000000000..3ab9ee00a739 --- /dev/null +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/CheckNameAvailabilityResponseInnerTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.confidentialledger.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.confidentialledger.fluent.models.CheckNameAvailabilityResponseInner; +import com.azure.resourcemanager.confidentialledger.models.CheckNameAvailabilityReason; +import org.junit.jupiter.api.Assertions; + +public final class CheckNameAvailabilityResponseInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CheckNameAvailabilityResponseInner model + = BinaryData.fromString("{\"nameAvailable\":false,\"reason\":\"Invalid\",\"message\":\"gsybbejhp\"}") + .toObject(CheckNameAvailabilityResponseInner.class); + Assertions.assertFalse(model.nameAvailable()); + Assertions.assertEquals(CheckNameAvailabilityReason.INVALID, model.reason()); + Assertions.assertEquals("gsybbejhp", model.message()); + } +} 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 new file mode 100644 index 000000000000..244bf7d235aa --- /dev/null +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ConfidentialLedgerBackupResponseInnerTests.java @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.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\":\"guhmuouqfpr\"}") + .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 new file mode 100644 index 000000000000..d15c61c1575a --- /dev/null +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ConfidentialLedgerBackupTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.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\":\"p\",\"uri\":\"sszdnru\"}") + .toObject(ConfidentialLedgerBackup.class); + Assertions.assertEquals("p", model.restoreRegion()); + Assertions.assertEquals("sszdnru", model.uri()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ConfidentialLedgerBackup model = new ConfidentialLedgerBackup().withRestoreRegion("p").withUri("sszdnru"); + model = BinaryData.fromObject(model).toObject(ConfidentialLedgerBackup.class); + Assertions.assertEquals("p", model.restoreRegion()); + Assertions.assertEquals("sszdnru", 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 new file mode 100644 index 000000000000..b167d5b74c4a --- /dev/null +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ConfidentialLedgerInnerTests.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.confidentialledger.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.confidentialledger.fluent.models.ConfidentialLedgerInner; +import com.azure.resourcemanager.confidentialledger.models.AadBasedSecurityPrincipal; +import com.azure.resourcemanager.confidentialledger.models.ApplicationType; +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; +import org.junit.jupiter.api.Assertions; + +public final class ConfidentialLedgerInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ConfidentialLedgerInner model = BinaryData.fromString( + "{\"properties\":{\"ledgerName\":\"deupewnwrei\",\"ledgerUri\":\"zyf\",\"identityServiceUri\":\"sarhmofc\",\"ledgerInternalNamespace\":\"smy\",\"runningState\":\"Unknown\",\"ledgerType\":\"Unknown\",\"provisioningState\":\"Unknown\",\"ledgerSku\":\"Unknown\",\"aadBasedSecurityPrincipals\":[{\"principalId\":\"k\",\"tenantId\":\"txukcdmp\",\"ledgerRoleName\":\"Administrator\"},{\"principalId\":\"y\",\"tenantId\":\"nzwuxzd\",\"ledgerRoleName\":\"Administrator\"},{\"principalId\":\"rlhm\",\"tenantId\":\"fp\",\"ledgerRoleName\":\"Contributor\"}],\"certBasedSecurityPrincipals\":[{\"cert\":\"tu\",\"ledgerRoleName\":\"Administrator\"},{\"cert\":\"yrtih\",\"ledgerRoleName\":\"Contributor\"},{\"cert\":\"jbpzvgnwzsymg\",\"ledgerRoleName\":\"Contributor\"}],\"hostLevel\":\"cyzkohdbihanuf\",\"maxBodySizeInMb\":808084535,\"subjectName\":\"jysagith\",\"nodeCount\":731883185,\"writeLBAddressPrefix\":\"bifpikxwczb\",\"workerThreads\":2005556864,\"enclavePlatform\":\"IntelSgx\",\"applicationType\":\"ConfidentialLedger\",\"scittConfiguration\":\"hiv\"},\"location\":\"n\",\"tags\":{\"vd\":\"ybrk\"},\"id\":\"mjgr\",\"name\":\"fwvuk\",\"type\":\"gaudcc\"}") + .toObject(ConfidentialLedgerInner.class); + Assertions.assertEquals("n", model.location()); + Assertions.assertEquals("ybrk", model.tags().get("vd")); + Assertions.assertEquals(RunningState.UNKNOWN, model.properties().runningState()); + Assertions.assertEquals(LedgerType.UNKNOWN, model.properties().ledgerType()); + Assertions.assertEquals(LedgerSku.UNKNOWN, model.properties().ledgerSku()); + Assertions.assertEquals("k", model.properties().aadBasedSecurityPrincipals().get(0).principalId()); + Assertions.assertEquals("txukcdmp", model.properties().aadBasedSecurityPrincipals().get(0).tenantId()); + Assertions.assertEquals(LedgerRoleName.ADMINISTRATOR, + model.properties().aadBasedSecurityPrincipals().get(0).ledgerRoleName()); + Assertions.assertEquals("tu", model.properties().certBasedSecurityPrincipals().get(0).cert()); + Assertions.assertEquals(LedgerRoleName.ADMINISTRATOR, + model.properties().certBasedSecurityPrincipals().get(0).ledgerRoleName()); + Assertions.assertEquals("cyzkohdbihanuf", model.properties().hostLevel()); + Assertions.assertEquals(808084535, model.properties().maxBodySizeInMb()); + Assertions.assertEquals("jysagith", model.properties().subjectName()); + Assertions.assertEquals(731883185, model.properties().nodeCount()); + Assertions.assertEquals("bifpikxwczb", model.properties().writeLBAddressPrefix()); + Assertions.assertEquals(2005556864, model.properties().workerThreads()); + Assertions.assertEquals(ApplicationType.CONFIDENTIAL_LEDGER, model.properties().applicationType()); + Assertions.assertEquals("hiv", model.properties().scittConfiguration()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ConfidentialLedgerInner model = new ConfidentialLedgerInner().withLocation("n") + .withTags(mapOf("vd", "ybrk")) + .withProperties(new LedgerProperties().withRunningState(RunningState.UNKNOWN) + .withLedgerType(LedgerType.UNKNOWN) + .withLedgerSku(LedgerSku.UNKNOWN) + .withAadBasedSecurityPrincipals(Arrays.asList( + new AadBasedSecurityPrincipal().withPrincipalId("k") + .withTenantId("txukcdmp") + .withLedgerRoleName(LedgerRoleName.ADMINISTRATOR), + new AadBasedSecurityPrincipal().withPrincipalId("y") + .withTenantId("nzwuxzd") + .withLedgerRoleName(LedgerRoleName.ADMINISTRATOR), + new AadBasedSecurityPrincipal().withPrincipalId("rlhm") + .withTenantId("fp") + .withLedgerRoleName(LedgerRoleName.CONTRIBUTOR))) + .withCertBasedSecurityPrincipals(Arrays.asList( + new CertBasedSecurityPrincipal().withCert("tu").withLedgerRoleName(LedgerRoleName.ADMINISTRATOR), + new CertBasedSecurityPrincipal().withCert("yrtih").withLedgerRoleName(LedgerRoleName.CONTRIBUTOR), + new CertBasedSecurityPrincipal().withCert("jbpzvgnwzsymg") + .withLedgerRoleName(LedgerRoleName.CONTRIBUTOR))) + .withHostLevel("cyzkohdbihanuf") + .withMaxBodySizeInMb(808084535) + .withSubjectName("jysagith") + .withNodeCount(731883185) + .withWriteLBAddressPrefix("bifpikxwczb") + .withWorkerThreads(2005556864) + .withApplicationType(ApplicationType.CONFIDENTIAL_LEDGER) + .withScittConfiguration("hiv")); + model = BinaryData.fromObject(model).toObject(ConfidentialLedgerInner.class); + Assertions.assertEquals("n", model.location()); + Assertions.assertEquals("ybrk", model.tags().get("vd")); + Assertions.assertEquals(RunningState.UNKNOWN, model.properties().runningState()); + Assertions.assertEquals(LedgerType.UNKNOWN, model.properties().ledgerType()); + Assertions.assertEquals(LedgerSku.UNKNOWN, model.properties().ledgerSku()); + Assertions.assertEquals("k", model.properties().aadBasedSecurityPrincipals().get(0).principalId()); + Assertions.assertEquals("txukcdmp", model.properties().aadBasedSecurityPrincipals().get(0).tenantId()); + Assertions.assertEquals(LedgerRoleName.ADMINISTRATOR, + model.properties().aadBasedSecurityPrincipals().get(0).ledgerRoleName()); + Assertions.assertEquals("tu", model.properties().certBasedSecurityPrincipals().get(0).cert()); + Assertions.assertEquals(LedgerRoleName.ADMINISTRATOR, + model.properties().certBasedSecurityPrincipals().get(0).ledgerRoleName()); + Assertions.assertEquals("cyzkohdbihanuf", model.properties().hostLevel()); + Assertions.assertEquals(808084535, model.properties().maxBodySizeInMb()); + Assertions.assertEquals("jysagith", model.properties().subjectName()); + Assertions.assertEquals(731883185, model.properties().nodeCount()); + Assertions.assertEquals("bifpikxwczb", model.properties().writeLBAddressPrefix()); + Assertions.assertEquals(2005556864, model.properties().workerThreads()); + Assertions.assertEquals(ApplicationType.CONFIDENTIAL_LEDGER, model.properties().applicationType()); + Assertions.assertEquals("hiv", model.properties().scittConfiguration()); + } + + // 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/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 new file mode 100644 index 000000000000..29a8daaba46d --- /dev/null +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ConfidentialLedgerListTests.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.confidentialledger.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.confidentialledger.implementation.models.ConfidentialLedgerList; +import com.azure.resourcemanager.confidentialledger.models.ApplicationType; +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 org.junit.jupiter.api.Assertions; + +public final class ConfidentialLedgerListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ConfidentialLedgerList model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"ledgerName\":\"ooginuvamih\",\"ledgerUri\":\"gnarxzxtheo\",\"identityServiceUri\":\"si\",\"ledgerInternalNamespace\":\"evcciqihnhun\",\"runningState\":\"Resuming\",\"ledgerType\":\"Unknown\",\"provisioningState\":\"Deleting\",\"ledgerSku\":\"Basic\",\"aadBasedSecurityPrincipals\":[{\"principalId\":\"ispe\",\"tenantId\":\"tzfkufubl\",\"ledgerRoleName\":\"Administrator\"},{\"principalId\":\"qeof\",\"tenantId\":\"e\",\"ledgerRoleName\":\"Administrator\"},{\"principalId\":\"jbasvmsmjqulngs\",\"tenantId\":\"nbybkzgcwrwcl\",\"ledgerRoleName\":\"Administrator\"},{\"principalId\":\"ljdousk\",\"tenantId\":\"vkocrcjdkwtn\",\"ledgerRoleName\":\"Reader\"}],\"certBasedSecurityPrincipals\":[{\"cert\":\"iksqr\",\"ledgerRoleName\":\"Reader\"},{\"cert\":\"ainqpjwnzlljfm\",\"ledgerRoleName\":\"Reader\"},{\"cert\":\"bvmgxsabkyqduuji\",\"ledgerRoleName\":\"Contributor\"},{\"cert\":\"zdzevndh\",\"ledgerRoleName\":\"Reader\"}],\"hostLevel\":\"d\",\"maxBodySizeInMb\":176871010,\"subjectName\":\"sbdkvwr\",\"nodeCount\":1914162243,\"writeLBAddressPrefix\":\"usnhutje\",\"workerThreads\":1438650135,\"enclavePlatform\":\"AmdSevSnp\",\"applicationType\":\"CodeTransparency\",\"scittConfiguration\":\"gjzzdatqxhocdg\"},\"location\":\"blgphuticn\",\"tags\":{\"okftyxolniwpwcuk\":\"aozwyiftyhxhu\"},\"id\":\"fkgiawxk\",\"name\":\"ryplwckbasyypn\",\"type\":\"dhsgcba\"},{\"properties\":{\"ledgerName\":\"ejk\",\"ledgerUri\":\"ynqgoulzndlikwyq\",\"identityServiceUri\":\"fgibmadgakeq\",\"ledgerInternalNamespace\":\"xybz\",\"runningState\":\"Active\",\"ledgerType\":\"Private\",\"provisioningState\":\"Updating\",\"ledgerSku\":\"Basic\",\"aadBasedSecurityPrincipals\":[{\"principalId\":\"ouf\",\"tenantId\":\"mnkzsmod\",\"ledgerRoleName\":\"Administrator\"}],\"certBasedSecurityPrincipals\":[{\"cert\":\"pbkwtmu\",\"ledgerRoleName\":\"Administrator\"},{\"cert\":\"ktapspwgcuertu\",\"ledgerRoleName\":\"Administrator\"}],\"hostLevel\":\"svqwhbmdgbbjfd\",\"maxBodySizeInMb\":298107669,\"subjectName\":\"mbe\",\"nodeCount\":1777353299,\"writeLBAddressPrefix\":\"htqqrolfp\",\"workerThreads\":68812306,\"enclavePlatform\":\"IntelSgx\",\"applicationType\":\"ConfidentialLedger\",\"scittConfiguration\":\"uxig\"},\"location\":\"jgzjaoyfhrtx\",\"tags\":{\"l\":\"erkujys\"},\"id\":\"juvf\",\"name\":\"awrlyx\",\"type\":\"jkcpr\"}],\"nextLink\":\"wbxgjvt\"}") + .toObject(ConfidentialLedgerList.class); + Assertions.assertEquals("blgphuticn", model.value().get(0).location()); + Assertions.assertEquals("aozwyiftyhxhu", model.value().get(0).tags().get("okftyxolniwpwcuk")); + Assertions.assertEquals(RunningState.RESUMING, model.value().get(0).properties().runningState()); + Assertions.assertEquals(LedgerType.UNKNOWN, model.value().get(0).properties().ledgerType()); + Assertions.assertEquals(LedgerSku.BASIC, model.value().get(0).properties().ledgerSku()); + Assertions.assertEquals("ispe", + model.value().get(0).properties().aadBasedSecurityPrincipals().get(0).principalId()); + Assertions.assertEquals("tzfkufubl", + model.value().get(0).properties().aadBasedSecurityPrincipals().get(0).tenantId()); + Assertions.assertEquals(LedgerRoleName.ADMINISTRATOR, + model.value().get(0).properties().aadBasedSecurityPrincipals().get(0).ledgerRoleName()); + Assertions.assertEquals("iksqr", model.value().get(0).properties().certBasedSecurityPrincipals().get(0).cert()); + Assertions.assertEquals(LedgerRoleName.READER, + model.value().get(0).properties().certBasedSecurityPrincipals().get(0).ledgerRoleName()); + Assertions.assertEquals("d", model.value().get(0).properties().hostLevel()); + Assertions.assertEquals(176871010, model.value().get(0).properties().maxBodySizeInMb()); + Assertions.assertEquals("sbdkvwr", model.value().get(0).properties().subjectName()); + Assertions.assertEquals(1914162243, model.value().get(0).properties().nodeCount()); + Assertions.assertEquals("usnhutje", model.value().get(0).properties().writeLBAddressPrefix()); + Assertions.assertEquals(1438650135, model.value().get(0).properties().workerThreads()); + Assertions.assertEquals(ApplicationType.CODE_TRANSPARENCY, model.value().get(0).properties().applicationType()); + Assertions.assertEquals("gjzzdatqxhocdg", model.value().get(0).properties().scittConfiguration()); + Assertions.assertEquals("wbxgjvt", model.nextLink()); + } +} 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 new file mode 100644 index 000000000000..7818b55ae030 --- /dev/null +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ConfidentialLedgerRestoreResponseInnerTests.java @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.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\":\"zuhtymwisdkfthwx\"}") + .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 new file mode 100644 index 000000000000..6fb0774a7b65 --- /dev/null +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ConfidentialLedgerRestoreTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.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\":\"zw\",\"restoreRegion\":\"nguitnwuizgazxu\",\"uri\":\"izuckyfihrfidfvz\"}") + .toObject(ConfidentialLedgerRestore.class); + Assertions.assertEquals("zw", model.fileShareName()); + Assertions.assertEquals("nguitnwuizgazxu", model.restoreRegion()); + Assertions.assertEquals("izuckyfihrfidfvz", model.uri()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ConfidentialLedgerRestore model = new ConfidentialLedgerRestore().withFileShareName("zw") + .withRestoreRegion("nguitnwuizgazxu") + .withUri("izuckyfihrfidfvz"); + model = BinaryData.fromObject(model).toObject(ConfidentialLedgerRestore.class); + Assertions.assertEquals("zw", model.fileShareName()); + Assertions.assertEquals("nguitnwuizgazxu", model.restoreRegion()); + Assertions.assertEquals("izuckyfihrfidfvz", 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 new file mode 100644 index 000000000000..15fde70f82a2 --- /dev/null +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/DeploymentTypeTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.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\":\"cjxvsnbyxqab\"}") + .toObject(DeploymentType.class); + Assertions.assertEquals(LanguageRuntime.JS, model.languageRuntime()); + Assertions.assertEquals("cjxvsnbyxqab", model.appSourceUri()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DeploymentType model + = new DeploymentType().withLanguageRuntime(LanguageRuntime.JS).withAppSourceUri("cjxvsnbyxqab"); + model = BinaryData.fromObject(model).toObject(DeploymentType.class); + Assertions.assertEquals(LanguageRuntime.JS, model.languageRuntime()); + Assertions.assertEquals("cjxvsnbyxqab", 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 new file mode 100644 index 000000000000..48e6ffe1e192 --- /dev/null +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/LedgerPropertiesTests.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.confidentialledger.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.confidentialledger.models.AadBasedSecurityPrincipal; +import com.azure.resourcemanager.confidentialledger.models.ApplicationType; +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; + +public final class LedgerPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LedgerProperties model = BinaryData.fromString( + "{\"ledgerName\":\"h\",\"ledgerUri\":\"cnyejhkryhtnapcz\",\"identityServiceUri\":\"okjye\",\"ledgerInternalNamespace\":\"kvnipjoxz\",\"runningState\":\"Active\",\"ledgerType\":\"Unknown\",\"provisioningState\":\"Failed\",\"ledgerSku\":\"Standard\",\"aadBasedSecurityPrincipals\":[{\"principalId\":\"ailzydehojwyahu\",\"tenantId\":\"npmqnjaqwixjspro\",\"ledgerRoleName\":\"Contributor\"},{\"principalId\":\"utegjvwmfdats\",\"tenantId\":\"dvpjhulsuuvmk\",\"ledgerRoleName\":\"Contributor\"},{\"principalId\":\"rwfndiod\",\"tenantId\":\"slwejdpvw\",\"ledgerRoleName\":\"Administrator\"},{\"principalId\":\"psoacctazakljl\",\"tenantId\":\"bcryffdfd\",\"ledgerRoleName\":\"Contributor\"}],\"certBasedSecurityPrincipals\":[{\"cert\":\"paojakhmsbzjh\",\"ledgerRoleName\":\"Reader\"}],\"hostLevel\":\"vdphlxaolthqtr\",\"maxBodySizeInMb\":607055364,\"subjectName\":\"pfzfsinzgvfc\",\"nodeCount\":751944111,\"writeLBAddressPrefix\":\"oxxjtfelluwf\",\"workerThreads\":1312385221,\"enclavePlatform\":\"IntelSgx\",\"applicationType\":\"ConfidentialLedger\",\"scittConfiguration\":\"fpjkjlxofp\"}") + .toObject(LedgerProperties.class); + Assertions.assertEquals(RunningState.ACTIVE, model.runningState()); + Assertions.assertEquals(LedgerType.UNKNOWN, model.ledgerType()); + Assertions.assertEquals(LedgerSku.STANDARD, model.ledgerSku()); + Assertions.assertEquals("ailzydehojwyahu", model.aadBasedSecurityPrincipals().get(0).principalId()); + Assertions.assertEquals("npmqnjaqwixjspro", model.aadBasedSecurityPrincipals().get(0).tenantId()); + Assertions.assertEquals(LedgerRoleName.CONTRIBUTOR, model.aadBasedSecurityPrincipals().get(0).ledgerRoleName()); + Assertions.assertEquals("paojakhmsbzjh", model.certBasedSecurityPrincipals().get(0).cert()); + Assertions.assertEquals(LedgerRoleName.READER, model.certBasedSecurityPrincipals().get(0).ledgerRoleName()); + Assertions.assertEquals("vdphlxaolthqtr", model.hostLevel()); + Assertions.assertEquals(607055364, model.maxBodySizeInMb()); + Assertions.assertEquals("pfzfsinzgvfc", model.subjectName()); + Assertions.assertEquals(751944111, model.nodeCount()); + Assertions.assertEquals("oxxjtfelluwf", model.writeLBAddressPrefix()); + Assertions.assertEquals(1312385221, model.workerThreads()); + Assertions.assertEquals(ApplicationType.CONFIDENTIAL_LEDGER, model.applicationType()); + Assertions.assertEquals("fpjkjlxofp", model.scittConfiguration()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + LedgerProperties model = new LedgerProperties().withRunningState(RunningState.ACTIVE) + .withLedgerType(LedgerType.UNKNOWN) + .withLedgerSku(LedgerSku.STANDARD) + .withAadBasedSecurityPrincipals(Arrays.asList( + new AadBasedSecurityPrincipal().withPrincipalId("ailzydehojwyahu") + .withTenantId("npmqnjaqwixjspro") + .withLedgerRoleName(LedgerRoleName.CONTRIBUTOR), + new AadBasedSecurityPrincipal().withPrincipalId("utegjvwmfdats") + .withTenantId("dvpjhulsuuvmk") + .withLedgerRoleName(LedgerRoleName.CONTRIBUTOR), + new AadBasedSecurityPrincipal().withPrincipalId("rwfndiod") + .withTenantId("slwejdpvw") + .withLedgerRoleName(LedgerRoleName.ADMINISTRATOR), + new AadBasedSecurityPrincipal().withPrincipalId("psoacctazakljl") + .withTenantId("bcryffdfd") + .withLedgerRoleName(LedgerRoleName.CONTRIBUTOR))) + .withCertBasedSecurityPrincipals(Arrays.asList( + new CertBasedSecurityPrincipal().withCert("paojakhmsbzjh").withLedgerRoleName(LedgerRoleName.READER))) + .withHostLevel("vdphlxaolthqtr") + .withMaxBodySizeInMb(607055364) + .withSubjectName("pfzfsinzgvfc") + .withNodeCount(751944111) + .withWriteLBAddressPrefix("oxxjtfelluwf") + .withWorkerThreads(1312385221) + .withApplicationType(ApplicationType.CONFIDENTIAL_LEDGER) + .withScittConfiguration("fpjkjlxofp"); + model = BinaryData.fromObject(model).toObject(LedgerProperties.class); + Assertions.assertEquals(RunningState.ACTIVE, model.runningState()); + Assertions.assertEquals(LedgerType.UNKNOWN, model.ledgerType()); + Assertions.assertEquals(LedgerSku.STANDARD, model.ledgerSku()); + Assertions.assertEquals("ailzydehojwyahu", model.aadBasedSecurityPrincipals().get(0).principalId()); + Assertions.assertEquals("npmqnjaqwixjspro", model.aadBasedSecurityPrincipals().get(0).tenantId()); + Assertions.assertEquals(LedgerRoleName.CONTRIBUTOR, model.aadBasedSecurityPrincipals().get(0).ledgerRoleName()); + Assertions.assertEquals("paojakhmsbzjh", model.certBasedSecurityPrincipals().get(0).cert()); + Assertions.assertEquals(LedgerRoleName.READER, model.certBasedSecurityPrincipals().get(0).ledgerRoleName()); + Assertions.assertEquals("vdphlxaolthqtr", model.hostLevel()); + Assertions.assertEquals(607055364, model.maxBodySizeInMb()); + Assertions.assertEquals("pfzfsinzgvfc", model.subjectName()); + Assertions.assertEquals(751944111, model.nodeCount()); + Assertions.assertEquals("oxxjtfelluwf", model.writeLBAddressPrefix()); + Assertions.assertEquals(1312385221, model.workerThreads()); + Assertions.assertEquals(ApplicationType.CONFIDENTIAL_LEDGER, model.applicationType()); + Assertions.assertEquals("fpjkjlxofp", model.scittConfiguration()); + } +} 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 index 58eada706d18..993cd2e72743 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.generated; @@ -20,7 +20,7 @@ public final class LedgersBackupMockTests { @Test public void testBackup() throws Exception { - String responseStr = "{\"message\":\"kcxywnyt\"}"; + String responseStr = "{\"message\":\"qjsdpydnfyhxdeo\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,8 +30,8 @@ public void testBackup() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ConfidentialLedgerBackupResponse response = manager.ledgers() - .backup("rcvpnazzmhjrunmp", "ttdbhrbnl", - new ConfidentialLedgerBackup().withRestoreRegion("kx").withUri("yskpbhen"), + .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 6bc3dc03ecfe..e10b318f2968 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.generated; @@ -14,7 +14,6 @@ import com.azure.resourcemanager.confidentialledger.models.ApplicationType; import com.azure.resourcemanager.confidentialledger.models.CertBasedSecurityPrincipal; import com.azure.resourcemanager.confidentialledger.models.ConfidentialLedger; -import com.azure.resourcemanager.confidentialledger.models.EnclavePlatform; import com.azure.resourcemanager.confidentialledger.models.LedgerProperties; import com.azure.resourcemanager.confidentialledger.models.LedgerRoleName; import com.azure.resourcemanager.confidentialledger.models.LedgerSku; @@ -33,7 +32,7 @@ public final class LedgersCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"ledgerName\":\"htldwk\",\"ledgerUri\":\"xuutkncwscwsv\",\"identityServiceUri\":\"otogtwrupqs\",\"ledgerInternalNamespace\":\"nmic\",\"runningState\":\"Pausing\",\"ledgerType\":\"Private\",\"provisioningState\":\"Succeeded\",\"ledgerSku\":\"Basic\",\"aadBasedSecurityPrincipals\":[{\"principalId\":\"notyfjfcnjbkcn\",\"tenantId\":\"hbttkphyw\",\"ledgerRoleName\":\"Administrator\"},{\"principalId\":\"t\",\"tenantId\":\"nermcl\",\"ledgerRoleName\":\"Contributor\"},{\"principalId\":\"hoxus\",\"tenantId\":\"pabgyeps\",\"ledgerRoleName\":\"Administrator\"},{\"principalId\":\"zq\",\"tenantId\":\"xywpmueefjzwfqkq\",\"ledgerRoleName\":\"Contributor\"}],\"certBasedSecurityPrincipals\":[{\"cert\":\"yonobgl\",\"ledgerRoleName\":\"Administrator\"},{\"cert\":\"xtccmg\",\"ledgerRoleName\":\"Administrator\"},{\"cert\":\"ytlmoyrxvwfud\",\"ledgerRoleName\":\"Contributor\"},{\"cert\":\"txhdzh\",\"ledgerRoleName\":\"Reader\"}],\"hostLevel\":\"bh\",\"maxBodySizeInMb\":1058131952,\"subjectName\":\"lhrxsbkyvpyc\",\"nodeCount\":427278595,\"writeLBAddressPrefix\":\"bpzkafkuwbc\",\"workerThreads\":946722582,\"enclavePlatform\":\"AmdSevSnp\",\"applicationType\":\"ConfidentialLedger\"},\"location\":\"seyvj\",\"tags\":{\"ofmxagkvtmelmqkr\":\"tslhspkdeem\"},\"id\":\"ahvljuaha\",\"name\":\"uhcdhm\",\"type\":\"ualaexqpvfadmw\"}"; + = "{\"properties\":{\"ledgerName\":\"hibnuqqkpika\",\"ledgerUri\":\"gvtqagnbuynh\",\"identityServiceUri\":\"gg\",\"ledgerInternalNamespace\":\"bfs\",\"runningState\":\"Active\",\"ledgerType\":\"Public\",\"provisioningState\":\"Succeeded\",\"ledgerSku\":\"Standard\",\"aadBasedSecurityPrincipals\":[{\"principalId\":\"zzmhjrunmpxttd\",\"tenantId\":\"rbnlankxmyskp\",\"ledgerRoleName\":\"Reader\"}],\"certBasedSecurityPrincipals\":[{\"cert\":\"kcxywnyt\",\"ledgerRoleName\":\"Reader\"},{\"cert\":\"nlqidybyxczf\",\"ledgerRoleName\":\"Contributor\"},{\"cert\":\"axdbabph\",\"ledgerRoleName\":\"Administrator\"},{\"cert\":\"lfktsths\",\"ledgerRoleName\":\"Reader\"}],\"hostLevel\":\"mnyyazt\",\"maxBodySizeInMb\":1372436938,\"subjectName\":\"wrqpue\",\"nodeCount\":2070417133,\"writeLBAddressPrefix\":\"ywbiexzfeyueax\",\"workerThreads\":1627970479,\"enclavePlatform\":\"AmdSevSnp\",\"applicationType\":\"CodeTransparency\",\"scittConfiguration\":\"qwalmuzyoxaepd\"},\"location\":\"jancu\",\"tags\":{\"bavxbniwdjswzt\":\"d\",\"xbzpfzab\":\"dbpgnxytxhp\",\"ovplw\":\"lcuhxwtctyqiklb\",\"gu\":\"bhvgy\"},\"id\":\"svmkfssxquk\",\"name\":\"fpl\",\"type\":\"mg\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -43,56 +42,57 @@ public void testCreate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ConfidentialLedger response = manager.ledgers() - .define("uedck") - .withRegion("ighxpk") - .withExistingResourceGroup("rq") - .withTags(mapOf("upedeojnabckhs", "baiuebbaumny")) - .withProperties(new LedgerProperties().withRunningState(RunningState.RESUMING) + .define("yqzrnkcqvyxlw") + .withRegion("ljyoxgvcltb") + .withExistingResourceGroup("uzoqft") + .withTags(mapOf("hkjeszzhbi", "c", "vecxgodebfqkk", "htxfvgxbfsmxnehm")) + .withProperties(new LedgerProperties().withRunningState(RunningState.PAUSING) .withLedgerType(LedgerType.UNKNOWN) .withLedgerSku(LedgerSku.STANDARD) .withAadBasedSecurityPrincipals(Arrays.asList( - new AadBasedSecurityPrincipal().withPrincipalId("swzts") - .withTenantId("pgn") - .withLedgerRoleName(LedgerRoleName.CONTRIBUTOR), - new AadBasedSecurityPrincipal().withPrincipalId("hpzxbzpfzab") - .withTenantId("cuh") - .withLedgerRoleName(LedgerRoleName.CONTRIBUTOR), - new AadBasedSecurityPrincipal().withPrincipalId("tyq") - .withTenantId("lbbovplw") - .withLedgerRoleName(LedgerRoleName.READER))) + new AadBasedSecurityPrincipal().withPrincipalId("fkbey") + .withTenantId("wrmjmwvvjektc") + .withLedgerRoleName(LedgerRoleName.READER), + new AadBasedSecurityPrincipal().withPrincipalId("hwlrsf") + .withTenantId("zpwv") + .withLedgerRoleName(LedgerRoleName.CONTRIBUTOR))) .withCertBasedSecurityPrincipals(Arrays.asList( - new CertBasedSecurityPrincipal().withCert("u").withLedgerRoleName(LedgerRoleName.CONTRIBUTOR))) - .withHostLevel("vmkfssxqu") - .withMaxBodySizeInMb(571824104) - .withSubjectName("l") - .withNodeCount(1362242180) - .withWriteLBAddressPrefix("xnkjzkdesl") - .withWorkerThreads(2042226827) - .withEnclavePlatform(EnclavePlatform.INTEL_SGX) - .withApplicationType(ApplicationType.CONFIDENTIAL_LEDGER)) + new CertBasedSecurityPrincipal().withCert("iqylihkaetck").withLedgerRoleName(LedgerRoleName.READER), + new CertBasedSecurityPrincipal().withCert("ivfsnk") + .withLedgerRoleName(LedgerRoleName.ADMINISTRATOR), + new CertBasedSecurityPrincipal().withCert("tqhjfbebrjcx") + .withLedgerRoleName(LedgerRoleName.CONTRIBUTOR))) + .withHostLevel("wutttxfvjrbi") + .withMaxBodySizeInMb(1236632858) + .withSubjectName("epcyvahfnlj") + .withNodeCount(561070013) + .withWriteLBAddressPrefix("j") + .withWorkerThreads(1975532924) + .withApplicationType(ApplicationType.CONFIDENTIAL_LEDGER) + .withScittConfiguration("ok")) .create(); - Assertions.assertEquals("seyvj", response.location()); - Assertions.assertEquals("tslhspkdeem", response.tags().get("ofmxagkvtmelmqkr")); - Assertions.assertEquals(RunningState.PAUSING, response.properties().runningState()); - Assertions.assertEquals(LedgerType.PRIVATE, response.properties().ledgerType()); - Assertions.assertEquals(LedgerSku.BASIC, response.properties().ledgerSku()); - Assertions.assertEquals("notyfjfcnjbkcn", + Assertions.assertEquals("jancu", response.location()); + Assertions.assertEquals("d", response.tags().get("bavxbniwdjswzt")); + Assertions.assertEquals(RunningState.ACTIVE, response.properties().runningState()); + Assertions.assertEquals(LedgerType.PUBLIC, response.properties().ledgerType()); + Assertions.assertEquals(LedgerSku.STANDARD, response.properties().ledgerSku()); + Assertions.assertEquals("zzmhjrunmpxttd", response.properties().aadBasedSecurityPrincipals().get(0).principalId()); - Assertions.assertEquals("hbttkphyw", response.properties().aadBasedSecurityPrincipals().get(0).tenantId()); - Assertions.assertEquals(LedgerRoleName.ADMINISTRATOR, + Assertions.assertEquals("rbnlankxmyskp", response.properties().aadBasedSecurityPrincipals().get(0).tenantId()); + Assertions.assertEquals(LedgerRoleName.READER, response.properties().aadBasedSecurityPrincipals().get(0).ledgerRoleName()); - Assertions.assertEquals("yonobgl", response.properties().certBasedSecurityPrincipals().get(0).cert()); - Assertions.assertEquals(LedgerRoleName.ADMINISTRATOR, + Assertions.assertEquals("kcxywnyt", response.properties().certBasedSecurityPrincipals().get(0).cert()); + Assertions.assertEquals(LedgerRoleName.READER, response.properties().certBasedSecurityPrincipals().get(0).ledgerRoleName()); - Assertions.assertEquals("bh", response.properties().hostLevel()); - Assertions.assertEquals(1058131952, response.properties().maxBodySizeInMb()); - Assertions.assertEquals("lhrxsbkyvpyc", response.properties().subjectName()); - Assertions.assertEquals(427278595, response.properties().nodeCount()); - Assertions.assertEquals("bpzkafkuwbc", response.properties().writeLBAddressPrefix()); - Assertions.assertEquals(946722582, response.properties().workerThreads()); - Assertions.assertEquals(EnclavePlatform.AMD_SEV_SNP, response.properties().enclavePlatform()); - Assertions.assertEquals(ApplicationType.CONFIDENTIAL_LEDGER, response.properties().applicationType()); + Assertions.assertEquals("mnyyazt", response.properties().hostLevel()); + Assertions.assertEquals(1372436938, response.properties().maxBodySizeInMb()); + Assertions.assertEquals("wrqpue", response.properties().subjectName()); + Assertions.assertEquals(2070417133, response.properties().nodeCount()); + Assertions.assertEquals("ywbiexzfeyueax", response.properties().writeLBAddressPrefix()); + Assertions.assertEquals(1627970479, response.properties().workerThreads()); + Assertions.assertEquals(ApplicationType.CODE_TRANSPARENCY, response.properties().applicationType()); + Assertions.assertEquals("qwalmuzyoxaepd", response.properties().scittConfiguration()); } // 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 3adac385926f..9818cdd730b5 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.generated; @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.ledgers().delete("byao", "v", com.azure.core.util.Context.NONE); + manager.ledgers().delete("umasxazjpq", "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 05af5ca56ce2..7db0c72692e0 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.generated; @@ -12,7 +12,6 @@ import com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager; import com.azure.resourcemanager.confidentialledger.models.ApplicationType; import com.azure.resourcemanager.confidentialledger.models.ConfidentialLedger; -import com.azure.resourcemanager.confidentialledger.models.EnclavePlatform; import com.azure.resourcemanager.confidentialledger.models.LedgerRoleName; import com.azure.resourcemanager.confidentialledger.models.LedgerSku; import com.azure.resourcemanager.confidentialledger.models.LedgerType; @@ -27,7 +26,7 @@ public final class LedgersGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"ledgerName\":\"vxyqjpkcattpngjc\",\"ledgerUri\":\"czsqpjhvm\",\"identityServiceUri\":\"jvnysounqe\",\"ledgerInternalNamespace\":\"noae\",\"runningState\":\"Unknown\",\"ledgerType\":\"Private\",\"provisioningState\":\"Failed\",\"ledgerSku\":\"Standard\",\"aadBasedSecurityPrincipals\":[{\"principalId\":\"pjmcmatuokthfuiu\",\"tenantId\":\"dsfcpkvxodpuoz\",\"ledgerRoleName\":\"Contributor\"},{\"principalId\":\"dagfuaxbezyiuok\",\"tenantId\":\"whrdxwzywqsmbsu\",\"ledgerRoleName\":\"Reader\"}],\"certBasedSecurityPrincipals\":[{\"cert\":\"ryocfsfksymdd\",\"ledgerRoleName\":\"Reader\"},{\"cert\":\"i\",\"ledgerRoleName\":\"Administrator\"},{\"cert\":\"qyud\",\"ledgerRoleName\":\"Administrator\"},{\"cert\":\"qn\",\"ledgerRoleName\":\"Contributor\"}],\"hostLevel\":\"zvyifqrvkdvj\",\"maxBodySizeInMb\":838682594,\"subjectName\":\"mvvd\",\"nodeCount\":1391003633,\"writeLBAddressPrefix\":\"kpnpulexxbczwtr\",\"workerThreads\":1083545989,\"enclavePlatform\":\"IntelSgx\",\"applicationType\":\"CodeTransparency\"},\"location\":\"vsovmyokac\",\"tags\":{\"hzdobpxjmflbvvnc\":\"w\",\"rsa\":\"rkcciwwzjuqk\"},\"id\":\"iwkuofos\",\"name\":\"ghsauuimjmvxied\",\"type\":\"ugidyjrr\"}"; + = "{\"properties\":{\"ledgerName\":\"hjq\",\"ledgerUri\":\"pyeicxm\",\"identityServiceUri\":\"iwqvhkh\",\"ledgerInternalNamespace\":\"uigdtopbobjog\",\"runningState\":\"Paused\",\"ledgerType\":\"Public\",\"provisioningState\":\"Canceled\",\"ledgerSku\":\"Basic\",\"aadBasedSecurityPrincipals\":[{\"principalId\":\"ayvvtpgvdf\",\"tenantId\":\"otkftutqxlngx\",\"ledgerRoleName\":\"Contributor\"},{\"principalId\":\"ugnxkrxdqmi\",\"tenantId\":\"thz\",\"ledgerRoleName\":\"Contributor\"}],\"certBasedSecurityPrincipals\":[{\"cert\":\"bhj\",\"ledgerRoleName\":\"Contributor\"},{\"cert\":\"ehoqfbowskan\",\"ledgerRoleName\":\"Contributor\"},{\"cert\":\"lcuiywgqywgndr\",\"ledgerRoleName\":\"Contributor\"}],\"hostLevel\":\"zgpphrcgyncocpe\",\"maxBodySizeInMb\":1965722470,\"subjectName\":\"mcoo\",\"nodeCount\":1657951268,\"writeLBAddressPrefix\":\"zevgb\",\"workerThreads\":2005133060,\"enclavePlatform\":\"AmdSevSnp\",\"applicationType\":\"ConfidentialLedger\",\"scittConfiguration\":\"pmivkwlzu\"},\"location\":\"c\",\"tags\":{\"fionl\":\"fnba\",\"bqqwxrj\":\"bxetqgtzxdpn\",\"mpmngnzscxaqwoo\":\"eallnwsubisnj\",\"njeaseipheofloke\":\"hcbonqvpkvlr\"},\"id\":\"y\",\"name\":\"enjbdlwtgrhp\",\"type\":\"jp\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -37,29 +36,28 @@ public void testGetByResourceGroupWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ConfidentialLedger response = manager.ledgers() - .getByResourceGroupWithResponse("gm", "qsl", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("zao", "vuhrhcffcyddgl", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("vsovmyokac", response.location()); - Assertions.assertEquals("w", response.tags().get("hzdobpxjmflbvvnc")); - Assertions.assertEquals(RunningState.UNKNOWN, response.properties().runningState()); - Assertions.assertEquals(LedgerType.PRIVATE, response.properties().ledgerType()); - Assertions.assertEquals(LedgerSku.STANDARD, response.properties().ledgerSku()); - Assertions.assertEquals("pjmcmatuokthfuiu", - response.properties().aadBasedSecurityPrincipals().get(0).principalId()); - Assertions.assertEquals("dsfcpkvxodpuoz", response.properties().aadBasedSecurityPrincipals().get(0).tenantId()); + Assertions.assertEquals("c", response.location()); + Assertions.assertEquals("fnba", response.tags().get("fionl")); + Assertions.assertEquals(RunningState.PAUSED, response.properties().runningState()); + Assertions.assertEquals(LedgerType.PUBLIC, response.properties().ledgerType()); + Assertions.assertEquals(LedgerSku.BASIC, response.properties().ledgerSku()); + Assertions.assertEquals("ayvvtpgvdf", response.properties().aadBasedSecurityPrincipals().get(0).principalId()); + Assertions.assertEquals("otkftutqxlngx", response.properties().aadBasedSecurityPrincipals().get(0).tenantId()); Assertions.assertEquals(LedgerRoleName.CONTRIBUTOR, response.properties().aadBasedSecurityPrincipals().get(0).ledgerRoleName()); - Assertions.assertEquals("ryocfsfksymdd", response.properties().certBasedSecurityPrincipals().get(0).cert()); - Assertions.assertEquals(LedgerRoleName.READER, + Assertions.assertEquals("bhj", response.properties().certBasedSecurityPrincipals().get(0).cert()); + Assertions.assertEquals(LedgerRoleName.CONTRIBUTOR, response.properties().certBasedSecurityPrincipals().get(0).ledgerRoleName()); - Assertions.assertEquals("zvyifqrvkdvj", response.properties().hostLevel()); - Assertions.assertEquals(838682594, response.properties().maxBodySizeInMb()); - Assertions.assertEquals("mvvd", response.properties().subjectName()); - Assertions.assertEquals(1391003633, response.properties().nodeCount()); - Assertions.assertEquals("kpnpulexxbczwtr", response.properties().writeLBAddressPrefix()); - Assertions.assertEquals(1083545989, response.properties().workerThreads()); - Assertions.assertEquals(EnclavePlatform.INTEL_SGX, response.properties().enclavePlatform()); - Assertions.assertEquals(ApplicationType.CODE_TRANSPARENCY, response.properties().applicationType()); + Assertions.assertEquals("zgpphrcgyncocpe", response.properties().hostLevel()); + Assertions.assertEquals(1965722470, response.properties().maxBodySizeInMb()); + Assertions.assertEquals("mcoo", response.properties().subjectName()); + Assertions.assertEquals(1657951268, response.properties().nodeCount()); + Assertions.assertEquals("zevgb", response.properties().writeLBAddressPrefix()); + Assertions.assertEquals(2005133060, response.properties().workerThreads()); + Assertions.assertEquals(ApplicationType.CONFIDENTIAL_LEDGER, response.properties().applicationType()); + Assertions.assertEquals("pmivkwlzu", response.properties().scittConfiguration()); } } 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 c76f7b9633db..3282cedd1b5a 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.generated; @@ -13,7 +13,6 @@ import com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager; import com.azure.resourcemanager.confidentialledger.models.ApplicationType; import com.azure.resourcemanager.confidentialledger.models.ConfidentialLedger; -import com.azure.resourcemanager.confidentialledger.models.EnclavePlatform; import com.azure.resourcemanager.confidentialledger.models.LedgerRoleName; import com.azure.resourcemanager.confidentialledger.models.LedgerSku; import com.azure.resourcemanager.confidentialledger.models.LedgerType; @@ -28,7 +27,7 @@ public final class LedgersListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"ledgerName\":\"cohslkev\",\"ledgerUri\":\"ggzfbu\",\"identityServiceUri\":\"mvfaxkffeiith\",\"ledgerInternalNamespace\":\"m\",\"runningState\":\"Resuming\",\"ledgerType\":\"Public\",\"provisioningState\":\"Succeeded\",\"ledgerSku\":\"Basic\",\"aadBasedSecurityPrincipals\":[{\"principalId\":\"zoggigrxwburvjxx\",\"tenantId\":\"spyd\",\"ledgerRoleName\":\"Reader\"},{\"principalId\":\"enkouknvudw\",\"tenantId\":\"ukbldngkpo\",\"ledgerRoleName\":\"Reader\"}],\"certBasedSecurityPrincipals\":[{\"cert\":\"xoegukgjnpiucgy\",\"ledgerRoleName\":\"Reader\"}],\"hostLevel\":\"zntypmrb\",\"maxBodySizeInMb\":2033477361,\"subjectName\":\"drqjsdpy\",\"nodeCount\":1342514759,\"writeLBAddressPrefix\":\"hxdeoejz\",\"workerThreads\":170373532,\"enclavePlatform\":\"IntelSgx\",\"applicationType\":\"ConfidentialLedger\"},\"location\":\"tgzfbishcbkh\",\"tags\":{\"p\":\"eyeam\",\"wkgshwa\":\"agalpbuxwgipwhon\",\"bin\":\"kix\",\"iyqzrnk\":\"eputtmrywnuzoqf\"},\"id\":\"qvyxlwhzlsicoho\",\"name\":\"qnwvlrya\",\"type\":\"w\"}]}"; + = "{\"value\":[{\"properties\":{\"ledgerName\":\"pwlbjnpg\",\"ledgerUri\":\"ftadehxnltyfs\",\"identityServiceUri\":\"pusuesn\",\"ledgerInternalNamespace\":\"dejbavo\",\"runningState\":\"Unknown\",\"ledgerType\":\"Unknown\",\"provisioningState\":\"Canceled\",\"ledgerSku\":\"Standard\",\"aadBasedSecurityPrincipals\":[{\"principalId\":\"udwxdndnvowguj\",\"tenantId\":\"gwdkcglhsl\",\"ledgerRoleName\":\"Contributor\"},{\"principalId\":\"yggdtjixh\",\"tenantId\":\"uofqwe\",\"ledgerRoleName\":\"Administrator\"},{\"principalId\":\"enevfyexfwhybci\",\"tenantId\":\"yvdcsitynnaa\",\"ledgerRoleName\":\"Administrator\"},{\"principalId\":\"tehfiqscjeypvh\",\"tenantId\":\"rkgqhcjrefo\",\"ledgerRoleName\":\"Reader\"}],\"certBasedSecurityPrincipals\":[{\"cert\":\"leyyvx\",\"ledgerRoleName\":\"Administrator\"}],\"hostLevel\":\"k\",\"maxBodySizeInMb\":203599917,\"subjectName\":\"pngjcrcczsqpjhvm\",\"nodeCount\":330627677,\"writeLBAddressPrefix\":\"nysounqe\",\"workerThreads\":904416760,\"enclavePlatform\":\"IntelSgx\",\"applicationType\":\"ConfidentialLedger\",\"scittConfiguration\":\"fhyhltrpmopjmcma\"},\"location\":\"okth\",\"tags\":{\"xodpuozmyzydagfu\":\"uaodsfcpk\",\"dxwzywqsmbsurexi\":\"xbezyiuokktwh\"},\"id\":\"o\",\"name\":\"yocf\",\"type\":\"fksymddystki\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -37,32 +36,32 @@ public void testListByResourceGroup() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.ledgers().listByResourceGroup("xc", "onpc", com.azure.core.util.Context.NONE); + PagedIterable response = manager.ledgers() + .listByResourceGroup("ualhbxxhejj", "zvdudgwdslfhotwm", com.azure.core.util.Context.NONE); - Assertions.assertEquals("tgzfbishcbkh", response.iterator().next().location()); - Assertions.assertEquals("eyeam", response.iterator().next().tags().get("p")); - Assertions.assertEquals(RunningState.RESUMING, response.iterator().next().properties().runningState()); - Assertions.assertEquals(LedgerType.PUBLIC, response.iterator().next().properties().ledgerType()); - Assertions.assertEquals(LedgerSku.BASIC, response.iterator().next().properties().ledgerSku()); - Assertions.assertEquals("zoggigrxwburvjxx", + Assertions.assertEquals("okth", response.iterator().next().location()); + Assertions.assertEquals("uaodsfcpk", response.iterator().next().tags().get("xodpuozmyzydagfu")); + Assertions.assertEquals(RunningState.UNKNOWN, response.iterator().next().properties().runningState()); + Assertions.assertEquals(LedgerType.UNKNOWN, response.iterator().next().properties().ledgerType()); + Assertions.assertEquals(LedgerSku.STANDARD, response.iterator().next().properties().ledgerSku()); + Assertions.assertEquals("udwxdndnvowguj", response.iterator().next().properties().aadBasedSecurityPrincipals().get(0).principalId()); - Assertions.assertEquals("spyd", + Assertions.assertEquals("gwdkcglhsl", response.iterator().next().properties().aadBasedSecurityPrincipals().get(0).tenantId()); - Assertions.assertEquals(LedgerRoleName.READER, + Assertions.assertEquals(LedgerRoleName.CONTRIBUTOR, response.iterator().next().properties().aadBasedSecurityPrincipals().get(0).ledgerRoleName()); - Assertions.assertEquals("xoegukgjnpiucgy", + Assertions.assertEquals("leyyvx", response.iterator().next().properties().certBasedSecurityPrincipals().get(0).cert()); - Assertions.assertEquals(LedgerRoleName.READER, + Assertions.assertEquals(LedgerRoleName.ADMINISTRATOR, response.iterator().next().properties().certBasedSecurityPrincipals().get(0).ledgerRoleName()); - Assertions.assertEquals("zntypmrb", response.iterator().next().properties().hostLevel()); - Assertions.assertEquals(2033477361, response.iterator().next().properties().maxBodySizeInMb()); - Assertions.assertEquals("drqjsdpy", response.iterator().next().properties().subjectName()); - Assertions.assertEquals(1342514759, response.iterator().next().properties().nodeCount()); - Assertions.assertEquals("hxdeoejz", response.iterator().next().properties().writeLBAddressPrefix()); - Assertions.assertEquals(170373532, response.iterator().next().properties().workerThreads()); - Assertions.assertEquals(EnclavePlatform.INTEL_SGX, response.iterator().next().properties().enclavePlatform()); + Assertions.assertEquals("k", response.iterator().next().properties().hostLevel()); + Assertions.assertEquals(203599917, response.iterator().next().properties().maxBodySizeInMb()); + Assertions.assertEquals("pngjcrcczsqpjhvm", response.iterator().next().properties().subjectName()); + Assertions.assertEquals(330627677, response.iterator().next().properties().nodeCount()); + Assertions.assertEquals("nysounqe", response.iterator().next().properties().writeLBAddressPrefix()); + Assertions.assertEquals(904416760, response.iterator().next().properties().workerThreads()); Assertions.assertEquals(ApplicationType.CONFIDENTIAL_LEDGER, response.iterator().next().properties().applicationType()); + Assertions.assertEquals("fhyhltrpmopjmcma", response.iterator().next().properties().scittConfiguration()); } } 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 cd5abf4a275f..f9b0e26ec5b4 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.generated; @@ -13,7 +13,6 @@ import com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager; import com.azure.resourcemanager.confidentialledger.models.ApplicationType; import com.azure.resourcemanager.confidentialledger.models.ConfidentialLedger; -import com.azure.resourcemanager.confidentialledger.models.EnclavePlatform; import com.azure.resourcemanager.confidentialledger.models.LedgerRoleName; import com.azure.resourcemanager.confidentialledger.models.LedgerSku; import com.azure.resourcemanager.confidentialledger.models.LedgerType; @@ -28,7 +27,7 @@ public final class LedgersListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"ledgerName\":\"hgyxzkonoc\",\"ledgerUri\":\"oklyaxuconuq\",\"identityServiceUri\":\"fkbey\",\"ledgerInternalNamespace\":\"wrmjmwvvjektc\",\"runningState\":\"Active\",\"ledgerType\":\"Public\",\"provisioningState\":\"Canceled\",\"ledgerSku\":\"Basic\",\"aadBasedSecurityPrincipals\":[{\"principalId\":\"zpwv\",\"tenantId\":\"dqgbiqylihkaetc\",\"ledgerRoleName\":\"Reader\"},{\"principalId\":\"civfsnkymuctq\",\"tenantId\":\"fbebrjcxer\",\"ledgerRoleName\":\"Contributor\"},{\"principalId\":\"tttxfvjrb\",\"tenantId\":\"phxepcyvahf\",\"ledgerRoleName\":\"Reader\"}],\"certBasedSecurityPrincipals\":[{\"cert\":\"xjvuujqgidokg\",\"ledgerRoleName\":\"Reader\"}],\"hostLevel\":\"oxgvclt\",\"maxBodySizeInMb\":794855452,\"subjectName\":\"c\",\"nodeCount\":1435851366,\"writeLBAddressPrefix\":\"esz\",\"workerThreads\":1005775827,\"enclavePlatform\":\"AmdSevSnp\",\"applicationType\":\"ConfidentialLedger\"},\"location\":\"fvgxbfsmxneh\",\"tags\":{\"godebfqkkrbmpu\":\"ec\",\"wflzlfbxzpuzy\":\"gr\",\"y\":\"ispnqzahmgkbrp\",\"rgvtqag\":\"hibnuqqkpika\"},\"id\":\"buynhijggm\",\"name\":\"bfs\",\"type\":\"arbu\"}]}"; + = "{\"value\":[{\"properties\":{\"ledgerName\":\"dxorrqnbpoczv\",\"ledgerUri\":\"fqrvkdvjsllrmvvd\",\"identityServiceUri\":\"atkpnp\",\"ledgerInternalNamespace\":\"exxbczwtr\",\"runningState\":\"Resuming\",\"ledgerType\":\"Unknown\",\"provisioningState\":\"Failed\",\"ledgerSku\":\"Standard\",\"aadBasedSecurityPrincipals\":[{\"principalId\":\"myokacspkwlh\",\"tenantId\":\"obpxjmflbvvn\",\"ledgerRoleName\":\"Administrator\"}],\"certBasedSecurityPrincipals\":[{\"cert\":\"iwwzjuqk\",\"ledgerRoleName\":\"Administrator\"}],\"hostLevel\":\"jiwkuofoskghsau\",\"maxBodySizeInMb\":2118838793,\"subjectName\":\"mvxi\",\"nodeCount\":825029486,\"writeLBAddressPrefix\":\"gidyjrrf\",\"workerThreads\":786534004,\"enclavePlatform\":\"AmdSevSnp\",\"applicationType\":\"ConfidentialLedger\",\"scittConfiguration\":\"csonpclhoco\"},\"location\":\"lkevle\",\"tags\":{\"ithlvmezyvshxm\":\"fbuhfmvfaxkffe\",\"gigr\":\"sbbzo\"},\"id\":\"wburvjxxjnspydpt\",\"name\":\"oenkouknvudwti\",\"type\":\"kbldngkpocipa\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -37,31 +36,31 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response = manager.ledgers().list("heun", com.azure.core.util.Context.NONE); + PagedIterable response = manager.ledgers().list("uxh", com.azure.core.util.Context.NONE); - Assertions.assertEquals("fvgxbfsmxneh", response.iterator().next().location()); - Assertions.assertEquals("ec", response.iterator().next().tags().get("godebfqkkrbmpu")); - Assertions.assertEquals(RunningState.ACTIVE, response.iterator().next().properties().runningState()); - Assertions.assertEquals(LedgerType.PUBLIC, response.iterator().next().properties().ledgerType()); - Assertions.assertEquals(LedgerSku.BASIC, response.iterator().next().properties().ledgerSku()); - Assertions.assertEquals("zpwv", + Assertions.assertEquals("lkevle", response.iterator().next().location()); + Assertions.assertEquals("fbuhfmvfaxkffe", response.iterator().next().tags().get("ithlvmezyvshxm")); + Assertions.assertEquals(RunningState.RESUMING, response.iterator().next().properties().runningState()); + Assertions.assertEquals(LedgerType.UNKNOWN, response.iterator().next().properties().ledgerType()); + Assertions.assertEquals(LedgerSku.STANDARD, response.iterator().next().properties().ledgerSku()); + Assertions.assertEquals("myokacspkwlh", response.iterator().next().properties().aadBasedSecurityPrincipals().get(0).principalId()); - Assertions.assertEquals("dqgbiqylihkaetc", + Assertions.assertEquals("obpxjmflbvvn", response.iterator().next().properties().aadBasedSecurityPrincipals().get(0).tenantId()); - Assertions.assertEquals(LedgerRoleName.READER, + Assertions.assertEquals(LedgerRoleName.ADMINISTRATOR, response.iterator().next().properties().aadBasedSecurityPrincipals().get(0).ledgerRoleName()); - Assertions.assertEquals("xjvuujqgidokg", + Assertions.assertEquals("iwwzjuqk", response.iterator().next().properties().certBasedSecurityPrincipals().get(0).cert()); - Assertions.assertEquals(LedgerRoleName.READER, + Assertions.assertEquals(LedgerRoleName.ADMINISTRATOR, response.iterator().next().properties().certBasedSecurityPrincipals().get(0).ledgerRoleName()); - Assertions.assertEquals("oxgvclt", response.iterator().next().properties().hostLevel()); - Assertions.assertEquals(794855452, response.iterator().next().properties().maxBodySizeInMb()); - Assertions.assertEquals("c", response.iterator().next().properties().subjectName()); - Assertions.assertEquals(1435851366, response.iterator().next().properties().nodeCount()); - Assertions.assertEquals("esz", response.iterator().next().properties().writeLBAddressPrefix()); - Assertions.assertEquals(1005775827, response.iterator().next().properties().workerThreads()); - Assertions.assertEquals(EnclavePlatform.AMD_SEV_SNP, response.iterator().next().properties().enclavePlatform()); + Assertions.assertEquals("jiwkuofoskghsau", response.iterator().next().properties().hostLevel()); + Assertions.assertEquals(2118838793, response.iterator().next().properties().maxBodySizeInMb()); + Assertions.assertEquals("mvxi", response.iterator().next().properties().subjectName()); + Assertions.assertEquals(825029486, response.iterator().next().properties().nodeCount()); + Assertions.assertEquals("gidyjrrf", response.iterator().next().properties().writeLBAddressPrefix()); + Assertions.assertEquals(786534004, response.iterator().next().properties().workerThreads()); Assertions.assertEquals(ApplicationType.CONFIDENTIAL_LEDGER, response.iterator().next().properties().applicationType()); + Assertions.assertEquals("csonpclhoco", response.iterator().next().properties().scittConfiguration()); } } 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 index 337207e405ca..3f8d9cf9cbe4 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.generated; @@ -20,7 +20,7 @@ public final class LedgersRestoreMockTests { @Test public void testRestore() throws Exception { - String responseStr = "{\"message\":\"sucocmnyyazttbtw\"}"; + String responseStr = "{\"message\":\"ixzbinjeputtmryw\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,10 +30,10 @@ public void testRestore() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ConfidentialLedgerRestoreResponse response = manager.ledgers() - .restore("rsyn", "qidybyx", - new ConfidentialLedgerRestore().withFileShareName("zfcl") - .withRestoreRegion("aaxdbabphlwrq") - .withUri("fkts"), + .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 new file mode 100644 index 000000000000..1635818b4264 --- /dev/null +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfBackupResponseInnerTests.java @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.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\":\"ummajtjaod\"}").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 new file mode 100644 index 000000000000..7a41189c5b44 --- /dev/null +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfBackupTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.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\":\"epgzgqexz\",\"uri\":\"ocxscpaierhhbcs\"}") + .toObject(ManagedCcfBackup.class); + Assertions.assertEquals("epgzgqexz", model.restoreRegion()); + Assertions.assertEquals("ocxscpaierhhbcs", model.uri()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ManagedCcfBackup model = new ManagedCcfBackup().withRestoreRegion("epgzgqexz").withUri("ocxscpaierhhbcs"); + model = BinaryData.fromObject(model).toObject(ManagedCcfBackup.class); + Assertions.assertEquals("epgzgqexz", model.restoreRegion()); + Assertions.assertEquals("ocxscpaierhhbcs", 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 new file mode 100644 index 000000000000..dd4558ec209b --- /dev/null +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfRestoreResponseInnerTests.java @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.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\":\"maajrmvdjwzrlo\"}").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 new file mode 100644 index 000000000000..40f6c53dbd89 --- /dev/null +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfRestoreTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.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\":\"obnbdxkqpxokaj\",\"restoreRegion\":\"onpimexgstxg\",\"uri\":\"po\"}") + .toObject(ManagedCcfRestore.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 { + ManagedCcfRestore model = new ManagedCcfRestore().withFileShareName("obnbdxkqpxokaj") + .withRestoreRegion("onpimexgstxg") + .withUri("po"); + model = BinaryData.fromObject(model).toObject(ManagedCcfRestore.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/ManagedCcfsBackupMockTests.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfsBackupMockTests.java deleted file mode 100644 index 0e30ef0ec8d2..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfsBackupMockTests.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.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -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\":\"rtzju\"}"; - - 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("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - ManagedCcfBackupResponse response = manager.managedCcfs() - .backup("tjrip", "rbpbewtghfgblcg", - new ManagedCcfBackup().withRestoreRegion("zvlvqhjkbegib").withUri("nmxiebwwaloayqc"), - 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 a371aea777f4..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.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -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("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - manager.managedCcfs().delete("vo", "bvmeuecivy", 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 455cc41add32..000000000000 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfsRestoreMockTests.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.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -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\":\"exrmcqibycnojvk\"}"; - - 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("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - ManagedCcfRestoreResponse response = manager.managedCcfs() - .restore("gwyzm", "txon", - new ManagedCcfRestore().withFileShareName("mtsavjcbpwxqp") - .withRestoreRegion("rknftguvriuhprwm") - .withUri("yvxqtayriwwroy"), - 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 e05c5b5e3bad..86b6ff88b2f0 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.generated; @@ -22,7 +22,7 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"gwdkcglhsl\",\"isDataAction\":true,\"display\":{\"provider\":\"ggd\",\"resource\":\"ixhbkuofqweykhm\",\"operation\":\"evfyexfwhybcib\",\"description\":\"vdcsitynn\"}}]}"; + = "{\"value\":[{\"name\":\"pofm\",\"isDataAction\":false,\"display\":{\"provider\":\"jpgd\",\"resource\":\"ocjjxhvpmouexh\",\"operation\":\"xibqeojnx\",\"description\":\"zvddntwndeicbtwn\"}}]}"; 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("gwdkcglhsl", response.iterator().next().name()); - Assertions.assertTrue(response.iterator().next().isDataAction()); - Assertions.assertEquals("ggd", response.iterator().next().display().provider()); - Assertions.assertEquals("ixhbkuofqweykhm", response.iterator().next().display().resource()); - Assertions.assertEquals("evfyexfwhybcib", response.iterator().next().display().operation()); - Assertions.assertEquals("vdcsitynn", response.iterator().next().display().description()); + Assertions.assertEquals("pofm", response.iterator().next().name()); + Assertions.assertFalse(response.iterator().next().isDataAction()); + Assertions.assertEquals("jpgd", response.iterator().next().display().provider()); + Assertions.assertEquals("ocjjxhvpmouexh", response.iterator().next().display().resource()); + Assertions.assertEquals("xibqeojnx", response.iterator().next().display().operation()); + Assertions.assertEquals("zvddntwndeicbtwn", response.iterator().next().display().description()); } } diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ResourceProviderOperationDefinitionInnerTests.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ResourceProviderOperationDefinitionInnerTests.java new file mode 100644 index 000000000000..a4a637b42b9c --- /dev/null +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ResourceProviderOperationDefinitionInnerTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.confidentialledger.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.confidentialledger.fluent.models.ResourceProviderOperationDefinitionInner; +import org.junit.jupiter.api.Assertions; + +public final class ResourceProviderOperationDefinitionInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ResourceProviderOperationDefinitionInner model = BinaryData.fromString( + "{\"name\":\"oqijgkdmbpaz\",\"isDataAction\":false,\"display\":{\"provider\":\"fp\",\"resource\":\"nrbtcqqjnq\",\"operation\":\"hqgnufooojywif\",\"description\":\"esaagdfm\"}}") + .toObject(ResourceProviderOperationDefinitionInner.class); + Assertions.assertEquals("oqijgkdmbpaz", model.name()); + Assertions.assertFalse(model.isDataAction()); + Assertions.assertEquals("fp", model.display().provider()); + Assertions.assertEquals("nrbtcqqjnq", model.display().resource()); + Assertions.assertEquals("hqgnufooojywif", model.display().operation()); + Assertions.assertEquals("esaagdfm", model.display().description()); + } +} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ResourceProviderOperationDisplayTests.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ResourceProviderOperationDisplayTests.java new file mode 100644 index 000000000000..95a0e7001d56 --- /dev/null +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ResourceProviderOperationDisplayTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.confidentialledger.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.confidentialledger.models.ResourceProviderOperationDisplay; +import org.junit.jupiter.api.Assertions; + +public final class ResourceProviderOperationDisplayTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ResourceProviderOperationDisplay model = BinaryData.fromString( + "{\"provider\":\"zlhjxrifkwmrvkt\",\"resource\":\"zntocipaouajps\",\"operation\":\"cmpoyfdkfogkny\",\"description\":\"ofjdde\"}") + .toObject(ResourceProviderOperationDisplay.class); + Assertions.assertEquals("zlhjxrifkwmrvkt", model.provider()); + Assertions.assertEquals("zntocipaouajps", model.resource()); + Assertions.assertEquals("cmpoyfdkfogkny", model.operation()); + Assertions.assertEquals("ofjdde", model.description()); + } +} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ResourceProviderOperationListTests.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ResourceProviderOperationListTests.java new file mode 100644 index 000000000000..17f69338fd66 --- /dev/null +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/test/java/com/azure/resourcemanager/confidentialledger/generated/ResourceProviderOperationListTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.confidentialledger.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.confidentialledger.implementation.models.ResourceProviderOperationList; +import org.junit.jupiter.api.Assertions; + +public final class ResourceProviderOperationListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ResourceProviderOperationList model = BinaryData.fromString( + "{\"value\":[{\"name\":\"msxaobhd\",\"isDataAction\":false,\"display\":{\"provider\":\"ioq\",\"resource\":\"ehtbm\",\"operation\":\"p\",\"description\":\"noi\"}}],\"nextLink\":\"wlrxyb\"}") + .toObject(ResourceProviderOperationList.class); + Assertions.assertEquals("wlrxyb", model.nextLink()); + } +} 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 e841137cd140..c4ed9d219cc9 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.confidentialledger.generated; @@ -22,7 +22,7 @@ public final class ResourceProvidersCheckNameAvailabilityWithResponseMockTests { @Test public void testCheckNameAvailabilityWithResponse() throws Exception { - String responseStr = "{\"nameAvailable\":true,\"reason\":\"Invalid\",\"message\":\"o\"}"; + String responseStr = "{\"nameAvailable\":false,\"reason\":\"AlreadyExists\",\"message\":\"bfkgukdkex\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,12 +33,12 @@ public void testCheckNameAvailabilityWithResponse() throws Exception { CheckNameAvailabilityResponse response = manager.resourceProviders() .checkNameAvailabilityWithResponse( - new CheckNameAvailabilityRequest().withName("mdectehfiqscjey").withType("hezrkgq"), + new CheckNameAvailabilityRequest().withName("clwhijcoejctbz").withType("s"), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertTrue(response.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.INVALID, response.reason()); - Assertions.assertEquals("o", response.message()); + Assertions.assertFalse(response.nameAvailable()); + Assertions.assertEquals(CheckNameAvailabilityReason.ALREADY_EXISTS, response.reason()); + Assertions.assertEquals("bfkgukdkex", response.message()); } } diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/tsp-location.yaml b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/tsp-location.yaml new file mode 100644 index 000000000000..1763bb7aeb45 --- /dev/null +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/confidentialledger/Confidentialledger.Management +commit: a5a59e85ffc768c3214ec4b31d7cc43051473d89 +repo: Azure/azure-rest-api-specs +additionalDirectories: