@@ -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}
0 commit comments