diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index d3e3bd5796e3..569d4c741764 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -201,6 +201,7 @@ com.azure.resourcemanager:azure-resourcemanager-eventgrid;1.0.0-beta.1;1.0.0-bet
com.azure.resourcemanager:azure-resourcemanager-healthbot;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-confluent;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-digitaltwins;1.0.0-beta.1;1.0.0-beta.1
+com.azure.resourcemanager:azure-resourcemanager-redisenterprise;1.0.0-beta.1;1.0.0-beta.1
# Unreleased dependencies: Copy the entry from above, prepend "unreleased_" and remove the current
# version. Unreleased dependencies are only valid for dependency versions.
diff --git a/pom.xml b/pom.xml
index c6f2da27340d..fff31c7f30a7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -593,6 +593,7 @@
sdk/postgresql
sdk/quantum
sdk/recoveryservices
+ sdk/redisenterprise
sdk/relay
sdk/resourcemanager
sdk/schemaregistry
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/CHANGELOG.md b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/CHANGELOG.md
new file mode 100644
index 000000000000..1b32912c9c55
--- /dev/null
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/CHANGELOG.md
@@ -0,0 +1,5 @@
+# Release History
+
+## 1.0.0-beta.1 (2021-02-18)
+
+- Azure Resource Manager RedisEnterprise client library for Java. This package contains Microsoft Azure SDK for RedisEnterprise Management SDK. REST API for managing Redis Enterprise resources in Azure. Package tag package-2021-03. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/README.md b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/README.md
new file mode 100644
index 000000000000..bb7f306b92a5
--- /dev/null
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/README.md
@@ -0,0 +1,99 @@
+# Azure Resource Manager RedisEnterprise client library for Java
+
+Azure Resource Manager RedisEnterprise client library for Java.
+
+This package contains Microsoft Azure SDK for RedisEnterprise Management SDK. REST API for managing Redis Enterprise resources in Azure. Package tag package-2021-03. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+
+## We'd love to hear your feedback
+
+We're always working on improving our products and the way we communicate with our users. So we'd love to learn what's working and how we can do better.
+
+If you haven't already, please take a few minutes to [complete this short survey][survey] we have put together.
+
+Thank you in advance for your collaboration. We really appreciate your time!
+
+## Documentation
+
+Various documentation is available to help you get started
+
+- [API reference documentation][docs]
+
+## Getting started
+
+### Prerequisites
+
+- [Java Development Kit (JDK)][jdk] with version 8 or above
+- [Azure Subscription][azure_subscription]
+
+### Adding the package to your product
+
+[//]: # ({x-version-update-start;com.azure.resourcemanager:azure-resourcemanager-redisenterprise;current})
+```xml
+
+ com.azure.resourcemanager
+ azure-resourcemanager-redisenterprise
+ 1.0.0-beta.1
+
+```
+[//]: # ({x-version-update-end})
+
+### Include the recommended packages
+
+Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client.
+
+[Azure Identity][azure_identity] package and [Azure Core Netty HTTP][azure_core_http_netty] package provide the default implementation.
+
+### Authentication
+
+By default, Azure Active Directory token authentication depends on correct configure of following environment variables.
+
+- `AZURE_CLIENT_ID` for Azure client ID.
+- `AZURE_TENANT_ID` for Azure tenant ID.
+- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.
+
+In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.
+
+With above configuration, `azure` client can be authenticated by following code:
+
+```java
+AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
+TokenCredential credential = new DefaultAzureCredentialBuilder()
+ .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
+ .build();
+RedisEnterpriseManager manager = RedisEnterpriseManager
+ .authenticate(credential, profile);
+```
+
+The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise.
+
+See [Authentication][authenticate] for more options.
+
+## Key concepts
+
+See [API design][design] for general introduction on design and key concepts on Azure Management Libraries.
+
+## Examples
+
+## Troubleshooting
+
+## Next steps
+
+## Contributing
+
+For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/master/CONTRIBUTING.md).
+
+1. Fork it
+1. Create your feature branch (`git checkout -b my-new-feature`)
+1. Commit your changes (`git commit -am 'Add some feature'`)
+1. Push to the branch (`git push origin my-new-feature`)
+1. Create new Pull Request
+
+
+[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS
+[docs]: https://azure.github.io/azure-sdk-for-java/
+[jdk]: https://docs.microsoft.com/java/azure/jdk/
+[azure_subscription]: https://azure.microsoft.com/free/
+[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/identity/azure-identity
+[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/core/azure-core-http-netty
+[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/resourcemanager/docs/AUTH.md
+[design]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/resourcemanager/docs/DESIGN.md
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/pom.xml b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/pom.xml
new file mode 100644
index 000000000000..26e23ff014e4
--- /dev/null
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/pom.xml
@@ -0,0 +1,67 @@
+
+ 4.0.0
+
+ com.azure
+ azure-client-sdk-parent
+ 1.7.0
+ ../../parents/azure-client-sdk-parent
+
+
+ com.azure.resourcemanager
+ azure-resourcemanager-redisenterprise
+ 1.0.0-beta.1
+ jar
+
+ Microsoft Azure SDK for RedisEnterprise Management
+ This package contains Microsoft Azure SDK for RedisEnterprise Management SDK. REST API for managing Redis Enterprise resources in Azure. Package tag package-2021-03. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt
+ https://github.com/Azure/azure-sdk-for-java
+
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
+
+
+ https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
+
+
+ microsoft
+ Microsoft
+
+
+
+ UTF-8
+
+
+
+
+ com.azure
+ azure-core
+ 1.13.0
+
+
+ com.azure
+ azure-core-management
+ 1.1.1
+
+
+
+
+
+ org.jacoco
+ jacoco-maven-plugin
+ 0.8.5
+
+ true
+
+
+
+
+
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/RedisEnterpriseManager.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/RedisEnterpriseManager.java
new file mode 100644
index 000000000000..a18bf03d12ed
--- /dev/null
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/RedisEnterpriseManager.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.redisenterprise;
+
+import com.azure.core.credential.TokenCredential;
+import com.azure.core.http.HttpClient;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.policy.AddDatePolicy;
+import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
+import com.azure.core.http.policy.HttpLogOptions;
+import com.azure.core.http.policy.HttpLoggingPolicy;
+import com.azure.core.http.policy.HttpPipelinePolicy;
+import com.azure.core.http.policy.HttpPolicyProviders;
+import com.azure.core.http.policy.RequestIdPolicy;
+import com.azure.core.http.policy.RetryPolicy;
+import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.management.profile.AzureProfile;
+import com.azure.core.util.Configuration;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.redisenterprise.fluent.RedisEnterpriseManagementClient;
+import com.azure.resourcemanager.redisenterprise.implementation.DatabasesImpl;
+import com.azure.resourcemanager.redisenterprise.implementation.OperationsImpl;
+import com.azure.resourcemanager.redisenterprise.implementation.OperationsStatusImpl;
+import com.azure.resourcemanager.redisenterprise.implementation.PrivateEndpointConnectionsImpl;
+import com.azure.resourcemanager.redisenterprise.implementation.PrivateLinkResourcesImpl;
+import com.azure.resourcemanager.redisenterprise.implementation.RedisEnterpriseManagementClientBuilder;
+import com.azure.resourcemanager.redisenterprise.implementation.RedisEnterprisesImpl;
+import com.azure.resourcemanager.redisenterprise.models.Databases;
+import com.azure.resourcemanager.redisenterprise.models.Operations;
+import com.azure.resourcemanager.redisenterprise.models.OperationsStatus;
+import com.azure.resourcemanager.redisenterprise.models.PrivateEndpointConnections;
+import com.azure.resourcemanager.redisenterprise.models.PrivateLinkResources;
+import com.azure.resourcemanager.redisenterprise.models.RedisEnterprises;
+import java.time.Duration;
+import java.time.temporal.ChronoUnit;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+/** Entry point to RedisEnterpriseManager. REST API for managing Redis Enterprise resources in Azure. */
+public final class RedisEnterpriseManager {
+ private Operations operations;
+
+ private OperationsStatus operationsStatus;
+
+ private RedisEnterprises redisEnterprises;
+
+ private Databases databases;
+
+ private PrivateEndpointConnections privateEndpointConnections;
+
+ private PrivateLinkResources privateLinkResources;
+
+ private final RedisEnterpriseManagementClient clientObject;
+
+ private RedisEnterpriseManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
+ Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ this.clientObject =
+ new RedisEnterpriseManagementClientBuilder()
+ .pipeline(httpPipeline)
+ .endpoint(profile.getEnvironment().getResourceManagerEndpoint())
+ .subscriptionId(profile.getSubscriptionId())
+ .defaultPollInterval(defaultPollInterval)
+ .buildClient();
+ }
+
+ /**
+ * Creates an instance of RedisEnterprise service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the RedisEnterprise service API instance.
+ */
+ public static RedisEnterpriseManager authenticate(TokenCredential credential, AzureProfile profile) {
+ Objects.requireNonNull(credential, "'credential' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ return configure().authenticate(credential, profile);
+ }
+
+ /**
+ * Gets a Configurable instance that can be used to create RedisEnterpriseManager with optional configuration.
+ *
+ * @return the Configurable instance allowing configurations.
+ */
+ public static Configurable configure() {
+ return new RedisEnterpriseManager.Configurable();
+ }
+
+ /** The Configurable allowing configurations to be set. */
+ public static final class Configurable {
+ private final ClientLogger logger = new ClientLogger(Configurable.class);
+
+ private HttpClient httpClient;
+ private HttpLogOptions httpLogOptions;
+ private final List policies = new ArrayList<>();
+ private RetryPolicy retryPolicy;
+ 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;
+ }
+
+ /**
+ * 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 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, "'retryPolicy' cannot be null.");
+ if (this.defaultPollInterval.isNegative()) {
+ throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative"));
+ }
+ return this;
+ }
+
+ /**
+ * Creates an instance of RedisEnterprise service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the RedisEnterprise service API instance.
+ */
+ public RedisEnterpriseManager 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.redisenterprise")
+ .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 (retryPolicy == null) {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
+ List policies = new ArrayList<>();
+ policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new RequestIdPolicy());
+ HttpPolicyProviders.addBeforeRetryPolicies(policies);
+ policies.add(retryPolicy);
+ policies.add(new AddDatePolicy());
+ policies
+ .add(
+ new BearerTokenAuthenticationPolicy(
+ credential, profile.getEnvironment().getManagementEndpoint() + "/.default"));
+ HttpPolicyProviders.addAfterRetryPolicies(policies);
+ policies.add(new HttpLoggingPolicy(httpLogOptions));
+ HttpPipeline httpPipeline =
+ new HttpPipelineBuilder()
+ .httpClient(httpClient)
+ .policies(policies.toArray(new HttpPipelinePolicy[0]))
+ .build();
+ return new RedisEnterpriseManager(httpPipeline, profile, defaultPollInterval);
+ }
+ }
+
+ /** @return Resource collection API of Operations. */
+ public Operations operations() {
+ if (this.operations == null) {
+ this.operations = new OperationsImpl(clientObject.getOperations(), this);
+ }
+ return operations;
+ }
+
+ /** @return Resource collection API of OperationsStatus. */
+ public OperationsStatus operationsStatus() {
+ if (this.operationsStatus == null) {
+ this.operationsStatus = new OperationsStatusImpl(clientObject.getOperationsStatus(), this);
+ }
+ return operationsStatus;
+ }
+
+ /** @return Resource collection API of RedisEnterprises. */
+ public RedisEnterprises redisEnterprises() {
+ if (this.redisEnterprises == null) {
+ this.redisEnterprises = new RedisEnterprisesImpl(clientObject.getRedisEnterprises(), this);
+ }
+ return redisEnterprises;
+ }
+
+ /** @return Resource collection API of Databases. */
+ public Databases databases() {
+ if (this.databases == null) {
+ this.databases = new DatabasesImpl(clientObject.getDatabases(), this);
+ }
+ return databases;
+ }
+
+ /** @return Resource collection API of PrivateEndpointConnections. */
+ public PrivateEndpointConnections privateEndpointConnections() {
+ if (this.privateEndpointConnections == null) {
+ this.privateEndpointConnections =
+ new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this);
+ }
+ return privateEndpointConnections;
+ }
+
+ /** @return Resource collection API of PrivateLinkResources. */
+ public PrivateLinkResources privateLinkResources() {
+ if (this.privateLinkResources == null) {
+ this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this);
+ }
+ return privateLinkResources;
+ }
+
+ /**
+ * @return Wrapped service client RedisEnterpriseManagementClient providing direct access to the underlying
+ * auto-generated API implementation, based on Azure REST API.
+ */
+ public RedisEnterpriseManagementClient serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/DatabasesClient.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/DatabasesClient.java
new file mode 100644
index 000000000000..f9f98491e9b6
--- /dev/null
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/DatabasesClient.java
@@ -0,0 +1,513 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redisenterprise.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.redisenterprise.fluent.models.AccessKeysInner;
+import com.azure.resourcemanager.redisenterprise.fluent.models.DatabaseInner;
+import com.azure.resourcemanager.redisenterprise.models.DatabaseUpdate;
+import com.azure.resourcemanager.redisenterprise.models.ExportClusterParameters;
+import com.azure.resourcemanager.redisenterprise.models.ImportClusterParameters;
+import com.azure.resourcemanager.redisenterprise.models.RegenerateKeyParameters;
+
+/** An instance of this class provides access to all the operations defined in DatabasesClient. */
+public interface DatabasesClient {
+ /**
+ * Gets all databases in the specified RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all databases in the specified RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByCluster(String resourceGroupName, String clusterName);
+
+ /**
+ * Gets all databases in the specified RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @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 all databases in the specified RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context);
+
+ /**
+ * Creates a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Parameters supplied to the create or update database 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 describes a database on the RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, DatabaseInner> beginCreate(
+ String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters);
+
+ /**
+ * Creates a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Parameters supplied to the create or update database operation.
+ * @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 describes a database on the RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, DatabaseInner> beginCreate(
+ String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters, Context context);
+
+ /**
+ * Creates a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Parameters supplied to the create or update database 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 describes a database on the RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseInner create(String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters);
+
+ /**
+ * Creates a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Parameters supplied to the create or update database operation.
+ * @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 describes a database on the RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseInner create(
+ String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters, Context context);
+
+ /**
+ * Updates a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Parameters supplied to the create or update database 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 describes a database on the RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, DatabaseInner> beginUpdate(
+ String resourceGroupName, String clusterName, String databaseName, DatabaseUpdate parameters);
+
+ /**
+ * Updates a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Parameters supplied to the create or update database operation.
+ * @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 describes a database on the RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, DatabaseInner> beginUpdate(
+ String resourceGroupName, String clusterName, String databaseName, DatabaseUpdate parameters, Context context);
+
+ /**
+ * Updates a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Parameters supplied to the create or update database 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 describes a database on the RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseInner update(String resourceGroupName, String clusterName, String databaseName, DatabaseUpdate parameters);
+
+ /**
+ * Updates a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Parameters supplied to the create or update database operation.
+ * @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 describes a database on the RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseInner update(
+ String resourceGroupName, String clusterName, String databaseName, DatabaseUpdate parameters, Context context);
+
+ /**
+ * Gets information about a database in a RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information about a database in a RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseInner get(String resourceGroupName, String clusterName, String databaseName);
+
+ /**
+ * Gets information about a database in a RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @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 information about a database in a RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String clusterName, String databaseName, Context context);
+
+ /**
+ * Deletes a single database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String databaseName);
+
+ /**
+ * Deletes a single database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String clusterName, String databaseName, Context context);
+
+ /**
+ * Deletes a single database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 clusterName, String databaseName);
+
+ /**
+ * Deletes a single database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @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 clusterName, String databaseName, Context context);
+
+ /**
+ * Retrieves the access keys for the RedisEnterprise database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 secret access keys used for authenticating connections to redis.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AccessKeysInner listKeys(String resourceGroupName, String clusterName, String databaseName);
+
+ /**
+ * Retrieves the access keys for the RedisEnterprise database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @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 secret access keys used for authenticating connections to redis.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response listKeysWithResponse(
+ String resourceGroupName, String clusterName, String databaseName, Context context);
+
+ /**
+ * Regenerates the RedisEnterprise database's access keys.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Specifies which key to regenerate.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 secret access keys used for authenticating connections to redis.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, AccessKeysInner> beginRegenerateKey(
+ String resourceGroupName, String clusterName, String databaseName, RegenerateKeyParameters parameters);
+
+ /**
+ * Regenerates the RedisEnterprise database's access keys.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Specifies which key to regenerate.
+ * @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 secret access keys used for authenticating connections to redis.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, AccessKeysInner> beginRegenerateKey(
+ String resourceGroupName,
+ String clusterName,
+ String databaseName,
+ RegenerateKeyParameters parameters,
+ Context context);
+
+ /**
+ * Regenerates the RedisEnterprise database's access keys.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Specifies which key to regenerate.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 secret access keys used for authenticating connections to redis.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AccessKeysInner regenerateKey(
+ String resourceGroupName, String clusterName, String databaseName, RegenerateKeyParameters parameters);
+
+ /**
+ * Regenerates the RedisEnterprise database's access keys.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Specifies which key to regenerate.
+ * @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 secret access keys used for authenticating connections to redis.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AccessKeysInner regenerateKey(
+ String resourceGroupName,
+ String clusterName,
+ String databaseName,
+ RegenerateKeyParameters parameters,
+ Context context);
+
+ /**
+ * Imports a database file to target database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Storage information for importing into the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginImportMethod(
+ String resourceGroupName, String clusterName, String databaseName, ImportClusterParameters parameters);
+
+ /**
+ * Imports a database file to target database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Storage information for importing into the cluster.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginImportMethod(
+ String resourceGroupName,
+ String clusterName,
+ String databaseName,
+ ImportClusterParameters parameters,
+ Context context);
+
+ /**
+ * Imports a database file to target database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Storage information for importing into the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 importMethod(
+ String resourceGroupName, String clusterName, String databaseName, ImportClusterParameters parameters);
+
+ /**
+ * Imports a database file to target database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Storage information for importing into the cluster.
+ * @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 importMethod(
+ String resourceGroupName,
+ String clusterName,
+ String databaseName,
+ ImportClusterParameters parameters,
+ Context context);
+
+ /**
+ * Exports a database file from target database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Storage information for exporting into the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginExport(
+ String resourceGroupName, String clusterName, String databaseName, ExportClusterParameters parameters);
+
+ /**
+ * Exports a database file from target database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Storage information for exporting into the cluster.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginExport(
+ String resourceGroupName,
+ String clusterName,
+ String databaseName,
+ ExportClusterParameters parameters,
+ Context context);
+
+ /**
+ * Exports a database file from target database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Storage information for exporting into the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 export(String resourceGroupName, String clusterName, String databaseName, ExportClusterParameters parameters);
+
+ /**
+ * Exports a database file from target database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Storage information for exporting into the cluster.
+ * @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 export(
+ String resourceGroupName,
+ String clusterName,
+ String databaseName,
+ ExportClusterParameters parameters,
+ Context context);
+}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/OperationsClient.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/OperationsClient.java
new file mode 100644
index 000000000000..1ac3726460ba
--- /dev/null
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/OperationsClient.java
@@ -0,0 +1,36 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redisenterprise.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.redisenterprise.fluent.models.OperationInner;
+
+/** An instance of this class provides access to all the operations defined in OperationsClient. */
+public interface OperationsClient {
+ /**
+ * Lists all of the available REST API operations of the Microsoft.Cache provider.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Lists all of the available REST API operations of the Microsoft.Cache provider.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/OperationsStatusClient.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/OperationsStatusClient.java
new file mode 100644
index 000000000000..50d86883ae37
--- /dev/null
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/OperationsStatusClient.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.redisenterprise.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.redisenterprise.fluent.models.OperationStatusInner;
+
+/** An instance of this class provides access to all the operations defined in OperationsStatusClient. */
+public interface OperationsStatusClient {
+ /**
+ * Gets the status of operation.
+ *
+ * @param location The region the operation is in.
+ * @param operationId The operation's unique identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 status of operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationStatusInner get(String location, String operationId);
+
+ /**
+ * Gets the status of operation.
+ *
+ * @param location The region the operation is in.
+ * @param operationId The operation's unique identifier.
+ * @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 status of operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String location, String operationId, Context context);
+}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/PrivateEndpointConnectionsClient.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/PrivateEndpointConnectionsClient.java
new file mode 100644
index 000000000000..498c2b25bd92
--- /dev/null
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/PrivateEndpointConnectionsClient.java
@@ -0,0 +1,192 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redisenterprise.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.redisenterprise.fluent.models.PrivateEndpointConnectionInner;
+
+/** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */
+public interface PrivateEndpointConnectionsClient {
+ /**
+ * Lists all the private endpoint connections associated with the RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of private endpoint connection associated with the specified storage account.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String clusterName);
+
+ /**
+ * Lists all the private endpoint connections associated with the RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of private endpoint connection associated with the specified storage account.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String clusterName, Context context);
+
+ /**
+ * Gets the specified private endpoint connection associated with the RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 specified private endpoint connection associated with the RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateEndpointConnectionInner get(
+ String resourceGroupName, String clusterName, String privateEndpointConnectionName);
+
+ /**
+ * Gets the specified private endpoint connection associated with the RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @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 specified private endpoint connection associated with the RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context);
+
+ /**
+ * Updates the state of the specified private endpoint connection associated with the RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @param properties The private endpoint connection properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 Private Endpoint Connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, PrivateEndpointConnectionInner> beginPut(
+ String resourceGroupName,
+ String clusterName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner properties);
+
+ /**
+ * Updates the state of the specified private endpoint connection associated with the RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @param properties The private endpoint connection properties.
+ * @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 Private Endpoint Connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, PrivateEndpointConnectionInner> beginPut(
+ String resourceGroupName,
+ String clusterName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner properties,
+ Context context);
+
+ /**
+ * Updates the state of the specified private endpoint connection associated with the RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @param properties The private endpoint connection properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 Private Endpoint Connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateEndpointConnectionInner put(
+ String resourceGroupName,
+ String clusterName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner properties);
+
+ /**
+ * Updates the state of the specified private endpoint connection associated with the RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @param properties The private endpoint connection properties.
+ * @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 Private Endpoint Connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateEndpointConnectionInner put(
+ String resourceGroupName,
+ String clusterName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner properties,
+ Context context);
+
+ /**
+ * Deletes the specified private endpoint connection associated with the RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 clusterName, String privateEndpointConnectionName);
+
+ /**
+ * Deletes the specified private endpoint connection associated with the RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @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 response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(
+ String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context);
+}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/PrivateLinkResourcesClient.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/PrivateLinkResourcesClient.java
new file mode 100644
index 000000000000..51751bd40324
--- /dev/null
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/PrivateLinkResourcesClient.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.redisenterprise.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.redisenterprise.fluent.models.PrivateLinkResourceInner;
+
+/** An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */
+public interface PrivateLinkResourcesClient {
+ /**
+ * Gets the private link resources that need to be created for a RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 private link resources that need to be created for a RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByCluster(String resourceGroupName, String clusterName);
+
+ /**
+ * Gets the private link resources that need to be created for a RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @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 private link resources that need to be created for a RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByCluster(
+ String resourceGroupName, String clusterName, Context context);
+}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/RedisEnterpriseManagementClient.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/RedisEnterpriseManagementClient.java
new file mode 100644
index 000000000000..b78ea349ab58
--- /dev/null
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/RedisEnterpriseManagementClient.java
@@ -0,0 +1,88 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redisenterprise.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/** The interface for RedisEnterpriseManagementClient class. */
+public interface RedisEnterpriseManagementClient {
+ /**
+ * Gets The ID of the target subscription.
+ *
+ * @return the subscriptionId value.
+ */
+ String getSubscriptionId();
+
+ /**
+ * Gets server parameter.
+ *
+ * @return the endpoint value.
+ */
+ String getEndpoint();
+
+ /**
+ * Gets Api Version.
+ *
+ * @return the apiVersion value.
+ */
+ String getApiVersion();
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ HttpPipeline getHttpPipeline();
+
+ /**
+ * Gets The default poll interval for long-running operation.
+ *
+ * @return the defaultPollInterval value.
+ */
+ Duration getDefaultPollInterval();
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ OperationsClient getOperations();
+
+ /**
+ * Gets the OperationsStatusClient object to access its operations.
+ *
+ * @return the OperationsStatusClient object.
+ */
+ OperationsStatusClient getOperationsStatus();
+
+ /**
+ * Gets the RedisEnterprisesClient object to access its operations.
+ *
+ * @return the RedisEnterprisesClient object.
+ */
+ RedisEnterprisesClient getRedisEnterprises();
+
+ /**
+ * Gets the DatabasesClient object to access its operations.
+ *
+ * @return the DatabasesClient object.
+ */
+ DatabasesClient getDatabases();
+
+ /**
+ * Gets the PrivateEndpointConnectionsClient object to access its operations.
+ *
+ * @return the PrivateEndpointConnectionsClient object.
+ */
+ PrivateEndpointConnectionsClient getPrivateEndpointConnections();
+
+ /**
+ * Gets the PrivateLinkResourcesClient object to access its operations.
+ *
+ * @return the PrivateLinkResourcesClient object.
+ */
+ PrivateLinkResourcesClient getPrivateLinkResources();
+}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/RedisEnterprisesClient.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/RedisEnterprisesClient.java
new file mode 100644
index 000000000000..31434fe63c02
--- /dev/null
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/RedisEnterprisesClient.java
@@ -0,0 +1,265 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redisenterprise.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.redisenterprise.fluent.models.ClusterInner;
+import com.azure.resourcemanager.redisenterprise.models.ClusterUpdate;
+
+/** An instance of this class provides access to all the operations defined in RedisEnterprisesClient. */
+public interface RedisEnterprisesClient {
+ /**
+ * Creates or updates an existing (overwrite/recreate, with potential downtime) cache cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param parameters Parameters supplied to the Create RedisEnterprise 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 describes the RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, ClusterInner> beginCreate(
+ String resourceGroupName, String clusterName, ClusterInner parameters);
+
+ /**
+ * Creates or updates an existing (overwrite/recreate, with potential downtime) cache cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param parameters Parameters supplied to the Create RedisEnterprise operation.
+ * @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 describes the RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, ClusterInner> beginCreate(
+ String resourceGroupName, String clusterName, ClusterInner parameters, Context context);
+
+ /**
+ * Creates or updates an existing (overwrite/recreate, with potential downtime) cache cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param parameters Parameters supplied to the Create RedisEnterprise 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 describes the RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ClusterInner create(String resourceGroupName, String clusterName, ClusterInner parameters);
+
+ /**
+ * Creates or updates an existing (overwrite/recreate, with potential downtime) cache cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param parameters Parameters supplied to the Create RedisEnterprise operation.
+ * @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 describes the RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ClusterInner create(String resourceGroupName, String clusterName, ClusterInner parameters, Context context);
+
+ /**
+ * Updates an existing RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param parameters Parameters supplied to the Update RedisEnterprise 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 describes the RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, ClusterInner> beginUpdate(
+ String resourceGroupName, String clusterName, ClusterUpdate parameters);
+
+ /**
+ * Updates an existing RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param parameters Parameters supplied to the Update RedisEnterprise operation.
+ * @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 describes the RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, ClusterInner> beginUpdate(
+ String resourceGroupName, String clusterName, ClusterUpdate parameters, Context context);
+
+ /**
+ * Updates an existing RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param parameters Parameters supplied to the Update RedisEnterprise 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 describes the RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ClusterInner update(String resourceGroupName, String clusterName, ClusterUpdate parameters);
+
+ /**
+ * Updates an existing RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param parameters Parameters supplied to the Update RedisEnterprise operation.
+ * @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 describes the RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ClusterInner update(String resourceGroupName, String clusterName, ClusterUpdate parameters, Context context);
+
+ /**
+ * Deletes a RedisEnterprise cache cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName);
+
+ /**
+ * Deletes a RedisEnterprise cache cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, Context context);
+
+ /**
+ * Deletes a RedisEnterprise cache cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 clusterName);
+
+ /**
+ * Deletes a RedisEnterprise cache cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @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 clusterName, Context context);
+
+ /**
+ * Gets information about a RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information about a RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ClusterInner getByResourceGroup(String resourceGroupName, String clusterName);
+
+ /**
+ * Gets information about a RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @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 information about a RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String clusterName, Context context);
+
+ /**
+ * Lists all RedisEnterprise clusters in a resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a list-all operation.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * Lists all RedisEnterprise clusters in a resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a list-all operation.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * Gets all RedisEnterprise clusters in the specified subscription.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all RedisEnterprise clusters in the specified subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Gets all RedisEnterprise clusters in the specified subscription.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all RedisEnterprise clusters in the specified subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/AccessKeysInner.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/AccessKeysInner.java
new file mode 100644
index 000000000000..a95c5c6cf6bf
--- /dev/null
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/AccessKeysInner.java
@@ -0,0 +1,54 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redisenterprise.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The secret access keys used for authenticating connections to redis. */
+@Immutable
+public final class AccessKeysInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(AccessKeysInner.class);
+
+ /*
+ * The current primary key that clients can use to authenticate
+ */
+ @JsonProperty(value = "primaryKey", access = JsonProperty.Access.WRITE_ONLY)
+ private String primaryKey;
+
+ /*
+ * The current secondary key that clients can use to authenticate
+ */
+ @JsonProperty(value = "secondaryKey", access = JsonProperty.Access.WRITE_ONLY)
+ private String secondaryKey;
+
+ /**
+ * Get the primaryKey property: The current primary key that clients can use to authenticate.
+ *
+ * @return the primaryKey value.
+ */
+ public String primaryKey() {
+ return this.primaryKey;
+ }
+
+ /**
+ * Get the secondaryKey property: The current secondary key that clients can use to authenticate.
+ *
+ * @return the secondaryKey value.
+ */
+ public String secondaryKey() {
+ return this.secondaryKey;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/ClusterInner.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/ClusterInner.java
new file mode 100644
index 000000000000..b973c7f29413
--- /dev/null
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/ClusterInner.java
@@ -0,0 +1,212 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redisenterprise.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.Resource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.redisenterprise.models.ProvisioningState;
+import com.azure.resourcemanager.redisenterprise.models.ResourceState;
+import com.azure.resourcemanager.redisenterprise.models.Sku;
+import com.azure.resourcemanager.redisenterprise.models.TlsVersion;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+import java.util.Map;
+
+/** Describes the RedisEnterprise cluster. */
+@JsonFlatten
+@Fluent
+public class ClusterInner extends Resource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterInner.class);
+
+ /*
+ * The SKU to create, which affects price, performance, and features.
+ */
+ @JsonProperty(value = "sku", required = true)
+ private Sku sku;
+
+ /*
+ * The Availability Zones where this cluster will be deployed.
+ */
+ @JsonProperty(value = "zones")
+ private List zones;
+
+ /*
+ * The minimum TLS version for the cluster to support, e.g. '1.2'
+ */
+ @JsonProperty(value = "properties.minimumTlsVersion")
+ private TlsVersion minimumTlsVersion;
+
+ /*
+ * DNS name of the cluster endpoint
+ */
+ @JsonProperty(value = "properties.hostName", access = JsonProperty.Access.WRITE_ONLY)
+ private String hostname;
+
+ /*
+ * Current provisioning status of the cluster
+ */
+ @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /*
+ * Current resource status of the cluster
+ */
+ @JsonProperty(value = "properties.resourceState", access = JsonProperty.Access.WRITE_ONLY)
+ private ResourceState resourceState;
+
+ /*
+ * Version of redis the cluster supports, e.g. '6'
+ */
+ @JsonProperty(value = "properties.redisVersion", access = JsonProperty.Access.WRITE_ONLY)
+ private String redisVersion;
+
+ /*
+ * List of private endpoint connections associated with the specified
+ * RedisEnterprise cluster
+ */
+ @JsonProperty(value = "properties.privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY)
+ private List privateEndpointConnections;
+
+ /**
+ * Get the sku property: The SKU to create, which affects price, performance, and features.
+ *
+ * @return the sku value.
+ */
+ public Sku sku() {
+ return this.sku;
+ }
+
+ /**
+ * Set the sku property: The SKU to create, which affects price, performance, and features.
+ *
+ * @param sku the sku value to set.
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withSku(Sku sku) {
+ this.sku = sku;
+ return this;
+ }
+
+ /**
+ * Get the zones property: The Availability Zones where this cluster will be deployed.
+ *
+ * @return the zones value.
+ */
+ public List zones() {
+ return this.zones;
+ }
+
+ /**
+ * Set the zones property: The Availability Zones where this cluster will be deployed.
+ *
+ * @param zones the zones value to set.
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withZones(List zones) {
+ this.zones = zones;
+ return this;
+ }
+
+ /**
+ * Get the minimumTlsVersion property: The minimum TLS version for the cluster to support, e.g. '1.2'.
+ *
+ * @return the minimumTlsVersion value.
+ */
+ public TlsVersion minimumTlsVersion() {
+ return this.minimumTlsVersion;
+ }
+
+ /**
+ * Set the minimumTlsVersion property: The minimum TLS version for the cluster to support, e.g. '1.2'.
+ *
+ * @param minimumTlsVersion the minimumTlsVersion value to set.
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withMinimumTlsVersion(TlsVersion minimumTlsVersion) {
+ this.minimumTlsVersion = minimumTlsVersion;
+ return this;
+ }
+
+ /**
+ * Get the hostname property: DNS name of the cluster endpoint.
+ *
+ * @return the hostname value.
+ */
+ public String hostname() {
+ return this.hostname;
+ }
+
+ /**
+ * Get the provisioningState property: Current provisioning status of the cluster.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the resourceState property: Current resource status of the cluster.
+ *
+ * @return the resourceState value.
+ */
+ public ResourceState resourceState() {
+ return this.resourceState;
+ }
+
+ /**
+ * Get the redisVersion property: Version of redis the cluster supports, e.g. '6'.
+ *
+ * @return the redisVersion value.
+ */
+ public String redisVersion() {
+ return this.redisVersion;
+ }
+
+ /**
+ * Get the privateEndpointConnections property: List of private endpoint connections associated with the specified
+ * RedisEnterprise cluster.
+ *
+ * @return the privateEndpointConnections value.
+ */
+ public List privateEndpointConnections() {
+ return this.privateEndpointConnections;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public ClusterInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public ClusterInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (sku() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property sku in model ClusterInner"));
+ } else {
+ sku().validate();
+ }
+ if (privateEndpointConnections() != null) {
+ privateEndpointConnections().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/DatabaseInner.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/DatabaseInner.java
new file mode 100644
index 000000000000..80d73098f090
--- /dev/null
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/DatabaseInner.java
@@ -0,0 +1,236 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redisenterprise.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.redisenterprise.models.ClusteringPolicy;
+import com.azure.resourcemanager.redisenterprise.models.EvictionPolicy;
+import com.azure.resourcemanager.redisenterprise.models.Module;
+import com.azure.resourcemanager.redisenterprise.models.Persistence;
+import com.azure.resourcemanager.redisenterprise.models.Protocol;
+import com.azure.resourcemanager.redisenterprise.models.ProvisioningState;
+import com.azure.resourcemanager.redisenterprise.models.ResourceState;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Describes a database on the RedisEnterprise cluster. */
+@JsonFlatten
+@Fluent
+public class DatabaseInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(DatabaseInner.class);
+
+ /*
+ * Specifies whether redis clients can connect using TLS-encrypted or
+ * plaintext redis protocols. Default is TLS-encrypted.
+ */
+ @JsonProperty(value = "properties.clientProtocol")
+ private Protocol clientProtocol;
+
+ /*
+ * TCP port of the database endpoint. Specified at create time. Defaults to
+ * an available port.
+ */
+ @JsonProperty(value = "properties.port")
+ private Integer port;
+
+ /*
+ * Current provisioning status of the database
+ */
+ @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /*
+ * Current resource status of the database
+ */
+ @JsonProperty(value = "properties.resourceState", access = JsonProperty.Access.WRITE_ONLY)
+ private ResourceState resourceState;
+
+ /*
+ * Clustering policy - default is OSSCluster. Specified at create time.
+ */
+ @JsonProperty(value = "properties.clusteringPolicy")
+ private ClusteringPolicy clusteringPolicy;
+
+ /*
+ * Redis eviction policy - default is VolatileLRU
+ */
+ @JsonProperty(value = "properties.evictionPolicy")
+ private EvictionPolicy evictionPolicy;
+
+ /*
+ * Persistence settings
+ */
+ @JsonProperty(value = "properties.persistence")
+ private Persistence persistence;
+
+ /*
+ * Optional set of redis modules to enable in this database - modules can
+ * only be added at creation time.
+ */
+ @JsonProperty(value = "properties.modules")
+ private List modules;
+
+ /**
+ * Get the clientProtocol property: Specifies whether redis clients can connect using TLS-encrypted or plaintext
+ * redis protocols. Default is TLS-encrypted.
+ *
+ * @return the clientProtocol value.
+ */
+ public Protocol clientProtocol() {
+ return this.clientProtocol;
+ }
+
+ /**
+ * Set the clientProtocol property: Specifies whether redis clients can connect using TLS-encrypted or plaintext
+ * redis protocols. Default is TLS-encrypted.
+ *
+ * @param clientProtocol the clientProtocol value to set.
+ * @return the DatabaseInner object itself.
+ */
+ public DatabaseInner withClientProtocol(Protocol clientProtocol) {
+ this.clientProtocol = clientProtocol;
+ return this;
+ }
+
+ /**
+ * Get the port property: TCP port of the database endpoint. Specified at create time. Defaults to an available
+ * port.
+ *
+ * @return the port value.
+ */
+ public Integer port() {
+ return this.port;
+ }
+
+ /**
+ * Set the port property: TCP port of the database endpoint. Specified at create time. Defaults to an available
+ * port.
+ *
+ * @param port the port value to set.
+ * @return the DatabaseInner object itself.
+ */
+ public DatabaseInner withPort(Integer port) {
+ this.port = port;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: Current provisioning status of the database.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the resourceState property: Current resource status of the database.
+ *
+ * @return the resourceState value.
+ */
+ public ResourceState resourceState() {
+ return this.resourceState;
+ }
+
+ /**
+ * Get the clusteringPolicy property: Clustering policy - default is OSSCluster. Specified at create time.
+ *
+ * @return the clusteringPolicy value.
+ */
+ public ClusteringPolicy clusteringPolicy() {
+ return this.clusteringPolicy;
+ }
+
+ /**
+ * Set the clusteringPolicy property: Clustering policy - default is OSSCluster. Specified at create time.
+ *
+ * @param clusteringPolicy the clusteringPolicy value to set.
+ * @return the DatabaseInner object itself.
+ */
+ public DatabaseInner withClusteringPolicy(ClusteringPolicy clusteringPolicy) {
+ this.clusteringPolicy = clusteringPolicy;
+ return this;
+ }
+
+ /**
+ * Get the evictionPolicy property: Redis eviction policy - default is VolatileLRU.
+ *
+ * @return the evictionPolicy value.
+ */
+ public EvictionPolicy evictionPolicy() {
+ return this.evictionPolicy;
+ }
+
+ /**
+ * Set the evictionPolicy property: Redis eviction policy - default is VolatileLRU.
+ *
+ * @param evictionPolicy the evictionPolicy value to set.
+ * @return the DatabaseInner object itself.
+ */
+ public DatabaseInner withEvictionPolicy(EvictionPolicy evictionPolicy) {
+ this.evictionPolicy = evictionPolicy;
+ return this;
+ }
+
+ /**
+ * Get the persistence property: Persistence settings.
+ *
+ * @return the persistence value.
+ */
+ public Persistence persistence() {
+ return this.persistence;
+ }
+
+ /**
+ * Set the persistence property: Persistence settings.
+ *
+ * @param persistence the persistence value to set.
+ * @return the DatabaseInner object itself.
+ */
+ public DatabaseInner withPersistence(Persistence persistence) {
+ this.persistence = persistence;
+ return this;
+ }
+
+ /**
+ * Get the modules property: Optional set of redis modules to enable in this database - modules can only be added at
+ * creation time.
+ *
+ * @return the modules value.
+ */
+ public List modules() {
+ return this.modules;
+ }
+
+ /**
+ * Set the modules property: Optional set of redis modules to enable in this database - modules can only be added at
+ * creation time.
+ *
+ * @param modules the modules value to set.
+ * @return the DatabaseInner object itself.
+ */
+ public DatabaseInner withModules(List modules) {
+ this.modules = modules;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (persistence() != null) {
+ persistence().validate();
+ }
+ if (modules() != null) {
+ modules().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/OperationInner.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/OperationInner.java
new file mode 100644
index 000000000000..150270059ea7
--- /dev/null
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/OperationInner.java
@@ -0,0 +1,125 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redisenterprise.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.redisenterprise.models.ActionType;
+import com.azure.resourcemanager.redisenterprise.models.OperationDisplay;
+import com.azure.resourcemanager.redisenterprise.models.Origin;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Details of a REST API operation, returned from the Resource Provider Operations API. */
+@Fluent
+public final class OperationInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class);
+
+ /*
+ * The name of the operation, as per Resource-Based Access Control (RBAC).
+ * Examples: "Microsoft.Compute/virtualMachines/write",
+ * "Microsoft.Compute/virtualMachines/capture/action"
+ */
+ @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
+ private String name;
+
+ /*
+ * Whether the operation applies to data-plane. This is "true" for
+ * data-plane operations and "false" for ARM/control-plane operations.
+ */
+ @JsonProperty(value = "isDataAction", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isDataAction;
+
+ /*
+ * Localized display information for this particular operation.
+ */
+ @JsonProperty(value = "display")
+ private OperationDisplay display;
+
+ /*
+ * The intended executor of the operation; as in Resource Based Access
+ * Control (RBAC) and audit logs UX. Default value is "user,system"
+ */
+ @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY)
+ private Origin origin;
+
+ /*
+ * Enum. Indicates the action type. "Internal" refers to actions that are
+ * for internal only APIs.
+ */
+ @JsonProperty(value = "actionType", access = JsonProperty.Access.WRITE_ONLY)
+ private ActionType actionType;
+
+ /**
+ * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
+ * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action".
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane
+ * operations and "false" for ARM/control-plane operations.
+ *
+ * @return the isDataAction value.
+ */
+ public Boolean isDataAction() {
+ return this.isDataAction;
+ }
+
+ /**
+ * Get the display property: Localized display information for this particular operation.
+ *
+ * @return the display value.
+ */
+ public OperationDisplay display() {
+ return this.display;
+ }
+
+ /**
+ * Set the display property: Localized display information for this particular operation.
+ *
+ * @param display the display value to set.
+ * @return the OperationInner object itself.
+ */
+ public OperationInner withDisplay(OperationDisplay display) {
+ this.display = display;
+ return this;
+ }
+
+ /**
+ * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and
+ * audit logs UX. Default value is "user,system".
+ *
+ * @return the origin value.
+ */
+ public Origin origin() {
+ return this.origin;
+ }
+
+ /**
+ * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal
+ * only APIs.
+ *
+ * @return the actionType value.
+ */
+ public ActionType actionType() {
+ return this.actionType;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (display() != null) {
+ display().validate();
+ }
+ }
+}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/OperationStatusInner.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/OperationStatusInner.java
new file mode 100644
index 000000000000..bcb0bd186e2a
--- /dev/null
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/OperationStatusInner.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.redisenterprise.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.exception.ManagementError;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The status of a long-running operation. */
+@Fluent
+public final class OperationStatusInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationStatusInner.class);
+
+ /*
+ * The operation's unique id.
+ */
+ @JsonProperty(value = "id")
+ private String id;
+
+ /*
+ * The operation's name.
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /*
+ * The start time of the operation.
+ */
+ @JsonProperty(value = "startTime")
+ private String startTime;
+
+ /*
+ * The end time of the operation.
+ */
+ @JsonProperty(value = "endTime")
+ private String endTime;
+
+ /*
+ * The current status of the operation.
+ */
+ @JsonProperty(value = "status")
+ private String status;
+
+ /*
+ * Error response describing why the operation failed.
+ */
+ @JsonProperty(value = "error")
+ private ManagementError error;
+
+ /**
+ * Get the id property: The operation's unique id.
+ *
+ * @return the id value.
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Set the id property: The operation's unique id.
+ *
+ * @param id the id value to set.
+ * @return the OperationStatusInner object itself.
+ */
+ public OperationStatusInner withId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get the name property: The operation's name.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: The operation's name.
+ *
+ * @param name the name value to set.
+ * @return the OperationStatusInner object itself.
+ */
+ public OperationStatusInner withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the startTime property: The start time of the operation.
+ *
+ * @return the startTime value.
+ */
+ public String startTime() {
+ return this.startTime;
+ }
+
+ /**
+ * Set the startTime property: The start time of the operation.
+ *
+ * @param startTime the startTime value to set.
+ * @return the OperationStatusInner object itself.
+ */
+ public OperationStatusInner withStartTime(String startTime) {
+ this.startTime = startTime;
+ return this;
+ }
+
+ /**
+ * Get the endTime property: The end time of the operation.
+ *
+ * @return the endTime value.
+ */
+ public String endTime() {
+ return this.endTime;
+ }
+
+ /**
+ * Set the endTime property: The end time of the operation.
+ *
+ * @param endTime the endTime value to set.
+ * @return the OperationStatusInner object itself.
+ */
+ public OperationStatusInner withEndTime(String endTime) {
+ this.endTime = endTime;
+ return this;
+ }
+
+ /**
+ * Get the status property: The current status of the operation.
+ *
+ * @return the status value.
+ */
+ public String status() {
+ return this.status;
+ }
+
+ /**
+ * Set the status property: The current status of the operation.
+ *
+ * @param status the status value to set.
+ * @return the OperationStatusInner object itself.
+ */
+ public OperationStatusInner withStatus(String status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get the error property: Error response describing why the operation failed.
+ *
+ * @return the error value.
+ */
+ public ManagementError error() {
+ return this.error;
+ }
+
+ /**
+ * Set the error property: Error response describing why the operation failed.
+ *
+ * @param error the error value to set.
+ * @return the OperationStatusInner object itself.
+ */
+ public OperationStatusInner withError(ManagementError error) {
+ this.error = error;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/PrivateEndpointConnectionInner.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/PrivateEndpointConnectionInner.java
new file mode 100644
index 000000000000..6e69a85bcfd3
--- /dev/null
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/PrivateEndpointConnectionInner.java
@@ -0,0 +1,107 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redisenterprise.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.redisenterprise.models.PrivateEndpoint;
+import com.azure.resourcemanager.redisenterprise.models.PrivateEndpointConnectionProvisioningState;
+import com.azure.resourcemanager.redisenterprise.models.PrivateLinkServiceConnectionState;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The Private Endpoint Connection resource. */
+@JsonFlatten
+@Fluent
+public class PrivateEndpointConnectionInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionInner.class);
+
+ /*
+ * The resource of private end point.
+ */
+ @JsonProperty(value = "properties.privateEndpoint")
+ private PrivateEndpoint privateEndpoint;
+
+ /*
+ * A collection of information about the state of the connection between
+ * service consumer and provider.
+ */
+ @JsonProperty(value = "properties.privateLinkServiceConnectionState")
+ private PrivateLinkServiceConnectionState privateLinkServiceConnectionState;
+
+ /*
+ * The provisioning state of the private endpoint connection resource.
+ */
+ @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private PrivateEndpointConnectionProvisioningState provisioningState;
+
+ /**
+ * Get the privateEndpoint property: The resource of private end point.
+ *
+ * @return the privateEndpoint value.
+ */
+ public PrivateEndpoint privateEndpoint() {
+ return this.privateEndpoint;
+ }
+
+ /**
+ * Set the privateEndpoint property: The resource of private end point.
+ *
+ * @param privateEndpoint the privateEndpoint value to set.
+ * @return the PrivateEndpointConnectionInner object itself.
+ */
+ public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privateEndpoint) {
+ this.privateEndpoint = privateEndpoint;
+ return this;
+ }
+
+ /**
+ * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection
+ * between service consumer and provider.
+ *
+ * @return the privateLinkServiceConnectionState value.
+ */
+ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() {
+ return this.privateLinkServiceConnectionState;
+ }
+
+ /**
+ * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection
+ * between service consumer and provider.
+ *
+ * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set.
+ * @return the PrivateEndpointConnectionInner object itself.
+ */
+ public PrivateEndpointConnectionInner withPrivateLinkServiceConnectionState(
+ PrivateLinkServiceConnectionState privateLinkServiceConnectionState) {
+ this.privateLinkServiceConnectionState = privateLinkServiceConnectionState;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of the private endpoint connection resource.
+ *
+ * @return the provisioningState value.
+ */
+ public PrivateEndpointConnectionProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (privateEndpoint() != null) {
+ privateEndpoint().validate();
+ }
+ if (privateLinkServiceConnectionState() != null) {
+ privateLinkServiceConnectionState().validate();
+ }
+ }
+}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/PrivateLinkResourceInner.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/PrivateLinkResourceInner.java
new file mode 100644
index 000000000000..2e940994eb86
--- /dev/null
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/PrivateLinkResourceInner.java
@@ -0,0 +1,84 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redisenterprise.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** A private link resource. */
+@JsonFlatten
+@Fluent
+public class PrivateLinkResourceInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourceInner.class);
+
+ /*
+ * The private link resource group id.
+ */
+ @JsonProperty(value = "properties.groupId", access = JsonProperty.Access.WRITE_ONLY)
+ private String groupId;
+
+ /*
+ * The private link resource required member names.
+ */
+ @JsonProperty(value = "properties.requiredMembers", access = JsonProperty.Access.WRITE_ONLY)
+ private List requiredMembers;
+
+ /*
+ * The private link resource Private link DNS zone name.
+ */
+ @JsonProperty(value = "properties.requiredZoneNames")
+ private List requiredZoneNames;
+
+ /**
+ * Get the groupId property: The private link resource group id.
+ *
+ * @return the groupId value.
+ */
+ public String groupId() {
+ return this.groupId;
+ }
+
+ /**
+ * Get the requiredMembers property: The private link resource required member names.
+ *
+ * @return the requiredMembers value.
+ */
+ public List requiredMembers() {
+ return this.requiredMembers;
+ }
+
+ /**
+ * Get the requiredZoneNames property: The private link resource Private link DNS zone name.
+ *
+ * @return the requiredZoneNames value.
+ */
+ public List requiredZoneNames() {
+ return this.requiredZoneNames;
+ }
+
+ /**
+ * Set the requiredZoneNames property: The private link resource Private link DNS zone name.
+ *
+ * @param requiredZoneNames the requiredZoneNames value to set.
+ * @return the PrivateLinkResourceInner object itself.
+ */
+ public PrivateLinkResourceInner withRequiredZoneNames(List requiredZoneNames) {
+ this.requiredZoneNames = requiredZoneNames;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/package-info.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/package-info.java
new file mode 100644
index 000000000000..80926ee76c2c
--- /dev/null
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/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 RedisEnterpriseManagementClient. REST API for managing Redis Enterprise
+ * resources in Azure.
+ */
+package com.azure.resourcemanager.redisenterprise.fluent.models;
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/package-info.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/package-info.java
new file mode 100644
index 000000000000..5d8e43689364
--- /dev/null
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/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 RedisEnterpriseManagementClient. REST API for managing Redis Enterprise
+ * resources in Azure.
+ */
+package com.azure.resourcemanager.redisenterprise.fluent;
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/AccessKeysImpl.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/AccessKeysImpl.java
new file mode 100644
index 000000000000..86a7ab68c6f5
--- /dev/null
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/AccessKeysImpl.java
@@ -0,0 +1,36 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redisenterprise.implementation;
+
+import com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager;
+import com.azure.resourcemanager.redisenterprise.fluent.models.AccessKeysInner;
+import com.azure.resourcemanager.redisenterprise.models.AccessKeys;
+
+public final class AccessKeysImpl implements AccessKeys {
+ private AccessKeysInner innerObject;
+
+ private final RedisEnterpriseManager serviceManager;
+
+ AccessKeysImpl(AccessKeysInner innerObject, RedisEnterpriseManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String primaryKey() {
+ return this.innerModel().primaryKey();
+ }
+
+ public String secondaryKey() {
+ return this.innerModel().secondaryKey();
+ }
+
+ public AccessKeysInner innerModel() {
+ return this.innerObject;
+ }
+
+ private RedisEnterpriseManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/ClusterImpl.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/ClusterImpl.java
new file mode 100644
index 000000000000..6f9b2f3a48e9
--- /dev/null
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/ClusterImpl.java
@@ -0,0 +1,250 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redisenterprise.implementation;
+
+import com.azure.core.management.Region;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager;
+import com.azure.resourcemanager.redisenterprise.fluent.models.ClusterInner;
+import com.azure.resourcemanager.redisenterprise.fluent.models.PrivateEndpointConnectionInner;
+import com.azure.resourcemanager.redisenterprise.models.Cluster;
+import com.azure.resourcemanager.redisenterprise.models.ClusterUpdate;
+import com.azure.resourcemanager.redisenterprise.models.PrivateEndpointConnection;
+import com.azure.resourcemanager.redisenterprise.models.ProvisioningState;
+import com.azure.resourcemanager.redisenterprise.models.ResourceState;
+import com.azure.resourcemanager.redisenterprise.models.Sku;
+import com.azure.resourcemanager.redisenterprise.models.TlsVersion;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+public final class ClusterImpl implements Cluster, Cluster.Definition, Cluster.Update {
+ private ClusterInner innerObject;
+
+ private final RedisEnterpriseManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String location() {
+ return this.innerModel().location();
+ }
+
+ public Map tags() {
+ Map inner = this.innerModel().tags();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
+ public Sku sku() {
+ return this.innerModel().sku();
+ }
+
+ public List zones() {
+ List inner = this.innerModel().zones();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public TlsVersion minimumTlsVersion() {
+ return this.innerModel().minimumTlsVersion();
+ }
+
+ public String hostname() {
+ return this.innerModel().hostname();
+ }
+
+ public ProvisioningState provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public ResourceState resourceState() {
+ return this.innerModel().resourceState();
+ }
+
+ public String redisVersion() {
+ return this.innerModel().redisVersion();
+ }
+
+ public List privateEndpointConnections() {
+ List inner = this.innerModel().privateEndpointConnections();
+ if (inner != null) {
+ return Collections
+ .unmodifiableList(
+ inner
+ .stream()
+ .map(inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager()))
+ .collect(Collectors.toList()));
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public Region region() {
+ return Region.fromName(this.regionName());
+ }
+
+ public String regionName() {
+ return this.location();
+ }
+
+ public ClusterInner innerModel() {
+ return this.innerObject;
+ }
+
+ private RedisEnterpriseManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String clusterName;
+
+ private ClusterUpdate updateParameters;
+
+ public ClusterImpl withExistingResourceGroup(String resourceGroupName) {
+ this.resourceGroupName = resourceGroupName;
+ return this;
+ }
+
+ public Cluster create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getRedisEnterprises()
+ .create(resourceGroupName, clusterName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public Cluster create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getRedisEnterprises()
+ .create(resourceGroupName, clusterName, this.innerModel(), context);
+ return this;
+ }
+
+ ClusterImpl(String name, RedisEnterpriseManager serviceManager) {
+ this.innerObject = new ClusterInner();
+ this.serviceManager = serviceManager;
+ this.clusterName = name;
+ }
+
+ public ClusterImpl update() {
+ this.updateParameters = new ClusterUpdate();
+ return this;
+ }
+
+ public Cluster apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getRedisEnterprises()
+ .update(resourceGroupName, clusterName, updateParameters, Context.NONE);
+ return this;
+ }
+
+ public Cluster apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getRedisEnterprises()
+ .update(resourceGroupName, clusterName, updateParameters, context);
+ return this;
+ }
+
+ ClusterImpl(ClusterInner innerObject, RedisEnterpriseManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.clusterName = Utils.getValueFromIdByName(innerObject.id(), "redisEnterprise");
+ }
+
+ public Cluster refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getRedisEnterprises()
+ .getByResourceGroupWithResponse(resourceGroupName, clusterName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Cluster refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getRedisEnterprises()
+ .getByResourceGroupWithResponse(resourceGroupName, clusterName, context)
+ .getValue();
+ return this;
+ }
+
+ public ClusterImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
+ return this;
+ }
+
+ public ClusterImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
+ return this;
+ }
+
+ public ClusterImpl withSku(Sku sku) {
+ if (isInCreateMode()) {
+ this.innerModel().withSku(sku);
+ return this;
+ } else {
+ this.updateParameters.withSku(sku);
+ return this;
+ }
+ }
+
+ public ClusterImpl withTags(Map tags) {
+ if (isInCreateMode()) {
+ this.innerModel().withTags(tags);
+ return this;
+ } else {
+ this.updateParameters.withTags(tags);
+ return this;
+ }
+ }
+
+ public ClusterImpl withZones(List zones) {
+ this.innerModel().withZones(zones);
+ return this;
+ }
+
+ public ClusterImpl withMinimumTlsVersion(TlsVersion minimumTlsVersion) {
+ if (isInCreateMode()) {
+ this.innerModel().withMinimumTlsVersion(minimumTlsVersion);
+ return this;
+ } else {
+ this.updateParameters.withMinimumTlsVersion(minimumTlsVersion);
+ return this;
+ }
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/DatabaseImpl.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/DatabaseImpl.java
new file mode 100644
index 000000000000..7c03c0b18343
--- /dev/null
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/DatabaseImpl.java
@@ -0,0 +1,270 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redisenterprise.implementation;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager;
+import com.azure.resourcemanager.redisenterprise.fluent.models.DatabaseInner;
+import com.azure.resourcemanager.redisenterprise.models.AccessKeys;
+import com.azure.resourcemanager.redisenterprise.models.ClusteringPolicy;
+import com.azure.resourcemanager.redisenterprise.models.Database;
+import com.azure.resourcemanager.redisenterprise.models.DatabaseUpdate;
+import com.azure.resourcemanager.redisenterprise.models.EvictionPolicy;
+import com.azure.resourcemanager.redisenterprise.models.ExportClusterParameters;
+import com.azure.resourcemanager.redisenterprise.models.ImportClusterParameters;
+import com.azure.resourcemanager.redisenterprise.models.Module;
+import com.azure.resourcemanager.redisenterprise.models.Persistence;
+import com.azure.resourcemanager.redisenterprise.models.Protocol;
+import com.azure.resourcemanager.redisenterprise.models.ProvisioningState;
+import com.azure.resourcemanager.redisenterprise.models.RegenerateKeyParameters;
+import com.azure.resourcemanager.redisenterprise.models.ResourceState;
+import java.util.Collections;
+import java.util.List;
+
+public final class DatabaseImpl implements Database, Database.Definition, Database.Update {
+ private DatabaseInner innerObject;
+
+ private final RedisEnterpriseManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public Protocol clientProtocol() {
+ return this.innerModel().clientProtocol();
+ }
+
+ public Integer port() {
+ return this.innerModel().port();
+ }
+
+ public ProvisioningState provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public ResourceState resourceState() {
+ return this.innerModel().resourceState();
+ }
+
+ public ClusteringPolicy clusteringPolicy() {
+ return this.innerModel().clusteringPolicy();
+ }
+
+ public EvictionPolicy evictionPolicy() {
+ return this.innerModel().evictionPolicy();
+ }
+
+ public Persistence persistence() {
+ return this.innerModel().persistence();
+ }
+
+ public List modules() {
+ List inner = this.innerModel().modules();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public DatabaseInner innerModel() {
+ return this.innerObject;
+ }
+
+ private RedisEnterpriseManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String clusterName;
+
+ private String databaseName;
+
+ private DatabaseUpdate updateParameters;
+
+ public DatabaseImpl withExistingRedisEnterprise(String resourceGroupName, String clusterName) {
+ this.resourceGroupName = resourceGroupName;
+ this.clusterName = clusterName;
+ return this;
+ }
+
+ public Database create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDatabases()
+ .create(resourceGroupName, clusterName, databaseName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public Database create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDatabases()
+ .create(resourceGroupName, clusterName, databaseName, this.innerModel(), context);
+ return this;
+ }
+
+ DatabaseImpl(String name, RedisEnterpriseManager serviceManager) {
+ this.innerObject = new DatabaseInner();
+ this.serviceManager = serviceManager;
+ this.databaseName = name;
+ }
+
+ public DatabaseImpl update() {
+ this.updateParameters = new DatabaseUpdate();
+ return this;
+ }
+
+ public Database apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDatabases()
+ .update(resourceGroupName, clusterName, databaseName, updateParameters, Context.NONE);
+ return this;
+ }
+
+ public Database apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDatabases()
+ .update(resourceGroupName, clusterName, databaseName, updateParameters, context);
+ return this;
+ }
+
+ DatabaseImpl(DatabaseInner innerObject, RedisEnterpriseManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.clusterName = Utils.getValueFromIdByName(innerObject.id(), "redisEnterprise");
+ this.databaseName = Utils.getValueFromIdByName(innerObject.id(), "databases");
+ }
+
+ public Database refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDatabases()
+ .getWithResponse(resourceGroupName, clusterName, databaseName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Database refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDatabases()
+ .getWithResponse(resourceGroupName, clusterName, databaseName, context)
+ .getValue();
+ return this;
+ }
+
+ public AccessKeys listKeys() {
+ return serviceManager.databases().listKeys(resourceGroupName, clusterName, databaseName);
+ }
+
+ public Response listKeysWithResponse(Context context) {
+ return serviceManager.databases().listKeysWithResponse(resourceGroupName, clusterName, databaseName, context);
+ }
+
+ public AccessKeys regenerateKey(RegenerateKeyParameters parameters) {
+ return serviceManager.databases().regenerateKey(resourceGroupName, clusterName, databaseName, parameters);
+ }
+
+ public AccessKeys regenerateKey(RegenerateKeyParameters parameters, Context context) {
+ return serviceManager
+ .databases()
+ .regenerateKey(resourceGroupName, clusterName, databaseName, parameters, context);
+ }
+
+ public void importMethod(ImportClusterParameters parameters) {
+ serviceManager.databases().importMethod(resourceGroupName, clusterName, databaseName, parameters);
+ }
+
+ public void importMethod(ImportClusterParameters parameters, Context context) {
+ serviceManager.databases().importMethod(resourceGroupName, clusterName, databaseName, parameters, context);
+ }
+
+ public void export(ExportClusterParameters parameters) {
+ serviceManager.databases().export(resourceGroupName, clusterName, databaseName, parameters);
+ }
+
+ public void export(ExportClusterParameters parameters, Context context) {
+ serviceManager.databases().export(resourceGroupName, clusterName, databaseName, parameters, context);
+ }
+
+ public DatabaseImpl withClientProtocol(Protocol clientProtocol) {
+ if (isInCreateMode()) {
+ this.innerModel().withClientProtocol(clientProtocol);
+ return this;
+ } else {
+ this.updateParameters.withClientProtocol(clientProtocol);
+ return this;
+ }
+ }
+
+ public DatabaseImpl withPort(Integer port) {
+ this.innerModel().withPort(port);
+ return this;
+ }
+
+ public DatabaseImpl withClusteringPolicy(ClusteringPolicy clusteringPolicy) {
+ if (isInCreateMode()) {
+ this.innerModel().withClusteringPolicy(clusteringPolicy);
+ return this;
+ } else {
+ this.updateParameters.withClusteringPolicy(clusteringPolicy);
+ return this;
+ }
+ }
+
+ public DatabaseImpl withEvictionPolicy(EvictionPolicy evictionPolicy) {
+ if (isInCreateMode()) {
+ this.innerModel().withEvictionPolicy(evictionPolicy);
+ return this;
+ } else {
+ this.updateParameters.withEvictionPolicy(evictionPolicy);
+ return this;
+ }
+ }
+
+ public DatabaseImpl withPersistence(Persistence persistence) {
+ if (isInCreateMode()) {
+ this.innerModel().withPersistence(persistence);
+ return this;
+ } else {
+ this.updateParameters.withPersistence(persistence);
+ return this;
+ }
+ }
+
+ public DatabaseImpl withModules(List modules) {
+ if (isInCreateMode()) {
+ this.innerModel().withModules(modules);
+ return this;
+ } else {
+ this.updateParameters.withModules(modules);
+ return this;
+ }
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/DatabasesClientImpl.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/DatabasesClientImpl.java
new file mode 100644
index 000000000000..3604fa08a0a6
--- /dev/null
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/DatabasesClientImpl.java
@@ -0,0 +1,2517 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redisenterprise.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.redisenterprise.fluent.DatabasesClient;
+import com.azure.resourcemanager.redisenterprise.fluent.models.AccessKeysInner;
+import com.azure.resourcemanager.redisenterprise.fluent.models.DatabaseInner;
+import com.azure.resourcemanager.redisenterprise.models.DatabaseList;
+import com.azure.resourcemanager.redisenterprise.models.DatabaseUpdate;
+import com.azure.resourcemanager.redisenterprise.models.ExportClusterParameters;
+import com.azure.resourcemanager.redisenterprise.models.ImportClusterParameters;
+import com.azure.resourcemanager.redisenterprise.models.RegenerateKeyParameters;
+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 DatabasesClient. */
+public final class DatabasesClientImpl implements DatabasesClient {
+ private final ClientLogger logger = new ClientLogger(DatabasesClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final DatabasesService service;
+
+ /** The service client containing this operation class. */
+ private final RedisEnterpriseManagementClientImpl client;
+
+ /**
+ * Initializes an instance of DatabasesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ DatabasesClientImpl(RedisEnterpriseManagementClientImpl client) {
+ this.service =
+ RestProxy.create(DatabasesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for RedisEnterpriseManagementClientDatabases to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "RedisEnterpriseManag")
+ private interface DatabasesService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache"
+ + "/redisEnterprise/{clusterName}/databases")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByCluster(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache"
+ + "/redisEnterprise/{clusterName}/databases/{databaseName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> create(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @PathParam("databaseName") String databaseName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @BodyParam("application/json") DatabaseInner parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Patch(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache"
+ + "/redisEnterprise/{clusterName}/databases/{databaseName}")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> update(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @PathParam("databaseName") String databaseName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @BodyParam("application/json") DatabaseUpdate parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache"
+ + "/redisEnterprise/{clusterName}/databases/{databaseName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @PathParam("databaseName") String databaseName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache"
+ + "/redisEnterprise/{clusterName}/databases/{databaseName}")
+ @ExpectedResponses({200, 202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @PathParam("databaseName") String databaseName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache"
+ + "/redisEnterprise/{clusterName}/databases/{databaseName}/listKeys")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listKeys(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @PathParam("databaseName") String databaseName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache"
+ + "/redisEnterprise/{clusterName}/databases/{databaseName}/regenerateKey")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> regenerateKey(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @PathParam("databaseName") String databaseName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @BodyParam("application/json") RegenerateKeyParameters parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache"
+ + "/redisEnterprise/{clusterName}/databases/{databaseName}/import")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> importMethod(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @PathParam("databaseName") String databaseName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @BodyParam("application/json") ImportClusterParameters parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache"
+ + "/redisEnterprise/{clusterName}/databases/{databaseName}/export")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> export(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @PathParam("databaseName") String databaseName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @BodyParam("application/json") ExportClusterParameters parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByClusterNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Gets all databases in the specified RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all databases in the specified RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByClusterSinglePageAsync(
+ String resourceGroupName, String clusterName) {
+ 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 (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listByCluster(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Gets all databases in the specified RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @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 all databases in the specified RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByClusterSinglePageAsync(
+ String resourceGroupName, String clusterName, 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 (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByCluster(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Gets all databases in the specified RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all databases in the specified RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName) {
+ return new PagedFlux<>(
+ () -> listByClusterSinglePageAsync(resourceGroupName, clusterName),
+ nextLink -> listByClusterNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Gets all databases in the specified RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @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 all databases in the specified RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName, Context context) {
+ return new PagedFlux<>(
+ () -> listByClusterSinglePageAsync(resourceGroupName, clusterName, context),
+ nextLink -> listByClusterNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Gets all databases in the specified RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all databases in the specified RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByCluster(String resourceGroupName, String clusterName) {
+ return new PagedIterable<>(listByClusterAsync(resourceGroupName, clusterName));
+ }
+
+ /**
+ * Gets all databases in the specified RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @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 all databases in the specified RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context) {
+ return new PagedIterable<>(listByClusterAsync(resourceGroupName, clusterName, context));
+ }
+
+ /**
+ * Creates a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Parameters supplied to the create or update database 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 describes a database on the RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(
+ String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (databaseName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter databaseName 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 (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .create(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ clusterName,
+ databaseName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ parameters,
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Creates a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Parameters supplied to the create or update database operation.
+ * @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 describes a database on the RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(
+ String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (databaseName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter databaseName 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 (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .create(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ clusterName,
+ databaseName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ parameters,
+ accept,
+ context);
+ }
+
+ /**
+ * Creates a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Parameters supplied to the create or update database 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 describes a database on the RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, DatabaseInner> beginCreateAsync(
+ String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters) {
+ Mono>> mono =
+ createWithResponseAsync(resourceGroupName, clusterName, databaseName, parameters);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), DatabaseInner.class, DatabaseInner.class, Context.NONE);
+ }
+
+ /**
+ * Creates a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Parameters supplied to the create or update database operation.
+ * @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 describes a database on the RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, DatabaseInner> beginCreateAsync(
+ String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ createWithResponseAsync(resourceGroupName, clusterName, databaseName, parameters, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), DatabaseInner.class, DatabaseInner.class, context);
+ }
+
+ /**
+ * Creates a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Parameters supplied to the create or update database 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 describes a database on the RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, DatabaseInner> beginCreate(
+ String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters) {
+ return beginCreateAsync(resourceGroupName, clusterName, databaseName, parameters).getSyncPoller();
+ }
+
+ /**
+ * Creates a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Parameters supplied to the create or update database operation.
+ * @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 describes a database on the RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, DatabaseInner> beginCreate(
+ String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters, Context context) {
+ return beginCreateAsync(resourceGroupName, clusterName, databaseName, parameters, context).getSyncPoller();
+ }
+
+ /**
+ * Creates a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Parameters supplied to the create or update database 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 describes a database on the RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(
+ String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters) {
+ return beginCreateAsync(resourceGroupName, clusterName, databaseName, parameters)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Creates a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Parameters supplied to the create or update database operation.
+ * @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 describes a database on the RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(
+ String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters, Context context) {
+ return beginCreateAsync(resourceGroupName, clusterName, databaseName, parameters, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Creates a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Parameters supplied to the create or update database 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 describes a database on the RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DatabaseInner create(
+ String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters) {
+ return createAsync(resourceGroupName, clusterName, databaseName, parameters).block();
+ }
+
+ /**
+ * Creates a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Parameters supplied to the create or update database operation.
+ * @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 describes a database on the RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DatabaseInner create(
+ String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters, Context context) {
+ return createAsync(resourceGroupName, clusterName, databaseName, parameters, context).block();
+ }
+
+ /**
+ * Updates a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Parameters supplied to the create or update database 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 describes a database on the RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(
+ String resourceGroupName, String clusterName, String databaseName, DatabaseUpdate parameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (databaseName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter databaseName 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 (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .update(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ clusterName,
+ databaseName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ parameters,
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Updates a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Parameters supplied to the create or update database operation.
+ * @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 describes a database on the RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(
+ String resourceGroupName, String clusterName, String databaseName, DatabaseUpdate parameters, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (databaseName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter databaseName 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 (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .update(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ clusterName,
+ databaseName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ parameters,
+ accept,
+ context);
+ }
+
+ /**
+ * Updates a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Parameters supplied to the create or update database 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 describes a database on the RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, DatabaseInner> beginUpdateAsync(
+ String resourceGroupName, String clusterName, String databaseName, DatabaseUpdate parameters) {
+ Mono>> mono =
+ updateWithResponseAsync(resourceGroupName, clusterName, databaseName, parameters);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), DatabaseInner.class, DatabaseInner.class, Context.NONE);
+ }
+
+ /**
+ * Updates a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Parameters supplied to the create or update database operation.
+ * @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 describes a database on the RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, DatabaseInner> beginUpdateAsync(
+ String resourceGroupName, String clusterName, String databaseName, DatabaseUpdate parameters, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ updateWithResponseAsync(resourceGroupName, clusterName, databaseName, parameters, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), DatabaseInner.class, DatabaseInner.class, context);
+ }
+
+ /**
+ * Updates a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Parameters supplied to the create or update database 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 describes a database on the RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, DatabaseInner> beginUpdate(
+ String resourceGroupName, String clusterName, String databaseName, DatabaseUpdate parameters) {
+ return beginUpdateAsync(resourceGroupName, clusterName, databaseName, parameters).getSyncPoller();
+ }
+
+ /**
+ * Updates a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Parameters supplied to the create or update database operation.
+ * @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 describes a database on the RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, DatabaseInner> beginUpdate(
+ String resourceGroupName, String clusterName, String databaseName, DatabaseUpdate parameters, Context context) {
+ return beginUpdateAsync(resourceGroupName, clusterName, databaseName, parameters, context).getSyncPoller();
+ }
+
+ /**
+ * Updates a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Parameters supplied to the create or update database 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 describes a database on the RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(
+ String resourceGroupName, String clusterName, String databaseName, DatabaseUpdate parameters) {
+ return beginUpdateAsync(resourceGroupName, clusterName, databaseName, parameters)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Updates a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Parameters supplied to the create or update database operation.
+ * @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 describes a database on the RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(
+ String resourceGroupName, String clusterName, String databaseName, DatabaseUpdate parameters, Context context) {
+ return beginUpdateAsync(resourceGroupName, clusterName, databaseName, parameters, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Updates a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Parameters supplied to the create or update database 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 describes a database on the RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DatabaseInner update(
+ String resourceGroupName, String clusterName, String databaseName, DatabaseUpdate parameters) {
+ return updateAsync(resourceGroupName, clusterName, databaseName, parameters).block();
+ }
+
+ /**
+ * Updates a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Parameters supplied to the create or update database operation.
+ * @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 describes a database on the RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DatabaseInner update(
+ String resourceGroupName, String clusterName, String databaseName, DatabaseUpdate parameters, Context context) {
+ return updateAsync(resourceGroupName, clusterName, databaseName, parameters, context).block();
+ }
+
+ /**
+ * Gets information about a database in a RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information about a database in a RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String clusterName, String databaseName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (databaseName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter databaseName 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
+ .get(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ clusterName,
+ databaseName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Gets information about a database in a RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @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 information about a database in a RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String clusterName, String databaseName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (databaseName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter databaseName 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
+ .get(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ clusterName,
+ databaseName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context);
+ }
+
+ /**
+ * Gets information about a database in a RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information about a database in a RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceGroupName, String clusterName, String databaseName) {
+ return getWithResponseAsync(resourceGroupName, clusterName, databaseName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Gets information about a database in a RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information about a database in a RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DatabaseInner get(String resourceGroupName, String clusterName, String databaseName) {
+ return getAsync(resourceGroupName, clusterName, databaseName).block();
+ }
+
+ /**
+ * Gets information about a database in a RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @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 information about a database in a RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String resourceGroupName, String clusterName, String databaseName, Context context) {
+ return getWithResponseAsync(resourceGroupName, clusterName, databaseName, context).block();
+ }
+
+ /**
+ * Deletes a single database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String clusterName, String databaseName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (databaseName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter databaseName 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
+ .delete(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ clusterName,
+ databaseName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Deletes a single database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String clusterName, String databaseName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (databaseName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter databaseName 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
+ .delete(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ clusterName,
+ databaseName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context);
+ }
+
+ /**
+ * Deletes a single database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String clusterName, String databaseName) {
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName, databaseName);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE);
+ }
+
+ /**
+ * Deletes a single database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String clusterName, String databaseName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ deleteWithResponseAsync(resourceGroupName, clusterName, databaseName, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Deletes a single database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, Void> beginDelete(
+ String resourceGroupName, String clusterName, String databaseName) {
+ return beginDeleteAsync(resourceGroupName, clusterName, databaseName).getSyncPoller();
+ }
+
+ /**
+ * Deletes a single database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, Void> beginDelete(
+ String resourceGroupName, String clusterName, String databaseName, Context context) {
+ return beginDeleteAsync(resourceGroupName, clusterName, databaseName, context).getSyncPoller();
+ }
+
+ /**
+ * Deletes a single database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String clusterName, String databaseName) {
+ return beginDeleteAsync(resourceGroupName, clusterName, databaseName)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes a single database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String clusterName, String databaseName, Context context) {
+ return beginDeleteAsync(resourceGroupName, clusterName, databaseName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes a single database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 clusterName, String databaseName) {
+ deleteAsync(resourceGroupName, clusterName, databaseName).block();
+ }
+
+ /**
+ * Deletes a single database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @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 clusterName, String databaseName, Context context) {
+ deleteAsync(resourceGroupName, clusterName, databaseName, context).block();
+ }
+
+ /**
+ * Retrieves the access keys for the RedisEnterprise database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 secret access keys used for authenticating connections to redis.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listKeysWithResponseAsync(
+ String resourceGroupName, String clusterName, String databaseName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (databaseName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter databaseName 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
+ .listKeys(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ clusterName,
+ databaseName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Retrieves the access keys for the RedisEnterprise database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @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 secret access keys used for authenticating connections to redis.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listKeysWithResponseAsync(
+ String resourceGroupName, String clusterName, String databaseName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (databaseName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter databaseName 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
+ .listKeys(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ clusterName,
+ databaseName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context);
+ }
+
+ /**
+ * Retrieves the access keys for the RedisEnterprise database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 secret access keys used for authenticating connections to redis.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono listKeysAsync(String resourceGroupName, String clusterName, String databaseName) {
+ return listKeysWithResponseAsync(resourceGroupName, clusterName, databaseName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Retrieves the access keys for the RedisEnterprise database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 secret access keys used for authenticating connections to redis.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AccessKeysInner listKeys(String resourceGroupName, String clusterName, String databaseName) {
+ return listKeysAsync(resourceGroupName, clusterName, databaseName).block();
+ }
+
+ /**
+ * Retrieves the access keys for the RedisEnterprise database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @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 secret access keys used for authenticating connections to redis.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response listKeysWithResponse(
+ String resourceGroupName, String clusterName, String databaseName, Context context) {
+ return listKeysWithResponseAsync(resourceGroupName, clusterName, databaseName, context).block();
+ }
+
+ /**
+ * Regenerates the RedisEnterprise database's access keys.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Specifies which key to regenerate.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 secret access keys used for authenticating connections to redis.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> regenerateKeyWithResponseAsync(
+ String resourceGroupName, String clusterName, String databaseName, RegenerateKeyParameters parameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (databaseName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter databaseName 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 (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .regenerateKey(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ clusterName,
+ databaseName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ parameters,
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Regenerates the RedisEnterprise database's access keys.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Specifies which key to regenerate.
+ * @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 secret access keys used for authenticating connections to redis.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> regenerateKeyWithResponseAsync(
+ String resourceGroupName,
+ String clusterName,
+ String databaseName,
+ RegenerateKeyParameters parameters,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (databaseName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter databaseName 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 (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .regenerateKey(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ clusterName,
+ databaseName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ parameters,
+ accept,
+ context);
+ }
+
+ /**
+ * Regenerates the RedisEnterprise database's access keys.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Specifies which key to regenerate.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 secret access keys used for authenticating connections to redis.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, AccessKeysInner> beginRegenerateKeyAsync(
+ String resourceGroupName, String clusterName, String databaseName, RegenerateKeyParameters parameters) {
+ Mono>> mono =
+ regenerateKeyWithResponseAsync(resourceGroupName, clusterName, databaseName, parameters);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), AccessKeysInner.class, AccessKeysInner.class, Context.NONE);
+ }
+
+ /**
+ * Regenerates the RedisEnterprise database's access keys.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Specifies which key to regenerate.
+ * @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 secret access keys used for authenticating connections to redis.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, AccessKeysInner> beginRegenerateKeyAsync(
+ String resourceGroupName,
+ String clusterName,
+ String databaseName,
+ RegenerateKeyParameters parameters,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ regenerateKeyWithResponseAsync(resourceGroupName, clusterName, databaseName, parameters, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), AccessKeysInner.class, AccessKeysInner.class, context);
+ }
+
+ /**
+ * Regenerates the RedisEnterprise database's access keys.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Specifies which key to regenerate.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 secret access keys used for authenticating connections to redis.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, AccessKeysInner> beginRegenerateKey(
+ String resourceGroupName, String clusterName, String databaseName, RegenerateKeyParameters parameters) {
+ return beginRegenerateKeyAsync(resourceGroupName, clusterName, databaseName, parameters).getSyncPoller();
+ }
+
+ /**
+ * Regenerates the RedisEnterprise database's access keys.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Specifies which key to regenerate.
+ * @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 secret access keys used for authenticating connections to redis.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, AccessKeysInner> beginRegenerateKey(
+ String resourceGroupName,
+ String clusterName,
+ String databaseName,
+ RegenerateKeyParameters parameters,
+ Context context) {
+ return beginRegenerateKeyAsync(resourceGroupName, clusterName, databaseName, parameters, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Regenerates the RedisEnterprise database's access keys.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Specifies which key to regenerate.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 secret access keys used for authenticating connections to redis.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono regenerateKeyAsync(
+ String resourceGroupName, String clusterName, String databaseName, RegenerateKeyParameters parameters) {
+ return beginRegenerateKeyAsync(resourceGroupName, clusterName, databaseName, parameters)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Regenerates the RedisEnterprise database's access keys.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Specifies which key to regenerate.
+ * @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 secret access keys used for authenticating connections to redis.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono regenerateKeyAsync(
+ String resourceGroupName,
+ String clusterName,
+ String databaseName,
+ RegenerateKeyParameters parameters,
+ Context context) {
+ return beginRegenerateKeyAsync(resourceGroupName, clusterName, databaseName, parameters, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Regenerates the RedisEnterprise database's access keys.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Specifies which key to regenerate.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 secret access keys used for authenticating connections to redis.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AccessKeysInner regenerateKey(
+ String resourceGroupName, String clusterName, String databaseName, RegenerateKeyParameters parameters) {
+ return regenerateKeyAsync(resourceGroupName, clusterName, databaseName, parameters).block();
+ }
+
+ /**
+ * Regenerates the RedisEnterprise database's access keys.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Specifies which key to regenerate.
+ * @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 secret access keys used for authenticating connections to redis.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AccessKeysInner regenerateKey(
+ String resourceGroupName,
+ String clusterName,
+ String databaseName,
+ RegenerateKeyParameters parameters,
+ Context context) {
+ return regenerateKeyAsync(resourceGroupName, clusterName, databaseName, parameters, context).block();
+ }
+
+ /**
+ * Imports a database file to target database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Storage information for importing into the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> importMethodWithResponseAsync(
+ String resourceGroupName, String clusterName, String databaseName, ImportClusterParameters parameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (databaseName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter databaseName 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 (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .importMethod(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ clusterName,
+ databaseName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ parameters,
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Imports a database file to target database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Storage information for importing into the cluster.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> importMethodWithResponseAsync(
+ String resourceGroupName,
+ String clusterName,
+ String databaseName,
+ ImportClusterParameters parameters,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (databaseName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter databaseName 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 (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .importMethod(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ clusterName,
+ databaseName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ parameters,
+ accept,
+ context);
+ }
+
+ /**
+ * Imports a database file to target database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Storage information for importing into the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, Void> beginImportMethodAsync(
+ String resourceGroupName, String clusterName, String databaseName, ImportClusterParameters parameters) {
+ Mono>> mono =
+ importMethodWithResponseAsync(resourceGroupName, clusterName, databaseName, parameters);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE);
+ }
+
+ /**
+ * Imports a database file to target database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Storage information for importing into the cluster.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, Void> beginImportMethodAsync(
+ String resourceGroupName,
+ String clusterName,
+ String databaseName,
+ ImportClusterParameters parameters,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ importMethodWithResponseAsync(resourceGroupName, clusterName, databaseName, parameters, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Imports a database file to target database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Storage information for importing into the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, Void> beginImportMethod(
+ String resourceGroupName, String clusterName, String databaseName, ImportClusterParameters parameters) {
+ return beginImportMethodAsync(resourceGroupName, clusterName, databaseName, parameters).getSyncPoller();
+ }
+
+ /**
+ * Imports a database file to target database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Storage information for importing into the cluster.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, Void> beginImportMethod(
+ String resourceGroupName,
+ String clusterName,
+ String databaseName,
+ ImportClusterParameters parameters,
+ Context context) {
+ return beginImportMethodAsync(resourceGroupName, clusterName, databaseName, parameters, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Imports a database file to target database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Storage information for importing into the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono importMethodAsync(
+ String resourceGroupName, String clusterName, String databaseName, ImportClusterParameters parameters) {
+ return beginImportMethodAsync(resourceGroupName, clusterName, databaseName, parameters)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Imports a database file to target database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Storage information for importing into the cluster.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono importMethodAsync(
+ String resourceGroupName,
+ String clusterName,
+ String databaseName,
+ ImportClusterParameters parameters,
+ Context context) {
+ return beginImportMethodAsync(resourceGroupName, clusterName, databaseName, parameters, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Imports a database file to target database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Storage information for importing into the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 importMethod(
+ String resourceGroupName, String clusterName, String databaseName, ImportClusterParameters parameters) {
+ importMethodAsync(resourceGroupName, clusterName, databaseName, parameters).block();
+ }
+
+ /**
+ * Imports a database file to target database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Storage information for importing into the cluster.
+ * @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 importMethod(
+ String resourceGroupName,
+ String clusterName,
+ String databaseName,
+ ImportClusterParameters parameters,
+ Context context) {
+ importMethodAsync(resourceGroupName, clusterName, databaseName, parameters, context).block();
+ }
+
+ /**
+ * Exports a database file from target database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Storage information for exporting into the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> exportWithResponseAsync(
+ String resourceGroupName, String clusterName, String databaseName, ExportClusterParameters parameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (databaseName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter databaseName 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 (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .export(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ clusterName,
+ databaseName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ parameters,
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Exports a database file from target database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Storage information for exporting into the cluster.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> exportWithResponseAsync(
+ String resourceGroupName,
+ String clusterName,
+ String databaseName,
+ ExportClusterParameters parameters,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (databaseName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter databaseName 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 (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .export(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ clusterName,
+ databaseName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ parameters,
+ accept,
+ context);
+ }
+
+ /**
+ * Exports a database file from target database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Storage information for exporting into the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, Void> beginExportAsync(
+ String resourceGroupName, String clusterName, String databaseName, ExportClusterParameters parameters) {
+ Mono>> mono =
+ exportWithResponseAsync(resourceGroupName, clusterName, databaseName, parameters);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE);
+ }
+
+ /**
+ * Exports a database file from target database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Storage information for exporting into the cluster.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, Void> beginExportAsync(
+ String resourceGroupName,
+ String clusterName,
+ String databaseName,
+ ExportClusterParameters parameters,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ exportWithResponseAsync(resourceGroupName, clusterName, databaseName, parameters, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Exports a database file from target database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Storage information for exporting into the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, Void> beginExport(
+ String resourceGroupName, String clusterName, String databaseName, ExportClusterParameters parameters) {
+ return beginExportAsync(resourceGroupName, clusterName, databaseName, parameters).getSyncPoller();
+ }
+
+ /**
+ * Exports a database file from target database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Storage information for exporting into the cluster.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, Void> beginExport(
+ String resourceGroupName,
+ String clusterName,
+ String databaseName,
+ ExportClusterParameters parameters,
+ Context context) {
+ return beginExportAsync(resourceGroupName, clusterName, databaseName, parameters, context).getSyncPoller();
+ }
+
+ /**
+ * Exports a database file from target database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Storage information for exporting into the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono exportAsync(
+ String resourceGroupName, String clusterName, String databaseName, ExportClusterParameters parameters) {
+ return beginExportAsync(resourceGroupName, clusterName, databaseName, parameters)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Exports a database file from target database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Storage information for exporting into the cluster.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono exportAsync(
+ String resourceGroupName,
+ String clusterName,
+ String databaseName,
+ ExportClusterParameters parameters,
+ Context context) {
+ return beginExportAsync(resourceGroupName, clusterName, databaseName, parameters, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Exports a database file from target database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Storage information for exporting into the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 export(
+ String resourceGroupName, String clusterName, String databaseName, ExportClusterParameters parameters) {
+ exportAsync(resourceGroupName, clusterName, databaseName, parameters).block();
+ }
+
+ /**
+ * Exports a database file from target database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Storage information for exporting into the cluster.
+ * @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 export(
+ String resourceGroupName,
+ String clusterName,
+ String databaseName,
+ ExportClusterParameters parameters,
+ Context context) {
+ exportAsync(resourceGroupName, clusterName, databaseName, parameters, context).block();
+ }
+
+ /**
+ * 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 the response of a list-all operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByClusterNextSinglePageAsync(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.listByClusterNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * 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 the response of a list-all operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByClusterNextSinglePageAsync(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
+ .listByClusterNext(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/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/DatabasesImpl.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/DatabasesImpl.java
new file mode 100644
index 000000000000..a449620ac0f9
--- /dev/null
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/DatabasesImpl.java
@@ -0,0 +1,276 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redisenterprise.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.redisenterprise.RedisEnterpriseManager;
+import com.azure.resourcemanager.redisenterprise.fluent.DatabasesClient;
+import com.azure.resourcemanager.redisenterprise.fluent.models.AccessKeysInner;
+import com.azure.resourcemanager.redisenterprise.fluent.models.DatabaseInner;
+import com.azure.resourcemanager.redisenterprise.models.AccessKeys;
+import com.azure.resourcemanager.redisenterprise.models.Database;
+import com.azure.resourcemanager.redisenterprise.models.Databases;
+import com.azure.resourcemanager.redisenterprise.models.ExportClusterParameters;
+import com.azure.resourcemanager.redisenterprise.models.ImportClusterParameters;
+import com.azure.resourcemanager.redisenterprise.models.RegenerateKeyParameters;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class DatabasesImpl implements Databases {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(DatabasesImpl.class);
+
+ private final DatabasesClient innerClient;
+
+ private final RedisEnterpriseManager serviceManager;
+
+ public DatabasesImpl(DatabasesClient innerClient, RedisEnterpriseManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable listByCluster(String resourceGroupName, String clusterName) {
+ PagedIterable inner = this.serviceClient().listByCluster(resourceGroupName, clusterName);
+ return Utils.mapPage(inner, inner1 -> new DatabaseImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context) {
+ PagedIterable inner =
+ this.serviceClient().listByCluster(resourceGroupName, clusterName, context);
+ return Utils.mapPage(inner, inner1 -> new DatabaseImpl(inner1, this.manager()));
+ }
+
+ public Database get(String resourceGroupName, String clusterName, String databaseName) {
+ DatabaseInner inner = this.serviceClient().get(resourceGroupName, clusterName, databaseName);
+ if (inner != null) {
+ return new DatabaseImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(
+ String resourceGroupName, String clusterName, String databaseName, Context context) {
+ Response inner =
+ this.serviceClient().getWithResponse(resourceGroupName, clusterName, databaseName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new DatabaseImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public void delete(String resourceGroupName, String clusterName, String databaseName) {
+ this.serviceClient().delete(resourceGroupName, clusterName, databaseName);
+ }
+
+ public void delete(String resourceGroupName, String clusterName, String databaseName, Context context) {
+ this.serviceClient().delete(resourceGroupName, clusterName, databaseName, context);
+ }
+
+ public AccessKeys listKeys(String resourceGroupName, String clusterName, String databaseName) {
+ AccessKeysInner inner = this.serviceClient().listKeys(resourceGroupName, clusterName, databaseName);
+ if (inner != null) {
+ return new AccessKeysImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response listKeysWithResponse(
+ String resourceGroupName, String clusterName, String databaseName, Context context) {
+ Response inner =
+ this.serviceClient().listKeysWithResponse(resourceGroupName, clusterName, databaseName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new AccessKeysImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public AccessKeys regenerateKey(
+ String resourceGroupName, String clusterName, String databaseName, RegenerateKeyParameters parameters) {
+ AccessKeysInner inner =
+ this.serviceClient().regenerateKey(resourceGroupName, clusterName, databaseName, parameters);
+ if (inner != null) {
+ return new AccessKeysImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public AccessKeys regenerateKey(
+ String resourceGroupName,
+ String clusterName,
+ String databaseName,
+ RegenerateKeyParameters parameters,
+ Context context) {
+ AccessKeysInner inner =
+ this.serviceClient().regenerateKey(resourceGroupName, clusterName, databaseName, parameters, context);
+ if (inner != null) {
+ return new AccessKeysImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public void importMethod(
+ String resourceGroupName, String clusterName, String databaseName, ImportClusterParameters parameters) {
+ this.serviceClient().importMethod(resourceGroupName, clusterName, databaseName, parameters);
+ }
+
+ public void importMethod(
+ String resourceGroupName,
+ String clusterName,
+ String databaseName,
+ ImportClusterParameters parameters,
+ Context context) {
+ this.serviceClient().importMethod(resourceGroupName, clusterName, databaseName, parameters, context);
+ }
+
+ public void export(
+ String resourceGroupName, String clusterName, String databaseName, ExportClusterParameters parameters) {
+ this.serviceClient().export(resourceGroupName, clusterName, databaseName, parameters);
+ }
+
+ public void export(
+ String resourceGroupName,
+ String clusterName,
+ String databaseName,
+ ExportClusterParameters parameters,
+ Context context) {
+ this.serviceClient().export(resourceGroupName, clusterName, databaseName, parameters, context);
+ }
+
+ public Database 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 clusterName = Utils.getValueFromIdByName(id, "redisEnterprise");
+ if (clusterName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'redisEnterprise'.", id)));
+ }
+ String databaseName = Utils.getValueFromIdByName(id, "databases");
+ if (databaseName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'databases'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, clusterName, databaseName, 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 clusterName = Utils.getValueFromIdByName(id, "redisEnterprise");
+ if (clusterName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'redisEnterprise'.", id)));
+ }
+ String databaseName = Utils.getValueFromIdByName(id, "databases");
+ if (databaseName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'databases'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, clusterName, databaseName, 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 clusterName = Utils.getValueFromIdByName(id, "redisEnterprise");
+ if (clusterName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'redisEnterprise'.", id)));
+ }
+ String databaseName = Utils.getValueFromIdByName(id, "databases");
+ if (databaseName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'databases'.", id)));
+ }
+ this.delete(resourceGroupName, clusterName, databaseName, 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 clusterName = Utils.getValueFromIdByName(id, "redisEnterprise");
+ if (clusterName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'redisEnterprise'.", id)));
+ }
+ String databaseName = Utils.getValueFromIdByName(id, "databases");
+ if (databaseName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'databases'.", id)));
+ }
+ this.delete(resourceGroupName, clusterName, databaseName, context);
+ }
+
+ private DatabasesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private RedisEnterpriseManager manager() {
+ return this.serviceManager;
+ }
+
+ public DatabaseImpl define(String name) {
+ return new DatabaseImpl(name, this.manager());
+ }
+}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/OperationImpl.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/OperationImpl.java
new file mode 100644
index 000000000000..9f8f93bf6caa
--- /dev/null
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/OperationImpl.java
@@ -0,0 +1,51 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redisenterprise.implementation;
+
+import com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager;
+import com.azure.resourcemanager.redisenterprise.fluent.models.OperationInner;
+import com.azure.resourcemanager.redisenterprise.models.ActionType;
+import com.azure.resourcemanager.redisenterprise.models.Operation;
+import com.azure.resourcemanager.redisenterprise.models.OperationDisplay;
+import com.azure.resourcemanager.redisenterprise.models.Origin;
+
+public final class OperationImpl implements Operation {
+ private OperationInner innerObject;
+
+ private final RedisEnterpriseManager serviceManager;
+
+ OperationImpl(OperationInner innerObject, RedisEnterpriseManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public Boolean isDataAction() {
+ return this.innerModel().isDataAction();
+ }
+
+ public OperationDisplay display() {
+ return this.innerModel().display();
+ }
+
+ public Origin origin() {
+ return this.innerModel().origin();
+ }
+
+ public ActionType actionType() {
+ return this.innerModel().actionType();
+ }
+
+ public OperationInner innerModel() {
+ return this.innerObject;
+ }
+
+ private RedisEnterpriseManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/OperationStatusImpl.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/OperationStatusImpl.java
new file mode 100644
index 000000000000..0ad5102158e9
--- /dev/null
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/OperationStatusImpl.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.redisenterprise.implementation;
+
+import com.azure.core.management.exception.ManagementError;
+import com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager;
+import com.azure.resourcemanager.redisenterprise.fluent.models.OperationStatusInner;
+import com.azure.resourcemanager.redisenterprise.models.OperationStatus;
+
+public final class OperationStatusImpl implements OperationStatus {
+ private OperationStatusInner innerObject;
+
+ private final RedisEnterpriseManager serviceManager;
+
+ OperationStatusImpl(OperationStatusInner innerObject, RedisEnterpriseManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String startTime() {
+ return this.innerModel().startTime();
+ }
+
+ public String endTime() {
+ return this.innerModel().endTime();
+ }
+
+ public String status() {
+ return this.innerModel().status();
+ }
+
+ public ManagementError error() {
+ return this.innerModel().error();
+ }
+
+ public OperationStatusInner innerModel() {
+ return this.innerObject;
+ }
+
+ private RedisEnterpriseManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/OperationsClientImpl.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/OperationsClientImpl.java
new file mode 100644
index 000000000000..30127b8241f6
--- /dev/null
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/OperationsClientImpl.java
@@ -0,0 +1,269 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redisenterprise.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.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.redisenterprise.fluent.OperationsClient;
+import com.azure.resourcemanager.redisenterprise.fluent.models.OperationInner;
+import com.azure.resourcemanager.redisenterprise.models.OperationListResult;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in OperationsClient. */
+public final class OperationsClientImpl implements OperationsClient {
+ private final ClientLogger logger = new ClientLogger(OperationsClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final OperationsService service;
+
+ /** The service client containing this operation class. */
+ private final RedisEnterpriseManagementClientImpl client;
+
+ /**
+ * Initializes an instance of OperationsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ OperationsClientImpl(RedisEnterpriseManagementClientImpl client) {
+ this.service =
+ RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for RedisEnterpriseManagementClientOperations to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "RedisEnterpriseManag")
+ private interface OperationsService {
+ @Headers({"Content-Type: application/json"})
+ @Get("/providers/Microsoft.Cache/operations")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Lists all of the available REST API operations of the Microsoft.Cache provider.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider.
+ */
+ @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))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Lists all of the available REST API operations of the Microsoft.Cache provider.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Lists all of the available REST API operations of the Microsoft.Cache provider.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists all of the available REST API operations of the Microsoft.Cache provider.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Lists all of the available REST API operations of the Microsoft.Cache provider.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * Lists all of the available REST API operations of the Microsoft.Cache provider.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider.
+ */
+ @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 a list of REST API operations supported by an Azure Resource Provider.
+ */
+ @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))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * 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 a list of REST API operations supported by an Azure Resource Provider.
+ */
+ @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/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/OperationsImpl.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/OperationsImpl.java
new file mode 100644
index 000000000000..38c0e31b2c9c
--- /dev/null
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/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.redisenterprise.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.redisenterprise.RedisEnterpriseManager;
+import com.azure.resourcemanager.redisenterprise.fluent.OperationsClient;
+import com.azure.resourcemanager.redisenterprise.fluent.models.OperationInner;
+import com.azure.resourcemanager.redisenterprise.models.Operation;
+import com.azure.resourcemanager.redisenterprise.models.Operations;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class OperationsImpl implements Operations {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsImpl.class);
+
+ private final OperationsClient innerClient;
+
+ private final RedisEnterpriseManager serviceManager;
+
+ public OperationsImpl(OperationsClient innerClient, RedisEnterpriseManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager()));
+ }
+
+ private OperationsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private RedisEnterpriseManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/OperationsStatusClientImpl.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/OperationsStatusClientImpl.java
new file mode 100644
index 000000000000..bc5bcfe5424b
--- /dev/null
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/OperationsStatusClientImpl.java
@@ -0,0 +1,217 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redisenterprise.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.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.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.redisenterprise.fluent.OperationsStatusClient;
+import com.azure.resourcemanager.redisenterprise.fluent.models.OperationStatusInner;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in OperationsStatusClient. */
+public final class OperationsStatusClientImpl implements OperationsStatusClient {
+ private final ClientLogger logger = new ClientLogger(OperationsStatusClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final OperationsStatusService service;
+
+ /** The service client containing this operation class. */
+ private final RedisEnterpriseManagementClientImpl client;
+
+ /**
+ * Initializes an instance of OperationsStatusClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ OperationsStatusClientImpl(RedisEnterpriseManagementClientImpl client) {
+ this.service =
+ RestProxy.create(OperationsStatusService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for RedisEnterpriseManagementClientOperationsStatus to be used by the
+ * proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "RedisEnterpriseManag")
+ private interface OperationsStatusService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/providers/Microsoft.Cache/locations/{location}/operationsStatus"
+ + "/{operationId}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("location") String location,
+ @PathParam("operationId") String operationId,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Gets the status of operation.
+ *
+ * @param location The region the operation is in.
+ * @param operationId The operation's unique identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 status of operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String location, String operationId) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (location == null) {
+ return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null."));
+ }
+ if (operationId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter operationId 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
+ .get(
+ this.client.getEndpoint(),
+ location,
+ operationId,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Gets the status of operation.
+ *
+ * @param location The region the operation is in.
+ * @param operationId The operation's unique identifier.
+ * @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 status of operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String location, String operationId, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (location == null) {
+ return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null."));
+ }
+ if (operationId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter operationId 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
+ .get(
+ this.client.getEndpoint(),
+ location,
+ operationId,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context);
+ }
+
+ /**
+ * Gets the status of operation.
+ *
+ * @param location The region the operation is in.
+ * @param operationId The operation's unique identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 status of operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String location, String operationId) {
+ return getWithResponseAsync(location, operationId)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Gets the status of operation.
+ *
+ * @param location The region the operation is in.
+ * @param operationId The operation's unique identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 status of operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperationStatusInner get(String location, String operationId) {
+ return getAsync(location, operationId).block();
+ }
+
+ /**
+ * Gets the status of operation.
+ *
+ * @param location The region the operation is in.
+ * @param operationId The operation's unique identifier.
+ * @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 status of operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String location, String operationId, Context context) {
+ return getWithResponseAsync(location, operationId, context).block();
+ }
+}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/OperationsStatusImpl.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/OperationsStatusImpl.java
new file mode 100644
index 000000000000..ec091b780370
--- /dev/null
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/OperationsStatusImpl.java
@@ -0,0 +1,59 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redisenterprise.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.redisenterprise.RedisEnterpriseManager;
+import com.azure.resourcemanager.redisenterprise.fluent.OperationsStatusClient;
+import com.azure.resourcemanager.redisenterprise.fluent.models.OperationStatusInner;
+import com.azure.resourcemanager.redisenterprise.models.OperationStatus;
+import com.azure.resourcemanager.redisenterprise.models.OperationsStatus;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class OperationsStatusImpl implements OperationsStatus {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsStatusImpl.class);
+
+ private final OperationsStatusClient innerClient;
+
+ private final RedisEnterpriseManager serviceManager;
+
+ public OperationsStatusImpl(OperationsStatusClient innerClient, RedisEnterpriseManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public OperationStatus get(String location, String operationId) {
+ OperationStatusInner inner = this.serviceClient().get(location, operationId);
+ if (inner != null) {
+ return new OperationStatusImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(String location, String operationId, Context context) {
+ Response inner = this.serviceClient().getWithResponse(location, operationId, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new OperationStatusImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ private OperationsStatusClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private RedisEnterpriseManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/PrivateEndpointConnectionImpl.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/PrivateEndpointConnectionImpl.java
new file mode 100644
index 000000000000..d8e2e522cc29
--- /dev/null
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/PrivateEndpointConnectionImpl.java
@@ -0,0 +1,149 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redisenterprise.implementation;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager;
+import com.azure.resourcemanager.redisenterprise.fluent.models.PrivateEndpointConnectionInner;
+import com.azure.resourcemanager.redisenterprise.models.PrivateEndpoint;
+import com.azure.resourcemanager.redisenterprise.models.PrivateEndpointConnection;
+import com.azure.resourcemanager.redisenterprise.models.PrivateEndpointConnectionProvisioningState;
+import com.azure.resourcemanager.redisenterprise.models.PrivateLinkServiceConnectionState;
+
+public final class PrivateEndpointConnectionImpl
+ implements PrivateEndpointConnection, PrivateEndpointConnection.Definition, PrivateEndpointConnection.Update {
+ private PrivateEndpointConnectionInner innerObject;
+
+ private final RedisEnterpriseManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public PrivateEndpoint privateEndpoint() {
+ return this.innerModel().privateEndpoint();
+ }
+
+ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() {
+ return this.innerModel().privateLinkServiceConnectionState();
+ }
+
+ public PrivateEndpointConnectionProvisioningState provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public PrivateEndpointConnectionInner innerModel() {
+ return this.innerObject;
+ }
+
+ private RedisEnterpriseManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String clusterName;
+
+ private String privateEndpointConnectionName;
+
+ public PrivateEndpointConnectionImpl withExistingRedisEnterprise(String resourceGroupName, String clusterName) {
+ this.resourceGroupName = resourceGroupName;
+ this.clusterName = clusterName;
+ return this;
+ }
+
+ public PrivateEndpointConnection create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getPrivateEndpointConnections()
+ .put(resourceGroupName, clusterName, privateEndpointConnectionName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public PrivateEndpointConnection create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getPrivateEndpointConnections()
+ .put(resourceGroupName, clusterName, privateEndpointConnectionName, this.innerModel(), context);
+ return this;
+ }
+
+ PrivateEndpointConnectionImpl(String name, RedisEnterpriseManager serviceManager) {
+ this.innerObject = new PrivateEndpointConnectionInner();
+ this.serviceManager = serviceManager;
+ this.privateEndpointConnectionName = name;
+ }
+
+ public PrivateEndpointConnectionImpl update() {
+ return this;
+ }
+
+ public PrivateEndpointConnection apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getPrivateEndpointConnections()
+ .put(resourceGroupName, clusterName, privateEndpointConnectionName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public PrivateEndpointConnection apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getPrivateEndpointConnections()
+ .put(resourceGroupName, clusterName, privateEndpointConnectionName, this.innerModel(), context);
+ return this;
+ }
+
+ PrivateEndpointConnectionImpl(PrivateEndpointConnectionInner innerObject, RedisEnterpriseManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.clusterName = Utils.getValueFromIdByName(innerObject.id(), "redisEnterprise");
+ this.privateEndpointConnectionName = Utils.getValueFromIdByName(innerObject.id(), "privateEndpointConnections");
+ }
+
+ public PrivateEndpointConnection refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getPrivateEndpointConnections()
+ .getWithResponse(resourceGroupName, clusterName, privateEndpointConnectionName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public PrivateEndpointConnection refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getPrivateEndpointConnections()
+ .getWithResponse(resourceGroupName, clusterName, privateEndpointConnectionName, context)
+ .getValue();
+ return this;
+ }
+
+ public PrivateEndpointConnectionImpl withPrivateEndpoint(PrivateEndpoint privateEndpoint) {
+ this.innerModel().withPrivateEndpoint(privateEndpoint);
+ return this;
+ }
+
+ public PrivateEndpointConnectionImpl withPrivateLinkServiceConnectionState(
+ PrivateLinkServiceConnectionState privateLinkServiceConnectionState) {
+ this.innerModel().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState);
+ return this;
+ }
+}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/PrivateEndpointConnectionsClientImpl.java
new file mode 100644
index 000000000000..e307c37438cf
--- /dev/null
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/PrivateEndpointConnectionsClientImpl.java
@@ -0,0 +1,983 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redisenterprise.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.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.logging.ClientLogger;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.redisenterprise.fluent.PrivateEndpointConnectionsClient;
+import com.azure.resourcemanager.redisenterprise.fluent.models.PrivateEndpointConnectionInner;
+import com.azure.resourcemanager.redisenterprise.models.PrivateEndpointConnectionListResult;
+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 PrivateEndpointConnectionsClient. */
+public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpointConnectionsClient {
+ private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionsClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final PrivateEndpointConnectionsService service;
+
+ /** The service client containing this operation class. */
+ private final RedisEnterpriseManagementClientImpl client;
+
+ /**
+ * Initializes an instance of PrivateEndpointConnectionsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ PrivateEndpointConnectionsClientImpl(RedisEnterpriseManagementClientImpl client) {
+ this.service =
+ RestProxy
+ .create(
+ PrivateEndpointConnectionsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for RedisEnterpriseManagementClientPrivateEndpointConnections to be used
+ * by the proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "RedisEnterpriseManag")
+ private interface PrivateEndpointConnectionsService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache"
+ + "/redisEnterprise/{clusterName}/privateEndpointConnections")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache"
+ + "/redisEnterprise/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache"
+ + "/redisEnterprise/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName}")
+ @ExpectedResponses({201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> put(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName,
+ @BodyParam("application/json") PrivateEndpointConnectionInner properties,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache"
+ + "/redisEnterprise/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName}")
+ @ExpectedResponses({200, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Lists all the private endpoint connections associated with the RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of private endpoint connection associated with the specified storage account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String resourceGroupName, String clusterName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName 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(),
+ resourceGroupName,
+ clusterName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Lists all the private endpoint connections associated with the RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of private endpoint connection associated with the specified storage account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String resourceGroupName, String clusterName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName 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(),
+ resourceGroupName,
+ clusterName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null));
+ }
+
+ /**
+ * Lists all the private endpoint connections associated with the RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of private endpoint connection associated with the specified storage account.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceGroupName, String clusterName) {
+ return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterName));
+ }
+
+ /**
+ * Lists all the private endpoint connections associated with the RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of private endpoint connection associated with the specified storage account.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(
+ String resourceGroupName, String clusterName, Context context) {
+ return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterName, context));
+ }
+
+ /**
+ * Lists all the private endpoint connections associated with the RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of private endpoint connection associated with the specified storage account.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String clusterName) {
+ return new PagedIterable<>(listAsync(resourceGroupName, clusterName));
+ }
+
+ /**
+ * Lists all the private endpoint connections associated with the RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of private endpoint connection associated with the specified storage account.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(
+ String resourceGroupName, String clusterName, Context context) {
+ return new PagedIterable<>(listAsync(resourceGroupName, clusterName, context));
+ }
+
+ /**
+ * Gets the specified private endpoint connection associated with the RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the specified private endpoint connection associated with the RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String clusterName, String privateEndpointConnectionName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (privateEndpointConnectionName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter privateEndpointConnectionName 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
+ .get(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ clusterName,
+ privateEndpointConnectionName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Gets the specified private endpoint connection associated with the RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @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 specified private endpoint connection associated with the RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (privateEndpointConnectionName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter privateEndpointConnectionName 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
+ .get(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ clusterName,
+ privateEndpointConnectionName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context);
+ }
+
+ /**
+ * Gets the specified private endpoint connection associated with the RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the specified private endpoint connection associated with the RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(
+ String resourceGroupName, String clusterName, String privateEndpointConnectionName) {
+ return getWithResponseAsync(resourceGroupName, clusterName, privateEndpointConnectionName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Gets the specified private endpoint connection associated with the RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the specified private endpoint connection associated with the RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public PrivateEndpointConnectionInner get(
+ String resourceGroupName, String clusterName, String privateEndpointConnectionName) {
+ return getAsync(resourceGroupName, clusterName, privateEndpointConnectionName).block();
+ }
+
+ /**
+ * Gets the specified private endpoint connection associated with the RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @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 specified private endpoint connection associated with the RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context) {
+ return getWithResponseAsync(resourceGroupName, clusterName, privateEndpointConnectionName, context).block();
+ }
+
+ /**
+ * Updates the state of the specified private endpoint connection associated with the RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @param properties The private endpoint connection properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 Private Endpoint Connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> putWithResponseAsync(
+ String resourceGroupName,
+ String clusterName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner properties) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName 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 (privateEndpointConnectionName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter privateEndpointConnectionName is required and cannot be null."));
+ }
+ if (properties == null) {
+ return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null."));
+ } else {
+ properties.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .put(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ clusterName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ privateEndpointConnectionName,
+ properties,
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Updates the state of the specified private endpoint connection associated with the RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @param properties The private endpoint connection properties.
+ * @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 Private Endpoint Connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> putWithResponseAsync(
+ String resourceGroupName,
+ String clusterName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner properties,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName 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 (privateEndpointConnectionName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter privateEndpointConnectionName is required and cannot be null."));
+ }
+ if (properties == null) {
+ return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null."));
+ } else {
+ properties.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .put(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ clusterName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ privateEndpointConnectionName,
+ properties,
+ accept,
+ context);
+ }
+
+ /**
+ * Updates the state of the specified private endpoint connection associated with the RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @param properties The private endpoint connection properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 Private Endpoint Connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, PrivateEndpointConnectionInner> beginPutAsync(
+ String resourceGroupName,
+ String clusterName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner properties) {
+ Mono>> mono =
+ putWithResponseAsync(resourceGroupName, clusterName, privateEndpointConnectionName, properties);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ PrivateEndpointConnectionInner.class,
+ PrivateEndpointConnectionInner.class,
+ Context.NONE);
+ }
+
+ /**
+ * Updates the state of the specified private endpoint connection associated with the RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @param properties The private endpoint connection properties.
+ * @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 Private Endpoint Connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, PrivateEndpointConnectionInner> beginPutAsync(
+ String resourceGroupName,
+ String clusterName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner properties,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ putWithResponseAsync(resourceGroupName, clusterName, privateEndpointConnectionName, properties, context);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ PrivateEndpointConnectionInner.class,
+ PrivateEndpointConnectionInner.class,
+ context);
+ }
+
+ /**
+ * Updates the state of the specified private endpoint connection associated with the RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @param properties The private endpoint connection properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 Private Endpoint Connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, PrivateEndpointConnectionInner> beginPut(
+ String resourceGroupName,
+ String clusterName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner properties) {
+ return beginPutAsync(resourceGroupName, clusterName, privateEndpointConnectionName, properties).getSyncPoller();
+ }
+
+ /**
+ * Updates the state of the specified private endpoint connection associated with the RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @param properties The private endpoint connection properties.
+ * @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 Private Endpoint Connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, PrivateEndpointConnectionInner> beginPut(
+ String resourceGroupName,
+ String clusterName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner properties,
+ Context context) {
+ return beginPutAsync(resourceGroupName, clusterName, privateEndpointConnectionName, properties, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Updates the state of the specified private endpoint connection associated with the RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @param properties The private endpoint connection properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 Private Endpoint Connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono putAsync(
+ String resourceGroupName,
+ String clusterName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner properties) {
+ return beginPutAsync(resourceGroupName, clusterName, privateEndpointConnectionName, properties)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Updates the state of the specified private endpoint connection associated with the RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @param properties The private endpoint connection properties.
+ * @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 Private Endpoint Connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono putAsync(
+ String resourceGroupName,
+ String clusterName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner properties,
+ Context context) {
+ return beginPutAsync(resourceGroupName, clusterName, privateEndpointConnectionName, properties, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Updates the state of the specified private endpoint connection associated with the RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @param properties The private endpoint connection properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 Private Endpoint Connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public PrivateEndpointConnectionInner put(
+ String resourceGroupName,
+ String clusterName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner properties) {
+ return putAsync(resourceGroupName, clusterName, privateEndpointConnectionName, properties).block();
+ }
+
+ /**
+ * Updates the state of the specified private endpoint connection associated with the RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @param properties The private endpoint connection properties.
+ * @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 Private Endpoint Connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public PrivateEndpointConnectionInner put(
+ String resourceGroupName,
+ String clusterName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner properties,
+ Context context) {
+ return putAsync(resourceGroupName, clusterName, privateEndpointConnectionName, properties, context).block();
+ }
+
+ /**
+ * Deletes the specified private endpoint connection associated with the RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(
+ String resourceGroupName, String clusterName, String privateEndpointConnectionName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName 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 (privateEndpointConnectionName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter privateEndpointConnectionName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ clusterName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ privateEndpointConnectionName,
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Deletes the specified private endpoint connection associated with the RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(
+ String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName 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 (privateEndpointConnectionName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter privateEndpointConnectionName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ clusterName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ privateEndpointConnectionName,
+ accept,
+ context);
+ }
+
+ /**
+ * Deletes the specified private endpoint connection associated with the RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String clusterName, String privateEndpointConnectionName) {
+ return deleteWithResponseAsync(resourceGroupName, clusterName, privateEndpointConnectionName)
+ .flatMap((Response res) -> Mono.empty());
+ }
+
+ /**
+ * Deletes the specified private endpoint connection associated with the RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String clusterName, String privateEndpointConnectionName) {
+ deleteAsync(resourceGroupName, clusterName, privateEndpointConnectionName).block();
+ }
+
+ /**
+ * Deletes the specified private endpoint connection associated with the RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response deleteWithResponse(
+ String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context) {
+ return deleteWithResponseAsync(resourceGroupName, clusterName, privateEndpointConnectionName, context).block();
+ }
+}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/PrivateEndpointConnectionsImpl.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/PrivateEndpointConnectionsImpl.java
new file mode 100644
index 000000000000..8ec5f10e045c
--- /dev/null
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/PrivateEndpointConnectionsImpl.java
@@ -0,0 +1,216 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redisenterprise.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.redisenterprise.RedisEnterpriseManager;
+import com.azure.resourcemanager.redisenterprise.fluent.PrivateEndpointConnectionsClient;
+import com.azure.resourcemanager.redisenterprise.fluent.models.PrivateEndpointConnectionInner;
+import com.azure.resourcemanager.redisenterprise.models.PrivateEndpointConnection;
+import com.azure.resourcemanager.redisenterprise.models.PrivateEndpointConnections;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class PrivateEndpointConnectionsImpl implements PrivateEndpointConnections {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionsImpl.class);
+
+ private final PrivateEndpointConnectionsClient innerClient;
+
+ private final RedisEnterpriseManager serviceManager;
+
+ public PrivateEndpointConnectionsImpl(
+ PrivateEndpointConnectionsClient innerClient, RedisEnterpriseManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list(String resourceGroupName, String clusterName) {
+ PagedIterable inner = this.serviceClient().list(resourceGroupName, clusterName);
+ return Utils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(
+ String resourceGroupName, String clusterName, Context context) {
+ PagedIterable inner =
+ this.serviceClient().list(resourceGroupName, clusterName, context);
+ return Utils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager()));
+ }
+
+ public PrivateEndpointConnection get(
+ String resourceGroupName, String clusterName, String privateEndpointConnectionName) {
+ PrivateEndpointConnectionInner inner =
+ this.serviceClient().get(resourceGroupName, clusterName, privateEndpointConnectionName);
+ if (inner != null) {
+ return new PrivateEndpointConnectionImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(
+ String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context) {
+ Response inner =
+ this
+ .serviceClient()
+ .getWithResponse(resourceGroupName, clusterName, privateEndpointConnectionName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new PrivateEndpointConnectionImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public void delete(String resourceGroupName, String clusterName, String privateEndpointConnectionName) {
+ this.serviceClient().delete(resourceGroupName, clusterName, privateEndpointConnectionName);
+ }
+
+ public Response deleteWithResponse(
+ String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context) {
+ return this
+ .serviceClient()
+ .deleteWithResponse(resourceGroupName, clusterName, privateEndpointConnectionName, context);
+ }
+
+ public PrivateEndpointConnection 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 clusterName = Utils.getValueFromIdByName(id, "redisEnterprise");
+ if (clusterName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'redisEnterprise'.", id)));
+ }
+ String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections");
+ if (privateEndpointConnectionName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.",
+ id)));
+ }
+ return this
+ .getWithResponse(resourceGroupName, clusterName, privateEndpointConnectionName, 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 clusterName = Utils.getValueFromIdByName(id, "redisEnterprise");
+ if (clusterName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'redisEnterprise'.", id)));
+ }
+ String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections");
+ if (privateEndpointConnectionName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.",
+ id)));
+ }
+ return this.getWithResponse(resourceGroupName, clusterName, privateEndpointConnectionName, 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 clusterName = Utils.getValueFromIdByName(id, "redisEnterprise");
+ if (clusterName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'redisEnterprise'.", id)));
+ }
+ String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections");
+ if (privateEndpointConnectionName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.",
+ id)));
+ }
+ this.deleteWithResponse(resourceGroupName, clusterName, privateEndpointConnectionName, Context.NONE).getValue();
+ }
+
+ public Response deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String clusterName = Utils.getValueFromIdByName(id, "redisEnterprise");
+ if (clusterName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'redisEnterprise'.", id)));
+ }
+ String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections");
+ if (privateEndpointConnectionName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.",
+ id)));
+ }
+ return this.deleteWithResponse(resourceGroupName, clusterName, privateEndpointConnectionName, context);
+ }
+
+ private PrivateEndpointConnectionsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private RedisEnterpriseManager manager() {
+ return this.serviceManager;
+ }
+
+ public PrivateEndpointConnectionImpl define(String name) {
+ return new PrivateEndpointConnectionImpl(name, this.manager());
+ }
+}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/PrivateLinkResourceImpl.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/PrivateLinkResourceImpl.java
new file mode 100644
index 000000000000..9bb64bcb5294
--- /dev/null
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/PrivateLinkResourceImpl.java
@@ -0,0 +1,64 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redisenterprise.implementation;
+
+import com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager;
+import com.azure.resourcemanager.redisenterprise.fluent.models.PrivateLinkResourceInner;
+import com.azure.resourcemanager.redisenterprise.models.PrivateLinkResource;
+import java.util.Collections;
+import java.util.List;
+
+public final class PrivateLinkResourceImpl implements PrivateLinkResource {
+ private PrivateLinkResourceInner innerObject;
+
+ private final RedisEnterpriseManager serviceManager;
+
+ PrivateLinkResourceImpl(PrivateLinkResourceInner innerObject, RedisEnterpriseManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String groupId() {
+ return this.innerModel().groupId();
+ }
+
+ public List requiredMembers() {
+ List inner = this.innerModel().requiredMembers();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public List requiredZoneNames() {
+ List inner = this.innerModel().requiredZoneNames();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public PrivateLinkResourceInner innerModel() {
+ return this.innerObject;
+ }
+
+ private RedisEnterpriseManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/PrivateLinkResourcesClientImpl.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/PrivateLinkResourcesClientImpl.java
new file mode 100644
index 000000000000..23b72fd1bc91
--- /dev/null
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/PrivateLinkResourcesClientImpl.java
@@ -0,0 +1,244 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redisenterprise.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.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.redisenterprise.fluent.PrivateLinkResourcesClient;
+import com.azure.resourcemanager.redisenterprise.fluent.models.PrivateLinkResourceInner;
+import com.azure.resourcemanager.redisenterprise.models.PrivateLinkResourceListResult;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */
+public final class PrivateLinkResourcesClientImpl implements PrivateLinkResourcesClient {
+ private final ClientLogger logger = new ClientLogger(PrivateLinkResourcesClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final PrivateLinkResourcesService service;
+
+ /** The service client containing this operation class. */
+ private final RedisEnterpriseManagementClientImpl client;
+
+ /**
+ * Initializes an instance of PrivateLinkResourcesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ PrivateLinkResourcesClientImpl(RedisEnterpriseManagementClientImpl client) {
+ this.service =
+ RestProxy
+ .create(PrivateLinkResourcesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for RedisEnterpriseManagementClientPrivateLinkResources to be used by the
+ * proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "RedisEnterpriseManag")
+ private interface PrivateLinkResourcesService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache"
+ + "/redisEnterprise/{clusterName}/privateLinkResources")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByCluster(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Gets the private link resources that need to be created for a RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 private link resources that need to be created for a RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByClusterSinglePageAsync(
+ String resourceGroupName, String clusterName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName 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
+ .listByCluster(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ clusterName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Gets the private link resources that need to be created for a RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @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 private link resources that need to be created for a RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByClusterSinglePageAsync(
+ String resourceGroupName, String clusterName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName 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
+ .listByCluster(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ clusterName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null));
+ }
+
+ /**
+ * Gets the private link resources that need to be created for a RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 private link resources that need to be created for a RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName) {
+ return new PagedFlux<>(() -> listByClusterSinglePageAsync(resourceGroupName, clusterName));
+ }
+
+ /**
+ * Gets the private link resources that need to be created for a RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @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 private link resources that need to be created for a RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByClusterAsync(
+ String resourceGroupName, String clusterName, Context context) {
+ return new PagedFlux<>(() -> listByClusterSinglePageAsync(resourceGroupName, clusterName, context));
+ }
+
+ /**
+ * Gets the private link resources that need to be created for a RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 private link resources that need to be created for a RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByCluster(String resourceGroupName, String clusterName) {
+ return new PagedIterable<>(listByClusterAsync(resourceGroupName, clusterName));
+ }
+
+ /**
+ * Gets the private link resources that need to be created for a RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @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 private link resources that need to be created for a RedisEnterprise cluster.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable