|
| 1 | +From 1185f9ded7e644d6b64c955c2faa9422765eea24 Mon Sep 17 00:00:00 2001 |
| 2 | +From: Weidong Xu < [email protected]> |
| 3 | +Date: Thu, 7 Aug 2025 14:28:55 +0800 |
| 4 | +Subject: [PATCH] revert impl in contentsafety |
| 5 | + |
| 6 | +--- |
| 7 | + .../implementation/BlocklistClientImpl.java | 24 +++++++++++-------- |
| 8 | + 1 file changed, 14 insertions(+), 10 deletions(-) |
| 9 | + |
| 10 | +diff --git a/sdk/contentsafety/azure-ai-contentsafety/src/main/java/com/azure/ai/contentsafety/implementation/BlocklistClientImpl.java b/sdk/contentsafety/azure-ai-contentsafety/src/main/java/com/azure/ai/contentsafety/implementation/BlocklistClientImpl.java |
| 11 | +index e7e96b52ccf..727d27c5547 100644 |
| 12 | +--- a/sdk/contentsafety/azure-ai-contentsafety/src/main/java/com/azure/ai/contentsafety/implementation/BlocklistClientImpl.java |
| 13 | ++++ b/sdk/contentsafety/azure-ai-contentsafety/src/main/java/com/azure/ai/contentsafety/implementation/BlocklistClientImpl.java |
| 14 | +@@ -216,7 +216,7 @@ public final class BlocklistClientImpl { |
| 15 | + @UnexpectedResponseExceptionType(HttpResponseException.class) |
| 16 | + Mono<Response<Void>> deleteTextBlocklist(@HostParam("endpoint") String endpoint, |
| 17 | + @QueryParam("api-version") String apiVersion, @PathParam("blocklistName") String name, |
| 18 | +- RequestOptions requestOptions, Context context); |
| 19 | ++ @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); |
| 20 | + |
| 21 | + @Delete("/text/blocklists/{blocklistName}") |
| 22 | + @ExpectedResponses({ 204 }) |
| 23 | +@@ -226,7 +226,7 @@ public final class BlocklistClientImpl { |
| 24 | + @UnexpectedResponseExceptionType(HttpResponseException.class) |
| 25 | + Response<Void> deleteTextBlocklistSync(@HostParam("endpoint") String endpoint, |
| 26 | + @QueryParam("api-version") String apiVersion, @PathParam("blocklistName") String name, |
| 27 | +- RequestOptions requestOptions, Context context); |
| 28 | ++ @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); |
| 29 | + |
| 30 | + @Get("/text/blocklists/{blocklistName}") |
| 31 | + @ExpectedResponses({ 200 }) |
| 32 | +@@ -318,8 +318,8 @@ public final class BlocklistClientImpl { |
| 33 | + @UnexpectedResponseExceptionType(HttpResponseException.class) |
| 34 | + Mono<Response<Void>> removeBlocklistItems(@HostParam("endpoint") String endpoint, |
| 35 | + @QueryParam("api-version") String apiVersion, @PathParam("blocklistName") String name, |
| 36 | +- @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") BinaryData options, |
| 37 | +- RequestOptions requestOptions, Context context); |
| 38 | ++ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, |
| 39 | ++ @BodyParam("application/json") BinaryData options, RequestOptions requestOptions, Context context); |
| 40 | + |
| 41 | + @Post("/text/blocklists/{blocklistName}:removeBlocklistItems") |
| 42 | + @ExpectedResponses({ 204 }) |
| 43 | +@@ -329,8 +329,8 @@ public final class BlocklistClientImpl { |
| 44 | + @UnexpectedResponseExceptionType(HttpResponseException.class) |
| 45 | + Response<Void> removeBlocklistItemsSync(@HostParam("endpoint") String endpoint, |
| 46 | + @QueryParam("api-version") String apiVersion, @PathParam("blocklistName") String name, |
| 47 | +- @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") BinaryData options, |
| 48 | +- RequestOptions requestOptions, Context context); |
| 49 | ++ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, |
| 50 | ++ @BodyParam("application/json") BinaryData options, RequestOptions requestOptions, Context context); |
| 51 | + |
| 52 | + @Get("{nextLink}") |
| 53 | + @ExpectedResponses({ 200 }) |
| 54 | +@@ -587,8 +587,9 @@ public final class BlocklistClientImpl { |
| 55 | + */ |
| 56 | + @ServiceMethod(returns = ReturnType.SINGLE) |
| 57 | + public Mono<Response<Void>> deleteTextBlocklistWithResponseAsync(String name, RequestOptions requestOptions) { |
| 58 | ++ final String accept = "application/json"; |
| 59 | + return FluxUtil.withContext(context -> service.deleteTextBlocklist(this.getEndpoint(), |
| 60 | +- this.getServiceVersion().getVersion(), name, requestOptions, context)); |
| 61 | ++ this.getServiceVersion().getVersion(), name, accept, requestOptions, context)); |
| 62 | + } |
| 63 | + |
| 64 | + /** |
| 65 | +@@ -606,7 +607,8 @@ public final class BlocklistClientImpl { |
| 66 | + */ |
| 67 | + @ServiceMethod(returns = ReturnType.SINGLE) |
| 68 | + public Response<Void> deleteTextBlocklistWithResponse(String name, RequestOptions requestOptions) { |
| 69 | +- return service.deleteTextBlocklistSync(this.getEndpoint(), this.getServiceVersion().getVersion(), name, |
| 70 | ++ final String accept = "application/json"; |
| 71 | ++ return service.deleteTextBlocklistSync(this.getEndpoint(), this.getServiceVersion().getVersion(), name, accept, |
| 72 | + requestOptions, Context.NONE); |
| 73 | + } |
| 74 | + |
| 75 | +@@ -1126,8 +1128,9 @@ public final class BlocklistClientImpl { |
| 76 | + public Mono<Response<Void>> removeBlocklistItemsWithResponseAsync(String name, BinaryData options, |
| 77 | + RequestOptions requestOptions) { |
| 78 | + final String contentType = "application/json"; |
| 79 | ++ final String accept = "application/json"; |
| 80 | + return FluxUtil.withContext(context -> service.removeBlocklistItems(this.getEndpoint(), |
| 81 | +- this.getServiceVersion().getVersion(), name, contentType, options, requestOptions, context)); |
| 82 | ++ this.getServiceVersion().getVersion(), name, contentType, accept, options, requestOptions, context)); |
| 83 | + } |
| 84 | + |
| 85 | + /** |
| 86 | +@@ -1159,8 +1162,9 @@ public final class BlocklistClientImpl { |
| 87 | + public Response<Void> removeBlocklistItemsWithResponse(String name, BinaryData options, |
| 88 | + RequestOptions requestOptions) { |
| 89 | + final String contentType = "application/json"; |
| 90 | ++ final String accept = "application/json"; |
| 91 | + return service.removeBlocklistItemsSync(this.getEndpoint(), this.getServiceVersion().getVersion(), name, |
| 92 | +- contentType, options, requestOptions, Context.NONE); |
| 93 | ++ contentType, accept, options, requestOptions, Context.NONE); |
| 94 | + } |
| 95 | + |
| 96 | + /** |
| 97 | +-- |
| 98 | +2.50.1.windows.1 |
| 99 | + |
0 commit comments