privateEndpointConnections() {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (encryption() != null) {
- encryption().validate();
- }
if (privateEndpointConnections() != null) {
privateEndpointConnections().forEach(e -> e.validate());
}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/DatabaseInner.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/DatabaseInner.java
index e3682443bb98..d4518c87af42 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/DatabaseInner.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/DatabaseInner.java
@@ -6,7 +6,6 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
-import com.azure.core.management.SystemData;
import com.azure.resourcemanager.redisenterprise.models.ClusteringPolicy;
import com.azure.resourcemanager.redisenterprise.models.DatabasePropertiesGeoReplication;
import com.azure.resourcemanager.redisenterprise.models.EvictionPolicy;
@@ -29,12 +28,6 @@ public final class DatabaseInner extends ProxyResource {
@JsonProperty(value = "properties")
private DatabaseProperties innerProperties;
- /*
- * Azure Resource Manager metadata containing createdBy and modifiedBy information.
- */
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
- private SystemData systemData;
-
/** Creates an instance of DatabaseInner class. */
public DatabaseInner() {
}
@@ -50,15 +43,6 @@ private DatabaseProperties innerProperties() {
return this.innerProperties;
}
- /**
- * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
- *
- * @return the systemData value.
- */
- public SystemData systemData() {
- return this.systemData;
- }
-
/**
* Get the clientProtocol property: Specifies whether redis clients can connect using TLS-encrypted or plaintext
* redis protocols. Default is TLS-encrypted.
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/PrivateEndpointConnectionInner.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/PrivateEndpointConnectionInner.java
index af62758cf6ae..fafbd4b3fcd1 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/PrivateEndpointConnectionInner.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/PrivateEndpointConnectionInner.java
@@ -6,7 +6,6 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
-import com.azure.core.management.SystemData;
import com.azure.resourcemanager.redisenterprise.models.PrivateEndpoint;
import com.azure.resourcemanager.redisenterprise.models.PrivateEndpointConnectionProvisioningState;
import com.azure.resourcemanager.redisenterprise.models.PrivateLinkServiceConnectionState;
@@ -21,12 +20,6 @@ public final class PrivateEndpointConnectionInner extends ProxyResource {
@JsonProperty(value = "properties")
private PrivateEndpointConnectionProperties innerProperties;
- /*
- * Azure Resource Manager metadata containing createdBy and modifiedBy information.
- */
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
- private SystemData systemData;
-
/** Creates an instance of PrivateEndpointConnectionInner class. */
public PrivateEndpointConnectionInner() {
}
@@ -40,15 +33,6 @@ private PrivateEndpointConnectionProperties innerProperties() {
return this.innerProperties;
}
- /**
- * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
- *
- * @return the systemData value.
- */
- public SystemData systemData() {
- return this.systemData;
- }
-
/**
* Get the privateEndpoint property: The resource of private end point.
*
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/PrivateLinkResourceInner.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/PrivateLinkResourceInner.java
index e4db579f0bb8..3c02d5b854a0 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/PrivateLinkResourceInner.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/PrivateLinkResourceInner.java
@@ -6,7 +6,6 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
-import com.azure.core.management.SystemData;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
@@ -19,12 +18,6 @@ public final class PrivateLinkResourceInner extends ProxyResource {
@JsonProperty(value = "properties")
private PrivateLinkResourceProperties innerProperties;
- /*
- * Azure Resource Manager metadata containing createdBy and modifiedBy information.
- */
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
- private SystemData systemData;
-
/** Creates an instance of PrivateLinkResourceInner class. */
public PrivateLinkResourceInner() {
}
@@ -38,15 +31,6 @@ private PrivateLinkResourceProperties innerProperties() {
return this.innerProperties;
}
- /**
- * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
- *
- * @return the systemData value.
- */
- public SystemData systemData() {
- return this.systemData;
- }
-
/**
* Get the groupId property: The private link resource group id.
*
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/RegionSkuDetailInner.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/RegionSkuDetailInner.java
deleted file mode 100644
index 4b42bfc2cf4f..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/RegionSkuDetailInner.java
+++ /dev/null
@@ -1,120 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.fluent.models;
-
-import com.azure.core.annotation.Fluent;
-import com.azure.resourcemanager.redisenterprise.models.LocationInfo;
-import com.azure.resourcemanager.redisenterprise.models.SkuDetail;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/**
- * Region Sku Detail
- *
- * Details about the location requested and the available skus in the location.
- */
-@Fluent
-public final class RegionSkuDetailInner {
- /*
- * Resource type which has the SKU, such as Microsoft.Cache/redisEnterprise
- */
- @JsonProperty(value = "resourceType")
- private String resourceType;
-
- /*
- * Details about location and its capabilities
- */
- @JsonProperty(value = "locationInfo")
- private LocationInfo locationInfo;
-
- /*
- * Sku Detail
- *
- * Details about available skus
- */
- @JsonProperty(value = "skuDetails")
- private SkuDetail skuDetails;
-
- /** Creates an instance of RegionSkuDetailInner class. */
- public RegionSkuDetailInner() {
- }
-
- /**
- * Get the resourceType property: Resource type which has the SKU, such as Microsoft.Cache/redisEnterprise.
- *
- * @return the resourceType value.
- */
- public String resourceType() {
- return this.resourceType;
- }
-
- /**
- * Set the resourceType property: Resource type which has the SKU, such as Microsoft.Cache/redisEnterprise.
- *
- * @param resourceType the resourceType value to set.
- * @return the RegionSkuDetailInner object itself.
- */
- public RegionSkuDetailInner withResourceType(String resourceType) {
- this.resourceType = resourceType;
- return this;
- }
-
- /**
- * Get the locationInfo property: Details about location and its capabilities.
- *
- * @return the locationInfo value.
- */
- public LocationInfo locationInfo() {
- return this.locationInfo;
- }
-
- /**
- * Set the locationInfo property: Details about location and its capabilities.
- *
- * @param locationInfo the locationInfo value to set.
- * @return the RegionSkuDetailInner object itself.
- */
- public RegionSkuDetailInner withLocationInfo(LocationInfo locationInfo) {
- this.locationInfo = locationInfo;
- return this;
- }
-
- /**
- * Get the skuDetails property: Sku Detail
- *
- *
Details about available skus.
- *
- * @return the skuDetails value.
- */
- public SkuDetail skuDetails() {
- return this.skuDetails;
- }
-
- /**
- * Set the skuDetails property: Sku Detail
- *
- *
Details about available skus.
- *
- * @param skuDetails the skuDetails value to set.
- * @return the RegionSkuDetailInner object itself.
- */
- public RegionSkuDetailInner withSkuDetails(SkuDetail skuDetails) {
- this.skuDetails = skuDetails;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (locationInfo() != null) {
- locationInfo().validate();
- }
- if (skuDetails() != null) {
- skuDetails().validate();
- }
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/ClusterImpl.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/ClusterImpl.java
index 39e8896e1b34..51a3f6564ff1 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/ClusterImpl.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/ClusterImpl.java
@@ -5,14 +5,11 @@
package com.azure.resourcemanager.redisenterprise.implementation;
import com.azure.core.management.Region;
-import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.redisenterprise.fluent.models.ClusterInner;
import com.azure.resourcemanager.redisenterprise.fluent.models.PrivateEndpointConnectionInner;
import com.azure.resourcemanager.redisenterprise.models.Cluster;
-import com.azure.resourcemanager.redisenterprise.models.ClusterPropertiesEncryption;
import com.azure.resourcemanager.redisenterprise.models.ClusterUpdate;
-import com.azure.resourcemanager.redisenterprise.models.ManagedServiceIdentity;
import com.azure.resourcemanager.redisenterprise.models.PrivateEndpointConnection;
import com.azure.resourcemanager.redisenterprise.models.ProvisioningState;
import com.azure.resourcemanager.redisenterprise.models.ResourceState;
@@ -66,22 +63,10 @@ public List zones() {
}
}
- public ManagedServiceIdentity identity() {
- return this.innerModel().identity();
- }
-
- public SystemData systemData() {
- return this.innerModel().systemData();
- }
-
public TlsVersion minimumTlsVersion() {
return this.innerModel().minimumTlsVersion();
}
- public ClusterPropertiesEncryption encryption() {
- return this.innerModel().encryption();
- }
-
public String hostname() {
return this.innerModel().hostname();
}
@@ -253,16 +238,6 @@ public ClusterImpl withZones(List zones) {
return this;
}
- public ClusterImpl withIdentity(ManagedServiceIdentity identity) {
- if (isInCreateMode()) {
- this.innerModel().withIdentity(identity);
- return this;
- } else {
- this.updateParameters.withIdentity(identity);
- return this;
- }
- }
-
public ClusterImpl withMinimumTlsVersion(TlsVersion minimumTlsVersion) {
if (isInCreateMode()) {
this.innerModel().withMinimumTlsVersion(minimumTlsVersion);
@@ -273,16 +248,6 @@ public ClusterImpl withMinimumTlsVersion(TlsVersion minimumTlsVersion) {
}
}
- public ClusterImpl withEncryption(ClusterPropertiesEncryption encryption) {
- if (isInCreateMode()) {
- this.innerModel().withEncryption(encryption);
- return this;
- } else {
- this.updateParameters.withEncryption(encryption);
- return this;
- }
- }
-
private boolean isInCreateMode() {
return this.innerModel().id() == null;
}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/DatabaseImpl.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/DatabaseImpl.java
index 851a39d700df..fee9fe4c9cdd 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/DatabaseImpl.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/DatabaseImpl.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.redisenterprise.implementation;
import com.azure.core.http.rest.Response;
-import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.redisenterprise.fluent.models.DatabaseInner;
import com.azure.resourcemanager.redisenterprise.models.AccessKeys;
@@ -44,10 +43,6 @@ public String type() {
return this.innerModel().type();
}
- public SystemData systemData() {
- return this.innerModel().systemData();
- }
-
public Protocol clientProtocol() {
return this.innerModel().clientProtocol();
}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/PrivateEndpointConnectionImpl.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/PrivateEndpointConnectionImpl.java
index 120bf562f2ba..2e13c02d6463 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/PrivateEndpointConnectionImpl.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/PrivateEndpointConnectionImpl.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.redisenterprise.implementation;
-import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.redisenterprise.fluent.models.PrivateEndpointConnectionInner;
import com.azure.resourcemanager.redisenterprise.models.PrivateEndpoint;
@@ -30,10 +29,6 @@ public String type() {
return this.innerModel().type();
}
- public SystemData systemData() {
- return this.innerModel().systemData();
- }
-
public PrivateEndpoint privateEndpoint() {
return this.innerModel().privateEndpoint();
}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/PrivateEndpointConnectionsClientImpl.java
index 5acef90ea55b..d30ea43a458a 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/PrivateEndpointConnectionsClientImpl.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/PrivateEndpointConnectionsClientImpl.java
@@ -114,9 +114,9 @@ Mono>> put(
@Headers({"Content-Type: application/json"})
@Delete(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName}")
- @ExpectedResponses({200, 204})
+ @ExpectedResponses({200, 202, 204})
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> delete(
+ Mono>> delete(
@HostParam("$host") String endpoint,
@PathParam("resourceGroupName") String resourceGroupName,
@PathParam("clusterName") String clusterName,
@@ -830,7 +830,7 @@ public PrivateEndpointConnectionInner put(
* @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> deleteWithResponseAsync(
+ private Mono>> deleteWithResponseAsync(
String resourceGroupName, String clusterName, String privateEndpointConnectionName) {
if (this.client.getEndpoint() == null) {
return Mono
@@ -888,7 +888,7 @@ private Mono> deleteWithResponseAsync(
* @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> deleteWithResponseAsync(
+ private Mono>> deleteWithResponseAsync(
String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
@@ -929,6 +929,92 @@ private Mono> deleteWithResponseAsync(
context);
}
+ /**
+ * Deletes the specified private endpoint connection associated with the RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String clusterName, String privateEndpointConnectionName) {
+ Mono>> mono =
+ deleteWithResponseAsync(resourceGroupName, clusterName, privateEndpointConnectionName);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Deletes the specified private endpoint connection associated with the RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ deleteWithResponseAsync(resourceGroupName, clusterName, privateEndpointConnectionName, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Deletes the specified private endpoint connection associated with the RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(
+ String resourceGroupName, String clusterName, String privateEndpointConnectionName) {
+ return this.beginDeleteAsync(resourceGroupName, clusterName, privateEndpointConnectionName).getSyncPoller();
+ }
+
+ /**
+ * Deletes the specified private endpoint connection associated with the RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(
+ String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context) {
+ return this
+ .beginDeleteAsync(resourceGroupName, clusterName, privateEndpointConnectionName, context)
+ .getSyncPoller();
+ }
+
/**
* Deletes the specified private endpoint connection associated with the RedisEnterprise cluster.
*
@@ -943,8 +1029,9 @@ private Mono> deleteWithResponseAsync(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono deleteAsync(String resourceGroupName, String clusterName, String privateEndpointConnectionName) {
- return deleteWithResponseAsync(resourceGroupName, clusterName, privateEndpointConnectionName)
- .flatMap(ignored -> Mono.empty());
+ return beginDeleteAsync(resourceGroupName, clusterName, privateEndpointConnectionName)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
}
/**
@@ -958,12 +1045,14 @@ private Mono deleteAsync(String resourceGroupName, String clusterName, Str
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link Response}.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response deleteWithResponse(
+ private Mono deleteAsync(
String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context) {
- return deleteWithResponseAsync(resourceGroupName, clusterName, privateEndpointConnectionName, context).block();
+ return beginDeleteAsync(resourceGroupName, clusterName, privateEndpointConnectionName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
}
/**
@@ -979,6 +1068,24 @@ public Response deleteWithResponse(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public void delete(String resourceGroupName, String clusterName, String privateEndpointConnectionName) {
- deleteWithResponse(resourceGroupName, clusterName, privateEndpointConnectionName, Context.NONE);
+ deleteAsync(resourceGroupName, clusterName, privateEndpointConnectionName).block();
+ }
+
+ /**
+ * Deletes the specified private endpoint connection associated with the RedisEnterprise cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(
+ String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context) {
+ deleteAsync(resourceGroupName, clusterName, privateEndpointConnectionName, context).block();
}
}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/PrivateEndpointConnectionsImpl.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/PrivateEndpointConnectionsImpl.java
index a34e9a42241d..b7fe42cb73e8 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/PrivateEndpointConnectionsImpl.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/PrivateEndpointConnectionsImpl.java
@@ -68,17 +68,15 @@ public PrivateEndpointConnection get(
}
}
- public Response deleteWithResponse(
- String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context) {
- return this
- .serviceClient()
- .deleteWithResponse(resourceGroupName, clusterName, privateEndpointConnectionName, context);
- }
-
public void delete(String resourceGroupName, String clusterName, String privateEndpointConnectionName) {
this.serviceClient().delete(resourceGroupName, clusterName, privateEndpointConnectionName);
}
+ public void delete(
+ String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context) {
+ this.serviceClient().delete(resourceGroupName, clusterName, privateEndpointConnectionName, context);
+ }
+
public PrivateEndpointConnection getById(String id) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
@@ -168,10 +166,10 @@ public void deleteById(String id) {
"The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.",
id)));
}
- this.deleteWithResponse(resourceGroupName, clusterName, privateEndpointConnectionName, Context.NONE);
+ this.delete(resourceGroupName, clusterName, privateEndpointConnectionName, Context.NONE);
}
- public Response deleteByIdWithResponse(String id, Context context) {
+ public void deleteByIdWithResponse(String id, Context context) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER
@@ -198,7 +196,7 @@ public Response deleteByIdWithResponse(String id, Context context) {
"The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.",
id)));
}
- return this.deleteWithResponse(resourceGroupName, clusterName, privateEndpointConnectionName, context);
+ this.delete(resourceGroupName, clusterName, privateEndpointConnectionName, context);
}
private PrivateEndpointConnectionsClient serviceClient() {
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/PrivateLinkResourceImpl.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/PrivateLinkResourceImpl.java
index 9b943035858f..20f4e9d62591 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/PrivateLinkResourceImpl.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/PrivateLinkResourceImpl.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.redisenterprise.implementation;
-import com.azure.core.management.SystemData;
import com.azure.resourcemanager.redisenterprise.fluent.models.PrivateLinkResourceInner;
import com.azure.resourcemanager.redisenterprise.models.PrivateLinkResource;
import java.util.Collections;
@@ -34,10 +33,6 @@ public String type() {
return this.innerModel().type();
}
- public SystemData systemData() {
- return this.innerModel().systemData();
- }
-
public String groupId() {
return this.innerModel().groupId();
}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/RedisEnterpriseManagementClientImpl.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/RedisEnterpriseManagementClientImpl.java
index bd4aadb26a2e..c73be8d8897e 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/RedisEnterpriseManagementClientImpl.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/RedisEnterpriseManagementClientImpl.java
@@ -29,7 +29,6 @@
import com.azure.resourcemanager.redisenterprise.fluent.PrivateLinkResourcesClient;
import com.azure.resourcemanager.redisenterprise.fluent.RedisEnterpriseManagementClient;
import com.azure.resourcemanager.redisenterprise.fluent.RedisEnterprisesClient;
-import com.azure.resourcemanager.redisenterprise.fluent.SkusClient;
import java.io.IOException;
import java.lang.reflect.Type;
import java.nio.ByteBuffer;
@@ -186,18 +185,6 @@ public PrivateLinkResourcesClient getPrivateLinkResources() {
return this.privateLinkResources;
}
- /** The SkusClient object to access its operations. */
- private final SkusClient skus;
-
- /**
- * Gets the SkusClient object to access its operations.
- *
- * @return the SkusClient object.
- */
- public SkusClient getSkus() {
- return this.skus;
- }
-
/**
* Initializes an instance of RedisEnterpriseManagementClient client.
*
@@ -220,14 +207,13 @@ public SkusClient getSkus() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2023-03-01-preview";
+ this.apiVersion = "2023-07-01";
this.operations = new OperationsClientImpl(this);
this.operationsStatus = new OperationsStatusClientImpl(this);
this.redisEnterprises = new RedisEnterprisesClientImpl(this);
this.databases = new DatabasesClientImpl(this);
this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this);
this.privateLinkResources = new PrivateLinkResourcesClientImpl(this);
- this.skus = new SkusClientImpl(this);
}
/**
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/RegionSkuDetailImpl.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/RegionSkuDetailImpl.java
deleted file mode 100644
index 047d9d2f74e8..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/RegionSkuDetailImpl.java
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.implementation;
-
-import com.azure.resourcemanager.redisenterprise.fluent.models.RegionSkuDetailInner;
-import com.azure.resourcemanager.redisenterprise.models.LocationInfo;
-import com.azure.resourcemanager.redisenterprise.models.RegionSkuDetail;
-import com.azure.resourcemanager.redisenterprise.models.SkuDetail;
-
-public final class RegionSkuDetailImpl implements RegionSkuDetail {
- private RegionSkuDetailInner innerObject;
-
- private final com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager serviceManager;
-
- RegionSkuDetailImpl(
- RegionSkuDetailInner innerObject,
- com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager serviceManager) {
- this.innerObject = innerObject;
- this.serviceManager = serviceManager;
- }
-
- public String resourceType() {
- return this.innerModel().resourceType();
- }
-
- public LocationInfo locationInfo() {
- return this.innerModel().locationInfo();
- }
-
- public SkuDetail skuDetails() {
- return this.innerModel().skuDetails();
- }
-
- public RegionSkuDetailInner innerModel() {
- return this.innerObject;
- }
-
- private com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager manager() {
- return this.serviceManager;
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/SkusClientImpl.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/SkusClientImpl.java
deleted file mode 100644
index 86f6a63c3672..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/SkusClientImpl.java
+++ /dev/null
@@ -1,222 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.implementation;
-
-import com.azure.core.annotation.ExpectedResponses;
-import com.azure.core.annotation.Get;
-import com.azure.core.annotation.HeaderParam;
-import com.azure.core.annotation.Headers;
-import com.azure.core.annotation.Host;
-import com.azure.core.annotation.HostParam;
-import com.azure.core.annotation.PathParam;
-import com.azure.core.annotation.QueryParam;
-import com.azure.core.annotation.ReturnType;
-import com.azure.core.annotation.ServiceInterface;
-import com.azure.core.annotation.ServiceMethod;
-import com.azure.core.annotation.UnexpectedResponseExceptionType;
-import com.azure.core.http.rest.PagedFlux;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.http.rest.PagedResponse;
-import com.azure.core.http.rest.PagedResponseBase;
-import com.azure.core.http.rest.Response;
-import com.azure.core.http.rest.RestProxy;
-import com.azure.core.management.exception.ManagementException;
-import com.azure.core.util.Context;
-import com.azure.core.util.FluxUtil;
-import com.azure.resourcemanager.redisenterprise.fluent.SkusClient;
-import com.azure.resourcemanager.redisenterprise.fluent.models.RegionSkuDetailInner;
-import com.azure.resourcemanager.redisenterprise.models.RegionSkuDetails;
-import reactor.core.publisher.Mono;
-
-/** An instance of this class provides access to all the operations defined in SkusClient. */
-public final class SkusClientImpl implements SkusClient {
- /** The proxy service used to perform REST calls. */
- private final SkusService service;
-
- /** The service client containing this operation class. */
- private final RedisEnterpriseManagementClientImpl client;
-
- /**
- * Initializes an instance of SkusClientImpl.
- *
- * @param client the instance of the service client containing this operation class.
- */
- SkusClientImpl(RedisEnterpriseManagementClientImpl client) {
- this.service = RestProxy.create(SkusService.class, client.getHttpPipeline(), client.getSerializerAdapter());
- this.client = client;
- }
-
- /**
- * The interface defining all the services for RedisEnterpriseManagementClientSkus to be used by the proxy service
- * to perform REST calls.
- */
- @Host("{$host}")
- @ServiceInterface(name = "RedisEnterpriseManag")
- public interface SkusService {
- @Headers({"Content-Type: application/json"})
- @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Cache/locations/{location}/skus")
- @ExpectedResponses({200})
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> list(
- @HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("location") String location,
- @QueryParam("api-version") String apiVersion,
- @HeaderParam("Accept") String accept,
- Context context);
- }
-
- /**
- * Gets information about skus in specified location for the given subscription id.
- *
- * @param location The name of Azure region.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return information about skus in specified location for the given subscription id along with {@link
- * PagedResponse} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync(String location) {
- 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 (location == null) {
- return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(
- context ->
- service
- .list(
- this.client.getEndpoint(),
- this.client.getSubscriptionId(),
- location,
- this.client.getApiVersion(),
- 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()));
- }
-
- /**
- * Gets information about skus in specified location for the given subscription id.
- *
- * @param location The name of Azure region.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return information about skus in specified location for the given subscription id along with {@link
- * PagedResponse} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync(String location, 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 (location == null) {
- return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .list(
- this.client.getEndpoint(),
- this.client.getSubscriptionId(),
- location,
- this.client.getApiVersion(),
- accept,
- context)
- .map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null));
- }
-
- /**
- * Gets information about skus in specified location for the given subscription id.
- *
- * @param location The name of Azure region.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return information about skus in specified location for the given subscription id as paginated response with
- * {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(String location) {
- return new PagedFlux<>(() -> listSinglePageAsync(location));
- }
-
- /**
- * Gets information about skus in specified location for the given subscription id.
- *
- * @param location The name of Azure region.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return information about skus in specified location for the given subscription id as paginated response with
- * {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(String location, Context context) {
- return new PagedFlux<>(() -> listSinglePageAsync(location, context));
- }
-
- /**
- * Gets information about skus in specified location for the given subscription id.
- *
- * @param location The name of Azure region.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return information about skus in specified location for the given subscription id as paginated response with
- * {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable list(String location) {
- return new PagedIterable<>(listAsync(location));
- }
-
- /**
- * Gets information about skus in specified location for the given subscription id.
- *
- * @param location The name of Azure region.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return information about skus in specified location for the given subscription id as paginated response with
- * {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable list(String location, Context context) {
- return new PagedIterable<>(listAsync(location, context));
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/SkusImpl.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/SkusImpl.java
deleted file mode 100644
index ef64fe0143f8..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/SkusImpl.java
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.implementation;
-
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.util.Context;
-import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.redisenterprise.fluent.SkusClient;
-import com.azure.resourcemanager.redisenterprise.fluent.models.RegionSkuDetailInner;
-import com.azure.resourcemanager.redisenterprise.models.RegionSkuDetail;
-import com.azure.resourcemanager.redisenterprise.models.Skus;
-
-public final class SkusImpl implements Skus {
- private static final ClientLogger LOGGER = new ClientLogger(SkusImpl.class);
-
- private final SkusClient innerClient;
-
- private final com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager serviceManager;
-
- public SkusImpl(
- SkusClient innerClient, com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager serviceManager) {
- this.innerClient = innerClient;
- this.serviceManager = serviceManager;
- }
-
- public PagedIterable list(String location) {
- PagedIterable inner = this.serviceClient().list(location);
- return Utils.mapPage(inner, inner1 -> new RegionSkuDetailImpl(inner1, this.manager()));
- }
-
- public PagedIterable list(String location, Context context) {
- PagedIterable inner = this.serviceClient().list(location, context);
- return Utils.mapPage(inner, inner1 -> new RegionSkuDetailImpl(inner1, this.manager()));
- }
-
- private SkusClient serviceClient() {
- return this.innerClient;
- }
-
- private com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager manager() {
- return this.serviceManager;
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/Capability.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/Capability.java
deleted file mode 100644
index 5eeb214d8498..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/Capability.java
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.models;
-
-import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/**
- * Capability
- *
- * Information about the features the location supports.
- */
-@Fluent
-public final class Capability {
- /*
- * Feature name
- */
- @JsonProperty(value = "name")
- private String name;
-
- /*
- * Indicates whether feature is supported or not
- */
- @JsonProperty(value = "value")
- private Boolean value;
-
- /** Creates an instance of Capability class. */
- public Capability() {
- }
-
- /**
- * Get the name property: Feature name.
- *
- * @return the name value.
- */
- public String name() {
- return this.name;
- }
-
- /**
- * Set the name property: Feature name.
- *
- * @param name the name value to set.
- * @return the Capability object itself.
- */
- public Capability withName(String name) {
- this.name = name;
- return this;
- }
-
- /**
- * Get the value property: Indicates whether feature is supported or not.
- *
- * @return the value value.
- */
- public Boolean value() {
- return this.value;
- }
-
- /**
- * Set the value property: Indicates whether feature is supported or not.
- *
- * @param value the value value to set.
- * @return the Capability object itself.
- */
- public Capability withValue(Boolean value) {
- this.value = value;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/Cluster.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/Cluster.java
index 39ac8576d939..a7be2c1ac622 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/Cluster.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/Cluster.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.redisenterprise.models;
import com.azure.core.management.Region;
-import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.redisenterprise.fluent.models.ClusterInner;
import java.util.List;
@@ -62,20 +61,6 @@ public interface Cluster {
*/
List zones();
- /**
- * Gets the identity property: The identity of the resource.
- *
- * @return the identity value.
- */
- ManagedServiceIdentity identity();
-
- /**
- * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
- *
- * @return the systemData value.
- */
- SystemData systemData();
-
/**
* Gets the minimumTlsVersion property: The minimum TLS version for the cluster to support, e.g. '1.2'.
*
@@ -83,13 +68,6 @@ public interface Cluster {
*/
TlsVersion minimumTlsVersion();
- /**
- * Gets the encryption property: Encryption-at-rest configuration for the cluster.
- *
- * @return the encryption value.
- */
- ClusterPropertiesEncryption encryption();
-
/**
* Gets the hostname property: DNS name of the cluster endpoint.
*
@@ -162,11 +140,13 @@ interface Definition
DefinitionStages.WithSku,
DefinitionStages.WithCreate {
}
+
/** The Cluster definition stages. */
interface DefinitionStages {
/** The first stage of the Cluster definition. */
interface Blank extends WithLocation {
}
+
/** The stage of the Cluster definition allowing to specify location. */
interface WithLocation {
/**
@@ -185,6 +165,7 @@ interface WithLocation {
*/
WithResourceGroup withRegion(String location);
}
+
/** The stage of the Cluster definition allowing to specify parent resource. */
interface WithResourceGroup {
/**
@@ -195,6 +176,7 @@ interface WithResourceGroup {
*/
WithSku withExistingResourceGroup(String resourceGroupName);
}
+
/** The stage of the Cluster definition allowing to specify sku. */
interface WithSku {
/**
@@ -205,16 +187,13 @@ interface WithSku {
*/
WithCreate withSku(Sku sku);
}
+
/**
* The stage of the Cluster definition which contains all the minimum required properties for the resource to be
* created, but also allows for any other optional properties to be specified.
*/
interface WithCreate
- extends DefinitionStages.WithTags,
- DefinitionStages.WithZones,
- DefinitionStages.WithIdentity,
- DefinitionStages.WithMinimumTlsVersion,
- DefinitionStages.WithEncryption {
+ extends DefinitionStages.WithTags, DefinitionStages.WithZones, DefinitionStages.WithMinimumTlsVersion {
/**
* Executes the create request.
*
@@ -230,6 +209,7 @@ interface WithCreate
*/
Cluster create(Context context);
}
+
/** The stage of the Cluster definition allowing to specify tags. */
interface WithTags {
/**
@@ -240,6 +220,7 @@ interface WithTags {
*/
WithCreate withTags(Map tags);
}
+
/** The stage of the Cluster definition allowing to specify zones. */
interface WithZones {
/**
@@ -250,16 +231,7 @@ interface WithZones {
*/
WithCreate withZones(List zones);
}
- /** The stage of the Cluster definition allowing to specify identity. */
- interface WithIdentity {
- /**
- * Specifies the identity property: The identity of the resource..
- *
- * @param identity The identity of the resource.
- * @return the next definition stage.
- */
- WithCreate withIdentity(ManagedServiceIdentity identity);
- }
+
/** The stage of the Cluster definition allowing to specify minimumTlsVersion. */
interface WithMinimumTlsVersion {
/**
@@ -270,17 +242,8 @@ interface WithMinimumTlsVersion {
*/
WithCreate withMinimumTlsVersion(TlsVersion minimumTlsVersion);
}
- /** The stage of the Cluster definition allowing to specify encryption. */
- interface WithEncryption {
- /**
- * Specifies the encryption property: Encryption-at-rest configuration for the cluster..
- *
- * @param encryption Encryption-at-rest configuration for the cluster.
- * @return the next definition stage.
- */
- WithCreate withEncryption(ClusterPropertiesEncryption encryption);
- }
}
+
/**
* Begins update for the Cluster resource.
*
@@ -289,12 +252,7 @@ interface WithEncryption {
Cluster.Update update();
/** The template for Cluster update. */
- interface Update
- extends UpdateStages.WithTags,
- UpdateStages.WithSku,
- UpdateStages.WithIdentity,
- UpdateStages.WithMinimumTlsVersion,
- UpdateStages.WithEncryption {
+ interface Update extends UpdateStages.WithTags, UpdateStages.WithSku, UpdateStages.WithMinimumTlsVersion {
/**
* Executes the update request.
*
@@ -310,6 +268,7 @@ interface Update
*/
Cluster apply(Context context);
}
+
/** The Cluster update stages. */
interface UpdateStages {
/** The stage of the Cluster update allowing to specify tags. */
@@ -322,6 +281,7 @@ interface WithTags {
*/
Update withTags(Map tags);
}
+
/** The stage of the Cluster update allowing to specify sku. */
interface WithSku {
/**
@@ -332,16 +292,7 @@ interface WithSku {
*/
Update withSku(Sku sku);
}
- /** The stage of the Cluster update allowing to specify identity. */
- interface WithIdentity {
- /**
- * Specifies the identity property: The identity of the resource..
- *
- * @param identity The identity of the resource.
- * @return the next definition stage.
- */
- Update withIdentity(ManagedServiceIdentity identity);
- }
+
/** The stage of the Cluster update allowing to specify minimumTlsVersion. */
interface WithMinimumTlsVersion {
/**
@@ -352,17 +303,8 @@ interface WithMinimumTlsVersion {
*/
Update withMinimumTlsVersion(TlsVersion minimumTlsVersion);
}
- /** The stage of the Cluster update allowing to specify encryption. */
- interface WithEncryption {
- /**
- * Specifies the encryption property: Encryption-at-rest configuration for the cluster..
- *
- * @param encryption Encryption-at-rest configuration for the cluster.
- * @return the next definition stage.
- */
- Update withEncryption(ClusterPropertiesEncryption encryption);
- }
}
+
/**
* Refreshes the resource to sync with Azure.
*
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/ClusterPropertiesEncryption.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/ClusterPropertiesEncryption.java
deleted file mode 100644
index f2567b4f3802..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/ClusterPropertiesEncryption.java
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.models;
-
-import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/** Encryption-at-rest configuration for the cluster. */
-@Fluent
-public final class ClusterPropertiesEncryption {
- /*
- * All Customer-managed key encryption properties for the resource. Set this to an empty object to use
- * Microsoft-managed key encryption.
- */
- @JsonProperty(value = "customerManagedKeyEncryption")
- private ClusterPropertiesEncryptionCustomerManagedKeyEncryption customerManagedKeyEncryption;
-
- /** Creates an instance of ClusterPropertiesEncryption class. */
- public ClusterPropertiesEncryption() {
- }
-
- /**
- * Get the customerManagedKeyEncryption property: All Customer-managed key encryption properties for the resource.
- * Set this to an empty object to use Microsoft-managed key encryption.
- *
- * @return the customerManagedKeyEncryption value.
- */
- public ClusterPropertiesEncryptionCustomerManagedKeyEncryption customerManagedKeyEncryption() {
- return this.customerManagedKeyEncryption;
- }
-
- /**
- * Set the customerManagedKeyEncryption property: All Customer-managed key encryption properties for the resource.
- * Set this to an empty object to use Microsoft-managed key encryption.
- *
- * @param customerManagedKeyEncryption the customerManagedKeyEncryption value to set.
- * @return the ClusterPropertiesEncryption object itself.
- */
- public ClusterPropertiesEncryption withCustomerManagedKeyEncryption(
- ClusterPropertiesEncryptionCustomerManagedKeyEncryption customerManagedKeyEncryption) {
- this.customerManagedKeyEncryption = customerManagedKeyEncryption;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (customerManagedKeyEncryption() != null) {
- customerManagedKeyEncryption().validate();
- }
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/ClusterPropertiesEncryptionCustomerManagedKeyEncryption.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/ClusterPropertiesEncryptionCustomerManagedKeyEncryption.java
deleted file mode 100644
index 422d57f0fd55..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/ClusterPropertiesEncryptionCustomerManagedKeyEncryption.java
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.models;
-
-import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/**
- * All Customer-managed key encryption properties for the resource. Set this to an empty object to use Microsoft-managed
- * key encryption.
- */
-@Fluent
-public final class ClusterPropertiesEncryptionCustomerManagedKeyEncryption {
- /*
- * All identity configuration for Customer-managed key settings defining which identity should be used to auth to
- * Key Vault.
- */
- @JsonProperty(value = "keyEncryptionKeyIdentity")
- private ClusterPropertiesEncryptionCustomerManagedKeyEncryptionKeyIdentity keyEncryptionKeyIdentity;
-
- /*
- * Key encryption key Url, versioned only. Ex:
- * https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78
- */
- @JsonProperty(value = "keyEncryptionKeyUrl")
- private String keyEncryptionKeyUrl;
-
- /** Creates an instance of ClusterPropertiesEncryptionCustomerManagedKeyEncryption class. */
- public ClusterPropertiesEncryptionCustomerManagedKeyEncryption() {
- }
-
- /**
- * Get the keyEncryptionKeyIdentity property: All identity configuration for Customer-managed key settings defining
- * which identity should be used to auth to Key Vault.
- *
- * @return the keyEncryptionKeyIdentity value.
- */
- public ClusterPropertiesEncryptionCustomerManagedKeyEncryptionKeyIdentity keyEncryptionKeyIdentity() {
- return this.keyEncryptionKeyIdentity;
- }
-
- /**
- * Set the keyEncryptionKeyIdentity property: All identity configuration for Customer-managed key settings defining
- * which identity should be used to auth to Key Vault.
- *
- * @param keyEncryptionKeyIdentity the keyEncryptionKeyIdentity value to set.
- * @return the ClusterPropertiesEncryptionCustomerManagedKeyEncryption object itself.
- */
- public ClusterPropertiesEncryptionCustomerManagedKeyEncryption withKeyEncryptionKeyIdentity(
- ClusterPropertiesEncryptionCustomerManagedKeyEncryptionKeyIdentity keyEncryptionKeyIdentity) {
- this.keyEncryptionKeyIdentity = keyEncryptionKeyIdentity;
- return this;
- }
-
- /**
- * Get the keyEncryptionKeyUrl property: Key encryption key Url, versioned only. Ex:
- * https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78.
- *
- * @return the keyEncryptionKeyUrl value.
- */
- public String keyEncryptionKeyUrl() {
- return this.keyEncryptionKeyUrl;
- }
-
- /**
- * Set the keyEncryptionKeyUrl property: Key encryption key Url, versioned only. Ex:
- * https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78.
- *
- * @param keyEncryptionKeyUrl the keyEncryptionKeyUrl value to set.
- * @return the ClusterPropertiesEncryptionCustomerManagedKeyEncryption object itself.
- */
- public ClusterPropertiesEncryptionCustomerManagedKeyEncryption withKeyEncryptionKeyUrl(String keyEncryptionKeyUrl) {
- this.keyEncryptionKeyUrl = keyEncryptionKeyUrl;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (keyEncryptionKeyIdentity() != null) {
- keyEncryptionKeyIdentity().validate();
- }
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/ClusterPropertiesEncryptionCustomerManagedKeyEncryptionKeyIdentity.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/ClusterPropertiesEncryptionCustomerManagedKeyEncryptionKeyIdentity.java
deleted file mode 100644
index 61305f2c8c00..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/ClusterPropertiesEncryptionCustomerManagedKeyEncryptionKeyIdentity.java
+++ /dev/null
@@ -1,88 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.models;
-
-import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/**
- * All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key
- * Vault.
- */
-@Fluent
-public final class ClusterPropertiesEncryptionCustomerManagedKeyEncryptionKeyIdentity {
- /*
- * User assigned identity to use for accessing key encryption key Url. Ex: /subscriptions//resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId.
- */
- @JsonProperty(value = "userAssignedIdentityResourceId")
- private String userAssignedIdentityResourceId;
-
- /*
- * Only userAssignedIdentity is supported in this API version; other types may be supported in the future
- */
- @JsonProperty(value = "identityType")
- private CmkIdentityType identityType;
-
- /** Creates an instance of ClusterPropertiesEncryptionCustomerManagedKeyEncryptionKeyIdentity class. */
- public ClusterPropertiesEncryptionCustomerManagedKeyEncryptionKeyIdentity() {
- }
-
- /**
- * Get the userAssignedIdentityResourceId property: User assigned identity to use for accessing key encryption key
- * Url. Ex: /subscriptions/<sub uuid>/resourceGroups/<resource
- * group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId.
- *
- * @return the userAssignedIdentityResourceId value.
- */
- public String userAssignedIdentityResourceId() {
- return this.userAssignedIdentityResourceId;
- }
-
- /**
- * Set the userAssignedIdentityResourceId property: User assigned identity to use for accessing key encryption key
- * Url. Ex: /subscriptions/<sub uuid>/resourceGroups/<resource
- * group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId.
- *
- * @param userAssignedIdentityResourceId the userAssignedIdentityResourceId value to set.
- * @return the ClusterPropertiesEncryptionCustomerManagedKeyEncryptionKeyIdentity object itself.
- */
- public ClusterPropertiesEncryptionCustomerManagedKeyEncryptionKeyIdentity withUserAssignedIdentityResourceId(
- String userAssignedIdentityResourceId) {
- this.userAssignedIdentityResourceId = userAssignedIdentityResourceId;
- return this;
- }
-
- /**
- * Get the identityType property: Only userAssignedIdentity is supported in this API version; other types may be
- * supported in the future.
- *
- * @return the identityType value.
- */
- public CmkIdentityType identityType() {
- return this.identityType;
- }
-
- /**
- * Set the identityType property: Only userAssignedIdentity is supported in this API version; other types may be
- * supported in the future.
- *
- * @param identityType the identityType value to set.
- * @return the ClusterPropertiesEncryptionCustomerManagedKeyEncryptionKeyIdentity object itself.
- */
- public ClusterPropertiesEncryptionCustomerManagedKeyEncryptionKeyIdentity withIdentityType(
- CmkIdentityType identityType) {
- this.identityType = identityType;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/ClusterUpdate.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/ClusterUpdate.java
index e36423281d05..cd16e7938326 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/ClusterUpdate.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/ClusterUpdate.java
@@ -29,12 +29,6 @@ public final class ClusterUpdate {
@JsonProperty(value = "properties")
private ClusterProperties innerProperties;
- /*
- * The identity of the resource.
- */
- @JsonProperty(value = "identity")
- private ManagedServiceIdentity identity;
-
/*
* Resource tags.
*/
@@ -77,26 +71,6 @@ private ClusterProperties innerProperties() {
return this.innerProperties;
}
- /**
- * 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 ClusterUpdate object itself.
- */
- public ClusterUpdate withIdentity(ManagedServiceIdentity identity) {
- this.identity = identity;
- return this;
- }
-
/**
* Get the tags property: Resource tags.
*
@@ -140,29 +114,6 @@ public ClusterUpdate withMinimumTlsVersion(TlsVersion minimumTlsVersion) {
return this;
}
- /**
- * Get the encryption property: Encryption-at-rest configuration for the cluster.
- *
- * @return the encryption value.
- */
- public ClusterPropertiesEncryption encryption() {
- return this.innerProperties() == null ? null : this.innerProperties().encryption();
- }
-
- /**
- * Set the encryption property: Encryption-at-rest configuration for the cluster.
- *
- * @param encryption the encryption value to set.
- * @return the ClusterUpdate object itself.
- */
- public ClusterUpdate withEncryption(ClusterPropertiesEncryption encryption) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ClusterProperties();
- }
- this.innerProperties().withEncryption(encryption);
- return this;
- }
-
/**
* Get the hostname property: DNS name of the cluster endpoint.
*
@@ -221,8 +172,5 @@ public void validate() {
if (innerProperties() != null) {
innerProperties().validate();
}
- if (identity() != null) {
- identity().validate();
- }
}
}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/CmkIdentityType.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/CmkIdentityType.java
deleted file mode 100644
index a5a43a2f9b14..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/CmkIdentityType.java
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.models;
-
-import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
-import java.util.Collection;
-
-/** Only userAssignedIdentity is supported in this API version; other types may be supported in the future. */
-public final class CmkIdentityType extends ExpandableStringEnum {
- /** Static value systemAssignedIdentity for CmkIdentityType. */
- public static final CmkIdentityType SYSTEM_ASSIGNED_IDENTITY = fromString("systemAssignedIdentity");
-
- /** Static value userAssignedIdentity for CmkIdentityType. */
- public static final CmkIdentityType USER_ASSIGNED_IDENTITY = fromString("userAssignedIdentity");
-
- /**
- * Creates a new instance of CmkIdentityType value.
- *
- * @deprecated Use the {@link #fromString(String)} factory method.
- */
- @Deprecated
- public CmkIdentityType() {
- }
-
- /**
- * Creates or finds a CmkIdentityType from its string representation.
- *
- * @param name a name to look for.
- * @return the corresponding CmkIdentityType.
- */
- @JsonCreator
- public static CmkIdentityType fromString(String name) {
- return fromString(name, CmkIdentityType.class);
- }
-
- /**
- * Gets known CmkIdentityType values.
- *
- * @return known CmkIdentityType values.
- */
- public static Collection values() {
- return values(CmkIdentityType.class);
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/Database.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/Database.java
index 93d3dfb8c1c4..e7433022a59a 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/Database.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/Database.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.redisenterprise.models;
import com.azure.core.http.rest.Response;
-import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.redisenterprise.fluent.models.DatabaseInner;
import java.util.List;
@@ -33,13 +32,6 @@ public interface Database {
*/
String type();
- /**
- * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
- *
- * @return the systemData value.
- */
- SystemData systemData();
-
/**
* Gets the clientProtocol property: Specifies whether redis clients can connect using TLS-encrypted or plaintext
* redis protocols. Default is TLS-encrypted.
@@ -124,11 +116,13 @@ public interface Database {
interface Definition
extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate {
}
+
/** The Database definition stages. */
interface DefinitionStages {
/** The first stage of the Database definition. */
interface Blank extends WithParentResource {
}
+
/** The stage of the Database definition allowing to specify parent resource. */
interface WithParentResource {
/**
@@ -140,6 +134,7 @@ interface WithParentResource {
*/
WithCreate withExistingRedisEnterprise(String resourceGroupName, String clusterName);
}
+
/**
* The stage of the Database definition which contains all the minimum required properties for the resource to
* be created, but also allows for any other optional properties to be specified.
@@ -167,6 +162,7 @@ interface WithCreate
*/
Database create(Context context);
}
+
/** The stage of the Database definition allowing to specify clientProtocol. */
interface WithClientProtocol {
/**
@@ -179,6 +175,7 @@ interface WithClientProtocol {
*/
WithCreate withClientProtocol(Protocol clientProtocol);
}
+
/** The stage of the Database definition allowing to specify port. */
interface WithPort {
/**
@@ -190,6 +187,7 @@ interface WithPort {
*/
WithCreate withPort(Integer port);
}
+
/** The stage of the Database definition allowing to specify clusteringPolicy. */
interface WithClusteringPolicy {
/**
@@ -201,6 +199,7 @@ interface WithClusteringPolicy {
*/
WithCreate withClusteringPolicy(ClusteringPolicy clusteringPolicy);
}
+
/** The stage of the Database definition allowing to specify evictionPolicy. */
interface WithEvictionPolicy {
/**
@@ -211,6 +210,7 @@ interface WithEvictionPolicy {
*/
WithCreate withEvictionPolicy(EvictionPolicy evictionPolicy);
}
+
/** The stage of the Database definition allowing to specify persistence. */
interface WithPersistence {
/**
@@ -221,6 +221,7 @@ interface WithPersistence {
*/
WithCreate withPersistence(Persistence persistence);
}
+
/** The stage of the Database definition allowing to specify modules. */
interface WithModules {
/**
@@ -233,6 +234,7 @@ interface WithModules {
*/
WithCreate withModules(List modules);
}
+
/** The stage of the Database definition allowing to specify geoReplication. */
interface WithGeoReplication {
/**
@@ -245,6 +247,7 @@ interface WithGeoReplication {
WithCreate withGeoReplication(DatabasePropertiesGeoReplication geoReplication);
}
}
+
/**
* Begins update for the Database resource.
*
@@ -270,6 +273,7 @@ interface Update
*/
Database apply(Context context);
}
+
/** The Database update stages. */
interface UpdateStages {
/** The stage of the Database update allowing to specify clientProtocol. */
@@ -284,6 +288,7 @@ interface WithClientProtocol {
*/
Update withClientProtocol(Protocol clientProtocol);
}
+
/** The stage of the Database update allowing to specify evictionPolicy. */
interface WithEvictionPolicy {
/**
@@ -294,6 +299,7 @@ interface WithEvictionPolicy {
*/
Update withEvictionPolicy(EvictionPolicy evictionPolicy);
}
+
/** The stage of the Database update allowing to specify persistence. */
interface WithPersistence {
/**
@@ -305,6 +311,7 @@ interface WithPersistence {
Update withPersistence(Persistence persistence);
}
}
+
/**
* Refreshes the resource to sync with Azure.
*
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/ExportClusterParameters.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/ExportClusterParameters.java
index db429aa7d8e9..65f6b52f816e 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/ExportClusterParameters.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/ExportClusterParameters.java
@@ -18,7 +18,7 @@ public final class ExportClusterParameters {
/*
* SAS URI for the target directory to export to
*/
- @JsonProperty(value = "sasUri", required = true)
+ @JsonProperty(value = "sasUri")
private String sasUri;
/** Creates an instance of ExportClusterParameters class. */
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/FlushParameters.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/FlushParameters.java
index 6961dd359be7..51c8bcae2e30 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/FlushParameters.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/FlushParameters.java
@@ -9,14 +9,14 @@
import java.util.List;
/**
- * Flush all the keys from the current and all its linked databases
+ * Flush all the keys from the current and all its linked databases.
*
* Parameters for a Redis Enterprise active geo-replication flush operation.
*/
@Fluent
public final class FlushParameters {
/*
- * The resource identifiers of all the other database resources in the georeplication group to be flushed
+ * The identifiers of all the other database resources in the georeplication group to be flushed.
*/
@JsonProperty(value = "ids")
private List ids;
@@ -26,8 +26,8 @@ public FlushParameters() {
}
/**
- * Get the ids property: The resource identifiers of all the other database resources in the georeplication group to
- * be flushed.
+ * Get the ids property: The identifiers of all the other database resources in the georeplication group to be
+ * flushed.
*
* @return the ids value.
*/
@@ -36,8 +36,8 @@ public List ids() {
}
/**
- * Set the ids property: The resource identifiers of all the other database resources in the georeplication group to
- * be flushed.
+ * Set the ids property: The identifiers of all the other database resources in the georeplication group to be
+ * flushed.
*
* @param ids the ids value to set.
* @return the FlushParameters object itself.
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/ImportClusterParameters.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/ImportClusterParameters.java
index 2c1fdd2517c0..ac010f658796 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/ImportClusterParameters.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/ImportClusterParameters.java
@@ -19,7 +19,7 @@ public final class ImportClusterParameters {
/*
* SAS URIs for the target blobs to import from
*/
- @JsonProperty(value = "sasUris", required = true)
+ @JsonProperty(value = "sasUris")
private List sasUris;
/** Creates an instance of ImportClusterParameters class. */
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/LocationInfo.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/LocationInfo.java
deleted file mode 100644
index c07423fea2d1..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/LocationInfo.java
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.models;
-
-import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.List;
-
-/** Information about location (for example: features that it supports). */
-@Fluent
-public final class LocationInfo {
- /*
- * Location name
- */
- @JsonProperty(value = "location")
- private String location;
-
- /*
- * List of capabilities
- */
- @JsonProperty(value = "capabilities")
- private List capabilities;
-
- /** Creates an instance of LocationInfo class. */
- public LocationInfo() {
- }
-
- /**
- * Get the location property: Location name.
- *
- * @return the location value.
- */
- public String location() {
- return this.location;
- }
-
- /**
- * Set the location property: Location name.
- *
- * @param location the location value to set.
- * @return the LocationInfo object itself.
- */
- public LocationInfo withLocation(String location) {
- this.location = location;
- return this;
- }
-
- /**
- * Get the capabilities property: List of capabilities.
- *
- * @return the capabilities value.
- */
- public List capabilities() {
- return this.capabilities;
- }
-
- /**
- * Set the capabilities property: List of capabilities.
- *
- * @param capabilities the capabilities value to set.
- * @return the LocationInfo object itself.
- */
- public LocationInfo withCapabilities(List capabilities) {
- this.capabilities = capabilities;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (capabilities() != null) {
- capabilities().forEach(e -> e.validate());
- }
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/ManagedServiceIdentity.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/ManagedServiceIdentity.java
deleted file mode 100644
index cf6427594f7f..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/ManagedServiceIdentity.java
+++ /dev/null
@@ -1,143 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.models;
-
-import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.Map;
-import java.util.UUID;
-
-/** Managed service identity (system assigned and/or user assigned identities). */
-@Fluent
-public final class ManagedServiceIdentity {
- /*
- * The service principal ID of the system assigned identity. This property will only be provided for a system
- * assigned identity.
- */
- @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY)
- private UUID principalId;
-
- /*
- * The tenant ID of the system assigned identity. This property will only be provided for a system assigned
- * identity.
- */
- @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY)
- private UUID tenantId;
-
- /*
- * Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
- */
- @JsonProperty(value = "type", required = true)
- private ManagedServiceIdentityType type;
-
- /*
- * The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys
- * will be ARM resource ids in the form:
- * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.
- * The dictionary values can be empty objects ({}) in requests.
- */
- @JsonProperty(value = "userAssignedIdentities")
- @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
- private Map userAssignedIdentities;
-
- /** Creates an instance of ManagedServiceIdentity class. */
- public ManagedServiceIdentity() {
- }
-
- /**
- * Get the principalId property: The service principal ID of the system assigned identity. This property will only
- * be provided for a system assigned identity.
- *
- * @return the principalId value.
- */
- public UUID principalId() {
- return this.principalId;
- }
-
- /**
- * Get the tenantId property: The tenant ID of the system assigned identity. This property will only be provided for
- * a system assigned identity.
- *
- * @return the tenantId value.
- */
- public UUID tenantId() {
- return this.tenantId;
- }
-
- /**
- * Get the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are
- * allowed).
- *
- * @return the type value.
- */
- public ManagedServiceIdentityType type() {
- return this.type;
- }
-
- /**
- * Set the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are
- * allowed).
- *
- * @param type the type value to set.
- * @return the ManagedServiceIdentity object itself.
- */
- public ManagedServiceIdentity withType(ManagedServiceIdentityType type) {
- this.type = type;
- return this;
- }
-
- /**
- * Get the userAssignedIdentities property: The set of user assigned identities associated with the resource. The
- * userAssignedIdentities dictionary keys will be ARM resource ids in the form:
- * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.
- * The dictionary values can be empty objects ({}) in requests.
- *
- * @return the userAssignedIdentities value.
- */
- public Map userAssignedIdentities() {
- return this.userAssignedIdentities;
- }
-
- /**
- * Set the userAssignedIdentities property: The set of user assigned identities associated with the resource. The
- * userAssignedIdentities dictionary keys will be ARM resource ids in the form:
- * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.
- * The dictionary values can be empty objects ({}) in requests.
- *
- * @param userAssignedIdentities the userAssignedIdentities value to set.
- * @return the ManagedServiceIdentity object itself.
- */
- public ManagedServiceIdentity withUserAssignedIdentities(Map userAssignedIdentities) {
- this.userAssignedIdentities = userAssignedIdentities;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (type() == null) {
- throw LOGGER
- .logExceptionAsError(
- new IllegalArgumentException("Missing required property type in model ManagedServiceIdentity"));
- }
- if (userAssignedIdentities() != null) {
- userAssignedIdentities()
- .values()
- .forEach(
- e -> {
- if (e != null) {
- e.validate();
- }
- });
- }
- }
-
- private static final ClientLogger LOGGER = new ClientLogger(ManagedServiceIdentity.class);
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/ManagedServiceIdentityType.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/ManagedServiceIdentityType.java
deleted file mode 100644
index b82525ecbff7..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/ManagedServiceIdentityType.java
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.models;
-
-import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
-import java.util.Collection;
-
-/** Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). */
-public final class ManagedServiceIdentityType extends ExpandableStringEnum {
- /** Static value None for ManagedServiceIdentityType. */
- public static final ManagedServiceIdentityType NONE = fromString("None");
-
- /** Static value SystemAssigned for ManagedServiceIdentityType. */
- public static final ManagedServiceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned");
-
- /** Static value UserAssigned for ManagedServiceIdentityType. */
- public static final ManagedServiceIdentityType USER_ASSIGNED = fromString("UserAssigned");
-
- /** Static value SystemAssigned, UserAssigned for ManagedServiceIdentityType. */
- public static final ManagedServiceIdentityType SYSTEM_ASSIGNED_USER_ASSIGNED =
- fromString("SystemAssigned, UserAssigned");
-
- /**
- * Creates a new instance of ManagedServiceIdentityType value.
- *
- * @deprecated Use the {@link #fromString(String)} factory method.
- */
- @Deprecated
- public ManagedServiceIdentityType() {
- }
-
- /**
- * Creates or finds a ManagedServiceIdentityType from its string representation.
- *
- * @param name a name to look for.
- * @return the corresponding ManagedServiceIdentityType.
- */
- @JsonCreator
- public static ManagedServiceIdentityType fromString(String name) {
- return fromString(name, ManagedServiceIdentityType.class);
- }
-
- /**
- * Gets known ManagedServiceIdentityType values.
- *
- * @return known ManagedServiceIdentityType values.
- */
- public static Collection values() {
- return values(ManagedServiceIdentityType.class);
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/PrivateEndpointConnection.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/PrivateEndpointConnection.java
index d9c1082fad26..1185f38856a9 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/PrivateEndpointConnection.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/PrivateEndpointConnection.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.redisenterprise.models;
-import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.redisenterprise.fluent.models.PrivateEndpointConnectionInner;
@@ -31,13 +30,6 @@ public interface PrivateEndpointConnection {
*/
String type();
- /**
- * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
- *
- * @return the systemData value.
- */
- SystemData systemData();
-
/**
* Gets the privateEndpoint property: The resource of private end point.
*
@@ -78,11 +70,13 @@ public interface PrivateEndpointConnection {
interface Definition
extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate {
}
+
/** The PrivateEndpointConnection definition stages. */
interface DefinitionStages {
/** The first stage of the PrivateEndpointConnection definition. */
interface Blank extends WithParentResource {
}
+
/** The stage of the PrivateEndpointConnection definition allowing to specify parent resource. */
interface WithParentResource {
/**
@@ -94,6 +88,7 @@ interface WithParentResource {
*/
WithCreate withExistingRedisEnterprise(String resourceGroupName, String clusterName);
}
+
/**
* The stage of the PrivateEndpointConnection definition which contains all the minimum required properties for
* the resource to be created, but also allows for any other optional properties to be specified.
@@ -115,6 +110,7 @@ interface WithCreate
*/
PrivateEndpointConnection create(Context context);
}
+
/** The stage of the PrivateEndpointConnection definition allowing to specify privateEndpoint. */
interface WithPrivateEndpoint {
/**
@@ -125,6 +121,7 @@ interface WithPrivateEndpoint {
*/
WithCreate withPrivateEndpoint(PrivateEndpoint privateEndpoint);
}
+
/**
* The stage of the PrivateEndpointConnection definition allowing to specify privateLinkServiceConnectionState.
*/
@@ -141,6 +138,7 @@ WithCreate withPrivateLinkServiceConnectionState(
PrivateLinkServiceConnectionState privateLinkServiceConnectionState);
}
}
+
/**
* Begins update for the PrivateEndpointConnection resource.
*
@@ -165,6 +163,7 @@ interface Update extends UpdateStages.WithPrivateEndpoint, UpdateStages.WithPriv
*/
PrivateEndpointConnection apply(Context context);
}
+
/** The PrivateEndpointConnection update stages. */
interface UpdateStages {
/** The stage of the PrivateEndpointConnection update allowing to specify privateEndpoint. */
@@ -177,6 +176,7 @@ interface WithPrivateEndpoint {
*/
Update withPrivateEndpoint(PrivateEndpoint privateEndpoint);
}
+
/** The stage of the PrivateEndpointConnection update allowing to specify privateLinkServiceConnectionState. */
interface WithPrivateLinkServiceConnectionState {
/**
@@ -191,6 +191,7 @@ Update withPrivateLinkServiceConnectionState(
PrivateLinkServiceConnectionState privateLinkServiceConnectionState);
}
}
+
/**
* Refreshes the resource to sync with Azure.
*
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/PrivateEndpointConnections.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/PrivateEndpointConnections.java
index 04d8334ce296..b48d46725de1 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/PrivateEndpointConnections.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/PrivateEndpointConnections.java
@@ -75,14 +75,11 @@ Response getWithResponse(
* @param clusterName The name of the RedisEnterprise cluster.
* @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
* resource.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link Response}.
*/
- Response deleteWithResponse(
- String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context);
+ void delete(String resourceGroupName, String clusterName, String privateEndpointConnectionName);
/**
* Deletes the specified private endpoint connection associated with the RedisEnterprise cluster.
@@ -91,11 +88,12 @@ Response deleteWithResponse(
* @param clusterName The name of the RedisEnterprise cluster.
* @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
* resource.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
*/
- void delete(String resourceGroupName, String clusterName, String privateEndpointConnectionName);
+ void delete(String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context);
/**
* Gets the specified private endpoint connection associated with the RedisEnterprise cluster.
@@ -140,9 +138,8 @@ Response deleteWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link Response}.
*/
- Response deleteByIdWithResponse(String id, Context context);
+ void deleteByIdWithResponse(String id, Context context);
/**
* Begins definition for a new PrivateEndpointConnection resource.
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/PrivateLinkResource.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/PrivateLinkResource.java
index dfbee4652567..5ec2aeef5980 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/PrivateLinkResource.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/PrivateLinkResource.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.redisenterprise.models;
-import com.azure.core.management.SystemData;
import com.azure.resourcemanager.redisenterprise.fluent.models.PrivateLinkResourceInner;
import java.util.List;
@@ -31,13 +30,6 @@ public interface PrivateLinkResource {
*/
String type();
- /**
- * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
- *
- * @return the systemData value.
- */
- SystemData systemData();
-
/**
* Gets the groupId property: The private link resource group id.
*
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/RegionSkuDetail.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/RegionSkuDetail.java
deleted file mode 100644
index 520df8717f2f..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/RegionSkuDetail.java
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.models;
-
-import com.azure.resourcemanager.redisenterprise.fluent.models.RegionSkuDetailInner;
-
-/** An immutable client-side representation of RegionSkuDetail. */
-public interface RegionSkuDetail {
- /**
- * Gets the resourceType property: Resource type which has the SKU, such as Microsoft.Cache/redisEnterprise.
- *
- * @return the resourceType value.
- */
- String resourceType();
-
- /**
- * Gets the locationInfo property: Details about location and its capabilities.
- *
- * @return the locationInfo value.
- */
- LocationInfo locationInfo();
-
- /**
- * Gets the skuDetails property: Sku Detail
- *
- * Details about available skus.
- *
- * @return the skuDetails value.
- */
- SkuDetail skuDetails();
-
- /**
- * Gets the inner com.azure.resourcemanager.redisenterprise.fluent.models.RegionSkuDetailInner object.
- *
- * @return the inner object.
- */
- RegionSkuDetailInner innerModel();
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/RegionSkuDetails.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/RegionSkuDetails.java
deleted file mode 100644
index 6bf8863b0e6b..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/RegionSkuDetails.java
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.models;
-
-import com.azure.core.annotation.Fluent;
-import com.azure.resourcemanager.redisenterprise.fluent.models.RegionSkuDetailInner;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.List;
-
-/**
- * Region Sku Details
- *
- *
List of details about all the available SKUs.
- */
-@Fluent
-public final class RegionSkuDetails {
- /*
- * List of Sku Detail
- */
- @JsonProperty(value = "value")
- private List value;
-
- /** Creates an instance of RegionSkuDetails class. */
- public RegionSkuDetails() {
- }
-
- /**
- * Get the value property: List of Sku Detail.
- *
- * @return the value value.
- */
- public List value() {
- return this.value;
- }
-
- /**
- * Set the value property: List of Sku Detail.
- *
- * @param value the value value to set.
- * @return the RegionSkuDetails object itself.
- */
- public RegionSkuDetails withValue(List value) {
- this.value = value;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (value() != null) {
- value().forEach(e -> e.validate());
- }
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/SkuDetail.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/SkuDetail.java
deleted file mode 100644
index bb8bf16368d1..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/SkuDetail.java
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.models;
-
-import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/**
- * Sku Detail
- *
- * Information about Sku.
- */
-@Fluent
-public final class SkuDetail {
- /*
- * The type of RedisEnterprise cluster to deploy. Possible values: (Enterprise_E10, EnterpriseFlash_F300 etc.)
- */
- @JsonProperty(value = "name")
- private SkuName name;
-
- /** Creates an instance of SkuDetail class. */
- public SkuDetail() {
- }
-
- /**
- * Get the name property: The type of RedisEnterprise cluster to deploy. Possible values: (Enterprise_E10,
- * EnterpriseFlash_F300 etc.).
- *
- * @return the name value.
- */
- public SkuName name() {
- return this.name;
- }
-
- /**
- * Set the name property: The type of RedisEnterprise cluster to deploy. Possible values: (Enterprise_E10,
- * EnterpriseFlash_F300 etc.).
- *
- * @param name the name value to set.
- * @return the SkuDetail object itself.
- */
- public SkuDetail withName(SkuName name) {
- this.name = name;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/SkuName.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/SkuName.java
index cfc69f2906aa..8ae5fe7a0c7d 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/SkuName.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/SkuName.java
@@ -8,7 +8,7 @@
import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
-/** Defines values for SkuName. */
+/** The type of RedisEnterprise cluster to deploy. Possible values: (Enterprise_E10, EnterpriseFlash_F300 etc.). */
public final class SkuName extends ExpandableStringEnum {
/** Static value Enterprise_E10 for SkuName. */
public static final SkuName ENTERPRISE_E10 = fromString("Enterprise_E10");
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/Skus.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/Skus.java
deleted file mode 100644
index 0d035c1bae9f..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/Skus.java
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.models;
-
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.util.Context;
-
-/** Resource collection API of Skus. */
-public interface Skus {
- /**
- * Gets information about skus in specified location for the given subscription id.
- *
- * @param location The name of Azure region.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return information about skus in specified location for the given subscription id as paginated response with
- * {@link PagedIterable}.
- */
- PagedIterable list(String location);
-
- /**
- * Gets information about skus in specified location for the given subscription id.
- *
- * @param location The name of Azure region.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return information about skus in specified location for the given subscription id as paginated response with
- * {@link PagedIterable}.
- */
- PagedIterable list(String location, Context context);
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/UserAssignedIdentity.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/UserAssignedIdentity.java
deleted file mode 100644
index d76987e96ef9..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/UserAssignedIdentity.java
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.models;
-
-import com.azure.core.annotation.Immutable;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.UUID;
-
-/** User assigned identity properties. */
-@Immutable
-public final class UserAssignedIdentity {
- /*
- * The principal ID of the assigned identity.
- */
- @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY)
- private UUID principalId;
-
- /*
- * The client ID of the assigned identity.
- */
- @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY)
- private UUID clientId;
-
- /** Creates an instance of UserAssignedIdentity class. */
- public UserAssignedIdentity() {
- }
-
- /**
- * Get the principalId property: The principal ID of the assigned identity.
- *
- * @return the principalId value.
- */
- public UUID principalId() {
- return this.principalId;
- }
-
- /**
- * Get the clientId property: The client ID of the assigned identity.
- *
- * @return the clientId value.
- */
- public UUID clientId() {
- return this.clientId;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesCreateSamples.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesCreateSamples.java
index 38cd9fcae483..b6c474cc4cf7 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesCreateSamples.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesCreateSamples.java
@@ -17,7 +17,7 @@
/** Samples for Databases Create. */
public final class DatabasesCreateSamples {
/*
- * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseDatabasesCreate.json
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-07-01/examples/RedisEnterpriseDatabasesCreate.json
*/
/**
* Sample code: RedisEnterpriseDatabasesCreate.
@@ -45,7 +45,7 @@ public static void redisEnterpriseDatabasesCreate(
}
/*
- * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseDatabasesCreateWithGeoReplication.json
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-07-01/examples/RedisEnterpriseDatabasesCreateWithGeoReplication.json
*/
/**
* Sample code: RedisEnterpriseDatabasesCreate With Active Geo Replication.
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesDeleteSamples.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesDeleteSamples.java
index 62f5a06b8e6f..38a7a6c42484 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesDeleteSamples.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesDeleteSamples.java
@@ -7,7 +7,7 @@
/** Samples for Databases Delete. */
public final class DatabasesDeleteSamples {
/*
- * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseDatabasesDelete.json
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-07-01/examples/RedisEnterpriseDatabasesDelete.json
*/
/**
* Sample code: RedisEnterpriseDatabasesDelete.
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesExportSamples.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesExportSamples.java
index 3f88f12b2f0f..edb04d8a7bc2 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesExportSamples.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesExportSamples.java
@@ -9,7 +9,7 @@
/** Samples for Databases Export. */
public final class DatabasesExportSamples {
/*
- * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseDatabasesExport.json
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-07-01/examples/RedisEnterpriseDatabasesExport.json
*/
/**
* Sample code: RedisEnterpriseDatabasesExport.
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesFlushSamples.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesFlushSamples.java
index 326ea36a78ec..43a1df10ab52 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesFlushSamples.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesFlushSamples.java
@@ -10,7 +10,7 @@
/** Samples for Databases Flush. */
public final class DatabasesFlushSamples {
/*
- * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseDatabasesFlush.json
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-07-01/examples/RedisEnterpriseDatabasesFlush.json
*/
/**
* Sample code: How to flush all the keys in the database.
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesForceUnlinkSamples.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesForceUnlinkSamples.java
index 937ba66aa8c8..895c27be6984 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesForceUnlinkSamples.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesForceUnlinkSamples.java
@@ -10,7 +10,7 @@
/** Samples for Databases ForceUnlink. */
public final class DatabasesForceUnlinkSamples {
/*
- * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseDatabasesForceUnlink.json
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-07-01/examples/RedisEnterpriseDatabasesForceUnlink.json
*/
/**
* Sample code: How to unlink a database during a regional outage.
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesGetSamples.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesGetSamples.java
index 4afaa584562c..500ab98fb38e 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesGetSamples.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesGetSamples.java
@@ -7,7 +7,7 @@
/** Samples for Databases Get. */
public final class DatabasesGetSamples {
/*
- * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseDatabasesGet.json
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-07-01/examples/RedisEnterpriseDatabasesGet.json
*/
/**
* Sample code: RedisEnterpriseDatabasesGet.
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesImportMethodSamples.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesImportMethodSamples.java
index 51e054badbec..3073a0548407 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesImportMethodSamples.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesImportMethodSamples.java
@@ -10,7 +10,7 @@
/** Samples for Databases ImportMethod. */
public final class DatabasesImportMethodSamples {
/*
- * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseDatabasesImport.json
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-07-01/examples/RedisEnterpriseDatabasesImport.json
*/
/**
* Sample code: RedisEnterpriseDatabasesImport.
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesListByClusterSamples.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesListByClusterSamples.java
index 3d2345f7f550..6a5bf96f8d71 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesListByClusterSamples.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesListByClusterSamples.java
@@ -7,7 +7,7 @@
/** Samples for Databases ListByCluster. */
public final class DatabasesListByClusterSamples {
/*
- * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseDatabasesListByCluster.json
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-07-01/examples/RedisEnterpriseDatabasesListByCluster.json
*/
/**
* Sample code: RedisEnterpriseDatabasesListByCluster.
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesListKeysSamples.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesListKeysSamples.java
index 810aebae03b7..4d0cef4a4773 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesListKeysSamples.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesListKeysSamples.java
@@ -7,7 +7,7 @@
/** Samples for Databases ListKeys. */
public final class DatabasesListKeysSamples {
/*
- * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseDatabasesListKeys.json
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-07-01/examples/RedisEnterpriseDatabasesListKeys.json
*/
/**
* Sample code: RedisEnterpriseDatabasesListKeys.
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesRegenerateKeySamples.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesRegenerateKeySamples.java
index a35052532820..1d4ccdea0e74 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesRegenerateKeySamples.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesRegenerateKeySamples.java
@@ -10,7 +10,7 @@
/** Samples for Databases RegenerateKey. */
public final class DatabasesRegenerateKeySamples {
/*
- * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseDatabasesRegenerateKey.json
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-07-01/examples/RedisEnterpriseDatabasesRegenerateKey.json
*/
/**
* Sample code: RedisEnterpriseDatabasesRegenerateKey.
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesUpdateSamples.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesUpdateSamples.java
index 56565da1f665..4d6053a98774 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesUpdateSamples.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesUpdateSamples.java
@@ -13,7 +13,7 @@
/** Samples for Databases Update. */
public final class DatabasesUpdateSamples {
/*
- * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseDatabasesUpdate.json
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-07-01/examples/RedisEnterpriseDatabasesUpdate.json
*/
/**
* Sample code: RedisEnterpriseDatabasesUpdate.
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/OperationsListSamples.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/OperationsListSamples.java
index 665c43997f3f..c974bbb7f967 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/OperationsListSamples.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/OperationsListSamples.java
@@ -7,7 +7,7 @@
/** Samples for Operations List. */
public final class OperationsListSamples {
/*
- * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/OperationsList.json
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-07-01/examples/OperationsList.json
*/
/**
* Sample code: OperationsList.
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/OperationsStatusGetSamples.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/OperationsStatusGetSamples.java
index 271cbd96ea8b..32a626b428b7 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/OperationsStatusGetSamples.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/OperationsStatusGetSamples.java
@@ -7,7 +7,7 @@
/** Samples for OperationsStatus Get. */
public final class OperationsStatusGetSamples {
/*
- * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/OperationsStatusGet.json
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-07-01/examples/OperationsStatusGet.json
*/
/**
* Sample code: OperationsStatusGet.
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/PrivateEndpointConnectionsDeleteSamples.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/PrivateEndpointConnectionsDeleteSamples.java
index 67c0b482b470..9946480bbb5d 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/PrivateEndpointConnectionsDeleteSamples.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/PrivateEndpointConnectionsDeleteSamples.java
@@ -7,7 +7,7 @@
/** Samples for PrivateEndpointConnections Delete. */
public final class PrivateEndpointConnectionsDeleteSamples {
/*
- * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseDeletePrivateEndpointConnection.json
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-07-01/examples/RedisEnterpriseDeletePrivateEndpointConnection.json
*/
/**
* Sample code: RedisEnterpriseDeletePrivateEndpointConnection.
@@ -16,8 +16,6 @@ public final class PrivateEndpointConnectionsDeleteSamples {
*/
public static void redisEnterpriseDeletePrivateEndpointConnection(
com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager manager) {
- manager
- .privateEndpointConnections()
- .deleteWithResponse("rg1", "cache1", "pectest01", com.azure.core.util.Context.NONE);
+ manager.privateEndpointConnections().delete("rg1", "cache1", "pectest01", com.azure.core.util.Context.NONE);
}
}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/PrivateEndpointConnectionsGetSamples.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/PrivateEndpointConnectionsGetSamples.java
index 926418d4529e..4cf4741c53a7 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/PrivateEndpointConnectionsGetSamples.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/PrivateEndpointConnectionsGetSamples.java
@@ -7,7 +7,7 @@
/** Samples for PrivateEndpointConnections Get. */
public final class PrivateEndpointConnectionsGetSamples {
/*
- * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseGetPrivateEndpointConnection.json
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-07-01/examples/RedisEnterpriseGetPrivateEndpointConnection.json
*/
/**
* Sample code: RedisEnterpriseGetPrivateEndpointConnection.
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/PrivateEndpointConnectionsListSamples.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/PrivateEndpointConnectionsListSamples.java
index 137cdd9ad570..e70fca253976 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/PrivateEndpointConnectionsListSamples.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/PrivateEndpointConnectionsListSamples.java
@@ -7,7 +7,7 @@
/** Samples for PrivateEndpointConnections List. */
public final class PrivateEndpointConnectionsListSamples {
/*
- * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseListPrivateEndpointConnections.json
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-07-01/examples/RedisEnterpriseListPrivateEndpointConnections.json
*/
/**
* Sample code: RedisEnterpriseListPrivateEndpointConnections.
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/PrivateEndpointConnectionsPutSamples.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/PrivateEndpointConnectionsPutSamples.java
index afa3503d855f..9194e5f58a66 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/PrivateEndpointConnectionsPutSamples.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/PrivateEndpointConnectionsPutSamples.java
@@ -10,7 +10,7 @@
/** Samples for PrivateEndpointConnections Put. */
public final class PrivateEndpointConnectionsPutSamples {
/*
- * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterprisePutPrivateEndpointConnection.json
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-07-01/examples/RedisEnterprisePutPrivateEndpointConnection.json
*/
/**
* Sample code: RedisEnterprisePutPrivateEndpointConnection.
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/PrivateLinkResourcesListByClusterSamples.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/PrivateLinkResourcesListByClusterSamples.java
index 95b20f5b140b..3e87bb1dbe62 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/PrivateLinkResourcesListByClusterSamples.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/PrivateLinkResourcesListByClusterSamples.java
@@ -7,7 +7,7 @@
/** Samples for PrivateLinkResources ListByCluster. */
public final class PrivateLinkResourcesListByClusterSamples {
/*
- * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseListPrivateLinkResources.json
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-07-01/examples/RedisEnterpriseListPrivateLinkResources.json
*/
/**
* Sample code: RedisEnterpriseListPrivateLinkResources.
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/RedisEnterpriseCreateSamples.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/RedisEnterpriseCreateSamples.java
index 0e215713432d..770180670100 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/RedisEnterpriseCreateSamples.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/RedisEnterpriseCreateSamples.java
@@ -4,16 +4,9 @@
package com.azure.resourcemanager.redisenterprise.generated;
-import com.azure.resourcemanager.redisenterprise.models.ClusterPropertiesEncryption;
-import com.azure.resourcemanager.redisenterprise.models.ClusterPropertiesEncryptionCustomerManagedKeyEncryption;
-import com.azure.resourcemanager.redisenterprise.models.ClusterPropertiesEncryptionCustomerManagedKeyEncryptionKeyIdentity;
-import com.azure.resourcemanager.redisenterprise.models.CmkIdentityType;
-import com.azure.resourcemanager.redisenterprise.models.ManagedServiceIdentity;
-import com.azure.resourcemanager.redisenterprise.models.ManagedServiceIdentityType;
import com.azure.resourcemanager.redisenterprise.models.Sku;
import com.azure.resourcemanager.redisenterprise.models.SkuName;
import com.azure.resourcemanager.redisenterprise.models.TlsVersion;
-import com.azure.resourcemanager.redisenterprise.models.UserAssignedIdentity;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
@@ -21,7 +14,7 @@
/** Samples for RedisEnterprise Create. */
public final class RedisEnterpriseCreateSamples {
/*
- * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseCreate.json
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-07-01/examples/RedisEnterpriseCreate.json
*/
/**
* Sample code: RedisEnterpriseCreate.
@@ -37,24 +30,7 @@ public static void redisEnterpriseCreate(com.azure.resourcemanager.redisenterpri
.withSku(new Sku().withName(SkuName.ENTERPRISE_FLASH_F300).withCapacity(3))
.withTags(mapOf("tag1", "value1"))
.withZones(Arrays.asList("1", "2", "3"))
- .withIdentity(
- new ManagedServiceIdentity()
- .withType(ManagedServiceIdentityType.USER_ASSIGNED)
- .withUserAssignedIdentities(
- mapOf(
- "/subscriptions/your-subscription/resourceGroups/your-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/your-identity",
- new UserAssignedIdentity())))
.withMinimumTlsVersion(TlsVersion.ONE_TWO)
- .withEncryption(
- new ClusterPropertiesEncryption()
- .withCustomerManagedKeyEncryption(
- new ClusterPropertiesEncryptionCustomerManagedKeyEncryption()
- .withKeyEncryptionKeyIdentity(
- new ClusterPropertiesEncryptionCustomerManagedKeyEncryptionKeyIdentity()
- .withUserAssignedIdentityResourceId(
- "/subscriptions/your-subscription/resourceGroups/your-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/your-identity")
- .withIdentityType(CmkIdentityType.USER_ASSIGNED_IDENTITY))
- .withKeyEncryptionKeyUrl("fakeTokenPlaceholder")))
.create();
}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/RedisEnterpriseDeleteSamples.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/RedisEnterpriseDeleteSamples.java
index a84c3525976d..6d66f6f409d2 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/RedisEnterpriseDeleteSamples.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/RedisEnterpriseDeleteSamples.java
@@ -7,7 +7,7 @@
/** Samples for RedisEnterprise Delete. */
public final class RedisEnterpriseDeleteSamples {
/*
- * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseDelete.json
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-07-01/examples/RedisEnterpriseDelete.json
*/
/**
* Sample code: RedisEnterpriseDelete.
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/RedisEnterpriseGetByResourceGroupSamples.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/RedisEnterpriseGetByResourceGroupSamples.java
index 65dfb9caa35f..39dc9bd5ba08 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/RedisEnterpriseGetByResourceGroupSamples.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/RedisEnterpriseGetByResourceGroupSamples.java
@@ -7,7 +7,7 @@
/** Samples for RedisEnterprise GetByResourceGroup. */
public final class RedisEnterpriseGetByResourceGroupSamples {
/*
- * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseGet.json
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-07-01/examples/RedisEnterpriseGet.json
*/
/**
* Sample code: RedisEnterpriseGet.
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/RedisEnterpriseListByResourceGroupSamples.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/RedisEnterpriseListByResourceGroupSamples.java
index 6bf487cdaecf..10cdb75d41f7 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/RedisEnterpriseListByResourceGroupSamples.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/RedisEnterpriseListByResourceGroupSamples.java
@@ -7,7 +7,7 @@
/** Samples for RedisEnterprise ListByResourceGroup. */
public final class RedisEnterpriseListByResourceGroupSamples {
/*
- * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseListByResourceGroup.json
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-07-01/examples/RedisEnterpriseListByResourceGroup.json
*/
/**
* Sample code: RedisEnterpriseListByResourceGroup.
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/RedisEnterpriseListSamples.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/RedisEnterpriseListSamples.java
index caee449cc761..23651e497ed2 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/RedisEnterpriseListSamples.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/RedisEnterpriseListSamples.java
@@ -7,7 +7,7 @@
/** Samples for RedisEnterprise List. */
public final class RedisEnterpriseListSamples {
/*
- * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseList.json
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-07-01/examples/RedisEnterpriseList.json
*/
/**
* Sample code: RedisEnterpriseList.
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/RedisEnterpriseUpdateSamples.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/RedisEnterpriseUpdateSamples.java
index 05b9adf7bc81..75fc18e1f886 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/RedisEnterpriseUpdateSamples.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/RedisEnterpriseUpdateSamples.java
@@ -14,7 +14,7 @@
/** Samples for RedisEnterprise Update. */
public final class RedisEnterpriseUpdateSamples {
/*
- * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseUpdate.json
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2023-07-01/examples/RedisEnterpriseUpdate.json
*/
/**
* Sample code: RedisEnterpriseUpdate.
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/SkusListSamples.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/SkusListSamples.java
deleted file mode 100644
index a7560f8f95a0..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/samples/java/com/azure/resourcemanager/redisenterprise/generated/SkusListSamples.java
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-/** Samples for Skus List. */
-public final class SkusListSamples {
- /*
- * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseSkusList.json
- */
- /**
- * Sample code: SkusList.
- *
- * @param manager Entry point to RedisEnterpriseManager.
- */
- public static void skusList(com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager manager) {
- manager.skus().list("westus2", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/CapabilityTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/CapabilityTests.java
deleted file mode 100644
index 610043a8d46d..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/CapabilityTests.java
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.redisenterprise.models.Capability;
-import org.junit.jupiter.api.Assertions;
-
-public final class CapabilityTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- Capability model =
- BinaryData.fromString("{\"name\":\"oklyaxuconuq\",\"value\":false}").toObject(Capability.class);
- Assertions.assertEquals("oklyaxuconuq", model.name());
- Assertions.assertEquals(false, model.value());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- Capability model = new Capability().withName("oklyaxuconuq").withValue(false);
- model = BinaryData.fromObject(model).toObject(Capability.class);
- Assertions.assertEquals("oklyaxuconuq", model.name());
- Assertions.assertEquals(false, model.value());
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/ClusterInnerTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/ClusterInnerTests.java
deleted file mode 100644
index 15f7bbc8cbed..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/ClusterInnerTests.java
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.redisenterprise.fluent.models.ClusterInner;
-import com.azure.resourcemanager.redisenterprise.models.ClusterPropertiesEncryption;
-import com.azure.resourcemanager.redisenterprise.models.ManagedServiceIdentity;
-import com.azure.resourcemanager.redisenterprise.models.ManagedServiceIdentityType;
-import com.azure.resourcemanager.redisenterprise.models.Sku;
-import com.azure.resourcemanager.redisenterprise.models.SkuName;
-import com.azure.resourcemanager.redisenterprise.models.TlsVersion;
-import com.azure.resourcemanager.redisenterprise.models.UserAssignedIdentity;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class ClusterInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ClusterInner model =
- BinaryData
- .fromString(
- "{\"sku\":{\"name\":\"EnterpriseFlash_F700\",\"capacity\":992034682},\"zones\":[\"k\",\"vd\"],\"identity\":{\"principalId\":\"f5d47d63-4d8c-4425-9f08-befe321ff670\",\"tenantId\":\"aa43d95d-3905-4c9d-96c4-efd75eb5dbc2\",\"type\":\"None\",\"userAssignedIdentities\":{\"ukxgaud\":{\"principalId\":\"7a20e069-609c-4680-b9aa-e9ce7d87d024\",\"clientId\":\"1efc16fa-c5ff-48a1-9c85-4910c07da9c6\"},\"nhsjcnyej\":{\"principalId\":\"e40317fa-41f4-40d8-baea-a1e193f6138a\",\"clientId\":\"61cfc4f6-8a7d-4ccf-bc66-c8b1864a2f63\"}}},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"encryption\":{},\"hostName\":\"apcz\",\"provisioningState\":\"Creating\",\"resourceState\":\"DeleteFailed\",\"redisVersion\":\"emkkvnipjox\",\"privateEndpointConnections\":[{\"id\":\"gejspodmailzyde\",\"name\":\"o\",\"type\":\"wyahuxinpmqnja\"},{\"id\":\"xj\",\"name\":\"prozvcputegjvwmf\",\"type\":\"atscmd\"}]},\"location\":\"jhulsuuvmkjo\",\"tags\":{\"ej\":\"wfndiodjpsl\",\"azakl\":\"pvwryoqpsoacc\"},\"id\":\"lahbcryff\",\"name\":\"fdosyg\",\"type\":\"xpaojakhmsbz\"}")
- .toObject(ClusterInner.class);
- Assertions.assertEquals("jhulsuuvmkjo", model.location());
- Assertions.assertEquals("wfndiodjpsl", model.tags().get("ej"));
- Assertions.assertEquals(SkuName.ENTERPRISE_FLASH_F700, model.sku().name());
- Assertions.assertEquals(992034682, model.sku().capacity());
- Assertions.assertEquals("k", model.zones().get(0));
- Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.identity().type());
- Assertions.assertEquals(TlsVersion.ONE_ZERO, model.minimumTlsVersion());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ClusterInner model =
- new ClusterInner()
- .withLocation("jhulsuuvmkjo")
- .withTags(mapOf("ej", "wfndiodjpsl", "azakl", "pvwryoqpsoacc"))
- .withSku(new Sku().withName(SkuName.ENTERPRISE_FLASH_F700).withCapacity(992034682))
- .withZones(Arrays.asList("k", "vd"))
- .withIdentity(
- new ManagedServiceIdentity()
- .withType(ManagedServiceIdentityType.NONE)
- .withUserAssignedIdentities(
- mapOf("ukxgaud", new UserAssignedIdentity(), "nhsjcnyej", new UserAssignedIdentity())))
- .withMinimumTlsVersion(TlsVersion.ONE_ZERO)
- .withEncryption(new ClusterPropertiesEncryption());
- model = BinaryData.fromObject(model).toObject(ClusterInner.class);
- Assertions.assertEquals("jhulsuuvmkjo", model.location());
- Assertions.assertEquals("wfndiodjpsl", model.tags().get("ej"));
- Assertions.assertEquals(SkuName.ENTERPRISE_FLASH_F700, model.sku().name());
- Assertions.assertEquals(992034682, model.sku().capacity());
- Assertions.assertEquals("k", model.zones().get(0));
- Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.identity().type());
- Assertions.assertEquals(TlsVersion.ONE_ZERO, model.minimumTlsVersion());
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/ClusterListTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/ClusterListTests.java
deleted file mode 100644
index 35b760d40b2d..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/ClusterListTests.java
+++ /dev/null
@@ -1,114 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.redisenterprise.fluent.models.ClusterInner;
-import com.azure.resourcemanager.redisenterprise.models.ClusterList;
-import com.azure.resourcemanager.redisenterprise.models.ManagedServiceIdentity;
-import com.azure.resourcemanager.redisenterprise.models.ManagedServiceIdentityType;
-import com.azure.resourcemanager.redisenterprise.models.Sku;
-import com.azure.resourcemanager.redisenterprise.models.SkuName;
-import com.azure.resourcemanager.redisenterprise.models.TlsVersion;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class ClusterListTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ClusterList model =
- BinaryData
- .fromString(
- "{\"value\":[{\"sku\":{\"name\":\"Enterprise_E100\",\"capacity\":757698897},\"zones\":[\"l\",\"ndlik\",\"yqkgfg\"],\"identity\":{\"principalId\":\"90eff83e-825f-48f3-965e-3d795be6a629\",\"tenantId\":\"75977f0f-8699-47eb-a4d1-da4ff4ec7b73\",\"type\":\"None\",\"userAssignedIdentities\":{}},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"hostName\":\"rxybz\",\"provisioningState\":\"Canceled\",\"resourceState\":\"Disabled\",\"redisVersion\":\"tbciqfouflmm\",\"privateEndpointConnections\":[]},\"location\":\"smodmgloug\",\"tags\":{\"ta\":\"wtmutduq\",\"whbmd\":\"spwgcuertumkdosv\",\"bhtqqrolfpfpsa\":\"bbjfddgmbmbexp\",\"jgzjaoyfhrtx\":\"gbquxigj\"},\"id\":\"lnerkujysvleju\",\"name\":\"fqawrlyxw\",\"type\":\"kcprbnw\"},{\"sku\":{\"name\":\"EnterpriseFlash_F1500\",\"capacity\":19976049},\"zones\":[\"bvpyss\",\"dnrujqguhmuouqfp\",\"wzwbnguitn\"],\"identity\":{\"principalId\":\"c00a688f-e999-484c-a8a0-66e1185caef2\",\"tenantId\":\"2cbddb9d-555d-4e1d-bad2-29624caf2ff6\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{}},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"hostName\":\"zuckyfi\",\"provisioningState\":\"Creating\",\"resourceState\":\"EnableFailed\",\"redisVersion\":\"vzwdzuhtymwis\",\"privateEndpointConnections\":[]},\"location\":\"thwxmnteiwaopvkm\",\"tags\":{\"uf\":\"mmxdcu\"},\"id\":\"rpymzidnsez\",\"name\":\"xtbzsgfyccsne\",\"type\":\"mdwzjeiachboo\"},{\"sku\":{\"name\":\"Enterprise_E20\",\"capacity\":219333087},\"zones\":[\"sfqpteehz\",\"vypyqrimzinpv\",\"wjdk\"],\"identity\":{\"principalId\":\"3bd9ea38-b56c-4244-85ed-751adf8ece99\",\"tenantId\":\"e55d238e-b999-422a-bc19-990b3d105f10\",\"type\":\"None\",\"userAssignedIdentities\":{}},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"hostName\":\"mnoh\",\"provisioningState\":\"Failed\",\"resourceState\":\"Running\",\"redisVersion\":\"dsoifiyipj\",\"privateEndpointConnections\":[]},\"location\":\"wpgrjbzno\",\"tags\":{\"nb\":\"xv\",\"rzafbljjgpbtoqcj\":\"xqabnmocpcysh\",\"vbqid\":\"klj\"},\"id\":\"qajzyulpkudjkr\",\"name\":\"khbzhfepgzg\",\"type\":\"e\"},{\"sku\":{\"name\":\"Enterprise_E20\",\"capacity\":1678385538},\"zones\":[\"scpai\",\"rhhbcs\",\"l\"],\"identity\":{\"principalId\":\"7b158bd3-97df-4c2a-ac7e-1b2217741991\",\"tenantId\":\"e484b802-9883-4733-a687-d29514741b98\",\"type\":\"SystemAssigned,"
- + " UserAssigned\",\"userAssignedIdentities\":{}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"hostName\":\"obnbdxkqpxokaj\",\"provisioningState\":\"Succeeded\",\"resourceState\":\"Disabling\",\"redisVersion\":\"ex\",\"privateEndpointConnections\":[]},\"location\":\"xgcp\",\"tags\":{\"mcl\":\"maajrmvdjwzrlo\",\"jctbza\":\"hijco\"},\"id\":\"s\",\"name\":\"sycbkbfk\",\"type\":\"ukdkexxppofmxa\"}],\"nextLink\":\"fjpgddtocjjxhvp\"}")
- .toObject(ClusterList.class);
- Assertions.assertEquals("smodmgloug", model.value().get(0).location());
- Assertions.assertEquals("wtmutduq", model.value().get(0).tags().get("ta"));
- Assertions.assertEquals(SkuName.ENTERPRISE_E100, model.value().get(0).sku().name());
- Assertions.assertEquals(757698897, model.value().get(0).sku().capacity());
- Assertions.assertEquals("l", model.value().get(0).zones().get(0));
- Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.value().get(0).identity().type());
- Assertions.assertEquals(TlsVersion.ONE_ONE, model.value().get(0).minimumTlsVersion());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ClusterList model =
- new ClusterList()
- .withValue(
- Arrays
- .asList(
- new ClusterInner()
- .withLocation("smodmgloug")
- .withTags(
- mapOf(
- "ta",
- "wtmutduq",
- "whbmd",
- "spwgcuertumkdosv",
- "bhtqqrolfpfpsa",
- "bbjfddgmbmbexp",
- "jgzjaoyfhrtx",
- "gbquxigj"))
- .withSku(new Sku().withName(SkuName.ENTERPRISE_E100).withCapacity(757698897))
- .withZones(Arrays.asList("l", "ndlik", "yqkgfg"))
- .withIdentity(
- new ManagedServiceIdentity()
- .withType(ManagedServiceIdentityType.NONE)
- .withUserAssignedIdentities(mapOf()))
- .withMinimumTlsVersion(TlsVersion.ONE_ONE),
- new ClusterInner()
- .withLocation("thwxmnteiwaopvkm")
- .withTags(mapOf("uf", "mmxdcu"))
- .withSku(new Sku().withName(SkuName.ENTERPRISE_FLASH_F1500).withCapacity(19976049))
- .withZones(Arrays.asList("bvpyss", "dnrujqguhmuouqfp", "wzwbnguitn"))
- .withIdentity(
- new ManagedServiceIdentity()
- .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED)
- .withUserAssignedIdentities(mapOf()))
- .withMinimumTlsVersion(TlsVersion.ONE_ONE),
- new ClusterInner()
- .withLocation("wpgrjbzno")
- .withTags(mapOf("nb", "xv", "rzafbljjgpbtoqcj", "xqabnmocpcysh", "vbqid", "klj"))
- .withSku(new Sku().withName(SkuName.ENTERPRISE_E20).withCapacity(219333087))
- .withZones(Arrays.asList("sfqpteehz", "vypyqrimzinpv", "wjdk"))
- .withIdentity(
- new ManagedServiceIdentity()
- .withType(ManagedServiceIdentityType.NONE)
- .withUserAssignedIdentities(mapOf()))
- .withMinimumTlsVersion(TlsVersion.ONE_ZERO),
- new ClusterInner()
- .withLocation("xgcp")
- .withTags(mapOf("mcl", "maajrmvdjwzrlo", "jctbza", "hijco"))
- .withSku(new Sku().withName(SkuName.ENTERPRISE_E20).withCapacity(1678385538))
- .withZones(Arrays.asList("scpai", "rhhbcs", "l"))
- .withIdentity(
- new ManagedServiceIdentity()
- .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED)
- .withUserAssignedIdentities(mapOf()))
- .withMinimumTlsVersion(TlsVersion.ONE_TWO)));
- model = BinaryData.fromObject(model).toObject(ClusterList.class);
- Assertions.assertEquals("smodmgloug", model.value().get(0).location());
- Assertions.assertEquals("wtmutduq", model.value().get(0).tags().get("ta"));
- Assertions.assertEquals(SkuName.ENTERPRISE_E100, model.value().get(0).sku().name());
- Assertions.assertEquals(757698897, model.value().get(0).sku().capacity());
- Assertions.assertEquals("l", model.value().get(0).zones().get(0));
- Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.value().get(0).identity().type());
- Assertions.assertEquals(TlsVersion.ONE_ONE, model.value().get(0).minimumTlsVersion());
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/ClusterPropertiesEncryptionCustomerManagedKeyEncryptionKeyIdentityTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/ClusterPropertiesEncryptionCustomerManagedKeyEncryptionKeyIdentityTests.java
deleted file mode 100644
index f4ebd3e0e5c6..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/ClusterPropertiesEncryptionCustomerManagedKeyEncryptionKeyIdentityTests.java
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.redisenterprise.models.ClusterPropertiesEncryptionCustomerManagedKeyEncryptionKeyIdentity;
-import com.azure.resourcemanager.redisenterprise.models.CmkIdentityType;
-import org.junit.jupiter.api.Assertions;
-
-public final class ClusterPropertiesEncryptionCustomerManagedKeyEncryptionKeyIdentityTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ClusterPropertiesEncryptionCustomerManagedKeyEncryptionKeyIdentity model =
- BinaryData
- .fromString(
- "{\"userAssignedIdentityResourceId\":\"ininmay\",\"identityType\":\"systemAssignedIdentity\"}")
- .toObject(ClusterPropertiesEncryptionCustomerManagedKeyEncryptionKeyIdentity.class);
- Assertions.assertEquals("ininmay", model.userAssignedIdentityResourceId());
- Assertions.assertEquals(CmkIdentityType.SYSTEM_ASSIGNED_IDENTITY, model.identityType());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ClusterPropertiesEncryptionCustomerManagedKeyEncryptionKeyIdentity model =
- new ClusterPropertiesEncryptionCustomerManagedKeyEncryptionKeyIdentity()
- .withUserAssignedIdentityResourceId("ininmay")
- .withIdentityType(CmkIdentityType.SYSTEM_ASSIGNED_IDENTITY);
- model =
- BinaryData
- .fromObject(model)
- .toObject(ClusterPropertiesEncryptionCustomerManagedKeyEncryptionKeyIdentity.class);
- Assertions.assertEquals("ininmay", model.userAssignedIdentityResourceId());
- Assertions.assertEquals(CmkIdentityType.SYSTEM_ASSIGNED_IDENTITY, model.identityType());
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/ClusterUpdateTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/ClusterUpdateTests.java
deleted file mode 100644
index 5465c3945be3..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/ClusterUpdateTests.java
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.redisenterprise.models.ClusterPropertiesEncryption;
-import com.azure.resourcemanager.redisenterprise.models.ClusterUpdate;
-import com.azure.resourcemanager.redisenterprise.models.ManagedServiceIdentity;
-import com.azure.resourcemanager.redisenterprise.models.ManagedServiceIdentityType;
-import com.azure.resourcemanager.redisenterprise.models.Sku;
-import com.azure.resourcemanager.redisenterprise.models.SkuName;
-import com.azure.resourcemanager.redisenterprise.models.TlsVersion;
-import com.azure.resourcemanager.redisenterprise.models.UserAssignedIdentity;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class ClusterUpdateTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ClusterUpdate model =
- BinaryData
- .fromString(
- "{\"sku\":{\"name\":\"EnterpriseFlash_F300\",\"capacity\":422670277},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"encryption\":{},\"hostName\":\"tnhxbn\",\"provisioningState\":\"Creating\",\"resourceState\":\"EnableFailed\",\"redisVersion\":\"rglssainqpj\",\"privateEndpointConnections\":[{\"id\":\"jfm\",\"name\":\"pee\",\"type\":\"vmgxsab\"},{\"id\":\"duuji\",\"name\":\"c\",\"type\":\"czdzev\"},{\"id\":\"krwpdap\",\"name\":\"dsbdkvwrwjf\",\"type\":\"usnhutje\"},{\"id\":\"rl\",\"name\":\"hugjzzdatqxhoc\",\"type\":\"geablgphuticndvk\"}]},\"identity\":{\"principalId\":\"e84f62b1-2b03-467b-b87a-d96e0b7bea22\",\"tenantId\":\"658aedbe-c6c3-465e-887d-c6bc7115ba00\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"hxh\":{\"principalId\":\"ef6b2490-4e98-4cfb-b2e2-351940dfc312\",\"clientId\":\"05a96c3d-d9e2-42d5-aa75-35d9cd89e45c\"},\"k\":{\"principalId\":\"4c71974d-b491-42db-8c3a-2b0ae199951c\",\"clientId\":\"6d3c5a9d-76cb-4700-b927-e153ac1b3d29\"},\"xolniwpwcukjfk\":{\"principalId\":\"3c01bd84-5c98-4fff-acf3-94fdcf59eff5\",\"clientId\":\"dd3813d9-95e6-4ddf-86ce-64f6207edea3\"}}},\"tags\":{\"klryplwck\":\"w\",\"pnddhsgcbacphejk\":\"asy\"}}")
- .toObject(ClusterUpdate.class);
- Assertions.assertEquals(SkuName.ENTERPRISE_FLASH_F300, model.sku().name());
- Assertions.assertEquals(422670277, model.sku().capacity());
- Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type());
- Assertions.assertEquals("w", model.tags().get("klryplwck"));
- Assertions.assertEquals(TlsVersion.ONE_ZERO, model.minimumTlsVersion());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ClusterUpdate model =
- new ClusterUpdate()
- .withSku(new Sku().withName(SkuName.ENTERPRISE_FLASH_F300).withCapacity(422670277))
- .withIdentity(
- new ManagedServiceIdentity()
- .withType(ManagedServiceIdentityType.USER_ASSIGNED)
- .withUserAssignedIdentities(
- mapOf(
- "hxh",
- new UserAssignedIdentity(),
- "k",
- new UserAssignedIdentity(),
- "xolniwpwcukjfk",
- new UserAssignedIdentity())))
- .withTags(mapOf("klryplwck", "w", "pnddhsgcbacphejk", "asy"))
- .withMinimumTlsVersion(TlsVersion.ONE_ZERO)
- .withEncryption(new ClusterPropertiesEncryption());
- model = BinaryData.fromObject(model).toObject(ClusterUpdate.class);
- Assertions.assertEquals(SkuName.ENTERPRISE_FLASH_F300, model.sku().name());
- Assertions.assertEquals(422670277, model.sku().capacity());
- Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type());
- Assertions.assertEquals("w", model.tags().get("klryplwck"));
- Assertions.assertEquals(TlsVersion.ONE_ZERO, model.minimumTlsVersion());
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/DatabaseInnerTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/DatabaseInnerTests.java
deleted file mode 100644
index 8bc50f5acc18..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/DatabaseInnerTests.java
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.redisenterprise.fluent.models.DatabaseInner;
-import com.azure.resourcemanager.redisenterprise.models.AofFrequency;
-import com.azure.resourcemanager.redisenterprise.models.ClusteringPolicy;
-import com.azure.resourcemanager.redisenterprise.models.DatabasePropertiesGeoReplication;
-import com.azure.resourcemanager.redisenterprise.models.EvictionPolicy;
-import com.azure.resourcemanager.redisenterprise.models.Module;
-import com.azure.resourcemanager.redisenterprise.models.Persistence;
-import com.azure.resourcemanager.redisenterprise.models.Protocol;
-import com.azure.resourcemanager.redisenterprise.models.RdbFrequency;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class DatabaseInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DatabaseInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"clientProtocol\":\"Encrypted\",\"port\":248377661,\"provisioningState\":\"Succeeded\",\"resourceState\":\"Creating\",\"clusteringPolicy\":\"OSSCluster\",\"evictionPolicy\":\"VolatileRandom\",\"persistence\":{\"aofEnabled\":true,\"rdbEnabled\":false,\"aofFrequency\":\"always\",\"rdbFrequency\":\"6h\"},\"modules\":[{\"name\":\"ftutqxlngxlefgu\",\"args\":\"xkrxdqmi\",\"version\":\"thz\"},{\"name\":\"vqdra\",\"args\":\"jybige\",\"version\":\"qfbow\"},{\"name\":\"kanyktzlcuiywg\",\"args\":\"wgndrvynhzgpp\",\"version\":\"cgyncocpecf\"},{\"name\":\"m\",\"args\":\"oo\",\"version\":\"xlzevgbmqjqabcy\"}],\"geoReplication\":{\"groupNickname\":\"vkwlzuvccfwnf\",\"linkedDatabases\":[]}},\"id\":\"fionl\",\"name\":\"bxetqgtzxdpn\",\"type\":\"bqqwxrj\"}")
- .toObject(DatabaseInner.class);
- Assertions.assertEquals(Protocol.ENCRYPTED, model.clientProtocol());
- Assertions.assertEquals(248377661, model.port());
- Assertions.assertEquals(ClusteringPolicy.OSSCLUSTER, model.clusteringPolicy());
- Assertions.assertEquals(EvictionPolicy.VOLATILE_RANDOM, model.evictionPolicy());
- Assertions.assertEquals(true, model.persistence().aofEnabled());
- Assertions.assertEquals(false, model.persistence().rdbEnabled());
- Assertions.assertEquals(AofFrequency.ALWAYS, model.persistence().aofFrequency());
- Assertions.assertEquals(RdbFrequency.SIXH, model.persistence().rdbFrequency());
- Assertions.assertEquals("ftutqxlngxlefgu", model.modules().get(0).name());
- Assertions.assertEquals("xkrxdqmi", model.modules().get(0).args());
- Assertions.assertEquals("vkwlzuvccfwnf", model.geoReplication().groupNickname());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DatabaseInner model =
- new DatabaseInner()
- .withClientProtocol(Protocol.ENCRYPTED)
- .withPort(248377661)
- .withClusteringPolicy(ClusteringPolicy.OSSCLUSTER)
- .withEvictionPolicy(EvictionPolicy.VOLATILE_RANDOM)
- .withPersistence(
- new Persistence()
- .withAofEnabled(true)
- .withRdbEnabled(false)
- .withAofFrequency(AofFrequency.ALWAYS)
- .withRdbFrequency(RdbFrequency.SIXH))
- .withModules(
- Arrays
- .asList(
- new Module().withName("ftutqxlngxlefgu").withArgs("xkrxdqmi"),
- new Module().withName("vqdra").withArgs("jybige"),
- new Module().withName("kanyktzlcuiywg").withArgs("wgndrvynhzgpp"),
- new Module().withName("m").withArgs("oo")))
- .withGeoReplication(
- new DatabasePropertiesGeoReplication()
- .withGroupNickname("vkwlzuvccfwnf")
- .withLinkedDatabases(Arrays.asList()));
- model = BinaryData.fromObject(model).toObject(DatabaseInner.class);
- Assertions.assertEquals(Protocol.ENCRYPTED, model.clientProtocol());
- Assertions.assertEquals(248377661, model.port());
- Assertions.assertEquals(ClusteringPolicy.OSSCLUSTER, model.clusteringPolicy());
- Assertions.assertEquals(EvictionPolicy.VOLATILE_RANDOM, model.evictionPolicy());
- Assertions.assertEquals(true, model.persistence().aofEnabled());
- Assertions.assertEquals(false, model.persistence().rdbEnabled());
- Assertions.assertEquals(AofFrequency.ALWAYS, model.persistence().aofFrequency());
- Assertions.assertEquals(RdbFrequency.SIXH, model.persistence().rdbFrequency());
- Assertions.assertEquals("ftutqxlngxlefgu", model.modules().get(0).name());
- Assertions.assertEquals("xkrxdqmi", model.modules().get(0).args());
- Assertions.assertEquals("vkwlzuvccfwnf", model.geoReplication().groupNickname());
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/DatabaseListTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/DatabaseListTests.java
deleted file mode 100644
index 49347126f3ae..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/DatabaseListTests.java
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.redisenterprise.fluent.models.DatabaseInner;
-import com.azure.resourcemanager.redisenterprise.models.ClusteringPolicy;
-import com.azure.resourcemanager.redisenterprise.models.DatabaseList;
-import com.azure.resourcemanager.redisenterprise.models.EvictionPolicy;
-import com.azure.resourcemanager.redisenterprise.models.Protocol;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class DatabaseListTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DatabaseList model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"clientProtocol\":\"Encrypted\",\"port\":2146697807,\"provisioningState\":\"Deleting\",\"resourceState\":\"Disabling\",\"clusteringPolicy\":\"OSSCluster\",\"evictionPolicy\":\"VolatileLFU\",\"modules\":[]},\"id\":\"vddntwn\",\"name\":\"eic\",\"type\":\"twnpzaoqvuhrhcf\"},{\"properties\":{\"clientProtocol\":\"Encrypted\",\"port\":1519639894,\"provisioningState\":\"Failed\",\"resourceState\":\"Creating\",\"clusteringPolicy\":\"OSSCluster\",\"evictionPolicy\":\"AllKeysLFU\",\"modules\":[]},\"id\":\"icxm\",\"name\":\"ciwqvhk\",\"type\":\"ixuigdtopbobj\"}],\"nextLink\":\"hm\"}")
- .toObject(DatabaseList.class);
- Assertions.assertEquals(Protocol.ENCRYPTED, model.value().get(0).clientProtocol());
- Assertions.assertEquals(2146697807, model.value().get(0).port());
- Assertions.assertEquals(ClusteringPolicy.OSSCLUSTER, model.value().get(0).clusteringPolicy());
- Assertions.assertEquals(EvictionPolicy.VOLATILE_LFU, model.value().get(0).evictionPolicy());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DatabaseList model =
- new DatabaseList()
- .withValue(
- Arrays
- .asList(
- new DatabaseInner()
- .withClientProtocol(Protocol.ENCRYPTED)
- .withPort(2146697807)
- .withClusteringPolicy(ClusteringPolicy.OSSCLUSTER)
- .withEvictionPolicy(EvictionPolicy.VOLATILE_LFU)
- .withModules(Arrays.asList()),
- new DatabaseInner()
- .withClientProtocol(Protocol.ENCRYPTED)
- .withPort(1519639894)
- .withClusteringPolicy(ClusteringPolicy.OSSCLUSTER)
- .withEvictionPolicy(EvictionPolicy.ALL_KEYS_LFU)
- .withModules(Arrays.asList())));
- model = BinaryData.fromObject(model).toObject(DatabaseList.class);
- Assertions.assertEquals(Protocol.ENCRYPTED, model.value().get(0).clientProtocol());
- Assertions.assertEquals(2146697807, model.value().get(0).port());
- Assertions.assertEquals(ClusteringPolicy.OSSCLUSTER, model.value().get(0).clusteringPolicy());
- Assertions.assertEquals(EvictionPolicy.VOLATILE_LFU, model.value().get(0).evictionPolicy());
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/DatabasePropertiesGeoReplicationTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/DatabasePropertiesGeoReplicationTests.java
deleted file mode 100644
index 6cf75af31d89..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/DatabasePropertiesGeoReplicationTests.java
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.redisenterprise.models.DatabasePropertiesGeoReplication;
-import com.azure.resourcemanager.redisenterprise.models.LinkedDatabase;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class DatabasePropertiesGeoReplicationTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DatabasePropertiesGeoReplication model =
- BinaryData
- .fromString(
- "{\"groupNickname\":\"zzvdudgwds\",\"linkedDatabases\":[{\"id\":\"twmcynpwlb\",\"state\":\"LinkFailed\"},{\"id\":\"acfta\",\"state\":\"UnlinkFailed\"},{\"id\":\"nltyfsoppusuesnz\",\"state\":\"Linking\"},{\"id\":\"bavo\",\"state\":\"Unlinking\"}]}")
- .toObject(DatabasePropertiesGeoReplication.class);
- Assertions.assertEquals("zzvdudgwds", model.groupNickname());
- Assertions.assertEquals("twmcynpwlb", model.linkedDatabases().get(0).id());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DatabasePropertiesGeoReplication model =
- new DatabasePropertiesGeoReplication()
- .withGroupNickname("zzvdudgwds")
- .withLinkedDatabases(
- Arrays
- .asList(
- new LinkedDatabase().withId("twmcynpwlb"),
- new LinkedDatabase().withId("acfta"),
- new LinkedDatabase().withId("nltyfsoppusuesnz"),
- new LinkedDatabase().withId("bavo")));
- model = BinaryData.fromObject(model).toObject(DatabasePropertiesGeoReplication.class);
- Assertions.assertEquals("zzvdudgwds", model.groupNickname());
- Assertions.assertEquals("twmcynpwlb", model.linkedDatabases().get(0).id());
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/DatabasePropertiesTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/DatabasePropertiesTests.java
deleted file mode 100644
index 1717ca2791d1..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/DatabasePropertiesTests.java
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.redisenterprise.fluent.models.DatabaseProperties;
-import com.azure.resourcemanager.redisenterprise.models.AofFrequency;
-import com.azure.resourcemanager.redisenterprise.models.ClusteringPolicy;
-import com.azure.resourcemanager.redisenterprise.models.DatabasePropertiesGeoReplication;
-import com.azure.resourcemanager.redisenterprise.models.EvictionPolicy;
-import com.azure.resourcemanager.redisenterprise.models.LinkedDatabase;
-import com.azure.resourcemanager.redisenterprise.models.Module;
-import com.azure.resourcemanager.redisenterprise.models.Persistence;
-import com.azure.resourcemanager.redisenterprise.models.Protocol;
-import com.azure.resourcemanager.redisenterprise.models.RdbFrequency;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class DatabasePropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DatabaseProperties model =
- BinaryData
- .fromString(
- "{\"clientProtocol\":\"Encrypted\",\"port\":61111335,\"provisioningState\":\"Failed\",\"resourceState\":\"Running\",\"clusteringPolicy\":\"OSSCluster\",\"evictionPolicy\":\"AllKeysRandom\",\"persistence\":{\"aofEnabled\":true,\"rdbEnabled\":true,\"aofFrequency\":\"always\",\"rdbFrequency\":\"6h\"},\"modules\":[{\"name\":\"xaqwoochcbonqv\",\"args\":\"vlrxnjeaseiph\",\"version\":\"f\"}],\"geoReplication\":{\"groupNickname\":\"eyy\",\"linkedDatabases\":[{\"id\":\"bdlwtgrhpdjpj\",\"state\":\"Unlinking\"}]}}")
- .toObject(DatabaseProperties.class);
- Assertions.assertEquals(Protocol.ENCRYPTED, model.clientProtocol());
- Assertions.assertEquals(61111335, model.port());
- Assertions.assertEquals(ClusteringPolicy.OSSCLUSTER, model.clusteringPolicy());
- Assertions.assertEquals(EvictionPolicy.ALL_KEYS_RANDOM, model.evictionPolicy());
- Assertions.assertEquals(true, model.persistence().aofEnabled());
- Assertions.assertEquals(true, model.persistence().rdbEnabled());
- Assertions.assertEquals(AofFrequency.ALWAYS, model.persistence().aofFrequency());
- Assertions.assertEquals(RdbFrequency.SIXH, model.persistence().rdbFrequency());
- Assertions.assertEquals("xaqwoochcbonqv", model.modules().get(0).name());
- Assertions.assertEquals("vlrxnjeaseiph", model.modules().get(0).args());
- Assertions.assertEquals("eyy", model.geoReplication().groupNickname());
- Assertions.assertEquals("bdlwtgrhpdjpj", model.geoReplication().linkedDatabases().get(0).id());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DatabaseProperties model =
- new DatabaseProperties()
- .withClientProtocol(Protocol.ENCRYPTED)
- .withPort(61111335)
- .withClusteringPolicy(ClusteringPolicy.OSSCLUSTER)
- .withEvictionPolicy(EvictionPolicy.ALL_KEYS_RANDOM)
- .withPersistence(
- new Persistence()
- .withAofEnabled(true)
- .withRdbEnabled(true)
- .withAofFrequency(AofFrequency.ALWAYS)
- .withRdbFrequency(RdbFrequency.SIXH))
- .withModules(Arrays.asList(new Module().withName("xaqwoochcbonqv").withArgs("vlrxnjeaseiph")))
- .withGeoReplication(
- new DatabasePropertiesGeoReplication()
- .withGroupNickname("eyy")
- .withLinkedDatabases(Arrays.asList(new LinkedDatabase().withId("bdlwtgrhpdjpj"))));
- model = BinaryData.fromObject(model).toObject(DatabaseProperties.class);
- Assertions.assertEquals(Protocol.ENCRYPTED, model.clientProtocol());
- Assertions.assertEquals(61111335, model.port());
- Assertions.assertEquals(ClusteringPolicy.OSSCLUSTER, model.clusteringPolicy());
- Assertions.assertEquals(EvictionPolicy.ALL_KEYS_RANDOM, model.evictionPolicy());
- Assertions.assertEquals(true, model.persistence().aofEnabled());
- Assertions.assertEquals(true, model.persistence().rdbEnabled());
- Assertions.assertEquals(AofFrequency.ALWAYS, model.persistence().aofFrequency());
- Assertions.assertEquals(RdbFrequency.SIXH, model.persistence().rdbFrequency());
- Assertions.assertEquals("xaqwoochcbonqv", model.modules().get(0).name());
- Assertions.assertEquals("vlrxnjeaseiph", model.modules().get(0).args());
- Assertions.assertEquals("eyy", model.geoReplication().groupNickname());
- Assertions.assertEquals("bdlwtgrhpdjpj", model.geoReplication().linkedDatabases().get(0).id());
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/DatabaseUpdateTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/DatabaseUpdateTests.java
deleted file mode 100644
index b3064decc012..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/DatabaseUpdateTests.java
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.redisenterprise.models.AofFrequency;
-import com.azure.resourcemanager.redisenterprise.models.ClusteringPolicy;
-import com.azure.resourcemanager.redisenterprise.models.DatabasePropertiesGeoReplication;
-import com.azure.resourcemanager.redisenterprise.models.DatabaseUpdate;
-import com.azure.resourcemanager.redisenterprise.models.EvictionPolicy;
-import com.azure.resourcemanager.redisenterprise.models.Module;
-import com.azure.resourcemanager.redisenterprise.models.Persistence;
-import com.azure.resourcemanager.redisenterprise.models.Protocol;
-import com.azure.resourcemanager.redisenterprise.models.RdbFrequency;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class DatabaseUpdateTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DatabaseUpdate model =
- BinaryData
- .fromString(
- "{\"properties\":{\"clientProtocol\":\"Encrypted\",\"port\":1222672575,\"provisioningState\":\"Creating\",\"resourceState\":\"Disabled\",\"clusteringPolicy\":\"OSSCluster\",\"evictionPolicy\":\"NoEviction\",\"persistence\":{\"aofEnabled\":true,\"rdbEnabled\":false,\"aofFrequency\":\"always\",\"rdbFrequency\":\"1h\"},\"modules\":[{\"name\":\"lazjdyggdtjixhbk\",\"args\":\"fqweykhmene\",\"version\":\"yexfwh\"},{\"name\":\"bcibvyvdcsitynn\",\"args\":\"mdectehfiqscjey\",\"version\":\"hezrkgq\"}],\"geoReplication\":{\"groupNickname\":\"refovgmkqsleyyvx\",\"linkedDatabases\":[]}}}")
- .toObject(DatabaseUpdate.class);
- Assertions.assertEquals(Protocol.ENCRYPTED, model.clientProtocol());
- Assertions.assertEquals(1222672575, model.port());
- Assertions.assertEquals(ClusteringPolicy.OSSCLUSTER, model.clusteringPolicy());
- Assertions.assertEquals(EvictionPolicy.NO_EVICTION, model.evictionPolicy());
- Assertions.assertEquals(true, model.persistence().aofEnabled());
- Assertions.assertEquals(false, model.persistence().rdbEnabled());
- Assertions.assertEquals(AofFrequency.ALWAYS, model.persistence().aofFrequency());
- Assertions.assertEquals(RdbFrequency.ONEH, model.persistence().rdbFrequency());
- Assertions.assertEquals("lazjdyggdtjixhbk", model.modules().get(0).name());
- Assertions.assertEquals("fqweykhmene", model.modules().get(0).args());
- Assertions.assertEquals("refovgmkqsleyyvx", model.geoReplication().groupNickname());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DatabaseUpdate model =
- new DatabaseUpdate()
- .withClientProtocol(Protocol.ENCRYPTED)
- .withPort(1222672575)
- .withClusteringPolicy(ClusteringPolicy.OSSCLUSTER)
- .withEvictionPolicy(EvictionPolicy.NO_EVICTION)
- .withPersistence(
- new Persistence()
- .withAofEnabled(true)
- .withRdbEnabled(false)
- .withAofFrequency(AofFrequency.ALWAYS)
- .withRdbFrequency(RdbFrequency.ONEH))
- .withModules(
- Arrays
- .asList(
- new Module().withName("lazjdyggdtjixhbk").withArgs("fqweykhmene"),
- new Module().withName("bcibvyvdcsitynn").withArgs("mdectehfiqscjey")))
- .withGeoReplication(
- new DatabasePropertiesGeoReplication()
- .withGroupNickname("refovgmkqsleyyvx")
- .withLinkedDatabases(Arrays.asList()));
- model = BinaryData.fromObject(model).toObject(DatabaseUpdate.class);
- Assertions.assertEquals(Protocol.ENCRYPTED, model.clientProtocol());
- Assertions.assertEquals(1222672575, model.port());
- Assertions.assertEquals(ClusteringPolicy.OSSCLUSTER, model.clusteringPolicy());
- Assertions.assertEquals(EvictionPolicy.NO_EVICTION, model.evictionPolicy());
- Assertions.assertEquals(true, model.persistence().aofEnabled());
- Assertions.assertEquals(false, model.persistence().rdbEnabled());
- Assertions.assertEquals(AofFrequency.ALWAYS, model.persistence().aofFrequency());
- Assertions.assertEquals(RdbFrequency.ONEH, model.persistence().rdbFrequency());
- Assertions.assertEquals("lazjdyggdtjixhbk", model.modules().get(0).name());
- Assertions.assertEquals("fqweykhmene", model.modules().get(0).args());
- Assertions.assertEquals("refovgmkqsleyyvx", model.geoReplication().groupNickname());
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesCreateMockTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesCreateMockTests.java
deleted file mode 100644
index 1d026883e806..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesCreateMockTests.java
+++ /dev/null
@@ -1,102 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager;
-import com.azure.resourcemanager.redisenterprise.models.AofFrequency;
-import com.azure.resourcemanager.redisenterprise.models.ClusteringPolicy;
-import com.azure.resourcemanager.redisenterprise.models.Database;
-import com.azure.resourcemanager.redisenterprise.models.DatabasePropertiesGeoReplication;
-import com.azure.resourcemanager.redisenterprise.models.EvictionPolicy;
-import com.azure.resourcemanager.redisenterprise.models.Persistence;
-import com.azure.resourcemanager.redisenterprise.models.Protocol;
-import com.azure.resourcemanager.redisenterprise.models.RdbFrequency;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class DatabasesCreateMockTests {
- @Test
- public void testCreate() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"clientProtocol\":\"Encrypted\",\"port\":1688847935,\"provisioningState\":\"Succeeded\",\"resourceState\":\"CreateFailed\",\"clusteringPolicy\":\"OSSCluster\",\"evictionPolicy\":\"VolatileLFU\",\"persistence\":{\"aofEnabled\":true,\"rdbEnabled\":false,\"aofFrequency\":\"1s\",\"rdbFrequency\":\"12h\"},\"modules\":[],\"geoReplication\":{\"groupNickname\":\"qaqtdoqmcbxvwvxy\",\"linkedDatabases\":[]}},\"id\":\"bhsfxob\",\"name\":\"ytkblmpew\",\"type\":\"wfbkrvrns\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- RedisEnterpriseManager manager =
- RedisEnterpriseManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- Database response =
- manager
- .databases()
- .define("pfqbuaceopzf")
- .withExistingRedisEnterprise("pkteo", "llwptfdy")
- .withClientProtocol(Protocol.ENCRYPTED)
- .withPort(350693240)
- .withClusteringPolicy(ClusteringPolicy.ENTERPRISE_CLUSTER)
- .withEvictionPolicy(EvictionPolicy.VOLATILE_LFU)
- .withPersistence(
- new Persistence()
- .withAofEnabled(true)
- .withRdbEnabled(true)
- .withAofFrequency(AofFrequency.ONES)
- .withRdbFrequency(RdbFrequency.ONEH))
- .withModules(Arrays.asList())
- .withGeoReplication(
- new DatabasePropertiesGeoReplication()
- .withGroupNickname("gbkdmoizpos")
- .withLinkedDatabases(Arrays.asList()))
- .create();
-
- Assertions.assertEquals(Protocol.ENCRYPTED, response.clientProtocol());
- Assertions.assertEquals(1688847935, response.port());
- Assertions.assertEquals(ClusteringPolicy.OSSCLUSTER, response.clusteringPolicy());
- Assertions.assertEquals(EvictionPolicy.VOLATILE_LFU, response.evictionPolicy());
- Assertions.assertEquals(true, response.persistence().aofEnabled());
- Assertions.assertEquals(false, response.persistence().rdbEnabled());
- Assertions.assertEquals(AofFrequency.ONES, response.persistence().aofFrequency());
- Assertions.assertEquals(RdbFrequency.ONE_TWOH, response.persistence().rdbFrequency());
- Assertions.assertEquals("qaqtdoqmcbxvwvxy", response.geoReplication().groupNickname());
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesDeleteMockTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesDeleteMockTests.java
deleted file mode 100644
index 35e3751ef932..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesDeleteMockTests.java
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class DatabasesDeleteMockTests {
- @Test
- public void testDelete() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- RedisEnterpriseManager manager =
- RedisEnterpriseManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager.databases().delete("aloayqcgwrtzju", "gwyzm", "txon", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesExportMockTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesExportMockTests.java
deleted file mode 100644
index 7571027a5ed3..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesExportMockTests.java
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager;
-import com.azure.resourcemanager.redisenterprise.models.ExportClusterParameters;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class DatabasesExportMockTests {
- @Test
- public void testExport() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- RedisEnterpriseManager manager =
- RedisEnterpriseManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager
- .databases()
- .export(
- "us",
- "ttouwaboekqvkel",
- "smv",
- new ExportClusterParameters().withSasUri("xwyjsflhhc"),
- com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesFlushMockTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesFlushMockTests.java
deleted file mode 100644
index 3f68e7a662de..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesFlushMockTests.java
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager;
-import com.azure.resourcemanager.redisenterprise.models.FlushParameters;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class DatabasesFlushMockTests {
- @Test
- public void testFlush() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- RedisEnterpriseManager manager =
- RedisEnterpriseManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager
- .databases()
- .flush(
- "tfolhbnx",
- "nalaulppg",
- "dtpnapnyiropuhp",
- new FlushParameters().withIds(Arrays.asList("pgylg", "git", "medjvcslynqwwncw", "zhxgktrmgucn")),
- com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesForceUnlinkMockTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesForceUnlinkMockTests.java
deleted file mode 100644
index e588496574d9..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesForceUnlinkMockTests.java
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager;
-import com.azure.resourcemanager.redisenterprise.models.ForceUnlinkParameters;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class DatabasesForceUnlinkMockTests {
- @Test
- public void testForceUnlink() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- RedisEnterpriseManager manager =
- RedisEnterpriseManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager
- .databases()
- .forceUnlink(
- "aln",
- "ixisxyawjoy",
- "qcslyjpkiid",
- new ForceUnlinkParameters().withIds(Arrays.asList("exznelixhnr")),
- com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesGetWithResponseMockTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesGetWithResponseMockTests.java
deleted file mode 100644
index e44c59e23dae..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesGetWithResponseMockTests.java
+++ /dev/null
@@ -1,83 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager;
-import com.azure.resourcemanager.redisenterprise.models.AofFrequency;
-import com.azure.resourcemanager.redisenterprise.models.ClusteringPolicy;
-import com.azure.resourcemanager.redisenterprise.models.Database;
-import com.azure.resourcemanager.redisenterprise.models.EvictionPolicy;
-import com.azure.resourcemanager.redisenterprise.models.Protocol;
-import com.azure.resourcemanager.redisenterprise.models.RdbFrequency;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class DatabasesGetWithResponseMockTests {
- @Test
- public void testGetWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"clientProtocol\":\"Plaintext\",\"port\":96984034,\"provisioningState\":\"Succeeded\",\"resourceState\":\"DeleteFailed\",\"clusteringPolicy\":\"OSSCluster\",\"evictionPolicy\":\"NoEviction\",\"persistence\":{\"aofEnabled\":true,\"rdbEnabled\":true,\"aofFrequency\":\"always\",\"rdbFrequency\":\"12h\"},\"modules\":[],\"geoReplication\":{\"groupNickname\":\"blcg\",\"linkedDatabases\":[]}},\"id\":\"vlvqhjkbegi\",\"name\":\"t\",\"type\":\"mxiebw\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- RedisEnterpriseManager manager =
- RedisEnterpriseManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- Database response =
- manager
- .databases()
- .getWithResponse("pow", "wpr", "qlveualupjmkh", com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals(Protocol.PLAINTEXT, response.clientProtocol());
- Assertions.assertEquals(96984034, response.port());
- Assertions.assertEquals(ClusteringPolicy.OSSCLUSTER, response.clusteringPolicy());
- Assertions.assertEquals(EvictionPolicy.NO_EVICTION, response.evictionPolicy());
- Assertions.assertEquals(true, response.persistence().aofEnabled());
- Assertions.assertEquals(true, response.persistence().rdbEnabled());
- Assertions.assertEquals(AofFrequency.ALWAYS, response.persistence().aofFrequency());
- Assertions.assertEquals(RdbFrequency.ONE_TWOH, response.persistence().rdbFrequency());
- Assertions.assertEquals("blcg", response.geoReplication().groupNickname());
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesImportMethodMockTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesImportMethodMockTests.java
deleted file mode 100644
index e1dece8e9b95..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesImportMethodMockTests.java
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager;
-import com.azure.resourcemanager.redisenterprise.models.ImportClusterParameters;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class DatabasesImportMethodMockTests {
- @Test
- public void testImportMethod() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- RedisEnterpriseManager manager =
- RedisEnterpriseManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager
- .databases()
- .importMethod(
- "awjvzunluthnnp",
- "nxipeil",
- "jzuaejxdultskzbb",
- new ImportClusterParameters().withSasUris(Arrays.asList("zumveekgpwo", "uh", "fpbsjyofdxl")),
- com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesListByClusterMockTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesListByClusterMockTests.java
deleted file mode 100644
index e4ae57805bfc..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/DatabasesListByClusterMockTests.java
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager;
-import com.azure.resourcemanager.redisenterprise.models.AofFrequency;
-import com.azure.resourcemanager.redisenterprise.models.ClusteringPolicy;
-import com.azure.resourcemanager.redisenterprise.models.Database;
-import com.azure.resourcemanager.redisenterprise.models.EvictionPolicy;
-import com.azure.resourcemanager.redisenterprise.models.Protocol;
-import com.azure.resourcemanager.redisenterprise.models.RdbFrequency;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class DatabasesListByClusterMockTests {
- @Test
- public void testListByCluster() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"clientProtocol\":\"Encrypted\",\"port\":838785311,\"provisioningState\":\"Creating\",\"resourceState\":\"Creating\",\"clusteringPolicy\":\"OSSCluster\",\"evictionPolicy\":\"AllKeysRandom\",\"persistence\":{\"aofEnabled\":true,\"rdbEnabled\":false,\"aofFrequency\":\"always\",\"rdbFrequency\":\"6h\"},\"modules\":[],\"geoReplication\":{\"groupNickname\":\"cg\",\"linkedDatabases\":[]}},\"id\":\"ndnhj\",\"name\":\"auwhvylwzbtdhx\",\"type\":\"jznb\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- RedisEnterpriseManager manager =
- RedisEnterpriseManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.databases().listByCluster("hzceuojgjrwjue", "otwmcdyt", com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals(Protocol.ENCRYPTED, response.iterator().next().clientProtocol());
- Assertions.assertEquals(838785311, response.iterator().next().port());
- Assertions.assertEquals(ClusteringPolicy.OSSCLUSTER, response.iterator().next().clusteringPolicy());
- Assertions.assertEquals(EvictionPolicy.ALL_KEYS_RANDOM, response.iterator().next().evictionPolicy());
- Assertions.assertEquals(true, response.iterator().next().persistence().aofEnabled());
- Assertions.assertEquals(false, response.iterator().next().persistence().rdbEnabled());
- Assertions.assertEquals(AofFrequency.ALWAYS, response.iterator().next().persistence().aofFrequency());
- Assertions.assertEquals(RdbFrequency.SIXH, response.iterator().next().persistence().rdbFrequency());
- Assertions.assertEquals("cg", response.iterator().next().geoReplication().groupNickname());
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/ExportClusterParametersTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/ExportClusterParametersTests.java
deleted file mode 100644
index 9590cb888fc5..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/ExportClusterParametersTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.redisenterprise.models.ExportClusterParameters;
-import org.junit.jupiter.api.Assertions;
-
-public final class ExportClusterParametersTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ExportClusterParameters model =
- BinaryData.fromString("{\"sasUri\":\"mdajv\"}").toObject(ExportClusterParameters.class);
- Assertions.assertEquals("mdajv", model.sasUri());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ExportClusterParameters model = new ExportClusterParameters().withSasUri("mdajv");
- model = BinaryData.fromObject(model).toObject(ExportClusterParameters.class);
- Assertions.assertEquals("mdajv", model.sasUri());
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/FlushParametersTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/FlushParametersTests.java
deleted file mode 100644
index 5b48bf4dfa7a..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/FlushParametersTests.java
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.redisenterprise.models.FlushParameters;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class FlushParametersTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- FlushParameters model =
- BinaryData.fromString("{\"ids\":[\"yp\",\"rbpizc\",\"r\",\"j\"]}").toObject(FlushParameters.class);
- Assertions.assertEquals("yp", model.ids().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- FlushParameters model = new FlushParameters().withIds(Arrays.asList("yp", "rbpizc", "r", "j"));
- model = BinaryData.fromObject(model).toObject(FlushParameters.class);
- Assertions.assertEquals("yp", model.ids().get(0));
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/ForceUnlinkParametersTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/ForceUnlinkParametersTests.java
deleted file mode 100644
index eabac60a4c47..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/ForceUnlinkParametersTests.java
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.redisenterprise.models.ForceUnlinkParameters;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class ForceUnlinkParametersTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ForceUnlinkParameters model =
- BinaryData
- .fromString("{\"ids\":[\"udwtiukbl\",\"ngkpocipazy\",\"o\",\"gukgjnpiucgygevq\"]}")
- .toObject(ForceUnlinkParameters.class);
- Assertions.assertEquals("udwtiukbl", model.ids().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ForceUnlinkParameters model =
- new ForceUnlinkParameters().withIds(Arrays.asList("udwtiukbl", "ngkpocipazy", "o", "gukgjnpiucgygevq"));
- model = BinaryData.fromObject(model).toObject(ForceUnlinkParameters.class);
- Assertions.assertEquals("udwtiukbl", model.ids().get(0));
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/ImportClusterParametersTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/ImportClusterParametersTests.java
deleted file mode 100644
index 288858100d8f..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/ImportClusterParametersTests.java
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.redisenterprise.models.ImportClusterParameters;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class ImportClusterParametersTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ImportClusterParameters model =
- BinaryData.fromString("{\"sasUris\":[\"tpngjcrcczsqpjh\"]}").toObject(ImportClusterParameters.class);
- Assertions.assertEquals("tpngjcrcczsqpjh", model.sasUris().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ImportClusterParameters model = new ImportClusterParameters().withSasUris(Arrays.asList("tpngjcrcczsqpjh"));
- model = BinaryData.fromObject(model).toObject(ImportClusterParameters.class);
- Assertions.assertEquals("tpngjcrcczsqpjh", model.sasUris().get(0));
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/LinkedDatabaseTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/LinkedDatabaseTests.java
deleted file mode 100644
index 5c53a83717ef..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/LinkedDatabaseTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.redisenterprise.models.LinkedDatabase;
-import org.junit.jupiter.api.Assertions;
-
-public final class LinkedDatabaseTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- LinkedDatabase model =
- BinaryData.fromString("{\"id\":\"mohctb\",\"state\":\"Unlinking\"}").toObject(LinkedDatabase.class);
- Assertions.assertEquals("mohctb", model.id());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- LinkedDatabase model = new LinkedDatabase().withId("mohctb");
- model = BinaryData.fromObject(model).toObject(LinkedDatabase.class);
- Assertions.assertEquals("mohctb", model.id());
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/LocationInfoTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/LocationInfoTests.java
deleted file mode 100644
index 8d035589a9a9..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/LocationInfoTests.java
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.redisenterprise.models.Capability;
-import com.azure.resourcemanager.redisenterprise.models.LocationInfo;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class LocationInfoTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- LocationInfo model =
- BinaryData
- .fromString(
- "{\"location\":\"iyqzrnk\",\"capabilities\":[{\"name\":\"xlwhzlsicoh\",\"value\":false},{\"name\":\"wvl\",\"value\":true},{\"name\":\"w\",\"value\":false},{\"name\":\"nmmqhgyxzkon\",\"value\":false}]}")
- .toObject(LocationInfo.class);
- Assertions.assertEquals("iyqzrnk", model.location());
- Assertions.assertEquals("xlwhzlsicoh", model.capabilities().get(0).name());
- Assertions.assertEquals(false, model.capabilities().get(0).value());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- LocationInfo model =
- new LocationInfo()
- .withLocation("iyqzrnk")
- .withCapabilities(
- Arrays
- .asList(
- new Capability().withName("xlwhzlsicoh").withValue(false),
- new Capability().withName("wvl").withValue(true),
- new Capability().withName("w").withValue(false),
- new Capability().withName("nmmqhgyxzkon").withValue(false)));
- model = BinaryData.fromObject(model).toObject(LocationInfo.class);
- Assertions.assertEquals("iyqzrnk", model.location());
- Assertions.assertEquals("xlwhzlsicoh", model.capabilities().get(0).name());
- Assertions.assertEquals(false, model.capabilities().get(0).value());
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/ManagedServiceIdentityTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/ManagedServiceIdentityTests.java
deleted file mode 100644
index 1c914772d06a..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/ManagedServiceIdentityTests.java
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.redisenterprise.models.ManagedServiceIdentity;
-import com.azure.resourcemanager.redisenterprise.models.ManagedServiceIdentityType;
-import com.azure.resourcemanager.redisenterprise.models.UserAssignedIdentity;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class ManagedServiceIdentityTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ManagedServiceIdentity model =
- BinaryData
- .fromString(
- "{\"principalId\":\"dabd5595-3707-45a0-8967-0fd31b5a53c6\",\"tenantId\":\"ec59c503-6073-4511-9117-7263b52fba34\",\"type\":\"SystemAssigned,"
- + " UserAssigned\",\"userAssignedIdentities\":{\"xaolth\":{\"principalId\":\"90144684-e22a-4def-8298-6504ea6b234f\",\"clientId\":\"a3ae5ac2-093c-43b6-bc9a-18fbabe04950\"},\"gqjbpfzfsin\":{\"principalId\":\"793822a9-fb3b-4447-ad4b-344968f46931\",\"clientId\":\"8058c9f0-23ec-4873-8165-f8a4b89577e3\"}}}")
- .toObject(ManagedServiceIdentity.class);
- Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ManagedServiceIdentity model =
- new ManagedServiceIdentity()
- .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED)
- .withUserAssignedIdentities(
- mapOf("xaolth", new UserAssignedIdentity(), "gqjbpfzfsin", new UserAssignedIdentity()));
- model = BinaryData.fromObject(model).toObject(ManagedServiceIdentity.class);
- Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type());
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/ModuleTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/ModuleTests.java
deleted file mode 100644
index af73ca64f355..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/ModuleTests.java
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.redisenterprise.models.Module;
-import org.junit.jupiter.api.Assertions;
-
-public final class ModuleTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- Module model =
- BinaryData.fromString("{\"name\":\"e\",\"args\":\"alhbx\",\"version\":\"e\"}").toObject(Module.class);
- Assertions.assertEquals("e", model.name());
- Assertions.assertEquals("alhbx", model.args());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- Module model = new Module().withName("e").withArgs("alhbx");
- model = BinaryData.fromObject(model).toObject(Module.class);
- Assertions.assertEquals("e", model.name());
- Assertions.assertEquals("alhbx", model.args());
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/OperationDisplayTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/OperationDisplayTests.java
deleted file mode 100644
index 30619a60b740..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/OperationDisplayTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.redisenterprise.models.OperationDisplay;
-
-public final class OperationDisplayTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- OperationDisplay model =
- BinaryData
- .fromString(
- "{\"provider\":\"yrtih\",\"resource\":\"tijbpzvgnwzsymgl\",\"operation\":\"fcyzkohdbihanufh\",\"description\":\"bj\"}")
- .toObject(OperationDisplay.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- OperationDisplay model = new OperationDisplay();
- model = BinaryData.fromObject(model).toObject(OperationDisplay.class);
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/OperationInnerTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/OperationInnerTests.java
deleted file mode 100644
index 4310fe891b13..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/OperationInnerTests.java
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.redisenterprise.fluent.models.OperationInner;
-import com.azure.resourcemanager.redisenterprise.models.OperationDisplay;
-
-public final class OperationInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- OperationInner model =
- BinaryData
- .fromString(
- "{\"name\":\"usarhmofc\",\"isDataAction\":false,\"display\":{\"provider\":\"urkdtmlx\",\"resource\":\"kuksjtxukcdm\",\"operation\":\"rcryuanzwuxzdxta\",\"description\":\"lhmwhfpmrqobm\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}")
- .toObject(OperationInner.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- OperationInner model = new OperationInner().withDisplay(new OperationDisplay());
- model = BinaryData.fromObject(model).toObject(OperationInner.class);
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/OperationListResultTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/OperationListResultTests.java
deleted file mode 100644
index 1b0b23c23456..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/OperationListResultTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.redisenterprise.models.OperationListResult;
-
-public final class OperationListResultTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- OperationListResult model =
- BinaryData
- .fromString(
- "{\"value\":[{\"name\":\"quvgjxpybczme\",\"isDataAction\":true,\"display\":{\"provider\":\"pbsphrupidgs\",\"resource\":\"bejhphoycmsxa\",\"operation\":\"hdxbmtqio\",\"description\":\"zehtbmu\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"},{\"name\":\"izhwlrxy\",\"isDataAction\":false,\"display\":{\"provider\":\"ijgkdm\",\"resource\":\"azlobcufpdznrbt\",\"operation\":\"qjnqglhqgnufoooj\",\"description\":\"ifsqesaagdfmg\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"},{\"name\":\"rifkwm\",\"isDataAction\":true,\"display\":{\"provider\":\"izntocipao\",\"resource\":\"jpsq\",\"operation\":\"mpoyfd\",\"description\":\"ogknygjofjdd\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}],\"nextLink\":\"upewnwreitjzy\"}")
- .toObject(OperationListResult.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- OperationListResult model = new OperationListResult();
- model = BinaryData.fromObject(model).toObject(OperationListResult.class);
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/OperationStatusInnerTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/OperationStatusInnerTests.java
deleted file mode 100644
index 3368f76057d5..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/OperationStatusInnerTests.java
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.redisenterprise.fluent.models.OperationStatusInner;
-import org.junit.jupiter.api.Assertions;
-
-public final class OperationStatusInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- OperationStatusInner model =
- BinaryData
- .fromString(
- "{\"id\":\"a\",\"name\":\"th\",\"startTime\":\"hab\",\"endTime\":\"pikxwczbyscnpqxu\",\"status\":\"vyq\"}")
- .toObject(OperationStatusInner.class);
- Assertions.assertEquals("a", model.id());
- Assertions.assertEquals("th", model.name());
- Assertions.assertEquals("hab", model.startTime());
- Assertions.assertEquals("pikxwczbyscnpqxu", model.endTime());
- Assertions.assertEquals("vyq", model.status());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- OperationStatusInner model =
- new OperationStatusInner()
- .withId("a")
- .withName("th")
- .withStartTime("hab")
- .withEndTime("pikxwczbyscnpqxu")
- .withStatus("vyq");
- model = BinaryData.fromObject(model).toObject(OperationStatusInner.class);
- Assertions.assertEquals("a", model.id());
- Assertions.assertEquals("th", model.name());
- Assertions.assertEquals("hab", model.startTime());
- Assertions.assertEquals("pikxwczbyscnpqxu", model.endTime());
- Assertions.assertEquals("vyq", model.status());
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/OperationsListMockTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/OperationsListMockTests.java
deleted file mode 100644
index ba33e9507fea..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/OperationsListMockTests.java
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager;
-import com.azure.resourcemanager.redisenterprise.models.Operation;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class OperationsListMockTests {
- @Test
- public void testList() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"name\":\"ypewrmjmwvvjekt\",\"isDataAction\":false,\"display\":{\"provider\":\"hwlrsf\",\"resource\":\"zpwv\",\"operation\":\"dqgbiqylihkaetc\",\"description\":\"vfcivfsnkymuc\"},\"origin\":\"user\",\"actionType\":\"Internal\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- RedisEnterpriseManager manager =
- RedisEnterpriseManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/OperationsStatusGetWithResponseMockTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/OperationsStatusGetWithResponseMockTests.java
deleted file mode 100644
index 06dcd7a9cb7c..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/OperationsStatusGetWithResponseMockTests.java
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager;
-import com.azure.resourcemanager.redisenterprise.models.OperationStatus;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class OperationsStatusGetWithResponseMockTests {
- @Test
- public void testGetWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"id\":\"hfnljkyq\",\"name\":\"vuujq\",\"startTime\":\"dokgjl\",\"endTime\":\"oxgvclt\",\"status\":\"sncghkjeszz\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- RedisEnterpriseManager manager =
- RedisEnterpriseManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- OperationStatus response =
- manager
- .operationsStatus()
- .getWithResponse("bebrjcxerfuwuttt", "fvjrbirphxepcy", com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("hfnljkyq", response.id());
- Assertions.assertEquals("vuujq", response.name());
- Assertions.assertEquals("dokgjl", response.startTime());
- Assertions.assertEquals("oxgvclt", response.endTime());
- Assertions.assertEquals("sncghkjeszz", response.status());
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/PersistenceTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/PersistenceTests.java
deleted file mode 100644
index d55a1c70ed64..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/PersistenceTests.java
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.redisenterprise.models.AofFrequency;
-import com.azure.resourcemanager.redisenterprise.models.Persistence;
-import com.azure.resourcemanager.redisenterprise.models.RdbFrequency;
-import org.junit.jupiter.api.Assertions;
-
-public final class PersistenceTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- Persistence model =
- BinaryData
- .fromString(
- "{\"aofEnabled\":true,\"rdbEnabled\":false,\"aofFrequency\":\"always\",\"rdbFrequency\":\"12h\"}")
- .toObject(Persistence.class);
- Assertions.assertEquals(true, model.aofEnabled());
- Assertions.assertEquals(false, model.rdbEnabled());
- Assertions.assertEquals(AofFrequency.ALWAYS, model.aofFrequency());
- Assertions.assertEquals(RdbFrequency.ONE_TWOH, model.rdbFrequency());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- Persistence model =
- new Persistence()
- .withAofEnabled(true)
- .withRdbEnabled(false)
- .withAofFrequency(AofFrequency.ALWAYS)
- .withRdbFrequency(RdbFrequency.ONE_TWOH);
- model = BinaryData.fromObject(model).toObject(Persistence.class);
- Assertions.assertEquals(true, model.aofEnabled());
- Assertions.assertEquals(false, model.rdbEnabled());
- Assertions.assertEquals(AofFrequency.ALWAYS, model.aofFrequency());
- Assertions.assertEquals(RdbFrequency.ONE_TWOH, model.rdbFrequency());
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/PrivateEndpointConnectionInnerTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/PrivateEndpointConnectionInnerTests.java
deleted file mode 100644
index 6cd32544b5f1..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/PrivateEndpointConnectionInnerTests.java
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.redisenterprise.fluent.models.PrivateEndpointConnectionInner;
-import com.azure.resourcemanager.redisenterprise.models.PrivateEndpoint;
-import com.azure.resourcemanager.redisenterprise.models.PrivateEndpointServiceConnectionStatus;
-import com.azure.resourcemanager.redisenterprise.models.PrivateLinkServiceConnectionState;
-import org.junit.jupiter.api.Assertions;
-
-public final class PrivateEndpointConnectionInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- PrivateEndpointConnectionInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"privateEndpoint\":{\"id\":\"podepoo\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"vamih\",\"actionsRequired\":\"gnarxzxtheo\"},\"provisioningState\":\"Succeeded\"},\"id\":\"vyevcciqi\",\"name\":\"nhungbw\",\"type\":\"zrnf\"}")
- .toObject(PrivateEndpointConnectionInner.class);
- Assertions
- .assertEquals(
- PrivateEndpointServiceConnectionStatus.REJECTED, model.privateLinkServiceConnectionState().status());
- Assertions.assertEquals("vamih", model.privateLinkServiceConnectionState().description());
- Assertions.assertEquals("gnarxzxtheo", model.privateLinkServiceConnectionState().actionsRequired());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- PrivateEndpointConnectionInner model =
- new PrivateEndpointConnectionInner()
- .withPrivateEndpoint(new PrivateEndpoint())
- .withPrivateLinkServiceConnectionState(
- new PrivateLinkServiceConnectionState()
- .withStatus(PrivateEndpointServiceConnectionStatus.REJECTED)
- .withDescription("vamih")
- .withActionsRequired("gnarxzxtheo"));
- model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionInner.class);
- Assertions
- .assertEquals(
- PrivateEndpointServiceConnectionStatus.REJECTED, model.privateLinkServiceConnectionState().status());
- Assertions.assertEquals("vamih", model.privateLinkServiceConnectionState().description());
- Assertions.assertEquals("gnarxzxtheo", model.privateLinkServiceConnectionState().actionsRequired());
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/PrivateEndpointConnectionListResultTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/PrivateEndpointConnectionListResultTests.java
deleted file mode 100644
index 4ab89f86798f..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/PrivateEndpointConnectionListResultTests.java
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.redisenterprise.fluent.models.PrivateEndpointConnectionInner;
-import com.azure.resourcemanager.redisenterprise.models.PrivateEndpointConnectionListResult;
-import java.util.Arrays;
-
-public final class PrivateEndpointConnectionListResultTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- PrivateEndpointConnectionListResult model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\"},\"id\":\"canoaeupf\",\"name\":\"yhltrpmopjmcm\",\"type\":\"tuo\"},{\"properties\":{\"provisioningState\":\"Failed\"},\"id\":\"uaodsfcpk\",\"name\":\"xodpuozmyzydagfu\",\"type\":\"xbezyiuokktwh\"},{\"properties\":{\"provisioningState\":\"Deleting\"},\"id\":\"wqsmbsur\",\"name\":\"xim\",\"type\":\"ryocfsfksymdd\"},{\"properties\":{\"provisioningState\":\"Succeeded\"},\"id\":\"uxh\",\"name\":\"yudxorrqnbp\",\"type\":\"czvyifq\"}]}")
- .toObject(PrivateEndpointConnectionListResult.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- PrivateEndpointConnectionListResult model =
- new PrivateEndpointConnectionListResult()
- .withValue(
- Arrays
- .asList(
- new PrivateEndpointConnectionInner(),
- new PrivateEndpointConnectionInner(),
- new PrivateEndpointConnectionInner(),
- new PrivateEndpointConnectionInner()));
- model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionListResult.class);
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/PrivateEndpointConnectionPropertiesTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/PrivateEndpointConnectionPropertiesTests.java
deleted file mode 100644
index df218cb4d445..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/PrivateEndpointConnectionPropertiesTests.java
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.redisenterprise.fluent.models.PrivateEndpointConnectionProperties;
-import com.azure.resourcemanager.redisenterprise.models.PrivateEndpoint;
-import com.azure.resourcemanager.redisenterprise.models.PrivateEndpointServiceConnectionStatus;
-import com.azure.resourcemanager.redisenterprise.models.PrivateLinkServiceConnectionState;
-import org.junit.jupiter.api.Assertions;
-
-public final class PrivateEndpointConnectionPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- PrivateEndpointConnectionProperties model =
- BinaryData
- .fromString(
- "{\"privateEndpoint\":{\"id\":\"gispemvtzfkufubl\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"qeof\",\"actionsRequired\":\"e\"},\"provisioningState\":\"Deleting\"}")
- .toObject(PrivateEndpointConnectionProperties.class);
- Assertions
- .assertEquals(
- PrivateEndpointServiceConnectionStatus.REJECTED, model.privateLinkServiceConnectionState().status());
- Assertions.assertEquals("qeof", model.privateLinkServiceConnectionState().description());
- Assertions.assertEquals("e", model.privateLinkServiceConnectionState().actionsRequired());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- PrivateEndpointConnectionProperties model =
- new PrivateEndpointConnectionProperties()
- .withPrivateEndpoint(new PrivateEndpoint())
- .withPrivateLinkServiceConnectionState(
- new PrivateLinkServiceConnectionState()
- .withStatus(PrivateEndpointServiceConnectionStatus.REJECTED)
- .withDescription("qeof")
- .withActionsRequired("e"));
- model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionProperties.class);
- Assertions
- .assertEquals(
- PrivateEndpointServiceConnectionStatus.REJECTED, model.privateLinkServiceConnectionState().status());
- Assertions.assertEquals("qeof", model.privateLinkServiceConnectionState().description());
- Assertions.assertEquals("e", model.privateLinkServiceConnectionState().actionsRequired());
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/PrivateEndpointConnectionsDeleteWithResponseMockTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/PrivateEndpointConnectionsDeleteWithResponseMockTests.java
deleted file mode 100644
index 569799298932..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/PrivateEndpointConnectionsDeleteWithResponseMockTests.java
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class PrivateEndpointConnectionsDeleteWithResponseMockTests {
- @Test
- public void testDeleteWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- RedisEnterpriseManager manager =
- RedisEnterpriseManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager
- .privateEndpointConnections()
- .deleteWithResponse("lfmmdnbbglzpswi", "d", "cwyhzdxssa", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java
deleted file mode 100644
index 4558d341901d..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager;
-import com.azure.resourcemanager.redisenterprise.models.PrivateEndpointConnection;
-import com.azure.resourcemanager.redisenterprise.models.PrivateEndpointServiceConnectionStatus;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class PrivateEndpointConnectionsGetWithResponseMockTests {
- @Test
- public void testGetWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"privateEndpoint\":{\"id\":\"thnzd\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"gnayqigynduh\",\"actionsRequired\":\"hqlkthumaqo\"},\"provisioningState\":\"Creating\"},\"id\":\"cdui\",\"name\":\"r\",\"type\":\"gccymvaolpssl\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- RedisEnterpriseManager manager =
- RedisEnterpriseManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PrivateEndpointConnection response =
- manager
- .privateEndpointConnections()
- .getWithResponse("tjrybnwjewgdr", "ervnaenqpehi", "doy", com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions
- .assertEquals(
- PrivateEndpointServiceConnectionStatus.APPROVED, response.privateLinkServiceConnectionState().status());
- Assertions.assertEquals("gnayqigynduh", response.privateLinkServiceConnectionState().description());
- Assertions.assertEquals("hqlkthumaqo", response.privateLinkServiceConnectionState().actionsRequired());
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/PrivateEndpointConnectionsListMockTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/PrivateEndpointConnectionsListMockTests.java
deleted file mode 100644
index 9aff5ed5cd0a..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/PrivateEndpointConnectionsListMockTests.java
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager;
-import com.azure.resourcemanager.redisenterprise.models.PrivateEndpointConnection;
-import com.azure.resourcemanager.redisenterprise.models.PrivateEndpointServiceConnectionStatus;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class PrivateEndpointConnectionsListMockTests {
- @Test
- public void testList() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"sub\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"irx\",\"actionsRequired\":\"ybsrfbjfdtwss\"},\"provisioningState\":\"Deleting\"},\"id\":\"pvjzbe\",\"name\":\"ilzznfqqnvwp\",\"type\":\"qtaruoujmkcjhwq\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- RedisEnterpriseManager manager =
- RedisEnterpriseManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.privateEndpointConnections().list("shqjohxcrsbf", "vasrruvwb", com.azure.core.util.Context.NONE);
-
- Assertions
- .assertEquals(
- PrivateEndpointServiceConnectionStatus.PENDING,
- response.iterator().next().privateLinkServiceConnectionState().status());
- Assertions.assertEquals("irx", response.iterator().next().privateLinkServiceConnectionState().description());
- Assertions
- .assertEquals(
- "ybsrfbjfdtwss", response.iterator().next().privateLinkServiceConnectionState().actionsRequired());
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/PrivateEndpointTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/PrivateEndpointTests.java
deleted file mode 100644
index e3c58a78aa85..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/PrivateEndpointTests.java
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.redisenterprise.models.PrivateEndpoint;
-
-public final class PrivateEndpointTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- PrivateEndpoint model = BinaryData.fromString("{\"id\":\"jbasvmsmjqulngs\"}").toObject(PrivateEndpoint.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- PrivateEndpoint model = new PrivateEndpoint();
- model = BinaryData.fromObject(model).toObject(PrivateEndpoint.class);
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/PrivateLinkResourceInnerTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/PrivateLinkResourceInnerTests.java
deleted file mode 100644
index d785a22925e7..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/PrivateLinkResourceInnerTests.java
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.redisenterprise.fluent.models.PrivateLinkResourceInner;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class PrivateLinkResourceInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- PrivateLinkResourceInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"groupId\":\"uo\",\"requiredMembers\":[\"kg\",\"sauuimj\",\"vxieduugidyj\"],\"requiredZoneNames\":[\"byao\"]},\"id\":\"e\",\"name\":\"csonpclhoco\",\"type\":\"slkevle\"}")
- .toObject(PrivateLinkResourceInner.class);
- Assertions.assertEquals("byao", model.requiredZoneNames().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- PrivateLinkResourceInner model = new PrivateLinkResourceInner().withRequiredZoneNames(Arrays.asList("byao"));
- model = BinaryData.fromObject(model).toObject(PrivateLinkResourceInner.class);
- Assertions.assertEquals("byao", model.requiredZoneNames().get(0));
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/PrivateLinkResourceListResultTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/PrivateLinkResourceListResultTests.java
deleted file mode 100644
index 1fb137970057..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/PrivateLinkResourceListResultTests.java
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.redisenterprise.fluent.models.PrivateLinkResourceInner;
-import com.azure.resourcemanager.redisenterprise.models.PrivateLinkResourceListResult;
-import java.util.Arrays;
-
-public final class PrivateLinkResourceListResultTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- PrivateLinkResourceListResult model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"groupId\":\"jsllrmv\",\"requiredMembers\":[],\"requiredZoneNames\":[]},\"id\":\"atkpnp\",\"name\":\"lexxbczwtru\",\"type\":\"iqzbq\"},{\"properties\":{\"groupId\":\"ovm\",\"requiredMembers\":[],\"requiredZoneNames\":[]},\"id\":\"cspkwlhzdobpxjmf\",\"name\":\"bvvnchrkcciw\",\"type\":\"zjuqkhrsaj\"}]}")
- .toObject(PrivateLinkResourceListResult.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- PrivateLinkResourceListResult model =
- new PrivateLinkResourceListResult()
- .withValue(
- Arrays
- .asList(
- new PrivateLinkResourceInner().withRequiredZoneNames(Arrays.asList()),
- new PrivateLinkResourceInner().withRequiredZoneNames(Arrays.asList())));
- model = BinaryData.fromObject(model).toObject(PrivateLinkResourceListResult.class);
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/PrivateLinkResourcePropertiesTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/PrivateLinkResourcePropertiesTests.java
deleted file mode 100644
index 9d8eaf83c242..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/PrivateLinkResourcePropertiesTests.java
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.redisenterprise.fluent.models.PrivateLinkResourceProperties;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class PrivateLinkResourcePropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- PrivateLinkResourceProperties model =
- BinaryData
- .fromString(
- "{\"groupId\":\"zfbuhf\",\"requiredMembers\":[\"axkffei\",\"th\",\"vmezy\"],\"requiredZoneNames\":[\"xmzsbbzogg\",\"grxwbu\",\"vjxxjnsp\",\"dptkoenkouk\"]}")
- .toObject(PrivateLinkResourceProperties.class);
- Assertions.assertEquals("xmzsbbzogg", model.requiredZoneNames().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- PrivateLinkResourceProperties model =
- new PrivateLinkResourceProperties()
- .withRequiredZoneNames(Arrays.asList("xmzsbbzogg", "grxwbu", "vjxxjnsp", "dptkoenkouk"));
- model = BinaryData.fromObject(model).toObject(PrivateLinkResourceProperties.class);
- Assertions.assertEquals("xmzsbbzogg", model.requiredZoneNames().get(0));
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/PrivateLinkResourcesListByClusterMockTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/PrivateLinkResourcesListByClusterMockTests.java
deleted file mode 100644
index bd162feb4a6d..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/PrivateLinkResourcesListByClusterMockTests.java
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager;
-import com.azure.resourcemanager.redisenterprise.models.PrivateLinkResource;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class PrivateLinkResourcesListByClusterMockTests {
- @Test
- public void testListByCluster() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"groupId\":\"bncblylpstdbhhx\",\"requiredMembers\":[\"dzu\",\"erscdntne\",\"fiwjmygtdssls\",\"tmweriofzpyq\"],\"requiredZoneNames\":[\"wab\",\"ets\",\"hszhedplvwiwu\",\"mwmbes\"]},\"id\":\"nkww\",\"name\":\"pp\",\"type\":\"flcxoga\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- RedisEnterpriseManager manager =
- RedisEnterpriseManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.privateLinkResources().listByCluster("bzmnvdfznud", "od", com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("wab", response.iterator().next().requiredZoneNames().get(0));
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/PrivateLinkServiceConnectionStateTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/PrivateLinkServiceConnectionStateTests.java
deleted file mode 100644
index 87ed5d97b7b1..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/PrivateLinkServiceConnectionStateTests.java
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.redisenterprise.models.PrivateEndpointServiceConnectionStatus;
-import com.azure.resourcemanager.redisenterprise.models.PrivateLinkServiceConnectionState;
-import org.junit.jupiter.api.Assertions;
-
-public final class PrivateLinkServiceConnectionStateTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- PrivateLinkServiceConnectionState model =
- BinaryData
- .fromString(
- "{\"status\":\"Pending\",\"description\":\"ybkzgcwr\",\"actionsRequired\":\"lxxwrljdouskc\"}")
- .toObject(PrivateLinkServiceConnectionState.class);
- Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, model.status());
- Assertions.assertEquals("ybkzgcwr", model.description());
- Assertions.assertEquals("lxxwrljdouskc", model.actionsRequired());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- PrivateLinkServiceConnectionState model =
- new PrivateLinkServiceConnectionState()
- .withStatus(PrivateEndpointServiceConnectionStatus.PENDING)
- .withDescription("ybkzgcwr")
- .withActionsRequired("lxxwrljdouskc");
- model = BinaryData.fromObject(model).toObject(PrivateLinkServiceConnectionState.class);
- Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, model.status());
- Assertions.assertEquals("ybkzgcwr", model.description());
- Assertions.assertEquals("lxxwrljdouskc", model.actionsRequired());
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/RedisEnterprisesCreateMockTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/RedisEnterprisesCreateMockTests.java
deleted file mode 100644
index b86dcba68f90..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/RedisEnterprisesCreateMockTests.java
+++ /dev/null
@@ -1,107 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager;
-import com.azure.resourcemanager.redisenterprise.models.Cluster;
-import com.azure.resourcemanager.redisenterprise.models.ClusterPropertiesEncryption;
-import com.azure.resourcemanager.redisenterprise.models.ManagedServiceIdentity;
-import com.azure.resourcemanager.redisenterprise.models.ManagedServiceIdentityType;
-import com.azure.resourcemanager.redisenterprise.models.Sku;
-import com.azure.resourcemanager.redisenterprise.models.SkuName;
-import com.azure.resourcemanager.redisenterprise.models.TlsVersion;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class RedisEnterprisesCreateMockTests {
- @Test
- public void testCreate() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"sku\":{\"name\":\"EnterpriseFlash_F1500\",\"capacity\":946722582},\"zones\":[\"ehhseyvjusrts\",\"hspkdeemao\",\"mx\",\"gkvtmelmqkrhah\"],\"identity\":{\"principalId\":\"50dd1237-7f30-4f28-bca3-7c9de2f1af8d\",\"tenantId\":\"2f6d603e-e2e2-4f45-84e6-bbe28e373dad\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"encryption\":{},\"hostName\":\"mdua\",\"provisioningState\":\"Succeeded\",\"resourceState\":\"Updating\",\"redisVersion\":\"vfadmws\",\"privateEndpointConnections\":[]},\"location\":\"vxpvgomz\",\"tags\":{\"ali\":\"isgwbnbbeldawkz\",\"hashsfwxosow\":\"urqhaka\"},\"id\":\"xcug\",\"name\":\"cjooxdjebwpucwwf\",\"type\":\"ovbvmeueciv\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- RedisEnterpriseManager manager =
- RedisEnterpriseManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- Cluster response =
- manager
- .redisEnterprises()
- .define("kphywpnvjto")
- .withRegion("kqujidsuyono")
- .withExistingResourceGroup("nxdhbt")
- .withSku(new Sku().withName(SkuName.ENTERPRISE_E20).withCapacity(963875156))
- .withTags(mapOf("dxyt", "aocqxtccmgy", "txhdzh", "moyrxvwfudwpz", "rxsbkyvp", "rqjbhckfrl"))
- .withZones(Arrays.asList("lfplp"))
- .withIdentity(
- new ManagedServiceIdentity()
- .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED)
- .withUserAssignedIdentities(mapOf()))
- .withMinimumTlsVersion(TlsVersion.ONE_ONE)
- .withEncryption(new ClusterPropertiesEncryption())
- .create();
-
- Assertions.assertEquals("vxpvgomz", response.location());
- Assertions.assertEquals("isgwbnbbeldawkz", response.tags().get("ali"));
- Assertions.assertEquals(SkuName.ENTERPRISE_FLASH_F1500, response.sku().name());
- Assertions.assertEquals(946722582, response.sku().capacity());
- Assertions.assertEquals("ehhseyvjusrts", response.zones().get(0));
- Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, response.identity().type());
- Assertions.assertEquals(TlsVersion.ONE_TWO, response.minimumTlsVersion());
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/RedisEnterprisesDeleteMockTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/RedisEnterprisesDeleteMockTests.java
deleted file mode 100644
index 6778b7b1679b..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/RedisEnterprisesDeleteMockTests.java
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class RedisEnterprisesDeleteMockTests {
- @Test
- public void testDelete() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- RedisEnterpriseManager manager =
- RedisEnterpriseManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager.redisEnterprises().delete("ijhtxf", "gx", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/RedisEnterprisesGetByResourceGroupWithResponseMockTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/RedisEnterprisesGetByResourceGroupWithResponseMockTests.java
deleted file mode 100644
index e8c177eca1da..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/RedisEnterprisesGetByResourceGroupWithResponseMockTests.java
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager;
-import com.azure.resourcemanager.redisenterprise.models.Cluster;
-import com.azure.resourcemanager.redisenterprise.models.ManagedServiceIdentityType;
-import com.azure.resourcemanager.redisenterprise.models.SkuName;
-import com.azure.resourcemanager.redisenterprise.models.TlsVersion;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class RedisEnterprisesGetByResourceGroupWithResponseMockTests {
- @Test
- public void testGetByResourceGroupWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"sku\":{\"name\":\"Enterprise_E10\",\"capacity\":68854326},\"zones\":[\"qkkrb\",\"pukgriwflzlfb\"],\"identity\":{\"principalId\":\"55e58f56-9e33-48ba-885c-97ad97c5f51b\",\"tenantId\":\"36313e29-f41c-4156-b818-bc7c5007c8de\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"encryption\":{},\"hostName\":\"ahmgkbrp\",\"provisioningState\":\"Canceled\",\"resourceState\":\"Enabling\",\"redisVersion\":\"nuqqkpikadrgvt\",\"privateEndpointConnections\":[]},\"location\":\"buynhijggm\",\"tags\":{\"zzmhjrunmpxttd\":\"siarbutrcvpn\",\"nbtkcxywnytnr\":\"hrbnlankxmyskpbh\",\"qidybyx\":\"yn\"},\"id\":\"zfcl\",\"name\":\"aaxdbabphlwrq\",\"type\":\"fkts\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- RedisEnterpriseManager manager =
- RedisEnterpriseManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- Cluster response =
- manager
- .redisEnterprises()
- .getByResourceGroupWithResponse("fsm", "nehmpvecx", com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("buynhijggm", response.location());
- Assertions.assertEquals("siarbutrcvpn", response.tags().get("zzmhjrunmpxttd"));
- Assertions.assertEquals(SkuName.ENTERPRISE_E10, response.sku().name());
- Assertions.assertEquals(68854326, response.sku().capacity());
- Assertions.assertEquals("qkkrb", response.zones().get(0));
- Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, response.identity().type());
- Assertions.assertEquals(TlsVersion.ONE_TWO, response.minimumTlsVersion());
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/RedisEnterprisesListByResourceGroupMockTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/RedisEnterprisesListByResourceGroupMockTests.java
deleted file mode 100644
index db5fe315e648..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/RedisEnterprisesListByResourceGroupMockTests.java
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager;
-import com.azure.resourcemanager.redisenterprise.models.Cluster;
-import com.azure.resourcemanager.redisenterprise.models.ManagedServiceIdentityType;
-import com.azure.resourcemanager.redisenterprise.models.SkuName;
-import com.azure.resourcemanager.redisenterprise.models.TlsVersion;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class RedisEnterprisesListByResourceGroupMockTests {
- @Test
- public void testListByResourceGroup() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"sku\":{\"name\":\"EnterpriseFlash_F700\",\"capacity\":1572561560},\"zones\":[\"t\"],\"identity\":{\"principalId\":\"a8db838c-5ddd-40c4-beff-8564c1e49c3f\",\"tenantId\":\"5b6879d8-e7f2-4945-b9c6-8fc033e50d5c\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{}},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"encryption\":{},\"hostName\":\"zywbiex\",\"provisioningState\":\"Failed\",\"resourceState\":\"UpdateFailed\",\"redisVersion\":\"axibxujw\",\"privateEndpointConnections\":[]},\"location\":\"almuzyoxaepdkzja\",\"tags\":{\"zt\":\"xrhdwbavxbniwdjs\"},\"id\":\"dbpgnxytxhp\",\"name\":\"xbzpfzab\",\"type\":\"lcuhxwtctyqiklb\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- RedisEnterpriseManager manager =
- RedisEnterpriseManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.redisEnterprises().listByResourceGroup("hsucoc", com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("almuzyoxaepdkzja", response.iterator().next().location());
- Assertions.assertEquals("xrhdwbavxbniwdjs", response.iterator().next().tags().get("zt"));
- Assertions.assertEquals(SkuName.ENTERPRISE_FLASH_F700, response.iterator().next().sku().name());
- Assertions.assertEquals(1572561560, response.iterator().next().sku().capacity());
- Assertions.assertEquals("t", response.iterator().next().zones().get(0));
- Assertions
- .assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, response.iterator().next().identity().type());
- Assertions.assertEquals(TlsVersion.ONE_ONE, response.iterator().next().minimumTlsVersion());
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/RedisEnterprisesListMockTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/RedisEnterprisesListMockTests.java
deleted file mode 100644
index 4f0cb9d9b1bb..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/RedisEnterprisesListMockTests.java
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager;
-import com.azure.resourcemanager.redisenterprise.models.Cluster;
-import com.azure.resourcemanager.redisenterprise.models.ManagedServiceIdentityType;
-import com.azure.resourcemanager.redisenterprise.models.SkuName;
-import com.azure.resourcemanager.redisenterprise.models.TlsVersion;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class RedisEnterprisesListMockTests {
- @Test
- public void testList() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"sku\":{\"name\":\"Enterprise_E100\",\"capacity\":946920071},\"zones\":[\"zbhvgyuguosv\",\"kfssxqukkf\",\"l\"],\"identity\":{\"principalId\":\"d05e3a18-1e79-4f8c-a32e-611e8bf0eff7\",\"tenantId\":\"1a47553c-b560-458e-ae9d-b13b7525c4cd\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"encryption\":{},\"hostName\":\"lpvlopw\",\"provisioningState\":\"Canceled\",\"resourceState\":\"CreateFailed\",\"redisVersion\":\"pkdwzbai\",\"privateEndpointConnections\":[]},\"location\":\"a\",\"tags\":{\"mtxpsiebtfh\":\"yqupedeojnabckh\",\"htldwk\":\"pesapskrdqmhjj\",\"otogtwrupqs\":\"zxuutkncwscwsvl\",\"cykvceo\":\"vnm\"},\"id\":\"eil\",\"name\":\"vnotyfjfcnj\",\"type\":\"k\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- RedisEnterpriseManager manager =
- RedisEnterpriseManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response = manager.redisEnterprises().list(com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("a", response.iterator().next().location());
- Assertions.assertEquals("yqupedeojnabckh", response.iterator().next().tags().get("mtxpsiebtfh"));
- Assertions.assertEquals(SkuName.ENTERPRISE_E100, response.iterator().next().sku().name());
- Assertions.assertEquals(946920071, response.iterator().next().sku().capacity());
- Assertions.assertEquals("zbhvgyuguosv", response.iterator().next().zones().get(0));
- Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.iterator().next().identity().type());
- Assertions.assertEquals(TlsVersion.ONE_TWO, response.iterator().next().minimumTlsVersion());
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/RegionSkuDetailInnerTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/RegionSkuDetailInnerTests.java
deleted file mode 100644
index 5c0b74e0470f..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/RegionSkuDetailInnerTests.java
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.redisenterprise.fluent.models.RegionSkuDetailInner;
-import com.azure.resourcemanager.redisenterprise.models.Capability;
-import com.azure.resourcemanager.redisenterprise.models.LocationInfo;
-import com.azure.resourcemanager.redisenterprise.models.SkuDetail;
-import com.azure.resourcemanager.redisenterprise.models.SkuName;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class RegionSkuDetailInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- RegionSkuDetailInner model =
- BinaryData
- .fromString(
- "{\"resourceType\":\"jdeyeamdpha\",\"locationInfo\":{\"location\":\"pbuxwgipwhon\",\"capabilities\":[{\"name\":\"shwankixzbinje\",\"value\":true},{\"name\":\"mryw\",\"value\":true}]},\"skuDetails\":{\"name\":\"Enterprise_E10\"}}")
- .toObject(RegionSkuDetailInner.class);
- Assertions.assertEquals("jdeyeamdpha", model.resourceType());
- Assertions.assertEquals("pbuxwgipwhon", model.locationInfo().location());
- Assertions.assertEquals("shwankixzbinje", model.locationInfo().capabilities().get(0).name());
- Assertions.assertEquals(true, model.locationInfo().capabilities().get(0).value());
- Assertions.assertEquals(SkuName.ENTERPRISE_E10, model.skuDetails().name());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- RegionSkuDetailInner model =
- new RegionSkuDetailInner()
- .withResourceType("jdeyeamdpha")
- .withLocationInfo(
- new LocationInfo()
- .withLocation("pbuxwgipwhon")
- .withCapabilities(
- Arrays
- .asList(
- new Capability().withName("shwankixzbinje").withValue(true),
- new Capability().withName("mryw").withValue(true))))
- .withSkuDetails(new SkuDetail().withName(SkuName.ENTERPRISE_E10));
- model = BinaryData.fromObject(model).toObject(RegionSkuDetailInner.class);
- Assertions.assertEquals("jdeyeamdpha", model.resourceType());
- Assertions.assertEquals("pbuxwgipwhon", model.locationInfo().location());
- Assertions.assertEquals("shwankixzbinje", model.locationInfo().capabilities().get(0).name());
- Assertions.assertEquals(true, model.locationInfo().capabilities().get(0).value());
- Assertions.assertEquals(SkuName.ENTERPRISE_E10, model.skuDetails().name());
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/RegionSkuDetailsTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/RegionSkuDetailsTests.java
deleted file mode 100644
index b9d124b48217..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/RegionSkuDetailsTests.java
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.redisenterprise.fluent.models.RegionSkuDetailInner;
-import com.azure.resourcemanager.redisenterprise.models.LocationInfo;
-import com.azure.resourcemanager.redisenterprise.models.RegionSkuDetails;
-import com.azure.resourcemanager.redisenterprise.models.SkuDetail;
-import com.azure.resourcemanager.redisenterprise.models.SkuName;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class RegionSkuDetailsTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- RegionSkuDetails model =
- BinaryData
- .fromString(
- "{\"value\":[{\"resourceType\":\"dnfyhxdeoejzicwi\",\"locationInfo\":{\"location\":\"ttgzfbis\",\"capabilities\":[]},\"skuDetails\":{\"name\":\"Enterprise_E20\"}}]}")
- .toObject(RegionSkuDetails.class);
- Assertions.assertEquals("dnfyhxdeoejzicwi", model.value().get(0).resourceType());
- Assertions.assertEquals("ttgzfbis", model.value().get(0).locationInfo().location());
- Assertions.assertEquals(SkuName.ENTERPRISE_E20, model.value().get(0).skuDetails().name());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- RegionSkuDetails model =
- new RegionSkuDetails()
- .withValue(
- Arrays
- .asList(
- new RegionSkuDetailInner()
- .withResourceType("dnfyhxdeoejzicwi")
- .withLocationInfo(
- new LocationInfo().withLocation("ttgzfbis").withCapabilities(Arrays.asList()))
- .withSkuDetails(new SkuDetail().withName(SkuName.ENTERPRISE_E20))));
- model = BinaryData.fromObject(model).toObject(RegionSkuDetails.class);
- Assertions.assertEquals("dnfyhxdeoejzicwi", model.value().get(0).resourceType());
- Assertions.assertEquals("ttgzfbis", model.value().get(0).locationInfo().location());
- Assertions.assertEquals(SkuName.ENTERPRISE_E20, model.value().get(0).skuDetails().name());
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/SkuDetailTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/SkuDetailTests.java
deleted file mode 100644
index b34533b1da79..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/SkuDetailTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.redisenterprise.models.SkuDetail;
-import com.azure.resourcemanager.redisenterprise.models.SkuName;
-import org.junit.jupiter.api.Assertions;
-
-public final class SkuDetailTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- SkuDetail model = BinaryData.fromString("{\"name\":\"Enterprise_E100\"}").toObject(SkuDetail.class);
- Assertions.assertEquals(SkuName.ENTERPRISE_E100, model.name());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- SkuDetail model = new SkuDetail().withName(SkuName.ENTERPRISE_E100);
- model = BinaryData.fromObject(model).toObject(SkuDetail.class);
- Assertions.assertEquals(SkuName.ENTERPRISE_E100, model.name());
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/SkuTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/SkuTests.java
deleted file mode 100644
index 445d576836c0..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/SkuTests.java
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.redisenterprise.models.Sku;
-import com.azure.resourcemanager.redisenterprise.models.SkuName;
-import org.junit.jupiter.api.Assertions;
-
-public final class SkuTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- Sku model = BinaryData.fromString("{\"name\":\"Enterprise_E20\",\"capacity\":1041872032}").toObject(Sku.class);
- Assertions.assertEquals(SkuName.ENTERPRISE_E20, model.name());
- Assertions.assertEquals(1041872032, model.capacity());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- Sku model = new Sku().withName(SkuName.ENTERPRISE_E20).withCapacity(1041872032);
- model = BinaryData.fromObject(model).toObject(Sku.class);
- Assertions.assertEquals(SkuName.ENTERPRISE_E20, model.name());
- Assertions.assertEquals(1041872032, model.capacity());
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/SkusListMockTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/SkusListMockTests.java
deleted file mode 100644
index 12ba74366352..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/SkusListMockTests.java
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager;
-import com.azure.resourcemanager.redisenterprise.models.RegionSkuDetail;
-import com.azure.resourcemanager.redisenterprise.models.SkuName;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class SkusListMockTests {
- @Test
- public void testList() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"resourceType\":\"kqze\",\"locationInfo\":{\"location\":\"dltfz\",\"capabilities\":[]},\"skuDetails\":{\"name\":\"EnterpriseFlash_F1500\"}}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- RedisEnterpriseManager manager =
- RedisEnterpriseManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response = manager.skus().list("konzmnsik", com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("kqze", response.iterator().next().resourceType());
- Assertions.assertEquals("dltfz", response.iterator().next().locationInfo().location());
- Assertions.assertEquals(SkuName.ENTERPRISE_FLASH_F1500, response.iterator().next().skuDetails().name());
- }
-}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/UserAssignedIdentityTests.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/UserAssignedIdentityTests.java
deleted file mode 100644
index 083300105568..000000000000
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/test/java/com/azure/resourcemanager/redisenterprise/generated/UserAssignedIdentityTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.redisenterprise.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.redisenterprise.models.UserAssignedIdentity;
-
-public final class UserAssignedIdentityTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- UserAssignedIdentity model =
- BinaryData
- .fromString(
- "{\"principalId\":\"5c1631dd-070c-4338-9225-6fff8f2c7868\",\"clientId\":\"a805f8c8-5f6c-431e-b4b3-0a93d1604117\"}")
- .toObject(UserAssignedIdentity.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- UserAssignedIdentity model = new UserAssignedIdentity();
- model = BinaryData.fromObject(model).toObject(UserAssignedIdentity.class);
- }
-}