diff --git a/eng/emitter-package-lock.json b/eng/emitter-package-lock.json index 40968aca3da6..abf499734a4b 100644 --- a/eng/emitter-package-lock.json +++ b/eng/emitter-package-lock.json @@ -5,19 +5,20 @@ "packages": { "": { "dependencies": { - "@azure-tools/typespec-java": "0.17.0" + "@azure-tools/typespec-java": "0.17.1" }, "devDependencies": { "@azure-tools/typespec-autorest": "0.43.0", "@azure-tools/typespec-azure-core": "0.43.0", "@azure-tools/typespec-azure-resource-manager": "0.43.0", "@azure-tools/typespec-azure-rulesets": "0.43.0", - "@azure-tools/typespec-client-generator-core": "0.43.0", + "@azure-tools/typespec-client-generator-core": "0.43.1", "@typespec/compiler": "0.57.0", "@typespec/http": "0.57.0", "@typespec/openapi": "0.57.0", "@typespec/rest": "0.57.0", - "@typespec/versioning": "0.57.0" + "@typespec/versioning": "0.57.0", + "@typespec/xml": "0.57.0" } }, "node_modules/@autorest/codemodel": { @@ -69,7 +70,6 @@ "version": "0.43.0", "resolved": "https://registry.npmjs.org/@azure-tools/typespec-autorest/-/typespec-autorest-0.43.0.tgz", "integrity": "sha512-tZ9uXXOdxu2y01W9n3mzXf+IEY2MQkP/JaQaKlcOx2+dbklHNQWSDU0Vm6Gmm6l//XiF9QiI8653BiuO97czyw==", - "dev": true, "engines": { "node": ">=18.0.0" }, @@ -132,9 +132,9 @@ } }, "node_modules/@azure-tools/typespec-client-generator-core": { - "version": "0.43.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.43.0.tgz", - "integrity": "sha512-rssB/zsg89wstzJC1MWzbd8oPpqbgoftkp9G/NP3BoMb/gCP5uRLggwlSUAgnoU2Lt0jBUKcMlqEiVLTAkY9LA==", + "version": "0.43.1", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.43.1.tgz", + "integrity": "sha512-NwNN/fIOcjOU/8o6ViCuEAAQl6zmu2X1QKPuXxeSy8ssDwrTiX9Ho2X/7IZM4XmOArKTtgmTkNcSnnmuj5dsGg==", "dependencies": { "change-case": "~5.4.4", "pluralize": "^8.0.0" @@ -147,13 +147,14 @@ "@typespec/compiler": "~0.57.0", "@typespec/http": "~0.57.0", "@typespec/rest": "~0.57.0", - "@typespec/versioning": "~0.57.0" + "@typespec/versioning": "~0.57.0", + "@typespec/xml": "~0.57.0" } }, "node_modules/@azure-tools/typespec-java": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-java/-/typespec-java-0.17.0.tgz", - "integrity": "sha512-441kmUymf4pNA9VxRBWzeU7CTAgQMkcQNEr8o8xljMLvnQRJ551OJQaHXY27Lq6Ve1JAww6sIVTEUNibiNfdeA==", + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-java/-/typespec-java-0.17.1.tgz", + "integrity": "sha512-Q+hu7WxqOr1+2fRY2z5eTfqioqGY02hnHk30c1EmWKnJUfLxomOq1Vk9dlnLHUMOdlyCA813fiyygu5MHWHDEg==", "dependencies": { "@autorest/codemodel": "~4.20.0", "js-yaml": "~4.1.0", @@ -163,15 +164,17 @@ "node": ">=14.0.0" }, "peerDependencies": { + "@azure-tools/typespec-autorest": ">=0.43.0 <1.0.0", "@azure-tools/typespec-azure-core": ">=0.43.0 <1.0.0", "@azure-tools/typespec-azure-resource-manager": ">=0.43.0 <1.0.0", "@azure-tools/typespec-azure-rulesets": ">=0.43.0 <1.0.0", - "@azure-tools/typespec-client-generator-core": ">=0.43.0 <1.0.0", + "@azure-tools/typespec-client-generator-core": ">=0.43.1 <1.0.0", "@typespec/compiler": ">=0.57.0 <1.0.0", "@typespec/http": ">=0.57.0 <1.0.0", "@typespec/openapi": ">=0.57.0 <1.0.0", "@typespec/rest": ">=0.57.0 <1.0.0", - "@typespec/versioning": ">=0.57.0 <1.0.0" + "@typespec/versioning": ">=0.57.0 <1.0.0", + "@typespec/xml": ">=0.57.0 <1.0.0" } }, "node_modules/@babel/code-frame": { @@ -324,6 +327,17 @@ "@typespec/compiler": "~0.57.0" } }, + "node_modules/@typespec/xml": { + "version": "0.57.0", + "resolved": "https://registry.npmjs.org/@typespec/xml/-/xml-0.57.0.tgz", + "integrity": "sha512-itsFsahgBRNREoF4FXUgELmNGtOMmzNnhxT+NeAl4f7EXmz/mu1y/k9hWmDXWr+DB0Oq1r0Fc+D0TSl51szzlQ==", + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "@typespec/compiler": "~0.57.0" + } + }, "node_modules/ajv": { "version": "8.13.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.13.0.tgz", @@ -498,9 +512,9 @@ } }, "node_modules/globby": { - "version": "14.0.1", - "resolved": "https://registry.npmjs.org/globby/-/globby-14.0.1.tgz", - "integrity": "sha512-jOMLD2Z7MAhyG8aJpNOpmziMOP4rPLcc95oQPKXBazW82z+CEgPFBQvEpRUa1KeIMUJo4Wsm+q6uzO/Q/4BksQ==", + "version": "14.0.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-14.0.2.tgz", + "integrity": "sha512-s3Fq41ZVh7vbbe2PN3nrW7yC7U7MFVc5c98/iTl9c2GawNMKx/J648KQRW6WKkuU8GIbbh2IXfIRQjOZnXcTnw==", "dependencies": { "@sindresorhus/merge-streams": "^2.1.0", "fast-glob": "^3.3.2", diff --git a/eng/emitter-package.json b/eng/emitter-package.json index c06dea5c2d6f..8a2a5376d496 100644 --- a/eng/emitter-package.json +++ b/eng/emitter-package.json @@ -1,18 +1,19 @@ { "main": "dist/src/index.js", "dependencies": { - "@azure-tools/typespec-java": "0.17.0" + "@azure-tools/typespec-java": "0.17.1" }, "devDependencies": { + "@azure-tools/typespec-autorest": "0.43.0", "@azure-tools/typespec-azure-core": "0.43.0", "@azure-tools/typespec-azure-resource-manager": "0.43.0", "@azure-tools/typespec-azure-rulesets": "0.43.0", - "@azure-tools/typespec-client-generator-core": "0.43.0", - "@azure-tools/typespec-autorest": "0.43.0", + "@azure-tools/typespec-client-generator-core": "0.43.1", "@typespec/compiler": "0.57.0", "@typespec/http": "0.57.0", "@typespec/openapi": "0.57.0", "@typespec/rest": "0.57.0", - "@typespec/versioning": "0.57.0" + "@typespec/versioning": "0.57.0", + "@typespec/xml": "0.57.0" } } diff --git a/sdk/batch/azure-compute-batch/src/main/java/com/azure/compute/batch/implementation/BatchClientImpl.java b/sdk/batch/azure-compute-batch/src/main/java/com/azure/compute/batch/implementation/BatchClientImpl.java index e9b9d84ec55c..3d0b712b34a0 100644 --- a/sdk/batch/azure-compute-batch/src/main/java/com/azure/compute/batch/implementation/BatchClientImpl.java +++ b/sdk/batch/azure-compute-batch/src/main/java/com/azure/compute/batch/implementation/BatchClientImpl.java @@ -1169,7 +1169,7 @@ Response listSubTasksInternalSync(@HostParam("endpoint") String endp Context context); @Post("/jobs/{jobId}/tasks/{taskId}/terminate") - @ExpectedResponses({ 200 }) + @ExpectedResponses({ 204 }) @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @@ -1180,7 +1180,7 @@ Mono> terminateTaskInternal(@HostParam("endpoint") String endpoin Context context); @Post("/jobs/{jobId}/tasks/{taskId}/terminate") - @ExpectedResponses({ 200 }) + @ExpectedResponses({ 204 }) @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @@ -1191,7 +1191,7 @@ Response terminateTaskInternalSync(@HostParam("endpoint") String endpoint, Context context); @Post("/jobs/{jobId}/tasks/{taskId}/reactivate") - @ExpectedResponses({ 200 }) + @ExpectedResponses({ 204 }) @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @@ -1202,7 +1202,7 @@ Mono> reactivateTaskInternal(@HostParam("endpoint") String endpoi Context context); @Post("/jobs/{jobId}/tasks/{taskId}/reactivate") - @ExpectedResponses({ 200 }) + @ExpectedResponses({ 204 }) @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) diff --git a/sdk/batch/azure-compute-batch/tsp-location.yaml b/sdk/batch/azure-compute-batch/tsp-location.yaml index 91d26dce2544..7d3c05346fc7 100644 --- a/sdk/batch/azure-compute-batch/tsp-location.yaml +++ b/sdk/batch/azure-compute-batch/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/batch/Azure.Batch -commit: 68c8da604a93740f5f074046f9d8ffe23c5a2f41 +commit: 3cb1b51638616435470fc10ea00de92512186ece repo: Azure/azure-rest-api-specs cleanup: false diff --git a/sdk/communication/azure-communication-jobrouter/src/main/java/com/azure/communication/jobrouter/JobRouterAsyncClient.java b/sdk/communication/azure-communication-jobrouter/src/main/java/com/azure/communication/jobrouter/JobRouterAsyncClient.java index 8614be6daf1f..62c4af4f5eb2 100644 --- a/sdk/communication/azure-communication-jobrouter/src/main/java/com/azure/communication/jobrouter/JobRouterAsyncClient.java +++ b/sdk/communication/azure-communication-jobrouter/src/main/java/com/azure/communication/jobrouter/JobRouterAsyncClient.java @@ -920,6 +920,14 @@ public Mono> getQueuePositionWithResponse(String jobId, Req /** * Unassign a job. + *

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/json".
+ * You can add these to a request with {@link RequestOptions#addHeader} *

Request Body Schema

* *
{@code
diff --git a/sdk/communication/azure-communication-jobrouter/src/main/java/com/azure/communication/jobrouter/JobRouterClient.java b/sdk/communication/azure-communication-jobrouter/src/main/java/com/azure/communication/jobrouter/JobRouterClient.java
index 61fe17d96310..a7bccef014c1 100644
--- a/sdk/communication/azure-communication-jobrouter/src/main/java/com/azure/communication/jobrouter/JobRouterClient.java
+++ b/sdk/communication/azure-communication-jobrouter/src/main/java/com/azure/communication/jobrouter/JobRouterClient.java
@@ -951,6 +951,14 @@ public Response getQueuePositionWithResponse(String jobId, RequestOp
 
     /**
      * Unassign a job.
+     * 

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/json".
+ * You can add these to a request with {@link RequestOptions#addHeader} *

Request Body Schema

* *
{@code
diff --git a/sdk/communication/azure-communication-jobrouter/src/main/java/com/azure/communication/jobrouter/implementation/JobRouterClientImpl.java b/sdk/communication/azure-communication-jobrouter/src/main/java/com/azure/communication/jobrouter/implementation/JobRouterClientImpl.java
index 0b637f0a0b02..a7f25e9ce546 100644
--- a/sdk/communication/azure-communication-jobrouter/src/main/java/com/azure/communication/jobrouter/implementation/JobRouterClientImpl.java
+++ b/sdk/communication/azure-communication-jobrouter/src/main/java/com/azure/communication/jobrouter/implementation/JobRouterClientImpl.java
@@ -1025,6 +1025,14 @@ public Response deleteJobWithResponse(String jobId, RequestOptions request
 
     /**
      * Reclassify a job.
+     * 

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/json".
+ * You can add these to a request with {@link RequestOptions#addHeader} *

Request Body Schema

* *
{@code
@@ -1061,6 +1069,14 @@ public Mono> reclassifyJobWithResponseAsync(String jobId, R
 
     /**
      * Reclassify a job.
+     * 

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/json".
+ * You can add these to a request with {@link RequestOptions#addHeader} *

Request Body Schema

* *
{@code
@@ -1096,6 +1112,14 @@ public Response reclassifyJobWithResponse(String jobId, RequestOptio
 
     /**
      * Submits request to cancel an existing job by Id while supplying free-form cancellation reason.
+     * 

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/json".
+ * You can add these to a request with {@link RequestOptions#addHeader} *

Request Body Schema

* *
{@code
@@ -1135,6 +1159,14 @@ public Mono> cancelJobWithResponseAsync(String jobId, Reque
 
     /**
      * Submits request to cancel an existing job by Id while supplying free-form cancellation reason.
+     * 

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/json".
+ * You can add these to a request with {@link RequestOptions#addHeader} *

Request Body Schema

* *
{@code
@@ -1173,6 +1205,14 @@ public Response cancelJobWithResponse(String jobId, RequestOptions r
 
     /**
      * Completes an assigned job.
+     * 

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/json".
+ * You can add these to a request with {@link RequestOptions#addHeader} *

Request Body Schema

* *
{@code
@@ -1213,6 +1253,14 @@ public Mono> completeJobWithResponseAsync(String jobId, Str
 
     /**
      * Completes an assigned job.
+     * 

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/json".
+ * You can add these to a request with {@link RequestOptions#addHeader} *

Request Body Schema

* *
{@code
@@ -1252,6 +1300,14 @@ public Response completeJobWithResponse(String jobId, String assignm
 
     /**
      * Closes a completed job.
+     * 

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/json".
+ * You can add these to a request with {@link RequestOptions#addHeader} *

Request Body Schema

* *
{@code
@@ -1293,6 +1349,14 @@ public Mono> closeJobWithResponseAsync(String jobId, String
 
     /**
      * Closes a completed job.
+     * 

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/json".
+ * You can add these to a request with {@link RequestOptions#addHeader} *

Request Body Schema

* *
{@code
@@ -1801,6 +1865,14 @@ public Response getQueuePositionWithResponse(String jobId, RequestOp
 
     /**
      * Unassign a job.
+     * 

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/json".
+ * You can add these to a request with {@link RequestOptions#addHeader} *

Request Body Schema

* *
{@code
@@ -1844,6 +1916,14 @@ public Mono> unassignJobWithResponseAsync(String jobId, Str
 
     /**
      * Unassign a job.
+     * 

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/json".
+ * You can add these to a request with {@link RequestOptions#addHeader} *

Request Body Schema

* *
{@code
@@ -1946,6 +2026,14 @@ public Response acceptJobOfferWithResponse(String workerId, String o
 
     /**
      * Declines an offer to work on a job.
+     * 

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/json".
+ * You can add these to a request with {@link RequestOptions#addHeader} *

Request Body Schema

* *
{@code
@@ -1986,6 +2074,14 @@ public Mono> declineJobOfferWithResponseAsync(String worker
 
     /**
      * Declines an offer to work on a job.
+     * 

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/json".
+ * You can add these to a request with {@link RequestOptions#addHeader} *

Request Body Schema

* *
{@code
diff --git a/sdk/communication/azure-communication-jobrouter/tsp-location.yaml b/sdk/communication/azure-communication-jobrouter/tsp-location.yaml
index 3538ba7e4fea..ac5e245f7c81 100644
--- a/sdk/communication/azure-communication-jobrouter/tsp-location.yaml
+++ b/sdk/communication/azure-communication-jobrouter/tsp-location.yaml
@@ -1,4 +1,4 @@
-commit: 03e89671b50de6a14eaa0a3c5c579d6cf057889a
+commit: 3cb1b51638616435470fc10ea00de92512186ece
 directory: specification/communication/Communication.JobRouter
 additionalDirectories: []
 repo: Azure/azure-rest-api-specs
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/MessageTemplateClientBuilder.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/MessageTemplateClientBuilder.java
index d267eee869c2..74fcce7d75a5 100644
--- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/MessageTemplateClientBuilder.java
+++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/MessageTemplateClientBuilder.java
@@ -280,6 +280,7 @@ public MessageTemplateClientBuilder retryPolicy(RetryPolicy retryPolicy) {
      */
     @Generated
     private MessageTemplateClientImpl buildInnerClient() {
+        this.validateClient();
         HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline();
         MessagesServiceVersion localServiceVersion
             = (serviceVersion != null) ? serviceVersion : MessagesServiceVersion.getLatest();
@@ -372,4 +373,11 @@ private HttpPipelinePolicy createHttpPipelineAuthPolicy() {
     }
 
     private static final ClientLogger LOGGER = new ClientLogger(MessageTemplateClientBuilder.class);
+
+    @Generated
+    private void validateClient() {
+        // This method is invoked from 'buildInnerClient'/'buildClient' method.
+        // Developer can customize this method, to validate that the necessary conditions are met for the new client.
+        Objects.requireNonNull(endpoint, "'endpoint' cannot be null.");
+    }
 }
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/NotificationMessagesAsyncClient.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/NotificationMessagesAsyncClient.java
index 0156f64e316c..324fa1d5ee44 100644
--- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/NotificationMessagesAsyncClient.java
+++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/NotificationMessagesAsyncClient.java
@@ -75,7 +75,7 @@ public final class NotificationMessagesAsyncClient {
      * }
      * }
* - * @param notificationContent Details of the message to send. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -86,8 +86,8 @@ public final class NotificationMessagesAsyncClient { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> sendWithResponse(BinaryData notificationContent, RequestOptions requestOptions) { - return this.serviceClient.sendWithResponseAsync(notificationContent, requestOptions); + public Mono> sendWithResponse(BinaryData body, RequestOptions requestOptions) { + return this.serviceClient.sendWithResponseAsync(body, requestOptions); } /** @@ -115,7 +115,7 @@ public Mono> downloadMediaWithResponse(String mediaId, Requ /** * Sends a notification message from Business to User. * - * @param notificationContent Details of the message to send. + * @param body Body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -126,10 +126,10 @@ public Mono> downloadMediaWithResponse(String mediaId, Requ */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono send(NotificationContent notificationContent) { + public Mono send(NotificationContent body) { // Generated convenience method for sendWithResponse RequestOptions requestOptions = new RequestOptions(); - return sendWithResponse(BinaryData.fromObject(notificationContent), requestOptions).flatMap(FluxUtil::toMono) + return sendWithResponse(BinaryData.fromObject(body), requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(SendMessageResult.class)); } diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/NotificationMessagesClient.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/NotificationMessagesClient.java index 357420668aed..0431ee2cfdca 100644 --- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/NotificationMessagesClient.java +++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/NotificationMessagesClient.java @@ -73,7 +73,7 @@ public final class NotificationMessagesClient { * } * }
* - * @param notificationContent Details of the message to send. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -83,8 +83,8 @@ public final class NotificationMessagesClient { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response sendWithResponse(BinaryData notificationContent, RequestOptions requestOptions) { - return this.serviceClient.sendWithResponse(notificationContent, requestOptions); + public Response sendWithResponse(BinaryData body, RequestOptions requestOptions) { + return this.serviceClient.sendWithResponse(body, requestOptions); } /** @@ -112,7 +112,7 @@ public Response downloadMediaWithResponse(String mediaId, RequestOpt /** * Sends a notification message from Business to User. * - * @param notificationContent Details of the message to send. + * @param body Body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -123,10 +123,10 @@ public Response downloadMediaWithResponse(String mediaId, RequestOpt */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public SendMessageResult send(NotificationContent notificationContent) { + public SendMessageResult send(NotificationContent body) { // Generated convenience method for sendWithResponse RequestOptions requestOptions = new RequestOptions(); - return sendWithResponse(BinaryData.fromObject(notificationContent), requestOptions).getValue() + return sendWithResponse(BinaryData.fromObject(body), requestOptions).getValue() .toObject(SendMessageResult.class); } diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/NotificationMessagesClientBuilder.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/NotificationMessagesClientBuilder.java index 2bb174993835..fa984614f41e 100644 --- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/NotificationMessagesClientBuilder.java +++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/NotificationMessagesClientBuilder.java @@ -280,6 +280,7 @@ public NotificationMessagesClientBuilder retryPolicy(RetryPolicy retryPolicy) { */ @Generated private NotificationMessagesClientImpl buildInnerClient() { + this.validateClient(); HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); MessagesServiceVersion localServiceVersion = (serviceVersion != null) ? serviceVersion : MessagesServiceVersion.getLatest(); @@ -372,4 +373,11 @@ private HttpPipelinePolicy createHttpPipelineAuthPolicy() { } private static final ClientLogger LOGGER = new ClientLogger(NotificationMessagesClientBuilder.class); + + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); + } } diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/implementation/MessageTemplateClientImpl.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/implementation/MessageTemplateClientImpl.java index f40800a3e72a..15d5054b68e5 100644 --- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/implementation/MessageTemplateClientImpl.java +++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/implementation/MessageTemplateClientImpl.java @@ -400,9 +400,7 @@ public PagedIterable listTemplates(String channelId, RequestOptions * } * }
* - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -435,9 +433,7 @@ private Mono> listTemplatesNextSinglePageAsync(String * } * }
* - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/implementation/NotificationMessagesClientImpl.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/implementation/NotificationMessagesClientImpl.java index 52c29cf620c1..9a5be8b4206a 100644 --- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/implementation/NotificationMessagesClientImpl.java +++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/implementation/NotificationMessagesClientImpl.java @@ -32,12 +32,12 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.util.BinaryData; import com.azure.core.util.Context; +import com.azure.core.util.CoreUtils; import com.azure.core.util.DateTimeRfc1123; import com.azure.core.util.FluxUtil; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.time.OffsetDateTime; -import java.util.UUID; import reactor.core.publisher.Mono; /** @@ -161,8 +161,7 @@ public interface NotificationMessagesClientService { @UnexpectedResponseExceptionType(HttpResponseException.class) Mono> send(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("accept") String accept, - @BodyParam("application/json") BinaryData notificationContent, RequestOptions requestOptions, - Context context); + @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); @Post("/messages/notifications:send") @ExpectedResponses({ 202 }) @@ -172,8 +171,7 @@ Mono> send(@HostParam("endpoint") String endpoint, @UnexpectedResponseExceptionType(HttpResponseException.class) Response sendSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("accept") String accept, - @BodyParam("application/json") BinaryData notificationContent, RequestOptions requestOptions, - Context context); + @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); @Get("/messages/streams/{id}") @ExpectedResponses({ 200 }) @@ -232,7 +230,7 @@ Response downloadMediaSync(@HostParam("endpoint") String endpoint, * } * }
* - * @param notificationContent Details of the message to send. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -242,26 +240,24 @@ Response downloadMediaSync(@HostParam("endpoint") String endpoint, * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> sendWithResponseAsync(BinaryData notificationContent, - RequestOptions requestOptions) { + public Mono> sendWithResponseAsync(BinaryData body, RequestOptions requestOptions) { final String accept = "application/json"; RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; - String repeatabilityRequestId = UUID.randomUUID().toString(); - String repeatabilityFirstSent = DateTimeRfc1123.toRfc1123String(OffsetDateTime.now()); requestOptionsLocal.addRequestCallback(requestLocal -> { if (requestLocal.getHeaders().get(HttpHeaderName.fromString("repeatability-request-id")) == null) { requestLocal.getHeaders() - .set(HttpHeaderName.fromString("repeatability-request-id"), repeatabilityRequestId); + .set(HttpHeaderName.fromString("repeatability-request-id"), CoreUtils.randomUuid().toString()); } }); requestOptionsLocal.addRequestCallback(requestLocal -> { if (requestLocal.getHeaders().get(HttpHeaderName.fromString("repeatability-first-sent")) == null) { requestLocal.getHeaders() - .set(HttpHeaderName.fromString("repeatability-first-sent"), repeatabilityFirstSent); + .set(HttpHeaderName.fromString("repeatability-first-sent"), + DateTimeRfc1123.toRfc1123String(OffsetDateTime.now())); } }); return FluxUtil.withContext(context -> service.send(this.getEndpoint(), this.getServiceVersion().getVersion(), - accept, notificationContent, requestOptionsLocal, context)); + accept, body, requestOptionsLocal, context)); } /** @@ -300,7 +296,7 @@ public Mono> sendWithResponseAsync(BinaryData notificationC * } * }
* - * @param notificationContent Details of the message to send. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -309,24 +305,23 @@ public Mono> sendWithResponseAsync(BinaryData notificationC * @return result of the send message operation along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response sendWithResponse(BinaryData notificationContent, RequestOptions requestOptions) { + public Response sendWithResponse(BinaryData body, RequestOptions requestOptions) { final String accept = "application/json"; RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; - String repeatabilityRequestId = UUID.randomUUID().toString(); - String repeatabilityFirstSent = DateTimeRfc1123.toRfc1123String(OffsetDateTime.now()); requestOptionsLocal.addRequestCallback(requestLocal -> { if (requestLocal.getHeaders().get(HttpHeaderName.fromString("repeatability-request-id")) == null) { requestLocal.getHeaders() - .set(HttpHeaderName.fromString("repeatability-request-id"), repeatabilityRequestId); + .set(HttpHeaderName.fromString("repeatability-request-id"), CoreUtils.randomUuid().toString()); } }); requestOptionsLocal.addRequestCallback(requestLocal -> { if (requestLocal.getHeaders().get(HttpHeaderName.fromString("repeatability-first-sent")) == null) { requestLocal.getHeaders() - .set(HttpHeaderName.fromString("repeatability-first-sent"), repeatabilityFirstSent); + .set(HttpHeaderName.fromString("repeatability-first-sent"), + DateTimeRfc1123.toRfc1123String(OffsetDateTime.now())); } }); - return service.sendSync(this.getEndpoint(), this.getServiceVersion().getVersion(), accept, notificationContent, + return service.sendSync(this.getEndpoint(), this.getServiceVersion().getVersion(), accept, body, requestOptionsLocal, Context.NONE); } diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/MessageTemplate.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/MessageTemplate.java index 5c4fbb4c707b..f74754a27b62 100644 --- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/MessageTemplate.java +++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/MessageTemplate.java @@ -23,7 +23,8 @@ public final class MessageTemplate { private final String name; /* - * The template's language, in the ISO 639 format, consist of a two-letter language code followed by an optional two-letter country code, e.g., 'en' or 'en_US'. + * The template's language, in the ISO 639 format, consist of a two-letter language code followed by an optional + * two-letter country code, e.g., 'en' or 'en_US'. */ @Generated @JsonProperty(value = "language") diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/MessageTemplateBindings.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/MessageTemplateBindings.java index 414b33a5ef8d..fdaea7480dcc 100644 --- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/MessageTemplateBindings.java +++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/MessageTemplateBindings.java @@ -30,7 +30,6 @@ public class MessageTemplateBindings { */ @Generated public MessageTemplateBindings() { - this.kind = MessageTemplateBindingsKind.fromString("MessageTemplateBindings"); } /* @@ -39,7 +38,7 @@ public MessageTemplateBindings() { @Generated @JsonTypeId @JsonProperty(value = "kind") - private MessageTemplateBindingsKind kind; + private MessageTemplateBindingsKind kind = MessageTemplateBindingsKind.fromString("MessageTemplateBindings"); /** * Get the kind property: The type discriminator describing a template bindings type. diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/MessageTemplateItem.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/MessageTemplateItem.java index d0d5b9c88c5e..51626ca9f609 100644 --- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/MessageTemplateItem.java +++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/MessageTemplateItem.java @@ -30,7 +30,8 @@ public abstract class MessageTemplateItem { private String name; /* - * The template's language, in the ISO 639 format, consist of a two-letter language code followed by an optional two-letter country code, e.g., 'en' or 'en_US'. + * The template's language, in the ISO 639 format, consist of a two-letter language code followed by an optional + * two-letter country code, e.g., 'en' or 'en_US'. */ @Generated @JsonProperty(value = "language") @@ -53,7 +54,6 @@ public abstract class MessageTemplateItem { @JsonCreator protected MessageTemplateItem(@JsonProperty(value = "language") String language, @JsonProperty(value = "status") MessageTemplateStatus status) { - this.kind = CommunicationMessagesChannel.fromString("MessageTemplateItem"); this.language = language; this.status = status; } @@ -95,7 +95,7 @@ public MessageTemplateStatus getStatus() { @Generated @JsonTypeId @JsonProperty(value = "kind") - private CommunicationMessagesChannel kind; + private CommunicationMessagesChannel kind = CommunicationMessagesChannel.fromString("MessageTemplateItem"); /** * Get the kind property: The type discriminator describing a template type. diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/MessageTemplateValue.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/MessageTemplateValue.java index 98c96d824ce6..c272f98b3699 100644 --- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/MessageTemplateValue.java +++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/MessageTemplateValue.java @@ -42,7 +42,6 @@ public abstract class MessageTemplateValue { @Generated @JsonCreator protected MessageTemplateValue(@JsonProperty(value = "name") String refValue) { - this.kind = MessageTemplateValueKind.fromString("MessageTemplateValue"); this.refValue = refValue; } @@ -62,7 +61,7 @@ public String getRefValue() { @Generated @JsonTypeId @JsonProperty(value = "kind") - private MessageTemplateValueKind kind; + private MessageTemplateValueKind kind = MessageTemplateValueKind.fromString("MessageTemplateValue"); /** * Get the kind property: The type discriminator describing a template parameter type. diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/NotificationContent.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/NotificationContent.java index 55df2e03f14b..3391d0fbace5 100644 --- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/NotificationContent.java +++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/NotificationContent.java @@ -49,7 +49,6 @@ public abstract class NotificationContent { @JsonCreator protected NotificationContent(@JsonProperty(value = "channelRegistrationId") String channelRegistrationId, @JsonProperty(value = "to") List to) { - this.kind = CommunicationMessageKind.fromString("NotificationContent"); this.channelRegistrationId = channelRegistrationId; this.to = to; } @@ -80,7 +79,7 @@ public List getTo() { @Generated @JsonTypeId @JsonProperty(value = "kind") - private CommunicationMessageKind kind; + private CommunicationMessageKind kind = CommunicationMessageKind.fromString("NotificationContent"); /** * Get the kind property: The type discriminator describing a notification type. diff --git a/sdk/communication/azure-communication-messages/src/main/java/module-info.java b/sdk/communication/azure-communication-messages/src/main/java/module-info.java index 918d2a8dde93..d871773f0c28 100644 --- a/sdk/communication/azure-communication-messages/src/main/java/module-info.java +++ b/sdk/communication/azure-communication-messages/src/main/java/module-info.java @@ -8,7 +8,7 @@ exports com.azure.communication.messages; exports com.azure.communication.messages.models.channels; exports com.azure.communication.messages.models; - opens com.azure.communication.messages.implementation.models to com.azure.core, com.fasterxml.jackson.databind; opens com.azure.communication.messages.models.channels to com.azure.core, com.fasterxml.jackson.databind; opens com.azure.communication.messages.models to com.azure.core, com.fasterxml.jackson.databind; + opens com.azure.communication.messages.implementation.models to com.azure.core, com.fasterxml.jackson.databind; } diff --git a/sdk/communication/azure-communication-messages/src/main/resources/META-INF/azure-communication-messages_apiview_properties.json b/sdk/communication/azure-communication-messages/src/main/resources/META-INF/azure-communication-messages_apiview_properties.json index f2fb4c181a53..341dea4534fb 100644 --- a/sdk/communication/azure-communication-messages/src/main/resources/META-INF/azure-communication-messages_apiview_properties.json +++ b/sdk/communication/azure-communication-messages/src/main/resources/META-INF/azure-communication-messages_apiview_properties.json @@ -17,7 +17,6 @@ "com.azure.communication.messages.NotificationMessagesClient.send": "Azure.Communication.MessagesService.NotificationMessagesClient.send", "com.azure.communication.messages.NotificationMessagesClient.sendWithResponse": "Azure.Communication.MessagesService.NotificationMessagesClient.send", "com.azure.communication.messages.NotificationMessagesClientBuilder": "Azure.Communication.MessagesService.NotificationMessagesClient", - "com.azure.communication.messages.implementation.models.MessageDataStream": "Azure.Communication.MessagesService.MessageDataStream", "com.azure.communication.messages.models.CommunicationMessageKind": "Azure.Communication.MessagesService.CommunicationMessageKind", "com.azure.communication.messages.models.CommunicationMessagesChannel": "Azure.Communication.MessagesService.CommunicationMessagesChannel", "com.azure.communication.messages.models.MediaNotificationContent": "Azure.Communication.MessagesService.MediaNotificationContent", diff --git a/sdk/communication/azure-communication-messages/tsp-location.yaml b/sdk/communication/azure-communication-messages/tsp-location.yaml index 02fe20ef27bf..d02e1d4b0230 100644 --- a/sdk/communication/azure-communication-messages/tsp-location.yaml +++ b/sdk/communication/azure-communication-messages/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/communication/Communication.Messages -commit: 9b1d6b68cb4ab26724d6e813b7649a40902d622d +commit: 3cb1b51638616435470fc10ea00de92512186ece repo: Azure/azure-rest-api-specs -additionalDirectories: +additionalDirectories: null diff --git a/sdk/contentsafety/azure-ai-contentsafety/tsp-location.yaml b/sdk/contentsafety/azure-ai-contentsafety/tsp-location.yaml index 8793817f59d6..2d361becfc25 100644 --- a/sdk/contentsafety/azure-ai-contentsafety/tsp-location.yaml +++ b/sdk/contentsafety/azure-ai-contentsafety/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/cognitiveservices/ContentSafety -commit: 4a4eaa0b5584e468feb566fca5eaf0c0c6eca4b3 +commit: 3cb1b51638616435470fc10ea00de92512186ece additionalDirectories: [] repo: Azure/azure-rest-api-specs diff --git a/sdk/devcenter/azure-developer-devcenter/tsp-location.yaml b/sdk/devcenter/azure-developer-devcenter/tsp-location.yaml index de056aa3aeda..1ae768467618 100644 --- a/sdk/devcenter/azure-developer-devcenter/tsp-location.yaml +++ b/sdk/devcenter/azure-developer-devcenter/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/devcenter/DevCenter -commit: 50136169b8692fcc3619f79d2121ff4948b7af08 +commit: 3cb1b51638616435470fc10ea00de92512186ece repo: Azure/azure-rest-api-specs cleanup: true diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/samples/java/com/azure/resourcemanager/deviceregistry/generated/AssetsCreateOrReplaceSamples.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/samples/java/com/azure/resourcemanager/deviceregistry/generated/AssetsCreateOrReplaceSamples.java index 581f37faca02..f0c693533d4e 100644 --- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/samples/java/com/azure/resourcemanager/deviceregistry/generated/AssetsCreateOrReplaceSamples.java +++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/samples/java/com/azure/resourcemanager/deviceregistry/generated/AssetsCreateOrReplaceSamples.java @@ -20,15 +20,15 @@ public final class AssetsCreateOrReplaceSamples { /* * x-ms-original-file: specification/deviceregistry/DeviceRegistry.Management/examples/2023-11-01-preview/ - * Create_Asset_Without_DisplayName.json + * Create_Asset_With_ExternalAssetId.json */ /** - * Sample code: Create_Asset_Without_DisplayName. + * Sample code: Create_Asset_With_ExternalAssetId. * * @param manager Entry point to DeviceRegistryManager. */ public static void - createAssetWithoutDisplayName(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) { + createAssetWithExternalAssetId(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) { manager.assets() .define("my-asset") .withRegion("West Europe") @@ -40,6 +40,7 @@ public final class AssetsCreateOrReplaceSamples { .withProperties(new AssetProperties().withAssetType("MyAssetType") .withEnabled(true) .withExternalAssetId("8ZBA6LRHU0A458969") + .withDisplayName("AssetDisplayName") .withDescription("This is a sample Asset") .withAssetEndpointProfileUri("https://www.example.com/myAssetEndpointProfile") .withManufacturer("Contoso") diff --git a/sdk/documentintelligence/azure-ai-documentintelligence/tsp-location.yaml b/sdk/documentintelligence/azure-ai-documentintelligence/tsp-location.yaml index 83bdc90c74cd..22a400b93f1a 100644 --- a/sdk/documentintelligence/azure-ai-documentintelligence/tsp-location.yaml +++ b/sdk/documentintelligence/azure-ai-documentintelligence/tsp-location.yaml @@ -1,3 +1,3 @@ directory: specification/ai/DocumentIntelligence -commit: 969c68562c5c4850257c9242a7a64b73c15f110d +commit: 3cb1b51638616435470fc10ea00de92512186ece repo: Azure/azure-rest-api-specs diff --git a/sdk/eventgrid/azure-messaging-eventgrid-namespaces/tsp-location.yaml b/sdk/eventgrid/azure-messaging-eventgrid-namespaces/tsp-location.yaml index 2d4ebd97492f..1a7dc2c17fd7 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid-namespaces/tsp-location.yaml +++ b/sdk/eventgrid/azure-messaging-eventgrid-namespaces/tsp-location.yaml @@ -1,4 +1,3 @@ repo: Azure/azure-rest-api-specs -directory: "specification/eventgrid/Azure.Messaging.EventGrid" -commit: beaa815ae7f656ce826d9cb8f1078514c3fb407c - +directory: specification/eventgrid/Azure.Messaging.EventGrid +commit: 3cb1b51638616435470fc10ea00de92512186ece diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceAsyncClient.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceAsyncClient.java index 893b5bbab008..4ef2a4d456e4 100644 --- a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceAsyncClient.java +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceAsyncClient.java @@ -364,9 +364,11 @@ public Mono group(List faceIds) { * Detect human faces in an image, return face rectangles, and optionally with faceIds, landmarks, and attributes. * * > [!IMPORTANT] - * > To mitigate potential misuse that can subject people to stereotyping, discrimination, or unfair denial of - * services, we are retiring Face API attributes that predict emotion, gender, age, smile, facial hair, hair, and - * makeup. Read more about this decision + * > Microsoft has retired or limited facial recognition capabilities that can be used to try to infer emotional + * states and identity attributes which, if misused, can subject people to stereotyping, discrimination or unfair + * denial of services. The retired capabilities are emotion and gender. The limited capabilities are age, smile, + * facial hair, hair and makeup. Email Azure Face API <azureface@microsoft.com> if you have a responsible + * use case that would benefit from the use of any of the limited capabilities. Read more about this decision * https://azure.microsoft.com/blog/responsible-ai-investments-and-safeguards-for-facial-recognition/. * * * @@ -547,9 +549,11 @@ Mono> detectFromUrlImplWithResponse(BinaryData request, Req * Detect human faces in an image, return face rectangles, and optionally with faceIds, landmarks, and attributes. * * > [!IMPORTANT] - * > To mitigate potential misuse that can subject people to stereotyping, discrimination, or unfair denial of - * services, we are retiring Face API attributes that predict emotion, gender, age, smile, facial hair, hair, and - * makeup. Read more about this decision + * > Microsoft has retired or limited facial recognition capabilities that can be used to try to infer emotional + * states and identity attributes which, if misused, can subject people to stereotyping, discrimination or unfair + * denial of services. The retired capabilities are emotion and gender. The limited capabilities are age, smile, + * facial hair, hair and makeup. Email Azure Face API <azureface@microsoft.com> if you have a responsible + * use case that would benefit from the use of any of the limited capabilities. Read more about this decision * https://azure.microsoft.com/blog/responsible-ai-investments-and-safeguards-for-facial-recognition/. * * * @@ -728,9 +732,11 @@ Mono> detectImplWithResponse(BinaryData imageContent, Reque * Detect human faces in an image, return face rectangles, and optionally with faceIds, landmarks, and attributes. * * > [!IMPORTANT] - * > To mitigate potential misuse that can subject people to stereotyping, discrimination, or unfair denial of - * services, we are retiring Face API attributes that predict emotion, gender, age, smile, facial hair, hair, and - * makeup. Read more about this decision + * > Microsoft has retired or limited facial recognition capabilities that can be used to try to infer emotional + * states and identity attributes which, if misused, can subject people to stereotyping, discrimination or unfair + * denial of services. The retired capabilities are emotion and gender. The limited capabilities are age, smile, + * facial hair, hair and makeup. Email Azure Face API <azureface@microsoft.com> if you have a responsible + * use case that would benefit from the use of any of the limited capabilities. Read more about this decision * https://azure.microsoft.com/blog/responsible-ai-investments-and-safeguards-for-facial-recognition/. * * * @@ -814,9 +820,11 @@ Mono> detectFromUrlImpl(DetectFromUrlImplOptions optio * Detect human faces in an image, return face rectangles, and optionally with faceIds, landmarks, and attributes. * * > [!IMPORTANT] - * > To mitigate potential misuse that can subject people to stereotyping, discrimination, or unfair denial of - * services, we are retiring Face API attributes that predict emotion, gender, age, smile, facial hair, hair, and - * makeup. Read more about this decision + * > Microsoft has retired or limited facial recognition capabilities that can be used to try to infer emotional + * states and identity attributes which, if misused, can subject people to stereotyping, discrimination or unfair + * denial of services. The retired capabilities are emotion and gender. The limited capabilities are age, smile, + * facial hair, hair and makeup. Email Azure Face API <azureface@microsoft.com> if you have a responsible + * use case that would benefit from the use of any of the limited capabilities. Read more about this decision * https://azure.microsoft.com/blog/responsible-ai-investments-and-safeguards-for-facial-recognition/. * * * @@ -908,9 +916,11 @@ Mono> detectImpl(BinaryData imageContent, FaceDetectio * Detect human faces in an image, return face rectangles, and optionally with faceIds, landmarks, and attributes. * * > [!IMPORTANT] - * > To mitigate potential misuse that can subject people to stereotyping, discrimination, or unfair denial of - * services, we are retiring Face API attributes that predict emotion, gender, age, smile, facial hair, hair, and - * makeup. Read more about this decision + * > Microsoft has retired or limited facial recognition capabilities that can be used to try to infer emotional + * states and identity attributes which, if misused, can subject people to stereotyping, discrimination or unfair + * denial of services. The retired capabilities are emotion and gender. The limited capabilities are age, smile, + * facial hair, hair and makeup. Email Azure Face API <azureface@microsoft.com> if you have a responsible + * use case that would benefit from the use of any of the limited capabilities. Read more about this decision * https://azure.microsoft.com/blog/responsible-ai-investments-and-safeguards-for-facial-recognition/. * * * diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceClient.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceClient.java index b828bd100eb5..739118a9c11a 100644 --- a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceClient.java +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceClient.java @@ -359,9 +359,11 @@ public FaceGroupingResult group(List faceIds) { * Detect human faces in an image, return face rectangles, and optionally with faceIds, landmarks, and attributes. * * > [!IMPORTANT] - * > To mitigate potential misuse that can subject people to stereotyping, discrimination, or unfair denial of - * services, we are retiring Face API attributes that predict emotion, gender, age, smile, facial hair, hair, and - * makeup. Read more about this decision + * > Microsoft has retired or limited facial recognition capabilities that can be used to try to infer emotional + * states and identity attributes which, if misused, can subject people to stereotyping, discrimination or unfair + * denial of services. The retired capabilities are emotion and gender. The limited capabilities are age, smile, + * facial hair, hair and makeup. Email Azure Face API <azureface@microsoft.com> if you have a responsible + * use case that would benefit from the use of any of the limited capabilities. Read more about this decision * https://azure.microsoft.com/blog/responsible-ai-investments-and-safeguards-for-facial-recognition/. * * * @@ -542,9 +544,11 @@ Response detectFromUrlImplWithResponse(BinaryData request, RequestOp * Detect human faces in an image, return face rectangles, and optionally with faceIds, landmarks, and attributes. * * > [!IMPORTANT] - * > To mitigate potential misuse that can subject people to stereotyping, discrimination, or unfair denial of - * services, we are retiring Face API attributes that predict emotion, gender, age, smile, facial hair, hair, and - * makeup. Read more about this decision + * > Microsoft has retired or limited facial recognition capabilities that can be used to try to infer emotional + * states and identity attributes which, if misused, can subject people to stereotyping, discrimination or unfair + * denial of services. The retired capabilities are emotion and gender. The limited capabilities are age, smile, + * facial hair, hair and makeup. Email Azure Face API <azureface@microsoft.com> if you have a responsible + * use case that would benefit from the use of any of the limited capabilities. Read more about this decision * https://azure.microsoft.com/blog/responsible-ai-investments-and-safeguards-for-facial-recognition/. * * * @@ -723,9 +727,11 @@ Response detectImplWithResponse(BinaryData imageContent, RequestOpti * Detect human faces in an image, return face rectangles, and optionally with faceIds, landmarks, and attributes. * * > [!IMPORTANT] - * > To mitigate potential misuse that can subject people to stereotyping, discrimination, or unfair denial of - * services, we are retiring Face API attributes that predict emotion, gender, age, smile, facial hair, hair, and - * makeup. Read more about this decision + * > Microsoft has retired or limited facial recognition capabilities that can be used to try to infer emotional + * states and identity attributes which, if misused, can subject people to stereotyping, discrimination or unfair + * denial of services. The retired capabilities are emotion and gender. The limited capabilities are age, smile, + * facial hair, hair and makeup. Email Azure Face API <azureface@microsoft.com> if you have a responsible + * use case that would benefit from the use of any of the limited capabilities. Read more about this decision * https://azure.microsoft.com/blog/responsible-ai-investments-and-safeguards-for-facial-recognition/. * * * @@ -809,9 +815,11 @@ List detectFromUrlImpl(DetectFromUrlImplOptions options) { * Detect human faces in an image, return face rectangles, and optionally with faceIds, landmarks, and attributes. * * > [!IMPORTANT] - * > To mitigate potential misuse that can subject people to stereotyping, discrimination, or unfair denial of - * services, we are retiring Face API attributes that predict emotion, gender, age, smile, facial hair, hair, and - * makeup. Read more about this decision + * > Microsoft has retired or limited facial recognition capabilities that can be used to try to infer emotional + * states and identity attributes which, if misused, can subject people to stereotyping, discrimination or unfair + * denial of services. The retired capabilities are emotion and gender. The limited capabilities are age, smile, + * facial hair, hair and makeup. Email Azure Face API <azureface@microsoft.com> if you have a responsible + * use case that would benefit from the use of any of the limited capabilities. Read more about this decision * https://azure.microsoft.com/blog/responsible-ai-investments-and-safeguards-for-facial-recognition/. * * * @@ -903,9 +911,11 @@ List detectImpl(BinaryData imageContent, FaceDetectionModel * Detect human faces in an image, return face rectangles, and optionally with faceIds, landmarks, and attributes. * * > [!IMPORTANT] - * > To mitigate potential misuse that can subject people to stereotyping, discrimination, or unfair denial of - * services, we are retiring Face API attributes that predict emotion, gender, age, smile, facial hair, hair, and - * makeup. Read more about this decision + * > Microsoft has retired or limited facial recognition capabilities that can be used to try to infer emotional + * states and identity attributes which, if misused, can subject people to stereotyping, discrimination or unfair + * denial of services. The retired capabilities are emotion and gender. The limited capabilities are age, smile, + * facial hair, hair and makeup. Email Azure Face API <azureface@microsoft.com> if you have a responsible + * use case that would benefit from the use of any of the limited capabilities. Read more about this decision * https://azure.microsoft.com/blog/responsible-ai-investments-and-safeguards-for-facial-recognition/. * * * diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceSessionAsyncClient.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceSessionAsyncClient.java index 97de90b3a0ed..0ce5094b7e13 100644 --- a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceSessionAsyncClient.java +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceSessionAsyncClient.java @@ -87,7 +87,7 @@ public final class FaceSessionAsyncClient { * } * }
* - * @param createLivenessSessionContent Request for creating liveness session. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -98,9 +98,9 @@ public final class FaceSessionAsyncClient { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createLivenessSessionWithResponse(BinaryData createLivenessSessionContent, + public Mono> createLivenessSessionWithResponse(BinaryData body, RequestOptions requestOptions) { - return this.serviceClient.createLivenessSessionWithResponseAsync(createLivenessSessionContent, requestOptions); + return this.serviceClient.createLivenessSessionWithResponseAsync(body, requestOptions); } /** @@ -383,7 +383,7 @@ public Mono> getLivenessSessionAuditEntriesWithResponse(Str * } * }
* - * @param createLivenessSessionContent Request for creating liveness session. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -394,10 +394,9 @@ public Mono> getLivenessSessionAuditEntriesWithResponse(Str */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createLivenessWithVerifySessionWithResponse(BinaryData createLivenessSessionContent, + Mono> createLivenessWithVerifySessionWithResponse(BinaryData body, RequestOptions requestOptions) { - return this.serviceClient.createLivenessWithVerifySessionWithResponseAsync(createLivenessSessionContent, - requestOptions); + return this.serviceClient.createLivenessWithVerifySessionWithResponseAsync(body, requestOptions); } /** @@ -703,7 +702,7 @@ public Mono> getLivenessWithVerifySessionAuditEntriesWithRe * retrieve a result, use the Get Liveness Session. To audit the individual requests that a client has made to your * resource, use the List Liveness Session Audit Entries. * - * @param createLivenessSessionContent Request for creating liveness session. + * @param body Body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -714,12 +713,10 @@ public Mono> getLivenessWithVerifySessionAuditEntriesWithRe */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono - createLivenessSession(CreateLivenessSessionContent createLivenessSessionContent) { + public Mono createLivenessSession(CreateLivenessSessionContent body) { // Generated convenience method for createLivenessSessionWithResponse RequestOptions requestOptions = new RequestOptions(); - return createLivenessSessionWithResponse(BinaryData.fromObject(createLivenessSessionContent), requestOptions) - .flatMap(FluxUtil::toMono) + return createLivenessSessionWithResponse(BinaryData.fromObject(body), requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(CreateLivenessSessionResult.class)); } @@ -903,7 +900,7 @@ public Mono> getLivenessSessionAuditEntries(Stri * > [!NOTE] * > Extra measures should be taken to validate that the client is sending the expected VerifyImage. * - * @param createLivenessSessionContent Request for creating liveness session. + * @param body Body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -915,12 +912,11 @@ public Mono> getLivenessSessionAuditEntries(Stri */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Mono - createLivenessWithVerifySession(CreateLivenessSessionContent createLivenessSessionContent) { + Mono createLivenessWithVerifySession(CreateLivenessSessionContent body) { // Generated convenience method for createLivenessWithVerifySessionWithResponse RequestOptions requestOptions = new RequestOptions(); - return createLivenessWithVerifySessionWithResponse(BinaryData.fromObject(createLivenessSessionContent), - requestOptions).flatMap(FluxUtil::toMono) + return createLivenessWithVerifySessionWithResponse(BinaryData.fromObject(body), requestOptions) + .flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(CreateLivenessWithVerifySessionResult.class)); } diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceSessionClient.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceSessionClient.java index 3e8b02af91ea..7ac392fa21d8 100644 --- a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceSessionClient.java +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceSessionClient.java @@ -85,7 +85,7 @@ public final class FaceSessionClient { * } * }
* - * @param createLivenessSessionContent Request for creating liveness session. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -95,9 +95,8 @@ public final class FaceSessionClient { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response createLivenessSessionWithResponse(BinaryData createLivenessSessionContent, - RequestOptions requestOptions) { - return this.serviceClient.createLivenessSessionWithResponse(createLivenessSessionContent, requestOptions); + public Response createLivenessSessionWithResponse(BinaryData body, RequestOptions requestOptions) { + return this.serviceClient.createLivenessSessionWithResponse(body, requestOptions); } /** @@ -377,7 +376,7 @@ public Response getLivenessSessionAuditEntriesWithResponse(String se * } * }
* - * @param createLivenessSessionContent Request for creating liveness session. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -387,10 +386,8 @@ public Response getLivenessSessionAuditEntriesWithResponse(String se */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Response createLivenessWithVerifySessionWithResponse(BinaryData createLivenessSessionContent, - RequestOptions requestOptions) { - return this.serviceClient.createLivenessWithVerifySessionWithResponse(createLivenessSessionContent, - requestOptions); + Response createLivenessWithVerifySessionWithResponse(BinaryData body, RequestOptions requestOptions) { + return this.serviceClient.createLivenessWithVerifySessionWithResponse(body, requestOptions); } /** @@ -692,7 +689,7 @@ public Response getLivenessWithVerifySessionAuditEntriesWithResponse * retrieve a result, use the Get Liveness Session. To audit the individual requests that a client has made to your * resource, use the List Liveness Session Audit Entries. * - * @param createLivenessSessionContent Request for creating liveness session. + * @param body Body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -703,12 +700,10 @@ public Response getLivenessWithVerifySessionAuditEntriesWithResponse */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public CreateLivenessSessionResult - createLivenessSession(CreateLivenessSessionContent createLivenessSessionContent) { + public CreateLivenessSessionResult createLivenessSession(CreateLivenessSessionContent body) { // Generated convenience method for createLivenessSessionWithResponse RequestOptions requestOptions = new RequestOptions(); - return createLivenessSessionWithResponse(BinaryData.fromObject(createLivenessSessionContent), requestOptions) - .getValue() + return createLivenessSessionWithResponse(BinaryData.fromObject(body), requestOptions).getValue() .toObject(CreateLivenessSessionResult.class); } @@ -890,7 +885,7 @@ public List getLivenessSessionAuditEntries(String ses * > [!NOTE] * > Extra measures should be taken to validate that the client is sending the expected VerifyImage. * - * @param createLivenessSessionContent Request for creating liveness session. + * @param body Body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -901,12 +896,11 @@ public List getLivenessSessionAuditEntries(String ses */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - CreateLivenessWithVerifySessionResult - createLivenessWithVerifySession(CreateLivenessSessionContent createLivenessSessionContent) { + CreateLivenessWithVerifySessionResult createLivenessWithVerifySession(CreateLivenessSessionContent body) { // Generated convenience method for createLivenessWithVerifySessionWithResponse RequestOptions requestOptions = new RequestOptions(); - return createLivenessWithVerifySessionWithResponse(BinaryData.fromObject(createLivenessSessionContent), - requestOptions).getValue().toObject(CreateLivenessWithVerifySessionResult.class); + return createLivenessWithVerifySessionWithResponse(BinaryData.fromObject(body), requestOptions).getValue() + .toObject(CreateLivenessWithVerifySessionResult.class); } /** diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/implementation/FaceClientImpl.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/implementation/FaceClientImpl.java index 62c67fdff4d2..db6692deac0a 100644 --- a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/implementation/FaceClientImpl.java +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/implementation/FaceClientImpl.java @@ -261,9 +261,11 @@ Response groupSync(@HostParam("endpoint") String endpoint, * Detect human faces in an image, return face rectangles, and optionally with faceIds, landmarks, and attributes. * * > [!IMPORTANT] - * > To mitigate potential misuse that can subject people to stereotyping, discrimination, or unfair denial of - * services, we are retiring Face API attributes that predict emotion, gender, age, smile, facial hair, hair, and - * makeup. Read more about this decision + * > Microsoft has retired or limited facial recognition capabilities that can be used to try to infer emotional + * states and identity attributes which, if misused, can subject people to stereotyping, discrimination or unfair + * denial of services. The retired capabilities are emotion and gender. The limited capabilities are age, smile, + * facial hair, hair and makeup. Email Azure Face API <azureface@microsoft.com> if you have a responsible + * use case that would benefit from the use of any of the limited capabilities. Read more about this decision * https://azure.microsoft.com/blog/responsible-ai-investments-and-safeguards-for-facial-recognition/. * * * @@ -447,9 +449,11 @@ public Mono> detectFromUrlImplWithResponseAsync(BinaryData * Detect human faces in an image, return face rectangles, and optionally with faceIds, landmarks, and attributes. * * > [!IMPORTANT] - * > To mitigate potential misuse that can subject people to stereotyping, discrimination, or unfair denial of - * services, we are retiring Face API attributes that predict emotion, gender, age, smile, facial hair, hair, and - * makeup. Read more about this decision + * > Microsoft has retired or limited facial recognition capabilities that can be used to try to infer emotional + * states and identity attributes which, if misused, can subject people to stereotyping, discrimination or unfair + * denial of services. The retired capabilities are emotion and gender. The limited capabilities are age, smile, + * facial hair, hair and makeup. Email Azure Face API <azureface@microsoft.com> if you have a responsible + * use case that would benefit from the use of any of the limited capabilities. Read more about this decision * https://azure.microsoft.com/blog/responsible-ai-investments-and-safeguards-for-facial-recognition/. * * * @@ -632,9 +636,11 @@ public Response detectFromUrlImplWithResponse(BinaryData request, Re * Detect human faces in an image, return face rectangles, and optionally with faceIds, landmarks, and attributes. * * > [!IMPORTANT] - * > To mitigate potential misuse that can subject people to stereotyping, discrimination, or unfair denial of - * services, we are retiring Face API attributes that predict emotion, gender, age, smile, facial hair, hair, and - * makeup. Read more about this decision + * > Microsoft has retired or limited facial recognition capabilities that can be used to try to infer emotional + * states and identity attributes which, if misused, can subject people to stereotyping, discrimination or unfair + * denial of services. The retired capabilities are emotion and gender. The limited capabilities are age, smile, + * facial hair, hair and makeup. Email Azure Face API <azureface@microsoft.com> if you have a responsible + * use case that would benefit from the use of any of the limited capabilities. Read more about this decision * https://azure.microsoft.com/blog/responsible-ai-investments-and-safeguards-for-facial-recognition/. * * * @@ -816,9 +822,11 @@ public Mono> detectImplWithResponseAsync(BinaryData imageCo * Detect human faces in an image, return face rectangles, and optionally with faceIds, landmarks, and attributes. * * > [!IMPORTANT] - * > To mitigate potential misuse that can subject people to stereotyping, discrimination, or unfair denial of - * services, we are retiring Face API attributes that predict emotion, gender, age, smile, facial hair, hair, and - * makeup. Read more about this decision + * > Microsoft has retired or limited facial recognition capabilities that can be used to try to infer emotional + * states and identity attributes which, if misused, can subject people to stereotyping, discrimination or unfair + * denial of services. The retired capabilities are emotion and gender. The limited capabilities are age, smile, + * facial hair, hair and makeup. Email Azure Face API <azureface@microsoft.com> if you have a responsible + * use case that would benefit from the use of any of the limited capabilities. Read more about this decision * https://azure.microsoft.com/blog/responsible-ai-investments-and-safeguards-for-facial-recognition/. * * * diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/implementation/FaceSessionClientImpl.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/implementation/FaceSessionClientImpl.java index ba98b31d6eca..a0dabd6671d7 100644 --- a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/implementation/FaceSessionClientImpl.java +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/implementation/FaceSessionClientImpl.java @@ -160,8 +160,7 @@ public interface FaceSessionClientService { @UnexpectedResponseExceptionType(HttpResponseException.class) Mono> createLivenessSession(@HostParam("endpoint") String endpoint, @HostParam("apiVersion") String apiVersion, @HeaderParam("accept") String accept, - @BodyParam("application/json") BinaryData createLivenessSessionContent, RequestOptions requestOptions, - Context context); + @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); @Post("/detectLiveness/singleModal/sessions") @ExpectedResponses({ 200 }) @@ -171,8 +170,7 @@ Mono> createLivenessSession(@HostParam("endpoint") String e @UnexpectedResponseExceptionType(HttpResponseException.class) Response createLivenessSessionSync(@HostParam("endpoint") String endpoint, @HostParam("apiVersion") String apiVersion, @HeaderParam("accept") String accept, - @BodyParam("application/json") BinaryData createLivenessSessionContent, RequestOptions requestOptions, - Context context); + @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); @Delete("/detectLiveness/singleModal/sessions/{sessionId}") @ExpectedResponses({ 200 }) @@ -262,8 +260,7 @@ Response getLivenessSessionAuditEntriesSync(@HostParam("endpoint") S @UnexpectedResponseExceptionType(HttpResponseException.class) Mono> createLivenessWithVerifySession(@HostParam("endpoint") String endpoint, @HostParam("apiVersion") String apiVersion, @HeaderParam("accept") String accept, - @BodyParam("application/json") BinaryData createLivenessSessionContent, RequestOptions requestOptions, - Context context); + @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); @Post("/detectLivenessWithVerify/singleModal/sessions") @ExpectedResponses({ 200 }) @@ -273,8 +270,7 @@ Mono> createLivenessWithVerifySession(@HostParam("endpoint" @UnexpectedResponseExceptionType(HttpResponseException.class) Response createLivenessWithVerifySessionSync(@HostParam("endpoint") String endpoint, @HostParam("apiVersion") String apiVersion, @HeaderParam("accept") String accept, - @BodyParam("application/json") BinaryData createLivenessSessionContent, RequestOptions requestOptions, - Context context); + @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); // @Multipart not supported by RestProxy @Post("/detectLivenessWithVerify/singleModal/sessions") @@ -421,7 +417,7 @@ Response getLivenessWithVerifySessionAuditEntriesSync(@HostParam("en * } * }
* - * @param createLivenessSessionContent Request for creating liveness session. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -431,11 +427,11 @@ Response getLivenessWithVerifySessionAuditEntriesSync(@HostParam("en * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createLivenessSessionWithResponseAsync(BinaryData createLivenessSessionContent, + public Mono> createLivenessSessionWithResponseAsync(BinaryData body, RequestOptions requestOptions) { final String accept = "application/json"; return FluxUtil.withContext(context -> service.createLivenessSession(this.getEndpoint(), - this.getServiceVersion().getVersion(), accept, createLivenessSessionContent, requestOptions, context)); + this.getServiceVersion().getVersion(), accept, body, requestOptions, context)); } /** @@ -476,7 +472,7 @@ public Mono> createLivenessSessionWithResponseAsync(BinaryD * } * }
* - * @param createLivenessSessionContent Request for creating liveness session. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -485,11 +481,10 @@ public Mono> createLivenessSessionWithResponseAsync(BinaryD * @return response of liveness session creation along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createLivenessSessionWithResponse(BinaryData createLivenessSessionContent, - RequestOptions requestOptions) { + public Response createLivenessSessionWithResponse(BinaryData body, RequestOptions requestOptions) { final String accept = "application/json"; return service.createLivenessSessionSync(this.getEndpoint(), this.getServiceVersion().getVersion(), accept, - createLivenessSessionContent, requestOptions, Context.NONE); + body, requestOptions, Context.NONE); } /** @@ -1002,7 +997,7 @@ public Response getLivenessSessionAuditEntriesWithResponse(String se * } * }
* - * @param createLivenessSessionContent Request for creating liveness session. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -1012,11 +1007,11 @@ public Response getLivenessSessionAuditEntriesWithResponse(String se * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createLivenessWithVerifySessionWithResponseAsync( - BinaryData createLivenessSessionContent, RequestOptions requestOptions) { + public Mono> createLivenessWithVerifySessionWithResponseAsync(BinaryData body, + RequestOptions requestOptions) { final String accept = "application/json"; return FluxUtil.withContext(context -> service.createLivenessWithVerifySession(this.getEndpoint(), - this.getServiceVersion().getVersion(), accept, createLivenessSessionContent, requestOptions, context)); + this.getServiceVersion().getVersion(), accept, body, requestOptions, context)); } /** @@ -1075,7 +1070,7 @@ public Mono> createLivenessWithVerifySessionWithResponseAsy * } * }
* - * @param createLivenessSessionContent Request for creating liveness session. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -1084,11 +1079,11 @@ public Mono> createLivenessWithVerifySessionWithResponseAsy * @return response of liveness session with verify creation with verify image provided along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createLivenessWithVerifySessionWithResponse(BinaryData createLivenessSessionContent, + public Response createLivenessWithVerifySessionWithResponse(BinaryData body, RequestOptions requestOptions) { final String accept = "application/json"; return service.createLivenessWithVerifySessionSync(this.getEndpoint(), this.getServiceVersion().getVersion(), - accept, createLivenessSessionContent, requestOptions, Context.NONE); + accept, body, requestOptions, Context.NONE); } /** diff --git a/sdk/face/azure-ai-vision-face/tsp-location.yaml b/sdk/face/azure-ai-vision-face/tsp-location.yaml index 272d2f0e253b..7ccc0119a955 100644 --- a/sdk/face/azure-ai-vision-face/tsp-location.yaml +++ b/sdk/face/azure-ai-vision-face/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/ai/Face -commit: 1d2253d1e221541cf05ae5d0dd95bd28c0846238 +commit: 3cb1b51638616435470fc10ea00de92512186ece repo: Azure/azure-rest-api-specs -additionalDirectories: +additionalDirectories: null diff --git a/sdk/openai/azure-ai-openai-assistants/src/main/java/com/azure/ai/openai/assistants/AssistantsAsyncClient.java b/sdk/openai/azure-ai-openai-assistants/src/main/java/com/azure/ai/openai/assistants/AssistantsAsyncClient.java index 3eaf9ced9441..416c8ebee6a9 100644 --- a/sdk/openai/azure-ai-openai-assistants/src/main/java/com/azure/ai/openai/assistants/AssistantsAsyncClient.java +++ b/sdk/openai/azure-ai-openai-assistants/src/main/java/com/azure/ai/openai/assistants/AssistantsAsyncClient.java @@ -272,7 +272,7 @@ public Mono> deleteAssistantWithResponse(String assistantId /** * Creates a new assistant. * - * @param assistantCreationOptions The request details to use when creating a new assistant. + * @param body Body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -283,11 +283,10 @@ public Mono> deleteAssistantWithResponse(String assistantId */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createAssistant(AssistantCreationOptions assistantCreationOptions) { + public Mono createAssistant(AssistantCreationOptions body) { // Generated convenience method for createAssistantWithResponse RequestOptions requestOptions = new RequestOptions(); - return createAssistantWithResponse(BinaryData.fromObject(assistantCreationOptions), requestOptions) - .flatMap(FluxUtil::toMono) + return createAssistantWithResponse(BinaryData.fromObject(body), requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(Assistant.class)); } @@ -1465,7 +1464,7 @@ public Mono getAssistant(String assistantId) { /** * Creates a new thread. Threads contain messages and can be run by assistants. * - * @param assistantThreadCreationOptions The details used to create a new assistant thread. + * @param body Body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -1476,11 +1475,10 @@ public Mono getAssistant(String assistantId) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createThread(AssistantThreadCreationOptions assistantThreadCreationOptions) { + public Mono createThread(AssistantThreadCreationOptions body) { // Generated convenience method for createThreadWithResponse RequestOptions requestOptions = new RequestOptions(); - return createThreadWithResponse(BinaryData.fromObject(assistantThreadCreationOptions), requestOptions) - .flatMap(FluxUtil::toMono) + return createThreadWithResponse(BinaryData.fromObject(body), requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(AssistantThread.class)); } @@ -1726,7 +1724,7 @@ public Mono cancelRun(String threadId, String runId) { /** * Creates a new assistant thread and immediately starts a run using that new thread. * - * @param createAndRunThreadOptions The details used when creating and immediately running a new assistant thread. + * @param body Body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -1738,11 +1736,10 @@ public Mono cancelRun(String threadId, String runId) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createThreadAndRun(CreateAndRunThreadOptions createAndRunThreadOptions) { + public Mono createThreadAndRun(CreateAndRunThreadOptions body) { // Generated convenience method for createThreadAndRunWithResponse RequestOptions requestOptions = new RequestOptions(); - return createThreadAndRunWithResponse(BinaryData.fromObject(createAndRunThreadOptions), requestOptions) - .flatMap(FluxUtil::toMono) + return createThreadAndRunWithResponse(BinaryData.fromObject(body), requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(ThreadRun.class)); } @@ -2235,7 +2232,7 @@ public Mono> getFileWithResponse(String fileId, RequestOpti * Modifies an existing assistant. * * @param assistantId The ID of the assistant to modify. - * @param updateAssistantOptions The request details to use when modifying an existing assistant. + * @param body Body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -2246,10 +2243,10 @@ public Mono> getFileWithResponse(String fileId, RequestOpti */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAssistant(String assistantId, UpdateAssistantOptions updateAssistantOptions) { + public Mono updateAssistant(String assistantId, UpdateAssistantOptions body) { // Generated convenience method for updateAssistantWithResponse RequestOptions requestOptions = new RequestOptions(); - return updateAssistantWithResponse(assistantId, BinaryData.fromObject(updateAssistantOptions), requestOptions) + return updateAssistantWithResponse(assistantId, BinaryData.fromObject(body), requestOptions) .flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(Assistant.class)); } @@ -3267,7 +3264,7 @@ public Mono> listVectorStoreFileBatchFilesWithResponse(Stri * Modifies an existing thread. * * @param threadId The ID of the thread to modify. - * @param updateAssistantThreadOptions The details used to update an existing assistant thread. + * @param body Body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -3278,12 +3275,10 @@ public Mono> listVectorStoreFileBatchFilesWithResponse(Stri */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateThread(String threadId, - UpdateAssistantThreadOptions updateAssistantThreadOptions) { + public Mono updateThread(String threadId, UpdateAssistantThreadOptions body) { // Generated convenience method for updateThreadWithResponse RequestOptions requestOptions = new RequestOptions(); - return updateThreadWithResponse(threadId, BinaryData.fromObject(updateAssistantThreadOptions), requestOptions) - .flatMap(FluxUtil::toMono) + return updateThreadWithResponse(threadId, BinaryData.fromObject(body), requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(AssistantThread.class)); } @@ -3376,7 +3371,7 @@ public Mono> listVectorStores() { /** * Creates a vector store. * - * @param vectorStoreOptions Request object for creating a vector store. + * @param body Body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -3388,11 +3383,10 @@ public Mono> listVectorStores() { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createVectorStore(VectorStoreOptions vectorStoreOptions) { + public Mono createVectorStore(VectorStoreOptions body) { // Generated convenience method for createVectorStoreWithResponse RequestOptions requestOptions = new RequestOptions(); - return createVectorStoreWithResponse(BinaryData.fromObject(vectorStoreOptions), requestOptions) - .flatMap(FluxUtil::toMono) + return createVectorStoreWithResponse(BinaryData.fromObject(body), requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(VectorStore.class)); } diff --git a/sdk/openai/azure-ai-openai-assistants/src/main/java/com/azure/ai/openai/assistants/AssistantsClient.java b/sdk/openai/azure-ai-openai-assistants/src/main/java/com/azure/ai/openai/assistants/AssistantsClient.java index b5b54dd1b82e..9308020989e7 100644 --- a/sdk/openai/azure-ai-openai-assistants/src/main/java/com/azure/ai/openai/assistants/AssistantsClient.java +++ b/sdk/openai/azure-ai-openai-assistants/src/main/java/com/azure/ai/openai/assistants/AssistantsClient.java @@ -268,7 +268,7 @@ public Response deleteAssistantWithResponse(String assistantId, Requ /** * Creates a new assistant. * - * @param assistantCreationOptions The request details to use when creating a new assistant. + * @param body Body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -279,10 +279,10 @@ public Response deleteAssistantWithResponse(String assistantId, Requ */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Assistant createAssistant(AssistantCreationOptions assistantCreationOptions) { + public Assistant createAssistant(AssistantCreationOptions body) { // Generated convenience method for createAssistantWithResponse RequestOptions requestOptions = new RequestOptions(); - return createAssistantWithResponse(BinaryData.fromObject(assistantCreationOptions), requestOptions).getValue() + return createAssistantWithResponse(BinaryData.fromObject(body), requestOptions).getValue() .toObject(Assistant.class); } @@ -1497,7 +1497,7 @@ public Assistant getAssistant(String assistantId) { /** * Creates a new thread. Threads contain messages and can be run by assistants. * - * @param assistantThreadCreationOptions The details used to create a new assistant thread. + * @param body Body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -1508,11 +1508,10 @@ public Assistant getAssistant(String assistantId) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public AssistantThread createThread(AssistantThreadCreationOptions assistantThreadCreationOptions) { + public AssistantThread createThread(AssistantThreadCreationOptions body) { // Generated convenience method for createThreadWithResponse RequestOptions requestOptions = new RequestOptions(); - return createThreadWithResponse(BinaryData.fromObject(assistantThreadCreationOptions), requestOptions) - .getValue() + return createThreadWithResponse(BinaryData.fromObject(body), requestOptions).getValue() .toObject(AssistantThread.class); } @@ -1754,7 +1753,7 @@ public ThreadRun cancelRun(String threadId, String runId) { /** * Creates a new assistant thread and immediately starts a run using that new thread. * - * @param createAndRunThreadOptions The details used when creating and immediately running a new assistant thread. + * @param body Body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -1765,11 +1764,10 @@ public ThreadRun cancelRun(String threadId, String runId) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public ThreadRun createThreadAndRun(CreateAndRunThreadOptions createAndRunThreadOptions) { + public ThreadRun createThreadAndRun(CreateAndRunThreadOptions body) { // Generated convenience method for createThreadAndRunWithResponse RequestOptions requestOptions = new RequestOptions(); - return createThreadAndRunWithResponse(BinaryData.fromObject(createAndRunThreadOptions), requestOptions) - .getValue() + return createThreadAndRunWithResponse(BinaryData.fromObject(body), requestOptions).getValue() .toObject(ThreadRun.class); } @@ -2250,7 +2248,7 @@ public Response getFileWithResponse(String fileId, RequestOptions re * Modifies an existing assistant. * * @param assistantId The ID of the assistant to modify. - * @param updateAssistantOptions The request details to use when modifying an existing assistant. + * @param body Body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -2261,11 +2259,10 @@ public Response getFileWithResponse(String fileId, RequestOptions re */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Assistant updateAssistant(String assistantId, UpdateAssistantOptions updateAssistantOptions) { + public Assistant updateAssistant(String assistantId, UpdateAssistantOptions body) { // Generated convenience method for updateAssistantWithResponse RequestOptions requestOptions = new RequestOptions(); - return updateAssistantWithResponse(assistantId, BinaryData.fromObject(updateAssistantOptions), requestOptions) - .getValue() + return updateAssistantWithResponse(assistantId, BinaryData.fromObject(body), requestOptions).getValue() .toObject(Assistant.class); } @@ -3287,7 +3284,7 @@ public Response listVectorStoreFileBatchFilesWithResponse(String vec * Modifies an existing thread. * * @param threadId The ID of the thread to modify. - * @param updateAssistantThreadOptions The details used to update an existing assistant thread. + * @param body Body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -3298,11 +3295,10 @@ public Response listVectorStoreFileBatchFilesWithResponse(String vec */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public AssistantThread updateThread(String threadId, UpdateAssistantThreadOptions updateAssistantThreadOptions) { + public AssistantThread updateThread(String threadId, UpdateAssistantThreadOptions body) { // Generated convenience method for updateThreadWithResponse RequestOptions requestOptions = new RequestOptions(); - return updateThreadWithResponse(threadId, BinaryData.fromObject(updateAssistantThreadOptions), requestOptions) - .getValue() + return updateThreadWithResponse(threadId, BinaryData.fromObject(body), requestOptions).getValue() .toObject(AssistantThread.class); } @@ -3394,7 +3390,7 @@ public PageableList listVectorStores() { /** * Creates a vector store. * - * @param vectorStoreOptions Request object for creating a vector store. + * @param body Body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -3405,10 +3401,10 @@ public PageableList listVectorStores() { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public VectorStore createVectorStore(VectorStoreOptions vectorStoreOptions) { + public VectorStore createVectorStore(VectorStoreOptions body) { // Generated convenience method for createVectorStoreWithResponse RequestOptions requestOptions = new RequestOptions(); - return createVectorStoreWithResponse(BinaryData.fromObject(vectorStoreOptions), requestOptions).getValue() + return createVectorStoreWithResponse(BinaryData.fromObject(body), requestOptions).getValue() .toObject(VectorStore.class); } diff --git a/sdk/openai/azure-ai-openai-assistants/src/main/java/com/azure/ai/openai/assistants/implementation/AssistantsClientImpl.java b/sdk/openai/azure-ai-openai-assistants/src/main/java/com/azure/ai/openai/assistants/implementation/AssistantsClientImpl.java index 391cee3ca44c..25699ffb668e 100644 --- a/sdk/openai/azure-ai-openai-assistants/src/main/java/com/azure/ai/openai/assistants/implementation/AssistantsClientImpl.java +++ b/sdk/openai/azure-ai-openai-assistants/src/main/java/com/azure/ai/openai/assistants/implementation/AssistantsClientImpl.java @@ -154,7 +154,7 @@ public interface AssistantsClientService { @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @UnexpectedResponseExceptionType(HttpResponseException.class) Mono> createAssistant(@HostParam("endpoint") String endpoint, - @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData assistantCreationOptions, + @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); @Post("/assistants") @@ -164,7 +164,7 @@ Mono> createAssistant(@HostParam("endpoint") String endpoin @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @UnexpectedResponseExceptionType(HttpResponseException.class) Response createAssistantSync(@HostParam("endpoint") String endpoint, - @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData assistantCreationOptions, + @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); @Get("/assistants") @@ -213,8 +213,7 @@ Response getAssistantSync(@HostParam("endpoint") String endpoint, @UnexpectedResponseExceptionType(HttpResponseException.class) Mono> updateAssistant(@HostParam("endpoint") String endpoint, @PathParam("assistantId") String assistantId, @HeaderParam("accept") String accept, - @BodyParam("application/json") BinaryData updateAssistantOptions, RequestOptions requestOptions, - Context context); + @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); @Post("/assistants/{assistantId}") @ExpectedResponses({ 200 }) @@ -224,8 +223,7 @@ Mono> updateAssistant(@HostParam("endpoint") String endpoin @UnexpectedResponseExceptionType(HttpResponseException.class) Response updateAssistantSync(@HostParam("endpoint") String endpoint, @PathParam("assistantId") String assistantId, @HeaderParam("accept") String accept, - @BodyParam("application/json") BinaryData updateAssistantOptions, RequestOptions requestOptions, - Context context); + @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); @Delete("/assistants/{assistantId}") @ExpectedResponses({ 200 }) @@ -254,9 +252,8 @@ Response deleteAssistantSync(@HostParam("endpoint") String endpoint, @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @UnexpectedResponseExceptionType(HttpResponseException.class) Mono> createThread(@HostParam("endpoint") String endpoint, - @HeaderParam("accept") String accept, - @BodyParam("application/json") BinaryData assistantThreadCreationOptions, RequestOptions requestOptions, - Context context); + @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData body, + RequestOptions requestOptions, Context context); @Post("/threads") @ExpectedResponses({ 200 }) @@ -265,9 +262,8 @@ Mono> createThread(@HostParam("endpoint") String endpoint, @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @UnexpectedResponseExceptionType(HttpResponseException.class) Response createThreadSync(@HostParam("endpoint") String endpoint, - @HeaderParam("accept") String accept, - @BodyParam("application/json") BinaryData assistantThreadCreationOptions, RequestOptions requestOptions, - Context context); + @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData body, + RequestOptions requestOptions, Context context); @Get("/threads/{threadId}") @ExpectedResponses({ 200 }) @@ -297,8 +293,7 @@ Response getThreadSync(@HostParam("endpoint") String endpoint, @UnexpectedResponseExceptionType(HttpResponseException.class) Mono> updateThread(@HostParam("endpoint") String endpoint, @PathParam("threadId") String threadId, @HeaderParam("accept") String accept, - @BodyParam("application/json") BinaryData updateAssistantThreadOptions, RequestOptions requestOptions, - Context context); + @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); @Post("/threads/{threadId}") @ExpectedResponses({ 200 }) @@ -308,8 +303,7 @@ Mono> updateThread(@HostParam("endpoint") String endpoint, @UnexpectedResponseExceptionType(HttpResponseException.class) Response updateThreadSync(@HostParam("endpoint") String endpoint, @PathParam("threadId") String threadId, @HeaderParam("accept") String accept, - @BodyParam("application/json") BinaryData updateAssistantThreadOptions, RequestOptions requestOptions, - Context context); + @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); @Delete("/threads/{threadId}") @ExpectedResponses({ 200 }) @@ -546,7 +540,7 @@ Response cancelRunSync(@HostParam("endpoint") String endpoint, @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @UnexpectedResponseExceptionType(HttpResponseException.class) Mono> createThreadAndRun(@HostParam("endpoint") String endpoint, - @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData createAndRunThreadOptions, + @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); @Post("/threads/runs") @@ -556,7 +550,7 @@ Mono> createThreadAndRun(@HostParam("endpoint") String endp @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @UnexpectedResponseExceptionType(HttpResponseException.class) Response createThreadAndRunSync(@HostParam("endpoint") String endpoint, - @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData createAndRunThreadOptions, + @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); @Get("/threads/{threadId}/runs/{runId}/steps/{stepId}") @@ -723,7 +717,7 @@ Response listVectorStoresSync(@HostParam("endpoint") String endpoint @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @UnexpectedResponseExceptionType(HttpResponseException.class) Mono> createVectorStore(@HostParam("endpoint") String endpoint, - @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData vectorStoreOptions, + @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); @Post("/vector_stores") @@ -733,7 +727,7 @@ Mono> createVectorStore(@HostParam("endpoint") String endpo @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @UnexpectedResponseExceptionType(HttpResponseException.class) Response createVectorStoreSync(@HostParam("endpoint") String endpoint, - @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData vectorStoreOptions, + @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); @Get("/vector_stores/{vectorStoreId}") @@ -1028,7 +1022,7 @@ Response listVectorStoreFileBatchFilesSync(@HostParam("endpoint") St * } * } * - * @param assistantCreationOptions The request details to use when creating a new assistant. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -1038,11 +1032,10 @@ Response listVectorStoreFileBatchFilesSync(@HostParam("endpoint") St * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createAssistantWithResponseAsync(BinaryData assistantCreationOptions, - RequestOptions requestOptions) { + public Mono> createAssistantWithResponseAsync(BinaryData body, RequestOptions requestOptions) { final String accept = "application/json"; - return FluxUtil.withContext(context -> service.createAssistant(this.getEndpoint(), accept, - assistantCreationOptions, requestOptions, context)); + return FluxUtil + .withContext(context -> service.createAssistant(this.getEndpoint(), accept, body, requestOptions, context)); } /** @@ -1114,7 +1107,7 @@ public Mono> createAssistantWithResponseAsync(BinaryData as * } * } * - * @param assistantCreationOptions The request details to use when creating a new assistant. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -1123,11 +1116,9 @@ public Mono> createAssistantWithResponseAsync(BinaryData as * @return represents an assistant that can call the model and use tools along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createAssistantWithResponse(BinaryData assistantCreationOptions, - RequestOptions requestOptions) { + public Response createAssistantWithResponse(BinaryData body, RequestOptions requestOptions) { final String accept = "application/json"; - return service.createAssistantSync(this.getEndpoint(), accept, assistantCreationOptions, requestOptions, - Context.NONE); + return service.createAssistantSync(this.getEndpoint(), accept, body, requestOptions, Context.NONE); } /** @@ -1468,7 +1459,7 @@ public Response getAssistantWithResponse(String assistantId, Request * } * * @param assistantId The ID of the assistant to modify. - * @param updateAssistantOptions The request details to use when modifying an existing assistant. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -1478,11 +1469,11 @@ public Response getAssistantWithResponse(String assistantId, Request * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateAssistantWithResponseAsync(String assistantId, - BinaryData updateAssistantOptions, RequestOptions requestOptions) { + public Mono> updateAssistantWithResponseAsync(String assistantId, BinaryData body, + RequestOptions requestOptions) { final String accept = "application/json"; - return FluxUtil.withContext(context -> service.updateAssistant(this.getEndpoint(), assistantId, accept, - updateAssistantOptions, requestOptions, context)); + return FluxUtil.withContext( + context -> service.updateAssistant(this.getEndpoint(), assistantId, accept, body, requestOptions, context)); } /** @@ -1559,7 +1550,7 @@ public Mono> updateAssistantWithResponseAsync(String assist * } * * @param assistantId The ID of the assistant to modify. - * @param updateAssistantOptions The request details to use when modifying an existing assistant. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -1568,11 +1559,10 @@ public Mono> updateAssistantWithResponseAsync(String assist * @return represents an assistant that can call the model and use tools along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateAssistantWithResponse(String assistantId, BinaryData updateAssistantOptions, + public Response updateAssistantWithResponse(String assistantId, BinaryData body, RequestOptions requestOptions) { final String accept = "application/json"; - return service.updateAssistantSync(this.getEndpoint(), assistantId, accept, updateAssistantOptions, - requestOptions, Context.NONE); + return service.updateAssistantSync(this.getEndpoint(), assistantId, accept, body, requestOptions, Context.NONE); } /** @@ -1692,7 +1682,7 @@ public Response deleteAssistantWithResponse(String assistantId, Requ * } * } * - * @param assistantThreadCreationOptions The details used to create a new assistant thread. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -1702,11 +1692,10 @@ public Response deleteAssistantWithResponse(String assistantId, Requ * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createThreadWithResponseAsync(BinaryData assistantThreadCreationOptions, - RequestOptions requestOptions) { + public Mono> createThreadWithResponseAsync(BinaryData body, RequestOptions requestOptions) { final String accept = "application/json"; - return FluxUtil.withContext(context -> service.createThread(this.getEndpoint(), accept, - assistantThreadCreationOptions, requestOptions, context)); + return FluxUtil + .withContext(context -> service.createThread(this.getEndpoint(), accept, body, requestOptions, context)); } /** @@ -1771,7 +1760,7 @@ public Mono> createThreadWithResponseAsync(BinaryData assis * } * } * - * @param assistantThreadCreationOptions The details used to create a new assistant thread. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -1780,11 +1769,9 @@ public Mono> createThreadWithResponseAsync(BinaryData assis * @return information about a single thread associated with an assistant along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createThreadWithResponse(BinaryData assistantThreadCreationOptions, - RequestOptions requestOptions) { + public Response createThreadWithResponse(BinaryData body, RequestOptions requestOptions) { final String accept = "application/json"; - return service.createThreadSync(this.getEndpoint(), accept, assistantThreadCreationOptions, requestOptions, - Context.NONE); + return service.createThreadSync(this.getEndpoint(), accept, body, requestOptions, Context.NONE); } /** @@ -1921,7 +1908,7 @@ public Response getThreadWithResponse(String threadId, RequestOption * } * * @param threadId The ID of the thread to modify. - * @param updateAssistantThreadOptions The details used to update an existing assistant thread. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -1931,11 +1918,11 @@ public Response getThreadWithResponse(String threadId, RequestOption * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateThreadWithResponseAsync(String threadId, - BinaryData updateAssistantThreadOptions, RequestOptions requestOptions) { + public Mono> updateThreadWithResponseAsync(String threadId, BinaryData body, + RequestOptions requestOptions) { final String accept = "application/json"; - return FluxUtil.withContext(context -> service.updateThread(this.getEndpoint(), threadId, accept, - updateAssistantThreadOptions, requestOptions, context)); + return FluxUtil.withContext( + context -> service.updateThread(this.getEndpoint(), threadId, accept, body, requestOptions, context)); } /** @@ -1988,7 +1975,7 @@ public Mono> updateThreadWithResponseAsync(String threadId, * } * * @param threadId The ID of the thread to modify. - * @param updateAssistantThreadOptions The details used to update an existing assistant thread. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -1997,11 +1984,10 @@ public Mono> updateThreadWithResponseAsync(String threadId, * @return information about a single thread associated with an assistant along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateThreadWithResponse(String threadId, BinaryData updateAssistantThreadOptions, + public Response updateThreadWithResponse(String threadId, BinaryData body, RequestOptions requestOptions) { final String accept = "application/json"; - return service.updateThreadSync(this.getEndpoint(), threadId, accept, updateAssistantThreadOptions, - requestOptions, Context.NONE); + return service.updateThreadSync(this.getEndpoint(), threadId, accept, body, requestOptions, Context.NONE); } /** @@ -3803,7 +3789,7 @@ public Response cancelRunWithResponse(String threadId, String runId, * } * } * - * @param createAndRunThreadOptions The details used when creating and immediately running a new assistant thread. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -3813,11 +3799,11 @@ public Response cancelRunWithResponse(String threadId, String runId, * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createThreadAndRunWithResponseAsync(BinaryData createAndRunThreadOptions, + public Mono> createThreadAndRunWithResponseAsync(BinaryData body, RequestOptions requestOptions) { final String accept = "application/json"; - return FluxUtil.withContext(context -> service.createThreadAndRun(this.getEndpoint(), accept, - createAndRunThreadOptions, requestOptions, context)); + return FluxUtil.withContext( + context -> service.createThreadAndRun(this.getEndpoint(), accept, body, requestOptions, context)); } /** @@ -3944,7 +3930,7 @@ public Mono> createThreadAndRunWithResponseAsync(BinaryData * } * } * - * @param createAndRunThreadOptions The details used when creating and immediately running a new assistant thread. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -3953,11 +3939,9 @@ public Mono> createThreadAndRunWithResponseAsync(BinaryData * @return data representing a single evaluation run of an assistant thread along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createThreadAndRunWithResponse(BinaryData createAndRunThreadOptions, - RequestOptions requestOptions) { + public Response createThreadAndRunWithResponse(BinaryData body, RequestOptions requestOptions) { final String accept = "application/json"; - return service.createThreadAndRunSync(this.getEndpoint(), accept, createAndRunThreadOptions, requestOptions, - Context.NONE); + return service.createThreadAndRunSync(this.getEndpoint(), accept, body, requestOptions, Context.NONE); } /** @@ -4729,7 +4713,7 @@ public Response listVectorStoresWithResponse(RequestOptions requestO * } * } * - * @param vectorStoreOptions Request object for creating a vector store. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -4739,11 +4723,11 @@ public Response listVectorStoresWithResponse(RequestOptions requestO * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createVectorStoreWithResponseAsync(BinaryData vectorStoreOptions, + public Mono> createVectorStoreWithResponseAsync(BinaryData body, RequestOptions requestOptions) { final String accept = "application/json"; - return FluxUtil.withContext(context -> service.createVectorStore(this.getEndpoint(), accept, vectorStoreOptions, - requestOptions, context)); + return FluxUtil.withContext( + context -> service.createVectorStore(this.getEndpoint(), accept, body, requestOptions, context)); } /** @@ -4795,7 +4779,7 @@ public Mono> createVectorStoreWithResponseAsync(BinaryData * } * } * - * @param vectorStoreOptions Request object for creating a vector store. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -4805,11 +4789,9 @@ public Mono> createVectorStoreWithResponseAsync(BinaryData * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createVectorStoreWithResponse(BinaryData vectorStoreOptions, - RequestOptions requestOptions) { + public Response createVectorStoreWithResponse(BinaryData body, RequestOptions requestOptions) { final String accept = "application/json"; - return service.createVectorStoreSync(this.getEndpoint(), accept, vectorStoreOptions, requestOptions, - Context.NONE); + return service.createVectorStoreSync(this.getEndpoint(), accept, body, requestOptions, Context.NONE); } /** diff --git a/sdk/openai/azure-ai-openai-assistants/tsp-location.yaml b/sdk/openai/azure-ai-openai-assistants/tsp-location.yaml index d85a8fd485e1..e0afd450f75d 100644 --- a/sdk/openai/azure-ai-openai-assistants/tsp-location.yaml +++ b/sdk/openai/azure-ai-openai-assistants/tsp-location.yaml @@ -1,3 +1,3 @@ directory: specification/ai/OpenAI.Assistants -commit: 336fc73b8f6cd34b59b62046e1a4c0c8905926bd +commit: 3cb1b51638616435470fc10ea00de92512186ece repo: Azure/azure-rest-api-specs diff --git a/sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/OpenAIAsyncClient.java b/sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/OpenAIAsyncClient.java index 46014baa8930..2c2c339d7a55 100644 --- a/sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/OpenAIAsyncClient.java +++ b/sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/OpenAIAsyncClient.java @@ -618,9 +618,7 @@ public Flux> getChatCompletionsStreamWithResponse(Stri * * @param deploymentOrModelName Specifies either the model deployment name (when using Azure OpenAI) or model name * (when using non-Azure OpenAI) to use for this request. - * @param embeddingsOptions The configuration information for an embeddings request. - * Embeddings measure the relatedness of text strings and are commonly used for search, clustering, - * recommendations, and other similar scenarios. + * @param body Body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -633,11 +631,11 @@ public Flux> getChatCompletionsStreamWithResponse(Stri */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getEmbeddings(String deploymentOrModelName, EmbeddingsOptions embeddingsOptions) { + public Mono getEmbeddings(String deploymentOrModelName, EmbeddingsOptions body) { // Generated convenience method for getEmbeddingsWithResponse RequestOptions requestOptions = new RequestOptions(); - return getEmbeddingsWithResponse(deploymentOrModelName, BinaryData.fromObject(embeddingsOptions), - requestOptions).flatMap(FluxUtil::toMono) + return getEmbeddingsWithResponse(deploymentOrModelName, BinaryData.fromObject(body), requestOptions) + .flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(Embeddings.class)); } @@ -648,9 +646,7 @@ public Mono getEmbeddings(String deploymentOrModelName, EmbeddingsOp * * @param deploymentOrModelName Specifies either the model deployment name (when using Azure OpenAI) or model name * (when using non-Azure OpenAI) to use for this request. - * @param completionsOptions The configuration information for a completions request. - * Completions support a wide variety of tasks and generate text that continues from or "completes" - * provided prompt data. + * @param body Body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -663,11 +659,11 @@ public Mono getEmbeddings(String deploymentOrModelName, EmbeddingsOp */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getCompletions(String deploymentOrModelName, CompletionsOptions completionsOptions) { + public Mono getCompletions(String deploymentOrModelName, CompletionsOptions body) { // Generated convenience method for getCompletionsWithResponse RequestOptions requestOptions = new RequestOptions(); - return getCompletionsWithResponse(deploymentOrModelName, BinaryData.fromObject(completionsOptions), - requestOptions).flatMap(FluxUtil::toMono) + return getCompletionsWithResponse(deploymentOrModelName, BinaryData.fromObject(body), requestOptions) + .flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(Completions.class)); } @@ -837,7 +833,7 @@ public Flux getChatCompletionsStream(String deploymentOrModelNa * * @param deploymentOrModelName Specifies either the model deployment name (when using Azure OpenAI) or model name * (when using non-Azure OpenAI) to use for this request. - * @param audioTranscriptionOptions The configuration information for an audio transcription request. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -849,11 +845,11 @@ public Flux getChatCompletionsStream(String deploymentOrModelNa @Generated @ServiceMethod(returns = ReturnType.SINGLE) Mono> getAudioTranscriptionAsResponseObjectWithResponse(String deploymentOrModelName, - BinaryData audioTranscriptionOptions, RequestOptions requestOptions) { + BinaryData body, RequestOptions requestOptions) { // Protocol API requires serialization of parts with content-disposition and data, as operation // 'getAudioTranscriptionAsResponseObject' is 'multipart/form-data' - return this.serviceClient.getAudioTranscriptionAsResponseObjectWithResponseAsync(deploymentOrModelName, - audioTranscriptionOptions, requestOptions); + return this.serviceClient.getAudioTranscriptionAsResponseObjectWithResponseAsync(deploymentOrModelName, body, + requestOptions); } /** @@ -1150,7 +1146,7 @@ public Mono> getAudioTranslationTextWithResponse(String deploym * * @param deploymentOrModelName Specifies either the model deployment name (when using Azure OpenAI) or model name * (when using non-Azure OpenAI) to use for this request. - * @param audioTranscriptionOptions The configuration information for an audio transcription request. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -1162,11 +1158,11 @@ public Mono> getAudioTranslationTextWithResponse(String deploym @Generated @ServiceMethod(returns = ReturnType.SINGLE) Mono> getAudioTranscriptionAsPlainTextWithResponse(String deploymentOrModelName, - BinaryData audioTranscriptionOptions, RequestOptions requestOptions) { + BinaryData body, RequestOptions requestOptions) { // Protocol API requires serialization of parts with content-disposition and data, as operation // 'getAudioTranscriptionAsPlainText' is 'multipart/form-data' - return this.serviceClient.getAudioTranscriptionAsPlainTextWithResponseAsync(deploymentOrModelName, - audioTranscriptionOptions, requestOptions); + return this.serviceClient.getAudioTranscriptionAsPlainTextWithResponseAsync(deploymentOrModelName, body, + requestOptions); } /** @@ -1200,7 +1196,7 @@ Mono> getAudioTranscriptionAsPlainTextWithResponse(String d * * @param deploymentOrModelName Specifies either the model deployment name (when using Azure OpenAI) or model name * (when using non-Azure OpenAI) to use for this request. - * @param audioTranslationOptions The configuration information for an audio translation request. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -1212,11 +1208,11 @@ Mono> getAudioTranscriptionAsPlainTextWithResponse(String d @Generated @ServiceMethod(returns = ReturnType.SINGLE) Mono> getAudioTranslationAsResponseObjectWithResponse(String deploymentOrModelName, - BinaryData audioTranslationOptions, RequestOptions requestOptions) { + BinaryData body, RequestOptions requestOptions) { // Protocol API requires serialization of parts with content-disposition and data, as operation // 'getAudioTranslationAsResponseObject' is 'multipart/form-data' - return this.serviceClient.getAudioTranslationAsResponseObjectWithResponseAsync(deploymentOrModelName, - audioTranslationOptions, requestOptions); + return this.serviceClient.getAudioTranslationAsResponseObjectWithResponseAsync(deploymentOrModelName, body, + requestOptions); } /** @@ -1229,7 +1225,7 @@ Mono> getAudioTranslationAsResponseObjectWithResponse(Strin * * @param deploymentOrModelName Specifies either the model deployment name (when using Azure OpenAI) or model name * (when using non-Azure OpenAI) to use for this request. - * @param audioTranslationOptions The configuration information for an audio translation request. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -1240,12 +1236,12 @@ Mono> getAudioTranslationAsResponseObjectWithResponse(Strin */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getAudioTranslationAsPlainTextWithResponse(String deploymentOrModelName, - BinaryData audioTranslationOptions, RequestOptions requestOptions) { + Mono> getAudioTranslationAsPlainTextWithResponse(String deploymentOrModelName, BinaryData body, + RequestOptions requestOptions) { // Protocol API requires serialization of parts with content-disposition and data, as operation // 'getAudioTranslationAsPlainText' is 'multipart/form-data' - return this.serviceClient.getAudioTranslationAsPlainTextWithResponseAsync(deploymentOrModelName, - audioTranslationOptions, requestOptions); + return this.serviceClient.getAudioTranslationAsPlainTextWithResponseAsync(deploymentOrModelName, body, + requestOptions); } /** @@ -1381,7 +1377,7 @@ Mono> getImageGenerationsWithResponse(String deployme * * @param deploymentOrModelName Specifies either the model deployment name (when using Azure OpenAI) or model name * (when using non-Azure OpenAI) to use for this request. - * @param imageGenerationOptions Represents the request data used to generate images. + * @param body Body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -1392,12 +1388,11 @@ Mono> getImageGenerationsWithResponse(String deployme */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getImageGenerations(String deploymentOrModelName, - ImageGenerationOptions imageGenerationOptions) { + public Mono getImageGenerations(String deploymentOrModelName, ImageGenerationOptions body) { // Generated convenience method for getImageGenerationsWithResponse RequestOptions requestOptions = new RequestOptions(); - return getImageGenerationsWithResponse(deploymentOrModelName, BinaryData.fromObject(imageGenerationOptions), - requestOptions).flatMap(FluxUtil::toMono) + return getImageGenerationsWithResponse(deploymentOrModelName, BinaryData.fromObject(body), requestOptions) + .flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(ImageGenerations.class)); } diff --git a/sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/OpenAIClient.java b/sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/OpenAIClient.java index fb602ac09b47..27e1890d2db8 100644 --- a/sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/OpenAIClient.java +++ b/sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/OpenAIClient.java @@ -547,9 +547,7 @@ public Response getChatCompletionsWithResponse(String deploymen * * @param deploymentOrModelName Specifies either the model deployment name (when using Azure OpenAI) or model name * (when using non-Azure OpenAI) to use for this request. - * @param embeddingsOptions The configuration information for an embeddings request. - * Embeddings measure the relatedness of text strings and are commonly used for search, clustering, - * recommendations, and other similar scenarios. + * @param body Body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -562,11 +560,11 @@ public Response getChatCompletionsWithResponse(String deploymen */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Embeddings getEmbeddings(String deploymentOrModelName, EmbeddingsOptions embeddingsOptions) { + public Embeddings getEmbeddings(String deploymentOrModelName, EmbeddingsOptions body) { // Generated convenience method for getEmbeddingsWithResponse RequestOptions requestOptions = new RequestOptions(); - return getEmbeddingsWithResponse(deploymentOrModelName, BinaryData.fromObject(embeddingsOptions), - requestOptions).getValue().toObject(Embeddings.class); + return getEmbeddingsWithResponse(deploymentOrModelName, BinaryData.fromObject(body), requestOptions).getValue() + .toObject(Embeddings.class); } /** @@ -576,9 +574,7 @@ public Embeddings getEmbeddings(String deploymentOrModelName, EmbeddingsOptions * * @param deploymentOrModelName Specifies either the model deployment name (when using Azure OpenAI) or model name * (when using non-Azure OpenAI) to use for this request. - * @param completionsOptions The configuration information for a completions request. - * Completions support a wide variety of tasks and generate text that continues from or "completes" - * provided prompt data. + * @param body Body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -591,11 +587,11 @@ public Embeddings getEmbeddings(String deploymentOrModelName, EmbeddingsOptions */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Completions getCompletions(String deploymentOrModelName, CompletionsOptions completionsOptions) { + public Completions getCompletions(String deploymentOrModelName, CompletionsOptions body) { // Generated convenience method for getCompletionsWithResponse RequestOptions requestOptions = new RequestOptions(); - return getCompletionsWithResponse(deploymentOrModelName, BinaryData.fromObject(completionsOptions), - requestOptions).getValue().toObject(Completions.class); + return getCompletionsWithResponse(deploymentOrModelName, BinaryData.fromObject(body), requestOptions).getValue() + .toObject(Completions.class); } /** @@ -1088,7 +1084,7 @@ public Response getAudioTranslationTextWithResponse(String deploymentOrM * * @param deploymentOrModelName Specifies either the model deployment name (when using Azure OpenAI) or model name * (when using non-Azure OpenAI) to use for this request. - * @param audioTranscriptionOptions The configuration information for an audio transcription request. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -1099,11 +1095,11 @@ public Response getAudioTranslationTextWithResponse(String deploymentOrM @Generated @ServiceMethod(returns = ReturnType.SINGLE) Response getAudioTranscriptionAsResponseObjectWithResponse(String deploymentOrModelName, - BinaryData audioTranscriptionOptions, RequestOptions requestOptions) { + BinaryData body, RequestOptions requestOptions) { // Protocol API requires serialization of parts with content-disposition and data, as operation // 'getAudioTranscriptionAsResponseObject' is 'multipart/form-data' - return this.serviceClient.getAudioTranscriptionAsResponseObjectWithResponse(deploymentOrModelName, - audioTranscriptionOptions, requestOptions); + return this.serviceClient.getAudioTranscriptionAsResponseObjectWithResponse(deploymentOrModelName, body, + requestOptions); } /** @@ -1117,7 +1113,7 @@ Response getAudioTranscriptionAsResponseObjectWithResponse(String de * * @param deploymentOrModelName Specifies either the model deployment name (when using Azure OpenAI) or model name * (when using non-Azure OpenAI) to use for this request. - * @param audioTranscriptionOptions The configuration information for an audio transcription request. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -1127,12 +1123,12 @@ Response getAudioTranscriptionAsResponseObjectWithResponse(String de */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Response getAudioTranscriptionAsPlainTextWithResponse(String deploymentOrModelName, - BinaryData audioTranscriptionOptions, RequestOptions requestOptions) { + Response getAudioTranscriptionAsPlainTextWithResponse(String deploymentOrModelName, BinaryData body, + RequestOptions requestOptions) { // Protocol API requires serialization of parts with content-disposition and data, as operation // 'getAudioTranscriptionAsPlainText' is 'multipart/form-data' - return this.serviceClient.getAudioTranscriptionAsPlainTextWithResponse(deploymentOrModelName, - audioTranscriptionOptions, requestOptions); + return this.serviceClient.getAudioTranscriptionAsPlainTextWithResponse(deploymentOrModelName, body, + requestOptions); } /** @@ -1166,7 +1162,7 @@ Response getAudioTranscriptionAsPlainTextWithResponse(String deploym * * @param deploymentOrModelName Specifies either the model deployment name (when using Azure OpenAI) or model name * (when using non-Azure OpenAI) to use for this request. - * @param audioTranslationOptions The configuration information for an audio translation request. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -1177,12 +1173,12 @@ Response getAudioTranscriptionAsPlainTextWithResponse(String deploym */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Response getAudioTranslationAsResponseObjectWithResponse(String deploymentOrModelName, - BinaryData audioTranslationOptions, RequestOptions requestOptions) { + Response getAudioTranslationAsResponseObjectWithResponse(String deploymentOrModelName, BinaryData body, + RequestOptions requestOptions) { // Protocol API requires serialization of parts with content-disposition and data, as operation // 'getAudioTranslationAsResponseObject' is 'multipart/form-data' - return this.serviceClient.getAudioTranslationAsResponseObjectWithResponse(deploymentOrModelName, - audioTranslationOptions, requestOptions); + return this.serviceClient.getAudioTranslationAsResponseObjectWithResponse(deploymentOrModelName, body, + requestOptions); } /** @@ -1195,7 +1191,7 @@ Response getAudioTranslationAsResponseObjectWithResponse(String depl * * @param deploymentOrModelName Specifies either the model deployment name (when using Azure OpenAI) or model name * (when using non-Azure OpenAI) to use for this request. - * @param audioTranslationOptions The configuration information for an audio translation request. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -1206,12 +1202,12 @@ Response getAudioTranslationAsResponseObjectWithResponse(String depl */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Response getAudioTranslationAsPlainTextWithResponse(String deploymentOrModelName, - BinaryData audioTranslationOptions, RequestOptions requestOptions) { + Response getAudioTranslationAsPlainTextWithResponse(String deploymentOrModelName, BinaryData body, + RequestOptions requestOptions) { // Protocol API requires serialization of parts with content-disposition and data, as operation // 'getAudioTranslationAsPlainText' is 'multipart/form-data' - return this.serviceClient.getAudioTranslationAsPlainTextWithResponse(deploymentOrModelName, - audioTranslationOptions, requestOptions); + return this.serviceClient.getAudioTranslationAsPlainTextWithResponse(deploymentOrModelName, body, + requestOptions); } /** @@ -1341,7 +1337,7 @@ Response getImageGenerationsWithResponse(String deploymentOrMo * * @param deploymentOrModelName Specifies either the model deployment name (when using Azure OpenAI) or model name * (when using non-Azure OpenAI) to use for this request. - * @param imageGenerationOptions Represents the request data used to generate images. + * @param body Body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -1352,12 +1348,12 @@ Response getImageGenerationsWithResponse(String deploymentOrMo */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public ImageGenerations getImageGenerations(String deploymentOrModelName, - ImageGenerationOptions imageGenerationOptions) { + public ImageGenerations getImageGenerations(String deploymentOrModelName, ImageGenerationOptions body) { // Generated convenience method for getImageGenerationsWithResponse RequestOptions requestOptions = new RequestOptions(); - return getImageGenerationsWithResponse(deploymentOrModelName, BinaryData.fromObject(imageGenerationOptions), - requestOptions).getValue().toObject(ImageGenerations.class); + return getImageGenerationsWithResponse(deploymentOrModelName, BinaryData.fromObject(body), requestOptions) + .getValue() + .toObject(ImageGenerations.class); } /** diff --git a/sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/implementation/OpenAIClientImpl.java b/sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/implementation/OpenAIClientImpl.java index c6de4304f762..75855a862465 100644 --- a/sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/implementation/OpenAIClientImpl.java +++ b/sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/implementation/OpenAIClientImpl.java @@ -160,8 +160,7 @@ public interface OpenAIClientService { Mono> getAudioTranscriptionAsPlainText(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("deploymentId") String deploymentOrModelName, @HeaderParam("Content-Type") String contentType, @HeaderParam("accept") String accept, - @BodyParam("multipart/form-data") BinaryData audioTranscriptionOptions, RequestOptions requestOptions, - Context context); + @BodyParam("multipart/form-data") BinaryData body, RequestOptions requestOptions, Context context); // @Multipart not supported by RestProxy @Post("/deployments/{deploymentId}/audio/transcriptions") @@ -173,8 +172,7 @@ Mono> getAudioTranscriptionAsPlainText(@HostParam("endpoint Response getAudioTranscriptionAsPlainTextSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("deploymentId") String deploymentOrModelName, @HeaderParam("Content-Type") String contentType, @HeaderParam("accept") String accept, - @BodyParam("multipart/form-data") BinaryData audioTranscriptionOptions, RequestOptions requestOptions, - Context context); + @BodyParam("multipart/form-data") BinaryData body, RequestOptions requestOptions, Context context); // @Multipart not supported by RestProxy @Post("/deployments/{deploymentId}/audio/transcriptions") @@ -186,8 +184,7 @@ Response getAudioTranscriptionAsPlainTextSync(@HostParam("endpoint") Mono> getAudioTranscriptionAsResponseObject(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("deploymentId") String deploymentOrModelName, @HeaderParam("Content-Type") String contentType, @HeaderParam("accept") String accept, - @BodyParam("multipart/form-data") BinaryData audioTranscriptionOptions, RequestOptions requestOptions, - Context context); + @BodyParam("multipart/form-data") BinaryData body, RequestOptions requestOptions, Context context); // @Multipart not supported by RestProxy @Post("/deployments/{deploymentId}/audio/transcriptions") @@ -199,8 +196,7 @@ Mono> getAudioTranscriptionAsResponseObject(@HostParam("end Response getAudioTranscriptionAsResponseObjectSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("deploymentId") String deploymentOrModelName, @HeaderParam("Content-Type") String contentType, @HeaderParam("accept") String accept, - @BodyParam("multipart/form-data") BinaryData audioTranscriptionOptions, RequestOptions requestOptions, - Context context); + @BodyParam("multipart/form-data") BinaryData body, RequestOptions requestOptions, Context context); // @Multipart not supported by RestProxy @Post("/deployments/{deploymentId}/audio/translations") @@ -212,8 +208,7 @@ Response getAudioTranscriptionAsResponseObjectSync(@HostParam("endpo Mono> getAudioTranslationAsPlainText(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("deploymentId") String deploymentOrModelName, @HeaderParam("Content-Type") String contentType, @HeaderParam("accept") String accept, - @BodyParam("multipart/form-data") BinaryData audioTranslationOptions, RequestOptions requestOptions, - Context context); + @BodyParam("multipart/form-data") BinaryData body, RequestOptions requestOptions, Context context); // @Multipart not supported by RestProxy @Post("/deployments/{deploymentId}/audio/translations") @@ -225,8 +220,7 @@ Mono> getAudioTranslationAsPlainText(@HostParam("endpoint") Response getAudioTranslationAsPlainTextSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("deploymentId") String deploymentOrModelName, @HeaderParam("Content-Type") String contentType, @HeaderParam("accept") String accept, - @BodyParam("multipart/form-data") BinaryData audioTranslationOptions, RequestOptions requestOptions, - Context context); + @BodyParam("multipart/form-data") BinaryData body, RequestOptions requestOptions, Context context); // @Multipart not supported by RestProxy @Post("/deployments/{deploymentId}/audio/translations") @@ -238,8 +232,7 @@ Response getAudioTranslationAsPlainTextSync(@HostParam("endpoint") S Mono> getAudioTranslationAsResponseObject(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("deploymentId") String deploymentOrModelName, @HeaderParam("Content-Type") String contentType, @HeaderParam("accept") String accept, - @BodyParam("multipart/form-data") BinaryData audioTranslationOptions, RequestOptions requestOptions, - Context context); + @BodyParam("multipart/form-data") BinaryData body, RequestOptions requestOptions, Context context); // @Multipart not supported by RestProxy @Post("/deployments/{deploymentId}/audio/translations") @@ -251,8 +244,7 @@ Mono> getAudioTranslationAsResponseObject(@HostParam("endpo Response getAudioTranslationAsResponseObjectSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("deploymentId") String deploymentOrModelName, @HeaderParam("Content-Type") String contentType, @HeaderParam("accept") String accept, - @BodyParam("multipart/form-data") BinaryData audioTranslationOptions, RequestOptions requestOptions, - Context context); + @BodyParam("multipart/form-data") BinaryData body, RequestOptions requestOptions, Context context); @Post("/deployments/{deploymentId}/completions") @ExpectedResponses({ 200 }) @@ -262,7 +254,7 @@ Response getAudioTranslationAsResponseObjectSync(@HostParam("endpoin @UnexpectedResponseExceptionType(HttpResponseException.class) Mono> getCompletions(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("deploymentId") String deploymentOrModelName, - @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData completionsOptions, + @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); @Post("/deployments/{deploymentId}/completions") @@ -273,7 +265,7 @@ Mono> getCompletions(@HostParam("endpoint") String endpoint @UnexpectedResponseExceptionType(HttpResponseException.class) Response getCompletionsSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("deploymentId") String deploymentOrModelName, - @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData completionsOptions, + @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); @Post("/deployments/{deploymentId}/chat/completions") @@ -306,7 +298,7 @@ Response getChatCompletionsSync(@HostParam("endpoint") String endpoi @UnexpectedResponseExceptionType(HttpResponseException.class) Mono> getImageGenerations(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("deploymentId") String deploymentOrModelName, - @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData imageGenerationOptions, + @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); @Post("/deployments/{deploymentId}/images/generations") @@ -317,7 +309,7 @@ Mono> getImageGenerations(@HostParam("endpoint") String end @UnexpectedResponseExceptionType(HttpResponseException.class) Response getImageGenerationsSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("deploymentId") String deploymentOrModelName, - @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData imageGenerationOptions, + @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); @Post("/deployments/{deploymentId}/audio/speech") @@ -350,7 +342,7 @@ Response generateSpeechFromTextSync(@HostParam("endpoint") String en @UnexpectedResponseExceptionType(HttpResponseException.class) Mono> getEmbeddings(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("deploymentId") String deploymentOrModelName, - @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData embeddingsOptions, + @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); @Post("/deployments/{deploymentId}/embeddings") @@ -361,7 +353,7 @@ Mono> getEmbeddings(@HostParam("endpoint") String endpoint, @UnexpectedResponseExceptionType(HttpResponseException.class) Response getEmbeddingsSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("deploymentId") String deploymentOrModelName, - @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData embeddingsOptions, + @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); } @@ -376,7 +368,7 @@ Response getEmbeddingsSync(@HostParam("endpoint") String endpoint, * * @param deploymentOrModelName Specifies either the model deployment name (when using Azure OpenAI) or model name * (when using non-Azure OpenAI) to use for this request. - * @param audioTranscriptionOptions The configuration information for an audio transcription request. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -387,12 +379,12 @@ Response getEmbeddingsSync(@HostParam("endpoint") String endpoint, */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getAudioTranscriptionAsPlainTextWithResponseAsync(String deploymentOrModelName, - BinaryData audioTranscriptionOptions, RequestOptions requestOptions) { + BinaryData body, RequestOptions requestOptions) { final String contentType = "multipart/form-data"; final String accept = "text/plain, application/json"; return FluxUtil.withContext(context -> service.getAudioTranscriptionAsPlainText(this.getEndpoint(), - this.getServiceVersion().getVersion(), deploymentOrModelName, contentType, accept, - audioTranscriptionOptions, requestOptions, context)); + this.getServiceVersion().getVersion(), deploymentOrModelName, contentType, accept, body, requestOptions, + context)); } /** @@ -406,7 +398,7 @@ public Mono> getAudioTranscriptionAsPlainTextWithResponseAs * * @param deploymentOrModelName Specifies either the model deployment name (when using Azure OpenAI) or model name * (when using non-Azure OpenAI) to use for this request. - * @param audioTranscriptionOptions The configuration information for an audio transcription request. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -416,11 +408,11 @@ public Mono> getAudioTranscriptionAsPlainTextWithResponseAs */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getAudioTranscriptionAsPlainTextWithResponse(String deploymentOrModelName, - BinaryData audioTranscriptionOptions, RequestOptions requestOptions) { + BinaryData body, RequestOptions requestOptions) { final String contentType = "multipart/form-data"; final String accept = "text/plain, application/json"; return service.getAudioTranscriptionAsPlainTextSync(this.getEndpoint(), this.getServiceVersion().getVersion(), - deploymentOrModelName, contentType, accept, audioTranscriptionOptions, requestOptions, Context.NONE); + deploymentOrModelName, contentType, accept, body, requestOptions, Context.NONE); } /** @@ -462,7 +454,7 @@ public Response getAudioTranscriptionAsPlainTextWithResponse(String * * @param deploymentOrModelName Specifies either the model deployment name (when using Azure OpenAI) or model name * (when using non-Azure OpenAI) to use for this request. - * @param audioTranscriptionOptions The configuration information for an audio transcription request. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -473,12 +465,12 @@ public Response getAudioTranscriptionAsPlainTextWithResponse(String */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getAudioTranscriptionAsResponseObjectWithResponseAsync( - String deploymentOrModelName, BinaryData audioTranscriptionOptions, RequestOptions requestOptions) { + String deploymentOrModelName, BinaryData body, RequestOptions requestOptions) { final String contentType = "multipart/form-data"; final String accept = "application/json"; return FluxUtil.withContext(context -> service.getAudioTranscriptionAsResponseObject(this.getEndpoint(), - this.getServiceVersion().getVersion(), deploymentOrModelName, contentType, accept, - audioTranscriptionOptions, requestOptions, context)); + this.getServiceVersion().getVersion(), deploymentOrModelName, contentType, accept, body, requestOptions, + context)); } /** @@ -520,7 +512,7 @@ public Mono> getAudioTranscriptionAsResponseObjectWithRespo * * @param deploymentOrModelName Specifies either the model deployment name (when using Azure OpenAI) or model name * (when using non-Azure OpenAI) to use for this request. - * @param audioTranscriptionOptions The configuration information for an audio transcription request. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -530,12 +522,12 @@ public Mono> getAudioTranscriptionAsResponseObjectWithRespo */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getAudioTranscriptionAsResponseObjectWithResponse(String deploymentOrModelName, - BinaryData audioTranscriptionOptions, RequestOptions requestOptions) { + BinaryData body, RequestOptions requestOptions) { final String contentType = "multipart/form-data"; final String accept = "application/json"; return service.getAudioTranscriptionAsResponseObjectSync(this.getEndpoint(), - this.getServiceVersion().getVersion(), deploymentOrModelName, contentType, accept, - audioTranscriptionOptions, requestOptions, Context.NONE); + this.getServiceVersion().getVersion(), deploymentOrModelName, contentType, accept, body, requestOptions, + Context.NONE); } /** @@ -548,7 +540,7 @@ public Response getAudioTranscriptionAsResponseObjectWithResponse(St * * @param deploymentOrModelName Specifies either the model deployment name (when using Azure OpenAI) or model name * (when using non-Azure OpenAI) to use for this request. - * @param audioTranslationOptions The configuration information for an audio translation request. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -559,12 +551,12 @@ public Response getAudioTranscriptionAsResponseObjectWithResponse(St */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getAudioTranslationAsPlainTextWithResponseAsync(String deploymentOrModelName, - BinaryData audioTranslationOptions, RequestOptions requestOptions) { + BinaryData body, RequestOptions requestOptions) { final String contentType = "multipart/form-data"; final String accept = "text/plain, application/json"; return FluxUtil.withContext( context -> service.getAudioTranslationAsPlainText(this.getEndpoint(), this.getServiceVersion().getVersion(), - deploymentOrModelName, contentType, accept, audioTranslationOptions, requestOptions, context)); + deploymentOrModelName, contentType, accept, body, requestOptions, context)); } /** @@ -577,7 +569,7 @@ public Mono> getAudioTranslationAsPlainTextWithResponseAsyn * * @param deploymentOrModelName Specifies either the model deployment name (when using Azure OpenAI) or model name * (when using non-Azure OpenAI) to use for this request. - * @param audioTranslationOptions The configuration information for an audio translation request. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -588,11 +580,11 @@ public Mono> getAudioTranslationAsPlainTextWithResponseAsyn */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getAudioTranslationAsPlainTextWithResponse(String deploymentOrModelName, - BinaryData audioTranslationOptions, RequestOptions requestOptions) { + BinaryData body, RequestOptions requestOptions) { final String contentType = "multipart/form-data"; final String accept = "text/plain, application/json"; return service.getAudioTranslationAsPlainTextSync(this.getEndpoint(), this.getServiceVersion().getVersion(), - deploymentOrModelName, contentType, accept, audioTranslationOptions, requestOptions, Context.NONE); + deploymentOrModelName, contentType, accept, body, requestOptions, Context.NONE); } /** @@ -626,7 +618,7 @@ public Response getAudioTranslationAsPlainTextWithResponse(String de * * @param deploymentOrModelName Specifies either the model deployment name (when using Azure OpenAI) or model name * (when using non-Azure OpenAI) to use for this request. - * @param audioTranslationOptions The configuration information for an audio translation request. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -637,12 +629,12 @@ public Response getAudioTranslationAsPlainTextWithResponse(String de */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getAudioTranslationAsResponseObjectWithResponseAsync(String deploymentOrModelName, - BinaryData audioTranslationOptions, RequestOptions requestOptions) { + BinaryData body, RequestOptions requestOptions) { final String contentType = "multipart/form-data"; final String accept = "application/json"; return FluxUtil.withContext(context -> service.getAudioTranslationAsResponseObject(this.getEndpoint(), - this.getServiceVersion().getVersion(), deploymentOrModelName, contentType, accept, audioTranslationOptions, - requestOptions, context)); + this.getServiceVersion().getVersion(), deploymentOrModelName, contentType, accept, body, requestOptions, + context)); } /** @@ -676,7 +668,7 @@ public Mono> getAudioTranslationAsResponseObjectWithRespons * * @param deploymentOrModelName Specifies either the model deployment name (when using Azure OpenAI) or model name * (when using non-Azure OpenAI) to use for this request. - * @param audioTranslationOptions The configuration information for an audio translation request. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -687,12 +679,12 @@ public Mono> getAudioTranslationAsResponseObjectWithRespons */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getAudioTranslationAsResponseObjectWithResponse(String deploymentOrModelName, - BinaryData audioTranslationOptions, RequestOptions requestOptions) { + BinaryData body, RequestOptions requestOptions) { final String contentType = "multipart/form-data"; final String accept = "application/json"; return service.getAudioTranslationAsResponseObjectSync(this.getEndpoint(), - this.getServiceVersion().getVersion(), deploymentOrModelName, contentType, accept, audioTranslationOptions, - requestOptions, Context.NONE); + this.getServiceVersion().getVersion(), deploymentOrModelName, contentType, accept, body, requestOptions, + Context.NONE); } /** @@ -824,9 +816,7 @@ public Response getAudioTranslationAsResponseObjectWithResponse(Stri * * @param deploymentOrModelName Specifies either the model deployment name (when using Azure OpenAI) or model name * (when using non-Azure OpenAI) to use for this request. - * @param completionsOptions The configuration information for a completions request. - * Completions support a wide variety of tasks and generate text that continues from or "completes" - * provided prompt data. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -837,12 +827,11 @@ public Response getAudioTranslationAsResponseObjectWithResponse(Stri * provided prompt data along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getCompletionsWithResponseAsync(String deploymentOrModelName, - BinaryData completionsOptions, RequestOptions requestOptions) { + public Mono> getCompletionsWithResponseAsync(String deploymentOrModelName, BinaryData body, + RequestOptions requestOptions) { final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getCompletions(this.getEndpoint(), this.getServiceVersion().getVersion(), - deploymentOrModelName, accept, completionsOptions, requestOptions, context)); + return FluxUtil.withContext(context -> service.getCompletions(this.getEndpoint(), + this.getServiceVersion().getVersion(), deploymentOrModelName, accept, body, requestOptions, context)); } /** @@ -974,9 +963,7 @@ public Mono> getCompletionsWithResponseAsync(String deploym * * @param deploymentOrModelName Specifies either the model deployment name (when using Azure OpenAI) or model name * (when using non-Azure OpenAI) to use for this request. - * @param completionsOptions The configuration information for a completions request. - * Completions support a wide variety of tasks and generate text that continues from or "completes" - * provided prompt data. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -987,11 +974,11 @@ public Mono> getCompletionsWithResponseAsync(String deploym * provided prompt data along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getCompletionsWithResponse(String deploymentOrModelName, BinaryData completionsOptions, + public Response getCompletionsWithResponse(String deploymentOrModelName, BinaryData body, RequestOptions requestOptions) { final String accept = "application/json"; return service.getCompletionsSync(this.getEndpoint(), this.getServiceVersion().getVersion(), - deploymentOrModelName, accept, completionsOptions, requestOptions, Context.NONE); + deploymentOrModelName, accept, body, requestOptions, Context.NONE); } /** @@ -1564,7 +1551,7 @@ public Response getChatCompletionsWithResponse(String deploymentOrMo * * @param deploymentOrModelName Specifies either the model deployment name (when using Azure OpenAI) or model name * (when using non-Azure OpenAI) to use for this request. - * @param imageGenerationOptions Represents the request data used to generate images. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -1575,11 +1562,10 @@ public Response getChatCompletionsWithResponse(String deploymentOrMo */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getImageGenerationsWithResponseAsync(String deploymentOrModelName, - BinaryData imageGenerationOptions, RequestOptions requestOptions) { + BinaryData body, RequestOptions requestOptions) { final String accept = "application/json"; - return FluxUtil.withContext( - context -> service.getImageGenerations(this.getEndpoint(), this.getServiceVersion().getVersion(), - deploymentOrModelName, accept, imageGenerationOptions, requestOptions, context)); + return FluxUtil.withContext(context -> service.getImageGenerations(this.getEndpoint(), + this.getServiceVersion().getVersion(), deploymentOrModelName, accept, body, requestOptions, context)); } /** @@ -1645,7 +1631,7 @@ public Mono> getImageGenerationsWithResponseAsync(String de * * @param deploymentOrModelName Specifies either the model deployment name (when using Azure OpenAI) or model name * (when using non-Azure OpenAI) to use for this request. - * @param imageGenerationOptions Represents the request data used to generate images. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -1654,11 +1640,11 @@ public Mono> getImageGenerationsWithResponseAsync(String de * @return the result of a successful image generation operation along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getImageGenerationsWithResponse(String deploymentOrModelName, - BinaryData imageGenerationOptions, RequestOptions requestOptions) { + public Response getImageGenerationsWithResponse(String deploymentOrModelName, BinaryData body, + RequestOptions requestOptions) { final String accept = "application/json"; return service.getImageGenerationsSync(this.getEndpoint(), this.getServiceVersion().getVersion(), - deploymentOrModelName, accept, imageGenerationOptions, requestOptions, Context.NONE); + deploymentOrModelName, accept, body, requestOptions, Context.NONE); } /** @@ -1778,9 +1764,7 @@ public Response generateSpeechFromTextWithResponse(String deployment * * @param deploymentOrModelName Specifies either the model deployment name (when using Azure OpenAI) or model name * (when using non-Azure OpenAI) to use for this request. - * @param embeddingsOptions The configuration information for an embeddings request. - * Embeddings measure the relatedness of text strings and are commonly used for search, clustering, - * recommendations, and other similar scenarios. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -1792,12 +1776,11 @@ public Response generateSpeechFromTextWithResponse(String deployment * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getEmbeddingsWithResponseAsync(String deploymentOrModelName, - BinaryData embeddingsOptions, RequestOptions requestOptions) { + public Mono> getEmbeddingsWithResponseAsync(String deploymentOrModelName, BinaryData body, + RequestOptions requestOptions) { final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getEmbeddings(this.getEndpoint(), this.getServiceVersion().getVersion(), - deploymentOrModelName, accept, embeddingsOptions, requestOptions, context)); + return FluxUtil.withContext(context -> service.getEmbeddings(this.getEndpoint(), + this.getServiceVersion().getVersion(), deploymentOrModelName, accept, body, requestOptions, context)); } /** @@ -1838,9 +1821,7 @@ public Mono> getEmbeddingsWithResponseAsync(String deployme * * @param deploymentOrModelName Specifies either the model deployment name (when using Azure OpenAI) or model name * (when using non-Azure OpenAI) to use for this request. - * @param embeddingsOptions The configuration information for an embeddings request. - * Embeddings measure the relatedness of text strings and are commonly used for search, clustering, - * recommendations, and other similar scenarios. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -1851,10 +1832,10 @@ public Mono> getEmbeddingsWithResponseAsync(String deployme * recommendations, and other similar scenarios along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getEmbeddingsWithResponse(String deploymentOrModelName, BinaryData embeddingsOptions, + public Response getEmbeddingsWithResponse(String deploymentOrModelName, BinaryData body, RequestOptions requestOptions) { final String accept = "application/json"; return service.getEmbeddingsSync(this.getEndpoint(), this.getServiceVersion().getVersion(), - deploymentOrModelName, accept, embeddingsOptions, requestOptions, Context.NONE); + deploymentOrModelName, accept, body, requestOptions, Context.NONE); } } diff --git a/sdk/openai/azure-ai-openai/tsp-location.yaml b/sdk/openai/azure-ai-openai/tsp-location.yaml index 4adae568ae5f..57161829d4e0 100644 --- a/sdk/openai/azure-ai-openai/tsp-location.yaml +++ b/sdk/openai/azure-ai-openai/tsp-location.yaml @@ -1,5 +1,5 @@ directory: specification/cognitiveservices/OpenAI.Inference additionalDirectories: - - specification/cognitiveservices/OpenAI.Authoring -commit: f98d676317c7ff430241ce16ba8d99142be3581d + - specification/cognitiveservices/OpenAI.Authoring +commit: 3cb1b51638616435470fc10ea00de92512186ece repo: Azure/azure-rest-api-specs diff --git a/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/DiscoveryAsyncClient.java b/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/DiscoveryAsyncClient.java index 599984be2e70..f794df84faee 100644 --- a/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/DiscoveryAsyncClient.java +++ b/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/DiscoveryAsyncClient.java @@ -184,7 +184,7 @@ public final class DiscoveryAsyncClient { * } * * - * @param queryOptions The search query of advanced search request. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -194,8 +194,8 @@ public final class DiscoveryAsyncClient { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> queryWithResponse(BinaryData queryOptions, RequestOptions requestOptions) { - return this.serviceClient.queryWithResponseAsync(queryOptions, requestOptions); + public Mono> queryWithResponse(BinaryData body, RequestOptions requestOptions) { + return this.serviceClient.queryWithResponseAsync(body, requestOptions); } /** @@ -265,7 +265,7 @@ public Mono> queryWithResponse(BinaryData queryOptions, Req * } * * - * @param suggestOptions The payload of suggest request. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -276,8 +276,8 @@ public Mono> queryWithResponse(BinaryData queryOptions, Req */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> suggestWithResponse(BinaryData suggestOptions, RequestOptions requestOptions) { - return this.serviceClient.suggestWithResponseAsync(suggestOptions, requestOptions); + public Mono> suggestWithResponse(BinaryData body, RequestOptions requestOptions) { + return this.serviceClient.suggestWithResponseAsync(body, requestOptions); } /** @@ -305,7 +305,7 @@ public Mono> suggestWithResponse(BinaryData suggestOptions, * } * } * - * @param autoCompleteOptions The payload of autocomplete request. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -315,15 +315,14 @@ public Mono> suggestWithResponse(BinaryData suggestOptions, */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> autoCompleteWithResponse(BinaryData autoCompleteOptions, - RequestOptions requestOptions) { - return this.serviceClient.autoCompleteWithResponseAsync(autoCompleteOptions, requestOptions); + public Mono> autoCompleteWithResponse(BinaryData body, RequestOptions requestOptions) { + return this.serviceClient.autoCompleteWithResponseAsync(body, requestOptions); } /** * Get data using search. * - * @param queryOptions The search query of advanced search request. + * @param body Body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -334,17 +333,17 @@ public Mono> autoCompleteWithResponse(BinaryData autoComple */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono query(QueryOptions queryOptions) { + public Mono query(QueryOptions body) { // Generated convenience method for queryWithResponse RequestOptions requestOptions = new RequestOptions(); - return queryWithResponse(BinaryData.fromObject(queryOptions), requestOptions).flatMap(FluxUtil::toMono) + return queryWithResponse(BinaryData.fromObject(body), requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(QueryResult.class)); } /** * Get search suggestions by query criteria. * - * @param suggestOptions The payload of suggest request. + * @param body Body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -355,17 +354,17 @@ public Mono query(QueryOptions queryOptions) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono suggest(SuggestOptions suggestOptions) { + public Mono suggest(SuggestOptions body) { // Generated convenience method for suggestWithResponse RequestOptions requestOptions = new RequestOptions(); - return suggestWithResponse(BinaryData.fromObject(suggestOptions), requestOptions).flatMap(FluxUtil::toMono) + return suggestWithResponse(BinaryData.fromObject(body), requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(SuggestResult.class)); } /** * Get auto complete options. * - * @param autoCompleteOptions The payload of autocomplete request. + * @param body Body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -376,11 +375,10 @@ public Mono suggest(SuggestOptions suggestOptions) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono autoComplete(AutoCompleteOptions autoCompleteOptions) { + public Mono autoComplete(AutoCompleteOptions body) { // Generated convenience method for autoCompleteWithResponse RequestOptions requestOptions = new RequestOptions(); - return autoCompleteWithResponse(BinaryData.fromObject(autoCompleteOptions), requestOptions) - .flatMap(FluxUtil::toMono) + return autoCompleteWithResponse(BinaryData.fromObject(body), requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(AutoCompleteResult.class)); } } diff --git a/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/DiscoveryClient.java b/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/DiscoveryClient.java index 5d32b2c5ea83..b9cabf9c5fe6 100644 --- a/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/DiscoveryClient.java +++ b/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/DiscoveryClient.java @@ -182,7 +182,7 @@ public final class DiscoveryClient { * } * * - * @param queryOptions The search query of advanced search request. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -192,8 +192,8 @@ public final class DiscoveryClient { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response queryWithResponse(BinaryData queryOptions, RequestOptions requestOptions) { - return this.serviceClient.queryWithResponse(queryOptions, requestOptions); + public Response queryWithResponse(BinaryData body, RequestOptions requestOptions) { + return this.serviceClient.queryWithResponse(body, requestOptions); } /** @@ -263,7 +263,7 @@ public Response queryWithResponse(BinaryData queryOptions, RequestOp * } * * - * @param suggestOptions The payload of suggest request. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -273,8 +273,8 @@ public Response queryWithResponse(BinaryData queryOptions, RequestOp */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response suggestWithResponse(BinaryData suggestOptions, RequestOptions requestOptions) { - return this.serviceClient.suggestWithResponse(suggestOptions, requestOptions); + public Response suggestWithResponse(BinaryData body, RequestOptions requestOptions) { + return this.serviceClient.suggestWithResponse(body, requestOptions); } /** @@ -302,7 +302,7 @@ public Response suggestWithResponse(BinaryData suggestOptions, Reque * } * } * - * @param autoCompleteOptions The payload of autocomplete request. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -312,15 +312,14 @@ public Response suggestWithResponse(BinaryData suggestOptions, Reque */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response autoCompleteWithResponse(BinaryData autoCompleteOptions, - RequestOptions requestOptions) { - return this.serviceClient.autoCompleteWithResponse(autoCompleteOptions, requestOptions); + public Response autoCompleteWithResponse(BinaryData body, RequestOptions requestOptions) { + return this.serviceClient.autoCompleteWithResponse(body, requestOptions); } /** * Get data using search. * - * @param queryOptions The search query of advanced search request. + * @param body Body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -331,17 +330,16 @@ public Response autoCompleteWithResponse(BinaryData autoCompleteOpti */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public QueryResult query(QueryOptions queryOptions) { + public QueryResult query(QueryOptions body) { // Generated convenience method for queryWithResponse RequestOptions requestOptions = new RequestOptions(); - return queryWithResponse(BinaryData.fromObject(queryOptions), requestOptions).getValue() - .toObject(QueryResult.class); + return queryWithResponse(BinaryData.fromObject(body), requestOptions).getValue().toObject(QueryResult.class); } /** * Get search suggestions by query criteria. * - * @param suggestOptions The payload of suggest request. + * @param body Body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -352,17 +350,17 @@ public QueryResult query(QueryOptions queryOptions) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public SuggestResult suggest(SuggestOptions suggestOptions) { + public SuggestResult suggest(SuggestOptions body) { // Generated convenience method for suggestWithResponse RequestOptions requestOptions = new RequestOptions(); - return suggestWithResponse(BinaryData.fromObject(suggestOptions), requestOptions).getValue() + return suggestWithResponse(BinaryData.fromObject(body), requestOptions).getValue() .toObject(SuggestResult.class); } /** * Get auto complete options. * - * @param autoCompleteOptions The payload of autocomplete request. + * @param body Body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -373,10 +371,10 @@ public SuggestResult suggest(SuggestOptions suggestOptions) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public AutoCompleteResult autoComplete(AutoCompleteOptions autoCompleteOptions) { + public AutoCompleteResult autoComplete(AutoCompleteOptions body) { // Generated convenience method for autoCompleteWithResponse RequestOptions requestOptions = new RequestOptions(); - return autoCompleteWithResponse(BinaryData.fromObject(autoCompleteOptions), requestOptions).getValue() + return autoCompleteWithResponse(BinaryData.fromObject(body), requestOptions).getValue() .toObject(AutoCompleteResult.class); } } diff --git a/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/EntityAsyncClient.java b/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/EntityAsyncClient.java index 546b4d88cbc2..38e864c33e52 100644 --- a/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/EntityAsyncClient.java +++ b/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/EntityAsyncClient.java @@ -2184,6 +2184,14 @@ Mono> importBusinessMetadataWithResponse(BinaryData busines /** * Delete given labels to a given entity. + *

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/json".
+ * You can add these to a request with {@link RequestOptions#addHeader} *

Request Body Schema

* *
{@code
@@ -2208,6 +2216,14 @@ public Mono> removeLabelsWithResponse(String guid, RequestOptions
 
     /**
      * Set labels to a given entity.
+     * 

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/json".
+ * You can add these to a request with {@link RequestOptions#addHeader} *

Request Body Schema

* *
{@code
@@ -2232,6 +2248,14 @@ public Mono> setLabelsWithResponse(String guid, RequestOptions re
 
     /**
      * Add given labels to a given entity.
+     * 

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/json".
+ * You can add these to a request with {@link RequestOptions#addHeader} *

Request Body Schema

* *
{@code
@@ -2277,6 +2301,14 @@ public Mono> addLabelWithResponse(String guid, RequestOptions req
      * be changed to other unique attributes)
      * 
      * You can add these to a request with {@link RequestOptions#addQueryParam}
+     * 

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/json".
+ * You can add these to a request with {@link RequestOptions#addHeader} *

Request Body Schema

* *
{@code
@@ -2325,6 +2357,14 @@ public Mono> removeLabelsByUniqueAttributeWithResponse(String typ
      * be changed to other unique attributes)
      * 
      * You can add these to a request with {@link RequestOptions#addQueryParam}
+     * 

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/json".
+ * You can add these to a request with {@link RequestOptions#addHeader} *

Request Body Schema

* *
{@code
@@ -2372,6 +2412,14 @@ public Mono> setLabelsByUniqueAttributeWithResponse(String typeNa
      * be changed to other unique attributes)
      * 
      * You can add these to a request with {@link RequestOptions#addQueryParam}
+     * 

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/json".
+ * You can add these to a request with {@link RequestOptions#addHeader} *

Request Body Schema

* *
{@code
diff --git a/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/EntityClient.java b/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/EntityClient.java
index 8ec948d1e54d..8df1d4445f98 100644
--- a/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/EntityClient.java
+++ b/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/EntityClient.java
@@ -2166,6 +2166,14 @@ Response importBusinessMetadataWithResponse(BinaryData businessMetad
 
     /**
      * Delete given labels to a given entity.
+     * 

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/json".
+ * You can add these to a request with {@link RequestOptions#addHeader} *

Request Body Schema

* *
{@code
@@ -2190,6 +2198,14 @@ public Response removeLabelsWithResponse(String guid, RequestOptions reque
 
     /**
      * Set labels to a given entity.
+     * 

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/json".
+ * You can add these to a request with {@link RequestOptions#addHeader} *

Request Body Schema

* *
{@code
@@ -2214,6 +2230,14 @@ public Response setLabelsWithResponse(String guid, RequestOptions requestO
 
     /**
      * Add given labels to a given entity.
+     * 

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/json".
+ * You can add these to a request with {@link RequestOptions#addHeader} *

Request Body Schema

* *
{@code
@@ -2259,6 +2283,14 @@ public Response addLabelWithResponse(String guid, RequestOptions requestOp
      * be changed to other unique attributes)
      * 
      * You can add these to a request with {@link RequestOptions#addQueryParam}
+     * 

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/json".
+ * You can add these to a request with {@link RequestOptions#addHeader} *

Request Body Schema

* *
{@code
@@ -2306,6 +2338,14 @@ public Response removeLabelsByUniqueAttributeWithResponse(String typeName,
      * be changed to other unique attributes)
      * 
      * You can add these to a request with {@link RequestOptions#addQueryParam}
+     * 

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/json".
+ * You can add these to a request with {@link RequestOptions#addHeader} *

Request Body Schema

* *
{@code
@@ -2353,6 +2393,14 @@ public Response setLabelsByUniqueAttributeWithResponse(String typeName, Re
      * be changed to other unique attributes)
      * 
      * You can add these to a request with {@link RequestOptions#addQueryParam}
+     * 

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/json".
+ * You can add these to a request with {@link RequestOptions#addHeader} *

Request Body Schema

* *
{@code
diff --git a/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/GlossaryAsyncClient.java b/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/GlossaryAsyncClient.java
index 2bbe422dbeff..d71ed45d2d35 100644
--- a/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/GlossaryAsyncClient.java
+++ b/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/GlossaryAsyncClient.java
@@ -50,12 +50,8 @@ public final class GlossaryAsyncClient {
     /**
      * Get all glossaries. Recommend using limit/offset to get pagination result.
      * Recommend using 'ignoreTermsAndCategories=true' and fetch terms/categories
-     * separately using
-     * 
-     * 'GET /datamap/api/atlas/v2/glossary/{glossaryId}/terms'
-     * and
-     * 
-     * 'GET '/datamap/api/atlas/v2/glossary/{glossaryId}/categories'.
+     * separately using 'GET /datamap/api/atlas/v2/glossary/{glossaryId}/terms'
+     * and 'GET '/datamap/api/atlas/v2/glossary/{glossaryId}/categories'.
      * 

Query Parameters

* * @@ -3556,12 +3552,8 @@ public Mono> getTermHeadersWithResponse(String glossaryId, /** * Get all glossaries. Recommend using limit/offset to get pagination result. * Recommend using 'ignoreTermsAndCategories=true' and fetch terms/categories - * separately using - * - * 'GET /datamap/api/atlas/v2/glossary/{glossaryId}/terms' - * and - * - * 'GET '/datamap/api/atlas/v2/glossary/{glossaryId}/categories'. + * separately using 'GET /datamap/api/atlas/v2/glossary/{glossaryId}/terms' + * and 'GET '/datamap/api/atlas/v2/glossary/{glossaryId}/categories'. * * @param limit The page size - by default there is no paging. * @param offset The offset for pagination purpose. @@ -3600,12 +3592,8 @@ public Mono> batchGet(Integer limit, Integer offset, String /** * Get all glossaries. Recommend using limit/offset to get pagination result. * Recommend using 'ignoreTermsAndCategories=true' and fetch terms/categories - * separately using - * - * 'GET /datamap/api/atlas/v2/glossary/{glossaryId}/terms' - * and - * - * 'GET '/datamap/api/atlas/v2/glossary/{glossaryId}/categories'. + * separately using 'GET /datamap/api/atlas/v2/glossary/{glossaryId}/terms' + * and 'GET '/datamap/api/atlas/v2/glossary/{glossaryId}/categories'. * * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. diff --git a/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/GlossaryClient.java b/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/GlossaryClient.java index 22fadb8e9d36..8699f44711c5 100644 --- a/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/GlossaryClient.java +++ b/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/GlossaryClient.java @@ -48,12 +48,8 @@ public final class GlossaryClient { /** * Get all glossaries. Recommend using limit/offset to get pagination result. * Recommend using 'ignoreTermsAndCategories=true' and fetch terms/categories - * separately using - * - * 'GET /datamap/api/atlas/v2/glossary/{glossaryId}/terms' - * and - * - * 'GET '/datamap/api/atlas/v2/glossary/{glossaryId}/categories'. + * separately using 'GET /datamap/api/atlas/v2/glossary/{glossaryId}/terms' + * and 'GET '/datamap/api/atlas/v2/glossary/{glossaryId}/categories'. *

Query Parameters

*
Query Parameters
* @@ -3540,12 +3536,8 @@ public Response getTermHeadersWithResponse(String glossaryId, Reques /** * Get all glossaries. Recommend using limit/offset to get pagination result. * Recommend using 'ignoreTermsAndCategories=true' and fetch terms/categories - * separately using - * - * 'GET /datamap/api/atlas/v2/glossary/{glossaryId}/terms' - * and - * - * 'GET '/datamap/api/atlas/v2/glossary/{glossaryId}/categories'. + * separately using 'GET /datamap/api/atlas/v2/glossary/{glossaryId}/terms' + * and 'GET '/datamap/api/atlas/v2/glossary/{glossaryId}/categories'. * * @param limit The page size - by default there is no paging. * @param offset The offset for pagination purpose. @@ -3582,12 +3574,8 @@ public List batchGet(Integer limit, Integer offset, String sort, /** * Get all glossaries. Recommend using limit/offset to get pagination result. * Recommend using 'ignoreTermsAndCategories=true' and fetch terms/categories - * separately using - * - * 'GET /datamap/api/atlas/v2/glossary/{glossaryId}/terms' - * and - * - * 'GET '/datamap/api/atlas/v2/glossary/{glossaryId}/categories'. + * separately using 'GET /datamap/api/atlas/v2/glossary/{glossaryId}/terms' + * and 'GET '/datamap/api/atlas/v2/glossary/{glossaryId}/categories'. * * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. diff --git a/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/TypeDefinitionAsyncClient.java b/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/TypeDefinitionAsyncClient.java index caa32a33bb38..5108f4512b8b 100644 --- a/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/TypeDefinitionAsyncClient.java +++ b/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/TypeDefinitionAsyncClient.java @@ -2000,9 +2000,7 @@ public Mono> getWithResponse(RequestOptions requestOptions) } /** - * Create all atlas type definitions in bulk, only new definitions will be - * created. - * Any changes to the existing definitions will be discarded. + * Create all atlas type definitions in bulk. Please avoid recreating existing types. *

Request Body Schema

* *
{@code
@@ -4077,9 +4075,7 @@ public Mono get() {
     }
 
     /**
-     * Create all atlas type definitions in bulk, only new definitions will be
-     * created.
-     * Any changes to the existing definitions will be discarded.
+     * Create all atlas type definitions in bulk. Please avoid recreating existing types.
      * 
      * @param atlasTypesDef The definitions of types.
      * @throws IllegalArgumentException thrown if parameters fail the validation.
diff --git a/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/TypeDefinitionClient.java b/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/TypeDefinitionClient.java
index b26fe62940d4..7645404fb560 100644
--- a/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/TypeDefinitionClient.java
+++ b/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/TypeDefinitionClient.java
@@ -1983,9 +1983,7 @@ public Response getWithResponse(RequestOptions requestOptions) {
     }
 
     /**
-     * Create all atlas type definitions in bulk, only new definitions will be
-     * created.
-     * Any changes to the existing definitions will be discarded.
+     * Create all atlas type definitions in bulk. Please avoid recreating existing types.
      * 

Request Body Schema

* *
{@code
@@ -4045,9 +4043,7 @@ public AtlasTypesDef get() {
     }
 
     /**
-     * Create all atlas type definitions in bulk, only new definitions will be
-     * created.
-     * Any changes to the existing definitions will be discarded.
+     * Create all atlas type definitions in bulk. Please avoid recreating existing types.
      * 
      * @param atlasTypesDef The definitions of types.
      * @throws IllegalArgumentException thrown if parameters fail the validation.
diff --git a/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/implementation/DiscoveriesImpl.java b/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/implementation/DiscoveriesImpl.java
index 375e97be7939..e87aa69a9946 100644
--- a/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/implementation/DiscoveriesImpl.java
+++ b/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/implementation/DiscoveriesImpl.java
@@ -77,7 +77,7 @@ public interface DiscoveriesService {
         @UnexpectedResponseExceptionType(HttpResponseException.class)
         Mono> query(@HostParam("endpoint") String endpoint,
             @QueryParam("api-version") String apiVersion, @HeaderParam("accept") String accept,
-            @BodyParam("application/json") BinaryData queryOptions, RequestOptions requestOptions, Context context);
+            @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context);
 
         @Post("/search/query")
         @ExpectedResponses({ 200 })
@@ -87,7 +87,7 @@ Mono> query(@HostParam("endpoint") String endpoint,
         @UnexpectedResponseExceptionType(HttpResponseException.class)
         Response querySync(@HostParam("endpoint") String endpoint,
             @QueryParam("api-version") String apiVersion, @HeaderParam("accept") String accept,
-            @BodyParam("application/json") BinaryData queryOptions, RequestOptions requestOptions, Context context);
+            @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context);
 
         @Post("/search/suggest")
         @ExpectedResponses({ 200 })
@@ -97,7 +97,7 @@ Response querySync(@HostParam("endpoint") String endpoint,
         @UnexpectedResponseExceptionType(HttpResponseException.class)
         Mono> suggest(@HostParam("endpoint") String endpoint,
             @QueryParam("api-version") String apiVersion, @HeaderParam("accept") String accept,
-            @BodyParam("application/json") BinaryData suggestOptions, RequestOptions requestOptions, Context context);
+            @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context);
 
         @Post("/search/suggest")
         @ExpectedResponses({ 200 })
@@ -107,7 +107,7 @@ Mono> suggest(@HostParam("endpoint") String endpoint,
         @UnexpectedResponseExceptionType(HttpResponseException.class)
         Response suggestSync(@HostParam("endpoint") String endpoint,
             @QueryParam("api-version") String apiVersion, @HeaderParam("accept") String accept,
-            @BodyParam("application/json") BinaryData suggestOptions, RequestOptions requestOptions, Context context);
+            @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context);
 
         @Post("/search/autocomplete")
         @ExpectedResponses({ 200 })
@@ -117,8 +117,7 @@ Response suggestSync(@HostParam("endpoint") String endpoint,
         @UnexpectedResponseExceptionType(HttpResponseException.class)
         Mono> autoComplete(@HostParam("endpoint") String endpoint,
             @QueryParam("api-version") String apiVersion, @HeaderParam("accept") String accept,
-            @BodyParam("application/json") BinaryData autoCompleteOptions, RequestOptions requestOptions,
-            Context context);
+            @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context);
 
         @Post("/search/autocomplete")
         @ExpectedResponses({ 200 })
@@ -128,8 +127,7 @@ Mono> autoComplete(@HostParam("endpoint") String endpoint,
         @UnexpectedResponseExceptionType(HttpResponseException.class)
         Response autoCompleteSync(@HostParam("endpoint") String endpoint,
             @QueryParam("api-version") String apiVersion, @HeaderParam("accept") String accept,
-            @BodyParam("application/json") BinaryData autoCompleteOptions, RequestOptions requestOptions,
-            Context context);
+            @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context);
     }
 
     /**
@@ -273,7 +271,7 @@ Response autoCompleteSync(@HostParam("endpoint") String endpoint,
      * }
      * 
* - * @param queryOptions The search query of advanced search request. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -282,10 +280,10 @@ Response autoCompleteSync(@HostParam("endpoint") String endpoint, * @return data using search along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> queryWithResponseAsync(BinaryData queryOptions, RequestOptions requestOptions) { + public Mono> queryWithResponseAsync(BinaryData body, RequestOptions requestOptions) { final String accept = "application/json"; return FluxUtil.withContext(context -> service.query(this.client.getEndpoint(), - this.client.getServiceVersion().getVersion(), accept, queryOptions, requestOptions, context)); + this.client.getServiceVersion().getVersion(), accept, body, requestOptions, context)); } /** @@ -429,7 +427,7 @@ public Mono> queryWithResponseAsync(BinaryData queryOptions * } *
* - * @param queryOptions The search query of advanced search request. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -438,10 +436,10 @@ public Mono> queryWithResponseAsync(BinaryData queryOptions * @return data using search along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response queryWithResponse(BinaryData queryOptions, RequestOptions requestOptions) { + public Response queryWithResponse(BinaryData body, RequestOptions requestOptions) { final String accept = "application/json"; - return service.querySync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), accept, - queryOptions, requestOptions, Context.NONE); + return service.querySync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), accept, body, + requestOptions, Context.NONE); } /** @@ -511,7 +509,7 @@ public Response queryWithResponse(BinaryData queryOptions, RequestOp * } * * - * @param suggestOptions The payload of suggest request. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -521,11 +519,10 @@ public Response queryWithResponse(BinaryData queryOptions, RequestOp * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> suggestWithResponseAsync(BinaryData suggestOptions, - RequestOptions requestOptions) { + public Mono> suggestWithResponseAsync(BinaryData body, RequestOptions requestOptions) { final String accept = "application/json"; return FluxUtil.withContext(context -> service.suggest(this.client.getEndpoint(), - this.client.getServiceVersion().getVersion(), accept, suggestOptions, requestOptions, context)); + this.client.getServiceVersion().getVersion(), accept, body, requestOptions, context)); } /** @@ -595,7 +592,7 @@ public Mono> suggestWithResponseAsync(BinaryData suggestOpt * } * * - * @param suggestOptions The payload of suggest request. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -604,10 +601,10 @@ public Mono> suggestWithResponseAsync(BinaryData suggestOpt * @return search suggestions by query criteria along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response suggestWithResponse(BinaryData suggestOptions, RequestOptions requestOptions) { + public Response suggestWithResponse(BinaryData body, RequestOptions requestOptions) { final String accept = "application/json"; return service.suggestSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), accept, - suggestOptions, requestOptions, Context.NONE); + body, requestOptions, Context.NONE); } /** @@ -635,7 +632,7 @@ public Response suggestWithResponse(BinaryData suggestOptions, Reque * } * } * - * @param autoCompleteOptions The payload of autocomplete request. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -644,11 +641,10 @@ public Response suggestWithResponse(BinaryData suggestOptions, Reque * @return auto complete options along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> autoCompleteWithResponseAsync(BinaryData autoCompleteOptions, - RequestOptions requestOptions) { + public Mono> autoCompleteWithResponseAsync(BinaryData body, RequestOptions requestOptions) { final String accept = "application/json"; return FluxUtil.withContext(context -> service.autoComplete(this.client.getEndpoint(), - this.client.getServiceVersion().getVersion(), accept, autoCompleteOptions, requestOptions, context)); + this.client.getServiceVersion().getVersion(), accept, body, requestOptions, context)); } /** @@ -676,7 +672,7 @@ public Mono> autoCompleteWithResponseAsync(BinaryData autoC * } * } * - * @param autoCompleteOptions The payload of autocomplete request. + * @param body Body parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -685,10 +681,9 @@ public Mono> autoCompleteWithResponseAsync(BinaryData autoC * @return auto complete options along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response autoCompleteWithResponse(BinaryData autoCompleteOptions, - RequestOptions requestOptions) { + public Response autoCompleteWithResponse(BinaryData body, RequestOptions requestOptions) { final String accept = "application/json"; return service.autoCompleteSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), accept, - autoCompleteOptions, requestOptions, Context.NONE); + body, requestOptions, Context.NONE); } } diff --git a/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/implementation/EntitiesImpl.java b/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/implementation/EntitiesImpl.java index d5ddb4ecbfb3..33f5251a905a 100644 --- a/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/implementation/EntitiesImpl.java +++ b/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/implementation/EntitiesImpl.java @@ -5072,6 +5072,14 @@ public Response importBusinessMetadataWithResponse(BinaryData busine /** * Delete given labels to a given entity. + *

Header Parameters

+ *
Query Parameters
+ * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/json".
+ * You can add these to a request with {@link RequestOptions#addHeader} *

Request Body Schema

* *
{@code
@@ -5103,6 +5111,14 @@ public Mono> removeLabelsWithResponseAsync(String guid, RequestOp
 
     /**
      * Delete given labels to a given entity.
+     * 

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/json".
+ * You can add these to a request with {@link RequestOptions#addHeader} *

Request Body Schema

* *
{@code
@@ -5133,6 +5149,14 @@ public Response removeLabelsWithResponse(String guid, RequestOptions reque
 
     /**
      * Set labels to a given entity.
+     * 

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/json".
+ * You can add these to a request with {@link RequestOptions#addHeader} *

Request Body Schema

* *
{@code
@@ -5164,6 +5188,14 @@ public Mono> setLabelsWithResponseAsync(String guid, RequestOptio
 
     /**
      * Set labels to a given entity.
+     * 

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/json".
+ * You can add these to a request with {@link RequestOptions#addHeader} *

Request Body Schema

* *
{@code
@@ -5194,6 +5226,14 @@ public Response setLabelsWithResponse(String guid, RequestOptions requestO
 
     /**
      * Add given labels to a given entity.
+     * 

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/json".
+ * You can add these to a request with {@link RequestOptions#addHeader} *

Request Body Schema

* *
{@code
@@ -5225,6 +5265,14 @@ public Mono> addLabelWithResponseAsync(String guid, RequestOption
 
     /**
      * Add given labels to a given entity.
+     * 

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/json".
+ * You can add these to a request with {@link RequestOptions#addHeader} *

Request Body Schema

* *
{@code
@@ -5276,6 +5324,14 @@ public Response addLabelWithResponse(String guid, RequestOptions requestOp
      * be changed to other unique attributes)
      * 
      * You can add these to a request with {@link RequestOptions#addQueryParam}
+     * 

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/json".
+ * You can add these to a request with {@link RequestOptions#addHeader} *

Request Body Schema

* *
{@code
@@ -5329,6 +5385,14 @@ public Mono> removeLabelsByUniqueAttributeWithResponseAsync(Strin
      * be changed to other unique attributes)
      * 
      * You can add these to a request with {@link RequestOptions#addQueryParam}
+     * 

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/json".
+ * You can add these to a request with {@link RequestOptions#addHeader} *

Request Body Schema

* *
{@code
@@ -5383,6 +5447,14 @@ public Response removeLabelsByUniqueAttributeWithResponse(String typeName,
      * be changed to other unique attributes)
      * 
      * You can add these to a request with {@link RequestOptions#addQueryParam}
+     * 

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/json".
+ * You can add these to a request with {@link RequestOptions#addHeader} *

Request Body Schema

* *
{@code
@@ -5438,6 +5510,14 @@ public Mono> setLabelsByUniqueAttributeWithResponseAsync(String t
      * be changed to other unique attributes)
      * 
      * You can add these to a request with {@link RequestOptions#addQueryParam}
+     * 

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/json".
+ * You can add these to a request with {@link RequestOptions#addHeader} *

Request Body Schema

* *
{@code
@@ -5492,6 +5572,14 @@ public Response setLabelsByUniqueAttributeWithResponse(String typeName, Re
      * be changed to other unique attributes)
      * 
      * You can add these to a request with {@link RequestOptions#addQueryParam}
+     * 

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/json".
+ * You can add these to a request with {@link RequestOptions#addHeader} *

Request Body Schema

* *
{@code
@@ -5547,6 +5635,14 @@ public Mono> addLabelsByUniqueAttributeWithResponseAsync(String t
      * be changed to other unique attributes)
      * 
      * You can add these to a request with {@link RequestOptions#addQueryParam}
+     * 

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/json".
+ * You can add these to a request with {@link RequestOptions#addHeader} *

Request Body Schema

* *
{@code
diff --git a/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/implementation/GlossariesImpl.java b/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/implementation/GlossariesImpl.java
index cf3c404eed14..97cd8f733cce 100644
--- a/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/implementation/GlossariesImpl.java
+++ b/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/implementation/GlossariesImpl.java
@@ -660,12 +660,8 @@ Response getTermHeadersSync(@HostParam("endpoint") String endpoint,
     /**
      * Get all glossaries. Recommend using limit/offset to get pagination result.
      * Recommend using 'ignoreTermsAndCategories=true' and fetch terms/categories
-     * separately using
-     * 
-     * 'GET /datamap/api/atlas/v2/glossary/{glossaryId}/terms'
-     * and
-     * 
-     * 'GET '/datamap/api/atlas/v2/glossary/{glossaryId}/categories'.
+     * separately using 'GET /datamap/api/atlas/v2/glossary/{glossaryId}/terms'
+     * and 'GET '/datamap/api/atlas/v2/glossary/{glossaryId}/categories'.
      * 

Query Parameters

* * @@ -753,12 +749,8 @@ public Mono> batchGetWithResponseAsync(RequestOptions reque /** * Get all glossaries. Recommend using limit/offset to get pagination result. * Recommend using 'ignoreTermsAndCategories=true' and fetch terms/categories - * separately using - * - * 'GET /datamap/api/atlas/v2/glossary/{glossaryId}/terms' - * and - * - * 'GET '/datamap/api/atlas/v2/glossary/{glossaryId}/categories'. + * separately using 'GET /datamap/api/atlas/v2/glossary/{glossaryId}/terms' + * and 'GET '/datamap/api/atlas/v2/glossary/{glossaryId}/categories'. *

Query Parameters

*
Query Parameters
* diff --git a/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/implementation/TypeDefinitionsImpl.java b/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/implementation/TypeDefinitionsImpl.java index 072f210db5a4..150b42b7044e 100644 --- a/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/implementation/TypeDefinitionsImpl.java +++ b/sdk/purview/azure-analytics-purview-datamap/src/main/java/com/azure/analytics/purview/datamap/implementation/TypeDefinitionsImpl.java @@ -4404,9 +4404,7 @@ public Response getWithResponse(RequestOptions requestOptions) { } /** - * Create all atlas type definitions in bulk, only new definitions will be - * created. - * Any changes to the existing definitions will be discarded. + * Create all atlas type definitions in bulk. Please avoid recreating existing types. *

Request Body Schema

* *
{@code
@@ -4990,9 +4988,7 @@ public Mono> batchCreateWithResponseAsync(BinaryData atlasT
     }
 
     /**
-     * Create all atlas type definitions in bulk, only new definitions will be
-     * created.
-     * Any changes to the existing definitions will be discarded.
+     * Create all atlas type definitions in bulk. Please avoid recreating existing types.
      * 

Request Body Schema

* *
{@code
diff --git a/sdk/purview/azure-analytics-purview-datamap/tsp-location.yaml b/sdk/purview/azure-analytics-purview-datamap/tsp-location.yaml
index e6ca06223b8e..bf5af1b59eba 100644
--- a/sdk/purview/azure-analytics-purview-datamap/tsp-location.yaml
+++ b/sdk/purview/azure-analytics-purview-datamap/tsp-location.yaml
@@ -1,4 +1,3 @@
 directory: specification/purview/Azure.Analytics.Purview.DataMap
-commit: 20e26266be77e6da4321259fb79e51e8281e48b2
+commit: 3cb1b51638616435470fc10ea00de92512186ece
 repo: Azure/azure-rest-api-specs
-
diff --git a/sdk/purview/ci.yml b/sdk/purview/ci.yml
index 4b5ab9015d16..98c12a1cb62b 100644
--- a/sdk/purview/ci.yml
+++ b/sdk/purview/ci.yml
@@ -12,7 +12,6 @@ trigger:
     exclude:
       - sdk/purview/pom.xml
       - sdk/purview/azure-analytics-purview-administration/pom.xml
-      - sdk/purview/azure-analytics-purview-catalog/pom.xml
       - sdk/purview/azure-analytics-purview-datamap/pom.xml
       - sdk/purview/azure-analytics-purview-scanning/pom.xml
       - sdk/purview/azure-analytics-purview-sharing/pom.xml
@@ -32,7 +31,6 @@ pr:
     exclude:
       - sdk/purview/pom.xml
       - sdk/purview/azure-analytics-purview-administration/pom.xml
-      - sdk/purview/azure-analytics-purview-catalog/pom.xml
       - sdk/purview/azure-analytics-purview-datamap/pom.xml
       - sdk/purview/azure-analytics-purview-scanning/pom.xml
       - sdk/purview/azure-analytics-purview-sharing/pom.xml
@@ -45,10 +43,6 @@ parameters:
     displayName: azure-analytics-purview-administration
     type: boolean
     default: true
-  - name: release_azureanalyticspurviewcatalog
-    displayName: azure-analytics-purview-catalog
-    type: boolean
-    default: true
   - name: release_azureanalyticspurviewdatamap
     displayName: azure-analytics-purview-datamap
     type: boolean
@@ -79,10 +73,6 @@ extends:
         groupId: com.azure
         safeName: azureanalyticspurviewadministration
         releaseInBatch: ${{ parameters.release_azureanalyticspurviewadministration }}
-      - name: azure-analytics-purview-catalog
-        groupId: com.azure
-        safeName: azureanalyticspurviewcatalog
-        releaseInBatch: ${{ parameters.release_azureanalyticspurviewcatalog }}
       - name: azure-analytics-purview-datamap
         groupId: com.azure
         safeName: azureanalyticspurviewdatamap
diff --git a/sdk/translation/azure-ai-translation-document/src/main/java/com/azure/ai/translation/document/implementation/SingleDocumentTranslationClientImpl.java b/sdk/translation/azure-ai-translation-document/src/main/java/com/azure/ai/translation/document/implementation/SingleDocumentTranslationClientImpl.java
index 9402ef21f61f..224efcadca4d 100644
--- a/sdk/translation/azure-ai-translation-document/src/main/java/com/azure/ai/translation/document/implementation/SingleDocumentTranslationClientImpl.java
+++ b/sdk/translation/azure-ai-translation-document/src/main/java/com/azure/ai/translation/document/implementation/SingleDocumentTranslationClientImpl.java
@@ -161,7 +161,7 @@ public interface SingleDocumentTranslationClientService {
         @UnexpectedResponseExceptionType(HttpResponseException.class)
         Mono> documentTranslate(@HostParam("endpoint") String endpoint,
             @QueryParam("api-version") String apiVersion, @QueryParam("targetLanguage") String targetLanguage,
-            @HeaderParam("content-type") String contentType, @HeaderParam("accept") String accept,
+            @HeaderParam("Content-Type") String contentType, @HeaderParam("accept") String accept,
             @BodyParam("multipart/form-data") BinaryData documentTranslateContent, RequestOptions requestOptions,
             Context context);
 
@@ -174,7 +174,7 @@ Mono> documentTranslate(@HostParam("endpoint") String endpo
         @UnexpectedResponseExceptionType(HttpResponseException.class)
         Response documentTranslateSync(@HostParam("endpoint") String endpoint,
             @QueryParam("api-version") String apiVersion, @QueryParam("targetLanguage") String targetLanguage,
-            @HeaderParam("content-type") String contentType, @HeaderParam("accept") String accept,
+            @HeaderParam("Content-Type") String contentType, @HeaderParam("accept") String accept,
             @BodyParam("multipart/form-data") BinaryData documentTranslateContent, RequestOptions requestOptions,
             Context context);
     }
diff --git a/sdk/translation/azure-ai-translation-document/tsp-location.yaml b/sdk/translation/azure-ai-translation-document/tsp-location.yaml
index 351bc749639e..596d39302e42 100644
--- a/sdk/translation/azure-ai-translation-document/tsp-location.yaml
+++ b/sdk/translation/azure-ai-translation-document/tsp-location.yaml
@@ -1,3 +1,3 @@
 directory: specification/translation/Azure.AI.DocumentTranslation
-commit: 82846235e39ef4ee910772d2ff1ef58a349bfdb6
+commit: 3cb1b51638616435470fc10ea00de92512186ece
 repo: Azure/azure-rest-api-specs
diff --git a/sdk/translation/azure-ai-translation-text/tsp-location.yaml b/sdk/translation/azure-ai-translation-text/tsp-location.yaml
index 5fb20937615b..92ae13306b12 100644
--- a/sdk/translation/azure-ai-translation-text/tsp-location.yaml
+++ b/sdk/translation/azure-ai-translation-text/tsp-location.yaml
@@ -1,3 +1,3 @@
 directory: specification/translation/Azure.AI.TextTranslation
-commit: a220053360f9700f81abcdb6142769c85c3bcb27
+commit: 3cb1b51638616435470fc10ea00de92512186ece
 repo: Azure/azure-rest-api-specs
Query Parameters