diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index cb6c6bf315d6c..5610e33c9df39 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -326,6 +326,7 @@ com.azure.resourcemanager:azure-resourcemanager-storagepool;1.0.0-beta.1;1.0.0-b
com.azure.resourcemanager:azure-resourcemanager-dataprotection;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-desktopvirtualization;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-loadtestservice;1.0.0-beta.1;1.0.0-beta.2
+com.azure.resourcemanager:azure-resourcemanager-redis-generated;1.0.0-beta.1;1.0.0-beta.1
com.azure.tools:azure-sdk-archetype;1.0.0;1.0.0
# Unreleased dependencies: Copy the entry from above, prepend "unreleased_" and remove the current
diff --git a/pom.xml b/pom.xml
index 928014fa07f54..e91ae486651e2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -811,6 +811,7 @@
sdk/quota
sdk/recoveryservices
sdk/recoveryservicesbackup
+ sdk/redis
sdk/redisenterprise
sdk/relay
sdk/remoterendering
diff --git a/sdk/redis/azure-resourcemanager-redis-generated/CHANGELOG.md b/sdk/redis/azure-resourcemanager-redis-generated/CHANGELOG.md
new file mode 100644
index 0000000000000..6373744535665
--- /dev/null
+++ b/sdk/redis/azure-resourcemanager-redis-generated/CHANGELOG.md
@@ -0,0 +1,5 @@
+# Release History
+
+## 1.0.0-beta.1 (2021-12-14)
+
+- Azure Resource Manager Redis client library for Java. This package contains Microsoft Azure SDK for Redis Management SDK. REST API for Azure Redis Cache Service. Package tag package-2021-06. 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/redis/azure-resourcemanager-redis-generated/README.md b/sdk/redis/azure-resourcemanager-redis-generated/README.md
new file mode 100644
index 0000000000000..8441934abb6a6
--- /dev/null
+++ b/sdk/redis/azure-resourcemanager-redis-generated/README.md
@@ -0,0 +1,102 @@
+# Azure Resource Manager Redis client library for Java
+
+Azure Resource Manager Redis client library for Java.
+
+This package contains Microsoft Azure SDK for Redis Management SDK. REST API for Azure Redis Cache Service. Package tag package-2021-06. 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-redis-generated;current})
+```xml
+
+ com.azure.resourcemanager
+ azure-resourcemanager-redis-generated
+ 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();
+RedisManager manager = RedisManager
+ .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
+
+[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/redis/azure-resourcemanager-redis-generated/SAMPLE.md)
+
+
+## Troubleshooting
+
+## Next steps
+
+## Contributing
+
+For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/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/main/sdk/identity/azure-identity
+[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
+[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md
+[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md
diff --git a/sdk/redis/azure-resourcemanager-redis-generated/SAMPLE.md b/sdk/redis/azure-resourcemanager-redis-generated/SAMPLE.md
new file mode 100644
index 0000000000000..49d9606052e4e
--- /dev/null
+++ b/sdk/redis/azure-resourcemanager-redis-generated/SAMPLE.md
@@ -0,0 +1,811 @@
+# Code snippets and samples
+
+
+## FirewallRules
+
+- [CreateOrUpdate](#firewallrules_createorupdate)
+- [Delete](#firewallrules_delete)
+- [Get](#firewallrules_get)
+- [List](#firewallrules_list)
+
+## LinkedServer
+
+- [Create](#linkedserver_create)
+- [Delete](#linkedserver_delete)
+- [Get](#linkedserver_get)
+- [List](#linkedserver_list)
+
+## PatchSchedules
+
+- [CreateOrUpdate](#patchschedules_createorupdate)
+- [Delete](#patchschedules_delete)
+- [Get](#patchschedules_get)
+- [ListByRedisResource](#patchschedules_listbyredisresource)
+
+## PrivateEndpointConnections
+
+- [Delete](#privateendpointconnections_delete)
+- [Get](#privateendpointconnections_get)
+- [List](#privateendpointconnections_list)
+- [Put](#privateendpointconnections_put)
+
+## PrivateLinkResources
+
+- [ListByRedisCache](#privatelinkresources_listbyrediscache)
+
+## Redis
+
+- [CheckNameAvailability](#redis_checknameavailability)
+- [Create](#redis_create)
+- [Delete](#redis_delete)
+- [ExportData](#redis_exportdata)
+- [ForceReboot](#redis_forcereboot)
+- [GetByResourceGroup](#redis_getbyresourcegroup)
+- [ImportData](#redis_importdata)
+- [List](#redis_list)
+- [ListByResourceGroup](#redis_listbyresourcegroup)
+- [ListKeys](#redis_listkeys)
+- [ListUpgradeNotifications](#redis_listupgradenotifications)
+- [RegenerateKey](#redis_regeneratekey)
+- [Update](#redis_update)
+### FirewallRules_CreateOrUpdate
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.redis.generated.fluent.models.RedisFirewallRuleInner;
+
+/** Samples for FirewallRules CreateOrUpdate. */
+public final class FirewallRulesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/redis/resource-manager/Microsoft.Cache/stable/2021-06-01/examples/RedisCacheFirewallRuleCreate.json
+ */
+ /**
+ * Sample code: RedisCacheFirewallRuleCreate.
+ *
+ * @param manager Entry point to RedisManager.
+ */
+ public static void redisCacheFirewallRuleCreate(com.azure.resourcemanager.redis.generated.RedisManager manager) {
+ manager
+ .firewallRules()
+ .createOrUpdateWithResponse(
+ "rg1",
+ "cache1",
+ "rule1",
+ new RedisFirewallRuleInner().withStartIp("192.168.1.1").withEndIp("192.168.1.4"),
+ Context.NONE);
+ }
+}
+```
+
+### FirewallRules_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for FirewallRules Delete. */
+public final class FirewallRulesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/redis/resource-manager/Microsoft.Cache/stable/2021-06-01/examples/RedisCacheFirewallRuleDelete.json
+ */
+ /**
+ * Sample code: RedisCacheFirewallRuleDelete.
+ *
+ * @param manager Entry point to RedisManager.
+ */
+ public static void redisCacheFirewallRuleDelete(com.azure.resourcemanager.redis.generated.RedisManager manager) {
+ manager.firewallRules().deleteWithResponse("rg1", "cache1", "rule1", Context.NONE);
+ }
+}
+```
+
+### FirewallRules_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for FirewallRules Get. */
+public final class FirewallRulesGetSamples {
+ /*
+ * x-ms-original-file: specification/redis/resource-manager/Microsoft.Cache/stable/2021-06-01/examples/RedisCacheFirewallRuleGet.json
+ */
+ /**
+ * Sample code: RedisCacheFirewallRuleGet.
+ *
+ * @param manager Entry point to RedisManager.
+ */
+ public static void redisCacheFirewallRuleGet(com.azure.resourcemanager.redis.generated.RedisManager manager) {
+ manager.firewallRules().getWithResponse("rg1", "cache1", "rule1", Context.NONE);
+ }
+}
+```
+
+### FirewallRules_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for FirewallRules List. */
+public final class FirewallRulesListSamples {
+ /*
+ * x-ms-original-file: specification/redis/resource-manager/Microsoft.Cache/stable/2021-06-01/examples/RedisCacheFirewallRulesList.json
+ */
+ /**
+ * Sample code: RedisCacheFirewallRulesList.
+ *
+ * @param manager Entry point to RedisManager.
+ */
+ public static void redisCacheFirewallRulesList(com.azure.resourcemanager.redis.generated.RedisManager manager) {
+ manager.firewallRules().list("rg1", "cache1", Context.NONE);
+ }
+}
+```
+
+### LinkedServer_Create
+
+```java
+import com.azure.resourcemanager.redis.generated.models.ReplicationRole;
+
+/** Samples for LinkedServer Create. */
+public final class LinkedServerCreateSamples {
+ /*
+ * x-ms-original-file: specification/redis/resource-manager/Microsoft.Cache/stable/2021-06-01/examples/RedisCacheLinkedServer_Create.json
+ */
+ /**
+ * Sample code: LinkedServer_Create.
+ *
+ * @param manager Entry point to RedisManager.
+ */
+ public static void linkedServerCreate(com.azure.resourcemanager.redis.generated.RedisManager manager) {
+ manager
+ .linkedServers()
+ .define("cache2")
+ .withExistingRedi("rg1", "cache1")
+ .withLinkedRedisCacheId("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache2")
+ .withLinkedRedisCacheLocation("West US")
+ .withServerRole(ReplicationRole.SECONDARY)
+ .create();
+ }
+}
+```
+
+### LinkedServer_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for LinkedServer Delete. */
+public final class LinkedServerDeleteSamples {
+ /*
+ * x-ms-original-file: specification/redis/resource-manager/Microsoft.Cache/stable/2021-06-01/examples/RedisCacheLinkedServer_Delete.json
+ */
+ /**
+ * Sample code: LinkedServerDelete.
+ *
+ * @param manager Entry point to RedisManager.
+ */
+ public static void linkedServerDelete(com.azure.resourcemanager.redis.generated.RedisManager manager) {
+ manager.linkedServers().deleteWithResponse("rg1", "cache1", "cache2", Context.NONE);
+ }
+}
+```
+
+### LinkedServer_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for LinkedServer Get. */
+public final class LinkedServerGetSamples {
+ /*
+ * x-ms-original-file: specification/redis/resource-manager/Microsoft.Cache/stable/2021-06-01/examples/RedisCacheLinkedServer_Get.json
+ */
+ /**
+ * Sample code: LinkedServer_Get.
+ *
+ * @param manager Entry point to RedisManager.
+ */
+ public static void linkedServerGet(com.azure.resourcemanager.redis.generated.RedisManager manager) {
+ manager.linkedServers().getWithResponse("rg1", "cache1", "cache2", Context.NONE);
+ }
+}
+```
+
+### LinkedServer_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for LinkedServer List. */
+public final class LinkedServerListSamples {
+ /*
+ * x-ms-original-file: specification/redis/resource-manager/Microsoft.Cache/stable/2021-06-01/examples/RedisCacheLinkedServer_List.json
+ */
+ /**
+ * Sample code: LinkedServer_List.
+ *
+ * @param manager Entry point to RedisManager.
+ */
+ public static void linkedServerList(com.azure.resourcemanager.redis.generated.RedisManager manager) {
+ manager.linkedServers().list("rg1", "cache1", Context.NONE);
+ }
+}
+```
+
+### PatchSchedules_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.redis.generated.models.DayOfWeek;
+import com.azure.resourcemanager.redis.generated.models.DefaultName;
+import com.azure.resourcemanager.redis.generated.models.ScheduleEntry;
+import java.time.Duration;
+import java.util.Arrays;
+
+/** Samples for PatchSchedules CreateOrUpdate. */
+public final class PatchSchedulesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/redis/resource-manager/Microsoft.Cache/stable/2021-06-01/examples/RedisCachePatchSchedulesCreateOrUpdate.json
+ */
+ /**
+ * Sample code: RedisCachePatchSchedulesCreateOrUpdate.
+ *
+ * @param manager Entry point to RedisManager.
+ */
+ public static void redisCachePatchSchedulesCreateOrUpdate(
+ com.azure.resourcemanager.redis.generated.RedisManager manager) {
+ manager
+ .patchSchedules()
+ .define(DefaultName.DEFAULT)
+ .withExistingRedi("rg1", "cache1")
+ .withScheduleEntries(
+ Arrays
+ .asList(
+ new ScheduleEntry()
+ .withDayOfWeek(DayOfWeek.MONDAY)
+ .withStartHourUtc(12)
+ .withMaintenanceWindow(Duration.parse("PT5H")),
+ new ScheduleEntry().withDayOfWeek(DayOfWeek.TUESDAY).withStartHourUtc(12)))
+ .create();
+ }
+}
+```
+
+### PatchSchedules_Delete
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.redis.generated.models.DefaultName;
+
+/** Samples for PatchSchedules Delete. */
+public final class PatchSchedulesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/redis/resource-manager/Microsoft.Cache/stable/2021-06-01/examples/RedisCachePatchSchedulesDelete.json
+ */
+ /**
+ * Sample code: RedisCachePatchSchedulesDelete.
+ *
+ * @param manager Entry point to RedisManager.
+ */
+ public static void redisCachePatchSchedulesDelete(com.azure.resourcemanager.redis.generated.RedisManager manager) {
+ manager.patchSchedules().deleteWithResponse("rg1", "cache1", DefaultName.DEFAULT, Context.NONE);
+ }
+}
+```
+
+### PatchSchedules_Get
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.redis.generated.models.DefaultName;
+
+/** Samples for PatchSchedules Get. */
+public final class PatchSchedulesGetSamples {
+ /*
+ * x-ms-original-file: specification/redis/resource-manager/Microsoft.Cache/stable/2021-06-01/examples/RedisCachePatchSchedulesGet.json
+ */
+ /**
+ * Sample code: RedisCachePatchSchedulesGet.
+ *
+ * @param manager Entry point to RedisManager.
+ */
+ public static void redisCachePatchSchedulesGet(com.azure.resourcemanager.redis.generated.RedisManager manager) {
+ manager.patchSchedules().getWithResponse("rg1", "cache1", DefaultName.DEFAULT, Context.NONE);
+ }
+}
+```
+
+### PatchSchedules_ListByRedisResource
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PatchSchedules ListByRedisResource. */
+public final class PatchSchedulesListByRedisResourceSamples {
+ /*
+ * x-ms-original-file: specification/redis/resource-manager/Microsoft.Cache/stable/2021-06-01/examples/RedisCachePatchSchedulesList.json
+ */
+ /**
+ * Sample code: RedisCachePatchSchedulesList.
+ *
+ * @param manager Entry point to RedisManager.
+ */
+ public static void redisCachePatchSchedulesList(com.azure.resourcemanager.redis.generated.RedisManager manager) {
+ manager.patchSchedules().listByRedisResource("rg1", "cache1", Context.NONE);
+ }
+}
+```
+
+### PrivateEndpointConnections_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PrivateEndpointConnections Delete. */
+public final class PrivateEndpointConnectionsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/redis/resource-manager/Microsoft.Cache/stable/2021-06-01/examples/RedisCacheDeletePrivateEndpointConnection.json
+ */
+ /**
+ * Sample code: RedisCacheDeletePrivateEndpointConnection.
+ *
+ * @param manager Entry point to RedisManager.
+ */
+ public static void redisCacheDeletePrivateEndpointConnection(
+ com.azure.resourcemanager.redis.generated.RedisManager manager) {
+ manager.privateEndpointConnections().deleteWithResponse("rgtest01", "cachetest01", "pectest01", Context.NONE);
+ }
+}
+```
+
+### PrivateEndpointConnections_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PrivateEndpointConnections Get. */
+public final class PrivateEndpointConnectionsGetSamples {
+ /*
+ * x-ms-original-file: specification/redis/resource-manager/Microsoft.Cache/stable/2021-06-01/examples/RedisCacheGetPrivateEndpointConnection.json
+ */
+ /**
+ * Sample code: RedisCacheGetPrivateEndpointConnection.
+ *
+ * @param manager Entry point to RedisManager.
+ */
+ public static void redisCacheGetPrivateEndpointConnection(
+ com.azure.resourcemanager.redis.generated.RedisManager manager) {
+ manager.privateEndpointConnections().getWithResponse("rgtest01", "cachetest01", "pectest01", Context.NONE);
+ }
+}
+```
+
+### PrivateEndpointConnections_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PrivateEndpointConnections List. */
+public final class PrivateEndpointConnectionsListSamples {
+ /*
+ * x-ms-original-file: specification/redis/resource-manager/Microsoft.Cache/stable/2021-06-01/examples/RedisCacheListPrivateEndpointConnections.json
+ */
+ /**
+ * Sample code: RedisCacheListPrivateEndpointConnection.
+ *
+ * @param manager Entry point to RedisManager.
+ */
+ public static void redisCacheListPrivateEndpointConnection(
+ com.azure.resourcemanager.redis.generated.RedisManager manager) {
+ manager.privateEndpointConnections().list("rgtest01", "cachetest01", Context.NONE);
+ }
+}
+```
+
+### PrivateEndpointConnections_Put
+
+```java
+import com.azure.resourcemanager.redis.generated.models.PrivateEndpointServiceConnectionStatus;
+import com.azure.resourcemanager.redis.generated.models.PrivateLinkServiceConnectionState;
+
+/** Samples for PrivateEndpointConnections Put. */
+public final class PrivateEndpointConnectionsPutSamples {
+ /*
+ * x-ms-original-file: specification/redis/resource-manager/Microsoft.Cache/stable/2021-06-01/examples/RedisCachePutPrivateEndpointConnection.json
+ */
+ /**
+ * Sample code: RedisCachePutPrivateEndpointConnection.
+ *
+ * @param manager Entry point to RedisManager.
+ */
+ public static void redisCachePutPrivateEndpointConnection(
+ com.azure.resourcemanager.redis.generated.RedisManager manager) {
+ manager
+ .privateEndpointConnections()
+ .define("pectest01")
+ .withExistingRedi("rgtest01", "cachetest01")
+ .withPrivateLinkServiceConnectionState(
+ new PrivateLinkServiceConnectionState()
+ .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED)
+ .withDescription("Auto-Approved"))
+ .create();
+ }
+}
+```
+
+### PrivateLinkResources_ListByRedisCache
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PrivateLinkResources ListByRedisCache. */
+public final class PrivateLinkResourcesListByRedisCacheSamples {
+ /*
+ * x-ms-original-file: specification/redis/resource-manager/Microsoft.Cache/stable/2021-06-01/examples/RedisCacheListPrivateLinkResources.json
+ */
+ /**
+ * Sample code: StorageAccountListPrivateLinkResources.
+ *
+ * @param manager Entry point to RedisManager.
+ */
+ public static void storageAccountListPrivateLinkResources(
+ com.azure.resourcemanager.redis.generated.RedisManager manager) {
+ manager.privateLinkResources().listByRedisCache("rgtest01", "cacheTest01", Context.NONE);
+ }
+}
+```
+
+### Redis_CheckNameAvailability
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.redis.generated.models.CheckNameAvailabilityParameters;
+
+/** Samples for Redis CheckNameAvailability. */
+public final class RedisCheckNameAvailabilitySamples {
+ /*
+ * x-ms-original-file: specification/redis/resource-manager/Microsoft.Cache/stable/2021-06-01/examples/RedisCacheCheckNameAvailability.json
+ */
+ /**
+ * Sample code: RedisCacheCheckNameAvailability.
+ *
+ * @param manager Entry point to RedisManager.
+ */
+ public static void redisCacheCheckNameAvailability(com.azure.resourcemanager.redis.generated.RedisManager manager) {
+ manager
+ .redis()
+ .checkNameAvailabilityWithResponse(
+ new CheckNameAvailabilityParameters().withName("cacheName").withType("Microsoft.Cache/Redis"),
+ Context.NONE);
+ }
+}
+```
+
+### Redis_Create
+
+```java
+import com.azure.resourcemanager.redis.generated.models.RedisCommonPropertiesRedisConfiguration;
+import com.azure.resourcemanager.redis.generated.models.Sku;
+import com.azure.resourcemanager.redis.generated.models.SkuFamily;
+import com.azure.resourcemanager.redis.generated.models.SkuName;
+import com.azure.resourcemanager.redis.generated.models.TlsVersion;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Redis Create. */
+public final class RedisCreateSamples {
+ /*
+ * x-ms-original-file: specification/redis/resource-manager/Microsoft.Cache/stable/2021-06-01/examples/RedisCacheCreate.json
+ */
+ /**
+ * Sample code: RedisCacheCreate.
+ *
+ * @param manager Entry point to RedisManager.
+ */
+ public static void redisCacheCreate(com.azure.resourcemanager.redis.generated.RedisManager manager) {
+ manager
+ .redis()
+ .define("cache1")
+ .withRegion("West US")
+ .withExistingResourceGroup("rg1")
+ .withSku(new Sku().withName(SkuName.PREMIUM).withFamily(SkuFamily.P).withCapacity(1))
+ .withZones(Arrays.asList("1"))
+ .withSubnetId(
+ "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/virtualNetworks/network1/subnets/subnet1")
+ .withStaticIp("192.168.0.5")
+ .withRedisConfiguration(
+ new RedisCommonPropertiesRedisConfiguration()
+ .withMaxmemoryPolicy("allkeys-lru")
+ .withAdditionalProperties(mapOf()))
+ .withRedisVersion("4")
+ .withEnableNonSslPort(true)
+ .withReplicasPerPrimary(2)
+ .withShardCount(2)
+ .withMinimumTlsVersion(TlsVersion.ONE_TWO)
+ .create();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### Redis_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Redis Delete. */
+public final class RedisDeleteSamples {
+ /*
+ * x-ms-original-file: specification/redis/resource-manager/Microsoft.Cache/stable/2021-06-01/examples/RedisCacheDelete.json
+ */
+ /**
+ * Sample code: RedisCacheDelete.
+ *
+ * @param manager Entry point to RedisManager.
+ */
+ public static void redisCacheDelete(com.azure.resourcemanager.redis.generated.RedisManager manager) {
+ manager.redis().delete("rg1", "cache1", Context.NONE);
+ }
+}
+```
+
+### Redis_ExportData
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.redis.generated.models.ExportRdbParameters;
+
+/** Samples for Redis ExportData. */
+public final class RedisExportDataSamples {
+ /*
+ * x-ms-original-file: specification/redis/resource-manager/Microsoft.Cache/stable/2021-06-01/examples/RedisCacheExport.json
+ */
+ /**
+ * Sample code: RedisCacheExport.
+ *
+ * @param manager Entry point to RedisManager.
+ */
+ public static void redisCacheExport(com.azure.resourcemanager.redis.generated.RedisManager manager) {
+ manager
+ .redis()
+ .exportData(
+ "rg1",
+ "cache1",
+ new ExportRdbParameters()
+ .withFormat("RDB")
+ .withPrefix("datadump1")
+ .withContainer("https://contosostorage.blob.core.window.net/urltoBlobContainer?sasKeyParameters"),
+ Context.NONE);
+ }
+}
+```
+
+### Redis_ForceReboot
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.redis.generated.models.RebootType;
+import com.azure.resourcemanager.redis.generated.models.RedisRebootParameters;
+import java.util.Arrays;
+
+/** Samples for Redis ForceReboot. */
+public final class RedisForceRebootSamples {
+ /*
+ * x-ms-original-file: specification/redis/resource-manager/Microsoft.Cache/stable/2021-06-01/examples/RedisCacheForceReboot.json
+ */
+ /**
+ * Sample code: RedisCacheForceReboot.
+ *
+ * @param manager Entry point to RedisManager.
+ */
+ public static void redisCacheForceReboot(com.azure.resourcemanager.redis.generated.RedisManager manager) {
+ manager
+ .redis()
+ .forceRebootWithResponse(
+ "rg1",
+ "cache1",
+ new RedisRebootParameters()
+ .withRebootType(RebootType.ALL_NODES)
+ .withShardId(0)
+ .withPorts(Arrays.asList(13000, 15001)),
+ Context.NONE);
+ }
+}
+```
+
+### Redis_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Redis GetByResourceGroup. */
+public final class RedisGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/redis/resource-manager/Microsoft.Cache/stable/2021-06-01/examples/RedisCacheGet.json
+ */
+ /**
+ * Sample code: RedisCacheGet.
+ *
+ * @param manager Entry point to RedisManager.
+ */
+ public static void redisCacheGet(com.azure.resourcemanager.redis.generated.RedisManager manager) {
+ manager.redis().getByResourceGroupWithResponse("rg1", "cache1", Context.NONE);
+ }
+}
+```
+
+### Redis_ImportData
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.redis.generated.models.ImportRdbParameters;
+import java.util.Arrays;
+
+/** Samples for Redis ImportData. */
+public final class RedisImportDataSamples {
+ /*
+ * x-ms-original-file: specification/redis/resource-manager/Microsoft.Cache/stable/2021-06-01/examples/RedisCacheImport.json
+ */
+ /**
+ * Sample code: RedisCacheImport.
+ *
+ * @param manager Entry point to RedisManager.
+ */
+ public static void redisCacheImport(com.azure.resourcemanager.redis.generated.RedisManager manager) {
+ manager
+ .redis()
+ .importData(
+ "rg1",
+ "cache1",
+ new ImportRdbParameters()
+ .withFormat("RDB")
+ .withFiles(Arrays.asList("http://fileuris.contoso.com/pathtofile1")),
+ Context.NONE);
+ }
+}
+```
+
+### Redis_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Redis List. */
+public final class RedisListSamples {
+ /*
+ * x-ms-original-file: specification/redis/resource-manager/Microsoft.Cache/stable/2021-06-01/examples/RedisCacheList.json
+ */
+ /**
+ * Sample code: RedisCacheList.
+ *
+ * @param manager Entry point to RedisManager.
+ */
+ public static void redisCacheList(com.azure.resourcemanager.redis.generated.RedisManager manager) {
+ manager.redis().list(Context.NONE);
+ }
+}
+```
+
+### Redis_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Redis ListByResourceGroup. */
+public final class RedisListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/redis/resource-manager/Microsoft.Cache/stable/2021-06-01/examples/RedisCacheListByResourceGroup.json
+ */
+ /**
+ * Sample code: RedisCacheListByResourceGroup.
+ *
+ * @param manager Entry point to RedisManager.
+ */
+ public static void redisCacheListByResourceGroup(com.azure.resourcemanager.redis.generated.RedisManager manager) {
+ manager.redis().listByResourceGroup("rg1", Context.NONE);
+ }
+}
+```
+
+### Redis_ListKeys
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Redis ListKeys. */
+public final class RedisListKeysSamples {
+ /*
+ * x-ms-original-file: specification/redis/resource-manager/Microsoft.Cache/stable/2021-06-01/examples/RedisCacheListKeys.json
+ */
+ /**
+ * Sample code: RedisCacheListKeys.
+ *
+ * @param manager Entry point to RedisManager.
+ */
+ public static void redisCacheListKeys(com.azure.resourcemanager.redis.generated.RedisManager manager) {
+ manager.redis().listKeysWithResponse("rg1", "cache1", Context.NONE);
+ }
+}
+```
+
+### Redis_ListUpgradeNotifications
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Redis ListUpgradeNotifications. */
+public final class RedisListUpgradeNotificationsSamples {
+ /*
+ * x-ms-original-file: specification/redis/resource-manager/Microsoft.Cache/stable/2021-06-01/examples/RedisCacheListUpgradeNotifications.json
+ */
+ /**
+ * Sample code: RedisCacheListUpgradeNotifications.
+ *
+ * @param manager Entry point to RedisManager.
+ */
+ public static void redisCacheListUpgradeNotifications(
+ com.azure.resourcemanager.redis.generated.RedisManager manager) {
+ manager.redis().listUpgradeNotifications("rg1", "cache1", 5000.0, Context.NONE);
+ }
+}
+```
+
+### Redis_RegenerateKey
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.redis.generated.models.RedisKeyType;
+import com.azure.resourcemanager.redis.generated.models.RedisRegenerateKeyParameters;
+
+/** Samples for Redis RegenerateKey. */
+public final class RedisRegenerateKeySamples {
+ /*
+ * x-ms-original-file: specification/redis/resource-manager/Microsoft.Cache/stable/2021-06-01/examples/RedisCacheRegenerateKey.json
+ */
+ /**
+ * Sample code: RedisCacheRegenerateKey.
+ *
+ * @param manager Entry point to RedisManager.
+ */
+ public static void redisCacheRegenerateKey(com.azure.resourcemanager.redis.generated.RedisManager manager) {
+ manager
+ .redis()
+ .regenerateKeyWithResponse(
+ "rg1", "cache1", new RedisRegenerateKeyParameters().withKeyType(RedisKeyType.PRIMARY), Context.NONE);
+ }
+}
+```
+
+### Redis_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.redis.generated.models.RedisResource;
+
+/** Samples for Redis Update. */
+public final class RedisUpdateSamples {
+ /*
+ * x-ms-original-file: specification/redis/resource-manager/Microsoft.Cache/stable/2021-06-01/examples/RedisCacheUpdate.json
+ */
+ /**
+ * Sample code: RedisCacheUpdate.
+ *
+ * @param manager Entry point to RedisManager.
+ */
+ public static void redisCacheUpdate(com.azure.resourcemanager.redis.generated.RedisManager manager) {
+ RedisResource resource =
+ manager.redis().getByResourceGroupWithResponse("rg1", "cache1", Context.NONE).getValue();
+ resource.update().withEnableNonSslPort(true).withReplicasPerPrimary(2).apply();
+ }
+}
+```
+
diff --git a/sdk/redis/azure-resourcemanager-redis-generated/pom.xml b/sdk/redis/azure-resourcemanager-redis-generated/pom.xml
new file mode 100644
index 0000000000000..c88f245cbe7ea
--- /dev/null
+++ b/sdk/redis/azure-resourcemanager-redis-generated/pom.xml
@@ -0,0 +1,81 @@
+
+ 4.0.0
+
+ com.azure
+ azure-client-sdk-parent
+ 1.7.0
+ ../../parents/azure-client-sdk-parent
+
+
+ com.azure.resourcemanager
+ azure-resourcemanager-redis-generated
+ 1.0.0-beta.1
+ jar
+
+ Microsoft Azure SDK for Redis Management
+ This package contains Microsoft Azure SDK for Redis Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. REST API for Azure Redis Cache Service. Package tag package-2021-06.
+ 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
+ true
+ false
+
+
+
+
+
+ com.azure
+ azure-core
+ 1.23.1
+
+
+ com.azure
+ azure-core-management
+ 1.4.4
+
+
+
+
+
+ org.revapi
+ revapi-maven-plugin
+ 0.11.2
+
+
+
+ -
+
java.method.addedToInterface
+
+ -
+ true
+
.*
+ com\.azure\.resourcemanager(\.[^.]+)+\.fluent(\.[^.]+)*
+
+
+
+
+
+
+
+
diff --git a/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/RedisManager.java b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/RedisManager.java
new file mode 100644
index 0000000000000..e7ffdfca50dd8
--- /dev/null
+++ b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/RedisManager.java
@@ -0,0 +1,315 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redis.generated;
+
+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.HttpPipelinePosition;
+import com.azure.core.http.policy.AddDatePolicy;
+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.http.policy.ArmChallengeAuthenticationPolicy;
+import com.azure.core.management.profile.AzureProfile;
+import com.azure.core.util.Configuration;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.redis.generated.fluent.RedisManagementClient;
+import com.azure.resourcemanager.redis.generated.implementation.FirewallRulesImpl;
+import com.azure.resourcemanager.redis.generated.implementation.LinkedServersImpl;
+import com.azure.resourcemanager.redis.generated.implementation.OperationsImpl;
+import com.azure.resourcemanager.redis.generated.implementation.PatchSchedulesImpl;
+import com.azure.resourcemanager.redis.generated.implementation.PrivateEndpointConnectionsImpl;
+import com.azure.resourcemanager.redis.generated.implementation.PrivateLinkResourcesImpl;
+import com.azure.resourcemanager.redis.generated.implementation.RedisImpl;
+import com.azure.resourcemanager.redis.generated.implementation.RedisManagementClientBuilder;
+import com.azure.resourcemanager.redis.generated.models.FirewallRules;
+import com.azure.resourcemanager.redis.generated.models.LinkedServers;
+import com.azure.resourcemanager.redis.generated.models.Operations;
+import com.azure.resourcemanager.redis.generated.models.PatchSchedules;
+import com.azure.resourcemanager.redis.generated.models.PrivateEndpointConnections;
+import com.azure.resourcemanager.redis.generated.models.PrivateLinkResources;
+import com.azure.resourcemanager.redis.generated.models.Redis;
+import java.time.Duration;
+import java.time.temporal.ChronoUnit;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+/** Entry point to RedisManager. REST API for Azure Redis Cache Service. */
+public final class RedisManager {
+ private Operations operations;
+
+ private Redis redis;
+
+ private FirewallRules firewallRules;
+
+ private PatchSchedules patchSchedules;
+
+ private LinkedServers linkedServers;
+
+ private PrivateEndpointConnections privateEndpointConnections;
+
+ private PrivateLinkResources privateLinkResources;
+
+ private final RedisManagementClient clientObject;
+
+ private RedisManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
+ Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ this.clientObject =
+ new RedisManagementClientBuilder()
+ .pipeline(httpPipeline)
+ .endpoint(profile.getEnvironment().getResourceManagerEndpoint())
+ .subscriptionId(profile.getSubscriptionId())
+ .defaultPollInterval(defaultPollInterval)
+ .buildClient();
+ }
+
+ /**
+ * Creates an instance of Redis service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the Redis service API instance.
+ */
+ public static RedisManager 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 RedisManager with optional configuration.
+ *
+ * @return the Configurable instance allowing configurations.
+ */
+ public static Configurable configure() {
+ return new RedisManager.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 final List scopes = 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;
+ }
+
+ /**
+ * Adds the scope to permission sets.
+ *
+ * @param scope the scope.
+ * @return the configurable object itself.
+ */
+ public Configurable withScope(String scope) {
+ this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null."));
+ return this;
+ }
+
+ /**
+ * Sets the retry policy to the HTTP pipeline.
+ *
+ * @param retryPolicy the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
+ this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the 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 Redis service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the Redis service API instance.
+ */
+ public RedisManager 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.redis.generated")
+ .append("/")
+ .append("1.0.0-beta.1");
+ if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
+ userAgentBuilder
+ .append(" (")
+ .append(Configuration.getGlobalConfiguration().get("java.version"))
+ .append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.name"))
+ .append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.version"))
+ .append("; auto-generated)");
+ } else {
+ userAgentBuilder.append(" (auto-generated)");
+ }
+
+ if (scopes.isEmpty()) {
+ scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
+ }
+ if (retryPolicy == null) {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
+ List policies = new ArrayList<>();
+ policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new RequestIdPolicy());
+ policies
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
+ .collect(Collectors.toList()));
+ HttpPolicyProviders.addBeforeRetryPolicies(policies);
+ policies.add(retryPolicy);
+ policies.add(new AddDatePolicy());
+ policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
+ policies
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
+ HttpPolicyProviders.addAfterRetryPolicies(policies);
+ policies.add(new HttpLoggingPolicy(httpLogOptions));
+ HttpPipeline httpPipeline =
+ new HttpPipelineBuilder()
+ .httpClient(httpClient)
+ .policies(policies.toArray(new HttpPipelinePolicy[0]))
+ .build();
+ return new RedisManager(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 Redis. */
+ public Redis redis() {
+ if (this.redis == null) {
+ this.redis = new RedisImpl(clientObject.getRedis(), this);
+ }
+ return redis;
+ }
+
+ /** @return Resource collection API of FirewallRules. */
+ public FirewallRules firewallRules() {
+ if (this.firewallRules == null) {
+ this.firewallRules = new FirewallRulesImpl(clientObject.getFirewallRules(), this);
+ }
+ return firewallRules;
+ }
+
+ /** @return Resource collection API of PatchSchedules. */
+ public PatchSchedules patchSchedules() {
+ if (this.patchSchedules == null) {
+ this.patchSchedules = new PatchSchedulesImpl(clientObject.getPatchSchedules(), this);
+ }
+ return patchSchedules;
+ }
+
+ /** @return Resource collection API of LinkedServers. */
+ public LinkedServers linkedServers() {
+ if (this.linkedServers == null) {
+ this.linkedServers = new LinkedServersImpl(clientObject.getLinkedServers(), this);
+ }
+ return linkedServers;
+ }
+
+ /** @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 RedisManagementClient providing direct access to the underlying auto-generated API
+ * implementation, based on Azure REST API.
+ */
+ public RedisManagementClient serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/FirewallRulesClient.java b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/FirewallRulesClient.java
new file mode 100644
index 0000000000000..453c49dc00c09
--- /dev/null
+++ b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/FirewallRulesClient.java
@@ -0,0 +1,139 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redis.generated.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.util.Context;
+import com.azure.resourcemanager.redis.generated.fluent.models.RedisFirewallRuleInner;
+
+/** An instance of this class provides access to all the operations defined in FirewallRulesClient. */
+public interface FirewallRulesClient {
+ /**
+ * Gets all firewall rules in the specified redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @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 firewall rules in the specified redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String cacheName);
+
+ /**
+ * Gets all firewall rules in the specified redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @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 firewall rules in the specified redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String cacheName, Context context);
+
+ /**
+ * Create or update a redis cache firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @param ruleName The name of the firewall rule.
+ * @param parameters Parameters supplied to the create or update redis firewall rule 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 firewall rule on a redis cache has a name, and describes a contiguous range of IP addresses permitted
+ * to connect.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ RedisFirewallRuleInner createOrUpdate(
+ String resourceGroupName, String cacheName, String ruleName, RedisFirewallRuleInner parameters);
+
+ /**
+ * Create or update a redis cache firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @param ruleName The name of the firewall rule.
+ * @param parameters Parameters supplied to the create or update redis firewall rule 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 a firewall rule on a redis cache has a name, and describes a contiguous range of IP addresses permitted
+ * to connect.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(
+ String resourceGroupName,
+ String cacheName,
+ String ruleName,
+ RedisFirewallRuleInner parameters,
+ Context context);
+
+ /**
+ * Gets a single firewall rule in a specified redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @param ruleName The name of the firewall rule.
+ * @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 single firewall rule in a specified redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ RedisFirewallRuleInner get(String resourceGroupName, String cacheName, String ruleName);
+
+ /**
+ * Gets a single firewall rule in a specified redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @param ruleName The name of the firewall rule.
+ * @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 single firewall rule in a specified redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String cacheName, String ruleName, Context context);
+
+ /**
+ * Deletes a single firewall rule in a specified redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @param ruleName The name of the firewall rule.
+ * @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 cacheName, String ruleName);
+
+ /**
+ * Deletes a single firewall rule in a specified redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @param ruleName The name of the firewall rule.
+ * @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 cacheName, String ruleName, Context context);
+}
diff --git a/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/LinkedServersClient.java b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/LinkedServersClient.java
new file mode 100644
index 0000000000000..83feacdfcdb18
--- /dev/null
+++ b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/LinkedServersClient.java
@@ -0,0 +1,177 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redis.generated.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.redis.generated.fluent.models.RedisLinkedServerWithPropertiesInner;
+import com.azure.resourcemanager.redis.generated.models.RedisLinkedServerCreateParameters;
+
+/** An instance of this class provides access to all the operations defined in LinkedServersClient. */
+public interface LinkedServersClient {
+ /**
+ * Adds a linked server to the Redis cache (requires Premium SKU).
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @param linkedServerName The name of the linked server that is being added to the Redis cache.
+ * @param parameters Parameters supplied to the Create Linked server 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 response to put/get linked server (with properties) for Redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, RedisLinkedServerWithPropertiesInner> beginCreate(
+ String resourceGroupName, String name, String linkedServerName, RedisLinkedServerCreateParameters parameters);
+
+ /**
+ * Adds a linked server to the Redis cache (requires Premium SKU).
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @param linkedServerName The name of the linked server that is being added to the Redis cache.
+ * @param parameters Parameters supplied to the Create Linked server 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 response to put/get linked server (with properties) for Redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, RedisLinkedServerWithPropertiesInner> beginCreate(
+ String resourceGroupName,
+ String name,
+ String linkedServerName,
+ RedisLinkedServerCreateParameters parameters,
+ Context context);
+
+ /**
+ * Adds a linked server to the Redis cache (requires Premium SKU).
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @param linkedServerName The name of the linked server that is being added to the Redis cache.
+ * @param parameters Parameters supplied to the Create Linked server 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 response to put/get linked server (with properties) for Redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ RedisLinkedServerWithPropertiesInner create(
+ String resourceGroupName, String name, String linkedServerName, RedisLinkedServerCreateParameters parameters);
+
+ /**
+ * Adds a linked server to the Redis cache (requires Premium SKU).
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @param linkedServerName The name of the linked server that is being added to the Redis cache.
+ * @param parameters Parameters supplied to the Create Linked server 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 response to put/get linked server (with properties) for Redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ RedisLinkedServerWithPropertiesInner create(
+ String resourceGroupName,
+ String name,
+ String linkedServerName,
+ RedisLinkedServerCreateParameters parameters,
+ Context context);
+
+ /**
+ * Deletes the linked server from a redis cache (requires Premium SKU).
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the redis cache.
+ * @param linkedServerName The name of the linked server that is being added to the Redis cache.
+ * @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 name, String linkedServerName);
+
+ /**
+ * Deletes the linked server from a redis cache (requires Premium SKU).
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the redis cache.
+ * @param linkedServerName The name of the linked server that is being added to the Redis cache.
+ * @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 name, String linkedServerName, Context context);
+
+ /**
+ * Gets the detailed information about a linked server of a redis cache (requires Premium SKU).
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the redis cache.
+ * @param linkedServerName The name of the linked server.
+ * @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 detailed information about a linked server of a redis cache (requires Premium SKU).
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ RedisLinkedServerWithPropertiesInner get(String resourceGroupName, String name, String linkedServerName);
+
+ /**
+ * Gets the detailed information about a linked server of a redis cache (requires Premium SKU).
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the redis cache.
+ * @param linkedServerName The name of the linked server.
+ * @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 detailed information about a linked server of a redis cache (requires Premium SKU).
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String name, String linkedServerName, Context context);
+
+ /**
+ * Gets the list of linked servers associated with this redis cache (requires Premium SKU).
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the redis cache.
+ * @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 list of linked servers associated with this redis cache (requires Premium SKU).
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String name);
+
+ /**
+ * Gets the list of linked servers associated with this redis cache (requires Premium SKU).
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the redis cache.
+ * @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 list of linked servers associated with this redis cache (requires Premium SKU).
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String name, Context context);
+}
diff --git a/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/OperationsClient.java b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/OperationsClient.java
new file mode 100644
index 0000000000000..b451cb87ce525
--- /dev/null
+++ b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/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.redis.generated.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.redis.generated.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 result of the request to list REST API operations.
+ */
+ @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 result of the request to list REST API operations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/PatchSchedulesClient.java b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/PatchSchedulesClient.java
new file mode 100644
index 0000000000000..55d31deeade9f
--- /dev/null
+++ b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/PatchSchedulesClient.java
@@ -0,0 +1,140 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redis.generated.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.util.Context;
+import com.azure.resourcemanager.redis.generated.fluent.models.RedisPatchScheduleInner;
+import com.azure.resourcemanager.redis.generated.models.DefaultName;
+
+/** An instance of this class provides access to all the operations defined in PatchSchedulesClient. */
+public interface PatchSchedulesClient {
+ /**
+ * Gets all patch schedules in the specified redis cache (there is only one).
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @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 patch schedules in the specified redis cache (there is only one).
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByRedisResource(String resourceGroupName, String cacheName);
+
+ /**
+ * Gets all patch schedules in the specified redis cache (there is only one).
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @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 patch schedules in the specified redis cache (there is only one).
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByRedisResource(
+ String resourceGroupName, String cacheName, Context context);
+
+ /**
+ * Create or replace the patching schedule for Redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @param defaultParameter Default string modeled as parameter for auto generation to work correctly.
+ * @param parameters Parameters to set the patching schedule for Redis cache.
+ * @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 response to put/get patch schedules for Redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ RedisPatchScheduleInner createOrUpdate(
+ String resourceGroupName, String name, DefaultName defaultParameter, RedisPatchScheduleInner parameters);
+
+ /**
+ * Create or replace the patching schedule for Redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @param defaultParameter Default string modeled as parameter for auto generation to work correctly.
+ * @param parameters Parameters to set the patching schedule for Redis cache.
+ * @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 response to put/get patch schedules for Redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(
+ String resourceGroupName,
+ String name,
+ DefaultName defaultParameter,
+ RedisPatchScheduleInner parameters,
+ Context context);
+
+ /**
+ * Deletes the patching schedule of a redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the redis cache.
+ * @param defaultParameter Default string modeled as parameter for auto generation to work correctly.
+ * @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 name, DefaultName defaultParameter);
+
+ /**
+ * Deletes the patching schedule of a redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the redis cache.
+ * @param defaultParameter Default string modeled as parameter for auto generation to work correctly.
+ * @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 name, DefaultName defaultParameter, Context context);
+
+ /**
+ * Gets the patching schedule of a redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the redis cache.
+ * @param defaultParameter Default string modeled as parameter for auto generation to work correctly.
+ * @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 patching schedule of a redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ RedisPatchScheduleInner get(String resourceGroupName, String name, DefaultName defaultParameter);
+
+ /**
+ * Gets the patching schedule of a redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the redis cache.
+ * @param defaultParameter Default string modeled as parameter for auto generation to work correctly.
+ * @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 patching schedule of a redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String name, DefaultName defaultParameter, Context context);
+}
diff --git a/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/PrivateEndpointConnectionsClient.java b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/PrivateEndpointConnectionsClient.java
new file mode 100644
index 0000000000000..8d1e523b2cea1
--- /dev/null
+++ b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/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.redis.generated.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.redis.generated.fluent.models.PrivateEndpointConnectionInner;
+
+/** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */
+public interface PrivateEndpointConnectionsClient {
+ /**
+ * List all the private endpoint connections associated with the redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @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 cacheName);
+
+ /**
+ * List all the private endpoint connections associated with the redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @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 cacheName, Context context);
+
+ /**
+ * Gets the specified private endpoint connection associated with the redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @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 redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateEndpointConnectionInner get(
+ String resourceGroupName, String cacheName, String privateEndpointConnectionName);
+
+ /**
+ * Gets the specified private endpoint connection associated with the redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @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 redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String cacheName, String privateEndpointConnectionName, Context context);
+
+ /**
+ * Update the state of specified private endpoint connection associated with the redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @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.LONG_RUNNING_OPERATION)
+ SyncPoller, PrivateEndpointConnectionInner> beginPut(
+ String resourceGroupName,
+ String cacheName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner properties);
+
+ /**
+ * Update the state of specified private endpoint connection associated with the redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @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.LONG_RUNNING_OPERATION)
+ SyncPoller, PrivateEndpointConnectionInner> beginPut(
+ String resourceGroupName,
+ String cacheName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner properties,
+ Context context);
+
+ /**
+ * Update the state of specified private endpoint connection associated with the redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @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 cacheName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner properties);
+
+ /**
+ * Update the state of specified private endpoint connection associated with the redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @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 cacheName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner properties,
+ Context context);
+
+ /**
+ * Deletes the specified private endpoint connection associated with the redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @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 cacheName, String privateEndpointConnectionName);
+
+ /**
+ * Deletes the specified private endpoint connection associated with the redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @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 cacheName, String privateEndpointConnectionName, Context context);
+}
diff --git a/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/PrivateLinkResourcesClient.java b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/PrivateLinkResourcesClient.java
new file mode 100644
index 0000000000000..9702505ba46b1
--- /dev/null
+++ b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/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.redis.generated.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.redis.generated.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 redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @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 redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByRedisCache(String resourceGroupName, String cacheName);
+
+ /**
+ * Gets the private link resources that need to be created for a redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @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 redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByRedisCache(
+ String resourceGroupName, String cacheName, Context context);
+}
diff --git a/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/RedisClient.java b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/RedisClient.java
new file mode 100644
index 0000000000000..de7daa2a7c205
--- /dev/null
+++ b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/RedisClient.java
@@ -0,0 +1,505 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redis.generated.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.redis.generated.fluent.models.RedisAccessKeysInner;
+import com.azure.resourcemanager.redis.generated.fluent.models.RedisForceRebootResponseInner;
+import com.azure.resourcemanager.redis.generated.fluent.models.RedisResourceInner;
+import com.azure.resourcemanager.redis.generated.fluent.models.UpgradeNotificationInner;
+import com.azure.resourcemanager.redis.generated.models.CheckNameAvailabilityParameters;
+import com.azure.resourcemanager.redis.generated.models.ExportRdbParameters;
+import com.azure.resourcemanager.redis.generated.models.ImportRdbParameters;
+import com.azure.resourcemanager.redis.generated.models.RedisCreateParameters;
+import com.azure.resourcemanager.redis.generated.models.RedisRebootParameters;
+import com.azure.resourcemanager.redis.generated.models.RedisRegenerateKeyParameters;
+import com.azure.resourcemanager.redis.generated.models.RedisUpdateParameters;
+
+/** An instance of this class provides access to all the operations defined in RedisClient. */
+public interface RedisClient {
+ /**
+ * Checks that the redis cache name is valid and is not already in use.
+ *
+ * @param parameters Parameters supplied to the CheckNameAvailability Redis operation. The only supported resource
+ * type is 'Microsoft.Cache/redis'.
+ * @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 checkNameAvailability(CheckNameAvailabilityParameters parameters);
+
+ /**
+ * Checks that the redis cache name is valid and is not already in use.
+ *
+ * @param parameters Parameters supplied to the CheckNameAvailability Redis operation. The only supported resource
+ * type is 'Microsoft.Cache/redis'.
+ * @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 checkNameAvailabilityWithResponse(CheckNameAvailabilityParameters parameters, Context context);
+
+ /**
+ * Gets any upgrade notifications for a Redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @param history how many minutes in past to look for upgrade notifications.
+ * @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 any upgrade notifications for a Redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listUpgradeNotifications(
+ String resourceGroupName, String name, double history);
+
+ /**
+ * Gets any upgrade notifications for a Redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @param history how many minutes in past to look for upgrade notifications.
+ * @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 any upgrade notifications for a Redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listUpgradeNotifications(
+ String resourceGroupName, String name, double history, Context context);
+
+ /**
+ * Create or replace (overwrite/recreate, with potential downtime) an existing Redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @param parameters Parameters supplied to the Create Redis 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 single Redis item in List or Get Operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, RedisResourceInner> beginCreate(
+ String resourceGroupName, String name, RedisCreateParameters parameters);
+
+ /**
+ * Create or replace (overwrite/recreate, with potential downtime) an existing Redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @param parameters Parameters supplied to the Create Redis 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 a single Redis item in List or Get Operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, RedisResourceInner> beginCreate(
+ String resourceGroupName, String name, RedisCreateParameters parameters, Context context);
+
+ /**
+ * Create or replace (overwrite/recreate, with potential downtime) an existing Redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @param parameters Parameters supplied to the Create Redis 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 single Redis item in List or Get Operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ RedisResourceInner create(String resourceGroupName, String name, RedisCreateParameters parameters);
+
+ /**
+ * Create or replace (overwrite/recreate, with potential downtime) an existing Redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @param parameters Parameters supplied to the Create Redis 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 a single Redis item in List or Get Operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ RedisResourceInner create(String resourceGroupName, String name, RedisCreateParameters parameters, Context context);
+
+ /**
+ * Update an existing Redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @param parameters Parameters supplied to the Update Redis 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 single Redis item in List or Get Operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ RedisResourceInner update(String resourceGroupName, String name, RedisUpdateParameters parameters);
+
+ /**
+ * Update an existing Redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @param parameters Parameters supplied to the Update Redis 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 a single Redis item in List or Get Operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String resourceGroupName, String name, RedisUpdateParameters parameters, Context context);
+
+ /**
+ * Deletes a Redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @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.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String name);
+
+ /**
+ * Deletes a Redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @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.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String name, Context context);
+
+ /**
+ * Deletes a Redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @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 name);
+
+ /**
+ * Deletes a Redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @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 name, Context context);
+
+ /**
+ * Gets a Redis cache (resource description).
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @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 Redis cache (resource description).
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ RedisResourceInner getByResourceGroup(String resourceGroupName, String name);
+
+ /**
+ * Gets a Redis cache (resource description).
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @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 Redis cache (resource description).
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(String resourceGroupName, String name, Context context);
+
+ /**
+ * Lists all Redis caches in a resource group.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of list Redis operation.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * Lists all Redis caches in a resource group.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @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 list Redis operation.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * Gets all Redis caches 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 Redis caches in the specified subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Gets all Redis caches 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 Redis caches in the specified subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+
+ /**
+ * Retrieve a Redis cache's access keys. This operation requires write permission to the cache resource.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @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 redis cache access keys.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ RedisAccessKeysInner listKeys(String resourceGroupName, String name);
+
+ /**
+ * Retrieve a Redis cache's access keys. This operation requires write permission to the cache resource.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @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 redis cache access keys.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response listKeysWithResponse(String resourceGroupName, String name, Context context);
+
+ /**
+ * Regenerate Redis cache's access keys. This operation requires write permission to the cache resource.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @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 redis cache access keys.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ RedisAccessKeysInner regenerateKey(String resourceGroupName, String name, RedisRegenerateKeyParameters parameters);
+
+ /**
+ * Regenerate Redis cache's access keys. This operation requires write permission to the cache resource.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @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 redis cache access keys.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response regenerateKeyWithResponse(
+ String resourceGroupName, String name, RedisRegenerateKeyParameters parameters, Context context);
+
+ /**
+ * Reboot specified Redis node(s). This operation requires write permission to the cache resource. There can be
+ * potential data loss.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @param parameters Specifies which Redis node(s) to reboot.
+ * @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 response to force reboot for Redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ RedisForceRebootResponseInner forceReboot(String resourceGroupName, String name, RedisRebootParameters parameters);
+
+ /**
+ * Reboot specified Redis node(s). This operation requires write permission to the cache resource. There can be
+ * potential data loss.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @param parameters Specifies which Redis node(s) to reboot.
+ * @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 response to force reboot for Redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response forceRebootWithResponse(
+ String resourceGroupName, String name, RedisRebootParameters parameters, Context context);
+
+ /**
+ * Import data into Redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @param parameters Parameters for Redis import 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.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginImportData(
+ String resourceGroupName, String name, ImportRdbParameters parameters);
+
+ /**
+ * Import data into Redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @param parameters Parameters for Redis import 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 the completion.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginImportData(
+ String resourceGroupName, String name, ImportRdbParameters parameters, Context context);
+
+ /**
+ * Import data into Redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @param parameters Parameters for Redis import 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 importData(String resourceGroupName, String name, ImportRdbParameters parameters);
+
+ /**
+ * Import data into Redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @param parameters Parameters for Redis import 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void importData(String resourceGroupName, String name, ImportRdbParameters parameters, Context context);
+
+ /**
+ * Export data from the redis cache to blobs in a container.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @param parameters Parameters for Redis export 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.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginExportData(
+ String resourceGroupName, String name, ExportRdbParameters parameters);
+
+ /**
+ * Export data from the redis cache to blobs in a container.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @param parameters Parameters for Redis export 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 the completion.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginExportData(
+ String resourceGroupName, String name, ExportRdbParameters parameters, Context context);
+
+ /**
+ * Export data from the redis cache to blobs in a container.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @param parameters Parameters for Redis export 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 exportData(String resourceGroupName, String name, ExportRdbParameters parameters);
+
+ /**
+ * Export data from the redis cache to blobs in a container.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @param parameters Parameters for Redis export 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void exportData(String resourceGroupName, String name, ExportRdbParameters parameters, Context context);
+}
diff --git a/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/RedisManagementClient.java b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/RedisManagementClient.java
new file mode 100644
index 0000000000000..37caba7cf8ffe
--- /dev/null
+++ b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/RedisManagementClient.java
@@ -0,0 +1,96 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redis.generated.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/** The interface for RedisManagementClient class. */
+public interface RedisManagementClient {
+ /**
+ * Gets Gets subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID
+ * forms part of the URI for every service call.
+ *
+ * @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 RedisClient object to access its operations.
+ *
+ * @return the RedisClient object.
+ */
+ RedisClient getRedis();
+
+ /**
+ * Gets the FirewallRulesClient object to access its operations.
+ *
+ * @return the FirewallRulesClient object.
+ */
+ FirewallRulesClient getFirewallRules();
+
+ /**
+ * Gets the PatchSchedulesClient object to access its operations.
+ *
+ * @return the PatchSchedulesClient object.
+ */
+ PatchSchedulesClient getPatchSchedules();
+
+ /**
+ * Gets the LinkedServersClient object to access its operations.
+ *
+ * @return the LinkedServersClient object.
+ */
+ LinkedServersClient getLinkedServers();
+
+ /**
+ * 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/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/OperationInner.java b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/OperationInner.java
new file mode 100644
index 0000000000000..451c56be5d68d
--- /dev/null
+++ b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/OperationInner.java
@@ -0,0 +1,80 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redis.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.redis.generated.models.OperationDisplay;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** REST API operation. */
+@Fluent
+public final class OperationInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class);
+
+ /*
+ * Operation name: {provider}/{resource}/{operation}
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /*
+ * The object that describes the operation.
+ */
+ @JsonProperty(value = "display")
+ private OperationDisplay display;
+
+ /**
+ * Get the name property: Operation name: {provider}/{resource}/{operation}.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: Operation name: {provider}/{resource}/{operation}.
+ *
+ * @param name the name value to set.
+ * @return the OperationInner object itself.
+ */
+ public OperationInner withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the display property: The object that describes the operation.
+ *
+ * @return the display value.
+ */
+ public OperationDisplay display() {
+ return this.display;
+ }
+
+ /**
+ * Set the display property: The object that describes the operation.
+ *
+ * @param display the display value to set.
+ * @return the OperationInner object itself.
+ */
+ public OperationInner withDisplay(OperationDisplay display) {
+ this.display = display;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (display() != null) {
+ display().validate();
+ }
+ }
+}
diff --git a/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/PrivateEndpointConnectionInner.java b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/PrivateEndpointConnectionInner.java
new file mode 100644
index 0000000000000..2ddfe3c4c92b7
--- /dev/null
+++ b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/PrivateEndpointConnectionInner.java
@@ -0,0 +1,104 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redis.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.redis.generated.models.PrivateEndpoint;
+import com.azure.resourcemanager.redis.generated.models.PrivateEndpointConnectionProvisioningState;
+import com.azure.resourcemanager.redis.generated.models.PrivateLinkServiceConnectionState;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The Private Endpoint Connection resource. */
+@Fluent
+public final class PrivateEndpointConnectionInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionInner.class);
+
+ /*
+ * Resource properties.
+ */
+ @JsonProperty(value = "properties")
+ private PrivateEndpointConnectionProperties innerProperties;
+
+ /**
+ * Get the innerProperties property: Resource properties.
+ *
+ * @return the innerProperties value.
+ */
+ private PrivateEndpointConnectionProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the privateEndpoint property: The resource of private end point.
+ *
+ * @return the privateEndpoint value.
+ */
+ public PrivateEndpoint privateEndpoint() {
+ return this.innerProperties() == null ? null : this.innerProperties().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) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PrivateEndpointConnectionProperties();
+ }
+ this.innerProperties().withPrivateEndpoint(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.innerProperties() == null ? null : this.innerProperties().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) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PrivateEndpointConnectionProperties();
+ }
+ this.innerProperties().withPrivateLinkServiceConnectionState(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.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/PrivateEndpointConnectionProperties.java b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/PrivateEndpointConnectionProperties.java
new file mode 100644
index 0000000000000..0cbc05d846104
--- /dev/null
+++ b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/PrivateEndpointConnectionProperties.java
@@ -0,0 +1,110 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redis.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.redis.generated.models.PrivateEndpoint;
+import com.azure.resourcemanager.redis.generated.models.PrivateEndpointConnectionProvisioningState;
+import com.azure.resourcemanager.redis.generated.models.PrivateLinkServiceConnectionState;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Properties of the PrivateEndpointConnectProperties. */
+@Fluent
+public final class PrivateEndpointConnectionProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionProperties.class);
+
+ /*
+ * The resource of private end point.
+ */
+ @JsonProperty(value = "privateEndpoint")
+ private PrivateEndpoint privateEndpoint;
+
+ /*
+ * A collection of information about the state of the connection between
+ * service consumer and provider.
+ */
+ @JsonProperty(value = "privateLinkServiceConnectionState", required = true)
+ private PrivateLinkServiceConnectionState privateLinkServiceConnectionState;
+
+ /*
+ * The provisioning state of the private endpoint connection resource.
+ */
+ @JsonProperty(value = "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 PrivateEndpointConnectionProperties object itself.
+ */
+ public PrivateEndpointConnectionProperties 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 PrivateEndpointConnectionProperties object itself.
+ */
+ public PrivateEndpointConnectionProperties 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) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property privateLinkServiceConnectionState in model"
+ + " PrivateEndpointConnectionProperties"));
+ } else {
+ privateLinkServiceConnectionState().validate();
+ }
+ }
+}
diff --git a/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/PrivateLinkResourceInner.java b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/PrivateLinkResourceInner.java
new file mode 100644
index 0000000000000..f92630c79f0a4
--- /dev/null
+++ b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/PrivateLinkResourceInner.java
@@ -0,0 +1,85 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redis.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+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. */
+@Fluent
+public final class PrivateLinkResourceInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourceInner.class);
+
+ /*
+ * Resource properties.
+ */
+ @JsonProperty(value = "properties")
+ private PrivateLinkResourceProperties innerProperties;
+
+ /**
+ * Get the innerProperties property: Resource properties.
+ *
+ * @return the innerProperties value.
+ */
+ private PrivateLinkResourceProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the groupId property: The private link resource group id.
+ *
+ * @return the groupId value.
+ */
+ public String groupId() {
+ return this.innerProperties() == null ? null : this.innerProperties().groupId();
+ }
+
+ /**
+ * Get the requiredMembers property: The private link resource required member names.
+ *
+ * @return the requiredMembers value.
+ */
+ public List requiredMembers() {
+ return this.innerProperties() == null ? null : this.innerProperties().requiredMembers();
+ }
+
+ /**
+ * Get the requiredZoneNames property: The private link resource Private link DNS zone name.
+ *
+ * @return the requiredZoneNames value.
+ */
+ public List requiredZoneNames() {
+ return this.innerProperties() == null ? null : this.innerProperties().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) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PrivateLinkResourceProperties();
+ }
+ this.innerProperties().withRequiredZoneNames(requiredZoneNames);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/PrivateLinkResourceProperties.java b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/PrivateLinkResourceProperties.java
new file mode 100644
index 0000000000000..4f46885d15c6a
--- /dev/null
+++ b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/PrivateLinkResourceProperties.java
@@ -0,0 +1,81 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redis.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Properties of a private link resource. */
+@Fluent
+public final class PrivateLinkResourceProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourceProperties.class);
+
+ /*
+ * The private link resource group id.
+ */
+ @JsonProperty(value = "groupId", access = JsonProperty.Access.WRITE_ONLY)
+ private String groupId;
+
+ /*
+ * The private link resource required member names.
+ */
+ @JsonProperty(value = "requiredMembers", access = JsonProperty.Access.WRITE_ONLY)
+ private List requiredMembers;
+
+ /*
+ * The private link resource Private link DNS zone name.
+ */
+ @JsonProperty(value = "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 PrivateLinkResourceProperties object itself.
+ */
+ public PrivateLinkResourceProperties 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/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/RedisAccessKeysInner.java b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/RedisAccessKeysInner.java
new file mode 100644
index 0000000000000..6969318f4a2a1
--- /dev/null
+++ b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/RedisAccessKeysInner.java
@@ -0,0 +1,56 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redis.generated.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;
+
+/** Redis cache access keys. */
+@Immutable
+public final class RedisAccessKeysInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(RedisAccessKeysInner.class);
+
+ /*
+ * The current primary key that clients can use to authenticate with Redis
+ * cache.
+ */
+ @JsonProperty(value = "primaryKey", access = JsonProperty.Access.WRITE_ONLY)
+ private String primaryKey;
+
+ /*
+ * The current secondary key that clients can use to authenticate with
+ * Redis cache.
+ */
+ @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 with Redis cache.
+ *
+ * @return the primaryKey value.
+ */
+ public String primaryKey() {
+ return this.primaryKey;
+ }
+
+ /**
+ * Get the secondaryKey property: The current secondary key that clients can use to authenticate with Redis cache.
+ *
+ * @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/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/RedisCreateProperties.java b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/RedisCreateProperties.java
new file mode 100644
index 0000000000000..cb23e0c6e0142
--- /dev/null
+++ b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/RedisCreateProperties.java
@@ -0,0 +1,190 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redis.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.redis.generated.models.PublicNetworkAccess;
+import com.azure.resourcemanager.redis.generated.models.RedisCommonProperties;
+import com.azure.resourcemanager.redis.generated.models.RedisCommonPropertiesRedisConfiguration;
+import com.azure.resourcemanager.redis.generated.models.Sku;
+import com.azure.resourcemanager.redis.generated.models.TlsVersion;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** Properties supplied to Create Redis operation. */
+@Fluent
+public class RedisCreateProperties extends RedisCommonProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(RedisCreateProperties.class);
+
+ /*
+ * The SKU of the Redis cache to deploy.
+ */
+ @JsonProperty(value = "sku", required = true)
+ private Sku sku;
+
+ /*
+ * The full resource ID of a subnet in a virtual network to deploy the
+ * Redis cache in. Example format:
+ * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1
+ */
+ @JsonProperty(value = "subnetId")
+ private String subnetId;
+
+ /*
+ * Static IP address. Optionally, may be specified when deploying a Redis
+ * cache inside an existing Azure Virtual Network; auto assigned by
+ * default.
+ */
+ @JsonProperty(value = "staticIP")
+ private String staticIp;
+
+ /**
+ * Get the sku property: The SKU of the Redis cache to deploy.
+ *
+ * @return the sku value.
+ */
+ public Sku sku() {
+ return this.sku;
+ }
+
+ /**
+ * Set the sku property: The SKU of the Redis cache to deploy.
+ *
+ * @param sku the sku value to set.
+ * @return the RedisCreateProperties object itself.
+ */
+ public RedisCreateProperties withSku(Sku sku) {
+ this.sku = sku;
+ return this;
+ }
+
+ /**
+ * Get the subnetId property: The full resource ID of a subnet in a virtual network to deploy the Redis cache in.
+ * Example format:
+ * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1.
+ *
+ * @return the subnetId value.
+ */
+ public String subnetId() {
+ return this.subnetId;
+ }
+
+ /**
+ * Set the subnetId property: The full resource ID of a subnet in a virtual network to deploy the Redis cache in.
+ * Example format:
+ * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1.
+ *
+ * @param subnetId the subnetId value to set.
+ * @return the RedisCreateProperties object itself.
+ */
+ public RedisCreateProperties withSubnetId(String subnetId) {
+ this.subnetId = subnetId;
+ return this;
+ }
+
+ /**
+ * Get the staticIp property: Static IP address. Optionally, may be specified when deploying a Redis cache inside an
+ * existing Azure Virtual Network; auto assigned by default.
+ *
+ * @return the staticIp value.
+ */
+ public String staticIp() {
+ return this.staticIp;
+ }
+
+ /**
+ * Set the staticIp property: Static IP address. Optionally, may be specified when deploying a Redis cache inside an
+ * existing Azure Virtual Network; auto assigned by default.
+ *
+ * @param staticIp the staticIp value to set.
+ * @return the RedisCreateProperties object itself.
+ */
+ public RedisCreateProperties withStaticIp(String staticIp) {
+ this.staticIp = staticIp;
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public RedisCreateProperties withRedisConfiguration(RedisCommonPropertiesRedisConfiguration redisConfiguration) {
+ super.withRedisConfiguration(redisConfiguration);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public RedisCreateProperties withRedisVersion(String redisVersion) {
+ super.withRedisVersion(redisVersion);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public RedisCreateProperties withEnableNonSslPort(Boolean enableNonSslPort) {
+ super.withEnableNonSslPort(enableNonSslPort);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public RedisCreateProperties withReplicasPerMaster(Integer replicasPerMaster) {
+ super.withReplicasPerMaster(replicasPerMaster);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public RedisCreateProperties withReplicasPerPrimary(Integer replicasPerPrimary) {
+ super.withReplicasPerPrimary(replicasPerPrimary);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public RedisCreateProperties withTenantSettings(Map tenantSettings) {
+ super.withTenantSettings(tenantSettings);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public RedisCreateProperties withShardCount(Integer shardCount) {
+ super.withShardCount(shardCount);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public RedisCreateProperties withMinimumTlsVersion(TlsVersion minimumTlsVersion) {
+ super.withMinimumTlsVersion(minimumTlsVersion);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public RedisCreateProperties withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) {
+ super.withPublicNetworkAccess(publicNetworkAccess);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ @Override
+ public void validate() {
+ super.validate();
+ if (sku() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property sku in model RedisCreateProperties"));
+ } else {
+ sku().validate();
+ }
+ }
+}
diff --git a/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/RedisFirewallRuleInner.java b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/RedisFirewallRuleInner.java
new file mode 100644
index 0000000000000..bf98983ba1002
--- /dev/null
+++ b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/RedisFirewallRuleInner.java
@@ -0,0 +1,96 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redis.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+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;
+
+/**
+ * A firewall rule on a redis cache has a name, and describes a contiguous range of IP addresses permitted to connect.
+ */
+@Fluent
+public class RedisFirewallRuleInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(RedisFirewallRuleInner.class);
+
+ /*
+ * redis cache firewall rule properties
+ */
+ @JsonProperty(value = "properties", required = true)
+ private RedisFirewallRuleProperties innerProperties = new RedisFirewallRuleProperties();
+
+ /**
+ * Get the innerProperties property: redis cache firewall rule properties.
+ *
+ * @return the innerProperties value.
+ */
+ private RedisFirewallRuleProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the startIp property: lowest IP address included in the range.
+ *
+ * @return the startIp value.
+ */
+ public String startIp() {
+ return this.innerProperties() == null ? null : this.innerProperties().startIp();
+ }
+
+ /**
+ * Set the startIp property: lowest IP address included in the range.
+ *
+ * @param startIp the startIp value to set.
+ * @return the RedisFirewallRuleInner object itself.
+ */
+ public RedisFirewallRuleInner withStartIp(String startIp) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RedisFirewallRuleProperties();
+ }
+ this.innerProperties().withStartIp(startIp);
+ return this;
+ }
+
+ /**
+ * Get the endIp property: highest IP address included in the range.
+ *
+ * @return the endIp value.
+ */
+ public String endIp() {
+ return this.innerProperties() == null ? null : this.innerProperties().endIp();
+ }
+
+ /**
+ * Set the endIp property: highest IP address included in the range.
+ *
+ * @param endIp the endIp value to set.
+ * @return the RedisFirewallRuleInner object itself.
+ */
+ public RedisFirewallRuleInner withEndIp(String endIp) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RedisFirewallRuleProperties();
+ }
+ this.innerProperties().withEndIp(endIp);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property innerProperties in model RedisFirewallRuleInner"));
+ } else {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/RedisFirewallRuleProperties.java b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/RedisFirewallRuleProperties.java
new file mode 100644
index 0000000000000..7b2e6d7920180
--- /dev/null
+++ b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/RedisFirewallRuleProperties.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.redis.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Specifies a range of IP addresses permitted to connect to the cache. */
+@Fluent
+public final class RedisFirewallRuleProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(RedisFirewallRuleProperties.class);
+
+ /*
+ * lowest IP address included in the range
+ */
+ @JsonProperty(value = "startIP", required = true)
+ private String startIp;
+
+ /*
+ * highest IP address included in the range
+ */
+ @JsonProperty(value = "endIP", required = true)
+ private String endIp;
+
+ /**
+ * Get the startIp property: lowest IP address included in the range.
+ *
+ * @return the startIp value.
+ */
+ public String startIp() {
+ return this.startIp;
+ }
+
+ /**
+ * Set the startIp property: lowest IP address included in the range.
+ *
+ * @param startIp the startIp value to set.
+ * @return the RedisFirewallRuleProperties object itself.
+ */
+ public RedisFirewallRuleProperties withStartIp(String startIp) {
+ this.startIp = startIp;
+ return this;
+ }
+
+ /**
+ * Get the endIp property: highest IP address included in the range.
+ *
+ * @return the endIp value.
+ */
+ public String endIp() {
+ return this.endIp;
+ }
+
+ /**
+ * Set the endIp property: highest IP address included in the range.
+ *
+ * @param endIp the endIp value to set.
+ * @return the RedisFirewallRuleProperties object itself.
+ */
+ public RedisFirewallRuleProperties withEndIp(String endIp) {
+ this.endIp = endIp;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (startIp() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property startIp in model RedisFirewallRuleProperties"));
+ }
+ if (endIp() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property endIp in model RedisFirewallRuleProperties"));
+ }
+ }
+}
diff --git a/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/RedisForceRebootResponseInner.java b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/RedisForceRebootResponseInner.java
new file mode 100644
index 0000000000000..0d483521d6943
--- /dev/null
+++ b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/RedisForceRebootResponseInner.java
@@ -0,0 +1,39 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redis.generated.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;
+
+/** Response to force reboot for Redis cache. */
+@Immutable
+public final class RedisForceRebootResponseInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(RedisForceRebootResponseInner.class);
+
+ /*
+ * Status message
+ */
+ @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY)
+ private String message;
+
+ /**
+ * Get the message property: Status message.
+ *
+ * @return the message value.
+ */
+ public String message() {
+ return this.message;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/RedisLinkedServerCreateProperties.java b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/RedisLinkedServerCreateProperties.java
new file mode 100644
index 0000000000000..cf82c4fe1a789
--- /dev/null
+++ b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/RedisLinkedServerCreateProperties.java
@@ -0,0 +1,122 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redis.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.redis.generated.models.ReplicationRole;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Create properties for a linked server. */
+@Fluent
+public class RedisLinkedServerCreateProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(RedisLinkedServerCreateProperties.class);
+
+ /*
+ * Fully qualified resourceId of the linked redis cache.
+ */
+ @JsonProperty(value = "linkedRedisCacheId", required = true)
+ private String linkedRedisCacheId;
+
+ /*
+ * Location of the linked redis cache.
+ */
+ @JsonProperty(value = "linkedRedisCacheLocation", required = true)
+ private String linkedRedisCacheLocation;
+
+ /*
+ * Role of the linked server.
+ */
+ @JsonProperty(value = "serverRole", required = true)
+ private ReplicationRole serverRole;
+
+ /**
+ * Get the linkedRedisCacheId property: Fully qualified resourceId of the linked redis cache.
+ *
+ * @return the linkedRedisCacheId value.
+ */
+ public String linkedRedisCacheId() {
+ return this.linkedRedisCacheId;
+ }
+
+ /**
+ * Set the linkedRedisCacheId property: Fully qualified resourceId of the linked redis cache.
+ *
+ * @param linkedRedisCacheId the linkedRedisCacheId value to set.
+ * @return the RedisLinkedServerCreateProperties object itself.
+ */
+ public RedisLinkedServerCreateProperties withLinkedRedisCacheId(String linkedRedisCacheId) {
+ this.linkedRedisCacheId = linkedRedisCacheId;
+ return this;
+ }
+
+ /**
+ * Get the linkedRedisCacheLocation property: Location of the linked redis cache.
+ *
+ * @return the linkedRedisCacheLocation value.
+ */
+ public String linkedRedisCacheLocation() {
+ return this.linkedRedisCacheLocation;
+ }
+
+ /**
+ * Set the linkedRedisCacheLocation property: Location of the linked redis cache.
+ *
+ * @param linkedRedisCacheLocation the linkedRedisCacheLocation value to set.
+ * @return the RedisLinkedServerCreateProperties object itself.
+ */
+ public RedisLinkedServerCreateProperties withLinkedRedisCacheLocation(String linkedRedisCacheLocation) {
+ this.linkedRedisCacheLocation = linkedRedisCacheLocation;
+ return this;
+ }
+
+ /**
+ * Get the serverRole property: Role of the linked server.
+ *
+ * @return the serverRole value.
+ */
+ public ReplicationRole serverRole() {
+ return this.serverRole;
+ }
+
+ /**
+ * Set the serverRole property: Role of the linked server.
+ *
+ * @param serverRole the serverRole value to set.
+ * @return the RedisLinkedServerCreateProperties object itself.
+ */
+ public RedisLinkedServerCreateProperties withServerRole(ReplicationRole serverRole) {
+ this.serverRole = serverRole;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (linkedRedisCacheId() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property linkedRedisCacheId in model RedisLinkedServerCreateProperties"));
+ }
+ if (linkedRedisCacheLocation() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property linkedRedisCacheLocation in model"
+ + " RedisLinkedServerCreateProperties"));
+ }
+ if (serverRole() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property serverRole in model RedisLinkedServerCreateProperties"));
+ }
+ }
+}
diff --git a/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/RedisLinkedServerProperties.java b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/RedisLinkedServerProperties.java
new file mode 100644
index 0000000000000..78ec125b97e79
--- /dev/null
+++ b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/RedisLinkedServerProperties.java
@@ -0,0 +1,63 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redis.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.redis.generated.models.ReplicationRole;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Properties of a linked server to be returned in get/put response. */
+@Fluent
+public final class RedisLinkedServerProperties extends RedisLinkedServerCreateProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(RedisLinkedServerProperties.class);
+
+ /*
+ * Terminal state of the link between primary and secondary redis cache.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private String provisioningState;
+
+ /**
+ * Get the provisioningState property: Terminal state of the link between primary and secondary redis cache.
+ *
+ * @return the provisioningState value.
+ */
+ public String provisioningState() {
+ return this.provisioningState;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public RedisLinkedServerProperties withLinkedRedisCacheId(String linkedRedisCacheId) {
+ super.withLinkedRedisCacheId(linkedRedisCacheId);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public RedisLinkedServerProperties withLinkedRedisCacheLocation(String linkedRedisCacheLocation) {
+ super.withLinkedRedisCacheLocation(linkedRedisCacheLocation);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public RedisLinkedServerProperties withServerRole(ReplicationRole serverRole) {
+ super.withServerRole(serverRole);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ @Override
+ public void validate() {
+ super.validate();
+ }
+}
diff --git a/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/RedisLinkedServerWithPropertiesInner.java b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/RedisLinkedServerWithPropertiesInner.java
new file mode 100644
index 0000000000000..28773bc5404c0
--- /dev/null
+++ b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/RedisLinkedServerWithPropertiesInner.java
@@ -0,0 +1,122 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redis.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.redis.generated.models.ReplicationRole;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Response to put/get linked server (with properties) for Redis cache. */
+@Fluent
+public final class RedisLinkedServerWithPropertiesInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(RedisLinkedServerWithPropertiesInner.class);
+
+ /*
+ * Properties of the linked server.
+ */
+ @JsonProperty(value = "properties")
+ private RedisLinkedServerProperties innerProperties;
+
+ /**
+ * Get the innerProperties property: Properties of the linked server.
+ *
+ * @return the innerProperties value.
+ */
+ private RedisLinkedServerProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the provisioningState property: Terminal state of the link between primary and secondary redis cache.
+ *
+ * @return the provisioningState value.
+ */
+ public String provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Get the linkedRedisCacheId property: Fully qualified resourceId of the linked redis cache.
+ *
+ * @return the linkedRedisCacheId value.
+ */
+ public String linkedRedisCacheId() {
+ return this.innerProperties() == null ? null : this.innerProperties().linkedRedisCacheId();
+ }
+
+ /**
+ * Set the linkedRedisCacheId property: Fully qualified resourceId of the linked redis cache.
+ *
+ * @param linkedRedisCacheId the linkedRedisCacheId value to set.
+ * @return the RedisLinkedServerWithPropertiesInner object itself.
+ */
+ public RedisLinkedServerWithPropertiesInner withLinkedRedisCacheId(String linkedRedisCacheId) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RedisLinkedServerProperties();
+ }
+ this.innerProperties().withLinkedRedisCacheId(linkedRedisCacheId);
+ return this;
+ }
+
+ /**
+ * Get the linkedRedisCacheLocation property: Location of the linked redis cache.
+ *
+ * @return the linkedRedisCacheLocation value.
+ */
+ public String linkedRedisCacheLocation() {
+ return this.innerProperties() == null ? null : this.innerProperties().linkedRedisCacheLocation();
+ }
+
+ /**
+ * Set the linkedRedisCacheLocation property: Location of the linked redis cache.
+ *
+ * @param linkedRedisCacheLocation the linkedRedisCacheLocation value to set.
+ * @return the RedisLinkedServerWithPropertiesInner object itself.
+ */
+ public RedisLinkedServerWithPropertiesInner withLinkedRedisCacheLocation(String linkedRedisCacheLocation) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RedisLinkedServerProperties();
+ }
+ this.innerProperties().withLinkedRedisCacheLocation(linkedRedisCacheLocation);
+ return this;
+ }
+
+ /**
+ * Get the serverRole property: Role of the linked server.
+ *
+ * @return the serverRole value.
+ */
+ public ReplicationRole serverRole() {
+ return this.innerProperties() == null ? null : this.innerProperties().serverRole();
+ }
+
+ /**
+ * Set the serverRole property: Role of the linked server.
+ *
+ * @param serverRole the serverRole value to set.
+ * @return the RedisLinkedServerWithPropertiesInner object itself.
+ */
+ public RedisLinkedServerWithPropertiesInner withServerRole(ReplicationRole serverRole) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RedisLinkedServerProperties();
+ }
+ this.innerProperties().withServerRole(serverRole);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/RedisPatchScheduleInner.java b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/RedisPatchScheduleInner.java
new file mode 100644
index 0000000000000..f49ee83e553e4
--- /dev/null
+++ b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/RedisPatchScheduleInner.java
@@ -0,0 +1,73 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redis.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.redis.generated.models.ScheduleEntry;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Response to put/get patch schedules for Redis cache. */
+@Fluent
+public final class RedisPatchScheduleInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(RedisPatchScheduleInner.class);
+
+ /*
+ * List of patch schedules for a Redis cache.
+ */
+ @JsonProperty(value = "properties", required = true)
+ private ScheduleEntries innerProperties = new ScheduleEntries();
+
+ /**
+ * Get the innerProperties property: List of patch schedules for a Redis cache.
+ *
+ * @return the innerProperties value.
+ */
+ private ScheduleEntries innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the scheduleEntries property: List of patch schedules for a Redis cache.
+ *
+ * @return the scheduleEntries value.
+ */
+ public List scheduleEntries() {
+ return this.innerProperties() == null ? null : this.innerProperties().scheduleEntries();
+ }
+
+ /**
+ * Set the scheduleEntries property: List of patch schedules for a Redis cache.
+ *
+ * @param scheduleEntries the scheduleEntries value to set.
+ * @return the RedisPatchScheduleInner object itself.
+ */
+ public RedisPatchScheduleInner withScheduleEntries(List scheduleEntries) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ScheduleEntries();
+ }
+ this.innerProperties().withScheduleEntries(scheduleEntries);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property innerProperties in model RedisPatchScheduleInner"));
+ } else {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/RedisPropertiesInner.java b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/RedisPropertiesInner.java
new file mode 100644
index 0000000000000..cdb5beb32970f
--- /dev/null
+++ b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/RedisPropertiesInner.java
@@ -0,0 +1,255 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redis.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.redis.generated.models.ProvisioningState;
+import com.azure.resourcemanager.redis.generated.models.PublicNetworkAccess;
+import com.azure.resourcemanager.redis.generated.models.RedisCommonPropertiesRedisConfiguration;
+import com.azure.resourcemanager.redis.generated.models.RedisInstanceDetails;
+import com.azure.resourcemanager.redis.generated.models.RedisLinkedServer;
+import com.azure.resourcemanager.redis.generated.models.Sku;
+import com.azure.resourcemanager.redis.generated.models.TlsVersion;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+import java.util.Map;
+
+/** Properties of the redis cache. */
+@Fluent
+public final class RedisPropertiesInner extends RedisCreateProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(RedisPropertiesInner.class);
+
+ /*
+ * Redis instance provisioning status.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /*
+ * Redis host name.
+ */
+ @JsonProperty(value = "hostName", access = JsonProperty.Access.WRITE_ONLY)
+ private String hostname;
+
+ /*
+ * Redis non-SSL port.
+ */
+ @JsonProperty(value = "port", access = JsonProperty.Access.WRITE_ONLY)
+ private Integer port;
+
+ /*
+ * Redis SSL port.
+ */
+ @JsonProperty(value = "sslPort", access = JsonProperty.Access.WRITE_ONLY)
+ private Integer sslPort;
+
+ /*
+ * The keys of the Redis cache - not set if this object is not the response
+ * to Create or Update redis cache
+ */
+ @JsonProperty(value = "accessKeys", access = JsonProperty.Access.WRITE_ONLY)
+ private RedisAccessKeysInner accessKeys;
+
+ /*
+ * List of the linked servers associated with the cache
+ */
+ @JsonProperty(value = "linkedServers", access = JsonProperty.Access.WRITE_ONLY)
+ private List linkedServers;
+
+ /*
+ * List of the Redis instances associated with the cache
+ */
+ @JsonProperty(value = "instances", access = JsonProperty.Access.WRITE_ONLY)
+ private List instances;
+
+ /*
+ * List of private endpoint connection associated with the specified redis
+ * cache
+ */
+ @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY)
+ private List privateEndpointConnections;
+
+ /**
+ * Get the provisioningState property: Redis instance provisioning status.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the hostname property: Redis host name.
+ *
+ * @return the hostname value.
+ */
+ public String hostname() {
+ return this.hostname;
+ }
+
+ /**
+ * Get the port property: Redis non-SSL port.
+ *
+ * @return the port value.
+ */
+ public Integer port() {
+ return this.port;
+ }
+
+ /**
+ * Get the sslPort property: Redis SSL port.
+ *
+ * @return the sslPort value.
+ */
+ public Integer sslPort() {
+ return this.sslPort;
+ }
+
+ /**
+ * Get the accessKeys property: The keys of the Redis cache - not set if this object is not the response to Create
+ * or Update redis cache.
+ *
+ * @return the accessKeys value.
+ */
+ public RedisAccessKeysInner accessKeys() {
+ return this.accessKeys;
+ }
+
+ /**
+ * Get the linkedServers property: List of the linked servers associated with the cache.
+ *
+ * @return the linkedServers value.
+ */
+ public List linkedServers() {
+ return this.linkedServers;
+ }
+
+ /**
+ * Get the instances property: List of the Redis instances associated with the cache.
+ *
+ * @return the instances value.
+ */
+ public List instances() {
+ return this.instances;
+ }
+
+ /**
+ * Get the privateEndpointConnections property: List of private endpoint connection associated with the specified
+ * redis cache.
+ *
+ * @return the privateEndpointConnections value.
+ */
+ public List privateEndpointConnections() {
+ return this.privateEndpointConnections;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public RedisPropertiesInner withSku(Sku sku) {
+ super.withSku(sku);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public RedisPropertiesInner withSubnetId(String subnetId) {
+ super.withSubnetId(subnetId);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public RedisPropertiesInner withStaticIp(String staticIp) {
+ super.withStaticIp(staticIp);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public RedisPropertiesInner withRedisConfiguration(RedisCommonPropertiesRedisConfiguration redisConfiguration) {
+ super.withRedisConfiguration(redisConfiguration);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public RedisPropertiesInner withRedisVersion(String redisVersion) {
+ super.withRedisVersion(redisVersion);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public RedisPropertiesInner withEnableNonSslPort(Boolean enableNonSslPort) {
+ super.withEnableNonSslPort(enableNonSslPort);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public RedisPropertiesInner withReplicasPerMaster(Integer replicasPerMaster) {
+ super.withReplicasPerMaster(replicasPerMaster);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public RedisPropertiesInner withReplicasPerPrimary(Integer replicasPerPrimary) {
+ super.withReplicasPerPrimary(replicasPerPrimary);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public RedisPropertiesInner withTenantSettings(Map tenantSettings) {
+ super.withTenantSettings(tenantSettings);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public RedisPropertiesInner withShardCount(Integer shardCount) {
+ super.withShardCount(shardCount);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public RedisPropertiesInner withMinimumTlsVersion(TlsVersion minimumTlsVersion) {
+ super.withMinimumTlsVersion(minimumTlsVersion);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public RedisPropertiesInner withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) {
+ super.withPublicNetworkAccess(publicNetworkAccess);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ @Override
+ public void validate() {
+ super.validate();
+ if (accessKeys() != null) {
+ accessKeys().validate();
+ }
+ if (linkedServers() != null) {
+ linkedServers().forEach(e -> e.validate());
+ }
+ if (instances() != null) {
+ instances().forEach(e -> e.validate());
+ }
+ if (privateEndpointConnections() != null) {
+ privateEndpointConnections().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/RedisResourceInner.java b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/RedisResourceInner.java
new file mode 100644
index 0000000000000..fb2ed4bfb548b
--- /dev/null
+++ b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/RedisResourceInner.java
@@ -0,0 +1,496 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redis.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.redis.generated.models.ManagedServiceIdentity;
+import com.azure.resourcemanager.redis.generated.models.ProvisioningState;
+import com.azure.resourcemanager.redis.generated.models.PublicNetworkAccess;
+import com.azure.resourcemanager.redis.generated.models.RedisCommonPropertiesRedisConfiguration;
+import com.azure.resourcemanager.redis.generated.models.RedisInstanceDetails;
+import com.azure.resourcemanager.redis.generated.models.RedisLinkedServer;
+import com.azure.resourcemanager.redis.generated.models.Sku;
+import com.azure.resourcemanager.redis.generated.models.TlsVersion;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+import java.util.Map;
+
+/** A single Redis item in List or Get Operation. */
+@Fluent
+public final class RedisResourceInner extends Resource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(RedisResourceInner.class);
+
+ /*
+ * Redis cache properties.
+ */
+ @JsonProperty(value = "properties", required = true)
+ private RedisPropertiesInner innerProperties = new RedisPropertiesInner();
+
+ /*
+ * A list of availability zones denoting where the resource needs to come
+ * from.
+ */
+ @JsonProperty(value = "zones")
+ private List zones;
+
+ /*
+ * The identity of the resource.
+ */
+ @JsonProperty(value = "identity")
+ private ManagedServiceIdentity identity;
+
+ /**
+ * Get the innerProperties property: Redis cache properties.
+ *
+ * @return the innerProperties value.
+ */
+ private RedisPropertiesInner innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the zones property: A list of availability zones denoting where the resource needs to come from.
+ *
+ * @return the zones value.
+ */
+ public List zones() {
+ return this.zones;
+ }
+
+ /**
+ * Set the zones property: A list of availability zones denoting where the resource needs to come from.
+ *
+ * @param zones the zones value to set.
+ * @return the RedisResourceInner object itself.
+ */
+ public RedisResourceInner withZones(List zones) {
+ this.zones = zones;
+ return this;
+ }
+
+ /**
+ * Get the identity property: The identity of the resource.
+ *
+ * @return the identity value.
+ */
+ public ManagedServiceIdentity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity property: The identity of the resource.
+ *
+ * @param identity the identity value to set.
+ * @return the RedisResourceInner object itself.
+ */
+ public RedisResourceInner withIdentity(ManagedServiceIdentity identity) {
+ this.identity = identity;
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public RedisResourceInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public RedisResourceInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: Redis instance provisioning status.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Get the hostname property: Redis host name.
+ *
+ * @return the hostname value.
+ */
+ public String hostname() {
+ return this.innerProperties() == null ? null : this.innerProperties().hostname();
+ }
+
+ /**
+ * Get the port property: Redis non-SSL port.
+ *
+ * @return the port value.
+ */
+ public Integer port() {
+ return this.innerProperties() == null ? null : this.innerProperties().port();
+ }
+
+ /**
+ * Get the sslPort property: Redis SSL port.
+ *
+ * @return the sslPort value.
+ */
+ public Integer sslPort() {
+ return this.innerProperties() == null ? null : this.innerProperties().sslPort();
+ }
+
+ /**
+ * Get the accessKeys property: The keys of the Redis cache - not set if this object is not the response to Create
+ * or Update redis cache.
+ *
+ * @return the accessKeys value.
+ */
+ public RedisAccessKeysInner accessKeys() {
+ return this.innerProperties() == null ? null : this.innerProperties().accessKeys();
+ }
+
+ /**
+ * Get the linkedServers property: List of the linked servers associated with the cache.
+ *
+ * @return the linkedServers value.
+ */
+ public List linkedServers() {
+ return this.innerProperties() == null ? null : this.innerProperties().linkedServers();
+ }
+
+ /**
+ * Get the instances property: List of the Redis instances associated with the cache.
+ *
+ * @return the instances value.
+ */
+ public List instances() {
+ return this.innerProperties() == null ? null : this.innerProperties().instances();
+ }
+
+ /**
+ * Get the privateEndpointConnections property: List of private endpoint connection associated with the specified
+ * redis cache.
+ *
+ * @return the privateEndpointConnections value.
+ */
+ public List privateEndpointConnections() {
+ return this.innerProperties() == null ? null : this.innerProperties().privateEndpointConnections();
+ }
+
+ /**
+ * Get the sku property: The SKU of the Redis cache to deploy.
+ *
+ * @return the sku value.
+ */
+ public Sku sku() {
+ return this.innerProperties() == null ? null : this.innerProperties().sku();
+ }
+
+ /**
+ * Set the sku property: The SKU of the Redis cache to deploy.
+ *
+ * @param sku the sku value to set.
+ * @return the RedisResourceInner object itself.
+ */
+ public RedisResourceInner withSku(Sku sku) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RedisPropertiesInner();
+ }
+ this.innerProperties().withSku(sku);
+ return this;
+ }
+
+ /**
+ * Get the subnetId property: The full resource ID of a subnet in a virtual network to deploy the Redis cache in.
+ * Example format:
+ * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1.
+ *
+ * @return the subnetId value.
+ */
+ public String subnetId() {
+ return this.innerProperties() == null ? null : this.innerProperties().subnetId();
+ }
+
+ /**
+ * Set the subnetId property: The full resource ID of a subnet in a virtual network to deploy the Redis cache in.
+ * Example format:
+ * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1.
+ *
+ * @param subnetId the subnetId value to set.
+ * @return the RedisResourceInner object itself.
+ */
+ public RedisResourceInner withSubnetId(String subnetId) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RedisPropertiesInner();
+ }
+ this.innerProperties().withSubnetId(subnetId);
+ return this;
+ }
+
+ /**
+ * Get the staticIp property: Static IP address. Optionally, may be specified when deploying a Redis cache inside an
+ * existing Azure Virtual Network; auto assigned by default.
+ *
+ * @return the staticIp value.
+ */
+ public String staticIp() {
+ return this.innerProperties() == null ? null : this.innerProperties().staticIp();
+ }
+
+ /**
+ * Set the staticIp property: Static IP address. Optionally, may be specified when deploying a Redis cache inside an
+ * existing Azure Virtual Network; auto assigned by default.
+ *
+ * @param staticIp the staticIp value to set.
+ * @return the RedisResourceInner object itself.
+ */
+ public RedisResourceInner withStaticIp(String staticIp) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RedisPropertiesInner();
+ }
+ this.innerProperties().withStaticIp(staticIp);
+ return this;
+ }
+
+ /**
+ * Get the redisConfiguration property: All Redis Settings. Few possible keys:
+ * rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value
+ * etc.
+ *
+ * @return the redisConfiguration value.
+ */
+ public RedisCommonPropertiesRedisConfiguration redisConfiguration() {
+ return this.innerProperties() == null ? null : this.innerProperties().redisConfiguration();
+ }
+
+ /**
+ * Set the redisConfiguration property: All Redis Settings. Few possible keys:
+ * rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value
+ * etc.
+ *
+ * @param redisConfiguration the redisConfiguration value to set.
+ * @return the RedisResourceInner object itself.
+ */
+ public RedisResourceInner withRedisConfiguration(RedisCommonPropertiesRedisConfiguration redisConfiguration) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RedisPropertiesInner();
+ }
+ this.innerProperties().withRedisConfiguration(redisConfiguration);
+ return this;
+ }
+
+ /**
+ * Get the redisVersion property: Redis version. Only major version will be used in PUT/PATCH request with current
+ * valid values: (4, 6).
+ *
+ * @return the redisVersion value.
+ */
+ public String redisVersion() {
+ return this.innerProperties() == null ? null : this.innerProperties().redisVersion();
+ }
+
+ /**
+ * Set the redisVersion property: Redis version. Only major version will be used in PUT/PATCH request with current
+ * valid values: (4, 6).
+ *
+ * @param redisVersion the redisVersion value to set.
+ * @return the RedisResourceInner object itself.
+ */
+ public RedisResourceInner withRedisVersion(String redisVersion) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RedisPropertiesInner();
+ }
+ this.innerProperties().withRedisVersion(redisVersion);
+ return this;
+ }
+
+ /**
+ * Get the enableNonSslPort property: Specifies whether the non-ssl Redis server port (6379) is enabled.
+ *
+ * @return the enableNonSslPort value.
+ */
+ public Boolean enableNonSslPort() {
+ return this.innerProperties() == null ? null : this.innerProperties().enableNonSslPort();
+ }
+
+ /**
+ * Set the enableNonSslPort property: Specifies whether the non-ssl Redis server port (6379) is enabled.
+ *
+ * @param enableNonSslPort the enableNonSslPort value to set.
+ * @return the RedisResourceInner object itself.
+ */
+ public RedisResourceInner withEnableNonSslPort(Boolean enableNonSslPort) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RedisPropertiesInner();
+ }
+ this.innerProperties().withEnableNonSslPort(enableNonSslPort);
+ return this;
+ }
+
+ /**
+ * Get the replicasPerMaster property: The number of replicas to be created per primary.
+ *
+ * @return the replicasPerMaster value.
+ */
+ public Integer replicasPerMaster() {
+ return this.innerProperties() == null ? null : this.innerProperties().replicasPerMaster();
+ }
+
+ /**
+ * Set the replicasPerMaster property: The number of replicas to be created per primary.
+ *
+ * @param replicasPerMaster the replicasPerMaster value to set.
+ * @return the RedisResourceInner object itself.
+ */
+ public RedisResourceInner withReplicasPerMaster(Integer replicasPerMaster) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RedisPropertiesInner();
+ }
+ this.innerProperties().withReplicasPerMaster(replicasPerMaster);
+ return this;
+ }
+
+ /**
+ * Get the replicasPerPrimary property: The number of replicas to be created per primary.
+ *
+ * @return the replicasPerPrimary value.
+ */
+ public Integer replicasPerPrimary() {
+ return this.innerProperties() == null ? null : this.innerProperties().replicasPerPrimary();
+ }
+
+ /**
+ * Set the replicasPerPrimary property: The number of replicas to be created per primary.
+ *
+ * @param replicasPerPrimary the replicasPerPrimary value to set.
+ * @return the RedisResourceInner object itself.
+ */
+ public RedisResourceInner withReplicasPerPrimary(Integer replicasPerPrimary) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RedisPropertiesInner();
+ }
+ this.innerProperties().withReplicasPerPrimary(replicasPerPrimary);
+ return this;
+ }
+
+ /**
+ * Get the tenantSettings property: A dictionary of tenant settings.
+ *
+ * @return the tenantSettings value.
+ */
+ public Map tenantSettings() {
+ return this.innerProperties() == null ? null : this.innerProperties().tenantSettings();
+ }
+
+ /**
+ * Set the tenantSettings property: A dictionary of tenant settings.
+ *
+ * @param tenantSettings the tenantSettings value to set.
+ * @return the RedisResourceInner object itself.
+ */
+ public RedisResourceInner withTenantSettings(Map tenantSettings) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RedisPropertiesInner();
+ }
+ this.innerProperties().withTenantSettings(tenantSettings);
+ return this;
+ }
+
+ /**
+ * Get the shardCount property: The number of shards to be created on a Premium Cluster Cache.
+ *
+ * @return the shardCount value.
+ */
+ public Integer shardCount() {
+ return this.innerProperties() == null ? null : this.innerProperties().shardCount();
+ }
+
+ /**
+ * Set the shardCount property: The number of shards to be created on a Premium Cluster Cache.
+ *
+ * @param shardCount the shardCount value to set.
+ * @return the RedisResourceInner object itself.
+ */
+ public RedisResourceInner withShardCount(Integer shardCount) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RedisPropertiesInner();
+ }
+ this.innerProperties().withShardCount(shardCount);
+ return this;
+ }
+
+ /**
+ * Get the minimumTlsVersion property: Optional: requires clients to use a specified TLS version (or higher) to
+ * connect (e,g, '1.0', '1.1', '1.2').
+ *
+ * @return the minimumTlsVersion value.
+ */
+ public TlsVersion minimumTlsVersion() {
+ return this.innerProperties() == null ? null : this.innerProperties().minimumTlsVersion();
+ }
+
+ /**
+ * Set the minimumTlsVersion property: Optional: requires clients to use a specified TLS version (or higher) to
+ * connect (e,g, '1.0', '1.1', '1.2').
+ *
+ * @param minimumTlsVersion the minimumTlsVersion value to set.
+ * @return the RedisResourceInner object itself.
+ */
+ public RedisResourceInner withMinimumTlsVersion(TlsVersion minimumTlsVersion) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RedisPropertiesInner();
+ }
+ this.innerProperties().withMinimumTlsVersion(minimumTlsVersion);
+ return this;
+ }
+
+ /**
+ * Get the publicNetworkAccess property: Whether or not public endpoint access is allowed for this cache. Value is
+ * optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive
+ * access method. Default value is 'Enabled'.
+ *
+ * @return the publicNetworkAccess value.
+ */
+ public PublicNetworkAccess publicNetworkAccess() {
+ return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess();
+ }
+
+ /**
+ * Set the publicNetworkAccess property: Whether or not public endpoint access is allowed for this cache. Value is
+ * optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive
+ * access method. Default value is 'Enabled'.
+ *
+ * @param publicNetworkAccess the publicNetworkAccess value to set.
+ * @return the RedisResourceInner object itself.
+ */
+ public RedisResourceInner withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RedisPropertiesInner();
+ }
+ this.innerProperties().withPublicNetworkAccess(publicNetworkAccess);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property innerProperties in model RedisResourceInner"));
+ } else {
+ innerProperties().validate();
+ }
+ if (identity() != null) {
+ identity().validate();
+ }
+ }
+}
diff --git a/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/RedisUpdateProperties.java b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/RedisUpdateProperties.java
new file mode 100644
index 0000000000000..09c2bdb98cd67
--- /dev/null
+++ b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/RedisUpdateProperties.java
@@ -0,0 +1,124 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redis.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.redis.generated.models.PublicNetworkAccess;
+import com.azure.resourcemanager.redis.generated.models.RedisCommonProperties;
+import com.azure.resourcemanager.redis.generated.models.RedisCommonPropertiesRedisConfiguration;
+import com.azure.resourcemanager.redis.generated.models.Sku;
+import com.azure.resourcemanager.redis.generated.models.TlsVersion;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** Patchable properties of the redis cache. */
+@Fluent
+public final class RedisUpdateProperties extends RedisCommonProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(RedisUpdateProperties.class);
+
+ /*
+ * The SKU of the Redis cache to deploy.
+ */
+ @JsonProperty(value = "sku")
+ private Sku sku;
+
+ /**
+ * Get the sku property: The SKU of the Redis cache to deploy.
+ *
+ * @return the sku value.
+ */
+ public Sku sku() {
+ return this.sku;
+ }
+
+ /**
+ * Set the sku property: The SKU of the Redis cache to deploy.
+ *
+ * @param sku the sku value to set.
+ * @return the RedisUpdateProperties object itself.
+ */
+ public RedisUpdateProperties withSku(Sku sku) {
+ this.sku = sku;
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public RedisUpdateProperties withRedisConfiguration(RedisCommonPropertiesRedisConfiguration redisConfiguration) {
+ super.withRedisConfiguration(redisConfiguration);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public RedisUpdateProperties withRedisVersion(String redisVersion) {
+ super.withRedisVersion(redisVersion);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public RedisUpdateProperties withEnableNonSslPort(Boolean enableNonSslPort) {
+ super.withEnableNonSslPort(enableNonSslPort);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public RedisUpdateProperties withReplicasPerMaster(Integer replicasPerMaster) {
+ super.withReplicasPerMaster(replicasPerMaster);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public RedisUpdateProperties withReplicasPerPrimary(Integer replicasPerPrimary) {
+ super.withReplicasPerPrimary(replicasPerPrimary);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public RedisUpdateProperties withTenantSettings(Map tenantSettings) {
+ super.withTenantSettings(tenantSettings);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public RedisUpdateProperties withShardCount(Integer shardCount) {
+ super.withShardCount(shardCount);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public RedisUpdateProperties withMinimumTlsVersion(TlsVersion minimumTlsVersion) {
+ super.withMinimumTlsVersion(minimumTlsVersion);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public RedisUpdateProperties withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) {
+ super.withPublicNetworkAccess(publicNetworkAccess);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ @Override
+ public void validate() {
+ super.validate();
+ if (sku() != null) {
+ sku().validate();
+ }
+ }
+}
diff --git a/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/ScheduleEntries.java b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/ScheduleEntries.java
new file mode 100644
index 0000000000000..6dc0a48eb3d20
--- /dev/null
+++ b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/ScheduleEntries.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.redis.generated.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.redis.generated.models.ScheduleEntry;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** List of patch schedules for a Redis cache. */
+@Fluent
+public final class ScheduleEntries {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ScheduleEntries.class);
+
+ /*
+ * List of patch schedules for a Redis cache.
+ */
+ @JsonProperty(value = "scheduleEntries", required = true)
+ private List scheduleEntries;
+
+ /**
+ * Get the scheduleEntries property: List of patch schedules for a Redis cache.
+ *
+ * @return the scheduleEntries value.
+ */
+ public List scheduleEntries() {
+ return this.scheduleEntries;
+ }
+
+ /**
+ * Set the scheduleEntries property: List of patch schedules for a Redis cache.
+ *
+ * @param scheduleEntries the scheduleEntries value to set.
+ * @return the ScheduleEntries object itself.
+ */
+ public ScheduleEntries withScheduleEntries(List scheduleEntries) {
+ this.scheduleEntries = scheduleEntries;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (scheduleEntries() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property scheduleEntries in model ScheduleEntries"));
+ } else {
+ scheduleEntries().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/UpgradeNotificationInner.java b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/UpgradeNotificationInner.java
new file mode 100644
index 0000000000000..bcffdfe3d71ce
--- /dev/null
+++ b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/UpgradeNotificationInner.java
@@ -0,0 +1,73 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redis.generated.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.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import java.util.Map;
+
+/** Properties of upgrade notification. */
+@Immutable
+public final class UpgradeNotificationInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(UpgradeNotificationInner.class);
+
+ /*
+ * Name of upgrade notification.
+ */
+ @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
+ private String name;
+
+ /*
+ * Timestamp when upgrade notification occurred.
+ */
+ @JsonProperty(value = "timestamp", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime timestamp;
+
+ /*
+ * Details about this upgrade notification
+ */
+ @JsonProperty(value = "upsellNotification", access = JsonProperty.Access.WRITE_ONLY)
+ @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
+ private Map upsellNotification;
+
+ /**
+ * Get the name property: Name of upgrade notification.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the timestamp property: Timestamp when upgrade notification occurred.
+ *
+ * @return the timestamp value.
+ */
+ public OffsetDateTime timestamp() {
+ return this.timestamp;
+ }
+
+ /**
+ * Get the upsellNotification property: Details about this upgrade notification.
+ *
+ * @return the upsellNotification value.
+ */
+ public Map upsellNotification() {
+ return this.upsellNotification;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/package-info.java b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/package-info.java
new file mode 100644
index 0000000000000..4244ca85ab12a
--- /dev/null
+++ b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/models/package-info.java
@@ -0,0 +1,6 @@
+// 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 RedisManagementClient. REST API for Azure Redis Cache Service. */
+package com.azure.resourcemanager.redis.generated.fluent.models;
diff --git a/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/package-info.java b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/package-info.java
new file mode 100644
index 0000000000000..8f343e378949f
--- /dev/null
+++ b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/fluent/package-info.java
@@ -0,0 +1,6 @@
+// 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 RedisManagementClient. REST API for Azure Redis Cache Service. */
+package com.azure.resourcemanager.redis.generated.fluent;
diff --git a/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/implementation/FirewallRulesClientImpl.java b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/implementation/FirewallRulesClientImpl.java
new file mode 100644
index 0000000000000..c5c7d63613e41
--- /dev/null
+++ b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/implementation/FirewallRulesClientImpl.java
@@ -0,0 +1,896 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redis.generated.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.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.redis.generated.fluent.FirewallRulesClient;
+import com.azure.resourcemanager.redis.generated.fluent.models.RedisFirewallRuleInner;
+import com.azure.resourcemanager.redis.generated.models.RedisFirewallRuleListResult;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in FirewallRulesClient. */
+public final class FirewallRulesClientImpl implements FirewallRulesClient {
+ private final ClientLogger logger = new ClientLogger(FirewallRulesClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final FirewallRulesService service;
+
+ /** The service client containing this operation class. */
+ private final RedisManagementClientImpl client;
+
+ /**
+ * Initializes an instance of FirewallRulesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ FirewallRulesClientImpl(RedisManagementClientImpl client) {
+ this.service =
+ RestProxy.create(FirewallRulesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for RedisManagementClientFirewallRules to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "RedisManagementClien")
+ private interface FirewallRulesService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis"
+ + "/{cacheName}/firewallRules")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("cacheName") String cacheName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis"
+ + "/{cacheName}/firewallRules/{ruleName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("cacheName") String cacheName,
+ @PathParam("ruleName") String ruleName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @BodyParam("application/json") RedisFirewallRuleInner parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis"
+ + "/{cacheName}/firewallRules/{ruleName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("cacheName") String cacheName,
+ @PathParam("ruleName") String ruleName,
+ @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/redis"
+ + "/{cacheName}/firewallRules/{ruleName}")
+ @ExpectedResponses({200, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("cacheName") String cacheName,
+ @PathParam("ruleName") String ruleName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @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);
+ }
+
+ /**
+ * Gets all firewall rules in the specified redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 firewall rules in the specified redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String resourceGroupName, String cacheName) {
+ 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 (cacheName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter cacheName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ cacheName,
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets all firewall rules in the specified redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @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 firewall rules in the specified redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String resourceGroupName, String cacheName, 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 (cacheName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter cacheName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ cacheName,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Gets all firewall rules in the specified redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 firewall rules in the specified redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceGroupName, String cacheName) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceGroupName, cacheName), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Gets all firewall rules in the specified redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @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 firewall rules in the specified redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceGroupName, String cacheName, Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceGroupName, cacheName, context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Gets all firewall rules in the specified redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 firewall rules in the specified redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String cacheName) {
+ return new PagedIterable<>(listAsync(resourceGroupName, cacheName));
+ }
+
+ /**
+ * Gets all firewall rules in the specified redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @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 firewall rules in the specified redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String cacheName, Context context) {
+ return new PagedIterable<>(listAsync(resourceGroupName, cacheName, context));
+ }
+
+ /**
+ * Create or update a redis cache firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @param ruleName The name of the firewall rule.
+ * @param parameters Parameters supplied to the create or update redis firewall rule 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 firewall rule on a redis cache has a name, and describes a contiguous range of IP addresses permitted
+ * to connect.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(
+ String resourceGroupName, String cacheName, String ruleName, RedisFirewallRuleInner 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 (cacheName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter cacheName is required and cannot be null."));
+ }
+ if (ruleName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter ruleName 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
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ cacheName,
+ ruleName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ parameters,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Create or update a redis cache firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @param ruleName The name of the firewall rule.
+ * @param parameters Parameters supplied to the create or update redis firewall rule 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 a firewall rule on a redis cache has a name, and describes a contiguous range of IP addresses permitted
+ * to connect.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(
+ String resourceGroupName,
+ String cacheName,
+ String ruleName,
+ RedisFirewallRuleInner 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 (cacheName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter cacheName is required and cannot be null."));
+ }
+ if (ruleName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter ruleName 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
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ cacheName,
+ ruleName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ parameters,
+ accept,
+ context);
+ }
+
+ /**
+ * Create or update a redis cache firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @param ruleName The name of the firewall rule.
+ * @param parameters Parameters supplied to the create or update redis firewall rule 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 firewall rule on a redis cache has a name, and describes a contiguous range of IP addresses permitted
+ * to connect.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName, String cacheName, String ruleName, RedisFirewallRuleInner parameters) {
+ return createOrUpdateWithResponseAsync(resourceGroupName, cacheName, ruleName, parameters)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Create or update a redis cache firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @param ruleName The name of the firewall rule.
+ * @param parameters Parameters supplied to the create or update redis firewall rule 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 firewall rule on a redis cache has a name, and describes a contiguous range of IP addresses permitted
+ * to connect.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public RedisFirewallRuleInner createOrUpdate(
+ String resourceGroupName, String cacheName, String ruleName, RedisFirewallRuleInner parameters) {
+ return createOrUpdateAsync(resourceGroupName, cacheName, ruleName, parameters).block();
+ }
+
+ /**
+ * Create or update a redis cache firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @param ruleName The name of the firewall rule.
+ * @param parameters Parameters supplied to the create or update redis firewall rule 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 a firewall rule on a redis cache has a name, and describes a contiguous range of IP addresses permitted
+ * to connect.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response createOrUpdateWithResponse(
+ String resourceGroupName,
+ String cacheName,
+ String ruleName,
+ RedisFirewallRuleInner parameters,
+ Context context) {
+ return createOrUpdateWithResponseAsync(resourceGroupName, cacheName, ruleName, parameters, context).block();
+ }
+
+ /**
+ * Gets a single firewall rule in a specified redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @param ruleName The name of the firewall rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 single firewall rule in a specified redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String cacheName, String ruleName) {
+ 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 (cacheName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter cacheName is required and cannot be null."));
+ }
+ if (ruleName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter ruleName 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,
+ cacheName,
+ ruleName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets a single firewall rule in a specified redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @param ruleName The name of the firewall rule.
+ * @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 single firewall rule in a specified redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String cacheName, String ruleName, 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 (cacheName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter cacheName is required and cannot be null."));
+ }
+ if (ruleName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter ruleName 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,
+ cacheName,
+ ruleName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context);
+ }
+
+ /**
+ * Gets a single firewall rule in a specified redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @param ruleName The name of the firewall rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 single firewall rule in a specified redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceGroupName, String cacheName, String ruleName) {
+ return getWithResponseAsync(resourceGroupName, cacheName, ruleName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Gets a single firewall rule in a specified redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @param ruleName The name of the firewall rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 single firewall rule in a specified redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public RedisFirewallRuleInner get(String resourceGroupName, String cacheName, String ruleName) {
+ return getAsync(resourceGroupName, cacheName, ruleName).block();
+ }
+
+ /**
+ * Gets a single firewall rule in a specified redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @param ruleName The name of the firewall rule.
+ * @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 single firewall rule in a specified redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String resourceGroupName, String cacheName, String ruleName, Context context) {
+ return getWithResponseAsync(resourceGroupName, cacheName, ruleName, context).block();
+ }
+
+ /**
+ * Deletes a single firewall rule in a specified redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @param ruleName The name of the firewall rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 cacheName, String ruleName) {
+ 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 (cacheName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter cacheName is required and cannot be null."));
+ }
+ if (ruleName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter ruleName 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,
+ cacheName,
+ ruleName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Deletes a single firewall rule in a specified redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @param ruleName The name of the firewall rule.
+ * @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 cacheName, String ruleName, 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 (cacheName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter cacheName is required and cannot be null."));
+ }
+ if (ruleName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter ruleName 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,
+ cacheName,
+ ruleName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context);
+ }
+
+ /**
+ * Deletes a single firewall rule in a specified redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @param ruleName The name of the firewall rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 cacheName, String ruleName) {
+ return deleteWithResponseAsync(resourceGroupName, cacheName, ruleName)
+ .flatMap((Response res) -> Mono.empty());
+ }
+
+ /**
+ * Deletes a single firewall rule in a specified redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @param ruleName The name of the firewall rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 cacheName, String ruleName) {
+ deleteAsync(resourceGroupName, cacheName, ruleName).block();
+ }
+
+ /**
+ * Deletes a single firewall rule in a specified redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @param ruleName The name of the firewall rule.
+ * @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 cacheName, String ruleName, Context context) {
+ return deleteWithResponseAsync(resourceGroupName, cacheName, ruleName, 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 list firewall rules Redis operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of list firewall rules Redis operation.
+ */
+ @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/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/implementation/FirewallRulesImpl.java b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/implementation/FirewallRulesImpl.java
new file mode 100644
index 0000000000000..d307fadc03325
--- /dev/null
+++ b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/implementation/FirewallRulesImpl.java
@@ -0,0 +1,113 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redis.generated.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.redis.generated.fluent.FirewallRulesClient;
+import com.azure.resourcemanager.redis.generated.fluent.models.RedisFirewallRuleInner;
+import com.azure.resourcemanager.redis.generated.models.FirewallRules;
+import com.azure.resourcemanager.redis.generated.models.RedisFirewallRule;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class FirewallRulesImpl implements FirewallRules {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(FirewallRulesImpl.class);
+
+ private final FirewallRulesClient innerClient;
+
+ private final com.azure.resourcemanager.redis.generated.RedisManager serviceManager;
+
+ public FirewallRulesImpl(
+ FirewallRulesClient innerClient, com.azure.resourcemanager.redis.generated.RedisManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list(String resourceGroupName, String cacheName) {
+ PagedIterable inner = this.serviceClient().list(resourceGroupName, cacheName);
+ return Utils.mapPage(inner, inner1 -> new RedisFirewallRuleImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(String resourceGroupName, String cacheName, Context context) {
+ PagedIterable inner = this.serviceClient().list(resourceGroupName, cacheName, context);
+ return Utils.mapPage(inner, inner1 -> new RedisFirewallRuleImpl(inner1, this.manager()));
+ }
+
+ public RedisFirewallRule createOrUpdate(
+ String resourceGroupName, String cacheName, String ruleName, RedisFirewallRuleInner parameters) {
+ RedisFirewallRuleInner inner =
+ this.serviceClient().createOrUpdate(resourceGroupName, cacheName, ruleName, parameters);
+ if (inner != null) {
+ return new RedisFirewallRuleImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response createOrUpdateWithResponse(
+ String resourceGroupName,
+ String cacheName,
+ String ruleName,
+ RedisFirewallRuleInner parameters,
+ Context context) {
+ Response inner =
+ this
+ .serviceClient()
+ .createOrUpdateWithResponse(resourceGroupName, cacheName, ruleName, parameters, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new RedisFirewallRuleImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public RedisFirewallRule get(String resourceGroupName, String cacheName, String ruleName) {
+ RedisFirewallRuleInner inner = this.serviceClient().get(resourceGroupName, cacheName, ruleName);
+ if (inner != null) {
+ return new RedisFirewallRuleImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(
+ String resourceGroupName, String cacheName, String ruleName, Context context) {
+ Response inner =
+ this.serviceClient().getWithResponse(resourceGroupName, cacheName, ruleName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new RedisFirewallRuleImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public void delete(String resourceGroupName, String cacheName, String ruleName) {
+ this.serviceClient().delete(resourceGroupName, cacheName, ruleName);
+ }
+
+ public Response deleteWithResponse(
+ String resourceGroupName, String cacheName, String ruleName, Context context) {
+ return this.serviceClient().deleteWithResponse(resourceGroupName, cacheName, ruleName, context);
+ }
+
+ private FirewallRulesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.redis.generated.RedisManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/implementation/LinkedServersClientImpl.java b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/implementation/LinkedServersClientImpl.java
new file mode 100644
index 0000000000000..e33ac518b55f0
--- /dev/null
+++ b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/implementation/LinkedServersClientImpl.java
@@ -0,0 +1,1038 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redis.generated.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.redis.generated.fluent.LinkedServersClient;
+import com.azure.resourcemanager.redis.generated.fluent.models.RedisLinkedServerWithPropertiesInner;
+import com.azure.resourcemanager.redis.generated.models.RedisLinkedServerCreateParameters;
+import com.azure.resourcemanager.redis.generated.models.RedisLinkedServerWithPropertiesList;
+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 LinkedServersClient. */
+public final class LinkedServersClientImpl implements LinkedServersClient {
+ private final ClientLogger logger = new ClientLogger(LinkedServersClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final LinkedServersService service;
+
+ /** The service client containing this operation class. */
+ private final RedisManagementClientImpl client;
+
+ /**
+ * Initializes an instance of LinkedServersClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ LinkedServersClientImpl(RedisManagementClientImpl client) {
+ this.service =
+ RestProxy.create(LinkedServersService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for RedisManagementClientLinkedServers to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "RedisManagementClien")
+ private interface LinkedServersService {
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}"
+ + "/linkedServers/{linkedServerName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> create(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("name") String name,
+ @PathParam("linkedServerName") String linkedServerName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @BodyParam("application/json") RedisLinkedServerCreateParameters parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}"
+ + "/linkedServers/{linkedServerName}")
+ @ExpectedResponses({200, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("name") String name,
+ @PathParam("linkedServerName") String linkedServerName,
+ @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/redis/{name}"
+ + "/linkedServers/{linkedServerName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("name") String name,
+ @PathParam("linkedServerName") String linkedServerName,
+ @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/redis/{name}"
+ + "/linkedServers")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("name") String name,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @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);
+ }
+
+ /**
+ * Adds a linked server to the Redis cache (requires Premium SKU).
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @param linkedServerName The name of the linked server that is being added to the Redis cache.
+ * @param parameters Parameters supplied to the Create Linked server 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 response to put/get linked server (with properties) for Redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(
+ String resourceGroupName, String name, String linkedServerName, RedisLinkedServerCreateParameters 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 (name == null) {
+ return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null."));
+ }
+ if (linkedServerName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter linkedServerName 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,
+ name,
+ linkedServerName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ parameters,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Adds a linked server to the Redis cache (requires Premium SKU).
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @param linkedServerName The name of the linked server that is being added to the Redis cache.
+ * @param parameters Parameters supplied to the Create Linked server 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 response to put/get linked server (with properties) for Redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(
+ String resourceGroupName,
+ String name,
+ String linkedServerName,
+ RedisLinkedServerCreateParameters 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 (name == null) {
+ return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null."));
+ }
+ if (linkedServerName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter linkedServerName 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,
+ name,
+ linkedServerName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ parameters,
+ accept,
+ context);
+ }
+
+ /**
+ * Adds a linked server to the Redis cache (requires Premium SKU).
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @param linkedServerName The name of the linked server that is being added to the Redis cache.
+ * @param parameters Parameters supplied to the Create Linked server 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 response to put/get linked server (with properties) for Redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, RedisLinkedServerWithPropertiesInner>
+ beginCreateAsync(
+ String resourceGroupName,
+ String name,
+ String linkedServerName,
+ RedisLinkedServerCreateParameters parameters) {
+ Mono>> mono =
+ createWithResponseAsync(resourceGroupName, name, linkedServerName, parameters);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ RedisLinkedServerWithPropertiesInner.class,
+ RedisLinkedServerWithPropertiesInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Adds a linked server to the Redis cache (requires Premium SKU).
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @param linkedServerName The name of the linked server that is being added to the Redis cache.
+ * @param parameters Parameters supplied to the Create Linked server 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 response to put/get linked server (with properties) for Redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, RedisLinkedServerWithPropertiesInner>
+ beginCreateAsync(
+ String resourceGroupName,
+ String name,
+ String linkedServerName,
+ RedisLinkedServerCreateParameters parameters,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ createWithResponseAsync(resourceGroupName, name, linkedServerName, parameters, context);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ RedisLinkedServerWithPropertiesInner.class,
+ RedisLinkedServerWithPropertiesInner.class,
+ context);
+ }
+
+ /**
+ * Adds a linked server to the Redis cache (requires Premium SKU).
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @param linkedServerName The name of the linked server that is being added to the Redis cache.
+ * @param parameters Parameters supplied to the Create Linked server 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 response to put/get linked server (with properties) for Redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, RedisLinkedServerWithPropertiesInner>
+ beginCreate(
+ String resourceGroupName,
+ String name,
+ String linkedServerName,
+ RedisLinkedServerCreateParameters parameters) {
+ return beginCreateAsync(resourceGroupName, name, linkedServerName, parameters).getSyncPoller();
+ }
+
+ /**
+ * Adds a linked server to the Redis cache (requires Premium SKU).
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @param linkedServerName The name of the linked server that is being added to the Redis cache.
+ * @param parameters Parameters supplied to the Create Linked server 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 response to put/get linked server (with properties) for Redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, RedisLinkedServerWithPropertiesInner>
+ beginCreate(
+ String resourceGroupName,
+ String name,
+ String linkedServerName,
+ RedisLinkedServerCreateParameters parameters,
+ Context context) {
+ return beginCreateAsync(resourceGroupName, name, linkedServerName, parameters, context).getSyncPoller();
+ }
+
+ /**
+ * Adds a linked server to the Redis cache (requires Premium SKU).
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @param linkedServerName The name of the linked server that is being added to the Redis cache.
+ * @param parameters Parameters supplied to the Create Linked server 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 response to put/get linked server (with properties) for Redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(
+ String resourceGroupName, String name, String linkedServerName, RedisLinkedServerCreateParameters parameters) {
+ return beginCreateAsync(resourceGroupName, name, linkedServerName, parameters)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Adds a linked server to the Redis cache (requires Premium SKU).
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @param linkedServerName The name of the linked server that is being added to the Redis cache.
+ * @param parameters Parameters supplied to the Create Linked server 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 response to put/get linked server (with properties) for Redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(
+ String resourceGroupName,
+ String name,
+ String linkedServerName,
+ RedisLinkedServerCreateParameters parameters,
+ Context context) {
+ return beginCreateAsync(resourceGroupName, name, linkedServerName, parameters, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Adds a linked server to the Redis cache (requires Premium SKU).
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @param linkedServerName The name of the linked server that is being added to the Redis cache.
+ * @param parameters Parameters supplied to the Create Linked server 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 response to put/get linked server (with properties) for Redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public RedisLinkedServerWithPropertiesInner create(
+ String resourceGroupName, String name, String linkedServerName, RedisLinkedServerCreateParameters parameters) {
+ return createAsync(resourceGroupName, name, linkedServerName, parameters).block();
+ }
+
+ /**
+ * Adds a linked server to the Redis cache (requires Premium SKU).
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @param linkedServerName The name of the linked server that is being added to the Redis cache.
+ * @param parameters Parameters supplied to the Create Linked server 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 response to put/get linked server (with properties) for Redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public RedisLinkedServerWithPropertiesInner create(
+ String resourceGroupName,
+ String name,
+ String linkedServerName,
+ RedisLinkedServerCreateParameters parameters,
+ Context context) {
+ return createAsync(resourceGroupName, name, linkedServerName, parameters, context).block();
+ }
+
+ /**
+ * Deletes the linked server from a redis cache (requires Premium SKU).
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the redis cache.
+ * @param linkedServerName The name of the linked server that is being added to the Redis cache.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 name, String linkedServerName) {
+ 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 (name == null) {
+ return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null."));
+ }
+ if (linkedServerName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter linkedServerName 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,
+ name,
+ linkedServerName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Deletes the linked server from a redis cache (requires Premium SKU).
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the redis cache.
+ * @param linkedServerName The name of the linked server that is being added to the Redis cache.
+ * @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 name, String linkedServerName, 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 (name == null) {
+ return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null."));
+ }
+ if (linkedServerName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter linkedServerName 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,
+ name,
+ linkedServerName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context);
+ }
+
+ /**
+ * Deletes the linked server from a redis cache (requires Premium SKU).
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the redis cache.
+ * @param linkedServerName The name of the linked server that is being added to the Redis cache.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 name, String linkedServerName) {
+ return deleteWithResponseAsync(resourceGroupName, name, linkedServerName)
+ .flatMap((Response res) -> Mono.empty());
+ }
+
+ /**
+ * Deletes the linked server from a redis cache (requires Premium SKU).
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the redis cache.
+ * @param linkedServerName The name of the linked server that is being added to the Redis cache.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 name, String linkedServerName) {
+ deleteAsync(resourceGroupName, name, linkedServerName).block();
+ }
+
+ /**
+ * Deletes the linked server from a redis cache (requires Premium SKU).
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the redis cache.
+ * @param linkedServerName The name of the linked server that is being added to the Redis cache.
+ * @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 name, String linkedServerName, Context context) {
+ return deleteWithResponseAsync(resourceGroupName, name, linkedServerName, context).block();
+ }
+
+ /**
+ * Gets the detailed information about a linked server of a redis cache (requires Premium SKU).
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the redis cache.
+ * @param linkedServerName The name of the linked server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 detailed information about a linked server of a redis cache (requires Premium SKU).
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String name, String linkedServerName) {
+ 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 (name == null) {
+ return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null."));
+ }
+ if (linkedServerName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter linkedServerName 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,
+ name,
+ linkedServerName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets the detailed information about a linked server of a redis cache (requires Premium SKU).
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the redis cache.
+ * @param linkedServerName The name of the linked server.
+ * @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 detailed information about a linked server of a redis cache (requires Premium SKU).
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String name, String linkedServerName, 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 (name == null) {
+ return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null."));
+ }
+ if (linkedServerName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter linkedServerName 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,
+ name,
+ linkedServerName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context);
+ }
+
+ /**
+ * Gets the detailed information about a linked server of a redis cache (requires Premium SKU).
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the redis cache.
+ * @param linkedServerName The name of the linked server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 detailed information about a linked server of a redis cache (requires Premium SKU).
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(
+ String resourceGroupName, String name, String linkedServerName) {
+ return getWithResponseAsync(resourceGroupName, name, linkedServerName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Gets the detailed information about a linked server of a redis cache (requires Premium SKU).
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the redis cache.
+ * @param linkedServerName The name of the linked server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 detailed information about a linked server of a redis cache (requires Premium SKU).
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public RedisLinkedServerWithPropertiesInner get(String resourceGroupName, String name, String linkedServerName) {
+ return getAsync(resourceGroupName, name, linkedServerName).block();
+ }
+
+ /**
+ * Gets the detailed information about a linked server of a redis cache (requires Premium SKU).
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the redis cache.
+ * @param linkedServerName The name of the linked server.
+ * @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 detailed information about a linked server of a redis cache (requires Premium SKU).
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String resourceGroupName, String name, String linkedServerName, Context context) {
+ return getWithResponseAsync(resourceGroupName, name, linkedServerName, context).block();
+ }
+
+ /**
+ * Gets the list of linked servers associated with this redis cache (requires Premium SKU).
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the redis cache.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 list of linked servers associated with this redis cache (requires Premium SKU).
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String resourceGroupName, String name) {
+ 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 (name == null) {
+ return Mono.error(new IllegalArgumentException("Parameter name 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,
+ name,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets the list of linked servers associated with this redis cache (requires Premium SKU).
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the redis cache.
+ * @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 list of linked servers associated with this redis cache (requires Premium SKU).
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String resourceGroupName, String name, 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 (name == null) {
+ return Mono.error(new IllegalArgumentException("Parameter name 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,
+ name,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Gets the list of linked servers associated with this redis cache (requires Premium SKU).
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the redis cache.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 list of linked servers associated with this redis cache (requires Premium SKU).
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceGroupName, String name) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceGroupName, name), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Gets the list of linked servers associated with this redis cache (requires Premium SKU).
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the redis cache.
+ * @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 list of linked servers associated with this redis cache (requires Premium SKU).
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(
+ String resourceGroupName, String name, Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceGroupName, name, context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Gets the list of linked servers associated with this redis cache (requires Premium SKU).
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the redis cache.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 list of linked servers associated with this redis cache (requires Premium SKU).
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String name) {
+ return new PagedIterable<>(listAsync(resourceGroupName, name));
+ }
+
+ /**
+ * Gets the list of linked servers associated with this redis cache (requires Premium SKU).
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the redis cache.
+ * @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 list of linked servers associated with this redis cache (requires Premium SKU).
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(
+ String resourceGroupName, String name, Context context) {
+ return new PagedIterable<>(listAsync(resourceGroupName, name, context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of linked servers (with properties) of a Redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of linked servers (with properties) of a Redis cache.
+ */
+ @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/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/implementation/LinkedServersImpl.java b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/implementation/LinkedServersImpl.java
new file mode 100644
index 0000000000000..feed41768b917
--- /dev/null
+++ b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/implementation/LinkedServersImpl.java
@@ -0,0 +1,191 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redis.generated.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.redis.generated.fluent.LinkedServersClient;
+import com.azure.resourcemanager.redis.generated.fluent.models.RedisLinkedServerWithPropertiesInner;
+import com.azure.resourcemanager.redis.generated.models.LinkedServers;
+import com.azure.resourcemanager.redis.generated.models.RedisLinkedServerWithProperties;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class LinkedServersImpl implements LinkedServers {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(LinkedServersImpl.class);
+
+ private final LinkedServersClient innerClient;
+
+ private final com.azure.resourcemanager.redis.generated.RedisManager serviceManager;
+
+ public LinkedServersImpl(
+ LinkedServersClient innerClient, com.azure.resourcemanager.redis.generated.RedisManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public void delete(String resourceGroupName, String name, String linkedServerName) {
+ this.serviceClient().delete(resourceGroupName, name, linkedServerName);
+ }
+
+ public Response deleteWithResponse(
+ String resourceGroupName, String name, String linkedServerName, Context context) {
+ return this.serviceClient().deleteWithResponse(resourceGroupName, name, linkedServerName, context);
+ }
+
+ public RedisLinkedServerWithProperties get(String resourceGroupName, String name, String linkedServerName) {
+ RedisLinkedServerWithPropertiesInner inner =
+ this.serviceClient().get(resourceGroupName, name, linkedServerName);
+ if (inner != null) {
+ return new RedisLinkedServerWithPropertiesImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(
+ String resourceGroupName, String name, String linkedServerName, Context context) {
+ Response inner =
+ this.serviceClient().getWithResponse(resourceGroupName, name, linkedServerName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new RedisLinkedServerWithPropertiesImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public PagedIterable list(String resourceGroupName, String name) {
+ PagedIterable inner = this.serviceClient().list(resourceGroupName, name);
+ return Utils.mapPage(inner, inner1 -> new RedisLinkedServerWithPropertiesImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(String resourceGroupName, String name, Context context) {
+ PagedIterable inner =
+ this.serviceClient().list(resourceGroupName, name, context);
+ return Utils.mapPage(inner, inner1 -> new RedisLinkedServerWithPropertiesImpl(inner1, this.manager()));
+ }
+
+ public RedisLinkedServerWithProperties 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 name = Utils.getValueFromIdByName(id, "redis");
+ if (name == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'redis'.", id)));
+ }
+ String linkedServerName = Utils.getValueFromIdByName(id, "linkedServers");
+ if (linkedServerName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'linkedServers'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, name, linkedServerName, 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 name = Utils.getValueFromIdByName(id, "redis");
+ if (name == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'redis'.", id)));
+ }
+ String linkedServerName = Utils.getValueFromIdByName(id, "linkedServers");
+ if (linkedServerName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'linkedServers'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, name, linkedServerName, 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 name = Utils.getValueFromIdByName(id, "redis");
+ if (name == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'redis'.", id)));
+ }
+ String linkedServerName = Utils.getValueFromIdByName(id, "linkedServers");
+ if (linkedServerName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'linkedServers'.", id)));
+ }
+ this.deleteWithResponse(resourceGroupName, name, linkedServerName, Context.NONE);
+ }
+
+ 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 name = Utils.getValueFromIdByName(id, "redis");
+ if (name == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'redis'.", id)));
+ }
+ String linkedServerName = Utils.getValueFromIdByName(id, "linkedServers");
+ if (linkedServerName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'linkedServers'.", id)));
+ }
+ return this.deleteWithResponse(resourceGroupName, name, linkedServerName, context);
+ }
+
+ private LinkedServersClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.redis.generated.RedisManager manager() {
+ return this.serviceManager;
+ }
+
+ public RedisLinkedServerWithPropertiesImpl define(String name) {
+ return new RedisLinkedServerWithPropertiesImpl(name, this.manager());
+ }
+}
diff --git a/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/implementation/OperationImpl.java b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/implementation/OperationImpl.java
new file mode 100644
index 0000000000000..4077bc2daab45
--- /dev/null
+++ b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/implementation/OperationImpl.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.redis.generated.implementation;
+
+import com.azure.resourcemanager.redis.generated.fluent.models.OperationInner;
+import com.azure.resourcemanager.redis.generated.models.Operation;
+import com.azure.resourcemanager.redis.generated.models.OperationDisplay;
+
+public final class OperationImpl implements Operation {
+ private OperationInner innerObject;
+
+ private final com.azure.resourcemanager.redis.generated.RedisManager serviceManager;
+
+ OperationImpl(OperationInner innerObject, com.azure.resourcemanager.redis.generated.RedisManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public OperationDisplay display() {
+ return this.innerModel().display();
+ }
+
+ public OperationInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.redis.generated.RedisManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/implementation/OperationsClientImpl.java b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/implementation/OperationsClientImpl.java
new file mode 100644
index 0000000000000..fc23723016ae3
--- /dev/null
+++ b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/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.redis.generated.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.redis.generated.fluent.OperationsClient;
+import com.azure.resourcemanager.redis.generated.fluent.models.OperationInner;
+import com.azure.resourcemanager.redis.generated.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 RedisManagementClientImpl client;
+
+ /**
+ * Initializes an instance of OperationsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ OperationsClientImpl(RedisManagementClientImpl client) {
+ this.service =
+ RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for RedisManagementClientOperations to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "RedisManagementClien")
+ 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 result of the request to list REST API operations.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync() {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * 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 result of the request to list REST API operations.
+ */
+ @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 result of the request to list REST API operations.
+ */
+ @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 result of the request to list REST API operations.
+ */
+ @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 result of the request to list REST API operations.
+ */
+ @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 result of the request to list REST API operations.
+ */
+ @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 result of the request to list REST API operations.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of the request to list REST API operations.
+ */
+ @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/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/implementation/OperationsImpl.java b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/implementation/OperationsImpl.java
new file mode 100644
index 0000000000000..c59477f803ff4
--- /dev/null
+++ b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/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.redis.generated.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.redis.generated.fluent.OperationsClient;
+import com.azure.resourcemanager.redis.generated.fluent.models.OperationInner;
+import com.azure.resourcemanager.redis.generated.models.Operation;
+import com.azure.resourcemanager.redis.generated.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 com.azure.resourcemanager.redis.generated.RedisManager serviceManager;
+
+ public OperationsImpl(
+ OperationsClient innerClient, com.azure.resourcemanager.redis.generated.RedisManager 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 com.azure.resourcemanager.redis.generated.RedisManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/implementation/PatchSchedulesClientImpl.java b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/implementation/PatchSchedulesClientImpl.java
new file mode 100644
index 0000000000000..0460d55bd42ad
--- /dev/null
+++ b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/implementation/PatchSchedulesClientImpl.java
@@ -0,0 +1,905 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redis.generated.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.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.redis.generated.fluent.PatchSchedulesClient;
+import com.azure.resourcemanager.redis.generated.fluent.models.RedisPatchScheduleInner;
+import com.azure.resourcemanager.redis.generated.models.DefaultName;
+import com.azure.resourcemanager.redis.generated.models.RedisPatchScheduleListResult;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in PatchSchedulesClient. */
+public final class PatchSchedulesClientImpl implements PatchSchedulesClient {
+ private final ClientLogger logger = new ClientLogger(PatchSchedulesClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final PatchSchedulesService service;
+
+ /** The service client containing this operation class. */
+ private final RedisManagementClientImpl client;
+
+ /**
+ * Initializes an instance of PatchSchedulesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ PatchSchedulesClientImpl(RedisManagementClientImpl client) {
+ this.service =
+ RestProxy.create(PatchSchedulesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for RedisManagementClientPatchSchedules to be used by the proxy service
+ * to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "RedisManagementClien")
+ private interface PatchSchedulesService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis"
+ + "/{cacheName}/patchSchedules")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByRedisResource(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("cacheName") String cacheName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}"
+ + "/patchSchedules/{default}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("name") String name,
+ @PathParam("default") DefaultName defaultParameter,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @BodyParam("application/json") RedisPatchScheduleInner parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}"
+ + "/patchSchedules/{default}")
+ @ExpectedResponses({200, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("name") String name,
+ @PathParam("default") DefaultName defaultParameter,
+ @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/redis/{name}"
+ + "/patchSchedules/{default}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("name") String name,
+ @PathParam("default") DefaultName defaultParameter,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByRedisResourceNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Gets all patch schedules in the specified redis cache (there is only one).
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 patch schedules in the specified redis cache (there is only one).
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByRedisResourceSinglePageAsync(
+ String resourceGroupName, String cacheName) {
+ 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 (cacheName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter cacheName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listByRedisResource(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ cacheName,
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets all patch schedules in the specified redis cache (there is only one).
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @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 patch schedules in the specified redis cache (there is only one).
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByRedisResourceSinglePageAsync(
+ String resourceGroupName, String cacheName, 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 (cacheName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter cacheName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByRedisResource(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ cacheName,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Gets all patch schedules in the specified redis cache (there is only one).
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 patch schedules in the specified redis cache (there is only one).
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByRedisResourceAsync(String resourceGroupName, String cacheName) {
+ return new PagedFlux<>(
+ () -> listByRedisResourceSinglePageAsync(resourceGroupName, cacheName),
+ nextLink -> listByRedisResourceNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Gets all patch schedules in the specified redis cache (there is only one).
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @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 patch schedules in the specified redis cache (there is only one).
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByRedisResourceAsync(
+ String resourceGroupName, String cacheName, Context context) {
+ return new PagedFlux<>(
+ () -> listByRedisResourceSinglePageAsync(resourceGroupName, cacheName, context),
+ nextLink -> listByRedisResourceNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Gets all patch schedules in the specified redis cache (there is only one).
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 patch schedules in the specified redis cache (there is only one).
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByRedisResource(String resourceGroupName, String cacheName) {
+ return new PagedIterable<>(listByRedisResourceAsync(resourceGroupName, cacheName));
+ }
+
+ /**
+ * Gets all patch schedules in the specified redis cache (there is only one).
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @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 patch schedules in the specified redis cache (there is only one).
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByRedisResource(
+ String resourceGroupName, String cacheName, Context context) {
+ return new PagedIterable<>(listByRedisResourceAsync(resourceGroupName, cacheName, context));
+ }
+
+ /**
+ * Create or replace the patching schedule for Redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @param defaultParameter Default string modeled as parameter for auto generation to work correctly.
+ * @param parameters Parameters to set the patching schedule for Redis cache.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return response to put/get patch schedules for Redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(
+ String resourceGroupName, String name, DefaultName defaultParameter, RedisPatchScheduleInner 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 (name == null) {
+ return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null."));
+ }
+ if (defaultParameter == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter defaultParameter 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
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ name,
+ defaultParameter,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ parameters,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Create or replace the patching schedule for Redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @param defaultParameter Default string modeled as parameter for auto generation to work correctly.
+ * @param parameters Parameters to set the patching schedule for Redis cache.
+ * @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 response to put/get patch schedules for Redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(
+ String resourceGroupName,
+ String name,
+ DefaultName defaultParameter,
+ RedisPatchScheduleInner 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 (name == null) {
+ return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null."));
+ }
+ if (defaultParameter == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter defaultParameter 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
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ name,
+ defaultParameter,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ parameters,
+ accept,
+ context);
+ }
+
+ /**
+ * Create or replace the patching schedule for Redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @param defaultParameter Default string modeled as parameter for auto generation to work correctly.
+ * @param parameters Parameters to set the patching schedule for Redis cache.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return response to put/get patch schedules for Redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName, String name, DefaultName defaultParameter, RedisPatchScheduleInner parameters) {
+ return createOrUpdateWithResponseAsync(resourceGroupName, name, defaultParameter, parameters)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Create or replace the patching schedule for Redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @param defaultParameter Default string modeled as parameter for auto generation to work correctly.
+ * @param parameters Parameters to set the patching schedule for Redis cache.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return response to put/get patch schedules for Redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public RedisPatchScheduleInner createOrUpdate(
+ String resourceGroupName, String name, DefaultName defaultParameter, RedisPatchScheduleInner parameters) {
+ return createOrUpdateAsync(resourceGroupName, name, defaultParameter, parameters).block();
+ }
+
+ /**
+ * Create or replace the patching schedule for Redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the Redis cache.
+ * @param defaultParameter Default string modeled as parameter for auto generation to work correctly.
+ * @param parameters Parameters to set the patching schedule for Redis cache.
+ * @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 response to put/get patch schedules for Redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response createOrUpdateWithResponse(
+ String resourceGroupName,
+ String name,
+ DefaultName defaultParameter,
+ RedisPatchScheduleInner parameters,
+ Context context) {
+ return createOrUpdateWithResponseAsync(resourceGroupName, name, defaultParameter, parameters, context).block();
+ }
+
+ /**
+ * Deletes the patching schedule of a redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the redis cache.
+ * @param defaultParameter Default string modeled as parameter for auto generation to work correctly.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 name, DefaultName defaultParameter) {
+ 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 (name == null) {
+ return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null."));
+ }
+ if (defaultParameter == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter defaultParameter 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,
+ name,
+ defaultParameter,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Deletes the patching schedule of a redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the redis cache.
+ * @param defaultParameter Default string modeled as parameter for auto generation to work correctly.
+ * @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 name, DefaultName defaultParameter, 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 (name == null) {
+ return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null."));
+ }
+ if (defaultParameter == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter defaultParameter 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,
+ name,
+ defaultParameter,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context);
+ }
+
+ /**
+ * Deletes the patching schedule of a redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the redis cache.
+ * @param defaultParameter Default string modeled as parameter for auto generation to work correctly.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 name, DefaultName defaultParameter) {
+ return deleteWithResponseAsync(resourceGroupName, name, defaultParameter)
+ .flatMap((Response res) -> Mono.empty());
+ }
+
+ /**
+ * Deletes the patching schedule of a redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the redis cache.
+ * @param defaultParameter Default string modeled as parameter for auto generation to work correctly.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 name, DefaultName defaultParameter) {
+ deleteAsync(resourceGroupName, name, defaultParameter).block();
+ }
+
+ /**
+ * Deletes the patching schedule of a redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the redis cache.
+ * @param defaultParameter Default string modeled as parameter for auto generation to work correctly.
+ * @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 name, DefaultName defaultParameter, Context context) {
+ return deleteWithResponseAsync(resourceGroupName, name, defaultParameter, context).block();
+ }
+
+ /**
+ * Gets the patching schedule of a redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the redis cache.
+ * @param defaultParameter Default string modeled as parameter for auto generation to work correctly.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 patching schedule of a redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String name, DefaultName defaultParameter) {
+ 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 (name == null) {
+ return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null."));
+ }
+ if (defaultParameter == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter defaultParameter 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,
+ name,
+ defaultParameter,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets the patching schedule of a redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the redis cache.
+ * @param defaultParameter Default string modeled as parameter for auto generation to work correctly.
+ * @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 patching schedule of a redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String name, DefaultName defaultParameter, 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 (name == null) {
+ return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null."));
+ }
+ if (defaultParameter == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter defaultParameter 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,
+ name,
+ defaultParameter,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context);
+ }
+
+ /**
+ * Gets the patching schedule of a redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the redis cache.
+ * @param defaultParameter Default string modeled as parameter for auto generation to work correctly.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 patching schedule of a redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(
+ String resourceGroupName, String name, DefaultName defaultParameter) {
+ return getWithResponseAsync(resourceGroupName, name, defaultParameter)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Gets the patching schedule of a redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the redis cache.
+ * @param defaultParameter Default string modeled as parameter for auto generation to work correctly.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 patching schedule of a redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public RedisPatchScheduleInner get(String resourceGroupName, String name, DefaultName defaultParameter) {
+ return getAsync(resourceGroupName, name, defaultParameter).block();
+ }
+
+ /**
+ * Gets the patching schedule of a redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the redis cache.
+ * @param defaultParameter Default string modeled as parameter for auto generation to work correctly.
+ * @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 patching schedule of a redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String resourceGroupName, String name, DefaultName defaultParameter, Context context) {
+ return getWithResponseAsync(resourceGroupName, name, defaultParameter, 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 list patch schedules Redis operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByRedisResourceNextSinglePageAsync(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.listByRedisResourceNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of list patch schedules Redis operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByRedisResourceNextSinglePageAsync(
+ 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
+ .listByRedisResourceNext(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/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/implementation/PatchSchedulesImpl.java b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/implementation/PatchSchedulesImpl.java
new file mode 100644
index 0000000000000..5dcb24a06986b
--- /dev/null
+++ b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/implementation/PatchSchedulesImpl.java
@@ -0,0 +1,197 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redis.generated.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.redis.generated.fluent.PatchSchedulesClient;
+import com.azure.resourcemanager.redis.generated.fluent.models.RedisPatchScheduleInner;
+import com.azure.resourcemanager.redis.generated.models.DefaultName;
+import com.azure.resourcemanager.redis.generated.models.PatchSchedules;
+import com.azure.resourcemanager.redis.generated.models.RedisPatchSchedule;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class PatchSchedulesImpl implements PatchSchedules {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(PatchSchedulesImpl.class);
+
+ private final PatchSchedulesClient innerClient;
+
+ private final com.azure.resourcemanager.redis.generated.RedisManager serviceManager;
+
+ public PatchSchedulesImpl(
+ PatchSchedulesClient innerClient, com.azure.resourcemanager.redis.generated.RedisManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable listByRedisResource(String resourceGroupName, String cacheName) {
+ PagedIterable inner =
+ this.serviceClient().listByRedisResource(resourceGroupName, cacheName);
+ return Utils.mapPage(inner, inner1 -> new RedisPatchScheduleImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByRedisResource(
+ String resourceGroupName, String cacheName, Context context) {
+ PagedIterable inner =
+ this.serviceClient().listByRedisResource(resourceGroupName, cacheName, context);
+ return Utils.mapPage(inner, inner1 -> new RedisPatchScheduleImpl(inner1, this.manager()));
+ }
+
+ public void delete(String resourceGroupName, String name, DefaultName defaultParameter) {
+ this.serviceClient().delete(resourceGroupName, name, defaultParameter);
+ }
+
+ public Response deleteWithResponse(
+ String resourceGroupName, String name, DefaultName defaultParameter, Context context) {
+ return this.serviceClient().deleteWithResponse(resourceGroupName, name, defaultParameter, context);
+ }
+
+ public RedisPatchSchedule get(String resourceGroupName, String name, DefaultName defaultParameter) {
+ RedisPatchScheduleInner inner = this.serviceClient().get(resourceGroupName, name, defaultParameter);
+ if (inner != null) {
+ return new RedisPatchScheduleImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(
+ String resourceGroupName, String name, DefaultName defaultParameter, Context context) {
+ Response inner =
+ this.serviceClient().getWithResponse(resourceGroupName, name, defaultParameter, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new RedisPatchScheduleImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public RedisPatchSchedule 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 name = Utils.getValueFromIdByName(id, "redis");
+ if (name == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'redis'.", id)));
+ }
+ DefaultName defaultParameter = DefaultName.fromString(Utils.getValueFromIdByName(id, "patchSchedules"));
+ if (defaultParameter == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'patchSchedules'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, name, defaultParameter, 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 name = Utils.getValueFromIdByName(id, "redis");
+ if (name == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'redis'.", id)));
+ }
+ DefaultName defaultParameter = DefaultName.fromString(Utils.getValueFromIdByName(id, "patchSchedules"));
+ if (defaultParameter == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'patchSchedules'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, name, defaultParameter, 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 name = Utils.getValueFromIdByName(id, "redis");
+ if (name == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'redis'.", id)));
+ }
+ DefaultName defaultParameter = DefaultName.fromString(Utils.getValueFromIdByName(id, "patchSchedules"));
+ if (defaultParameter == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'patchSchedules'.", id)));
+ }
+ this.deleteWithResponse(resourceGroupName, name, defaultParameter, Context.NONE);
+ }
+
+ 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 name = Utils.getValueFromIdByName(id, "redis");
+ if (name == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'redis'.", id)));
+ }
+ DefaultName defaultParameter = DefaultName.fromString(Utils.getValueFromIdByName(id, "patchSchedules"));
+ if (defaultParameter == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'patchSchedules'.", id)));
+ }
+ return this.deleteWithResponse(resourceGroupName, name, defaultParameter, context);
+ }
+
+ private PatchSchedulesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.redis.generated.RedisManager manager() {
+ return this.serviceManager;
+ }
+
+ public RedisPatchScheduleImpl define(DefaultName name) {
+ return new RedisPatchScheduleImpl(name, this.manager());
+ }
+}
diff --git a/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/implementation/PrivateEndpointConnectionImpl.java b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/implementation/PrivateEndpointConnectionImpl.java
new file mode 100644
index 0000000000000..a8024fe82c846
--- /dev/null
+++ b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/implementation/PrivateEndpointConnectionImpl.java
@@ -0,0 +1,150 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redis.generated.implementation;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.redis.generated.fluent.models.PrivateEndpointConnectionInner;
+import com.azure.resourcemanager.redis.generated.models.PrivateEndpoint;
+import com.azure.resourcemanager.redis.generated.models.PrivateEndpointConnection;
+import com.azure.resourcemanager.redis.generated.models.PrivateEndpointConnectionProvisioningState;
+import com.azure.resourcemanager.redis.generated.models.PrivateLinkServiceConnectionState;
+
+public final class PrivateEndpointConnectionImpl
+ implements PrivateEndpointConnection, PrivateEndpointConnection.Definition, PrivateEndpointConnection.Update {
+ private PrivateEndpointConnectionInner innerObject;
+
+ private final com.azure.resourcemanager.redis.generated.RedisManager 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 com.azure.resourcemanager.redis.generated.RedisManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String cacheName;
+
+ private String privateEndpointConnectionName;
+
+ public PrivateEndpointConnectionImpl withExistingRedi(String resourceGroupName, String cacheName) {
+ this.resourceGroupName = resourceGroupName;
+ this.cacheName = cacheName;
+ return this;
+ }
+
+ public PrivateEndpointConnection create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getPrivateEndpointConnections()
+ .put(resourceGroupName, cacheName, privateEndpointConnectionName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public PrivateEndpointConnection create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getPrivateEndpointConnections()
+ .put(resourceGroupName, cacheName, privateEndpointConnectionName, this.innerModel(), context);
+ return this;
+ }
+
+ PrivateEndpointConnectionImpl(String name, com.azure.resourcemanager.redis.generated.RedisManager 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, cacheName, privateEndpointConnectionName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public PrivateEndpointConnection apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getPrivateEndpointConnections()
+ .put(resourceGroupName, cacheName, privateEndpointConnectionName, this.innerModel(), context);
+ return this;
+ }
+
+ PrivateEndpointConnectionImpl(
+ PrivateEndpointConnectionInner innerObject,
+ com.azure.resourcemanager.redis.generated.RedisManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.cacheName = Utils.getValueFromIdByName(innerObject.id(), "redis");
+ this.privateEndpointConnectionName = Utils.getValueFromIdByName(innerObject.id(), "privateEndpointConnections");
+ }
+
+ public PrivateEndpointConnection refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getPrivateEndpointConnections()
+ .getWithResponse(resourceGroupName, cacheName, privateEndpointConnectionName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public PrivateEndpointConnection refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getPrivateEndpointConnections()
+ .getWithResponse(resourceGroupName, cacheName, 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/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/implementation/PrivateEndpointConnectionsClientImpl.java
new file mode 100644
index 0000000000000..580d5c90dd987
--- /dev/null
+++ b/sdk/redis/azure-resourcemanager-redis-generated/src/main/java/com/azure/resourcemanager/redis/generated/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.redis.generated.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.redis.generated.fluent.PrivateEndpointConnectionsClient;
+import com.azure.resourcemanager.redis.generated.fluent.models.PrivateEndpointConnectionInner;
+import com.azure.resourcemanager.redis.generated.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 RedisManagementClientImpl client;
+
+ /**
+ * Initializes an instance of PrivateEndpointConnectionsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ PrivateEndpointConnectionsClientImpl(RedisManagementClientImpl client) {
+ this.service =
+ RestProxy
+ .create(
+ PrivateEndpointConnectionsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for RedisManagementClientPrivateEndpointConnections to be used by the
+ * proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "RedisManagementClien")
+ private interface PrivateEndpointConnectionsService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis"
+ + "/{cacheName}/privateEndpointConnections")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("cacheName") String cacheName,
+ @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/redis"
+ + "/{cacheName}/privateEndpointConnections/{privateEndpointConnectionName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("cacheName") String cacheName,
+ @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/redis"
+ + "/{cacheName}/privateEndpointConnections/{privateEndpointConnectionName}")
+ @ExpectedResponses({201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> put(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("cacheName") String cacheName,
+ @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/redis"
+ + "/{cacheName}/privateEndpointConnections/{privateEndpointConnectionName}")
+ @ExpectedResponses({200, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("cacheName") String cacheName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * List all the private endpoint connections associated with the redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 cacheName) {
+ 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 (cacheName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter cacheName 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,
+ cacheName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * List all the private endpoint connections associated with the redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @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 cacheName, 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 (cacheName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter cacheName 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,
+ cacheName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null));
+ }
+
+ /**
+ * List all the private endpoint connections associated with the redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 cacheName) {
+ return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, cacheName));
+ }
+
+ /**
+ * List all the private endpoint connections associated with the redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @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 cacheName, Context context) {
+ return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, cacheName, context));
+ }
+
+ /**
+ * List all the private endpoint connections associated with the redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 cacheName) {
+ return new PagedIterable<>(listAsync(resourceGroupName, cacheName));
+ }
+
+ /**
+ * List all the private endpoint connections associated with the redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @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 cacheName, Context context) {
+ return new PagedIterable<>(listAsync(resourceGroupName, cacheName, context));
+ }
+
+ /**
+ * Gets the specified private endpoint connection associated with the redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @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 redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String cacheName, 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 (cacheName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter cacheName 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,
+ cacheName,
+ privateEndpointConnectionName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets the specified private endpoint connection associated with the redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @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 redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String cacheName, 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 (cacheName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter cacheName 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,
+ cacheName,
+ privateEndpointConnectionName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context);
+ }
+
+ /**
+ * Gets the specified private endpoint connection associated with the redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @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 redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(
+ String resourceGroupName, String cacheName, String privateEndpointConnectionName) {
+ return getWithResponseAsync(resourceGroupName, cacheName, 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 redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @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 redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public PrivateEndpointConnectionInner get(
+ String resourceGroupName, String cacheName, String privateEndpointConnectionName) {
+ return getAsync(resourceGroupName, cacheName, privateEndpointConnectionName).block();
+ }
+
+ /**
+ * Gets the specified private endpoint connection associated with the redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @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 redis cache.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String resourceGroupName, String cacheName, String privateEndpointConnectionName, Context context) {
+ return getWithResponseAsync(resourceGroupName, cacheName, privateEndpointConnectionName, context).block();
+ }
+
+ /**
+ * Update the state of specified private endpoint connection associated with the redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @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 cacheName,
+ 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 (cacheName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter cacheName 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,
+ cacheName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ privateEndpointConnectionName,
+ properties,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Update the state of specified private endpoint connection associated with the redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @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 cacheName,
+ 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 (cacheName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter cacheName 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,
+ cacheName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ privateEndpointConnectionName,
+ properties,
+ accept,
+ context);
+ }
+
+ /**
+ * Update the state of specified private endpoint connection associated with the redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @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.LONG_RUNNING_OPERATION)
+ private PollerFlux, PrivateEndpointConnectionInner> beginPutAsync(
+ String resourceGroupName,
+ String cacheName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner properties) {
+ Mono>> mono =
+ putWithResponseAsync(resourceGroupName, cacheName, privateEndpointConnectionName, properties);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ PrivateEndpointConnectionInner.class,
+ PrivateEndpointConnectionInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Update the state of specified private endpoint connection associated with the redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @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.LONG_RUNNING_OPERATION)
+ private PollerFlux, PrivateEndpointConnectionInner> beginPutAsync(
+ String resourceGroupName,
+ String cacheName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner properties,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ putWithResponseAsync(resourceGroupName, cacheName, privateEndpointConnectionName, properties, context);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ PrivateEndpointConnectionInner.class,
+ PrivateEndpointConnectionInner.class,
+ context);
+ }
+
+ /**
+ * Update the state of specified private endpoint connection associated with the redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @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.LONG_RUNNING_OPERATION)
+ public SyncPoller, PrivateEndpointConnectionInner> beginPut(
+ String resourceGroupName,
+ String cacheName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner properties) {
+ return beginPutAsync(resourceGroupName, cacheName, privateEndpointConnectionName, properties).getSyncPoller();
+ }
+
+ /**
+ * Update the state of specified private endpoint connection associated with the redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @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.LONG_RUNNING_OPERATION)
+ public SyncPoller, PrivateEndpointConnectionInner> beginPut(
+ String resourceGroupName,
+ String cacheName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner properties,
+ Context context) {
+ return beginPutAsync(resourceGroupName, cacheName, privateEndpointConnectionName, properties, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Update the state of specified private endpoint connection associated with the redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @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 cacheName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner properties) {
+ return beginPutAsync(resourceGroupName, cacheName, privateEndpointConnectionName, properties)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Update the state of specified private endpoint connection associated with the redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @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 cacheName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner properties,
+ Context context) {
+ return beginPutAsync(resourceGroupName, cacheName, privateEndpointConnectionName, properties, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Update the state of specified private endpoint connection associated with the redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @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 cacheName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner properties) {
+ return putAsync(resourceGroupName, cacheName, privateEndpointConnectionName, properties).block();
+ }
+
+ /**
+ * Update the state of specified private endpoint connection associated with the redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @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 cacheName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner properties,
+ Context context) {
+ return putAsync(resourceGroupName, cacheName, privateEndpointConnectionName, properties, context).block();
+ }
+
+ /**
+ * Deletes the specified private endpoint connection associated with the redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @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 cacheName, 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 (cacheName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter cacheName 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,
+ cacheName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ privateEndpointConnectionName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Deletes the specified private endpoint connection associated with the redis cache.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param cacheName The name of the Redis cache.
+ * @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