scopes = new ArrayList<>();
+ private RetryPolicy retryPolicy;
+ private RetryOptions retryOptions;
+ private Duration defaultPollInterval;
+
+ private Configurable() {
+ }
+
+ /**
+ * Sets the http client.
+ *
+ * @param httpClient the HTTP client.
+ * @return the configurable object itself.
+ */
+ public Configurable withHttpClient(HttpClient httpClient) {
+ this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the logging options to the HTTP pipeline.
+ *
+ * @param httpLogOptions the HTTP log options.
+ * @return the configurable object itself.
+ */
+ public Configurable withLogOptions(HttpLogOptions httpLogOptions) {
+ this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Adds the pipeline policy to the HTTP pipeline.
+ *
+ * @param policy the HTTP pipeline policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withPolicy(HttpPipelinePolicy policy) {
+ this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null."));
+ return this;
+ }
+
+ /**
+ * Adds the scope to permission sets.
+ *
+ * @param scope the scope.
+ * @return the configurable object itself.
+ */
+ public Configurable withScope(String scope) {
+ this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null."));
+ return this;
+ }
+
+ /**
+ * Sets the retry policy to the HTTP pipeline.
+ *
+ * @param retryPolicy the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
+ this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the retry options for the HTTP pipeline retry policy.
+ *
+ * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
+ *
+ * @param retryOptions the retry options for the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryOptions(RetryOptions retryOptions) {
+ this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the default poll interval, used when service does not provide "Retry-After" header.
+ *
+ * @param defaultPollInterval the default poll interval.
+ * @return the configurable object itself.
+ */
+ public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval =
+ Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
+ if (this.defaultPollInterval.isNegative()) {
+ throw LOGGER
+ .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
+ }
+ return this;
+ }
+
+ /**
+ * Creates an instance of ConfidentialLedger service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the ConfidentialLedger service API instance.
+ */
+ public ConfidentialLedgerManager authenticate(TokenCredential credential, AzureProfile profile) {
+ Objects.requireNonNull(credential, "'credential' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+
+ StringBuilder userAgentBuilder = new StringBuilder();
+ userAgentBuilder
+ .append("azsdk-java")
+ .append("-")
+ .append("com.azure.resourcemanager.confidentialledger")
+ .append("/")
+ .append("1.0.0-beta.1");
+ if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
+ userAgentBuilder
+ .append(" (")
+ .append(Configuration.getGlobalConfiguration().get("java.version"))
+ .append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.name"))
+ .append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.version"))
+ .append("; auto-generated)");
+ } else {
+ userAgentBuilder.append(" (auto-generated)");
+ }
+
+ if (scopes.isEmpty()) {
+ scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
+ }
+ if (retryPolicy == null) {
+ if (retryOptions != null) {
+ retryPolicy = new RetryPolicy(retryOptions);
+ } else {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
+ }
+ List policies = new ArrayList<>();
+ policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new AddHeadersFromContextPolicy());
+ policies.add(new RequestIdPolicy());
+ policies
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
+ .collect(Collectors.toList()));
+ HttpPolicyProviders.addBeforeRetryPolicies(policies);
+ policies.add(retryPolicy);
+ policies.add(new AddDatePolicy());
+ policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
+ policies
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
+ HttpPolicyProviders.addAfterRetryPolicies(policies);
+ policies.add(new HttpLoggingPolicy(httpLogOptions));
+ HttpPipeline httpPipeline =
+ new HttpPipelineBuilder()
+ .httpClient(httpClient)
+ .policies(policies.toArray(new HttpPipelinePolicy[0]))
+ .build();
+ return new ConfidentialLedgerManager(httpPipeline, profile, defaultPollInterval);
+ }
+ }
+
+ /**
+ * Gets the resource collection API of Operations.
+ *
+ * @return Resource collection API of Operations.
+ */
+ public Operations operations() {
+ if (this.operations == null) {
+ this.operations = new OperationsImpl(clientObject.getOperations(), this);
+ }
+ return operations;
+ }
+
+ /**
+ * Gets the resource collection API of ResourceProviders.
+ *
+ * @return Resource collection API of ResourceProviders.
+ */
+ public ResourceProviders resourceProviders() {
+ if (this.resourceProviders == null) {
+ this.resourceProviders = new ResourceProvidersImpl(clientObject.getResourceProviders(), this);
+ }
+ return resourceProviders;
+ }
+
+ /**
+ * Gets the resource collection API of Ledgers. It manages ConfidentialLedger.
+ *
+ * @return Resource collection API of Ledgers.
+ */
+ public Ledgers ledgers() {
+ if (this.ledgers == null) {
+ this.ledgers = new LedgersImpl(clientObject.getLedgers(), this);
+ }
+ return ledgers;
+ }
+
+ /**
+ * @return Wrapped service client ConfidentialLedgerManagementClient providing direct access to the underlying
+ * auto-generated API implementation, based on Azure REST API.
+ */
+ public ConfidentialLedgerManagementClient serviceClient() {
+ return this.clientObject;
+ }
+}
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
new file mode 100644
index 000000000000..1a63936f81bb
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/ConfidentialLedgerManagementClient.java
@@ -0,0 +1,67 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.confidentialledger.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/** 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).
+ *
+ * @return the subscriptionId value.
+ */
+ String getSubscriptionId();
+
+ /**
+ * Gets server parameter.
+ *
+ * @return the endpoint value.
+ */
+ String getEndpoint();
+
+ /**
+ * Gets Api Version.
+ *
+ * @return the apiVersion value.
+ */
+ String getApiVersion();
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ HttpPipeline getHttpPipeline();
+
+ /**
+ * Gets The default poll interval for long-running operation.
+ *
+ * @return the defaultPollInterval value.
+ */
+ Duration getDefaultPollInterval();
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ OperationsClient getOperations();
+
+ /**
+ * Gets the ResourceProvidersClient object to access its operations.
+ *
+ * @return the ResourceProvidersClient object.
+ */
+ ResourceProvidersClient getResourceProviders();
+
+ /**
+ * Gets the LedgersClient object to access its operations.
+ *
+ * @return the LedgersClient object.
+ */
+ LedgersClient getLedgers();
+}
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
new file mode 100644
index 000000000000..a642128d284d
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/LedgersClient.java
@@ -0,0 +1,275 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.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.ConfidentialLedgerInner;
+
+/** An instance of this class provides access to all the operations defined in LedgersClient. */
+public interface LedgersClient {
+ /**
+ * Retrieves the properties of a Confidential Ledger.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return confidential Ledger.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ConfidentialLedgerInner getByResourceGroup(String resourceGroupName, String ledgerName);
+
+ /**
+ * Retrieves the properties of a Confidential Ledger.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return confidential Ledger along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String ledgerName, Context context);
+
+ /**
+ * Deletes an existing Confidential Ledger.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @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 ledgerName);
+
+ /**
+ * Deletes an existing Confidential Ledger.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 ledgerName, Context context);
+
+ /**
+ * Deletes an existing Confidential Ledger.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String ledgerName);
+
+ /**
+ * Deletes an existing Confidential Ledger.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 ledgerName, Context context);
+
+ /**
+ * Creates a Confidential Ledger with the specified ledger parameters.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @param confidentialLedger Confidential Ledger Create Request Body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of confidential Ledger.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ConfidentialLedgerInner> beginCreate(
+ String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger);
+
+ /**
+ * Creates a Confidential Ledger with the specified ledger parameters.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @param confidentialLedger Confidential Ledger Create Request Body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of confidential Ledger.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ConfidentialLedgerInner> beginCreate(
+ String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger, Context context);
+
+ /**
+ * Creates a Confidential Ledger with the specified ledger parameters.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @param confidentialLedger Confidential Ledger Create Request Body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return confidential Ledger.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ConfidentialLedgerInner create(
+ String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger);
+
+ /**
+ * Creates a Confidential Ledger with the specified ledger parameters.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @param confidentialLedger Confidential Ledger Create Request Body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return confidential Ledger.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ConfidentialLedgerInner create(
+ String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger, Context context);
+
+ /**
+ * Updates properties of Confidential Ledger.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @param confidentialLedger Confidential Ledger request body for Updating Ledger.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of confidential Ledger.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ConfidentialLedgerInner> beginUpdate(
+ String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger);
+
+ /**
+ * Updates properties of Confidential Ledger.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @param confidentialLedger Confidential Ledger request body for Updating Ledger.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of confidential Ledger.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ConfidentialLedgerInner> beginUpdate(
+ String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger, Context context);
+
+ /**
+ * Updates properties of Confidential Ledger.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @param confidentialLedger Confidential Ledger request body for Updating Ledger.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return confidential Ledger.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ConfidentialLedgerInner update(
+ String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger);
+
+ /**
+ * Updates properties of Confidential Ledger.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @param confidentialLedger Confidential Ledger request body for Updating Ledger.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return confidential Ledger.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ConfidentialLedgerInner update(
+ String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger, Context context);
+
+ /**
+ * Retrieves the properties of all Confidential Ledgers.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return object that includes an array of Confidential Ledgers and a possible link for next set as paginated
+ * response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * Retrieves the properties of all Confidential Ledgers.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 Confidential Ledgers 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 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.
+ * @return object that includes an array of Confidential Ledgers and a possible link for next set as paginated
+ * response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 Confidential Ledgers 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
new file mode 100644
index 000000000000..5e45986c1d9d
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/OperationsClient.java
@@ -0,0 +1,38 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.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.util.Context;
+import com.azure.resourcemanager.confidentialledger.fluent.models.ResourceProviderOperationDefinitionInner;
+
+/** An instance of this class provides access to all the operations defined in OperationsClient. */
+public interface OperationsClient {
+ /**
+ * 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.
+ * @return list containing this Resource Provider's available operations as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Retrieves a list of available API operations.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list containing this Resource Provider's available operations as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
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
new file mode 100644
index 000000000000..ab5bfeed6881
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/ResourceProvidersClient.java
@@ -0,0 +1,41 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.confidentialledger.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.confidentialledger.fluent.models.CheckNameAvailabilityResponseInner;
+import com.azure.resourcemanager.confidentialledger.models.CheckNameAvailabilityRequest;
+
+/** An instance of this class provides access to all the operations defined in ResourceProvidersClient. */
+public interface ResourceProvidersClient {
+ /**
+ * To check whether a resource name is available.
+ *
+ * @param nameAvailabilityRequest Name availability request payload.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CheckNameAvailabilityResponseInner checkNameAvailability(CheckNameAvailabilityRequest nameAvailabilityRequest);
+
+ /**
+ * 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}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response checkNameAvailabilityWithResponse(
+ CheckNameAvailabilityRequest nameAvailabilityRequest, Context context);
+}
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
new file mode 100644
index 000000000000..a1e861b8f825
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/CheckNameAvailabilityResponseInner.java
@@ -0,0 +1,99 @@
+// 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.resourcemanager.confidentialledger.models.CheckNameAvailabilityReason;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The check availability result. */
+@Fluent
+public final class CheckNameAvailabilityResponseInner {
+ /*
+ * Indicates if the resource name is available.
+ */
+ @JsonProperty(value = "nameAvailable")
+ private Boolean nameAvailable;
+
+ /*
+ * The reason why the given name is not available.
+ */
+ @JsonProperty(value = "reason")
+ private CheckNameAvailabilityReason reason;
+
+ /*
+ * Detailed reason why the given name is available.
+ */
+ @JsonProperty(value = "message")
+ private String message;
+
+ /**
+ * Get the nameAvailable property: Indicates if the resource name is available.
+ *
+ * @return the nameAvailable value.
+ */
+ public Boolean nameAvailable() {
+ return this.nameAvailable;
+ }
+
+ /**
+ * Set the nameAvailable property: Indicates if the resource name is available.
+ *
+ * @param nameAvailable the nameAvailable value to set.
+ * @return the CheckNameAvailabilityResponseInner object itself.
+ */
+ public CheckNameAvailabilityResponseInner withNameAvailable(Boolean nameAvailable) {
+ this.nameAvailable = nameAvailable;
+ return this;
+ }
+
+ /**
+ * Get the reason property: The reason why the given name is not available.
+ *
+ * @return the reason value.
+ */
+ public CheckNameAvailabilityReason reason() {
+ return this.reason;
+ }
+
+ /**
+ * Set the reason property: The reason why the given name is not available.
+ *
+ * @param reason the reason value to set.
+ * @return the CheckNameAvailabilityResponseInner object itself.
+ */
+ public CheckNameAvailabilityResponseInner withReason(CheckNameAvailabilityReason reason) {
+ this.reason = reason;
+ return this;
+ }
+
+ /**
+ * Get the message property: Detailed reason why the given name is available.
+ *
+ * @return the message value.
+ */
+ public String message() {
+ return this.message;
+ }
+
+ /**
+ * Set the message property: Detailed reason why the given name is available.
+ *
+ * @param message the message value to set.
+ * @return the CheckNameAvailabilityResponseInner object itself.
+ */
+ public CheckNameAvailabilityResponseInner withMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
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
new file mode 100644
index 000000000000..5a9bada47bee
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/ConfidentialLedgerInner.java
@@ -0,0 +1,122 @@
+// 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.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.confidentialledger.models.LedgerProperties;
+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 {
+ /*
+ * LedgerProperties Properties of Confidential Ledger Resource.
+ */
+ @JsonProperty(value = "properties")
+ private LedgerProperties properties;
+
+ /*
+ * Metadata pertaining to creation and last modification of the resource
+ */
+ @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
+ */
+ @JsonProperty(value = "tags")
+ @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
+ private Map tags;
+
+ /**
+ * Get the properties property: LedgerProperties Properties of Confidential Ledger Resource.
+ *
+ * @return the properties value.
+ */
+ public LedgerProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: LedgerProperties Properties of Confidential Ledger Resource.
+ *
+ * @param properties the properties value to set.
+ * @return the ConfidentialLedgerInner object itself.
+ */
+ public ConfidentialLedgerInner withProperties(LedgerProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the location property: The Azure location where the Confidential Ledger is running.
+ *
+ * @return the location value.
+ */
+ public String location() {
+ return this.location;
+ }
+
+ /**
+ * Set the location property: The Azure location where the Confidential Ledger is running.
+ *
+ * @param location the location value to set.
+ * @return the ConfidentialLedgerInner object itself.
+ */
+ public ConfidentialLedgerInner withLocation(String location) {
+ this.location = location;
+ return this;
+ }
+
+ /**
+ * Get the tags property: Additional tags for Confidential Ledger.
+ *
+ * @return the tags value.
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * Set the tags property: Additional tags for Confidential Ledger.
+ *
+ * @param tags the tags value to set.
+ * @return the ConfidentialLedgerInner object itself.
+ */
+ public ConfidentialLedgerInner withTags(Map tags) {
+ this.tags = tags;
+ return this;
+ }
+
+ /**
+ * 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
new file mode 100644
index 000000000000..f475c30609b9
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/ResourceProviderOperationDefinitionInner.java
@@ -0,0 +1,102 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.confidentialledger.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.confidentialledger.models.ResourceProviderOperationDisplay;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Describes the Resource Provider Operation. */
+@Fluent
+public final class ResourceProviderOperationDefinitionInner {
+ /*
+ * Resource provider operation name.
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /*
+ * Indicates whether the operation is data action or not.
+ */
+ @JsonProperty(value = "isDataAction")
+ private Boolean isDataAction;
+
+ /*
+ * Details about the operations
+ */
+ @JsonProperty(value = "display")
+ private ResourceProviderOperationDisplay display;
+
+ /**
+ * Get the name property: Resource provider operation name.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: Resource provider operation name.
+ *
+ * @param name the name value to set.
+ * @return the ResourceProviderOperationDefinitionInner object itself.
+ */
+ public ResourceProviderOperationDefinitionInner withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the isDataAction property: Indicates whether the operation is data action or not.
+ *
+ * @return the isDataAction value.
+ */
+ public Boolean isDataAction() {
+ return this.isDataAction;
+ }
+
+ /**
+ * Set the isDataAction property: Indicates whether the operation is data action or not.
+ *
+ * @param isDataAction the isDataAction value to set.
+ * @return the ResourceProviderOperationDefinitionInner object itself.
+ */
+ public ResourceProviderOperationDefinitionInner withIsDataAction(Boolean isDataAction) {
+ this.isDataAction = isDataAction;
+ return this;
+ }
+
+ /**
+ * Get the display property: Details about the operations.
+ *
+ * @return the display value.
+ */
+ public ResourceProviderOperationDisplay display() {
+ return this.display;
+ }
+
+ /**
+ * Set the display property: Details about the operations.
+ *
+ * @param display the display value to set.
+ * @return the ResourceProviderOperationDefinitionInner object itself.
+ */
+ public ResourceProviderOperationDefinitionInner withDisplay(ResourceProviderOperationDisplay display) {
+ this.display = display;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (display() != null) {
+ display().validate();
+ }
+ }
+}
diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/package-info.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/package-info.java
new file mode 100644
index 000000000000..b3b77ca549da
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/models/package-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/**
+ * Package containing the inner data models for ConfidentialLedgerManagementClient. Microsoft Azure Confidential Compute
+ * Ledger Control Plane REST API version 2020-12-01-preview.
+ */
+package com.azure.resourcemanager.confidentialledger.fluent.models;
diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/package-info.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/package-info.java
new file mode 100644
index 000000000000..d5062e2caf4e
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/fluent/package-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/**
+ * Package containing the service clients for ConfidentialLedgerManagementClient. Microsoft Azure Confidential Compute
+ * Ledger Control Plane REST API version 2020-12-01-preview.
+ */
+package com.azure.resourcemanager.confidentialledger.fluent;
diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/CheckNameAvailabilityResponseImpl.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/CheckNameAvailabilityResponseImpl.java
new file mode 100644
index 000000000000..0b0bff6b7cfc
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/CheckNameAvailabilityResponseImpl.java
@@ -0,0 +1,42 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.confidentialledger.implementation;
+
+import com.azure.resourcemanager.confidentialledger.fluent.models.CheckNameAvailabilityResponseInner;
+import com.azure.resourcemanager.confidentialledger.models.CheckNameAvailabilityReason;
+import com.azure.resourcemanager.confidentialledger.models.CheckNameAvailabilityResponse;
+
+public final class CheckNameAvailabilityResponseImpl implements CheckNameAvailabilityResponse {
+ private CheckNameAvailabilityResponseInner innerObject;
+
+ private final com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager serviceManager;
+
+ CheckNameAvailabilityResponseImpl(
+ CheckNameAvailabilityResponseInner innerObject,
+ com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public Boolean nameAvailable() {
+ return this.innerModel().nameAvailable();
+ }
+
+ public CheckNameAvailabilityReason reason() {
+ return this.innerModel().reason();
+ }
+
+ public String message() {
+ return this.innerModel().message();
+ }
+
+ public CheckNameAvailabilityResponseInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ConfidentialLedgerImpl.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ConfidentialLedgerImpl.java
new file mode 100644
index 000000000000..53b32565aaed
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ConfidentialLedgerImpl.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.management.Region;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.confidentialledger.fluent.models.ConfidentialLedgerInner;
+import com.azure.resourcemanager.confidentialledger.models.ConfidentialLedger;
+import com.azure.resourcemanager.confidentialledger.models.LedgerProperties;
+import java.util.Collections;
+import java.util.Map;
+
+public final class ConfidentialLedgerImpl
+ implements ConfidentialLedger, ConfidentialLedger.Definition, ConfidentialLedger.Update {
+ private ConfidentialLedgerInner innerObject;
+
+ private final com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public LedgerProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ 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) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
+ public Region region() {
+ return Region.fromName(this.regionName());
+ }
+
+ public String regionName() {
+ return this.location();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public ConfidentialLedgerInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String ledgerName;
+
+ public ConfidentialLedgerImpl withExistingResourceGroup(String resourceGroupName) {
+ this.resourceGroupName = resourceGroupName;
+ return this;
+ }
+
+ public ConfidentialLedger create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getLedgers()
+ .create(resourceGroupName, ledgerName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public ConfidentialLedger create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getLedgers()
+ .create(resourceGroupName, ledgerName, this.innerModel(), context);
+ return this;
+ }
+
+ ConfidentialLedgerImpl(
+ String name, com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager serviceManager) {
+ this.innerObject = new ConfidentialLedgerInner();
+ this.serviceManager = serviceManager;
+ this.ledgerName = name;
+ }
+
+ public ConfidentialLedgerImpl update() {
+ return this;
+ }
+
+ public ConfidentialLedger apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getLedgers()
+ .update(resourceGroupName, ledgerName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public ConfidentialLedger apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getLedgers()
+ .update(resourceGroupName, ledgerName, this.innerModel(), context);
+ return this;
+ }
+
+ ConfidentialLedgerImpl(
+ ConfidentialLedgerInner innerObject,
+ com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.ledgerName = Utils.getValueFromIdByName(innerObject.id(), "ledgers");
+ }
+
+ public ConfidentialLedger refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getLedgers()
+ .getByResourceGroupWithResponse(resourceGroupName, ledgerName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public ConfidentialLedger refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getLedgers()
+ .getByResourceGroupWithResponse(resourceGroupName, ledgerName, context)
+ .getValue();
+ return this;
+ }
+
+ public ConfidentialLedgerImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
+ return this;
+ }
+
+ public ConfidentialLedgerImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
+ return this;
+ }
+
+ public ConfidentialLedgerImpl withTags(Map tags) {
+ this.innerModel().withTags(tags);
+ 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
new file mode 100644
index 000000000000..98a6861c4d5d
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ConfidentialLedgerManagementClientBuilder.java
@@ -0,0 +1,143 @@
+// 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.ServiceClientBuilder;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.policy.RetryPolicy;
+import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.management.AzureEnvironment;
+import com.azure.core.management.serializer.SerializerFactory;
+import com.azure.core.util.serializer.SerializerAdapter;
+import java.time.Duration;
+
+/** A builder for creating a new instance of the ConfidentialLedgerManagementClientImpl type. */
+@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)
+ */
+ private String subscriptionId;
+
+ /**
+ * Sets The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
+ *
+ * @param subscriptionId the subscriptionId value.
+ * @return the ConfidentialLedgerManagementClientBuilder.
+ */
+ public ConfidentialLedgerManagementClientBuilder subscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
+ return this;
+ }
+
+ /*
+ * server parameter
+ */
+ private String endpoint;
+
+ /**
+ * Sets server parameter.
+ *
+ * @param endpoint the endpoint value.
+ * @return the ConfidentialLedgerManagementClientBuilder.
+ */
+ public ConfidentialLedgerManagementClientBuilder endpoint(String endpoint) {
+ this.endpoint = endpoint;
+ return this;
+ }
+
+ /*
+ * The environment to connect to
+ */
+ private AzureEnvironment environment;
+
+ /**
+ * Sets The environment to connect to.
+ *
+ * @param environment the environment value.
+ * @return the ConfidentialLedgerManagementClientBuilder.
+ */
+ public ConfidentialLedgerManagementClientBuilder environment(AzureEnvironment environment) {
+ this.environment = environment;
+ return this;
+ }
+
+ /*
+ * The HTTP pipeline to send requests through
+ */
+ private HttpPipeline pipeline;
+
+ /**
+ * Sets The HTTP pipeline to send requests through.
+ *
+ * @param pipeline the pipeline value.
+ * @return the ConfidentialLedgerManagementClientBuilder.
+ */
+ public ConfidentialLedgerManagementClientBuilder pipeline(HttpPipeline pipeline) {
+ this.pipeline = pipeline;
+ return this;
+ }
+
+ /*
+ * The default poll interval for long-running operation
+ */
+ private Duration defaultPollInterval;
+
+ /**
+ * Sets The default poll interval for long-running operation.
+ *
+ * @param defaultPollInterval the defaultPollInterval value.
+ * @return the ConfidentialLedgerManagementClientBuilder.
+ */
+ public ConfidentialLedgerManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval = defaultPollInterval;
+ return this;
+ }
+
+ /*
+ * The serializer to serialize an object into a string
+ */
+ private SerializerAdapter serializerAdapter;
+
+ /**
+ * Sets The serializer to serialize an object into a string.
+ *
+ * @param serializerAdapter the serializerAdapter value.
+ * @return the ConfidentialLedgerManagementClientBuilder.
+ */
+ public ConfidentialLedgerManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
+ this.serializerAdapter = serializerAdapter;
+ return this;
+ }
+
+ /**
+ * Builds an instance of ConfidentialLedgerManagementClientImpl with the provided parameters.
+ *
+ * @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();
+ }
+ ConfidentialLedgerManagementClientImpl client =
+ new ConfidentialLedgerManagementClientImpl(
+ pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint);
+ 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
new file mode 100644
index 000000000000..0ca326de8147
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ConfidentialLedgerManagementClientImpl.java
@@ -0,0 +1,319 @@
+// 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.ServiceClient;
+import com.azure.core.http.HttpHeaders;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpResponse;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.AzureEnvironment;
+import com.azure.core.management.exception.ManagementError;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.management.polling.PollerFactory;
+import com.azure.core.util.Context;
+import com.azure.core.util.CoreUtils;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.util.polling.AsyncPollResponse;
+import com.azure.core.util.polling.LongRunningOperationStatus;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.serializer.SerializerAdapter;
+import com.azure.core.util.serializer.SerializerEncoding;
+import com.azure.resourcemanager.confidentialledger.fluent.ConfidentialLedgerManagementClient;
+import com.azure.resourcemanager.confidentialledger.fluent.LedgersClient;
+import com.azure.resourcemanager.confidentialledger.fluent.OperationsClient;
+import com.azure.resourcemanager.confidentialledger.fluent.ResourceProvidersClient;
+import java.io.IOException;
+import java.lang.reflect.Type;
+import java.nio.ByteBuffer;
+import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
+import java.time.Duration;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/** Initializes a new instance of the 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). */
+ private final String subscriptionId;
+
+ /**
+ * Gets The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
+ *
+ * @return the subscriptionId value.
+ */
+ public String getSubscriptionId() {
+ return this.subscriptionId;
+ }
+
+ /** server parameter. */
+ private final String endpoint;
+
+ /**
+ * Gets server parameter.
+ *
+ * @return the endpoint value.
+ */
+ public String getEndpoint() {
+ return this.endpoint;
+ }
+
+ /** Api Version. */
+ private final String apiVersion;
+
+ /**
+ * Gets Api Version.
+ *
+ * @return the apiVersion value.
+ */
+ public String getApiVersion() {
+ return this.apiVersion;
+ }
+
+ /** The HTTP pipeline to send requests through. */
+ private final HttpPipeline httpPipeline;
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ public HttpPipeline getHttpPipeline() {
+ return this.httpPipeline;
+ }
+
+ /** The serializer to serialize an object into a string. */
+ private final SerializerAdapter serializerAdapter;
+
+ /**
+ * Gets The serializer to serialize an object into a string.
+ *
+ * @return the serializerAdapter value.
+ */
+ SerializerAdapter getSerializerAdapter() {
+ return this.serializerAdapter;
+ }
+
+ /** The default poll interval for long-running operation. */
+ private final Duration defaultPollInterval;
+
+ /**
+ * Gets The default poll interval for long-running operation.
+ *
+ * @return the defaultPollInterval value.
+ */
+ public Duration getDefaultPollInterval() {
+ return this.defaultPollInterval;
+ }
+
+ /** The OperationsClient object to access its operations. */
+ private final OperationsClient operations;
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ public OperationsClient getOperations() {
+ return this.operations;
+ }
+
+ /** The ResourceProvidersClient object to access its operations. */
+ private final ResourceProvidersClient resourceProviders;
+
+ /**
+ * Gets the ResourceProvidersClient object to access its operations.
+ *
+ * @return the ResourceProvidersClient object.
+ */
+ public ResourceProvidersClient getResourceProviders() {
+ return this.resourceProviders;
+ }
+
+ /** The LedgersClient object to access its operations. */
+ private final LedgersClient ledgers;
+
+ /**
+ * Gets the LedgersClient object to access its operations.
+ *
+ * @return the LedgersClient object.
+ */
+ public LedgersClient getLedgers() {
+ return this.ledgers;
+ }
+
+ /**
+ * Initializes an instance of ConfidentialLedgerManagementClient client.
+ *
+ * @param httpPipeline The HTTP pipeline to send requests through.
+ * @param serializerAdapter The serializer to serialize an object into a string.
+ * @param defaultPollInterval The default poll interval for long-running operation.
+ * @param environment The Azure environment.
+ * @param subscriptionId The Azure subscription ID. This is a GUID-formatted string (e.g.
+ * 00000000-0000-0000-0000-000000000000).
+ * @param endpoint server parameter.
+ */
+ ConfidentialLedgerManagementClientImpl(
+ HttpPipeline httpPipeline,
+ SerializerAdapter serializerAdapter,
+ Duration defaultPollInterval,
+ AzureEnvironment environment,
+ String subscriptionId,
+ String endpoint) {
+ this.httpPipeline = httpPipeline;
+ this.serializerAdapter = serializerAdapter;
+ this.defaultPollInterval = defaultPollInterval;
+ this.subscriptionId = subscriptionId;
+ this.endpoint = endpoint;
+ this.apiVersion = "2022-05-13";
+ this.operations = new OperationsClientImpl(this);
+ this.resourceProviders = new ResourceProvidersClientImpl(this);
+ this.ledgers = new LedgersClientImpl(this);
+ }
+
+ /**
+ * Gets default client context.
+ *
+ * @return the default client context.
+ */
+ public Context getContext() {
+ return Context.NONE;
+ }
+
+ /**
+ * Merges default client context with provided context.
+ *
+ * @param context the context to be merged with default client context.
+ * @return the merged context.
+ */
+ public Context mergeContext(Context context) {
+ return CoreUtils.mergeContexts(this.getContext(), context);
+ }
+
+ /**
+ * Gets long running operation result.
+ *
+ * @param activationResponse the response of activation operation.
+ * @param httpPipeline the http pipeline.
+ * @param pollResultType type of poll result.
+ * @param finalResultType type of final result.
+ * @param context the context shared by all requests.
+ * @param type of poll result.
+ * @param type of final result.
+ * @return poller flux for poll result and final result.
+ */
+ public PollerFlux, U> getLroResult(
+ Mono>> activationResponse,
+ HttpPipeline httpPipeline,
+ Type pollResultType,
+ Type finalResultType,
+ Context context) {
+ return PollerFactory
+ .create(
+ serializerAdapter,
+ httpPipeline,
+ pollResultType,
+ finalResultType,
+ defaultPollInterval,
+ activationResponse,
+ context);
+ }
+
+ /**
+ * Gets the final result, or an error, based on last async poll response.
+ *
+ * @param response the last async poll response.
+ * @param type of poll result.
+ * @param type of final result.
+ * @return the final result, or an error.
+ */
+ public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) {
+ if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) {
+ String errorMessage;
+ ManagementError managementError = null;
+ HttpResponse errorResponse = null;
+ PollResult.Error lroError = response.getValue().getError();
+ if (lroError != null) {
+ errorResponse =
+ new HttpResponseImpl(
+ lroError.getResponseStatusCode(), lroError.getResponseHeaders(), lroError.getResponseBody());
+
+ errorMessage = response.getValue().getError().getMessage();
+ String errorBody = response.getValue().getError().getResponseBody();
+ if (errorBody != null) {
+ // try to deserialize error body to ManagementError
+ try {
+ managementError =
+ this
+ .getSerializerAdapter()
+ .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON);
+ if (managementError.getCode() == null || managementError.getMessage() == null) {
+ managementError = null;
+ }
+ } catch (IOException | RuntimeException ioe) {
+ LOGGER.logThrowableAsWarning(ioe);
+ }
+ }
+ } else {
+ // fallback to default error message
+ errorMessage = "Long running operation failed.";
+ }
+ if (managementError == null) {
+ // fallback to default ManagementError
+ managementError = new ManagementError(response.getStatus().toString(), errorMessage);
+ }
+ return Mono.error(new ManagementException(errorMessage, errorResponse, managementError));
+ } else {
+ return response.getFinalResult();
+ }
+ }
+
+ private static final class HttpResponseImpl extends HttpResponse {
+ private final int statusCode;
+
+ private final byte[] responseBody;
+
+ private final HttpHeaders httpHeaders;
+
+ HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) {
+ super(null);
+ this.statusCode = statusCode;
+ this.httpHeaders = httpHeaders;
+ this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8);
+ }
+
+ public int getStatusCode() {
+ return statusCode;
+ }
+
+ public String getHeaderValue(String s) {
+ return httpHeaders.getValue(s);
+ }
+
+ public HttpHeaders getHeaders() {
+ return httpHeaders;
+ }
+
+ public Flux getBody() {
+ return Flux.just(ByteBuffer.wrap(responseBody));
+ }
+
+ public Mono getBodyAsByteArray() {
+ return Mono.just(responseBody);
+ }
+
+ public Mono getBodyAsString() {
+ return Mono.just(new String(responseBody, StandardCharsets.UTF_8));
+ }
+
+ public Mono getBodyAsString(Charset charset) {
+ return Mono.just(new String(responseBody, charset));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(ConfidentialLedgerManagementClientImpl.class);
+}
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
new file mode 100644
index 000000000000..03913509a3ee
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/LedgersClientImpl.java
@@ -0,0 +1,1612 @@
+// 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.LedgersClient;
+import com.azure.resourcemanager.confidentialledger.fluent.models.ConfidentialLedgerInner;
+import com.azure.resourcemanager.confidentialledger.models.ConfidentialLedgerList;
+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 LedgersClient. */
+public final class LedgersClientImpl implements LedgersClient {
+ /** The proxy service used to perform REST calls. */
+ private final LedgersService service;
+
+ /** The service client containing this operation class. */
+ private final ConfidentialLedgerManagementClientImpl client;
+
+ /**
+ * Initializes an instance of LedgersClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ LedgersClientImpl(ConfidentialLedgerManagementClientImpl client) {
+ this.service = RestProxy.create(LedgersService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ConfidentialLedgerManagementClientLedgers to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "ConfidentialLedgerMa")
+ private interface LedgersService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger"
+ + "/ledgers/{ledgerName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("ledgerName") String ledgerName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger"
+ + "/ledgers/{ledgerName}")
+ @ExpectedResponses({200, 202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("ledgerName") String ledgerName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger"
+ + "/ledgers/{ledgerName}")
+ @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("ledgerName") String ledgerName,
+ @BodyParam("application/json") ConfidentialLedgerInner confidentialLedger,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Patch(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger"
+ + "/ledgers/{ledgerName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> update(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("ledgerName") String ledgerName,
+ @BodyParam("application/json") ConfidentialLedgerInner confidentialLedger,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger"
+ + "/ledgers")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @QueryParam("$filter") String filter,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ConfidentialLedger/ledgers/")
+ @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 the properties of a Confidential Ledger.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return confidential Ledger along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String ledgerName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (ledgerName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter ledgerName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .getByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ ledgerName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Retrieves the properties of a Confidential Ledger.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return confidential Ledger along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String ledgerName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (ledgerName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter ledgerName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .getByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ ledgerName,
+ accept,
+ context);
+ }
+
+ /**
+ * Retrieves the properties of a Confidential Ledger.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return confidential Ledger on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getByResourceGroupAsync(String resourceGroupName, String ledgerName) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, ledgerName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Retrieves the properties of a Confidential Ledger.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return confidential Ledger.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ConfidentialLedgerInner getByResourceGroup(String resourceGroupName, String ledgerName) {
+ return getByResourceGroupAsync(resourceGroupName, ledgerName).block();
+ }
+
+ /**
+ * Retrieves the properties of a Confidential Ledger.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return confidential Ledger along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String ledgerName, Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, ledgerName, context).block();
+ }
+
+ /**
+ * Deletes an existing Confidential Ledger.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @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 ledgerName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (ledgerName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter ledgerName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ ledgerName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Deletes an existing Confidential Ledger.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 ledgerName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (ledgerName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter ledgerName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ ledgerName,
+ accept,
+ context);
+ }
+
+ /**
+ * Deletes an existing Confidential Ledger.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @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 ledgerName) {
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, ledgerName);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Deletes an existing Confidential Ledger.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 ledgerName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, ledgerName, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Deletes an existing Confidential Ledger.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @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 ledgerName) {
+ return beginDeleteAsync(resourceGroupName, ledgerName).getSyncPoller();
+ }
+
+ /**
+ * Deletes an existing Confidential Ledger.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 ledgerName, Context context) {
+ return beginDeleteAsync(resourceGroupName, ledgerName, context).getSyncPoller();
+ }
+
+ /**
+ * Deletes an existing Confidential Ledger.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @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 ledgerName) {
+ return beginDeleteAsync(resourceGroupName, ledgerName).last().flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes an existing Confidential Ledger.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 ledgerName, Context context) {
+ return beginDeleteAsync(resourceGroupName, ledgerName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes an existing Confidential Ledger.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String ledgerName) {
+ deleteAsync(resourceGroupName, ledgerName).block();
+ }
+
+ /**
+ * Deletes an existing Confidential Ledger.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 ledgerName, Context context) {
+ deleteAsync(resourceGroupName, ledgerName, context).block();
+ }
+
+ /**
+ * Creates a Confidential Ledger with the specified ledger parameters.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @param confidentialLedger Confidential Ledger Create Request Body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return confidential Ledger along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(
+ String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (ledgerName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter ledgerName is required and cannot be null."));
+ }
+ if (confidentialLedger == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter confidentialLedger is required and cannot be null."));
+ } else {
+ confidentialLedger.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .create(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ ledgerName,
+ confidentialLedger,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Creates a Confidential Ledger with the specified ledger parameters.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @param confidentialLedger Confidential Ledger Create Request Body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return confidential Ledger along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(
+ String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (ledgerName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter ledgerName is required and cannot be null."));
+ }
+ if (confidentialLedger == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter confidentialLedger is required and cannot be null."));
+ } else {
+ confidentialLedger.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .create(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ ledgerName,
+ confidentialLedger,
+ accept,
+ context);
+ }
+
+ /**
+ * Creates a Confidential Ledger with the specified ledger parameters.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @param confidentialLedger Confidential Ledger Create Request Body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of confidential Ledger.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, ConfidentialLedgerInner> beginCreateAsync(
+ String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger) {
+ Mono>> mono =
+ createWithResponseAsync(resourceGroupName, ledgerName, confidentialLedger);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ ConfidentialLedgerInner.class,
+ ConfidentialLedgerInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Creates a Confidential Ledger with the specified ledger parameters.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @param confidentialLedger Confidential Ledger Create Request Body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of confidential Ledger.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, ConfidentialLedgerInner> beginCreateAsync(
+ String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ createWithResponseAsync(resourceGroupName, ledgerName, confidentialLedger, context);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ ConfidentialLedgerInner.class,
+ ConfidentialLedgerInner.class,
+ context);
+ }
+
+ /**
+ * Creates a Confidential Ledger with the specified ledger parameters.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @param confidentialLedger Confidential Ledger Create Request Body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of confidential Ledger.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, ConfidentialLedgerInner> beginCreate(
+ String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger) {
+ return beginCreateAsync(resourceGroupName, ledgerName, confidentialLedger).getSyncPoller();
+ }
+
+ /**
+ * Creates a Confidential Ledger with the specified ledger parameters.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @param confidentialLedger Confidential Ledger Create Request Body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of confidential Ledger.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, ConfidentialLedgerInner> beginCreate(
+ String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger, Context context) {
+ return beginCreateAsync(resourceGroupName, ledgerName, confidentialLedger, context).getSyncPoller();
+ }
+
+ /**
+ * Creates a Confidential Ledger with the specified ledger parameters.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @param confidentialLedger Confidential Ledger Create Request Body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return confidential Ledger on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(
+ String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger) {
+ return beginCreateAsync(resourceGroupName, ledgerName, confidentialLedger)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Creates a Confidential Ledger with the specified ledger parameters.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @param confidentialLedger Confidential Ledger Create Request Body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return confidential Ledger on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(
+ String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger, Context context) {
+ return beginCreateAsync(resourceGroupName, ledgerName, confidentialLedger, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Creates a Confidential Ledger with the specified ledger parameters.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @param confidentialLedger Confidential Ledger Create Request Body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return confidential Ledger.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ConfidentialLedgerInner create(
+ String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger) {
+ return createAsync(resourceGroupName, ledgerName, confidentialLedger).block();
+ }
+
+ /**
+ * Creates a Confidential Ledger with the specified ledger parameters.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @param confidentialLedger Confidential Ledger Create Request Body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return confidential Ledger.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ConfidentialLedgerInner create(
+ String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger, Context context) {
+ return createAsync(resourceGroupName, ledgerName, confidentialLedger, context).block();
+ }
+
+ /**
+ * Updates properties of Confidential Ledger.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @param confidentialLedger Confidential Ledger request body for Updating Ledger.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return confidential Ledger along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(
+ String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (ledgerName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter ledgerName is required and cannot be null."));
+ }
+ if (confidentialLedger == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter confidentialLedger is required and cannot be null."));
+ } else {
+ confidentialLedger.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .update(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ ledgerName,
+ confidentialLedger,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Updates properties of Confidential Ledger.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @param confidentialLedger Confidential Ledger request body for Updating Ledger.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return confidential Ledger along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(
+ String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (ledgerName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter ledgerName is required and cannot be null."));
+ }
+ if (confidentialLedger == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter confidentialLedger is required and cannot be null."));
+ } else {
+ confidentialLedger.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .update(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ ledgerName,
+ confidentialLedger,
+ accept,
+ context);
+ }
+
+ /**
+ * Updates properties of Confidential Ledger.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @param confidentialLedger Confidential Ledger request body for Updating Ledger.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of confidential Ledger.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, ConfidentialLedgerInner> beginUpdateAsync(
+ String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger) {
+ Mono>> mono =
+ updateWithResponseAsync(resourceGroupName, ledgerName, confidentialLedger);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ ConfidentialLedgerInner.class,
+ ConfidentialLedgerInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Updates properties of Confidential Ledger.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @param confidentialLedger Confidential Ledger request body for Updating Ledger.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of confidential Ledger.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, ConfidentialLedgerInner> beginUpdateAsync(
+ String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ updateWithResponseAsync(resourceGroupName, ledgerName, confidentialLedger, context);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ ConfidentialLedgerInner.class,
+ ConfidentialLedgerInner.class,
+ context);
+ }
+
+ /**
+ * Updates properties of Confidential Ledger.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @param confidentialLedger Confidential Ledger request body for Updating Ledger.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of confidential Ledger.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, ConfidentialLedgerInner> beginUpdate(
+ String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger) {
+ return beginUpdateAsync(resourceGroupName, ledgerName, confidentialLedger).getSyncPoller();
+ }
+
+ /**
+ * Updates properties of Confidential Ledger.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @param confidentialLedger Confidential Ledger request body for Updating Ledger.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of confidential Ledger.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, ConfidentialLedgerInner> beginUpdate(
+ String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger, Context context) {
+ return beginUpdateAsync(resourceGroupName, ledgerName, confidentialLedger, context).getSyncPoller();
+ }
+
+ /**
+ * Updates properties of Confidential Ledger.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @param confidentialLedger Confidential Ledger request body for Updating Ledger.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return confidential Ledger on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(
+ String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger) {
+ return beginUpdateAsync(resourceGroupName, ledgerName, confidentialLedger)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Updates properties of Confidential Ledger.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @param confidentialLedger Confidential Ledger request body for Updating Ledger.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return confidential Ledger on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(
+ String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger, Context context) {
+ return beginUpdateAsync(resourceGroupName, ledgerName, confidentialLedger, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Updates properties of Confidential Ledger.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @param confidentialLedger Confidential Ledger request body for Updating Ledger.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return confidential Ledger.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ConfidentialLedgerInner update(
+ String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger) {
+ return updateAsync(resourceGroupName, ledgerName, confidentialLedger).block();
+ }
+
+ /**
+ * Updates properties of Confidential Ledger.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @param confidentialLedger Confidential Ledger request body for Updating Ledger.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return confidential Ledger.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ConfidentialLedgerInner update(
+ String resourceGroupName, String ledgerName, ConfidentialLedgerInner confidentialLedger, Context context) {
+ return updateAsync(resourceGroupName, ledgerName, confidentialLedger, context).block();
+ }
+
+ /**
+ * Retrieves the properties of all Confidential Ledgers.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return object that includes an array of Confidential Ledgers 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 the properties of all Confidential Ledgers.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 Confidential Ledgers 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 the properties of all Confidential Ledgers.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return object that includes an array of Confidential Ledgers 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 the properties of all Confidential Ledgers.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return object that includes an array of Confidential Ledgers 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 the properties of all Confidential Ledgers.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 Confidential Ledgers 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 the properties of all Confidential Ledgers.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return object that includes an array of Confidential Ledgers 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 the properties of all Confidential Ledgers.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 Confidential Ledgers 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 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.
+ * @throws 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 Confidential Ledgers 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 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 Confidential Ledgers 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 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.
+ * @throws 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 Confidential Ledgers 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 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.
+ * @return object that includes an array of Confidential Ledgers 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 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 Confidential Ledgers 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 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.
+ * @return object that includes an array of Confidential Ledgers 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 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 Confidential Ledgers 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 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 Confidential Ledgers 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 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 Confidential Ledgers 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 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 Confidential Ledgers 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 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 Confidential Ledgers 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/LedgersImpl.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/LedgersImpl.java
new file mode 100644
index 000000000000..2e7626bc5b95
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/LedgersImpl.java
@@ -0,0 +1,172 @@
+// 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.LedgersClient;
+import com.azure.resourcemanager.confidentialledger.fluent.models.ConfidentialLedgerInner;
+import com.azure.resourcemanager.confidentialledger.models.ConfidentialLedger;
+import com.azure.resourcemanager.confidentialledger.models.Ledgers;
+
+public final class LedgersImpl implements Ledgers {
+ private static final ClientLogger LOGGER = new ClientLogger(LedgersImpl.class);
+
+ private final LedgersClient innerClient;
+
+ private final com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager serviceManager;
+
+ public LedgersImpl(
+ LedgersClient innerClient,
+ com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager serviceManager) {
+ this.innerClient = innerClient;
+ 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 =
+ this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, ledgerName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new ConfidentialLedgerImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public void deleteByResourceGroup(String resourceGroupName, String ledgerName) {
+ this.serviceClient().delete(resourceGroupName, ledgerName);
+ }
+
+ public void delete(String resourceGroupName, String ledgerName, Context context) {
+ this.serviceClient().delete(resourceGroupName, ledgerName, context);
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
+ return Utils.mapPage(inner, inner1 -> new ConfidentialLedgerImpl(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 ConfidentialLedgerImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return Utils.mapPage(inner, inner1 -> new ConfidentialLedgerImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(String filter, Context context) {
+ PagedIterable inner = this.serviceClient().list(filter, context);
+ return Utils.mapPage(inner, inner1 -> new ConfidentialLedgerImpl(inner1, this.manager()));
+ }
+
+ public ConfidentialLedger 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 ledgerName = Utils.getValueFromIdByName(id, "ledgers");
+ if (ledgerName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'ledgers'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, ledgerName, 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 ledgerName = Utils.getValueFromIdByName(id, "ledgers");
+ if (ledgerName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'ledgers'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, ledgerName, 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 ledgerName = Utils.getValueFromIdByName(id, "ledgers");
+ if (ledgerName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'ledgers'.", id)));
+ }
+ this.delete(resourceGroupName, ledgerName, 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 ledgerName = Utils.getValueFromIdByName(id, "ledgers");
+ if (ledgerName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'ledgers'.", id)));
+ }
+ this.delete(resourceGroupName, ledgerName, context);
+ }
+
+ private LedgersClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager() {
+ return this.serviceManager;
+ }
+
+ public ConfidentialLedgerImpl define(String name) {
+ return new ConfidentialLedgerImpl(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
new file mode 100644
index 000000000000..6e7f7ea62cc4
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/OperationsClientImpl.java
@@ -0,0 +1,275 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.confidentialledger.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.confidentialledger.fluent.OperationsClient;
+import com.azure.resourcemanager.confidentialledger.fluent.models.ResourceProviderOperationDefinitionInner;
+import com.azure.resourcemanager.confidentialledger.models.ResourceProviderOperationList;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in OperationsClient. */
+public final class OperationsClientImpl implements OperationsClient {
+ /** The proxy service used to perform REST calls. */
+ private final OperationsService service;
+
+ /** The service client containing this operation class. */
+ private final ConfidentialLedgerManagementClientImpl client;
+
+ /**
+ * Initializes an instance of OperationsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ OperationsClientImpl(ConfidentialLedgerManagementClientImpl client) {
+ this.service =
+ RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ConfidentialLedgerManagementClientOperations to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "ConfidentialLedgerMa")
+ private interface OperationsService {
+ @Headers({"Content-Type: application/json"})
+ @Get("/providers/Microsoft.ConfidentialLedger/operations")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * 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.
+ * @return list containing this Resource Provider's available operations along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync() {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Retrieves a list of available API operations.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list containing this Resource Provider's available operations along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * 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.
+ * @return list containing this Resource Provider's available operations as paginated response with {@link
+ * PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Retrieves a list of available API operations.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list containing this Resource Provider's available operations as paginated response with {@link
+ * PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * 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.
+ * @return list containing this Resource Provider's available operations as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * Retrieves a list of available API operations.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list containing this Resource Provider's available operations as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list containing this Resource Provider's available operations along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list containing this Resource Provider's available operations along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(
+ String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/OperationsImpl.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/OperationsImpl.java
new file mode 100644
index 000000000000..b4682a35e6bc
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/OperationsImpl.java
@@ -0,0 +1,46 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.confidentialledger.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.confidentialledger.fluent.OperationsClient;
+import com.azure.resourcemanager.confidentialledger.fluent.models.ResourceProviderOperationDefinitionInner;
+import com.azure.resourcemanager.confidentialledger.models.Operations;
+import com.azure.resourcemanager.confidentialledger.models.ResourceProviderOperationDefinition;
+
+public final class OperationsImpl implements Operations {
+ private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class);
+
+ private final OperationsClient innerClient;
+
+ private final com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager serviceManager;
+
+ public OperationsImpl(
+ OperationsClient innerClient,
+ com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return Utils.mapPage(inner, inner1 -> new ResourceProviderOperationDefinitionImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return Utils.mapPage(inner, inner1 -> new ResourceProviderOperationDefinitionImpl(inner1, this.manager()));
+ }
+
+ private OperationsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ResourceProviderOperationDefinitionImpl.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ResourceProviderOperationDefinitionImpl.java
new file mode 100644
index 000000000000..d690d36e1e5d
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ResourceProviderOperationDefinitionImpl.java
@@ -0,0 +1,42 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.confidentialledger.implementation;
+
+import com.azure.resourcemanager.confidentialledger.fluent.models.ResourceProviderOperationDefinitionInner;
+import com.azure.resourcemanager.confidentialledger.models.ResourceProviderOperationDefinition;
+import com.azure.resourcemanager.confidentialledger.models.ResourceProviderOperationDisplay;
+
+public final class ResourceProviderOperationDefinitionImpl implements ResourceProviderOperationDefinition {
+ private ResourceProviderOperationDefinitionInner innerObject;
+
+ private final com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager serviceManager;
+
+ ResourceProviderOperationDefinitionImpl(
+ ResourceProviderOperationDefinitionInner innerObject,
+ com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public Boolean isDataAction() {
+ return this.innerModel().isDataAction();
+ }
+
+ public ResourceProviderOperationDisplay display() {
+ return this.innerModel().display();
+ }
+
+ public ResourceProviderOperationDefinitionInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ResourceProvidersClientImpl.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ResourceProvidersClientImpl.java
new file mode 100644
index 000000000000..c4e655939b11
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ResourceProvidersClientImpl.java
@@ -0,0 +1,205 @@
+// 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.ExpectedResponses;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+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.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.confidentialledger.fluent.ResourceProvidersClient;
+import com.azure.resourcemanager.confidentialledger.fluent.models.CheckNameAvailabilityResponseInner;
+import com.azure.resourcemanager.confidentialledger.models.CheckNameAvailabilityRequest;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in ResourceProvidersClient. */
+public final class ResourceProvidersClientImpl implements ResourceProvidersClient {
+ /** The proxy service used to perform REST calls. */
+ private final ResourceProvidersService service;
+
+ /** The service client containing this operation class. */
+ private final ConfidentialLedgerManagementClientImpl client;
+
+ /**
+ * Initializes an instance of ResourceProvidersClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ ResourceProvidersClientImpl(ConfidentialLedgerManagementClientImpl client) {
+ this.service =
+ RestProxy.create(ResourceProvidersService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ConfidentialLedgerManagementClientResourceProviders to be used by the
+ * proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "ConfidentialLedgerMa")
+ private interface ResourceProvidersService {
+ @Headers({"Content-Type: application/json"})
+ @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ConfidentialLedger/checkNameAvailability")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> checkNameAvailability(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @BodyParam("application/json") CheckNameAvailabilityRequest nameAvailabilityRequest,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * To check whether a resource name is available.
+ *
+ * @param nameAvailabilityRequest Name availability request payload.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> checkNameAvailabilityWithResponseAsync(
+ CheckNameAvailabilityRequest nameAvailabilityRequest) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (nameAvailabilityRequest == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException("Parameter nameAvailabilityRequest is required and cannot be null."));
+ } else {
+ nameAvailabilityRequest.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .checkNameAvailability(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ nameAvailabilityRequest,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * To check whether a resource name is available.
+ *
+ * @param nameAvailabilityRequest Name availability request payload.
+ * @param context The 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} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> checkNameAvailabilityWithResponseAsync(
+ CheckNameAvailabilityRequest nameAvailabilityRequest, 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 (nameAvailabilityRequest == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException("Parameter nameAvailabilityRequest is required and cannot be null."));
+ } else {
+ nameAvailabilityRequest.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .checkNameAvailability(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ nameAvailabilityRequest,
+ accept,
+ context);
+ }
+
+ /**
+ * To check whether a resource name is available.
+ *
+ * @param nameAvailabilityRequest Name availability request payload.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono checkNameAvailabilityAsync(
+ CheckNameAvailabilityRequest nameAvailabilityRequest) {
+ return checkNameAvailabilityWithResponseAsync(nameAvailabilityRequest)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * To check whether a resource name is available.
+ *
+ * @param nameAvailabilityRequest Name availability request payload.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public CheckNameAvailabilityResponseInner checkNameAvailability(
+ CheckNameAvailabilityRequest nameAvailabilityRequest) {
+ return checkNameAvailabilityAsync(nameAvailabilityRequest).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}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response checkNameAvailabilityWithResponse(
+ CheckNameAvailabilityRequest nameAvailabilityRequest, Context context) {
+ return checkNameAvailabilityWithResponseAsync(nameAvailabilityRequest, context).block();
+ }
+}
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
new file mode 100644
index 000000000000..033ff179b4bb
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/ResourceProvidersImpl.java
@@ -0,0 +1,62 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.confidentialledger.implementation;
+
+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.ResourceProvidersClient;
+import com.azure.resourcemanager.confidentialledger.fluent.models.CheckNameAvailabilityResponseInner;
+import com.azure.resourcemanager.confidentialledger.models.CheckNameAvailabilityRequest;
+import com.azure.resourcemanager.confidentialledger.models.CheckNameAvailabilityResponse;
+import com.azure.resourcemanager.confidentialledger.models.ResourceProviders;
+
+public final class ResourceProvidersImpl implements ResourceProviders {
+ private static final ClientLogger LOGGER = new ClientLogger(ResourceProvidersImpl.class);
+
+ private final ResourceProvidersClient innerClient;
+
+ private final com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager serviceManager;
+
+ public ResourceProvidersImpl(
+ ResourceProvidersClient innerClient,
+ com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager serviceManager) {
+ this.innerClient = innerClient;
+ 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 =
+ this.serviceClient().checkNameAvailabilityWithResponse(nameAvailabilityRequest, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new CheckNameAvailabilityResponseImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ private ResourceProvidersClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/Utils.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/Utils.java
new file mode 100644
index 000000000000..5785128f3ad3
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/Utils.java
@@ -0,0 +1,204 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.confidentialledger.implementation;
+
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.util.CoreUtils;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import reactor.core.publisher.Flux;
+
+final class Utils {
+ static String getValueFromIdByName(String id, String name) {
+ if (id == null) {
+ return null;
+ }
+ Iterator itr = Arrays.stream(id.split("/")).iterator();
+ while (itr.hasNext()) {
+ String part = itr.next();
+ if (part != null && !part.trim().isEmpty()) {
+ if (part.equalsIgnoreCase(name)) {
+ if (itr.hasNext()) {
+ return itr.next();
+ } else {
+ return null;
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) {
+ if (id == null || pathTemplate == null) {
+ return null;
+ }
+ String parameterNameParentheses = "{" + parameterName + "}";
+ List idSegmentsReverted = Arrays.asList(id.split("/"));
+ List pathSegments = Arrays.asList(pathTemplate.split("/"));
+ Collections.reverse(idSegmentsReverted);
+ Iterator idItrReverted = idSegmentsReverted.iterator();
+ int pathIndex = pathSegments.size();
+ while (idItrReverted.hasNext() && pathIndex > 0) {
+ String idSegment = idItrReverted.next();
+ String pathSegment = pathSegments.get(--pathIndex);
+ if (!CoreUtils.isNullOrEmpty(idSegment) && !CoreUtils.isNullOrEmpty(pathSegment)) {
+ if (pathSegment.equalsIgnoreCase(parameterNameParentheses)) {
+ if (pathIndex == 0 || (pathIndex == 1 && pathSegments.get(0).isEmpty())) {
+ List segments = new ArrayList<>();
+ segments.add(idSegment);
+ idItrReverted.forEachRemaining(segments::add);
+ Collections.reverse(segments);
+ if (segments.size() > 0 && segments.get(0).isEmpty()) {
+ segments.remove(0);
+ }
+ return String.join("/", segments);
+ } else {
+ return idSegment;
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) {
+ return new PagedIterableImpl(pageIterable, mapper);
+ }
+
+ private static final class PagedIterableImpl extends PagedIterable {
+
+ private final PagedIterable pagedIterable;
+ private final Function mapper;
+ private final Function, PagedResponse> pageMapper;
+
+ private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) {
+ super(
+ PagedFlux
+ .create(
+ () ->
+ (continuationToken, pageSize) ->
+ Flux.fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper)))));
+ this.pagedIterable = pagedIterable;
+ this.mapper = mapper;
+ this.pageMapper = getPageMapper(mapper);
+ }
+
+ private static Function, PagedResponse> getPageMapper(Function mapper) {
+ return page ->
+ new PagedResponseBase(
+ page.getRequest(),
+ page.getStatusCode(),
+ page.getHeaders(),
+ page.getElements().stream().map(mapper).collect(Collectors.toList()),
+ page.getContinuationToken(),
+ null);
+ }
+
+ @Override
+ public Stream stream() {
+ return pagedIterable.stream().map(mapper);
+ }
+
+ @Override
+ public Stream> streamByPage() {
+ return pagedIterable.streamByPage().map(pageMapper);
+ }
+
+ @Override
+ public Stream> streamByPage(String continuationToken) {
+ return pagedIterable.streamByPage(continuationToken).map(pageMapper);
+ }
+
+ @Override
+ public Stream> streamByPage(int preferredPageSize) {
+ return pagedIterable.streamByPage(preferredPageSize).map(pageMapper);
+ }
+
+ @Override
+ public Stream> streamByPage(String continuationToken, int preferredPageSize) {
+ return pagedIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper);
+ }
+
+ @Override
+ public Iterator iterator() {
+ return new IteratorImpl(pagedIterable.iterator(), mapper);
+ }
+
+ @Override
+ public Iterable> iterableByPage() {
+ return new IterableImpl, PagedResponse>(pagedIterable.iterableByPage(), pageMapper);
+ }
+
+ @Override
+ public Iterable> iterableByPage(String continuationToken) {
+ return new IterableImpl, PagedResponse>(
+ pagedIterable.iterableByPage(continuationToken), pageMapper);
+ }
+
+ @Override
+ public Iterable> iterableByPage(int preferredPageSize) {
+ return new IterableImpl, PagedResponse>(
+ pagedIterable.iterableByPage(preferredPageSize), pageMapper);
+ }
+
+ @Override
+ public Iterable> iterableByPage(String continuationToken, int preferredPageSize) {
+ return new IterableImpl, PagedResponse>(
+ pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper);
+ }
+ }
+
+ private static final class IteratorImpl implements Iterator {
+
+ private final Iterator iterator;
+ private final Function mapper;
+
+ private IteratorImpl(Iterator iterator, Function mapper) {
+ this.iterator = iterator;
+ this.mapper = mapper;
+ }
+
+ @Override
+ public boolean hasNext() {
+ return iterator.hasNext();
+ }
+
+ @Override
+ public S next() {
+ return mapper.apply(iterator.next());
+ }
+
+ @Override
+ public void remove() {
+ iterator.remove();
+ }
+ }
+
+ private static final class IterableImpl implements Iterable {
+
+ private final Iterable iterable;
+ private final Function mapper;
+
+ private IterableImpl(Iterable iterable, Function mapper) {
+ this.iterable = iterable;
+ this.mapper = mapper;
+ }
+
+ @Override
+ public Iterator iterator() {
+ return new IteratorImpl(iterable.iterator(), mapper);
+ }
+ }
+}
diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/package-info.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/package-info.java
new file mode 100644
index 000000000000..c2b3113495f2
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/implementation/package-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/**
+ * Package containing the implementations for ConfidentialLedgerManagementClient. Microsoft Azure Confidential Compute
+ * Ledger Control Plane REST API version 2020-12-01-preview.
+ */
+package com.azure.resourcemanager.confidentialledger.implementation;
diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/AadBasedSecurityPrincipal.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/AadBasedSecurityPrincipal.java
new file mode 100644
index 000000000000..3f17da6a77f2
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/AadBasedSecurityPrincipal.java
@@ -0,0 +1,98 @@
+// 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;
+
+/** AAD based security principal with associated Ledger RoleName. */
+@Fluent
+public final class AadBasedSecurityPrincipal {
+ /*
+ * UUID/GUID based Principal Id of the Security Principal
+ */
+ @JsonProperty(value = "principalId")
+ private String principalId;
+
+ /*
+ * UUID/GUID based Tenant Id of the Security Principal
+ */
+ @JsonProperty(value = "tenantId")
+ private String tenantId;
+
+ /*
+ * LedgerRole associated with the Security Principal of Ledger
+ */
+ @JsonProperty(value = "ledgerRoleName")
+ private LedgerRoleName ledgerRoleName;
+
+ /**
+ * Get the principalId property: UUID/GUID based Principal Id of the Security Principal.
+ *
+ * @return the principalId value.
+ */
+ public String principalId() {
+ return this.principalId;
+ }
+
+ /**
+ * Set the principalId property: UUID/GUID based Principal Id of the Security Principal.
+ *
+ * @param principalId the principalId value to set.
+ * @return the AadBasedSecurityPrincipal object itself.
+ */
+ public AadBasedSecurityPrincipal withPrincipalId(String principalId) {
+ this.principalId = principalId;
+ return this;
+ }
+
+ /**
+ * Get the tenantId property: UUID/GUID based Tenant Id of the Security Principal.
+ *
+ * @return the tenantId value.
+ */
+ public String tenantId() {
+ return this.tenantId;
+ }
+
+ /**
+ * Set the tenantId property: UUID/GUID based Tenant Id of the Security Principal.
+ *
+ * @param tenantId the tenantId value to set.
+ * @return the AadBasedSecurityPrincipal object itself.
+ */
+ public AadBasedSecurityPrincipal withTenantId(String tenantId) {
+ this.tenantId = tenantId;
+ return this;
+ }
+
+ /**
+ * Get the ledgerRoleName property: LedgerRole associated with the Security Principal of Ledger.
+ *
+ * @return the ledgerRoleName value.
+ */
+ public LedgerRoleName ledgerRoleName() {
+ return this.ledgerRoleName;
+ }
+
+ /**
+ * Set the ledgerRoleName property: LedgerRole associated with the Security Principal of Ledger.
+ *
+ * @param ledgerRoleName the ledgerRoleName value to set.
+ * @return the AadBasedSecurityPrincipal object itself.
+ */
+ public AadBasedSecurityPrincipal withLedgerRoleName(LedgerRoleName ledgerRoleName) {
+ this.ledgerRoleName = ledgerRoleName;
+ 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/CertBasedSecurityPrincipal.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/CertBasedSecurityPrincipal.java
new file mode 100644
index 000000000000..f243455fe9f0
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/CertBasedSecurityPrincipal.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.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Cert based security principal with Ledger RoleName. */
+@Fluent
+public final class CertBasedSecurityPrincipal {
+ /*
+ * Public key of the user cert (.pem or .cer)
+ */
+ @JsonProperty(value = "cert")
+ private String cert;
+
+ /*
+ * LedgerRole associated with the Security Principal of Ledger
+ */
+ @JsonProperty(value = "ledgerRoleName")
+ private LedgerRoleName ledgerRoleName;
+
+ /**
+ * Get the cert property: Public key of the user cert (.pem or .cer).
+ *
+ * @return the cert value.
+ */
+ public String cert() {
+ return this.cert;
+ }
+
+ /**
+ * Set the cert property: Public key of the user cert (.pem or .cer).
+ *
+ * @param cert the cert value to set.
+ * @return the CertBasedSecurityPrincipal object itself.
+ */
+ public CertBasedSecurityPrincipal withCert(String cert) {
+ this.cert = cert;
+ return this;
+ }
+
+ /**
+ * Get the ledgerRoleName property: LedgerRole associated with the Security Principal of Ledger.
+ *
+ * @return the ledgerRoleName value.
+ */
+ public LedgerRoleName ledgerRoleName() {
+ return this.ledgerRoleName;
+ }
+
+ /**
+ * Set the ledgerRoleName property: LedgerRole associated with the Security Principal of Ledger.
+ *
+ * @param ledgerRoleName the ledgerRoleName value to set.
+ * @return the CertBasedSecurityPrincipal object itself.
+ */
+ public CertBasedSecurityPrincipal withLedgerRoleName(LedgerRoleName ledgerRoleName) {
+ this.ledgerRoleName = ledgerRoleName;
+ 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/CheckNameAvailabilityReason.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/CheckNameAvailabilityReason.java
new file mode 100644
index 000000000000..0d63a5f3972a
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/CheckNameAvailabilityReason.java
@@ -0,0 +1,38 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.confidentialledger.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** Defines values for CheckNameAvailabilityReason. */
+public final class CheckNameAvailabilityReason extends ExpandableStringEnum {
+ /** Static value Invalid for CheckNameAvailabilityReason. */
+ public static final CheckNameAvailabilityReason INVALID = fromString("Invalid");
+
+ /** Static value AlreadyExists for CheckNameAvailabilityReason. */
+ public static final CheckNameAvailabilityReason ALREADY_EXISTS = fromString("AlreadyExists");
+
+ /**
+ * Creates or finds a CheckNameAvailabilityReason from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding CheckNameAvailabilityReason.
+ */
+ @JsonCreator
+ public static CheckNameAvailabilityReason fromString(String name) {
+ return fromString(name, CheckNameAvailabilityReason.class);
+ }
+
+ /**
+ * Gets known CheckNameAvailabilityReason values.
+ *
+ * @return known CheckNameAvailabilityReason values.
+ */
+ public static Collection values() {
+ return values(CheckNameAvailabilityReason.class);
+ }
+}
diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/CheckNameAvailabilityRequest.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/CheckNameAvailabilityRequest.java
new file mode 100644
index 000000000000..ba741ab2da0d
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/CheckNameAvailabilityRequest.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.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The check availability request body. */
+@Fluent
+public final class CheckNameAvailabilityRequest {
+ /*
+ * The name of the resource for which availability needs to be checked.
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /*
+ * The resource type.
+ */
+ @JsonProperty(value = "type")
+ private String type;
+
+ /**
+ * Get the name property: The name of the resource for which availability needs to be checked.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: The name of the resource for which availability needs to be checked.
+ *
+ * @param name the name value to set.
+ * @return the CheckNameAvailabilityRequest object itself.
+ */
+ public CheckNameAvailabilityRequest withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the type property: The resource type.
+ *
+ * @return the type value.
+ */
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Set the type property: The resource type.
+ *
+ * @param type the type value to set.
+ * @return the CheckNameAvailabilityRequest object itself.
+ */
+ public CheckNameAvailabilityRequest withType(String type) {
+ this.type = type;
+ 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/CheckNameAvailabilityResponse.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/CheckNameAvailabilityResponse.java
new file mode 100644
index 000000000000..651c1702faba
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/CheckNameAvailabilityResponse.java
@@ -0,0 +1,39 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.confidentialledger.models;
+
+import com.azure.resourcemanager.confidentialledger.fluent.models.CheckNameAvailabilityResponseInner;
+
+/** An immutable client-side representation of CheckNameAvailabilityResponse. */
+public interface CheckNameAvailabilityResponse {
+ /**
+ * Gets the nameAvailable property: Indicates if the resource name is available.
+ *
+ * @return the nameAvailable value.
+ */
+ Boolean nameAvailable();
+
+ /**
+ * Gets the reason property: The reason why the given name is not available.
+ *
+ * @return the reason value.
+ */
+ CheckNameAvailabilityReason reason();
+
+ /**
+ * Gets the message property: Detailed reason why the given name is available.
+ *
+ * @return the message value.
+ */
+ String message();
+
+ /**
+ * Gets the inner com.azure.resourcemanager.confidentialledger.fluent.models.CheckNameAvailabilityResponseInner
+ * object.
+ *
+ * @return the inner object.
+ */
+ CheckNameAvailabilityResponseInner innerModel();
+}
diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ConfidentialLedger.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ConfidentialLedger.java
new file mode 100644
index 000000000000..f29b3d604591
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ConfidentialLedger.java
@@ -0,0 +1,232 @@
+// 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.ConfidentialLedgerInner;
+import java.util.Map;
+
+/** An immutable client-side representation of ConfidentialLedger. */
+public interface ConfidentialLedger {
+ /**
+ * Gets the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * Gets the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * Gets the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * Gets the properties property: LedgerProperties Properties of Confidential Ledger Resource.
+ *
+ * @return the properties value.
+ */
+ LedgerProperties properties();
+
+ /**
+ * Gets the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ SystemData systemData();
+
+ /**
+ * Gets the location property: The Azure location where the Confidential Ledger is running.
+ *
+ * @return the location value.
+ */
+ String location();
+
+ /**
+ * Gets the tags property: Additional tags for Confidential Ledger.
+ *
+ * @return the tags value.
+ */
+ Map tags();
+
+ /**
+ * Gets the region of the resource.
+ *
+ * @return the region of the resource.
+ */
+ Region region();
+
+ /**
+ * Gets the name of the resource region.
+ *
+ * @return the name of the resource region.
+ */
+ String regionName();
+
+ /**
+ * Gets the name of the resource group.
+ *
+ * @return the name of the resource group.
+ */
+ String resourceGroupName();
+
+ /**
+ * Gets the inner com.azure.resourcemanager.confidentialledger.fluent.models.ConfidentialLedgerInner object.
+ *
+ * @return the inner object.
+ */
+ ConfidentialLedgerInner innerModel();
+
+ /** The entirety of the ConfidentialLedger definition. */
+ interface Definition
+ extends DefinitionStages.Blank, DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate {
+ }
+ /** The ConfidentialLedger definition stages. */
+ interface DefinitionStages {
+ /** The first stage of the ConfidentialLedger definition. */
+ interface Blank extends WithResourceGroup {
+ }
+ /** The stage of the ConfidentialLedger definition allowing to specify parent resource. */
+ interface WithResourceGroup {
+ /**
+ * Specifies resourceGroupName.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @return the next definition stage.
+ */
+ WithCreate withExistingResourceGroup(String resourceGroupName);
+ }
+ /**
+ * The stage of the ConfidentialLedger definition which contains all the minimum required properties for the
+ * resource to be created, but also allows for any other optional properties to be specified.
+ */
+ interface WithCreate
+ extends DefinitionStages.WithLocation, DefinitionStages.WithTags, DefinitionStages.WithProperties {
+ /**
+ * Executes the create request.
+ *
+ * @return the created resource.
+ */
+ ConfidentialLedger create();
+
+ /**
+ * Executes the create request.
+ *
+ * @param context The context to associate with this operation.
+ * @return the created resource.
+ */
+ ConfidentialLedger create(Context context);
+ }
+ /** The stage of the ConfidentialLedger definition allowing to specify location. */
+ interface WithLocation {
+ /**
+ * Specifies the region for the resource.
+ *
+ * @param location The Azure location where the Confidential Ledger is running.
+ * @return the next definition stage.
+ */
+ WithCreate withRegion(Region location);
+
+ /**
+ * Specifies the region for the resource.
+ *
+ * @param location The Azure location where the Confidential Ledger is running.
+ * @return the next definition stage.
+ */
+ WithCreate withRegion(String location);
+ }
+ /** The stage of the ConfidentialLedger definition allowing to specify tags. */
+ interface WithTags {
+ /**
+ * Specifies the tags property: Additional tags for Confidential Ledger.
+ *
+ * @param tags Additional tags for Confidential Ledger.
+ * @return the next definition stage.
+ */
+ WithCreate withTags(Map tags);
+ }
+ /** The stage of the ConfidentialLedger definition allowing to specify properties. */
+ interface WithProperties {
+ /**
+ * Specifies the properties property: LedgerProperties Properties of Confidential Ledger Resource..
+ *
+ * @param properties LedgerProperties Properties of Confidential Ledger Resource.
+ * @return the next definition stage.
+ */
+ WithCreate withProperties(LedgerProperties properties);
+ }
+ }
+ /**
+ * Begins update for the ConfidentialLedger resource.
+ *
+ * @return the stage of resource update.
+ */
+ ConfidentialLedger.Update update();
+
+ /** The template for ConfidentialLedger update. */
+ interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties {
+ /**
+ * Executes the update request.
+ *
+ * @return the updated resource.
+ */
+ ConfidentialLedger apply();
+
+ /**
+ * Executes the update request.
+ *
+ * @param context The context to associate with this operation.
+ * @return the updated resource.
+ */
+ ConfidentialLedger apply(Context context);
+ }
+ /** The ConfidentialLedger update stages. */
+ interface UpdateStages {
+ /** The stage of the ConfidentialLedger update allowing to specify tags. */
+ interface WithTags {
+ /**
+ * Specifies the tags property: Additional tags for Confidential Ledger.
+ *
+ * @param tags Additional tags for Confidential Ledger.
+ * @return the next definition stage.
+ */
+ Update withTags(Map tags);
+ }
+ /** The stage of the ConfidentialLedger update allowing to specify properties. */
+ interface WithProperties {
+ /**
+ * Specifies the properties property: LedgerProperties Properties of Confidential Ledger Resource..
+ *
+ * @param properties LedgerProperties Properties of Confidential Ledger Resource.
+ * @return the next definition stage.
+ */
+ Update withProperties(LedgerProperties properties);
+ }
+ }
+ /**
+ * Refreshes the resource to sync with Azure.
+ *
+ * @return the refreshed resource.
+ */
+ ConfidentialLedger refresh();
+
+ /**
+ * Refreshes the resource to sync with Azure.
+ *
+ * @param context The context to associate with this operation.
+ * @return the refreshed resource.
+ */
+ ConfidentialLedger refresh(Context context);
+}
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
new file mode 100644
index 000000000000..3ab8ce49e99b
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ConfidentialLedgerList.java
@@ -0,0 +1,78 @@
+// 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.ConfidentialLedgerInner;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Object that includes an array of Confidential Ledgers and a possible link for next set. */
+@Fluent
+public final class ConfidentialLedgerList {
+ /*
+ * List of Confidential Ledgers
+ */
+ @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;
+
+ /**
+ * Get the value property: List of Confidential Ledgers.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Set the value property: List of Confidential Ledgers.
+ *
+ * @param value the value value to set.
+ * @return the ConfidentialLedgerList object itself.
+ */
+ public ConfidentialLedgerList withValue(List value) {
+ this.value = value;
+ return this;
+ }
+
+ /**
+ * Get the nextLink property: The URL the client should use to fetch the next page (per server side paging).
+ *
+ * @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 ConfidentialLedgerList object itself.
+ */
+ public ConfidentialLedgerList withNextLink(String nextLink) {
+ this.nextLink = nextLink;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (value() != null) {
+ value().forEach(e -> e.validate());
+ }
+ }
+}
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
new file mode 100644
index 000000000000..c2daf60faabb
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/LedgerProperties.java
@@ -0,0 +1,181 @@
+// 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;
+
+/** LedgerProperties Additional Confidential Ledger properties. */
+@Fluent
+public final class LedgerProperties {
+ /*
+ * Unique name for the Confidential Ledger.
+ */
+ @JsonProperty(value = "ledgerName", access = JsonProperty.Access.WRITE_ONLY)
+ private String ledgerName;
+
+ /*
+ * Endpoint for calling Ledger Service.
+ */
+ @JsonProperty(value = "ledgerUri", access = JsonProperty.Access.WRITE_ONLY)
+ private String ledgerUri;
+
+ /*
+ * Endpoint for accessing network identity.
+ */
+ @JsonProperty(value = "identityServiceUri", access = JsonProperty.Access.WRITE_ONLY)
+ private String identityServiceUri;
+
+ /*
+ * Internal namespace for the Ledger
+ */
+ @JsonProperty(value = "ledgerInternalNamespace", access = JsonProperty.Access.WRITE_ONLY)
+ private String ledgerInternalNamespace;
+
+ /*
+ * Type of Confidential Ledger
+ */
+ @JsonProperty(value = "ledgerType")
+ private LedgerType ledgerType;
+
+ /*
+ * Provisioning state of Ledger Resource
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /*
+ * Array of all AAD based Security Principals.
+ */
+ @JsonProperty(value = "aadBasedSecurityPrincipals")
+ private List aadBasedSecurityPrincipals;
+
+ /*
+ * Array of all cert based Security Principals.
+ */
+ @JsonProperty(value = "certBasedSecurityPrincipals")
+ private List certBasedSecurityPrincipals;
+
+ /**
+ * Get the ledgerName property: Unique name for the Confidential Ledger.
+ *
+ * @return the ledgerName value.
+ */
+ public String ledgerName() {
+ return this.ledgerName;
+ }
+
+ /**
+ * Get the ledgerUri property: Endpoint for calling Ledger Service.
+ *
+ * @return the ledgerUri value.
+ */
+ public String ledgerUri() {
+ return this.ledgerUri;
+ }
+
+ /**
+ * Get the identityServiceUri property: Endpoint for accessing network identity.
+ *
+ * @return the identityServiceUri value.
+ */
+ public String identityServiceUri() {
+ return this.identityServiceUri;
+ }
+
+ /**
+ * Get the ledgerInternalNamespace property: Internal namespace for the Ledger.
+ *
+ * @return the ledgerInternalNamespace value.
+ */
+ public String ledgerInternalNamespace() {
+ return this.ledgerInternalNamespace;
+ }
+
+ /**
+ * Get the ledgerType property: Type of Confidential Ledger.
+ *
+ * @return the ledgerType value.
+ */
+ public LedgerType ledgerType() {
+ return this.ledgerType;
+ }
+
+ /**
+ * Set the ledgerType property: Type of Confidential Ledger.
+ *
+ * @param ledgerType the ledgerType value to set.
+ * @return the LedgerProperties object itself.
+ */
+ public LedgerProperties withLedgerType(LedgerType ledgerType) {
+ this.ledgerType = ledgerType;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning state of Ledger Resource.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the aadBasedSecurityPrincipals property: Array of all AAD based Security Principals.
+ *
+ * @return the aadBasedSecurityPrincipals value.
+ */
+ public List aadBasedSecurityPrincipals() {
+ return this.aadBasedSecurityPrincipals;
+ }
+
+ /**
+ * Set the aadBasedSecurityPrincipals property: Array of all AAD based Security Principals.
+ *
+ * @param aadBasedSecurityPrincipals the aadBasedSecurityPrincipals value to set.
+ * @return the LedgerProperties object itself.
+ */
+ public LedgerProperties withAadBasedSecurityPrincipals(List aadBasedSecurityPrincipals) {
+ this.aadBasedSecurityPrincipals = aadBasedSecurityPrincipals;
+ return this;
+ }
+
+ /**
+ * Get the certBasedSecurityPrincipals property: Array of all cert based Security Principals.
+ *
+ * @return the certBasedSecurityPrincipals value.
+ */
+ public List certBasedSecurityPrincipals() {
+ return this.certBasedSecurityPrincipals;
+ }
+
+ /**
+ * Set the certBasedSecurityPrincipals property: Array of all cert based Security Principals.
+ *
+ * @param certBasedSecurityPrincipals the certBasedSecurityPrincipals value to set.
+ * @return the LedgerProperties object itself.
+ */
+ public LedgerProperties withCertBasedSecurityPrincipals(
+ List certBasedSecurityPrincipals) {
+ this.certBasedSecurityPrincipals = certBasedSecurityPrincipals;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (aadBasedSecurityPrincipals() != null) {
+ aadBasedSecurityPrincipals().forEach(e -> e.validate());
+ }
+ if (certBasedSecurityPrincipals() != null) {
+ certBasedSecurityPrincipals().forEach(e -> e.validate());
+ }
+ }
+}
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
new file mode 100644
index 000000000000..9421460f3bb8
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/LedgerRoleName.java
@@ -0,0 +1,41 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.confidentialledger.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** Defines values for LedgerRoleName. */
+public final class LedgerRoleName extends ExpandableStringEnum {
+ /** Static value Reader for LedgerRoleName. */
+ public static final LedgerRoleName READER = fromString("Reader");
+
+ /** Static value Contributor for LedgerRoleName. */
+ public static final LedgerRoleName CONTRIBUTOR = fromString("Contributor");
+
+ /** Static value Administrator for LedgerRoleName. */
+ public static final LedgerRoleName ADMINISTRATOR = fromString("Administrator");
+
+ /**
+ * Creates or finds a LedgerRoleName from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding LedgerRoleName.
+ */
+ @JsonCreator
+ public static LedgerRoleName fromString(String name) {
+ return fromString(name, LedgerRoleName.class);
+ }
+
+ /**
+ * Gets known LedgerRoleName values.
+ *
+ * @return known LedgerRoleName values.
+ */
+ public static Collection values() {
+ return values(LedgerRoleName.class);
+ }
+}
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
new file mode 100644
index 000000000000..dd60c1722a0e
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/LedgerType.java
@@ -0,0 +1,41 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.confidentialledger.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** Defines values for LedgerType. */
+public final class LedgerType extends ExpandableStringEnum {
+ /** Static value Unknown for LedgerType. */
+ public static final LedgerType UNKNOWN = fromString("Unknown");
+
+ /** Static value Public for LedgerType. */
+ public static final LedgerType PUBLIC = fromString("Public");
+
+ /** Static value Private for LedgerType. */
+ public static final LedgerType PRIVATE = fromString("Private");
+
+ /**
+ * Creates or finds a LedgerType from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding LedgerType.
+ */
+ @JsonCreator
+ public static LedgerType fromString(String name) {
+ return fromString(name, LedgerType.class);
+ }
+
+ /**
+ * Gets known LedgerType values.
+ *
+ * @return known LedgerType values.
+ */
+ public static Collection values() {
+ return values(LedgerType.class);
+ }
+}
diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/Ledgers.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/Ledgers.java
new file mode 100644
index 000000000000..738a8a346110
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/Ledgers.java
@@ -0,0 +1,162 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.confidentialledger.models;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+
+/** Resource collection API of Ledgers. */
+public interface Ledgers {
+ /**
+ * Retrieves the properties of a Confidential Ledger.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return confidential Ledger.
+ */
+ ConfidentialLedger getByResourceGroup(String resourceGroupName, String ledgerName);
+
+ /**
+ * Retrieves the properties of a Confidential Ledger.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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}.
+ */
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String ledgerName, Context context);
+
+ /**
+ * Deletes an existing Confidential Ledger.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ void deleteByResourceGroup(String resourceGroupName, String ledgerName);
+
+ /**
+ * Deletes an existing Confidential Ledger.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param ledgerName Name of the Confidential Ledger.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 ledgerName, Context context);
+
+ /**
+ * Retrieves the properties of all Confidential Ledgers.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return object that includes an array of Confidential Ledgers and a possible link for next set as paginated
+ * response with {@link PagedIterable}.
+ */
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * Retrieves the properties of all Confidential Ledgers.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 Confidential Ledgers and a possible link for next set as paginated
+ * response with {@link PagedIterable}.
+ */
+ PagedIterable listByResourceGroup(String resourceGroupName, String filter, Context context);
+
+ /**
+ * 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.
+ * @return object that includes an array of Confidential Ledgers and a possible link for next set as paginated
+ * response with {@link PagedIterable}.
+ */
+ PagedIterable list();
+
+ /**
+ * 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 Confidential Ledgers and a possible link for next set as paginated
+ * response with {@link PagedIterable}.
+ */
+ PagedIterable list(String filter, Context context);
+
+ /**
+ * Retrieves the properties of a Confidential Ledger.
+ *
+ * @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 confidential Ledger along with {@link Response}.
+ */
+ ConfidentialLedger getById(String id);
+
+ /**
+ * Retrieves the properties of a Confidential Ledger.
+ *
+ * @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 confidential Ledger along with {@link Response}.
+ */
+ Response getByIdWithResponse(String id, Context context);
+
+ /**
+ * Deletes an existing Confidential Ledger.
+ *
+ * @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 an existing Confidential Ledger.
+ *
+ * @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 ConfidentialLedger resource.
+ *
+ * @param name resource name.
+ * @return the first stage of the new ConfidentialLedger definition.
+ */
+ ConfidentialLedger.DefinitionStages.Blank define(String name);
+}
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
new file mode 100644
index 000000000000..deb716faec2d
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/Operations.java
@@ -0,0 +1,33 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.confidentialledger.models;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+
+/** Resource collection API of Operations. */
+public interface Operations {
+ /**
+ * 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.
+ * @return list containing this Resource Provider's available operations as paginated response with {@link
+ * PagedIterable}.
+ */
+ PagedIterable list();
+
+ /**
+ * Retrieves a list of available API operations.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list containing this Resource Provider's available operations as paginated response with {@link
+ * PagedIterable}.
+ */
+ PagedIterable list(Context context);
+}
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
new file mode 100644
index 000000000000..5fbccb6b864b
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ProvisioningState.java
@@ -0,0 +1,53 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.confidentialledger.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** Defines values for ProvisioningState. */
+public final class ProvisioningState extends ExpandableStringEnum {
+ /** Static value Unknown for ProvisioningState. */
+ public static final ProvisioningState UNKNOWN = fromString("Unknown");
+
+ /** Static value Succeeded for ProvisioningState. */
+ public static final ProvisioningState SUCCEEDED = fromString("Succeeded");
+
+ /** Static value Failed for ProvisioningState. */
+ public static final ProvisioningState FAILED = fromString("Failed");
+
+ /** Static value Canceled for ProvisioningState. */
+ public static final ProvisioningState CANCELED = fromString("Canceled");
+
+ /** Static value Creating for ProvisioningState. */
+ public static final ProvisioningState CREATING = fromString("Creating");
+
+ /** Static value Deleting for ProvisioningState. */
+ public static final ProvisioningState DELETING = fromString("Deleting");
+
+ /** Static value Updating for ProvisioningState. */
+ public static final ProvisioningState UPDATING = fromString("Updating");
+
+ /**
+ * Creates or finds a ProvisioningState from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding ProvisioningState.
+ */
+ @JsonCreator
+ public static ProvisioningState fromString(String name) {
+ return fromString(name, ProvisioningState.class);
+ }
+
+ /**
+ * Gets known ProvisioningState values.
+ *
+ * @return known ProvisioningState values.
+ */
+ public static Collection values() {
+ return values(ProvisioningState.class);
+ }
+}
diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ResourceLocation.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ResourceLocation.java
new file mode 100644
index 000000000000..14de1ffa448e
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ResourceLocation.java
@@ -0,0 +1,46 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.confidentialledger.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Location of the ARM Resource. */
+@Fluent
+public class ResourceLocation {
+ /*
+ * The Azure location where the Confidential Ledger is running.
+ */
+ @JsonProperty(value = "location")
+ private String location;
+
+ /**
+ * Get the location property: The Azure location where the Confidential Ledger is running.
+ *
+ * @return the location value.
+ */
+ public String location() {
+ return this.location;
+ }
+
+ /**
+ * Set the location property: The Azure location where the Confidential Ledger is running.
+ *
+ * @param location the location value to set.
+ * @return the ResourceLocation object itself.
+ */
+ public ResourceLocation withLocation(String location) {
+ this.location = location;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ResourceProviderOperationDefinition.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ResourceProviderOperationDefinition.java
new file mode 100644
index 000000000000..1c9ace1cf67e
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ResourceProviderOperationDefinition.java
@@ -0,0 +1,39 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.confidentialledger.models;
+
+import com.azure.resourcemanager.confidentialledger.fluent.models.ResourceProviderOperationDefinitionInner;
+
+/** An immutable client-side representation of ResourceProviderOperationDefinition. */
+public interface ResourceProviderOperationDefinition {
+ /**
+ * Gets the name property: Resource provider operation name.
+ *
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * Gets the isDataAction property: Indicates whether the operation is data action or not.
+ *
+ * @return the isDataAction value.
+ */
+ Boolean isDataAction();
+
+ /**
+ * Gets the display property: Details about the operations.
+ *
+ * @return the display value.
+ */
+ ResourceProviderOperationDisplay display();
+
+ /**
+ * Gets the inner
+ * com.azure.resourcemanager.confidentialledger.fluent.models.ResourceProviderOperationDefinitionInner object.
+ *
+ * @return the inner object.
+ */
+ ResourceProviderOperationDefinitionInner innerModel();
+}
diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ResourceProviderOperationDisplay.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ResourceProviderOperationDisplay.java
new file mode 100644
index 000000000000..068e6d38e002
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ResourceProviderOperationDisplay.java
@@ -0,0 +1,124 @@
+// 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;
+
+/** Describes the properties of the Operation. */
+@Fluent
+public final class ResourceProviderOperationDisplay {
+ /*
+ * Name of the resource provider.
+ */
+ @JsonProperty(value = "provider")
+ private String provider;
+
+ /*
+ * Name of the resource type.
+ */
+ @JsonProperty(value = "resource")
+ private String resource;
+
+ /*
+ * Name of the resource provider operation.
+ */
+ @JsonProperty(value = "operation")
+ private String operation;
+
+ /*
+ * Description of the resource provider operation.
+ */
+ @JsonProperty(value = "description")
+ private String description;
+
+ /**
+ * Get the provider property: Name of the resource provider.
+ *
+ * @return the provider value.
+ */
+ public String provider() {
+ return this.provider;
+ }
+
+ /**
+ * Set the provider property: Name of the resource provider.
+ *
+ * @param provider the provider value to set.
+ * @return the ResourceProviderOperationDisplay object itself.
+ */
+ public ResourceProviderOperationDisplay withProvider(String provider) {
+ this.provider = provider;
+ return this;
+ }
+
+ /**
+ * Get the resource property: Name of the resource type.
+ *
+ * @return the resource value.
+ */
+ public String resource() {
+ return this.resource;
+ }
+
+ /**
+ * Set the resource property: Name of the resource type.
+ *
+ * @param resource the resource value to set.
+ * @return the ResourceProviderOperationDisplay object itself.
+ */
+ public ResourceProviderOperationDisplay withResource(String resource) {
+ this.resource = resource;
+ return this;
+ }
+
+ /**
+ * Get the operation property: Name of the resource provider operation.
+ *
+ * @return the operation value.
+ */
+ public String operation() {
+ return this.operation;
+ }
+
+ /**
+ * Set the operation property: Name of the resource provider operation.
+ *
+ * @param operation the operation value to set.
+ * @return the ResourceProviderOperationDisplay object itself.
+ */
+ public ResourceProviderOperationDisplay withOperation(String operation) {
+ this.operation = operation;
+ return this;
+ }
+
+ /**
+ * Get the description property: Description of the resource provider operation.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: Description of the resource provider operation.
+ *
+ * @param description the description value to set.
+ * @return the ResourceProviderOperationDisplay object itself.
+ */
+ public ResourceProviderOperationDisplay withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ResourceProviderOperationList.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ResourceProviderOperationList.java
new file mode 100644
index 000000000000..9e1475701cc1
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ResourceProviderOperationList.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.annotation.Immutable;
+import com.azure.resourcemanager.confidentialledger.fluent.models.ResourceProviderOperationDefinitionInner;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** List containing this Resource Provider's available operations. */
+@Immutable
+public final class ResourceProviderOperationList {
+ /*
+ * Resource provider operations list.
+ */
+ @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY)
+ private List value;
+
+ /*
+ * 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;
+
+ /**
+ * Get the value property: Resource provider operations list.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Get the nextLink property: The URI that can be used to request the next page for list of Azure operations.
+ *
+ * @return the nextLink value.
+ */
+ public String nextLink() {
+ return this.nextLink;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (value() != null) {
+ value().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/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
new file mode 100644
index 000000000000..2859bd5ebb83
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/ResourceProviders.java
@@ -0,0 +1,35 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.confidentialledger.models;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+
+/** Resource collection API of ResourceProviders. */
+public interface ResourceProviders {
+ /**
+ * To check whether a resource name is available.
+ *
+ * @param nameAvailabilityRequest Name availability request payload.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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.
+ */
+ CheckNameAvailabilityResponse checkNameAvailability(CheckNameAvailabilityRequest nameAvailabilityRequest);
+
+ /**
+ * 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}.
+ */
+ Response checkNameAvailabilityWithResponse(
+ CheckNameAvailabilityRequest nameAvailabilityRequest, Context context);
+}
diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/Tags.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/Tags.java
new file mode 100644
index 000000000000..52ea713dcc6f
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/Tags.java
@@ -0,0 +1,49 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.confidentialledger.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** Tags for Confidential Ledger Resource. */
+@Fluent
+public class Tags {
+ /*
+ * Additional tags for Confidential Ledger
+ */
+ @JsonProperty(value = "tags")
+ @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
+ private Map tags;
+
+ /**
+ * Get the tags property: Additional tags for Confidential Ledger.
+ *
+ * @return the tags value.
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * Set the tags property: Additional tags for Confidential Ledger.
+ *
+ * @param tags the tags value to set.
+ * @return the Tags object itself.
+ */
+ public Tags withTags(Map tags) {
+ this.tags = tags;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/package-info.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/package-info.java
new file mode 100644
index 000000000000..6174d0311fe4
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/models/package-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/**
+ * Package containing the data models for ConfidentialLedgerManagementClient. Microsoft Azure Confidential Compute
+ * Ledger Control Plane REST API version 2020-12-01-preview.
+ */
+package com.azure.resourcemanager.confidentialledger.models;
diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/package-info.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/package-info.java
new file mode 100644
index 000000000000..31daf1621a12
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/com/azure/resourcemanager/confidentialledger/package-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/**
+ * Package containing the classes for ConfidentialLedgerManagementClient. Microsoft Azure Confidential Compute Ledger
+ * Control Plane REST API version 2020-12-01-preview.
+ */
+package com.azure.resourcemanager.confidentialledger;
diff --git a/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/module-info.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/module-info.java
new file mode 100644
index 000000000000..72e4b07e8652
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/main/java/module-info.java
@@ -0,0 +1,19 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+module com.azure.resourcemanager.confidentialledger {
+ requires transitive com.azure.core.management;
+
+ exports com.azure.resourcemanager.confidentialledger;
+ exports com.azure.resourcemanager.confidentialledger.fluent;
+ exports com.azure.resourcemanager.confidentialledger.fluent.models;
+ exports com.azure.resourcemanager.confidentialledger.models;
+
+ opens com.azure.resourcemanager.confidentialledger.fluent.models to
+ com.azure.core,
+ com.fasterxml.jackson.databind;
+ opens com.azure.resourcemanager.confidentialledger.models to
+ com.azure.core,
+ com.fasterxml.jackson.databind;
+}
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
new file mode 100644
index 000000000000..1e0ae0696cfe
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/LedgerCreateSamples.java
@@ -0,0 +1,66 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.confidentialledger.generated;
+
+import com.azure.resourcemanager.confidentialledger.models.AadBasedSecurityPrincipal;
+import com.azure.resourcemanager.confidentialledger.models.CertBasedSecurityPrincipal;
+import com.azure.resourcemanager.confidentialledger.models.LedgerProperties;
+import com.azure.resourcemanager.confidentialledger.models.LedgerRoleName;
+import com.azure.resourcemanager.confidentialledger.models.LedgerType;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Ledger Create. */
+public final class LedgerCreateSamples {
+ /*
+ * x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/stable/2022-05-13/examples/ConfidentialLedger_Create.json
+ */
+ /**
+ * Sample code: ConfidentialLedgerCreate.
+ *
+ * @param manager Entry point to ConfidentialLedgerManager.
+ */
+ public static void confidentialLedgerCreate(
+ com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) {
+ manager
+ .ledgers()
+ .define("DummyLedgerName")
+ .withExistingResourceGroup("DummyResourceGroupName")
+ .withRegion("EastUS")
+ .withTags(mapOf("additionalProps1", "additional properties"))
+ .withProperties(
+ new LedgerProperties()
+ .withLedgerType(LedgerType.PUBLIC)
+ .withAadBasedSecurityPrincipals(
+ Arrays
+ .asList(
+ new AadBasedSecurityPrincipal()
+ .withPrincipalId("34621747-6fc8-4771-a2eb-72f31c461f2e")
+ .withTenantId("bce123b9-2b7b-4975-8360-5ca0b9b1cd08")
+ .withLedgerRoleName(LedgerRoleName.ADMINISTRATOR)))
+ .withCertBasedSecurityPrincipals(
+ Arrays
+ .asList(
+ new CertBasedSecurityPrincipal()
+ .withCert(
+ "-----BEGIN"
+ + " CERTIFICATE-----MIIBsjCCATigAwIBAgIUZWIbyG79TniQLd2UxJuU74tqrKcwCgYIKoZIzj0EAwMwEDEOMAwGA1UEAwwFdXNlcjAwHhcNMjEwMzE2MTgwNjExWhcNMjIwMzE2MTgwNjExWjAQMQ4wDAYDVQQDDAV1c2VyMDB2MBAGByqGSM49AgEGBSuBBAAiA2IABBiWSo/j8EFit7aUMm5lF+lUmCu+IgfnpFD+7QMgLKtxRJ3aGSqgS/GpqcYVGddnODtSarNE/HyGKUFUolLPQ5ybHcouUk0kyfA7XMeSoUA4lBz63Wha8wmXo+NdBRo39qNTMFEwHQYDVR0OBBYEFPtuhrwgGjDFHeUUT4nGsXaZn69KMB8GA1UdIwQYMBaAFPtuhrwgGjDFHeUUT4nGsXaZn69KMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwMDaAAwZQIxAOnozm2CyqRwSSQLls5r+mUHRGRyXHXwYtM4Dcst/VEZdmS9fqvHRCHbjUlO/+HNfgIwMWZ4FmsjD3wnPxONOm9YdVn/PRD7SsPRPbOjwBiE4EBGaHDsLjYAGDSGi7NJnSkA-----END"
+ + " CERTIFICATE-----")
+ .withLedgerRoleName(LedgerRoleName.READER))))
+ .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/LedgerDeleteSamples.java b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/LedgerDeleteSamples.java
new file mode 100644
index 000000000000..6a9cb21ae769
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/LedgerDeleteSamples.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;
+
+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
+ */
+ /**
+ * Sample code: ConfidentialLedgerDelete.
+ *
+ * @param manager Entry point to ConfidentialLedgerManager.
+ */
+ public static void confidentialLedgerDelete(
+ com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) {
+ manager.ledgers().delete("DummyResourceGroupName", "DummyLedgerName", 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
new file mode 100644
index 000000000000..557800227f9f
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/LedgerGetByResourceGroupSamples.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;
+
+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
+ */
+ /**
+ * Sample code: ConfidentialLedgerGet.
+ *
+ * @param manager Entry point to ConfidentialLedgerManager.
+ */
+ public static void confidentialLedgerGet(
+ com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) {
+ manager.ledgers().getByResourceGroupWithResponse("DummyResourceGroupName", "DummyLedgerName", 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
new file mode 100644
index 000000000000..50af7d46a8cc
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/LedgerListByResourceGroupSamples.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;
+
+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
+ */
+ /**
+ * Sample code: ConfidentialLedgerList.
+ *
+ * @param manager Entry point to ConfidentialLedgerManager.
+ */
+ public static void confidentialLedgerList(
+ com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) {
+ manager.ledgers().listByResourceGroup("DummyResourceGroupName", null, 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
new file mode 100644
index 000000000000..a0b22b3f4288
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/LedgerListSamples.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;
+
+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
+ */
+ /**
+ * Sample code: ConfidentialLedgerListBySub.
+ *
+ * @param manager Entry point to ConfidentialLedgerManager.
+ */
+ public static void confidentialLedgerListBySub(
+ com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) {
+ manager.ledgers().list(null, 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
new file mode 100644
index 000000000000..a5b74b931bd8
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/LedgerUpdateSamples.java
@@ -0,0 +1,70 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.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;
+import com.azure.resourcemanager.confidentialledger.models.LedgerProperties;
+import com.azure.resourcemanager.confidentialledger.models.LedgerRoleName;
+import com.azure.resourcemanager.confidentialledger.models.LedgerType;
+import java.util.Arrays;
+import java.util.HashMap;
+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
+ */
+ /**
+ * Sample code: ConfidentialLedgerUpdate.
+ *
+ * @param manager Entry point to ConfidentialLedgerManager.
+ */
+ public static void confidentialLedgerUpdate(
+ com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) {
+ ConfidentialLedger resource =
+ manager
+ .ledgers()
+ .getByResourceGroupWithResponse("DummyResourceGroupName", "DummyLedgerName", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withTags(mapOf("additionProps2", "additional property value", "additionalProps1", "additional properties"))
+ .withProperties(
+ new LedgerProperties()
+ .withLedgerType(LedgerType.PUBLIC)
+ .withAadBasedSecurityPrincipals(
+ Arrays
+ .asList(
+ new AadBasedSecurityPrincipal()
+ .withPrincipalId("34621747-6fc8-4771-a2eb-72f31c461f2e")
+ .withTenantId("bce123b9-2b7b-4975-8360-5ca0b9b1cd08")
+ .withLedgerRoleName(LedgerRoleName.ADMINISTRATOR)))
+ .withCertBasedSecurityPrincipals(
+ Arrays
+ .asList(
+ new CertBasedSecurityPrincipal()
+ .withCert(
+ "-----BEGIN CERTIFICATE-----\n"
+ + "MIIDUjCCAjqgAwIBAgIQJ2IrDBawSkiAbkBYmiAopDANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDExtTeW50aGV0aWNzIExlZGdlciBVc2VyIENlcnQwHhcNMjAwOTIzMjIxODQ2WhcNMjEwOTIzMjIyODQ2WjAmMSQwIgYDVQQDExtTeW50aGV0aWNzIExlZGdlciBVc2VyIENlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCX2s/Eu4q/eQ63N+Ugeg5oAciZua/YCJr41c/696szvSY7Zg1SNJlW88/nbz70+QpO55OmqlEE3QCU+T0Vl/h0Gf//n1PYcoBbTGUnYEmV+fTTHict6rFiEwrGJ62tvcpYgwapInSLyEeUzjki0zhOLJ1OfRnYd1eGnFVMpE5aVjiS8Q5dmTEUyd51EIprGE8RYAW9aeWSwTH7gjHUsRlJnHKcdhaK/v5QKJnNu5bzPFUcpC0ZBcizoMPAtroLAD4B68Jl0z3op18MgZe6lRrVoWuxfqnk5GojuB/Vu8ohAZKoFhQ6NB6r+LL2AUs+Zr7Bt26IkEdR178n9JMEA4gHAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBS/a7PU9iOfOKEyZCp11Oen5VSuuDAdBgNVHQ4EFgQUv2uz1PYjnzihMmQqddTnp+VUrrgwDQYJKoZIhvcNAQELBQADggEBAF5q2fDwnse8egXhfaJCqqM969E9gSacqFmASpoDJPRPEX7gqoO7v1ww7nqRtRDoRiBvo/yNk7jlSAkRN3nRRnZLZZ3MYQdmCr4FGyIqRg4Y94+nja+Du9pDD761rxRktMVPSOaAVM/E5DQvscDlPvlPYe9mkcrLCE4DXYpiMmLT8Tm55LJJq5m07dVDgzAIR1L/hmEcbK0pnLgzciMtMLxGO2udnyyW/UW9WxnjvrrD2JluTHH9mVbb+XQP1oFtlRBfH7aui1ZgWfKvxrdP4zdK9QoWSUvRux3TLsGmHRBjBMtqYDY3y5mB+aNjLelvWpeVb0m2aOSVXynrLwNCAVA=\n"
+ + "-----END CERTIFICATE-----")
+ .withLedgerRoleName(LedgerRoleName.READER))))
+ .apply();
+ }
+
+ @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
new file mode 100644
index 000000000000..9ed9ae90ee83
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/OperationsListSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.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
+ */
+ /**
+ * Sample code: OperationsGet.
+ *
+ * @param manager Entry point to ConfidentialLedgerManager.
+ */
+ public static void operationsGet(com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) {
+ manager.operations().list(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
new file mode 100644
index 000000000000..59da2a3a8135
--- /dev/null
+++ b/sdk/confidentialledger/azure-resourcemanager-confidentialledger/src/samples/java/com/azure/resourcemanager/confidentialledger/generated/ResourceProviderCheckNameAvailabilitySamples.java
@@ -0,0 +1,30 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.confidentialledger.generated;
+
+import com.azure.core.util.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
+ */
+ /**
+ * Sample code: CheckNameAvailability.
+ *
+ * @param manager Entry point to ConfidentialLedgerManager.
+ */
+ public static void checkNameAvailability(
+ com.azure.resourcemanager.confidentialledger.ConfidentialLedgerManager manager) {
+ manager
+ .resourceProviders()
+ .checkNameAvailabilityWithResponse(
+ new CheckNameAvailabilityRequest()
+ .withName("sample-name")
+ .withType("Microsoft.ConfidentialLedger/ledgers"),
+ Context.NONE);
+ }
+}
diff --git a/sdk/confidentialledger/ci.yml b/sdk/confidentialledger/ci.yml
index 45e79d569f64..7b076f1cadc4 100644
--- a/sdk/confidentialledger/ci.yml
+++ b/sdk/confidentialledger/ci.yml
@@ -1,4 +1,5 @@
# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file.
+
trigger:
branches:
include:
@@ -34,3 +35,6 @@ extends:
- name: azure-security-confidentialledger
groupId: com.azure
safeName: azuresecurityconfidentialledger
+ - name: azure-resourcemanager-confidentialledger
+ groupId: com.azure.resourcemanager
+ safeName: azureresourcemanagerconfidentialledger
diff --git a/sdk/confidentialledger/pom.xml b/sdk/confidentialledger/pom.xml
index c751247ecaff..6104dff84348 100644
--- a/sdk/confidentialledger/pom.xml
+++ b/sdk/confidentialledger/pom.xml
@@ -42,6 +42,7 @@
true
+ azure-resourcemanager-confidentialledger
azure-security-confidentialledger