Skip to content

Commit 0f8058d

Browse files
author
SDKAuto
committed
CodeGen from PR 23401 in Azure/azure-rest-api-specs
Merge fd3c6c16e11bfb4a7c4f5eddbede180e3baa15e2 into 9a46bdbfea7730a3521ac11f5ea1120007d67f79
1 parent 5f26f0c commit 0f8058d

File tree

66 files changed

+170
-3049
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+170
-3049
lines changed

sdk/redisenterprise/azure-resourcemanager-redisenterprise/CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Release History
22

3-
## 1.1.0-beta.4 (Unreleased)
3+
## 1.0.0-beta.1 (2023-04-05)
4+
5+
- 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-2023-03. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
46

57
### Features Added
68

sdk/redisenterprise/azure-resourcemanager-redisenterprise/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
3232
<dependency>
3333
<groupId>com.azure.resourcemanager</groupId>
3434
<artifactId>azure-resourcemanager-redisenterprise</artifactId>
35-
<version>1.1.0-beta.3</version>
35+
<version>1.1.0-beta.4</version>
3636
</dependency>
3737
```
3838
[//]: # ({x-version-update-end})

sdk/redisenterprise/azure-resourcemanager-redisenterprise/SAMPLE.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -456,9 +456,7 @@ public final class PrivateEndpointConnectionsDeleteSamples {
456456
*/
457457
public static void redisEnterpriseDeletePrivateEndpointConnection(
458458
com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager manager) {
459-
manager
460-
.privateEndpointConnections()
461-
.deleteWithResponse("rg1", "cache1", "pectest01", com.azure.core.util.Context.NONE);
459+
manager.privateEndpointConnections().delete("rg1", "cache1", "pectest01", com.azure.core.util.Context.NONE);
462460
}
463461
}
464462
```

sdk/redisenterprise/azure-resourcemanager-redisenterprise/pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
4646
<jacoco.min.linecoverage>0</jacoco.min.linecoverage>
4747
<jacoco.min.branchcoverage>0</jacoco.min.branchcoverage>
48-
<revapi.skip>true</revapi.skip>
4948
</properties>
5049
<dependencies>
5150
<dependency>

sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/RedisEnterpriseManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ public RedisEnterpriseManager authenticate(TokenCredential credential, AzureProf
227227
.append("-")
228228
.append("com.azure.resourcemanager.redisenterprise")
229229
.append("/")
230-
.append("1.1.0-beta.3");
230+
.append("1.0.0-beta.1");
231231
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
232232
userAgentBuilder
233233
.append(" (")

sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/PrivateEndpointConnectionsClient.java

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,22 @@ PrivateEndpointConnectionInner put(
162162
PrivateEndpointConnectionInner properties,
163163
Context context);
164164

165+
/**
166+
* Deletes the specified private endpoint connection associated with the RedisEnterprise cluster.
167+
*
168+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
169+
* @param clusterName The name of the RedisEnterprise cluster.
170+
* @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
171+
* resource.
172+
* @throws IllegalArgumentException thrown if parameters fail the validation.
173+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
174+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
175+
* @return the {@link SyncPoller} for polling of long-running operation.
176+
*/
177+
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
178+
SyncPoller<PollResult<Void>, Void> beginDelete(
179+
String resourceGroupName, String clusterName, String privateEndpointConnectionName);
180+
165181
/**
166182
* Deletes the specified private endpoint connection associated with the RedisEnterprise cluster.
167183
*
@@ -173,10 +189,10 @@ PrivateEndpointConnectionInner put(
173189
* @throws IllegalArgumentException thrown if parameters fail the validation.
174190
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
175191
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
176-
* @return the {@link Response}.
192+
* @return the {@link SyncPoller} for polling of long-running operation.
177193
*/
178-
@ServiceMethod(returns = ReturnType.SINGLE)
179-
Response<Void> deleteWithResponse(
194+
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
195+
SyncPoller<PollResult<Void>, Void> beginDelete(
180196
String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context);
181197

182198
/**
@@ -192,4 +208,19 @@ Response<Void> deleteWithResponse(
192208
*/
193209
@ServiceMethod(returns = ReturnType.SINGLE)
194210
void delete(String resourceGroupName, String clusterName, String privateEndpointConnectionName);
211+
212+
/**
213+
* Deletes the specified private endpoint connection associated with the RedisEnterprise cluster.
214+
*
215+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
216+
* @param clusterName The name of the RedisEnterprise cluster.
217+
* @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
218+
* resource.
219+
* @param context The context to associate with this operation.
220+
* @throws IllegalArgumentException thrown if parameters fail the validation.
221+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
222+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
223+
*/
224+
@ServiceMethod(returns = ReturnType.SINGLE)
225+
void delete(String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context);
195226
}

sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/PrivateEndpointConnectionsClientImpl.java

Lines changed: 117 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ Mono<Response<Flux<ByteBuffer>>> put(
114114
@Headers({"Content-Type: application/json"})
115115
@Delete(
116116
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName}")
117-
@ExpectedResponses({200, 204})
117+
@ExpectedResponses({200, 202, 204})
118118
@UnexpectedResponseExceptionType(ManagementException.class)
119-
Mono<Response<Void>> delete(
119+
Mono<Response<Flux<ByteBuffer>>> delete(
120120
@HostParam("$host") String endpoint,
121121
@PathParam("resourceGroupName") String resourceGroupName,
122122
@PathParam("clusterName") String clusterName,
@@ -830,7 +830,7 @@ public PrivateEndpointConnectionInner put(
830830
* @return the {@link Response} on successful completion of {@link Mono}.
831831
*/
832832
@ServiceMethod(returns = ReturnType.SINGLE)
833-
private Mono<Response<Void>> deleteWithResponseAsync(
833+
private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(
834834
String resourceGroupName, String clusterName, String privateEndpointConnectionName) {
835835
if (this.client.getEndpoint() == null) {
836836
return Mono
@@ -888,7 +888,7 @@ private Mono<Response<Void>> deleteWithResponseAsync(
888888
* @return the {@link Response} on successful completion of {@link Mono}.
889889
*/
890890
@ServiceMethod(returns = ReturnType.SINGLE)
891-
private Mono<Response<Void>> deleteWithResponseAsync(
891+
private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(
892892
String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context) {
893893
if (this.client.getEndpoint() == null) {
894894
return Mono
@@ -929,6 +929,92 @@ private Mono<Response<Void>> deleteWithResponseAsync(
929929
context);
930930
}
931931

932+
/**
933+
* Deletes the specified private endpoint connection associated with the RedisEnterprise cluster.
934+
*
935+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
936+
* @param clusterName The name of the RedisEnterprise cluster.
937+
* @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
938+
* resource.
939+
* @throws IllegalArgumentException thrown if parameters fail the validation.
940+
* @throws ManagementException thrown if the request is rejected by server.
941+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
942+
* @return the {@link PollerFlux} for polling of long-running operation.
943+
*/
944+
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
945+
private PollerFlux<PollResult<Void>, Void> beginDeleteAsync(
946+
String resourceGroupName, String clusterName, String privateEndpointConnectionName) {
947+
Mono<Response<Flux<ByteBuffer>>> mono =
948+
deleteWithResponseAsync(resourceGroupName, clusterName, privateEndpointConnectionName);
949+
return this
950+
.client
951+
.<Void, Void>getLroResult(
952+
mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
953+
}
954+
955+
/**
956+
* Deletes the specified private endpoint connection associated with the RedisEnterprise cluster.
957+
*
958+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
959+
* @param clusterName The name of the RedisEnterprise cluster.
960+
* @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
961+
* resource.
962+
* @param context The context to associate with this operation.
963+
* @throws IllegalArgumentException thrown if parameters fail the validation.
964+
* @throws ManagementException thrown if the request is rejected by server.
965+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
966+
* @return the {@link PollerFlux} for polling of long-running operation.
967+
*/
968+
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
969+
private PollerFlux<PollResult<Void>, Void> beginDeleteAsync(
970+
String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context) {
971+
context = this.client.mergeContext(context);
972+
Mono<Response<Flux<ByteBuffer>>> mono =
973+
deleteWithResponseAsync(resourceGroupName, clusterName, privateEndpointConnectionName, context);
974+
return this
975+
.client
976+
.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
977+
}
978+
979+
/**
980+
* Deletes the specified private endpoint connection associated with the RedisEnterprise cluster.
981+
*
982+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
983+
* @param clusterName The name of the RedisEnterprise cluster.
984+
* @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
985+
* resource.
986+
* @throws IllegalArgumentException thrown if parameters fail the validation.
987+
* @throws ManagementException thrown if the request is rejected by server.
988+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
989+
* @return the {@link SyncPoller} for polling of long-running operation.
990+
*/
991+
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
992+
public SyncPoller<PollResult<Void>, Void> beginDelete(
993+
String resourceGroupName, String clusterName, String privateEndpointConnectionName) {
994+
return this.beginDeleteAsync(resourceGroupName, clusterName, privateEndpointConnectionName).getSyncPoller();
995+
}
996+
997+
/**
998+
* Deletes the specified private endpoint connection associated with the RedisEnterprise cluster.
999+
*
1000+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
1001+
* @param clusterName The name of the RedisEnterprise cluster.
1002+
* @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
1003+
* resource.
1004+
* @param context The context to associate with this operation.
1005+
* @throws IllegalArgumentException thrown if parameters fail the validation.
1006+
* @throws ManagementException thrown if the request is rejected by server.
1007+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
1008+
* @return the {@link SyncPoller} for polling of long-running operation.
1009+
*/
1010+
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
1011+
public SyncPoller<PollResult<Void>, Void> beginDelete(
1012+
String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context) {
1013+
return this
1014+
.beginDeleteAsync(resourceGroupName, clusterName, privateEndpointConnectionName, context)
1015+
.getSyncPoller();
1016+
}
1017+
9321018
/**
9331019
* Deletes the specified private endpoint connection associated with the RedisEnterprise cluster.
9341020
*
@@ -943,8 +1029,9 @@ private Mono<Response<Void>> deleteWithResponseAsync(
9431029
*/
9441030
@ServiceMethod(returns = ReturnType.SINGLE)
9451031
private Mono<Void> deleteAsync(String resourceGroupName, String clusterName, String privateEndpointConnectionName) {
946-
return deleteWithResponseAsync(resourceGroupName, clusterName, privateEndpointConnectionName)
947-
.flatMap(ignored -> Mono.empty());
1032+
return beginDeleteAsync(resourceGroupName, clusterName, privateEndpointConnectionName)
1033+
.last()
1034+
.flatMap(this.client::getLroFinalResultOrError);
9481035
}
9491036

9501037
/**
@@ -958,12 +1045,14 @@ private Mono<Void> deleteAsync(String resourceGroupName, String clusterName, Str
9581045
* @throws IllegalArgumentException thrown if parameters fail the validation.
9591046
* @throws ManagementException thrown if the request is rejected by server.
9601047
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
961-
* @return the {@link Response}.
1048+
* @return A {@link Mono} that completes when a successful response is received.
9621049
*/
9631050
@ServiceMethod(returns = ReturnType.SINGLE)
964-
public Response<Void> deleteWithResponse(
1051+
private Mono<Void> deleteAsync(
9651052
String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context) {
966-
return deleteWithResponseAsync(resourceGroupName, clusterName, privateEndpointConnectionName, context).block();
1053+
return beginDeleteAsync(resourceGroupName, clusterName, privateEndpointConnectionName, context)
1054+
.last()
1055+
.flatMap(this.client::getLroFinalResultOrError);
9671056
}
9681057

9691058
/**
@@ -979,6 +1068,24 @@ public Response<Void> deleteWithResponse(
9791068
*/
9801069
@ServiceMethod(returns = ReturnType.SINGLE)
9811070
public void delete(String resourceGroupName, String clusterName, String privateEndpointConnectionName) {
982-
deleteWithResponse(resourceGroupName, clusterName, privateEndpointConnectionName, Context.NONE);
1071+
deleteAsync(resourceGroupName, clusterName, privateEndpointConnectionName).block();
1072+
}
1073+
1074+
/**
1075+
* Deletes the specified private endpoint connection associated with the RedisEnterprise cluster.
1076+
*
1077+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
1078+
* @param clusterName The name of the RedisEnterprise cluster.
1079+
* @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
1080+
* resource.
1081+
* @param context The context to associate with this operation.
1082+
* @throws IllegalArgumentException thrown if parameters fail the validation.
1083+
* @throws ManagementException thrown if the request is rejected by server.
1084+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
1085+
*/
1086+
@ServiceMethod(returns = ReturnType.SINGLE)
1087+
public void delete(
1088+
String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context) {
1089+
deleteAsync(resourceGroupName, clusterName, privateEndpointConnectionName, context).block();
9831090
}
9841091
}

sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/PrivateEndpointConnectionsImpl.java

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -68,17 +68,15 @@ public PrivateEndpointConnection get(
6868
}
6969
}
7070

71-
public Response<Void> deleteWithResponse(
72-
String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context) {
73-
return this
74-
.serviceClient()
75-
.deleteWithResponse(resourceGroupName, clusterName, privateEndpointConnectionName, context);
76-
}
77-
7871
public void delete(String resourceGroupName, String clusterName, String privateEndpointConnectionName) {
7972
this.serviceClient().delete(resourceGroupName, clusterName, privateEndpointConnectionName);
8073
}
8174

75+
public void delete(
76+
String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context) {
77+
this.serviceClient().delete(resourceGroupName, clusterName, privateEndpointConnectionName, context);
78+
}
79+
8280
public PrivateEndpointConnection getById(String id) {
8381
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
8482
if (resourceGroupName == null) {
@@ -168,10 +166,10 @@ public void deleteById(String id) {
168166
"The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.",
169167
id)));
170168
}
171-
this.deleteWithResponse(resourceGroupName, clusterName, privateEndpointConnectionName, Context.NONE);
169+
this.delete(resourceGroupName, clusterName, privateEndpointConnectionName, Context.NONE);
172170
}
173171

174-
public Response<Void> deleteByIdWithResponse(String id, Context context) {
172+
public void deleteByIdWithResponse(String id, Context context) {
175173
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
176174
if (resourceGroupName == null) {
177175
throw LOGGER
@@ -198,7 +196,7 @@ public Response<Void> deleteByIdWithResponse(String id, Context context) {
198196
"The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.",
199197
id)));
200198
}
201-
return this.deleteWithResponse(resourceGroupName, clusterName, privateEndpointConnectionName, context);
199+
this.delete(resourceGroupName, clusterName, privateEndpointConnectionName, context);
202200
}
203201

204202
private PrivateEndpointConnectionsClient serviceClient() {

0 commit comments

Comments
 (0)