From a9ce5112e57ecf82453adb6a6c6e04729cb0d851 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 1 Mar 2021 18:39:37 +0000 Subject: [PATCH] CodeGen from PR 13210 in Azure/azure-rest-api-specs Merge 705a776978fb46ca3807591d79ad0d646484d3e2 into 998796ec2f30462a99d9f918afe1d16ed64ecf65 --- .../CHANGELOG.md | 3 +- .../README.md | 4 +- .../pom.xml | 2 +- .../fluent/DatabasesClient.java | 73 ---- .../fluent/models/DatabaseInner.java | 31 -- .../implementation/DatabaseImpl.java | 24 -- .../implementation/DatabasesClientImpl.java | 315 ------------------ .../implementation/DatabasesImpl.java | 15 - .../RedisEnterpriseManagementClientImpl.java | 2 +- .../redisenterprise/models/Database.java | 56 +--- .../DatabasePropertiesGeoReplication.java | 80 ----- .../models/DatabaseUpdate.java | 30 -- .../redisenterprise/models/Databases.java | 33 -- .../models/ForceUnlinkParameters.java | 56 ---- .../redisenterprise/models/LinkState.java | 43 --- .../models/LinkedDatabase.java | 65 ---- 16 files changed, 8 insertions(+), 824 deletions(-) delete mode 100644 sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/DatabasePropertiesGeoReplication.java delete mode 100644 sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/ForceUnlinkParameters.java delete mode 100644 sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/LinkState.java delete mode 100644 sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/LinkedDatabase.java diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/CHANGELOG.md b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/CHANGELOG.md index bde7922cad7a..f62ee2ee94c9 100644 --- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/CHANGELOG.md +++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/CHANGELOG.md @@ -1,7 +1,8 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0-beta.1 (2021-03-01) +- Azure Resource Manager RedisEnterprise client library for Java. This package contains Microsoft Azure SDK for RedisEnterprise Management SDK. REST API for managing Redis Enterprise resources in Azure. Package tag package-2021-03. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## 1.0.0-beta.1 (2021-02-23) diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/README.md b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/README.md index 8554b107bb4a..ae327d5ed31c 100644 --- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/README.md +++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/README.md @@ -2,7 +2,7 @@ Azure Resource Manager RedisEnterprise client library for Java. -This package contains Microsoft Azure SDK for RedisEnterprise Management SDK. REST API for managing Redis Enterprise resources in Azure. Package tag package-preview-2021-02. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for RedisEnterprise Management SDK. REST API for managing Redis Enterprise resources in Azure. Package tag package-2021-03. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-redisenterprise - 1.0.0-beta.1 + 1.0.0-beta.2 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/pom.xml b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/pom.xml index 990161015bf1..3817805197b0 100644 --- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/pom.xml +++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/pom.xml @@ -13,7 +13,7 @@ jar Microsoft Azure SDK for RedisEnterprise Management - This package contains Microsoft Azure SDK for RedisEnterprise Management SDK. REST API for managing Redis Enterprise resources in Azure. Package tag package-preview-2021-02. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt + This package contains Microsoft Azure SDK for RedisEnterprise Management SDK. REST API for managing Redis Enterprise resources in Azure. Package tag package-2021-03. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt https://github.com/Azure/azure-sdk-for-java diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/DatabasesClient.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/DatabasesClient.java index 3f032417d216..f9f98491e9b6 100644 --- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/DatabasesClient.java +++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/DatabasesClient.java @@ -15,7 +15,6 @@ import com.azure.resourcemanager.redisenterprise.fluent.models.DatabaseInner; import com.azure.resourcemanager.redisenterprise.models.DatabaseUpdate; import com.azure.resourcemanager.redisenterprise.models.ExportClusterParameters; -import com.azure.resourcemanager.redisenterprise.models.ForceUnlinkParameters; import com.azure.resourcemanager.redisenterprise.models.ImportClusterParameters; import com.azure.resourcemanager.redisenterprise.models.RegenerateKeyParameters; @@ -511,76 +510,4 @@ void export( String databaseName, ExportClusterParameters parameters, Context context); - - /** - * Forcibly removes the link to the specified database resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the RedisEnterprise cluster. - * @param databaseName The name of the database. - * @param parameters Information identifying the database to be unlinked. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, Void> beginForceUnlink( - String resourceGroupName, String clusterName, String databaseName, ForceUnlinkParameters parameters); - - /** - * Forcibly removes the link to the specified database resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the RedisEnterprise cluster. - * @param databaseName The name of the database. - * @param parameters Information identifying the database to be unlinked. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, Void> beginForceUnlink( - String resourceGroupName, - String clusterName, - String databaseName, - ForceUnlinkParameters parameters, - Context context); - - /** - * Forcibly removes the link to the specified database resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the RedisEnterprise cluster. - * @param databaseName The name of the database. - * @param parameters Information identifying the database to be unlinked. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void forceUnlink( - String resourceGroupName, String clusterName, String databaseName, ForceUnlinkParameters parameters); - - /** - * Forcibly removes the link to the specified database resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the RedisEnterprise cluster. - * @param databaseName The name of the database. - * @param parameters Information identifying the database to be unlinked. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void forceUnlink( - String resourceGroupName, - String clusterName, - String databaseName, - ForceUnlinkParameters parameters, - Context context); } 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 36dccf73b9d4..80d73098f090 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 @@ -9,7 +9,6 @@ import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.redisenterprise.models.ClusteringPolicy; -import com.azure.resourcemanager.redisenterprise.models.DatabasePropertiesGeoReplication; import com.azure.resourcemanager.redisenterprise.models.EvictionPolicy; import com.azure.resourcemanager.redisenterprise.models.Module; import com.azure.resourcemanager.redisenterprise.models.Persistence; @@ -77,13 +76,6 @@ public class DatabaseInner extends ProxyResource { @JsonProperty(value = "properties.modules") private List modules; - /* - * Optional set of properties to configure geo replication for this - * database. - */ - @JsonProperty(value = "properties.geoReplication") - private DatabasePropertiesGeoReplication geoReplication; - /** * Get the clientProtocol property: Specifies whether redis clients can connect using TLS-encrypted or plaintext * redis protocols. Default is TLS-encrypted. @@ -228,26 +220,6 @@ public DatabaseInner withModules(List modules) { return this; } - /** - * Get the geoReplication property: Optional set of properties to configure geo replication for this database. - * - * @return the geoReplication value. - */ - public DatabasePropertiesGeoReplication geoReplication() { - return this.geoReplication; - } - - /** - * Set the geoReplication property: Optional set of properties to configure geo replication for this database. - * - * @param geoReplication the geoReplication value to set. - * @return the DatabaseInner object itself. - */ - public DatabaseInner withGeoReplication(DatabasePropertiesGeoReplication geoReplication) { - this.geoReplication = geoReplication; - return this; - } - /** * Validates the instance. * @@ -260,8 +232,5 @@ public void validate() { if (modules() != null) { modules().forEach(e -> e.validate()); } - if (geoReplication() != null) { - geoReplication().validate(); - } } } 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 9156ad562743..7c03c0b18343 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 @@ -11,11 +11,9 @@ import com.azure.resourcemanager.redisenterprise.models.AccessKeys; import com.azure.resourcemanager.redisenterprise.models.ClusteringPolicy; import com.azure.resourcemanager.redisenterprise.models.Database; -import com.azure.resourcemanager.redisenterprise.models.DatabasePropertiesGeoReplication; import com.azure.resourcemanager.redisenterprise.models.DatabaseUpdate; import com.azure.resourcemanager.redisenterprise.models.EvictionPolicy; import com.azure.resourcemanager.redisenterprise.models.ExportClusterParameters; -import com.azure.resourcemanager.redisenterprise.models.ForceUnlinkParameters; import com.azure.resourcemanager.redisenterprise.models.ImportClusterParameters; import com.azure.resourcemanager.redisenterprise.models.Module; import com.azure.resourcemanager.redisenterprise.models.Persistence; @@ -80,10 +78,6 @@ public List modules() { } } - public DatabasePropertiesGeoReplication geoReplication() { - return this.innerModel().geoReplication(); - } - public DatabaseInner innerModel() { return this.innerObject; } @@ -215,14 +209,6 @@ public void export(ExportClusterParameters parameters, Context context) { serviceManager.databases().export(resourceGroupName, clusterName, databaseName, parameters, context); } - public void forceUnlink(ForceUnlinkParameters parameters) { - serviceManager.databases().forceUnlink(resourceGroupName, clusterName, databaseName, parameters); - } - - public void forceUnlink(ForceUnlinkParameters parameters, Context context) { - serviceManager.databases().forceUnlink(resourceGroupName, clusterName, databaseName, parameters, context); - } - public DatabaseImpl withClientProtocol(Protocol clientProtocol) { if (isInCreateMode()) { this.innerModel().withClientProtocol(clientProtocol); @@ -278,16 +264,6 @@ public DatabaseImpl withModules(List modules) { } } - public DatabaseImpl withGeoReplication(DatabasePropertiesGeoReplication geoReplication) { - if (isInCreateMode()) { - this.innerModel().withGeoReplication(geoReplication); - return this; - } else { - this.updateParameters.withGeoReplication(geoReplication); - return this; - } - } - private boolean isInCreateMode() { return this.innerModel().id() == null; } diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/DatabasesClientImpl.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/DatabasesClientImpl.java index 523bef90bc4b..3604fa08a0a6 100644 --- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/DatabasesClientImpl.java +++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/DatabasesClientImpl.java @@ -40,7 +40,6 @@ import com.azure.resourcemanager.redisenterprise.models.DatabaseList; import com.azure.resourcemanager.redisenterprise.models.DatabaseUpdate; import com.azure.resourcemanager.redisenterprise.models.ExportClusterParameters; -import com.azure.resourcemanager.redisenterprise.models.ForceUnlinkParameters; import com.azure.resourcemanager.redisenterprise.models.ImportClusterParameters; import com.azure.resourcemanager.redisenterprise.models.RegenerateKeyParameters; import java.nio.ByteBuffer; @@ -223,23 +222,6 @@ Mono>> export( @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache" - + "/redisEnterprise/{clusterName}/databases/{databaseName}/forceUnlink") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> forceUnlink( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("clusterName") String clusterName, - @PathParam("databaseName") String databaseName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") ForceUnlinkParameters parameters, - @HeaderParam("Accept") String accept, - Context context); - @Headers({"Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -2462,303 +2444,6 @@ public void export( exportAsync(resourceGroupName, clusterName, databaseName, parameters, context).block(); } - /** - * Forcibly removes the link to the specified database resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the RedisEnterprise cluster. - * @param databaseName The name of the database. - * @param parameters Information identifying the database to be unlinked. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> forceUnlinkWithResponseAsync( - String resourceGroupName, String clusterName, String databaseName, ForceUnlinkParameters parameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .forceUnlink( - this.client.getEndpoint(), - resourceGroupName, - clusterName, - databaseName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - parameters, - accept, - context)) - .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()))); - } - - /** - * Forcibly removes the link to the specified database resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the RedisEnterprise cluster. - * @param databaseName The name of the database. - * @param parameters Information identifying the database to be unlinked. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> forceUnlinkWithResponseAsync( - String resourceGroupName, - String clusterName, - String databaseName, - ForceUnlinkParameters parameters, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .forceUnlink( - this.client.getEndpoint(), - resourceGroupName, - clusterName, - databaseName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - parameters, - accept, - context); - } - - /** - * Forcibly removes the link to the specified database resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the RedisEnterprise cluster. - * @param databaseName The name of the database. - * @param parameters Information identifying the database to be unlinked. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, Void> beginForceUnlinkAsync( - String resourceGroupName, String clusterName, String databaseName, ForceUnlinkParameters parameters) { - Mono>> mono = - forceUnlinkWithResponseAsync(resourceGroupName, clusterName, databaseName, parameters); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); - } - - /** - * Forcibly removes the link to the specified database resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the RedisEnterprise cluster. - * @param databaseName The name of the database. - * @param parameters Information identifying the database to be unlinked. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, Void> beginForceUnlinkAsync( - String resourceGroupName, - String clusterName, - String databaseName, - ForceUnlinkParameters parameters, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - forceUnlinkWithResponseAsync(resourceGroupName, clusterName, databaseName, parameters, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Forcibly removes the link to the specified database resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the RedisEnterprise cluster. - * @param databaseName The name of the database. - * @param parameters Information identifying the database to be unlinked. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, Void> beginForceUnlink( - String resourceGroupName, String clusterName, String databaseName, ForceUnlinkParameters parameters) { - return beginForceUnlinkAsync(resourceGroupName, clusterName, databaseName, parameters).getSyncPoller(); - } - - /** - * Forcibly removes the link to the specified database resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the RedisEnterprise cluster. - * @param databaseName The name of the database. - * @param parameters Information identifying the database to be unlinked. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, Void> beginForceUnlink( - String resourceGroupName, - String clusterName, - String databaseName, - ForceUnlinkParameters parameters, - Context context) { - return beginForceUnlinkAsync(resourceGroupName, clusterName, databaseName, parameters, context).getSyncPoller(); - } - - /** - * Forcibly removes the link to the specified database resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the RedisEnterprise cluster. - * @param databaseName The name of the database. - * @param parameters Information identifying the database to be unlinked. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono forceUnlinkAsync( - String resourceGroupName, String clusterName, String databaseName, ForceUnlinkParameters parameters) { - return beginForceUnlinkAsync(resourceGroupName, clusterName, databaseName, parameters) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Forcibly removes the link to the specified database resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the RedisEnterprise cluster. - * @param databaseName The name of the database. - * @param parameters Information identifying the database to be unlinked. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono forceUnlinkAsync( - String resourceGroupName, - String clusterName, - String databaseName, - ForceUnlinkParameters parameters, - Context context) { - return beginForceUnlinkAsync(resourceGroupName, clusterName, databaseName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Forcibly removes the link to the specified database resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the RedisEnterprise cluster. - * @param databaseName The name of the database. - * @param parameters Information identifying the database to be unlinked. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 forceUnlink( - String resourceGroupName, String clusterName, String databaseName, ForceUnlinkParameters parameters) { - forceUnlinkAsync(resourceGroupName, clusterName, databaseName, parameters).block(); - } - - /** - * Forcibly removes the link to the specified database resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the RedisEnterprise cluster. - * @param databaseName The name of the database. - * @param parameters Information identifying the database to be unlinked. - * @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 forceUnlink( - String resourceGroupName, - String clusterName, - String databaseName, - ForceUnlinkParameters parameters, - Context context) { - forceUnlinkAsync(resourceGroupName, clusterName, databaseName, parameters, context).block(); - } - /** * Get the next page of items. * diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/DatabasesImpl.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/DatabasesImpl.java index 0255e3cc97df..a449620ac0f9 100644 --- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/DatabasesImpl.java +++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/DatabasesImpl.java @@ -17,7 +17,6 @@ import com.azure.resourcemanager.redisenterprise.models.Database; import com.azure.resourcemanager.redisenterprise.models.Databases; import com.azure.resourcemanager.redisenterprise.models.ExportClusterParameters; -import com.azure.resourcemanager.redisenterprise.models.ForceUnlinkParameters; import com.azure.resourcemanager.redisenterprise.models.ImportClusterParameters; import com.azure.resourcemanager.redisenterprise.models.RegenerateKeyParameters; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -155,20 +154,6 @@ public void export( this.serviceClient().export(resourceGroupName, clusterName, databaseName, parameters, context); } - public void forceUnlink( - String resourceGroupName, String clusterName, String databaseName, ForceUnlinkParameters parameters) { - this.serviceClient().forceUnlink(resourceGroupName, clusterName, databaseName, parameters); - } - - public void forceUnlink( - String resourceGroupName, - String clusterName, - String databaseName, - ForceUnlinkParameters parameters, - Context context) { - this.serviceClient().forceUnlink(resourceGroupName, clusterName, databaseName, parameters, context); - } - public Database getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { 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 b1eb2b1daf77..6ec6f99e977f 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 @@ -209,7 +209,7 @@ public PrivateLinkResourcesClient getPrivateLinkResources() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2021-02-01-preview"; + this.apiVersion = "2021-03-01"; this.operations = new OperationsClientImpl(this); this.operationsStatus = new OperationsStatusClientImpl(this); this.redisEnterprises = new RedisEnterprisesClientImpl(this); 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 a4fa1cdeeba9..033afa8b0349 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 @@ -91,13 +91,6 @@ public interface Database { */ List modules(); - /** - * Gets the geoReplication property: Optional set of properties to configure geo replication for this database. - * - * @return the geoReplication value. - */ - DatabasePropertiesGeoReplication geoReplication(); - /** * Gets the inner com.azure.resourcemanager.redisenterprise.fluent.models.DatabaseInner object. * @@ -135,8 +128,7 @@ interface WithCreate DefinitionStages.WithClusteringPolicy, DefinitionStages.WithEvictionPolicy, DefinitionStages.WithPersistence, - DefinitionStages.WithModules, - DefinitionStages.WithGeoReplication { + DefinitionStages.WithModules { /** * Executes the create request. * @@ -218,17 +210,6 @@ interface WithModules { */ WithCreate withModules(List modules); } - /** The stage of the Database definition allowing to specify geoReplication. */ - interface WithGeoReplication { - /** - * Specifies the geoReplication property: Optional set of properties to configure geo replication for this - * database.. - * - * @param geoReplication Optional set of properties to configure geo replication for this database. - * @return the next definition stage. - */ - WithCreate withGeoReplication(DatabasePropertiesGeoReplication geoReplication); - } } /** * Begins update for the Database resource. @@ -243,8 +224,7 @@ interface Update UpdateStages.WithClusteringPolicy, UpdateStages.WithEvictionPolicy, UpdateStages.WithPersistence, - UpdateStages.WithModules, - UpdateStages.WithGeoReplication { + UpdateStages.WithModules { /** * Executes the update request. * @@ -317,17 +297,6 @@ interface WithModules { */ Update withModules(List modules); } - /** The stage of the Database update allowing to specify geoReplication. */ - interface WithGeoReplication { - /** - * Specifies the geoReplication property: Optional set of properties to configure geo replication for this - * database.. - * - * @param geoReplication Optional set of properties to configure geo replication for this database. - * @return the next definition stage. - */ - Update withGeoReplication(DatabasePropertiesGeoReplication geoReplication); - } } /** * Refreshes the resource to sync with Azure. @@ -428,25 +397,4 @@ interface WithGeoReplication { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void export(ExportClusterParameters parameters, Context context); - - /** - * Forcibly removes the link to the specified database resource. - * - * @param parameters Information identifying the database to be unlinked. - * @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 forceUnlink(ForceUnlinkParameters parameters); - - /** - * Forcibly removes the link to the specified database resource. - * - * @param parameters Information identifying the database to be unlinked. - * @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 forceUnlink(ForceUnlinkParameters parameters, Context context); } diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/DatabasePropertiesGeoReplication.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/DatabasePropertiesGeoReplication.java deleted file mode 100644 index 35d25c57af04..000000000000 --- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/DatabasePropertiesGeoReplication.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.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Optional set of properties to configure geo replication for this database. */ -@Fluent -public final class DatabasePropertiesGeoReplication { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DatabasePropertiesGeoReplication.class); - - /* - * Name for the group of linked database resources - */ - @JsonProperty(value = "groupNickname") - private String groupNickname; - - /* - * List of database resources to link with this database - */ - @JsonProperty(value = "linkedDatabases") - private List linkedDatabases; - - /** - * Get the groupNickname property: Name for the group of linked database resources. - * - * @return the groupNickname value. - */ - public String groupNickname() { - return this.groupNickname; - } - - /** - * Set the groupNickname property: Name for the group of linked database resources. - * - * @param groupNickname the groupNickname value to set. - * @return the DatabasePropertiesGeoReplication object itself. - */ - public DatabasePropertiesGeoReplication withGroupNickname(String groupNickname) { - this.groupNickname = groupNickname; - return this; - } - - /** - * Get the linkedDatabases property: List of database resources to link with this database. - * - * @return the linkedDatabases value. - */ - public List linkedDatabases() { - return this.linkedDatabases; - } - - /** - * Set the linkedDatabases property: List of database resources to link with this database. - * - * @param linkedDatabases the linkedDatabases value to set. - * @return the DatabasePropertiesGeoReplication object itself. - */ - public DatabasePropertiesGeoReplication withLinkedDatabases(List linkedDatabases) { - this.linkedDatabases = linkedDatabases; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (linkedDatabases() != null) { - linkedDatabases().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/DatabaseUpdate.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/DatabaseUpdate.java index 52f01906a2b3..0bcb8abbd136 100644 --- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/DatabaseUpdate.java +++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/DatabaseUpdate.java @@ -68,13 +68,6 @@ public class DatabaseUpdate { @JsonProperty(value = "properties.modules") private List modules; - /* - * Optional set of properties to configure geo replication for this - * database. - */ - @JsonProperty(value = "properties.geoReplication") - private DatabasePropertiesGeoReplication geoReplication; - /** * Get the clientProtocol property: Specifies whether redis clients can connect using TLS-encrypted or plaintext * redis protocols. Default is TLS-encrypted. @@ -219,26 +212,6 @@ public DatabaseUpdate withModules(List modules) { return this; } - /** - * Get the geoReplication property: Optional set of properties to configure geo replication for this database. - * - * @return the geoReplication value. - */ - public DatabasePropertiesGeoReplication geoReplication() { - return this.geoReplication; - } - - /** - * Set the geoReplication property: Optional set of properties to configure geo replication for this database. - * - * @param geoReplication the geoReplication value to set. - * @return the DatabaseUpdate object itself. - */ - public DatabaseUpdate withGeoReplication(DatabasePropertiesGeoReplication geoReplication) { - this.geoReplication = geoReplication; - return this; - } - /** * Validates the instance. * @@ -251,8 +224,5 @@ public void validate() { if (modules() != null) { modules().forEach(e -> e.validate()); } - if (geoReplication() != null) { - geoReplication().validate(); - } } } diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/Databases.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/Databases.java index 15367dd3baa2..ec608137ddc2 100644 --- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/Databases.java +++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/Databases.java @@ -216,39 +216,6 @@ void export( ExportClusterParameters parameters, Context context); - /** - * Forcibly removes the link to the specified database resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the RedisEnterprise cluster. - * @param databaseName The name of the database. - * @param parameters Information identifying the database to be unlinked. - * @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 forceUnlink( - String resourceGroupName, String clusterName, String databaseName, ForceUnlinkParameters parameters); - - /** - * Forcibly removes the link to the specified database resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the RedisEnterprise cluster. - * @param databaseName The name of the database. - * @param parameters Information identifying the database to be unlinked. - * @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 forceUnlink( - String resourceGroupName, - String clusterName, - String databaseName, - ForceUnlinkParameters parameters, - Context context); - /** * Gets information about a database in a RedisEnterprise cluster. * diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/ForceUnlinkParameters.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/ForceUnlinkParameters.java deleted file mode 100644 index d9ff57c06c97..000000000000 --- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/ForceUnlinkParameters.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.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Parameters for a Redis Enterprise Active Geo Replication Force Unlink operation. */ -@Fluent -public final class ForceUnlinkParameters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ForceUnlinkParameters.class); - - /* - * The resource IDs of the database resources to be unlinked. - */ - @JsonProperty(value = "ids", required = true) - private List ids; - - /** - * Get the ids property: The resource IDs of the database resources to be unlinked. - * - * @return the ids value. - */ - public List ids() { - return this.ids; - } - - /** - * Set the ids property: The resource IDs of the database resources to be unlinked. - * - * @param ids the ids value to set. - * @return the ForceUnlinkParameters object itself. - */ - public ForceUnlinkParameters withIds(List ids) { - this.ids = ids; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (ids() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property ids in model ForceUnlinkParameters")); - } - } -} diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/LinkState.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/LinkState.java deleted file mode 100644 index 4f60c17b9861..000000000000 --- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/LinkState.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for LinkState. */ -public final class LinkState extends ExpandableStringEnum { - /** Static value Linked for LinkState. */ - public static final LinkState LINKED = fromString("Linked"); - - /** Static value Linking for LinkState. */ - public static final LinkState LINKING = fromString("Linking"); - - /** Static value Unlinking for LinkState. */ - public static final LinkState UNLINKING = fromString("Unlinking"); - - /** Static value LinkFailed for LinkState. */ - public static final LinkState LINK_FAILED = fromString("LinkFailed"); - - /** Static value UnlinkFailed for LinkState. */ - public static final LinkState UNLINK_FAILED = fromString("UnlinkFailed"); - - /** - * Creates or finds a LinkState from its string representation. - * - * @param name a name to look for. - * @return the corresponding LinkState. - */ - @JsonCreator - public static LinkState fromString(String name) { - return fromString(name, LinkState.class); - } - - /** @return known LinkState values. */ - public static Collection values() { - return values(LinkState.class); - } -} diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/LinkedDatabase.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/LinkedDatabase.java deleted file mode 100644 index 1d737e93dd9a..000000000000 --- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/models/LinkedDatabase.java +++ /dev/null @@ -1,65 +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.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Specifies details of a linked database resource. */ -@Fluent -public final class LinkedDatabase { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LinkedDatabase.class); - - /* - * Resource ID of a database resource to link with this database. - */ - @JsonProperty(value = "id") - private String id; - - /* - * State of the link between the database resources. - */ - @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) - private LinkState state; - - /** - * Get the id property: Resource ID of a database resource to link with this database. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: Resource ID of a database resource to link with this database. - * - * @param id the id value to set. - * @return the LinkedDatabase object itself. - */ - public LinkedDatabase withId(String id) { - this.id = id; - return this; - } - - /** - * Get the state property: State of the link between the database resources. - * - * @return the state value. - */ - public LinkState state() { - return this.state; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -}