diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/CHANGELOG.md b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/CHANGELOG.md index 8dc3c3a1eca7..ba91ab49f2e3 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/CHANGELOG.md +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0-beta.1 (2023-02-20) + +- Azure Resource Manager ConfidentialLedger client library for Java. This package contains Microsoft Azure SDK for ConfidentialLedger Management SDK. Microsoft Azure Confidential Compute Ledger Control Plane REST API version 2020-12-01-preview. Package tag package-preview-2023-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/README.md b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/README.md index 2454164131e6..9e55a0c725a6 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-2022-05-13. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for ConfidentialLedger Management SDK. Microsoft Azure Confidential Compute Ledger Control Plane REST API version 2020-12-01-preview. Package tag package-preview-2023-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-confidentialledger - 1.0.0-beta.1 + 1.0.0-beta.2 ``` [//]: # ({x-version-update-end}) @@ -41,19 +41,19 @@ Various documentation is available to help you get started Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client. -[Azure Identity][azure_identity] package and [Azure Core Netty HTTP][azure_core_http_netty] package provide the default implementation. +[Azure Identity][azure_identity] and [Azure Core Netty HTTP][azure_core_http_netty] packages provide the default implementation. ### Authentication -By default, Azure Active Directory token authentication depends on correct configure of following environment variables. +By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. - `AZURE_TENANT_ID` for Azure tenant ID. - `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate. -In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`. +In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable. -With above configuration, `azure` client can be authenticated by following code: +With above configuration, `azure` client can be authenticated using the following code: ```java AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); @@ -83,13 +83,13 @@ See [API design][design] for general introduction on design and key concepts on ## Contributing -For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md). +For details on contributing to this repository, see the [contributing guide][cg]. -1. Fork it -1. Create your feature branch (`git checkout -b my-new-feature`) -1. Commit your changes (`git commit -am 'Add some feature'`) -1. Push to the branch (`git push origin my-new-feature`) -1. Create new Pull Request +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit . + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact with any additional questions or comments. [survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS @@ -100,3 +100,6 @@ For details on contributing to this repository, see the [contributing guide](htt [azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty [authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md [design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md +[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md +[coc]: https://opensource.microsoft.com/codeofconduct/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/SAMPLE.md b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/SAMPLE.md index 0608dcece1a2..b019781d25ea 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/SAMPLE.md +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/SAMPLE.md @@ -10,6 +10,15 @@ - [ListByResourceGroup](#ledger_listbyresourcegroup) - [Update](#ledger_update) +## ManagedCcf + +- [Create](#managedccf_create) +- [Delete](#managedccf_delete) +- [GetByResourceGroup](#managedccf_getbyresourcegroup) +- [List](#managedccf_list) +- [ListByResourceGroup](#managedccf_listbyresourcegroup) +- [Update](#managedccf_update) + ## Operations - [List](#operations_list) @@ -32,7 +41,7 @@ import java.util.Map; /** Samples for Ledger Create. */ public final class LedgerCreateSamples { /* - * x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/stable/2022-05-13/examples/ConfidentialLedger_Create.json + * x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-01-26-preview/examples/ConfidentialLedger_Create.json */ /** * Sample code: ConfidentialLedgerCreate. @@ -44,8 +53,8 @@ public final class LedgerCreateSamples { manager .ledgers() .define("DummyLedgerName") - .withExistingResourceGroup("DummyResourceGroupName") .withRegion("EastUS") + .withExistingResourceGroup("DummyResourceGroupName") .withTags(mapOf("additionalProps1", "additional properties")) .withProperties( new LedgerProperties() @@ -85,12 +94,10 @@ public final class LedgerCreateSamples { ### Ledger_Delete ```java -import com.azure.core.util.Context; - /** Samples for Ledger Delete. */ public final class LedgerDeleteSamples { /* - * x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/stable/2022-05-13/examples/ConfidentialLedger_Delete.json + * x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-01-26-preview/examples/ConfidentialLedger_Delete.json */ /** * Sample code: ConfidentialLedgerDelete. @@ -99,7 +106,7 @@ public final class LedgerDeleteSamples { */ public static void confidentialLedgerDelete( com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { - manager.ledgers().delete("DummyResourceGroupName", "DummyLedgerName", Context.NONE); + manager.ledgers().delete("DummyResourceGroupName", "DummyLedgerName", com.azure.core.util.Context.NONE); } } ``` @@ -107,12 +114,10 @@ public final class LedgerDeleteSamples { ### Ledger_GetByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for Ledger GetByResourceGroup. */ public final class LedgerGetByResourceGroupSamples { /* - * x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/stable/2022-05-13/examples/ConfidentialLedger_Get.json + * x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-01-26-preview/examples/ConfidentialLedger_Get.json */ /** * Sample code: ConfidentialLedgerGet. @@ -121,7 +126,10 @@ public final class LedgerGetByResourceGroupSamples { */ public static void confidentialLedgerGet( com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { - manager.ledgers().getByResourceGroupWithResponse("DummyResourceGroupName", "DummyLedgerName", Context.NONE); + manager + .ledgers() + .getByResourceGroupWithResponse( + "DummyResourceGroupName", "DummyLedgerName", com.azure.core.util.Context.NONE); } } ``` @@ -129,12 +137,10 @@ public final class LedgerGetByResourceGroupSamples { ### Ledger_List ```java -import com.azure.core.util.Context; - /** Samples for Ledger List. */ public final class LedgerListSamples { /* - * x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/stable/2022-05-13/examples/ConfidentialLedger_ListBySub.json + * x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-01-26-preview/examples/ConfidentialLedger_ListBySub.json */ /** * Sample code: ConfidentialLedgerListBySub. @@ -143,7 +149,7 @@ public final class LedgerListSamples { */ public static void confidentialLedgerListBySub( com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { - manager.ledgers().list(null, Context.NONE); + manager.ledgers().list(null, com.azure.core.util.Context.NONE); } } ``` @@ -151,12 +157,10 @@ public final class LedgerListSamples { ### Ledger_ListByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for Ledger ListByResourceGroup. */ public final class LedgerListByResourceGroupSamples { /* - * x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/stable/2022-05-13/examples/ConfidentialLedger_List.json + * x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-01-26-preview/examples/ConfidentialLedger_List.json */ /** * Sample code: ConfidentialLedgerList. @@ -165,7 +169,7 @@ public final class LedgerListByResourceGroupSamples { */ public static void confidentialLedgerList( com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { - manager.ledgers().listByResourceGroup("DummyResourceGroupName", null, Context.NONE); + manager.ledgers().listByResourceGroup("DummyResourceGroupName", null, com.azure.core.util.Context.NONE); } } ``` @@ -173,7 +177,6 @@ public final class LedgerListByResourceGroupSamples { ### Ledger_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.confidentialledger.models.AadBasedSecurityPrincipal; import com.azure.resourcemanager.confidentialledger.models.CertBasedSecurityPrincipal; import com.azure.resourcemanager.confidentialledger.models.ConfidentialLedger; @@ -187,7 +190,7 @@ import java.util.Map; /** Samples for Ledger Update. */ public final class LedgerUpdateSamples { /* - * x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/stable/2022-05-13/examples/ConfidentialLedger_Update.json + * x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-01-26-preview/examples/ConfidentialLedger_Update.json */ /** * Sample code: ConfidentialLedgerUpdate. @@ -199,7 +202,8 @@ public final class LedgerUpdateSamples { ConfidentialLedger resource = manager .ledgers() - .getByResourceGroupWithResponse("DummyResourceGroupName", "DummyLedgerName", Context.NONE) + .getByResourceGroupWithResponse( + "DummyResourceGroupName", "DummyLedgerName", com.azure.core.util.Context.NONE) .getValue(); resource .update() @@ -239,15 +243,218 @@ public final class LedgerUpdateSamples { } ``` -### Operations_List +### ManagedCcf_Create + +```java +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.confidentialledger.models.DeploymentType; +import com.azure.resourcemanager.confidentialledger.models.LanguageRuntime; +import com.azure.resourcemanager.confidentialledger.models.ManagedCcfProperties; +import com.azure.resourcemanager.confidentialledger.models.MemberIdentityCertificate; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for ManagedCcf Create. */ +public final class ManagedCcfCreateSamples { + /* + * x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-01-26-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"))) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### ManagedCcf_Delete + +```java +/** Samples for ManagedCcf Delete. */ +public final class ManagedCcfDeleteSamples { + /* + * x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-01-26-preview/examples/ManagedCCF_Delete.json + */ + /** + * Sample code: ConfidentialLedgerDelete. + * + * @param manager Entry point to ConfidentialLedgerManager. + */ + public static void confidentialLedgerDelete( + com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { + manager.managedCcfs().delete("DummyResourceGroupName", "DummyMccfAppName", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedCcf_GetByResourceGroup + +```java +/** Samples for ManagedCcf GetByResourceGroup. */ +public final class ManagedCcfGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-01-26-preview/examples/ManagedCCF_Get.json + */ + /** + * Sample code: ManagedCCFGet. + * + * @param manager Entry point to ConfidentialLedgerManager. + */ + public static void managedCCFGet(com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { + manager + .managedCcfs() + .getByResourceGroupWithResponse( + "DummyResourceGroupName", "DummyMccfAppName", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedCcf_List ```java -import com.azure.core.util.Context; +/** Samples for ManagedCcf List. */ +public final class ManagedCcfListSamples { + /* + * x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-01-26-preview/examples/ManagedCCF_ListBySub.json + */ + /** + * Sample code: ManagedCCFListBySub. + * + * @param manager Entry point to ConfidentialLedgerManager. + */ + public static void managedCCFListBySub( + com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { + manager.managedCcfs().list(null, com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedCcf_ListByResourceGroup +```java +/** Samples for ManagedCcf ListByResourceGroup. */ +public final class ManagedCcfListByResourceGroupSamples { + /* + * x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-01-26-preview/examples/ManagedCCF_List.json + */ + /** + * Sample code: ManagedCCFList. + * + * @param manager Entry point to ConfidentialLedgerManager. + */ + public static void managedCCFList(com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { + manager.managedCcfs().listByResourceGroup("DummyResourceGroupName", null, com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedCcf_Update + +```java +import com.azure.resourcemanager.confidentialledger.fluent.models.ManagedCcfInner; +import com.azure.resourcemanager.confidentialledger.models.DeploymentType; +import com.azure.resourcemanager.confidentialledger.models.LanguageRuntime; +import com.azure.resourcemanager.confidentialledger.models.ManagedCcfProperties; +import java.util.HashMap; +import java.util.Map; + +/** Samples for ManagedCcf Update. */ +public final class ManagedCcfUpdateSamples { + /* + * x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-01-26-preview/examples/ManagedCCF_Update.json + */ + /** + * Sample code: ManagedCCFUpdate. + * + * @param manager Entry point to ConfidentialLedgerManager. + */ + public static void managedCCFUpdate( + com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { + manager + .managedCcfs() + .update( + "DummyResourceGroupName", + "DummyMccfAppName", + new ManagedCcfInner() + .withLocation("EastUS") + .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"))), + com.azure.core.util.Context.NONE); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Operations_List + +```java /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/stable/2022-05-13/examples/Operations_Get.json + * x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-01-26-preview/examples/Operations_Get.json */ /** * Sample code: OperationsGet. @@ -255,7 +462,7 @@ public final class OperationsListSamples { * @param manager Entry point to ConfidentialLedgerManager. */ public static void operationsGet(com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { - manager.operations().list(Context.NONE); + manager.operations().list(com.azure.core.util.Context.NONE); } } ``` @@ -263,13 +470,12 @@ public final class OperationsListSamples { ### ResourceProvider_CheckNameAvailability ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.confidentialledger.models.CheckNameAvailabilityRequest; /** Samples for ResourceProvider CheckNameAvailability. */ public final class ResourceProviderCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/stable/2022-05-13/examples/CheckNameAvailability.json + * x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-01-26-preview/examples/CheckNameAvailability.json */ /** * Sample code: CheckNameAvailability. @@ -284,7 +490,7 @@ public final class ResourceProviderCheckNameAvailabilitySamples { new CheckNameAvailabilityRequest() .withName("sample-name") .withType("Microsoft.ConfidentialLedger/ledgers"), - Context.NONE); + 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 f2f51e79823b..def57b6663c3 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/pom.xml +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/pom.xml @@ -1,3 +1,8 @@ + 4.0.0 @@ -13,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-2022-05-13. + This package contains Microsoft Azure SDK for ConfidentialLedger Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Microsoft Azure Confidential Compute Ledger Control Plane REST API version 2020-12-01-preview. Package tag package-preview-2023-01. https://github.com/Azure/azure-sdk-for-java @@ -52,7 +57,6 @@ azure-core-management 1.10.1 - com.azure azure-identity 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 478b44712265..c18d35d5f304 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/ConfidentialLedgerManager.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/ConfidentialLedgerManager.java @@ -26,9 +26,11 @@ import com.azure.resourcemanager.confidentialledger.fluent.ConfidentialLedgerManagementClient; import com.azure.resourcemanager.confidentialledger.implementation.ConfidentialLedgerManagementClientBuilder; import com.azure.resourcemanager.confidentialledger.implementation.LedgersImpl; +import com.azure.resourcemanager.confidentialledger.implementation.ManagedCcfsImpl; import com.azure.resourcemanager.confidentialledger.implementation.OperationsImpl; import com.azure.resourcemanager.confidentialledger.implementation.ResourceProvidersImpl; import com.azure.resourcemanager.confidentialledger.models.Ledgers; +import com.azure.resourcemanager.confidentialledger.models.ManagedCcfs; import com.azure.resourcemanager.confidentialledger.models.Operations; import com.azure.resourcemanager.confidentialledger.models.ResourceProviders; import java.time.Duration; @@ -49,6 +51,8 @@ public final class ConfidentialLedgerManager { private Ledgers ledgers; + private ManagedCcfs managedCcfs; + private final ConfidentialLedgerManagementClient clientObject; private ConfidentialLedgerManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { @@ -307,6 +311,18 @@ public Ledgers ledgers() { return ledgers; } + /** + * Gets the resource collection API of ManagedCcfs. It manages ManagedCcf. + * + * @return Resource collection API of ManagedCcfs. + */ + public ManagedCcfs managedCcfs() { + if (this.managedCcfs == null) { + this.managedCcfs = new ManagedCcfsImpl(clientObject.getManagedCcfs(), this); + } + return managedCcfs; + } + /** * @return Wrapped service client ConfidentialLedgerManagementClient providing direct access to the underlying * auto-generated API implementation, based on Azure REST API. diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/ConfidentialLedgerManagementClient.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/ConfidentialLedgerManagementClient.java index 1a63936f81bb..4ee01b730705 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 @@ -10,7 +10,7 @@ /** The interface for ConfidentialLedgerManagementClient class. */ public interface ConfidentialLedgerManagementClient { /** - * Gets The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + * Gets The ID of the target subscription. * * @return the subscriptionId value. */ @@ -64,4 +64,11 @@ public interface ConfidentialLedgerManagementClient { * @return the LedgersClient object. */ LedgersClient getLedgers(); + + /** + * Gets the ManagedCcfsClient object to access its operations. + * + * @return the ManagedCcfsClient object. + */ + ManagedCcfsClient getManagedCcfs(); } diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/LedgersClient.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/LedgersClient.java index a642128d284d..f2dffb960d73 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 @@ -16,37 +16,43 @@ /** An instance of this class provides access to all the operations defined in LedgersClient. */ public interface LedgersClient { /** - * Retrieves the properties of a Confidential Ledger. + * Retrieves information about a Confidential Ledger resource. * - * @param resourceGroupName The name of the resource group. + *

Retrieves the properties of a Confidential Ledger. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential 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. + * @return confidential Ledger along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ConfidentialLedgerInner getByResourceGroup(String resourceGroupName, String ledgerName); + Response getByResourceGroupWithResponse( + String resourceGroupName, String ledgerName, Context context); /** - * Retrieves the properties of a Confidential Ledger. + * Retrieves information about a Confidential Ledger resource. + * + *

Retrieves the properties of a Confidential Ledger. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential 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 along with {@link Response}. + * @return confidential Ledger. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String ledgerName, Context context); + ConfidentialLedgerInner getByResourceGroup(String resourceGroupName, String ledgerName); /** - * Deletes an existing Confidential Ledger. + * Deletes a Confidential Ledger resource. + * + *

Deletes an existing Confidential Ledger. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -57,9 +63,11 @@ Response getByResourceGroupWithResponse( SyncPoller, Void> beginDelete(String resourceGroupName, String ledgerName); /** - * Deletes an existing Confidential Ledger. + * Deletes a Confidential Ledger resource. * - * @param resourceGroupName The name of the resource group. + *

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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -71,9 +79,11 @@ Response getByResourceGroupWithResponse( SyncPoller, Void> beginDelete(String resourceGroupName, String ledgerName, Context context); /** - * Deletes an existing Confidential Ledger. + * Deletes a Confidential Ledger resource. + * + *

Deletes an existing Confidential Ledger. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -83,9 +93,11 @@ Response getByResourceGroupWithResponse( void delete(String resourceGroupName, String ledgerName); /** - * Deletes an existing Confidential Ledger. + * Deletes a Confidential Ledger resource. * - * @param resourceGroupName The name of the resource group. + *

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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -96,9 +108,11 @@ Response getByResourceGroupWithResponse( void delete(String resourceGroupName, String ledgerName, Context context); /** - * Creates a Confidential Ledger with the specified ledger parameters. + * Creates a Confidential Ledger. + * + *

Creates a Confidential Ledger with the specified ledger parameters. * - * @param resourceGroupName The name of the resource group. + * @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. @@ -111,9 +125,11 @@ SyncPoller, ConfidentialLedgerInner> beginCr String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger); /** - * Creates a Confidential Ledger with the specified ledger parameters. + * Creates a Confidential Ledger. * - * @param resourceGroupName The name of the resource group. + *

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. @@ -127,9 +143,11 @@ SyncPoller, ConfidentialLedgerInner> beginCr String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger, Context context); /** - * Creates a Confidential Ledger with the specified ledger parameters. + * Creates a Confidential Ledger. + * + *

Creates a Confidential Ledger with the specified ledger parameters. * - * @param resourceGroupName The name of the resource group. + * @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. @@ -142,9 +160,11 @@ ConfidentialLedgerInner create( String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger); /** - * Creates a Confidential Ledger with the specified ledger parameters. + * Creates a Confidential Ledger. * - * @param resourceGroupName The name of the resource group. + *

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. @@ -158,9 +178,11 @@ ConfidentialLedgerInner create( String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger, Context context); /** - * Updates properties of Confidential Ledger. + * Update Confidential Ledger properties + * + *

Updates properties of Confidential Ledger. * - * @param resourceGroupName The name of the resource group. + * @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. @@ -173,9 +195,11 @@ SyncPoller, ConfidentialLedgerInner> beginUp String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger); /** - * Updates properties of Confidential Ledger. + * Update Confidential Ledger properties * - * @param resourceGroupName The name of the resource group. + *

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 request body for Updating Ledger. * @param context The context to associate with this operation. @@ -189,9 +213,11 @@ SyncPoller, ConfidentialLedgerInner> beginUp String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger, Context context); /** - * Updates properties of Confidential Ledger. + * Update Confidential Ledger properties + * + *

Updates properties of Confidential Ledger. * - * @param resourceGroupName The name of the resource group. + * @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. @@ -204,9 +230,11 @@ ConfidentialLedgerInner update( String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger); /** - * Updates properties of Confidential Ledger. + * Update Confidential Ledger properties * - * @param resourceGroupName The name of the resource group. + *

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 request body for Updating Ledger. * @param context The context to associate with this operation. @@ -220,9 +248,11 @@ ConfidentialLedgerInner update( String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger, Context context); /** - * Retrieves the properties of all Confidential Ledgers. + * 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. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -233,9 +263,11 @@ ConfidentialLedgerInner update( PagedIterable listByResourceGroup(String resourceGroupName); /** - * Retrieves the properties of all Confidential Ledgers. + * Retrieves information about all Confidential Ledger resources under the given subscription and resource group * - * @param resourceGroupName The name of the resource group. + *

Retrieves the properties of all Confidential Ledgers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -249,7 +281,9 @@ PagedIterable listByResourceGroup( String resourceGroupName, String filter, Context context); /** - * Retrieves the properties of all Confidential Ledgers. + * 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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -260,7 +294,9 @@ PagedIterable listByResourceGroup( PagedIterable list(); /** - * Retrieves the properties of all Confidential Ledgers. + * 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'. * @param context The context to associate with this operation. 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 new file mode 100644 index 000000000000..6178943aba66 --- /dev/null +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/ManagedCcfsClient.java @@ -0,0 +1,303 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confidentialledger.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.confidentialledger.fluent.models.ManagedCcfInner; + +/** An instance of this class provides access to all the operations defined in ManagedCcfsClient. */ +public interface ManagedCcfsClient { + /** + * Retrieves information about a Managed CCF resource. + * + *

Retrieves the properties of a Managed CCF app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed CCF along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String appName, Context context); + + /** + * Retrieves information about a Managed CCF resource. + * + *

Retrieves the properties of a Managed CCF app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed CCF. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedCcfInner getByResourceGroup(String resourceGroupName, String appName); + + /** + * Deletes a Managed CCF resource. + * + *

Deletes an existing Managed CCF. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String appName); + + /** + * Deletes a Managed CCF resource. + * + *

Deletes an existing Managed CCF. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String appName, Context context); + + /** + * Deletes a Managed CCF resource. + * + *

Deletes an existing Managed CCF. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String appName); + + /** + * Deletes a Managed CCF resource. + * + *

Deletes an existing Managed CCF. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String appName, Context context); + + /** + * Creates a Managed CCF. + * + *

Creates a Managed CCF with the specified Managed CCF parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @param managedCcf Managed CCF Create Request Body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of managed CCF. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ManagedCcfInner> beginCreate( + String resourceGroupName, String appName, ManagedCcfInner managedCcf); + + /** + * Creates a Managed CCF. + * + *

Creates a Managed CCF with the specified Managed CCF parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @param managedCcf Managed CCF Create Request Body. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of managed CCF. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ManagedCcfInner> beginCreate( + String resourceGroupName, String appName, ManagedCcfInner managedCcf, Context context); + + /** + * Creates a Managed CCF. + * + *

Creates a Managed CCF with the specified Managed CCF parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @param managedCcf Managed CCF Create Request Body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed CCF. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedCcfInner create(String resourceGroupName, String appName, ManagedCcfInner managedCcf); + + /** + * Creates a Managed CCF. + * + *

Creates a Managed CCF with the specified Managed CCF parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @param managedCcf Managed CCF Create Request Body. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed CCF. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedCcfInner create(String resourceGroupName, String appName, ManagedCcfInner managedCcf, Context context); + + /** + * Update Managed CCF properties + * + *

Updates properties of Managed CCF. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @param managedCcf Request body for Updating Managed CCF App. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginUpdate( + String resourceGroupName, String appName, ManagedCcfInner managedCcf); + + /** + * Update Managed CCF properties + * + *

Updates properties of Managed CCF. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @param managedCcf Request body for Updating Managed CCF App. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginUpdate( + String resourceGroupName, String appName, ManagedCcfInner managedCcf, Context context); + + /** + * Update Managed CCF properties + * + *

Updates properties of Managed CCF. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @param managedCcf Request body for Updating Managed CCF App. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void update(String resourceGroupName, String appName, ManagedCcfInner managedCcf); + + /** + * Update Managed CCF properties + * + *

Updates properties of Managed CCF. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @param managedCcf Request body for Updating Managed CCF App. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void update(String resourceGroupName, String appName, ManagedCcfInner managedCcf, Context context); + + /** + * Retrieves information about all Managed CCF resources under the given subscription and resource group + * + *

Retrieves the properties of all Managed CCF apps. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return object that includes an array of Managed CCF and a possible link for next set as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Retrieves information about all Managed CCF resources under the given subscription and resource group + * + *

Retrieves the properties of all Managed CCF apps. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return object that includes an array of Managed CCF and a possible link for next set as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, String filter, Context context); + + /** + * Retrieves information about all Managed CCF resources under the given subscription + * + *

Retrieves the properties of all Managed CCF. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return object that includes an array of Managed CCF and a possible link for next set as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Retrieves information about all Managed CCF resources under the given subscription + * + *

Retrieves the properties of all Managed CCF. + * + * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return object that includes an array of Managed CCF and a possible link for next set as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String filter, Context context); +} 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 5e45986c1d9d..9a5f43772a0f 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 @@ -13,7 +13,9 @@ /** An instance of this class provides access to all the operations defined in OperationsClient. */ public interface OperationsClient { /** - * Retrieves a list of available API operations. + * Retrieves a list of available API operations under this Resource Provider. + * + *

Retrieves a list of available API operations. * * @throws com.azure.core.management.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,7 +26,9 @@ public interface OperationsClient { PagedIterable list(); /** - * Retrieves a list of available API operations. + * Retrieves a list of available API operations under this Resource Provider. + * + *

Retrieves a list of available API operations. * * @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 ab5bfeed6881..7691096ec576 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 @@ -17,25 +17,25 @@ public interface ResourceProvidersClient { * To check whether a resource name is available. * * @param nameAvailabilityRequest Name availability request payload. + * @param context The context to associate with this 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 check availability result. + * @return the check availability result along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - CheckNameAvailabilityResponseInner checkNameAvailability(CheckNameAvailabilityRequest nameAvailabilityRequest); + Response checkNameAvailabilityWithResponse( + CheckNameAvailabilityRequest nameAvailabilityRequest, Context context); /** * To check whether a resource name is available. * * @param nameAvailabilityRequest Name availability request payload. - * @param context The context to associate with this 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 check availability result along with {@link Response}. + * @return the check availability result. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response checkNameAvailabilityWithResponse( - CheckNameAvailabilityRequest nameAvailabilityRequest, Context context); + CheckNameAvailabilityResponseInner checkNameAvailability(CheckNameAvailabilityRequest nameAvailabilityRequest); } 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 a1e861b8f825..21193c1a986b 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 @@ -29,6 +29,10 @@ public final class CheckNameAvailabilityResponseInner { @JsonProperty(value = "message") private String message; + /** Creates an instance of CheckNameAvailabilityResponseInner class. */ + public CheckNameAvailabilityResponseInner() { + } + /** * Get the nameAvailable property: Indicates if the resource name is available. * 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 5a9bada47bee..d973c6184ae8 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/ConfidentialLedgerInner.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/ConfidentialLedgerInner.java @@ -5,34 +5,37 @@ package com.azure.resourcemanager.confidentialledger.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; +import com.azure.core.management.Resource; import com.azure.core.management.SystemData; import com.azure.resourcemanager.confidentialledger.models.LedgerProperties; +import com.azure.resourcemanager.confidentialledger.models.RunningState; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** Confidential Ledger. Contains the properties of Confidential Ledger Resource. */ @Fluent -public final class ConfidentialLedgerInner extends ProxyResource { +public final class ConfidentialLedgerInner extends Resource { /* - * LedgerProperties Properties of Confidential Ledger Resource. + * Object representing RunningState for Ledger. + */ + @JsonProperty(value = "runningState") + private RunningState runningState; + + /* + * LedgerProperties + * + * Properties of Confidential Ledger Resource. */ @JsonProperty(value = "properties") private LedgerProperties properties; /* - * Metadata pertaining to creation and last modification of the resource + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /* - * The Azure location where the Confidential Ledger is running. - */ - @JsonProperty(value = "location") - private String location; - /* * Additional tags for Confidential Ledger */ @@ -40,53 +43,61 @@ public final class ConfidentialLedgerInner extends ProxyResource { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; + /** Creates an instance of ConfidentialLedgerInner class. */ + public ConfidentialLedgerInner() { + } + /** - * Get the properties property: LedgerProperties Properties of Confidential Ledger Resource. + * Get the runningState property: Object representing RunningState for Ledger. * - * @return the properties value. + * @return the runningState value. */ - public LedgerProperties properties() { - return this.properties; + public RunningState runningState() { + return this.runningState; } /** - * Set the properties property: LedgerProperties Properties of Confidential Ledger Resource. + * Set the runningState property: Object representing RunningState for Ledger. * - * @param properties the properties value to set. + * @param runningState the runningState value to set. * @return the ConfidentialLedgerInner object itself. */ - public ConfidentialLedgerInner withProperties(LedgerProperties properties) { - this.properties = properties; + public ConfidentialLedgerInner withRunningState(RunningState runningState) { + this.runningState = runningState; return this; } /** - * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * Get the properties property: LedgerProperties * - * @return the systemData value. + *

Properties of Confidential Ledger Resource. + * + * @return the properties value. */ - public SystemData systemData() { - return this.systemData; + public LedgerProperties properties() { + return this.properties; } /** - * Get the location property: The Azure location where the Confidential Ledger is running. + * Set the properties property: LedgerProperties * - * @return the location value. + *

Properties of Confidential Ledger Resource. + * + * @param properties the properties value to set. + * @return the ConfidentialLedgerInner object itself. */ - public String location() { - return this.location; + public ConfidentialLedgerInner withProperties(LedgerProperties properties) { + this.properties = properties; + return this; } /** - * Set the location property: The Azure location where the Confidential Ledger is running. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @param location the location value to set. - * @return the ConfidentialLedgerInner object itself. + * @return the systemData value. */ - public ConfidentialLedgerInner withLocation(String location) { - this.location = location; - return this; + public SystemData systemData() { + return this.systemData; } /** @@ -109,6 +120,13 @@ public ConfidentialLedgerInner withTags(Map tags) { return this; } + /** {@inheritDoc} */ + @Override + public ConfidentialLedgerInner withLocation(String location) { + super.withLocation(location); + return this; + } + /** * Validates the instance. * diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/ManagedCcfInner.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/ManagedCcfInner.java new file mode 100644 index 000000000000..1d4ee44e8949 --- /dev/null +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/ManagedCcfInner.java @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confidentialledger.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.confidentialledger.models.ManagedCcfProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Managed CCF. Contains the properties of Managed CCF Resource. */ +@Fluent +public final class ManagedCcfInner extends Resource { + /* + * ManagedCCFProperties + * + * Properties of Managed CCF Resource. + */ + @JsonProperty(value = "properties") + private ManagedCcfProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of ManagedCcfInner class. */ + public ManagedCcfInner() { + } + + /** + * Get the properties property: ManagedCCFProperties + * + *

Properties of Managed CCF Resource. + * + * @return the properties value. + */ + public ManagedCcfProperties properties() { + return this.properties; + } + + /** + * Set the properties property: ManagedCCFProperties + * + *

Properties of Managed CCF Resource. + * + * @param properties the properties value to set. + * @return the ManagedCcfInner object itself. + */ + public ManagedCcfInner withProperties(ManagedCcfProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** {@inheritDoc} */ + @Override + public ManagedCcfInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedCcfInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/ResourceProviderOperationDefinitionInner.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/ResourceProviderOperationDefinitionInner.java index f475c30609b9..56a037e59fda 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/ResourceProviderOperationDefinitionInner.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/ResourceProviderOperationDefinitionInner.java @@ -29,6 +29,10 @@ public final class ResourceProviderOperationDefinitionInner { @JsonProperty(value = "display") private ResourceProviderOperationDisplay display; + /** Creates an instance of ResourceProviderOperationDefinitionInner class. */ + public ResourceProviderOperationDefinitionInner() { + } + /** * Get the name property: Resource provider operation name. * 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 53b32565aaed..2890e9376759 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 @@ -10,6 +10,7 @@ import com.azure.resourcemanager.confidentialledger.fluent.models.ConfidentialLedgerInner; import com.azure.resourcemanager.confidentialledger.models.ConfidentialLedger; import com.azure.resourcemanager.confidentialledger.models.LedgerProperties; +import com.azure.resourcemanager.confidentialledger.models.RunningState; import java.util.Collections; import java.util.Map; @@ -31,6 +32,14 @@ public String type() { return this.innerModel().type(); } + public String location() { + return this.innerModel().location(); + } + + public RunningState runningState() { + return this.innerModel().runningState(); + } + public LedgerProperties properties() { return this.innerModel().properties(); } @@ -39,10 +48,6 @@ public SystemData systemData() { return this.innerModel().systemData(); } - public String location() { - return this.innerModel().location(); - } - public Map tags() { Map inner = this.innerModel().tags(); if (inner != null) { @@ -172,6 +177,11 @@ public ConfidentialLedgerImpl withTags(Map tags) { return this; } + public ConfidentialLedgerImpl withRunningState(RunningState runningState) { + this.innerModel().withRunningState(runningState); + return this; + } + public ConfidentialLedgerImpl withProperties(LedgerProperties properties) { this.innerModel().withProperties(properties); return this; diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ConfidentialLedgerManagementClientBuilder.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ConfidentialLedgerManagementClientBuilder.java index 98a6861c4d5d..e4bab539b1cc 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 @@ -18,13 +18,12 @@ @ServiceClientBuilder(serviceClients = {ConfidentialLedgerManagementClientImpl.class}) public final class ConfidentialLedgerManagementClientBuilder { /* - * The Azure subscription ID. This is a GUID-formatted string (e.g. - * 00000000-0000-0000-0000-000000000000) + * The ID of the target subscription. */ private String subscriptionId; /** - * Sets The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + * Sets The ID of the target subscription. * * @param subscriptionId the subscriptionId value. * @return the ConfidentialLedgerManagementClientBuilder. @@ -120,24 +119,26 @@ public ConfidentialLedgerManagementClientBuilder serializerAdapter(SerializerAda * @return an instance of ConfidentialLedgerManagementClientImpl. */ public ConfidentialLedgerManagementClientImpl buildClient() { - if (endpoint == null) { - this.endpoint = "https://management.azure.com"; - } - if (environment == null) { - this.environment = AzureEnvironment.AZURE; - } - if (pipeline == null) { - this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - } - if (defaultPollInterval == null) { - this.defaultPollInterval = Duration.ofSeconds(30); - } - if (serializerAdapter == null) { - this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter(); - } + String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; + AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; + HttpPipeline localPipeline = + (pipeline != null) + ? pipeline + : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + Duration localDefaultPollInterval = + (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); + SerializerAdapter localSerializerAdapter = + (serializerAdapter != null) + ? serializerAdapter + : SerializerFactory.createDefaultManagementSerializerAdapter(); ConfidentialLedgerManagementClientImpl client = new ConfidentialLedgerManagementClientImpl( - pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint); + localPipeline, + localSerializerAdapter, + localDefaultPollInterval, + localEnvironment, + subscriptionId, + localEndpoint); 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 0ca326de8147..5eb3772aad7d 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 @@ -24,6 +24,7 @@ import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.confidentialledger.fluent.ConfidentialLedgerManagementClient; import com.azure.resourcemanager.confidentialledger.fluent.LedgersClient; +import com.azure.resourcemanager.confidentialledger.fluent.ManagedCcfsClient; import com.azure.resourcemanager.confidentialledger.fluent.OperationsClient; import com.azure.resourcemanager.confidentialledger.fluent.ResourceProvidersClient; import java.io.IOException; @@ -38,11 +39,11 @@ /** Initializes a new instance of the ConfidentialLedgerManagementClientImpl type. */ @ServiceClient(builder = ConfidentialLedgerManagementClientBuilder.class) public final class ConfidentialLedgerManagementClientImpl implements ConfidentialLedgerManagementClient { - /** The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). */ + /** The ID of the target subscription. */ private final String subscriptionId; /** - * Gets The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + * Gets The ID of the target subscription. * * @return the subscriptionId value. */ @@ -146,6 +147,18 @@ public LedgersClient getLedgers() { return this.ledgers; } + /** The ManagedCcfsClient object to access its operations. */ + private final ManagedCcfsClient managedCcfs; + + /** + * Gets the ManagedCcfsClient object to access its operations. + * + * @return the ManagedCcfsClient object. + */ + public ManagedCcfsClient getManagedCcfs() { + return this.managedCcfs; + } + /** * Initializes an instance of ConfidentialLedgerManagementClient client. * @@ -153,8 +166,7 @@ public LedgersClient getLedgers() { * @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 Azure subscription ID. This is a GUID-formatted string (e.g. - * 00000000-0000-0000-0000-000000000000). + * @param subscriptionId The ID of the target subscription. * @param endpoint server parameter. */ ConfidentialLedgerManagementClientImpl( @@ -169,10 +181,11 @@ public LedgersClient getLedgers() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2022-05-13"; + this.apiVersion = "2023-01-26-preview"; this.operations = new OperationsClientImpl(this); this.resourceProviders = new ResourceProvidersClientImpl(this); this.ledgers = new LedgersClientImpl(this); + this.managedCcfs = new ManagedCcfsClientImpl(this); } /** diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/LedgersClientImpl.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/LedgersClientImpl.java index 03913509a3ee..233ae8c000f7 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 @@ -63,7 +63,7 @@ public final class LedgersClientImpl implements LedgersClient { */ @Host("{$host}") @ServiceInterface(name = "ConfidentialLedgerMa") - private interface LedgersService { + public interface LedgersService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger" @@ -175,9 +175,11 @@ Mono> listBySubscriptionNext( } /** - * Retrieves the properties of a Confidential Ledger. + * Retrieves information about a Confidential Ledger resource. * - * @param resourceGroupName The name of the resource group. + *

Retrieves the properties of a Confidential Ledger. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -223,9 +225,11 @@ private Mono> getByResourceGroupWithResponseAs } /** - * Retrieves the properties of a Confidential Ledger. + * Retrieves information about a Confidential Ledger resource. + * + *

Retrieves the properties of a Confidential Ledger. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -269,9 +273,11 @@ private Mono> getByResourceGroupWithResponseAs } /** - * Retrieves the properties of a Confidential Ledger. + * Retrieves information about a Confidential Ledger resource. * - * @param resourceGroupName The name of the resource group. + *

Retrieves the properties of a Confidential Ledger. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -285,41 +291,47 @@ private Mono getByResourceGroupAsync(String resourceGro } /** - * Retrieves the properties of a Confidential Ledger. + * Retrieves information about a Confidential Ledger resource. + * + *

Retrieves the properties of a Confidential Ledger. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential 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. + * @return confidential Ledger along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ConfidentialLedgerInner getByResourceGroup(String resourceGroupName, String ledgerName) { - return getByResourceGroupAsync(resourceGroupName, ledgerName).block(); + public Response getByResourceGroupWithResponse( + String resourceGroupName, String ledgerName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, ledgerName, context).block(); } /** - * Retrieves the properties of a Confidential Ledger. + * Retrieves information about a Confidential Ledger resource. + * + *

Retrieves the properties of a Confidential Ledger. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential 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 confidential Ledger. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String ledgerName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, ledgerName, context).block(); + public ConfidentialLedgerInner getByResourceGroup(String resourceGroupName, String ledgerName) { + return getByResourceGroupWithResponse(resourceGroupName, ledgerName, Context.NONE).getValue(); } /** - * Deletes an existing Confidential Ledger. + * Deletes a Confidential Ledger resource. + * + *

Deletes an existing Confidential Ledger. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -364,9 +376,11 @@ private Mono>> deleteWithResponseAsync(String resource } /** - * Deletes an existing Confidential Ledger. + * Deletes a Confidential Ledger resource. * - * @param resourceGroupName The name of the resource group. + *

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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -410,9 +424,11 @@ private Mono>> deleteWithResponseAsync( } /** - * Deletes an existing Confidential Ledger. + * Deletes a Confidential Ledger resource. + * + *

Deletes an existing Confidential Ledger. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -429,9 +445,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup } /** - * Deletes an existing Confidential Ledger. + * Deletes a Confidential Ledger resource. * - * @param resourceGroupName The name of the resource group. + *

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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -450,9 +468,11 @@ private PollerFlux, Void> beginDeleteAsync( } /** - * Deletes an existing Confidential Ledger. + * Deletes a Confidential Ledger resource. + * + *

Deletes an existing Confidential Ledger. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -461,13 +481,15 @@ private PollerFlux, Void> beginDeleteAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String ledgerName) { - return beginDeleteAsync(resourceGroupName, ledgerName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, ledgerName).getSyncPoller(); } /** - * Deletes an existing Confidential Ledger. + * Deletes a Confidential Ledger resource. * - * @param resourceGroupName The name of the resource group. + *

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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -478,13 +500,15 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String ledgerName, Context context) { - return beginDeleteAsync(resourceGroupName, ledgerName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, ledgerName, context).getSyncPoller(); } /** - * Deletes an existing Confidential Ledger. + * Deletes a Confidential Ledger resource. + * + *

Deletes an existing Confidential Ledger. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -497,9 +521,11 @@ private Mono deleteAsync(String resourceGroupName, String ledgerName) { } /** - * Deletes an existing Confidential Ledger. + * Deletes a Confidential Ledger resource. * - * @param resourceGroupName The name of the resource group. + *

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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -515,9 +541,11 @@ private Mono deleteAsync(String resourceGroupName, String ledgerName, Cont } /** - * Deletes an existing Confidential Ledger. + * Deletes a Confidential Ledger resource. + * + *

Deletes an existing Confidential Ledger. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -529,9 +557,11 @@ public void delete(String resourceGroupName, String ledgerName) { } /** - * Deletes an existing Confidential Ledger. + * Deletes a Confidential Ledger resource. * - * @param resourceGroupName The name of the resource group. + *

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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -544,9 +574,11 @@ public void delete(String resourceGroupName, String ledgerName, Context context) } /** - * Creates a Confidential Ledger with the specified ledger parameters. + * Creates a Confidential Ledger. + * + *

Creates a Confidential Ledger with the specified ledger parameters. * - * @param resourceGroupName The name of the resource group. + * @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. @@ -600,9 +632,11 @@ private Mono>> createWithResponseAsync( } /** - * Creates a Confidential Ledger with the specified ledger parameters. + * Creates a Confidential Ledger. * - * @param resourceGroupName The name of the resource group. + *

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. @@ -654,9 +688,11 @@ private Mono>> createWithResponseAsync( } /** - * Creates a Confidential Ledger with the specified ledger parameters. + * Creates a Confidential Ledger. + * + *

Creates a Confidential Ledger with the specified ledger parameters. * - * @param resourceGroupName The name of the resource group. + * @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. @@ -680,9 +716,11 @@ private PollerFlux, ConfidentialLedgerInner> } /** - * Creates a Confidential Ledger with the specified ledger parameters. + * Creates a Confidential Ledger. * - * @param resourceGroupName The name of the resource group. + *

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. @@ -708,9 +746,11 @@ private PollerFlux, ConfidentialLedgerInner> } /** - * Creates a Confidential Ledger with the specified ledger parameters. + * Creates a Confidential Ledger. + * + *

Creates a Confidential Ledger with the specified ledger parameters. * - * @param resourceGroupName The name of the resource group. + * @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. @@ -721,13 +761,15 @@ private PollerFlux, ConfidentialLedgerInner> @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ConfidentialLedgerInner> beginCreate( String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger) { - return beginCreateAsync(resourceGroupName, ledgerName, confidentialLedger).getSyncPoller(); + return this.beginCreateAsync(resourceGroupName, ledgerName, confidentialLedger).getSyncPoller(); } /** - * Creates a Confidential Ledger with the specified ledger parameters. + * Creates a Confidential Ledger. * - * @param resourceGroupName The name of the resource group. + *

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. @@ -739,13 +781,15 @@ public SyncPoller, ConfidentialLedgerInner> @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ConfidentialLedgerInner> beginCreate( String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger, Context context) { - return beginCreateAsync(resourceGroupName, ledgerName, confidentialLedger, context).getSyncPoller(); + return this.beginCreateAsync(resourceGroupName, ledgerName, confidentialLedger, context).getSyncPoller(); } /** - * Creates a Confidential Ledger with the specified ledger parameters. + * Creates a Confidential Ledger. + * + *

Creates a Confidential Ledger with the specified ledger parameters. * - * @param resourceGroupName The name of the resource group. + * @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. @@ -762,9 +806,11 @@ private Mono createAsync( } /** - * Creates a Confidential Ledger with the specified ledger parameters. + * Creates a Confidential Ledger. * - * @param resourceGroupName The name of the resource group. + *

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. @@ -782,9 +828,11 @@ private Mono createAsync( } /** - * Creates a Confidential Ledger with the specified ledger parameters. + * Creates a Confidential Ledger. + * + *

Creates a Confidential Ledger with the specified ledger parameters. * - * @param resourceGroupName The name of the resource group. + * @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. @@ -799,9 +847,11 @@ public ConfidentialLedgerInner create( } /** - * Creates a Confidential Ledger with the specified ledger parameters. + * Creates a Confidential Ledger. * - * @param resourceGroupName The name of the resource group. + *

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. @@ -817,9 +867,11 @@ public ConfidentialLedgerInner create( } /** - * Updates properties of Confidential Ledger. + * Update Confidential Ledger properties + * + *

Updates properties of Confidential Ledger. * - * @param resourceGroupName The name of the resource group. + * @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. @@ -873,9 +925,11 @@ private Mono>> updateWithResponseAsync( } /** - * Updates properties of Confidential Ledger. + * Update Confidential Ledger properties * - * @param resourceGroupName The name of the resource group. + *

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 request body for Updating Ledger. * @param context The context to associate with this operation. @@ -927,9 +981,11 @@ private Mono>> updateWithResponseAsync( } /** - * Updates properties of Confidential Ledger. + * Update Confidential Ledger properties + * + *

Updates properties of Confidential Ledger. * - * @param resourceGroupName The name of the resource group. + * @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. @@ -953,9 +1009,11 @@ private PollerFlux, ConfidentialLedgerInner> } /** - * Updates properties of Confidential Ledger. + * Update Confidential Ledger properties * - * @param resourceGroupName The name of the resource group. + *

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 request body for Updating Ledger. * @param context The context to associate with this operation. @@ -981,9 +1039,11 @@ private PollerFlux, ConfidentialLedgerInner> } /** - * Updates properties of Confidential Ledger. + * Update Confidential Ledger properties + * + *

Updates properties of Confidential Ledger. * - * @param resourceGroupName The name of the resource group. + * @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. @@ -994,13 +1054,15 @@ private PollerFlux, ConfidentialLedgerInner> @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ConfidentialLedgerInner> beginUpdate( String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger) { - return beginUpdateAsync(resourceGroupName, ledgerName, confidentialLedger).getSyncPoller(); + return this.beginUpdateAsync(resourceGroupName, ledgerName, confidentialLedger).getSyncPoller(); } /** - * Updates properties of Confidential Ledger. + * Update Confidential Ledger properties * - * @param resourceGroupName The name of the resource group. + *

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 request body for Updating Ledger. * @param context The context to associate with this operation. @@ -1012,13 +1074,15 @@ public SyncPoller, ConfidentialLedgerInner> @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ConfidentialLedgerInner> beginUpdate( String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger, Context context) { - return beginUpdateAsync(resourceGroupName, ledgerName, confidentialLedger, context).getSyncPoller(); + return this.beginUpdateAsync(resourceGroupName, ledgerName, confidentialLedger, context).getSyncPoller(); } /** - * Updates properties of Confidential Ledger. + * Update Confidential Ledger properties + * + *

Updates properties of Confidential Ledger. * - * @param resourceGroupName The name of the resource group. + * @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. @@ -1035,9 +1099,11 @@ private Mono updateAsync( } /** - * Updates properties of Confidential Ledger. + * Update Confidential Ledger properties * - * @param resourceGroupName The name of the resource group. + *

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 request body for Updating Ledger. * @param context The context to associate with this operation. @@ -1055,9 +1121,11 @@ private Mono updateAsync( } /** - * Updates properties of Confidential Ledger. + * Update Confidential Ledger properties + * + *

Updates properties of Confidential Ledger. * - * @param resourceGroupName The name of the resource group. + * @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. @@ -1072,9 +1140,11 @@ public ConfidentialLedgerInner update( } /** - * Updates properties of Confidential Ledger. + * Update Confidential Ledger properties * - * @param resourceGroupName The name of the resource group. + *

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 request body for Updating Ledger. * @param context The context to associate with this operation. @@ -1090,9 +1160,11 @@ public ConfidentialLedgerInner update( } /** - * Retrieves the properties of all Confidential Ledgers. + * 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. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1145,9 +1217,11 @@ private Mono> listByResourceGroupSinglePa } /** - * Retrieves the properties of all Confidential Ledgers. + * Retrieves information about all Confidential Ledger resources under the given subscription and resource group * - * @param resourceGroupName The name of the resource group. + *

Retrieves the properties of all Confidential Ledgers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1198,9 +1272,11 @@ private Mono> listByResourceGroupSinglePa } /** - * Retrieves the properties of all Confidential Ledgers. + * 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. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1216,9 +1292,11 @@ private PagedFlux listByResourceGroupAsync(String resou } /** - * Retrieves the properties of all Confidential Ledgers. + * Retrieves information about all Confidential Ledger resources under the given subscription and resource group * - * @param resourceGroupName The name of the resource group. + *

Retrieves the properties of all Confidential Ledgers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1234,9 +1312,11 @@ private PagedFlux listByResourceGroupAsync(String resou } /** - * Retrieves the properties of all Confidential Ledgers. + * 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. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1254,9 +1334,11 @@ private PagedFlux listByResourceGroupAsync( } /** - * Retrieves the properties of all Confidential Ledgers. + * Retrieves information about all Confidential Ledger resources under the given subscription and resource group * - * @param resourceGroupName The name of the resource group. + *

Retrieves the properties of all Confidential Ledgers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1270,9 +1352,11 @@ public PagedIterable listByResourceGroup(String resourc } /** - * Retrieves the properties of all Confidential Ledgers. + * 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. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1288,7 +1372,9 @@ public PagedIterable listByResourceGroup( } /** - * Retrieves the properties of all Confidential Ledgers. + * 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'. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1336,7 +1422,9 @@ private Mono> listSinglePageAsync(String } /** - * Retrieves the properties of all Confidential Ledgers. + * 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'. * @param context The context to associate with this operation. @@ -1382,7 +1470,9 @@ private Mono> listSinglePageAsync(String } /** - * Retrieves the properties of all Confidential Ledgers. + * 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'. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1398,7 +1488,9 @@ private PagedFlux listAsync(String filter) { } /** - * Retrieves the properties of all Confidential Ledgers. + * 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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1413,7 +1505,9 @@ private PagedFlux listAsync() { } /** - * Retrieves the properties of all Confidential Ledgers. + * 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'. * @param context The context to associate with this operation. @@ -1431,7 +1525,9 @@ private PagedFlux listAsync(String filter, Context cont } /** - * Retrieves the properties of all Confidential Ledgers. + * 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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1445,7 +1541,9 @@ public PagedIterable list() { } /** - * Retrieves the properties of all Confidential Ledgers. + * 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'. * @param context The context to associate with this operation. @@ -1463,7 +1561,8 @@ public PagedIterable list(String filter, Context contex /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1500,7 +1599,8 @@ private Mono> listByResourceGroupNextSing /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1538,7 +1638,8 @@ private Mono> listByResourceGroupNextSing /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1575,7 +1676,8 @@ private Mono> listBySubscriptionNextSingl /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. 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 2e7626bc5b95..4ffb92e1c52f 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 @@ -28,15 +28,6 @@ public LedgersImpl( this.serviceManager = serviceManager; } - public ConfidentialLedger getByResourceGroup(String resourceGroupName, String ledgerName) { - ConfidentialLedgerInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, ledgerName); - if (inner != null) { - return new ConfidentialLedgerImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getByResourceGroupWithResponse( String resourceGroupName, String ledgerName, Context context) { Response inner = @@ -52,6 +43,15 @@ public Response getByResourceGroupWithResponse( } } + public ConfidentialLedger getByResourceGroup(String resourceGroupName, String ledgerName) { + ConfidentialLedgerInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, ledgerName); + if (inner != null) { + return new ConfidentialLedgerImpl(inner, this.manager()); + } else { + return null; + } + } + public void deleteByResourceGroup(String resourceGroupName, String ledgerName) { this.serviceClient().delete(resourceGroupName, ledgerName); } 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 new file mode 100644 index 000000000000..987741587a8e --- /dev/null +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ManagedCcfImpl.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confidentialledger.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.confidentialledger.fluent.models.ManagedCcfInner; +import com.azure.resourcemanager.confidentialledger.models.ManagedCcf; +import com.azure.resourcemanager.confidentialledger.models.ManagedCcfProperties; +import java.util.Collections; +import java.util.Map; + +public final class ManagedCcfImpl implements ManagedCcf, ManagedCcf.Definition { + private ManagedCcfInner innerObject; + + private final com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager serviceManager; + + ManagedCcfImpl( + ManagedCcfInner innerObject, + com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public ManagedCcfProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public ManagedCcfInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String appName; + + public ManagedCcfImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public ManagedCcf create() { + this.innerObject = + serviceManager + .serviceClient() + .getManagedCcfs() + .create(resourceGroupName, appName, this.innerModel(), Context.NONE); + return this; + } + + public ManagedCcf create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getManagedCcfs() + .create(resourceGroupName, appName, this.innerModel(), context); + return this; + } + + ManagedCcfImpl(String name, com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager serviceManager) { + this.innerObject = new ManagedCcfInner(); + this.serviceManager = serviceManager; + this.appName = name; + } + + public ManagedCcf refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getManagedCcfs() + .getByResourceGroupWithResponse(resourceGroupName, appName, Context.NONE) + .getValue(); + return this; + } + + public ManagedCcf refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getManagedCcfs() + .getByResourceGroupWithResponse(resourceGroupName, appName, context) + .getValue(); + return this; + } + + public ManagedCcfImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public ManagedCcfImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public ManagedCcfImpl withTags(Map tags) { + this.innerModel().withTags(tags); + return this; + } + + public ManagedCcfImpl withProperties(ManagedCcfProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ManagedCcfsClientImpl.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ManagedCcfsClientImpl.java new file mode 100644 index 000000000000..cc0833268e20 --- /dev/null +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ManagedCcfsClientImpl.java @@ -0,0 +1,1688 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confidentialledger.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.confidentialledger.fluent.ManagedCcfsClient; +import com.azure.resourcemanager.confidentialledger.fluent.models.ManagedCcfInner; +import com.azure.resourcemanager.confidentialledger.models.ManagedCcfList; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in ManagedCcfsClient. */ +public final class ManagedCcfsClientImpl implements ManagedCcfsClient { + /** The proxy service used to perform REST calls. */ + private final ManagedCcfsService service; + + /** The service client containing this operation class. */ + private final ConfidentialLedgerManagementClientImpl client; + + /** + * Initializes an instance of ManagedCcfsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ManagedCcfsClientImpl(ConfidentialLedgerManagementClientImpl client) { + this.service = + RestProxy.create(ManagedCcfsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ConfidentialLedgerManagementClientManagedCcfs to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ConfidentialLedgerMa") + public interface ManagedCcfsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger" + + "/managedCCFs/{appName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("appName") String appName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger" + + "/managedCCFs/{appName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("appName") String appName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger" + + "/managedCCFs/{appName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("appName") String appName, + @BodyParam("application/json") ManagedCcfInner managedCcf, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger" + + "/managedCCFs/{appName}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("appName") String appName, + @BodyParam("application/json") ManagedCcfInner managedCcf, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger" + + "/managedCCFs") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("$filter") String filter, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ConfidentialLedger/managedCCFs/") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("$filter") String filter, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Retrieves information about a Managed CCF resource. + * + *

Retrieves the properties of a Managed CCF app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed CCF along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String appName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (appName == null) { + return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getByResourceGroup( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + appName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Retrieves information about a Managed CCF resource. + * + *

Retrieves the properties of a Managed CCF app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed CCF along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String appName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (appName == null) { + return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getByResourceGroup( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + appName, + accept, + context); + } + + /** + * Retrieves information about a Managed CCF resource. + * + *

Retrieves the properties of a Managed CCF app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed CCF on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String appName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, appName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Retrieves information about a Managed CCF resource. + * + *

Retrieves the properties of a Managed CCF app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed CCF along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse( + String resourceGroupName, String appName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, appName, context).block(); + } + + /** + * Retrieves information about a Managed CCF resource. + * + *

Retrieves the properties of a Managed CCF app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed CCF. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedCcfInner getByResourceGroup(String resourceGroupName, String appName) { + return getByResourceGroupWithResponse(resourceGroupName, appName, Context.NONE).getValue(); + } + + /** + * Deletes a Managed CCF resource. + * + *

Deletes an existing Managed CCF. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String appName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (appName == null) { + return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + appName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a Managed CCF resource. + * + *

Deletes an existing Managed CCF. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String appName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (appName == null) { + return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + appName, + accept, + context); + } + + /** + * Deletes a Managed CCF resource. + * + *

Deletes an existing Managed CCF. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String appName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, appName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Deletes a Managed CCF resource. + * + *

Deletes an existing Managed CCF. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String appName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, appName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Deletes a Managed CCF resource. + * + *

Deletes an existing Managed CCF. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String appName) { + return this.beginDeleteAsync(resourceGroupName, appName).getSyncPoller(); + } + + /** + * Deletes a Managed CCF resource. + * + *

Deletes an existing Managed CCF. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String appName, Context context) { + return this.beginDeleteAsync(resourceGroupName, appName, context).getSyncPoller(); + } + + /** + * Deletes a Managed CCF resource. + * + *

Deletes an existing Managed CCF. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String appName) { + return beginDeleteAsync(resourceGroupName, appName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a Managed CCF resource. + * + *

Deletes an existing Managed CCF. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String appName, Context context) { + return beginDeleteAsync(resourceGroupName, appName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a Managed CCF resource. + * + *

Deletes an existing Managed CCF. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String appName) { + deleteAsync(resourceGroupName, appName).block(); + } + + /** + * Deletes a Managed CCF resource. + * + *

Deletes an existing Managed CCF. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String appName, Context context) { + deleteAsync(resourceGroupName, appName, context).block(); + } + + /** + * Creates a Managed CCF. + * + *

Creates a Managed CCF with the specified Managed CCF parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @param managedCcf Managed CCF Create Request Body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed CCF along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync( + String resourceGroupName, String appName, ManagedCcfInner managedCcf) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (appName == null) { + return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); + } + if (managedCcf == null) { + return Mono.error(new IllegalArgumentException("Parameter managedCcf is required and cannot be null.")); + } else { + managedCcf.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .create( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + appName, + managedCcf, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates a Managed CCF. + * + *

Creates a Managed CCF with the specified Managed CCF parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @param managedCcf Managed CCF Create Request Body. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed CCF along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync( + String resourceGroupName, String appName, ManagedCcfInner managedCcf, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (appName == null) { + return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); + } + if (managedCcf == null) { + return Mono.error(new IllegalArgumentException("Parameter managedCcf is required and cannot be null.")); + } else { + managedCcf.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .create( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + appName, + managedCcf, + accept, + context); + } + + /** + * Creates a Managed CCF. + * + *

Creates a Managed CCF with the specified Managed CCF parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @param managedCcf Managed CCF Create Request Body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of managed CCF. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ManagedCcfInner> beginCreateAsync( + String resourceGroupName, String appName, ManagedCcfInner managedCcf) { + Mono>> mono = createWithResponseAsync(resourceGroupName, appName, managedCcf); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + ManagedCcfInner.class, + ManagedCcfInner.class, + this.client.getContext()); + } + + /** + * Creates a Managed CCF. + * + *

Creates a Managed CCF with the specified Managed CCF parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @param managedCcf Managed CCF Create Request Body. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of managed CCF. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ManagedCcfInner> beginCreateAsync( + String resourceGroupName, String appName, ManagedCcfInner managedCcf, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createWithResponseAsync(resourceGroupName, appName, managedCcf, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), ManagedCcfInner.class, ManagedCcfInner.class, context); + } + + /** + * Creates a Managed CCF. + * + *

Creates a Managed CCF with the specified Managed CCF parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @param managedCcf Managed CCF Create Request Body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of managed CCF. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ManagedCcfInner> beginCreate( + String resourceGroupName, String appName, ManagedCcfInner managedCcf) { + return this.beginCreateAsync(resourceGroupName, appName, managedCcf).getSyncPoller(); + } + + /** + * Creates a Managed CCF. + * + *

Creates a Managed CCF with the specified Managed CCF parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @param managedCcf Managed CCF Create Request Body. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of managed CCF. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ManagedCcfInner> beginCreate( + String resourceGroupName, String appName, ManagedCcfInner managedCcf, Context context) { + return this.beginCreateAsync(resourceGroupName, appName, managedCcf, context).getSyncPoller(); + } + + /** + * Creates a Managed CCF. + * + *

Creates a Managed CCF with the specified Managed CCF parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @param managedCcf Managed CCF Create Request Body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed CCF on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String appName, ManagedCcfInner managedCcf) { + return beginCreateAsync(resourceGroupName, appName, managedCcf) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates a Managed CCF. + * + *

Creates a Managed CCF with the specified Managed CCF parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @param managedCcf Managed CCF Create Request Body. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed CCF on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync( + String resourceGroupName, String appName, ManagedCcfInner managedCcf, Context context) { + return beginCreateAsync(resourceGroupName, appName, managedCcf, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates a Managed CCF. + * + *

Creates a Managed CCF with the specified Managed CCF parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @param managedCcf Managed CCF Create Request Body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed CCF. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedCcfInner create(String resourceGroupName, String appName, ManagedCcfInner managedCcf) { + return createAsync(resourceGroupName, appName, managedCcf).block(); + } + + /** + * Creates a Managed CCF. + * + *

Creates a Managed CCF with the specified Managed CCF parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @param managedCcf Managed CCF Create Request Body. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed CCF. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedCcfInner create( + String resourceGroupName, String appName, ManagedCcfInner managedCcf, Context context) { + return createAsync(resourceGroupName, appName, managedCcf, context).block(); + } + + /** + * Update Managed CCF properties + * + *

Updates properties of Managed CCF. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @param managedCcf Request body for Updating Managed CCF App. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return 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"; + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + appName, + managedCcf, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update Managed CCF properties + * + *

Updates properties of Managed CCF. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @param managedCcf Request body for Updating Managed CCF App. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync( + String resourceGroupName, String appName, ManagedCcfInner managedCcf, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (appName == null) { + return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); + } + if (managedCcf == null) { + return Mono.error(new IllegalArgumentException("Parameter managedCcf is required and cannot be null.")); + } else { + managedCcf.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + appName, + managedCcf, + accept, + context); + } + + /** + * Update Managed CCF properties + * + *

Updates properties of Managed CCF. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @param managedCcf Request body for Updating Managed CCF App. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginUpdateAsync( + String resourceGroupName, String appName, ManagedCcfInner managedCcf) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, appName, managedCcf); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Update Managed CCF properties + * + *

Updates properties of Managed CCF. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @param managedCcf Request body for Updating Managed CCF App. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginUpdateAsync( + String resourceGroupName, String appName, ManagedCcfInner managedCcf, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + updateWithResponseAsync(resourceGroupName, appName, managedCcf, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Update Managed CCF properties + * + *

Updates properties of Managed CCF. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @param managedCcf Request body for Updating Managed CCF App. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginUpdate( + String resourceGroupName, String appName, ManagedCcfInner managedCcf) { + return this.beginUpdateAsync(resourceGroupName, appName, managedCcf).getSyncPoller(); + } + + /** + * Update Managed CCF properties + * + *

Updates properties of Managed CCF. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @param managedCcf Request body for Updating Managed CCF App. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginUpdate( + String resourceGroupName, String appName, ManagedCcfInner managedCcf, Context context) { + return this.beginUpdateAsync(resourceGroupName, appName, managedCcf, context).getSyncPoller(); + } + + /** + * Update Managed CCF properties + * + *

Updates properties of Managed CCF. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @param managedCcf Request body for Updating Managed CCF App. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return 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); + } + + /** + * Update Managed CCF properties + * + *

Updates properties of Managed CCF. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @param managedCcf Request body for Updating Managed CCF App. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, String appName, ManagedCcfInner managedCcf, Context context) { + return beginUpdateAsync(resourceGroupName, appName, managedCcf, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update Managed CCF properties + * + *

Updates properties of Managed CCF. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @param managedCcf Request body for Updating Managed CCF App. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void update(String resourceGroupName, String appName, ManagedCcfInner managedCcf) { + updateAsync(resourceGroupName, appName, managedCcf).block(); + } + + /** + * Update Managed CCF properties + * + *

Updates properties of Managed CCF. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @param managedCcf Request body for Updating Managed CCF App. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void update(String resourceGroupName, String appName, ManagedCcfInner managedCcf, Context context) { + updateAsync(resourceGroupName, appName, managedCcf, context).block(); + } + + /** + * Retrieves information about all Managed CCF resources under the given subscription and resource group + * + *

Retrieves the properties of all Managed CCF apps. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return object that includes an array of Managed CCF and a possible link for next set along with {@link + * PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync( + String resourceGroupName, String filter) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByResourceGroup( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + filter, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Retrieves information about all Managed CCF resources under the given subscription and resource group + * + *

Retrieves the properties of all Managed CCF apps. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return object that includes an array of Managed CCF and a possible link for next set along with {@link + * PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync( + String resourceGroupName, String filter, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroup( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + filter, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Retrieves information about all Managed CCF resources under the given subscription and resource group + * + *

Retrieves the properties of all Managed CCF apps. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return object that includes an array of Managed CCF and a possible link for next set as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, String filter) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, filter), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Retrieves information about all Managed CCF resources under the given subscription and resource group + * + *

Retrieves the properties of all Managed CCF apps. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return object that includes an array of Managed CCF and a possible link for next set as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + final String filter = null; + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, filter), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Retrieves information about all Managed CCF resources under the given subscription and resource group + * + *

Retrieves the properties of all Managed CCF apps. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return object that includes an array of Managed CCF and a possible link for next set as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync( + String resourceGroupName, String filter, Context context) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * Retrieves information about all Managed CCF resources under the given subscription and resource group + * + *

Retrieves the properties of all Managed CCF apps. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return object that includes an array of Managed CCF and a possible link for next set as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + final String filter = null; + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, filter)); + } + + /** + * Retrieves information about all Managed CCF resources under the given subscription and resource group + * + *

Retrieves the properties of all Managed CCF apps. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return object that includes an array of Managed CCF and a possible link for next set as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup( + String resourceGroupName, String filter, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, filter, context)); + } + + /** + * Retrieves information about all Managed CCF resources under the given subscription + * + *

Retrieves the properties of all Managed CCF. + * + * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return object that includes an array of Managed CCF and a possible link for next set along with {@link + * PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String filter) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + filter, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Retrieves information about all Managed CCF resources under the given subscription + * + *

Retrieves the properties of all Managed CCF. + * + * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return object that includes an array of Managed CCF and a possible link for next set along with {@link + * PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String filter, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + filter, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Retrieves information about all Managed CCF resources under the given subscription + * + *

Retrieves the properties of all Managed CCF. + * + * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return object that includes an array of Managed CCF and a possible link for next set as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String filter) { + return new PagedFlux<>( + () -> listSinglePageAsync(filter), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * Retrieves information about all Managed CCF resources under the given subscription + * + *

Retrieves the properties of all Managed CCF. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return object that includes an array of Managed CCF and a possible link for next set as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + final String filter = null; + return new PagedFlux<>( + () -> listSinglePageAsync(filter), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * Retrieves information about all Managed CCF resources under the given subscription + * + *

Retrieves the properties of all Managed CCF. + * + * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return object that includes an array of Managed CCF and a possible link for next set as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String filter, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(filter, context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + } + + /** + * Retrieves information about all Managed CCF resources under the given subscription + * + *

Retrieves the properties of all Managed CCF. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return object that includes an array of Managed CCF and a possible link for next set as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + final String filter = null; + return new PagedIterable<>(listAsync(filter)); + } + + /** + * Retrieves information about all Managed CCF resources under the given subscription + * + *

Retrieves the properties of all Managed CCF. + * + * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return object that includes an array of Managed CCF and a possible link for next set as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String filter, Context context) { + return new PagedIterable<>(listAsync(filter, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

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

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

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

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return object that includes an array of Managed CCF and a possible link for next set along with {@link + * PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ManagedCcfsImpl.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ManagedCcfsImpl.java new file mode 100644 index 000000000000..4bff24297114 --- /dev/null +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ManagedCcfsImpl.java @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confidentialledger.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.confidentialledger.fluent.ManagedCcfsClient; +import com.azure.resourcemanager.confidentialledger.fluent.models.ManagedCcfInner; +import com.azure.resourcemanager.confidentialledger.models.ManagedCcf; +import com.azure.resourcemanager.confidentialledger.models.ManagedCcfs; + +public final class ManagedCcfsImpl implements ManagedCcfs { + private static final ClientLogger LOGGER = new ClientLogger(ManagedCcfsImpl.class); + + private final ManagedCcfsClient innerClient; + + private final com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager serviceManager; + + public ManagedCcfsImpl( + ManagedCcfsClient innerClient, + com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getByResourceGroupWithResponse( + String resourceGroupName, String appName, Context context) { + Response inner = + this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, appName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ManagedCcfImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ManagedCcf getByResourceGroup(String resourceGroupName, String appName) { + ManagedCcfInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, appName); + if (inner != null) { + return new ManagedCcfImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String appName) { + this.serviceClient().delete(resourceGroupName, appName); + } + + public void delete(String resourceGroupName, String appName, Context context) { + this.serviceClient().delete(resourceGroupName, appName, context); + } + + public void update(String resourceGroupName, String appName, ManagedCcfInner managedCcf) { + this.serviceClient().update(resourceGroupName, appName, managedCcf); + } + + public void update(String resourceGroupName, String appName, ManagedCcfInner managedCcf, Context context) { + this.serviceClient().update(resourceGroupName, appName, managedCcf, context); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return Utils.mapPage(inner, inner1 -> new ManagedCcfImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, String filter, Context context) { + PagedIterable inner = + this.serviceClient().listByResourceGroup(resourceGroupName, filter, context); + return Utils.mapPage(inner, inner1 -> new ManagedCcfImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new ManagedCcfImpl(inner1, this.manager())); + } + + public PagedIterable list(String filter, Context context) { + PagedIterable inner = this.serviceClient().list(filter, context); + return Utils.mapPage(inner, inner1 -> new ManagedCcfImpl(inner1, this.manager())); + } + + public ManagedCcf getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String appName = Utils.getValueFromIdByName(id, "managedCCFs"); + if (appName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedCCFs'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, appName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String appName = Utils.getValueFromIdByName(id, "managedCCFs"); + if (appName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedCCFs'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, appName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String appName = Utils.getValueFromIdByName(id, "managedCCFs"); + if (appName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedCCFs'.", id))); + } + this.delete(resourceGroupName, appName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String appName = Utils.getValueFromIdByName(id, "managedCCFs"); + if (appName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedCCFs'.", id))); + } + this.delete(resourceGroupName, appName, context); + } + + private ManagedCcfsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager() { + return this.serviceManager; + } + + public ManagedCcfImpl define(String name) { + return new ManagedCcfImpl(name, this.manager()); + } +} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/OperationsClientImpl.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/OperationsClientImpl.java index 6e7f7ea62cc4..a66ebcee9b44 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 @@ -55,7 +55,7 @@ public final class OperationsClientImpl implements OperationsClient { */ @Host("{$host}") @ServiceInterface(name = "ConfidentialLedgerMa") - private interface OperationsService { + public interface OperationsService { @Headers({"Content-Type: application/json"}) @Get("/providers/Microsoft.ConfidentialLedger/operations") @ExpectedResponses({200}) @@ -78,7 +78,9 @@ Mono> listNext( } /** - * Retrieves a list of available API operations. + * Retrieves a list of available API operations under this Resource Provider. + * + *

Retrieves a list of available API operations. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -110,7 +112,9 @@ private Mono> listSingle } /** - * Retrieves a list of available API operations. + * Retrieves a list of available API operations under this Resource Provider. + * + *

Retrieves a list of available API operations. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -143,7 +147,9 @@ private Mono> listSingle } /** - * Retrieves a list of available API operations. + * Retrieves a list of available API operations under this Resource Provider. + * + *

Retrieves a list of available API operations. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -156,7 +162,9 @@ private PagedFlux listAsync() { } /** - * Retrieves a list of available API operations. + * Retrieves a list of available API operations under this Resource Provider. + * + *

Retrieves a list of available API operations. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -172,7 +180,9 @@ private PagedFlux listAsync(Context co } /** - * Retrieves a list of available API operations. + * Retrieves a list of available API operations under this Resource Provider. + * + *

Retrieves a list of available API operations. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -185,7 +195,9 @@ public PagedIterable list() { } /** - * Retrieves a list of available API operations. + * Retrieves a list of available API operations under this Resource Provider. + * + *

Retrieves a list of available API operations. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -202,7 +214,8 @@ public PagedIterable list(Context cont /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -238,7 +251,8 @@ private Mono> listNextSi /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. 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 c4e655939b11..b44da565cc80 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 @@ -52,7 +52,7 @@ public final class ResourceProvidersClientImpl implements ResourceProvidersClien */ @Host("{$host}") @ServiceInterface(name = "ConfidentialLedgerMa") - private interface ResourceProvidersService { + public interface ResourceProvidersService { @Headers({"Content-Type: application/json"}) @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ConfidentialLedger/checkNameAvailability") @ExpectedResponses({200}) @@ -176,30 +176,30 @@ private Mono checkNameAvailabilityAsync( * To check whether a resource name is available. * * @param nameAvailabilityRequest Name availability request payload. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 check availability result. + * @return the check availability result along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CheckNameAvailabilityResponseInner checkNameAvailability( - CheckNameAvailabilityRequest nameAvailabilityRequest) { - return checkNameAvailabilityAsync(nameAvailabilityRequest).block(); + public Response checkNameAvailabilityWithResponse( + CheckNameAvailabilityRequest nameAvailabilityRequest, Context context) { + return checkNameAvailabilityWithResponseAsync(nameAvailabilityRequest, context).block(); } /** * To check whether a resource name is available. * * @param nameAvailabilityRequest Name availability request payload. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 check availability result along with {@link Response}. + * @return the check availability result. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response checkNameAvailabilityWithResponse( - CheckNameAvailabilityRequest nameAvailabilityRequest, Context context) { - return checkNameAvailabilityWithResponseAsync(nameAvailabilityRequest, context).block(); + public CheckNameAvailabilityResponseInner checkNameAvailability( + CheckNameAvailabilityRequest nameAvailabilityRequest) { + return checkNameAvailabilityWithResponse(nameAvailabilityRequest, Context.NONE).getValue(); } } 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 033ff179b4bb..941efe655610 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 @@ -28,15 +28,6 @@ public ResourceProvidersImpl( this.serviceManager = serviceManager; } - public CheckNameAvailabilityResponse checkNameAvailability(CheckNameAvailabilityRequest nameAvailabilityRequest) { - CheckNameAvailabilityResponseInner inner = this.serviceClient().checkNameAvailability(nameAvailabilityRequest); - if (inner != null) { - return new CheckNameAvailabilityResponseImpl(inner, this.manager()); - } else { - return null; - } - } - public Response checkNameAvailabilityWithResponse( CheckNameAvailabilityRequest nameAvailabilityRequest, Context context) { Response inner = @@ -52,6 +43,15 @@ public Response checkNameAvailabilityWithResponse } } + public CheckNameAvailabilityResponse checkNameAvailability(CheckNameAvailabilityRequest nameAvailabilityRequest) { + CheckNameAvailabilityResponseInner inner = this.serviceClient().checkNameAvailability(nameAvailabilityRequest); + if (inner != null) { + return new CheckNameAvailabilityResponseImpl(inner, this.manager()); + } else { + return null; + } + } + private ResourceProvidersClient serviceClient() { return this.innerClient; } 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 3f17da6a77f2..9bb3db260de8 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 @@ -28,6 +28,10 @@ public final class AadBasedSecurityPrincipal { @JsonProperty(value = "ledgerRoleName") private LedgerRoleName ledgerRoleName; + /** Creates an instance of AadBasedSecurityPrincipal class. */ + public AadBasedSecurityPrincipal() { + } + /** * Get the principalId property: UUID/GUID based Principal Id of the Security Principal. * 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 f243455fe9f0..2906babd296d 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 @@ -22,6 +22,10 @@ public final class CertBasedSecurityPrincipal { @JsonProperty(value = "ledgerRoleName") private LedgerRoleName ledgerRoleName; + /** Creates an instance of CertBasedSecurityPrincipal class. */ + public CertBasedSecurityPrincipal() { + } + /** * Get the cert property: Public key of the user cert (.pem or .cer). * 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 0d63a5f3972a..9f4c3b8abba5 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 @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for CheckNameAvailabilityReason. */ +/** The reason why the given name is not available. */ public final class CheckNameAvailabilityReason extends ExpandableStringEnum { /** Static value Invalid for CheckNameAvailabilityReason. */ public static final CheckNameAvailabilityReason INVALID = fromString("Invalid"); @@ -16,6 +16,15 @@ public final class CheckNameAvailabilityReason extends ExpandableStringEnumProperties of Confidential Ledger Resource. + * + * @return the properties value. */ - String location(); + LedgerProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); /** * Gets the tags property: Additional tags for Confidential Ledger. @@ -91,19 +100,40 @@ public interface ConfidentialLedger { /** The entirety of the ConfidentialLedger definition. */ interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + extends DefinitionStages.Blank, + DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, + DefinitionStages.WithCreate { } /** The ConfidentialLedger definition stages. */ interface DefinitionStages { /** The first stage of the ConfidentialLedger definition. */ - interface Blank extends WithResourceGroup { + interface Blank extends WithLocation { + } + /** The stage of the ConfidentialLedger definition allowing to specify location. */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); } /** The stage of the ConfidentialLedger definition allowing to specify parent resource. */ interface WithResourceGroup { /** * Specifies resourceGroupName. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ WithCreate withExistingResourceGroup(String resourceGroupName); @@ -113,7 +143,7 @@ interface WithResourceGroup { * resource to be created, but also allows for any other optional properties to be specified. */ interface WithCreate - extends DefinitionStages.WithLocation, DefinitionStages.WithTags, DefinitionStages.WithProperties { + extends DefinitionStages.WithTags, DefinitionStages.WithRunningState, DefinitionStages.WithProperties { /** * Executes the create request. * @@ -129,24 +159,6 @@ interface WithCreate */ ConfidentialLedger create(Context context); } - /** The stage of the ConfidentialLedger definition allowing to specify location. */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The Azure location where the Confidential Ledger is running. - * @return the next definition stage. - */ - WithCreate withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The Azure location where the Confidential Ledger is running. - * @return the next definition stage. - */ - WithCreate withRegion(String location); - } /** The stage of the ConfidentialLedger definition allowing to specify tags. */ interface WithTags { /** @@ -157,12 +169,25 @@ interface WithTags { */ WithCreate withTags(Map tags); } + /** The stage of the ConfidentialLedger definition allowing to specify runningState. */ + interface WithRunningState { + /** + * Specifies the runningState property: Object representing RunningState for Ledger.. + * + * @param runningState Object representing RunningState for Ledger. + * @return the next definition stage. + */ + WithCreate withRunningState(RunningState runningState); + } /** The stage of the ConfidentialLedger definition allowing to specify properties. */ interface WithProperties { /** - * Specifies the properties property: LedgerProperties Properties of Confidential Ledger Resource.. + * Specifies the properties property: LedgerProperties * - * @param properties LedgerProperties Properties of Confidential Ledger Resource. + *

Properties of Confidential Ledger Resource.. + * + * @param properties LedgerProperties + *

Properties of Confidential Ledger Resource. * @return the next definition stage. */ WithCreate withProperties(LedgerProperties properties); @@ -176,7 +201,7 @@ interface WithProperties { ConfidentialLedger.Update update(); /** The template for ConfidentialLedger update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { + interface Update extends UpdateStages.WithTags, UpdateStages.WithRunningState, UpdateStages.WithProperties { /** * Executes the update request. * @@ -204,12 +229,25 @@ interface WithTags { */ Update withTags(Map tags); } + /** The stage of the ConfidentialLedger update allowing to specify runningState. */ + interface WithRunningState { + /** + * Specifies the runningState property: Object representing RunningState for Ledger.. + * + * @param runningState Object representing RunningState for Ledger. + * @return the next definition stage. + */ + Update withRunningState(RunningState runningState); + } /** The stage of the ConfidentialLedger update allowing to specify properties. */ interface WithProperties { /** - * Specifies the properties property: LedgerProperties Properties of Confidential Ledger Resource.. + * Specifies the properties property: LedgerProperties + * + *

Properties of Confidential Ledger Resource.. * - * @param properties LedgerProperties Properties of Confidential Ledger Resource. + * @param properties LedgerProperties + *

Properties of Confidential Ledger Resource. * @return the next definition stage. */ Update withProperties(LedgerProperties properties); 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/models/ConfidentialLedgerList.java index 3ab8ce49e99b..d6341cd356d7 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/models/ConfidentialLedgerList.java @@ -19,12 +19,15 @@ public final class ConfidentialLedgerList { private List value; /* - * The URL the client should use to fetch the next page (per server side - * paging). + * The URL the client should use to fetch the next page (per server side paging). */ @JsonProperty(value = "nextLink") private String nextLink; + /** Creates an instance of ConfidentialLedgerList class. */ + public ConfidentialLedgerList() { + } + /** * Get the value property: List of Confidential Ledgers. * 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 new file mode 100644 index 000000000000..62a1ad713edd --- /dev/null +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/DeploymentType.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confidentialledger.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * DeploymentType + * + *

Object representing DeploymentType for Managed CCF. + */ +@Fluent +public final class DeploymentType { + /* + * Unique name for the Managed CCF. + */ + @JsonProperty(value = "languageRuntime") + private LanguageRuntime languageRuntime; + + /* + * Source Uri containing ManagedCCF code + */ + @JsonProperty(value = "appSourceUri") + private String appSourceUri; + + /** Creates an instance of DeploymentType class. */ + public DeploymentType() { + } + + /** + * Get the languageRuntime property: Unique name for the Managed CCF. + * + * @return the languageRuntime value. + */ + public LanguageRuntime languageRuntime() { + return this.languageRuntime; + } + + /** + * Set the languageRuntime property: Unique name for the Managed CCF. + * + * @param languageRuntime the languageRuntime value to set. + * @return the DeploymentType object itself. + */ + public DeploymentType withLanguageRuntime(LanguageRuntime languageRuntime) { + this.languageRuntime = languageRuntime; + return this; + } + + /** + * Get the appSourceUri property: Source Uri containing ManagedCCF code. + * + * @return the appSourceUri value. + */ + public String appSourceUri() { + return this.appSourceUri; + } + + /** + * Set the appSourceUri property: Source Uri containing ManagedCCF code. + * + * @param appSourceUri the appSourceUri value to set. + * @return the DeploymentType object itself. + */ + public DeploymentType withAppSourceUri(String appSourceUri) { + this.appSourceUri = appSourceUri; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} 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 new file mode 100644 index 000000000000..1fd42cd03802 --- /dev/null +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/LanguageRuntime.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confidentialledger.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Object representing LanguageRuntime for Manged CCF. */ +public final class LanguageRuntime extends ExpandableStringEnum { + /** Static value CPP for LanguageRuntime. */ + public static final LanguageRuntime CPP = fromString("CPP"); + + /** Static value JS for LanguageRuntime. */ + public static final LanguageRuntime JS = fromString("JS"); + + /** + * Creates a new instance of LanguageRuntime value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LanguageRuntime() { + } + + /** + * Creates or finds a LanguageRuntime from its string representation. + * + * @param name a name to look for. + * @return the corresponding LanguageRuntime. + */ + @JsonCreator + public static LanguageRuntime fromString(String name) { + return fromString(name, LanguageRuntime.class); + } + + /** + * Gets known LanguageRuntime values. + * + * @return known LanguageRuntime values. + */ + public static Collection values() { + return values(LanguageRuntime.class); + } +} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/LedgerProperties.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/LedgerProperties.java index c2daf60faabb..6a72e40013d4 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 @@ -8,7 +8,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** LedgerProperties Additional Confidential Ledger properties. */ +/** + * LedgerProperties + * + *

Additional Confidential Ledger properties. + */ @Fluent public final class LedgerProperties { /* @@ -59,6 +63,10 @@ public final class LedgerProperties { @JsonProperty(value = "certBasedSecurityPrincipals") private List certBasedSecurityPrincipals; + /** Creates an instance of LedgerProperties class. */ + public LedgerProperties() { + } + /** * Get the ledgerName property: Unique name for the Confidential Ledger. * 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 9421460f3bb8..c4865ec901fd 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 @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for LedgerRoleName. */ +/** LedgerRole associated with the Security Principal of Ledger. */ public final class LedgerRoleName extends ExpandableStringEnum { /** Static value Reader for LedgerRoleName. */ public static final LedgerRoleName READER = fromString("Reader"); @@ -19,6 +19,15 @@ public final class LedgerRoleName extends ExpandableStringEnum { /** Static value Administrator for LedgerRoleName. */ public static final LedgerRoleName ADMINISTRATOR = fromString("Administrator"); + /** + * Creates a new instance of LedgerRoleName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LedgerRoleName() { + } + /** * Creates or finds a LedgerRoleName from its string representation. * 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 dd60c1722a0e..f5dba446b790 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 @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for LedgerType. */ +/** Type of the ledger. Private means transaction data is encrypted. */ public final class LedgerType extends ExpandableStringEnum { /** Static value Unknown for LedgerType. */ public static final LedgerType UNKNOWN = fromString("Unknown"); @@ -19,6 +19,15 @@ public final class LedgerType extends ExpandableStringEnum { /** Static value Private for LedgerType. */ public static final LedgerType PRIVATE = fromString("Private"); + /** + * Creates a new instance of LedgerType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LedgerType() { + } + /** * Creates or finds a LedgerType from its string representation. * 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 738a8a346110..bd6d27409543 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 @@ -11,35 +11,41 @@ /** Resource collection API of Ledgers. */ public interface Ledgers { /** - * Retrieves the properties of a Confidential Ledger. + * Retrieves information about a Confidential Ledger resource. * - * @param resourceGroupName The name of the resource group. + *

Retrieves the properties of a Confidential Ledger. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential 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. + * @return confidential Ledger along with {@link Response}. */ - ConfidentialLedger getByResourceGroup(String resourceGroupName, String ledgerName); + Response getByResourceGroupWithResponse( + String resourceGroupName, String ledgerName, Context context); /** - * Retrieves the properties of a Confidential Ledger. + * Retrieves information about a Confidential Ledger resource. + * + *

Retrieves the properties of a Confidential Ledger. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential 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 along with {@link Response}. + * @return confidential Ledger. */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String ledgerName, Context context); + ConfidentialLedger getByResourceGroup(String resourceGroupName, String ledgerName); /** - * Deletes an existing Confidential Ledger. + * Deletes a Confidential Ledger resource. + * + *

Deletes an existing Confidential Ledger. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ledgerName Name of the Confidential Ledger. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -48,9 +54,11 @@ Response getByResourceGroupWithResponse( void deleteByResourceGroup(String resourceGroupName, String ledgerName); /** - * Deletes an existing Confidential Ledger. + * Deletes a Confidential Ledger resource. * - * @param resourceGroupName The name of the resource group. + *

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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -60,9 +68,11 @@ Response getByResourceGroupWithResponse( void delete(String resourceGroupName, String ledgerName, Context context); /** - * Retrieves the properties of all Confidential Ledgers. + * 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. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -72,9 +82,11 @@ Response getByResourceGroupWithResponse( PagedIterable listByResourceGroup(String resourceGroupName); /** - * Retrieves the properties of all Confidential Ledgers. + * 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. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -86,7 +98,9 @@ Response getByResourceGroupWithResponse( PagedIterable listByResourceGroup(String resourceGroupName, String filter, Context context); /** - * Retrieves the properties of all Confidential Ledgers. + * 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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -96,7 +110,9 @@ Response getByResourceGroupWithResponse( PagedIterable list(); /** - * Retrieves the properties of all Confidential Ledgers. + * 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'. * @param context The context to associate with this operation. @@ -109,7 +125,9 @@ Response getByResourceGroupWithResponse( PagedIterable list(String filter, Context context); /** - * Retrieves the properties of a Confidential Ledger. + * Retrieves information about a Confidential Ledger resource. + * + *

Retrieves the properties of a Confidential Ledger. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -120,7 +138,9 @@ Response getByResourceGroupWithResponse( ConfidentialLedger getById(String id); /** - * Retrieves the properties of a Confidential Ledger. + * Retrieves information about a Confidential Ledger resource. + * + *

Retrieves the properties of a Confidential Ledger. * * @param id the resource ID. * @param context The context to associate with this operation. @@ -132,7 +152,9 @@ Response getByResourceGroupWithResponse( Response getByIdWithResponse(String id, Context context); /** - * Deletes an existing Confidential Ledger. + * Deletes a Confidential Ledger resource. + * + *

Deletes an existing Confidential Ledger. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -142,7 +164,9 @@ Response getByResourceGroupWithResponse( void deleteById(String id); /** - * Deletes an existing Confidential Ledger. + * Deletes a Confidential Ledger resource. + * + *

Deletes an existing Confidential Ledger. * * @param id the resource ID. * @param context The context to associate with this operation. 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 new file mode 100644 index 000000000000..8e74dccb8be6 --- /dev/null +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ManagedCcf.java @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confidentialledger.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.confidentialledger.fluent.models.ManagedCcfInner; +import java.util.Map; + +/** An immutable client-side representation of ManagedCcf. */ +public interface ManagedCcf { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the properties property: ManagedCCFProperties + * + *

Properties of Managed CCF Resource. + * + * @return the properties value. + */ + ManagedCcfProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the inner com.azure.resourcemanager.confidentialledger.fluent.models.ManagedCcfInner object. + * + * @return the inner object. + */ + ManagedCcfInner innerModel(); + + /** The entirety of the ManagedCcf definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, + DefinitionStages.WithCreate { + } + /** The ManagedCcf definition stages. */ + interface DefinitionStages { + /** The first stage of the ManagedCcf definition. */ + interface Blank extends WithLocation { + } + /** The stage of the ManagedCcf definition allowing to specify location. */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + /** The stage of the ManagedCcf definition allowing to specify parent resource. */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + /** + * The stage of the ManagedCcf definition which contains all the minimum required properties for the resource to + * be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + ManagedCcf create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ManagedCcf create(Context context); + } + /** The stage of the ManagedCcf definition allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + /** The stage of the ManagedCcf definition allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: ManagedCCFProperties + * + *

Properties of Managed CCF Resource.. + * + * @param properties ManagedCCFProperties + *

Properties of Managed CCF Resource. + * @return the next definition stage. + */ + WithCreate withProperties(ManagedCcfProperties properties); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ManagedCcf refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ManagedCcf refresh(Context context); +} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ManagedCcfList.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ManagedCcfList.java new file mode 100644 index 000000000000..7daba6213dcf --- /dev/null +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ManagedCcfList.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confidentialledger.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.confidentialledger.fluent.models.ManagedCcfInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Object that includes an array of Managed CCF and a possible link for next set. */ +@Fluent +public final class ManagedCcfList { + /* + * List of Managed CCF + */ + @JsonProperty(value = "value") + private List value; + + /* + * The URL the client should use to fetch the next page (per server side paging). + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of ManagedCcfList class. */ + public ManagedCcfList() { + } + + /** + * Get the value property: List of Managed CCF. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: List of Managed CCF. + * + * @param value the value value to set. + * @return the ManagedCcfList object itself. + */ + public ManagedCcfList withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL the client should use to fetch the next page (per server side paging). + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The URL the client should use to fetch the next page (per server side paging). + * + * @param nextLink the nextLink value to set. + * @return the ManagedCcfList object itself. + */ + public ManagedCcfList withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} 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 new file mode 100644 index 000000000000..53641d04ea48 --- /dev/null +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ManagedCcfProperties.java @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confidentialledger.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * ManagedCCFProperties + * + *

Additional Managed CCF properties. + */ +@Fluent +public final class ManagedCcfProperties { + /* + * Unique name for the Managed CCF. + */ + @JsonProperty(value = "appName", access = JsonProperty.Access.WRITE_ONLY) + private String appName; + + /* + * Endpoint for calling Managed CCF Service. + */ + @JsonProperty(value = "appUri", access = JsonProperty.Access.WRITE_ONLY) + private String appUri; + + /* + * Endpoint for accessing network identity. + */ + @JsonProperty(value = "identityServiceUri", access = JsonProperty.Access.WRITE_ONLY) + private String identityServiceUri; + + /* + * List of member identity certificates for Managed CCF + */ + @JsonProperty(value = "memberIdentityCertificates") + private List memberIdentityCertificates; + + /* + * DeploymentType + * + * Deployment Type of Managed CCF + */ + @JsonProperty(value = "deploymentType") + private DeploymentType deploymentType; + + /* + * Provisioning state of Ledger Resource + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** Creates an instance of ManagedCcfProperties class. */ + public ManagedCcfProperties() { + } + + /** + * Get the appName property: Unique name for the Managed CCF. + * + * @return the appName value. + */ + public String appName() { + return this.appName; + } + + /** + * Get the appUri property: Endpoint for calling Managed CCF Service. + * + * @return the appUri value. + */ + public String appUri() { + return this.appUri; + } + + /** + * Get the identityServiceUri property: Endpoint for accessing network identity. + * + * @return the identityServiceUri value. + */ + public String identityServiceUri() { + return this.identityServiceUri; + } + + /** + * Get the memberIdentityCertificates property: List of member identity certificates for Managed CCF. + * + * @return the memberIdentityCertificates value. + */ + public List memberIdentityCertificates() { + return this.memberIdentityCertificates; + } + + /** + * Set the memberIdentityCertificates property: List of member identity certificates for Managed CCF. + * + * @param memberIdentityCertificates the memberIdentityCertificates value to set. + * @return the ManagedCcfProperties object itself. + */ + public ManagedCcfProperties withMemberIdentityCertificates( + List memberIdentityCertificates) { + this.memberIdentityCertificates = memberIdentityCertificates; + return this; + } + + /** + * Get the deploymentType property: DeploymentType + * + *

Deployment Type of Managed CCF. + * + * @return the deploymentType value. + */ + public DeploymentType deploymentType() { + return this.deploymentType; + } + + /** + * Set the deploymentType property: DeploymentType + * + *

Deployment Type of Managed CCF. + * + * @param deploymentType the deploymentType value to set. + * @return the ManagedCcfProperties object itself. + */ + public ManagedCcfProperties withDeploymentType(DeploymentType deploymentType) { + this.deploymentType = deploymentType; + return this; + } + + /** + * Get the provisioningState property: Provisioning state of Ledger Resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (memberIdentityCertificates() != null) { + memberIdentityCertificates().forEach(e -> e.validate()); + } + if (deploymentType() != null) { + deploymentType().validate(); + } + } +} 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 new file mode 100644 index 000000000000..b01ea9e89b09 --- /dev/null +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ManagedCcfs.java @@ -0,0 +1,215 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confidentialledger.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.confidentialledger.fluent.models.ManagedCcfInner; + +/** Resource collection API of ManagedCcfs. */ +public interface ManagedCcfs { + /** + * Retrieves information about a Managed CCF resource. + * + *

Retrieves the properties of a Managed CCF app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed CCF along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, String appName, Context context); + + /** + * Retrieves information about a Managed CCF resource. + * + *

Retrieves the properties of a Managed CCF app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed CCF. + */ + ManagedCcf getByResourceGroup(String resourceGroupName, String appName); + + /** + * Deletes a Managed CCF resource. + * + *

Deletes an existing Managed CCF. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByResourceGroup(String resourceGroupName, String appName); + + /** + * Deletes a Managed CCF resource. + * + *

Deletes an existing Managed CCF. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String appName, Context context); + + /** + * Update Managed CCF properties + * + *

Updates properties of Managed CCF. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @param managedCcf Request body for Updating Managed CCF App. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void update(String resourceGroupName, String appName, ManagedCcfInner managedCcf); + + /** + * Update Managed CCF properties + * + *

Updates properties of Managed CCF. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Managed CCF. + * @param managedCcf Request body for Updating Managed CCF App. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void update(String resourceGroupName, String appName, ManagedCcfInner managedCcf, Context context); + + /** + * Retrieves information about all Managed CCF resources under the given subscription and resource group + * + *

Retrieves the properties of all Managed CCF apps. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return object that includes an array of Managed CCF and a possible link for next set as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Retrieves information about all Managed CCF resources under the given subscription and resource group + * + *

Retrieves the properties of all Managed CCF apps. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return object that includes an array of Managed CCF and a possible link for next set as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, String filter, Context context); + + /** + * Retrieves information about all Managed CCF resources under the given subscription + * + *

Retrieves the properties of all Managed CCF. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return object that includes an array of Managed CCF and a possible link for next set as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * Retrieves information about all Managed CCF resources under the given subscription + * + *

Retrieves the properties of all Managed CCF. + * + * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return object that includes an array of Managed CCF and a possible link for next set as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String filter, Context context); + + /** + * Retrieves information about a Managed CCF resource. + * + *

Retrieves the properties of a Managed CCF app. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed CCF along with {@link Response}. + */ + ManagedCcf getById(String id); + + /** + * Retrieves information about a Managed CCF resource. + * + *

Retrieves the properties of a Managed CCF app. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed CCF along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes a Managed CCF resource. + * + *

Deletes an existing Managed CCF. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Deletes a Managed CCF resource. + * + *

Deletes an existing Managed CCF. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new ManagedCcf resource. + * + * @param name resource name. + * @return the first stage of the new ManagedCcf definition. + */ + ManagedCcf.DefinitionStages.Blank define(String name); +} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/MemberIdentityCertificate.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/MemberIdentityCertificate.java new file mode 100644 index 000000000000..831f4bdcbc0e --- /dev/null +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/MemberIdentityCertificate.java @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confidentialledger.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * MemberIdentityCertificate + * + *

Object representing MemberIdentityCertificate for Managed CCF. + */ +@Fluent +public final class MemberIdentityCertificate { + /* + * Member Identity Certificate + */ + @JsonProperty(value = "certificate") + private String certificate; + + /* + * Member Identity Certificate Encryption Key + */ + @JsonProperty(value = "encryptionkey") + private String encryptionkey; + + /* + * Anything + */ + @JsonProperty(value = "tags") + private Object tags; + + /** Creates an instance of MemberIdentityCertificate class. */ + public MemberIdentityCertificate() { + } + + /** + * Get the certificate property: Member Identity Certificate. + * + * @return the certificate value. + */ + public String certificate() { + return this.certificate; + } + + /** + * Set the certificate property: Member Identity Certificate. + * + * @param certificate the certificate value to set. + * @return the MemberIdentityCertificate object itself. + */ + public MemberIdentityCertificate withCertificate(String certificate) { + this.certificate = certificate; + return this; + } + + /** + * Get the encryptionkey property: Member Identity Certificate Encryption Key. + * + * @return the encryptionkey value. + */ + public String encryptionkey() { + return this.encryptionkey; + } + + /** + * Set the encryptionkey property: Member Identity Certificate Encryption Key. + * + * @param encryptionkey the encryptionkey value to set. + * @return the MemberIdentityCertificate object itself. + */ + public MemberIdentityCertificate withEncryptionkey(String encryptionkey) { + this.encryptionkey = encryptionkey; + return this; + } + + /** + * Get the tags property: Anything. + * + * @return the tags value. + */ + public Object tags() { + return this.tags; + } + + /** + * Set the tags property: Anything. + * + * @param tags the tags value to set. + * @return the MemberIdentityCertificate object itself. + */ + public MemberIdentityCertificate withTags(Object tags) { + this.tags = tags; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} 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 deb716faec2d..a9fa628ca1b8 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 @@ -10,7 +10,9 @@ /** Resource collection API of Operations. */ public interface Operations { /** - * Retrieves a list of available API operations. + * Retrieves a list of available API operations under this Resource Provider. + * + *

Retrieves a list of available API operations. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -20,7 +22,9 @@ public interface Operations { PagedIterable list(); /** - * Retrieves a list of available API operations. + * Retrieves a list of available API operations under this Resource Provider. + * + *

Retrieves a list of available API operations. * * @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 5fbccb6b864b..fcd73e28021d 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 @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ProvisioningState. */ +/** Object representing ProvisioningState for Confidential Ledger. */ public final class ProvisioningState extends ExpandableStringEnum { /** Static value Unknown for ProvisioningState. */ public static final ProvisioningState UNKNOWN = fromString("Unknown"); @@ -31,6 +31,15 @@ public final class ProvisioningState extends ExpandableStringEnum value; /* - * The URI that can be used to request the next page for list of Azure - * operations. + * The URI that can be used to request the next page for list of Azure operations. */ @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of ResourceProviderOperationList class. */ + public ResourceProviderOperationList() { + } + /** * Get the value property: Resource provider operations list. * 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 2859bd5ebb83..0d63c5ff7ab8 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 @@ -13,23 +13,23 @@ public interface ResourceProviders { * To check whether a resource name is available. * * @param nameAvailabilityRequest Name availability request payload. + * @param context The context to associate with this 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 check availability result. + * @return the check availability result along with {@link Response}. */ - CheckNameAvailabilityResponse checkNameAvailability(CheckNameAvailabilityRequest nameAvailabilityRequest); + Response checkNameAvailabilityWithResponse( + CheckNameAvailabilityRequest nameAvailabilityRequest, Context context); /** * To check whether a resource name is available. * * @param nameAvailabilityRequest Name availability request payload. - * @param context The context to associate with this 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 check availability result along with {@link Response}. + * @return the check availability result. */ - Response checkNameAvailabilityWithResponse( - CheckNameAvailabilityRequest nameAvailabilityRequest, Context context); + CheckNameAvailabilityResponse checkNameAvailability(CheckNameAvailabilityRequest nameAvailabilityRequest); } 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 new file mode 100644 index 000000000000..51b4bc98da45 --- /dev/null +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/RunningState.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confidentialledger.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Object representing RunningState for Confidential Ledger. */ +public final class RunningState extends ExpandableStringEnum { + /** Static value Active for RunningState. */ + public static final RunningState ACTIVE = fromString("Active"); + + /** Static value Paused for RunningState. */ + public static final RunningState PAUSED = fromString("Paused"); + + /** Static value Unknown for RunningState. */ + public static final RunningState UNKNOWN = fromString("Unknown"); + + /** Static value Pausing for RunningState. */ + public static final RunningState PAUSING = fromString("Pausing"); + + /** Static value Resuming for RunningState. */ + public static final RunningState RESUMING = fromString("Resuming"); + + /** + * Creates a new instance of RunningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RunningState() { + } + + /** + * Creates or finds a RunningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding RunningState. + */ + @JsonCreator + public static RunningState fromString(String name) { + return fromString(name, RunningState.class); + } + + /** + * Gets known RunningState values. + * + * @return known RunningState values. + */ + public static Collection values() { + return values(RunningState.class); + } +} diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/Tags.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/Tags.java index 52ea713dcc6f..19eb2136f2b1 100644 --- a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/Tags.java +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/Tags.java @@ -19,6 +19,10 @@ public class Tags { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; + /** Creates an instance of Tags class. */ + public Tags() { + } + /** * Get the tags property: Additional tags for Confidential Ledger. * 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 1e0ae0696cfe..d78b16efb0f2 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 @@ -16,7 +16,7 @@ /** Samples for Ledger Create. */ public final class LedgerCreateSamples { /* - * x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/stable/2022-05-13/examples/ConfidentialLedger_Create.json + * x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-01-26-preview/examples/ConfidentialLedger_Create.json */ /** * Sample code: ConfidentialLedgerCreate. @@ -28,8 +28,8 @@ public static void confidentialLedgerCreate( manager .ledgers() .define("DummyLedgerName") - .withExistingResourceGroup("DummyResourceGroupName") .withRegion("EastUS") + .withExistingResourceGroup("DummyResourceGroupName") .withTags(mapOf("additionalProps1", "additional properties")) .withProperties( new LedgerProperties() 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 6a9cb21ae769..8e943b7b3ee8 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.confidentialledger.generated; -import com.azure.core.util.Context; - /** Samples for Ledger Delete. */ public final class LedgerDeleteSamples { /* - * x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/stable/2022-05-13/examples/ConfidentialLedger_Delete.json + * x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-01-26-preview/examples/ConfidentialLedger_Delete.json */ /** * Sample code: ConfidentialLedgerDelete. @@ -18,6 +16,6 @@ public final class LedgerDeleteSamples { */ public static void confidentialLedgerDelete( com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { - manager.ledgers().delete("DummyResourceGroupName", "DummyLedgerName", Context.NONE); + manager.ledgers().delete("DummyResourceGroupName", "DummyLedgerName", com.azure.core.util.Context.NONE); } } 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 557800227f9f..87773dd4cd43 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.confidentialledger.generated; -import com.azure.core.util.Context; - /** Samples for Ledger GetByResourceGroup. */ public final class LedgerGetByResourceGroupSamples { /* - * x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/stable/2022-05-13/examples/ConfidentialLedger_Get.json + * x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-01-26-preview/examples/ConfidentialLedger_Get.json */ /** * Sample code: ConfidentialLedgerGet. @@ -18,6 +16,9 @@ public final class LedgerGetByResourceGroupSamples { */ public static void confidentialLedgerGet( com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { - manager.ledgers().getByResourceGroupWithResponse("DummyResourceGroupName", "DummyLedgerName", Context.NONE); + manager + .ledgers() + .getByResourceGroupWithResponse( + "DummyResourceGroupName", "DummyLedgerName", com.azure.core.util.Context.NONE); } } 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 50af7d46a8cc..8bb4a0374018 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.confidentialledger.generated; -import com.azure.core.util.Context; - /** Samples for Ledger ListByResourceGroup. */ public final class LedgerListByResourceGroupSamples { /* - * x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/stable/2022-05-13/examples/ConfidentialLedger_List.json + * x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-01-26-preview/examples/ConfidentialLedger_List.json */ /** * Sample code: ConfidentialLedgerList. @@ -18,6 +16,6 @@ public final class LedgerListByResourceGroupSamples { */ public static void confidentialLedgerList( com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { - manager.ledgers().listByResourceGroup("DummyResourceGroupName", null, Context.NONE); + manager.ledgers().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/LedgerListSamples.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/LedgerListSamples.java index a0b22b3f4288..158bec3bcaf2 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.confidentialledger.generated; -import com.azure.core.util.Context; - /** Samples for Ledger List. */ public final class LedgerListSamples { /* - * x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/stable/2022-05-13/examples/ConfidentialLedger_ListBySub.json + * x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-01-26-preview/examples/ConfidentialLedger_ListBySub.json */ /** * Sample code: ConfidentialLedgerListBySub. @@ -18,6 +16,6 @@ public final class LedgerListSamples { */ public static void confidentialLedgerListBySub( com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { - manager.ledgers().list(null, Context.NONE); + manager.ledgers().list(null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/LedgerUpdateSamples.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/LedgerUpdateSamples.java index a5b74b931bd8..746c71cfc4ed 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 @@ -4,7 +4,6 @@ package com.azure.resourcemanager.confidentialledger.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.confidentialledger.models.AadBasedSecurityPrincipal; import com.azure.resourcemanager.confidentialledger.models.CertBasedSecurityPrincipal; import com.azure.resourcemanager.confidentialledger.models.ConfidentialLedger; @@ -18,7 +17,7 @@ /** Samples for Ledger Update. */ public final class LedgerUpdateSamples { /* - * x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/stable/2022-05-13/examples/ConfidentialLedger_Update.json + * x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-01-26-preview/examples/ConfidentialLedger_Update.json */ /** * Sample code: ConfidentialLedgerUpdate. @@ -30,7 +29,8 @@ public static void confidentialLedgerUpdate( ConfidentialLedger resource = manager .ledgers() - .getByResourceGroupWithResponse("DummyResourceGroupName", "DummyLedgerName", Context.NONE) + .getByResourceGroupWithResponse( + "DummyResourceGroupName", "DummyLedgerName", com.azure.core.util.Context.NONE) .getValue(); resource .update() 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 new file mode 100644 index 000000000000..c02021f7d706 --- /dev/null +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfCreateSamples.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confidentialledger.generated; + +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.confidentialledger.models.DeploymentType; +import com.azure.resourcemanager.confidentialledger.models.LanguageRuntime; +import com.azure.resourcemanager.confidentialledger.models.ManagedCcfProperties; +import com.azure.resourcemanager.confidentialledger.models.MemberIdentityCertificate; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for ManagedCcf Create. */ +public final class ManagedCcfCreateSamples { + /* + * x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-01-26-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"))) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/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 new file mode 100644 index 000000000000..3a159ab2c5a7 --- /dev/null +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfDeleteSamples.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confidentialledger.generated; + +/** Samples for ManagedCcf Delete. */ +public final class ManagedCcfDeleteSamples { + /* + * x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-01-26-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 new file mode 100644 index 000000000000..0e0a60e8596a --- /dev/null +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfGetByResourceGroupSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confidentialledger.generated; + +/** Samples for ManagedCcf GetByResourceGroup. */ +public final class ManagedCcfGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-01-26-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 new file mode 100644 index 000000000000..67e28bf91c16 --- /dev/null +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfListByResourceGroupSamples.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confidentialledger.generated; + +/** Samples for ManagedCcf ListByResourceGroup. */ +public final class ManagedCcfListByResourceGroupSamples { + /* + * x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-01-26-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 new file mode 100644 index 000000000000..a0f4f6f56416 --- /dev/null +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfListSamples.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confidentialledger.generated; + +/** Samples for ManagedCcf List. */ +public final class ManagedCcfListSamples { + /* + * x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-01-26-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/ManagedCcfUpdateSamples.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfUpdateSamples.java new file mode 100644 index 000000000000..54669915a478 --- /dev/null +++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/ManagedCcfUpdateSamples.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.confidentialledger.generated; + +import com.azure.resourcemanager.confidentialledger.fluent.models.ManagedCcfInner; +import com.azure.resourcemanager.confidentialledger.models.DeploymentType; +import com.azure.resourcemanager.confidentialledger.models.LanguageRuntime; +import com.azure.resourcemanager.confidentialledger.models.ManagedCcfProperties; +import java.util.HashMap; +import java.util.Map; + +/** Samples for ManagedCcf Update. */ +public final class ManagedCcfUpdateSamples { + /* + * x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-01-26-preview/examples/ManagedCCF_Update.json + */ + /** + * Sample code: ManagedCCFUpdate. + * + * @param manager Entry point to ConfidentialLedgerManager. + */ + public static void managedCCFUpdate( + com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { + manager + .managedCcfs() + .update( + "DummyResourceGroupName", + "DummyMccfAppName", + new ManagedCcfInner() + .withLocation("EastUS") + .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"))), + com.azure.core.util.Context.NONE); + } + + @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 9ed9ae90ee83..8e2deb8441d8 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.confidentialledger.generated; -import com.azure.core.util.Context; - /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/stable/2022-05-13/examples/Operations_Get.json + * x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-01-26-preview/examples/Operations_Get.json */ /** * Sample code: OperationsGet. @@ -17,6 +15,6 @@ public final class OperationsListSamples { * @param manager Entry point to ConfidentialLedgerManager. */ public static void operationsGet(com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) { - manager.operations().list(Context.NONE); + manager.operations().list(com.azure.core.util.Context.NONE); } } 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 59da2a3a8135..de79ad8929e5 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 @@ -4,13 +4,12 @@ package com.azure.resourcemanager.confidentialledger.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.confidentialledger.models.CheckNameAvailabilityRequest; /** Samples for ResourceProvider CheckNameAvailability. */ public final class ResourceProviderCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/stable/2022-05-13/examples/CheckNameAvailability.json + * x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/preview/2023-01-26-preview/examples/CheckNameAvailability.json */ /** * Sample code: CheckNameAvailability. @@ -25,6 +24,6 @@ public static void checkNameAvailability( new CheckNameAvailabilityRequest() .withName("sample-name") .withType("Microsoft.ConfidentialLedger/ledgers"), - Context.NONE); + com.azure.core.util.Context.NONE); } }