From c6f81d07126f5d27f3d9d4d3b2cd2f2778de95ca Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Sat, 14 Sep 2024 13:31:26 +0800 Subject: [PATCH 01/14] update commitId to spec --- sdk/face/azure-ai-vision-face/tsp-location.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/face/azure-ai-vision-face/tsp-location.yaml b/sdk/face/azure-ai-vision-face/tsp-location.yaml index e6c0164ad50b..9ae1dbefc9c2 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: b3d5c34b3447f71ca8474aa9d32449aafe3996a2 +commit: f2b97d9664e113b16602dd3a2f20900a7f9f7c26 repo: Azure/azure-rest-api-specs additionalDirectories: null From 3f5536a937dd7c93b6cb6072b0ae15936eff8ab9 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Sat, 14 Sep 2024 13:47:46 +0800 Subject: [PATCH 02/14] empty customization java --- .../customization/pom.xml | 21 +++++++++++++++++++ .../src/main/java/FaceCustomizations.java | 20 ++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 sdk/face/azure-ai-vision-face/customization/pom.xml create mode 100644 sdk/face/azure-ai-vision-face/customization/src/main/java/FaceCustomizations.java diff --git a/sdk/face/azure-ai-vision-face/customization/pom.xml b/sdk/face/azure-ai-vision-face/customization/pom.xml new file mode 100644 index 000000000000..0fee845d5d19 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/customization/pom.xml @@ -0,0 +1,21 @@ + + + 4.0.0 + + + com.azure + azure-code-customization-parent + 1.0.0-beta.1 + ../../../parents/azure-code-customization-parent + + + Microsoft Azure Face client for Java + This package contains client customization for Microsoft Azure Face + + com.azure.tools + azure-face-customization + 1.0.0-beta.1 + jar + diff --git a/sdk/face/azure-ai-vision-face/customization/src/main/java/FaceCustomizations.java b/sdk/face/azure-ai-vision-face/customization/src/main/java/FaceCustomizations.java new file mode 100644 index 000000000000..3c2a636d49a9 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/customization/src/main/java/FaceCustomizations.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +import com.azure.autorest.customization.Customization; +import com.azure.autorest.customization.LibraryCustomization; +import org.slf4j.Logger; + +import java.lang.reflect.Modifier; +import java.util.Arrays; + +/** + * This class contains the customization code to customize the AutoRest generated code for OpenAI. + */ +public class FaceCustomizations extends Customization { + + @Override + public void customize(LibraryCustomization customization, Logger logger) { + // NOOP + } +} From dc2ad778f31c35afceeb89e56c0d10a70baec225 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Sat, 14 Sep 2024 13:48:45 +0800 Subject: [PATCH 03/14] generate code --- .../FaceAdministrationClientBuilder.java | 62 ++- .../LargeFaceListAsyncClient.java | 290 ++++++------- .../LargeFaceListClient.java | 292 ++++++------- .../LargePersonGroupAsyncClient.java | 396 +++++++----------- .../LargePersonGroupClient.java | 377 +++++++---------- .../face/administration/package-info.java | 10 + .../FaceAdministrationClientImpl.java | 50 ++- .../implementation/LargeFaceListsImpl.java | 187 ++++----- .../implementation/LargePersonGroupsImpl.java | 253 +++++------ .../src/main/java/module-info.java | 1 + ...ure-ai-vision-face_apiview_properties.json | 250 +++++------ 11 files changed, 972 insertions(+), 1196 deletions(-) rename sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/{ => administration}/FaceAdministrationClientBuilder.java (88%) rename sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/{ => administration}/LargeFaceListAsyncClient.java (82%) rename sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/{ => administration}/LargeFaceListClient.java (81%) rename sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/{ => administration}/LargePersonGroupAsyncClient.java (84%) rename sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/{ => administration}/LargePersonGroupClient.java (84%) create mode 100644 sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/package-info.java diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceAdministrationClientBuilder.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/FaceAdministrationClientBuilder.java similarity index 88% rename from sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceAdministrationClientBuilder.java rename to sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/FaceAdministrationClientBuilder.java index 5e80ac1b584f..12784c5b150c 100644 --- a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceAdministrationClientBuilder.java +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/FaceAdministrationClientBuilder.java @@ -1,8 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.ai.vision.face; +package com.azure.ai.vision.face.administration; + +import com.azure.ai.vision.face.FaceServiceVersion; import com.azure.ai.vision.face.implementation.FaceAdministrationClientImpl; import com.azure.core.annotation.Generated; import com.azure.core.annotation.ServiceClientBuilder; @@ -54,7 +56,6 @@ public final class FaceAdministrationClientBuilder implements HttpTrait, ConfigurationTrait, TokenCredentialTrait, KeyCredentialTrait, EndpointTrait { - @Generated private static final String SDK_NAME = "name"; @@ -236,6 +237,42 @@ public FaceAdministrationClientBuilder endpoint(String endpoint) { return this; } + /* + * Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + */ + @Generated + private String largeFaceListId; + + /** + * Sets Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * + * @param largeFaceListId the largeFaceListId value. + * @return the FaceAdministrationClientBuilder. + */ + @Generated + public FaceAdministrationClientBuilder largeFaceListId(String largeFaceListId) { + this.largeFaceListId = largeFaceListId; + return this; + } + + /* + * ID of the container. + */ + @Generated + private String largePersonGroupId; + + /** + * Sets ID of the container. + * + * @param largePersonGroupId the largePersonGroupId value. + * @return the FaceAdministrationClientBuilder. + */ + @Generated + public FaceAdministrationClientBuilder largePersonGroupId(String largePersonGroupId) { + this.largePersonGroupId = largePersonGroupId; + return this; + } + /* * Service version */ @@ -244,7 +281,7 @@ public FaceAdministrationClientBuilder endpoint(String endpoint) { /** * Sets Service version. - * + * * @param serviceVersion the serviceVersion value. * @return the FaceAdministrationClientBuilder. */ @@ -262,7 +299,7 @@ public FaceAdministrationClientBuilder serviceVersion(FaceServiceVersion service /** * Sets The retry policy that will attempt to retry failed requests, if applicable. - * + * * @param retryPolicy the retryPolicy value. * @return the FaceAdministrationClientBuilder. */ @@ -274,7 +311,7 @@ public FaceAdministrationClientBuilder retryPolicy(RetryPolicy retryPolicy) { /** * Builds an instance of FaceAdministrationClientImpl with the provided parameters. - * + * * @return an instance of FaceAdministrationClientImpl. */ @Generated @@ -283,8 +320,9 @@ private FaceAdministrationClientImpl buildInnerClient() { HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); FaceServiceVersion localServiceVersion = (serviceVersion != null) ? serviceVersion : FaceServiceVersion.getLatest(); - FaceAdministrationClientImpl client = new FaceAdministrationClientImpl(localPipeline, - JacksonAdapter.createDefaultSerializerAdapter(), this.endpoint, localServiceVersion); + FaceAdministrationClientImpl client + = new FaceAdministrationClientImpl(localPipeline, JacksonAdapter.createDefaultSerializerAdapter(), + this.endpoint, this.largeFaceListId, this.largePersonGroupId, localServiceVersion); return client; } @@ -293,6 +331,8 @@ 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."); + Objects.requireNonNull(largeFaceListId, "'largeFaceListId' cannot be null."); + Objects.requireNonNull(largePersonGroupId, "'largePersonGroupId' cannot be null."); } @Generated @@ -338,7 +378,7 @@ private HttpPipeline createHttpPipeline() { /** * Builds an instance of LargeFaceListAsyncClient class. - * + * * @return an instance of LargeFaceListAsyncClient. */ @Generated @@ -348,7 +388,7 @@ public LargeFaceListAsyncClient buildLargeFaceListAsyncClient() { /** * Builds an instance of LargePersonGroupAsyncClient class. - * + * * @return an instance of LargePersonGroupAsyncClient. */ @Generated @@ -358,7 +398,7 @@ public LargePersonGroupAsyncClient buildLargePersonGroupAsyncClient() { /** * Builds an instance of LargeFaceListClient class. - * + * * @return an instance of LargeFaceListClient. */ @Generated @@ -368,7 +408,7 @@ public LargeFaceListClient buildLargeFaceListClient() { /** * Builds an instance of LargePersonGroupClient class. - * + * * @return an instance of LargePersonGroupClient. */ @Generated diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/LargeFaceListAsyncClient.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/LargeFaceListAsyncClient.java similarity index 82% rename from sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/LargeFaceListAsyncClient.java rename to sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/LargeFaceListAsyncClient.java index b847fc4e6e30..f97ff95d5a52 100644 --- a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/LargeFaceListAsyncClient.java +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/LargeFaceListAsyncClient.java @@ -1,7 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.ai.vision.face; + +package com.azure.ai.vision.face.administration; import com.azure.ai.vision.face.implementation.LargeFaceListsImpl; import com.azure.ai.vision.face.implementation.models.AddFaceFromUrlRequest1; @@ -38,13 +39,12 @@ */ @ServiceClient(builder = FaceAdministrationClientBuilder.class, isAsync = true) public final class LargeFaceListAsyncClient { - @Generated private final LargeFaceListsImpl serviceClient; /** * Initializes an instance of LargeFaceListAsyncClient class. - * + * * @param serviceClient the service client implementation. */ @Generated @@ -55,7 +55,7 @@ public final class LargeFaceListAsyncClient { /** * Create an empty Large Face List with user-specified largeFaceListId, name, an optional userData and * recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/create-large-face-list for more * details. *

Request Body Schema

@@ -67,8 +67,7 @@ public final class LargeFaceListAsyncClient { * recognitionModel: String(recognition_01/recognition_02/recognition_03/recognition_04) (Optional) * } * } - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @param createRequest1 The createRequest1 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. @@ -79,18 +78,16 @@ public final class LargeFaceListAsyncClient { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createWithResponse(String largeFaceListId, BinaryData createRequest1, - RequestOptions requestOptions) { - return this.serviceClient.createWithResponseAsync(largeFaceListId, createRequest1, requestOptions); + public Mono> createWithResponse(BinaryData createRequest1, RequestOptions requestOptions) { + return this.serviceClient.createWithResponseAsync(createRequest1, requestOptions); } /** * Delete a face from a Large Face List by specified largeFaceListId and persistedFaceId. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/delete-large-face-list for more * details. - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @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. @@ -100,8 +97,8 @@ public Mono> createWithResponse(String largeFaceListId, BinaryDat */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponse(String largeFaceListId, RequestOptions requestOptions) { - return this.serviceClient.deleteWithResponseAsync(largeFaceListId, requestOptions); + public Mono> deleteWithResponse(RequestOptions requestOptions) { + return this.serviceClient.deleteWithResponseAsync(requestOptions); } /** @@ -125,8 +122,7 @@ public Mono> deleteWithResponse(String largeFaceListId, RequestOp * largeFaceListId: String (Required) * } * } - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @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. @@ -137,8 +133,8 @@ public Mono> deleteWithResponse(String largeFaceListId, RequestOp */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponse(String largeFaceListId, RequestOptions requestOptions) { - return this.serviceClient.getWithResponseAsync(largeFaceListId, requestOptions); + public Mono> getWithResponse(RequestOptions requestOptions) { + return this.serviceClient.getWithResponseAsync(requestOptions); } /** @@ -152,8 +148,7 @@ public Mono> getWithResponse(String largeFaceListId, Reques * userData: String (Optional) * } * } - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @param updateRequest1 The updateRequest1 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. @@ -164,14 +159,13 @@ public Mono> getWithResponse(String largeFaceListId, Reques */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponse(String largeFaceListId, BinaryData updateRequest1, - RequestOptions requestOptions) { - return this.serviceClient.updateWithResponseAsync(largeFaceListId, updateRequest1, requestOptions); + public Mono> updateWithResponse(BinaryData updateRequest1, RequestOptions requestOptions) { + return this.serviceClient.updateWithResponseAsync(updateRequest1, requestOptions); } /** * List Large Face Lists' information of largeFaceListId, name, userData and recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-lists for more * details. *

Query Parameters

@@ -198,7 +192,7 @@ public Mono> updateWithResponse(String largeFaceListId, BinaryDat * } * ] * } - * + * * @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. @@ -227,8 +221,7 @@ public Mono> getLargeFaceListsWithResponse(RequestOptions r * message: String (Optional) * } * } - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @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. @@ -238,18 +231,16 @@ public Mono> getLargeFaceListsWithResponse(RequestOptions r */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getTrainingStatusWithResponse(String largeFaceListId, - RequestOptions requestOptions) { - return this.serviceClient.getTrainingStatusWithResponseAsync(largeFaceListId, requestOptions); + public Mono> getTrainingStatusWithResponse(RequestOptions requestOptions) { + return this.serviceClient.getTrainingStatusWithResponseAsync(requestOptions); } /** * Submit a Large Face List training task. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/train-large-face-list for more * details. - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @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. @@ -259,13 +250,13 @@ public Mono> getTrainingStatusWithResponse(String largeFace */ @Generated @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux beginTrain(String largeFaceListId, RequestOptions requestOptions) { - return this.serviceClient.beginTrainAsync(largeFaceListId, requestOptions); + public PollerFlux beginTrain(RequestOptions requestOptions) { + return this.serviceClient.beginTrainAsync(requestOptions); } /** * Add a face to a specified Large Face List, up to 1,000,000 faces. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/add-large-face-list-face-from-url * for more details. *

Query Parameters

@@ -297,8 +288,7 @@ public PollerFlux beginTrain(String largeFaceListId, Req * persistedFaceId: String (Required) * } * } - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @param addFaceFromUrlRequest1 The addFaceFromUrlRequest1 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. @@ -309,15 +299,14 @@ public PollerFlux beginTrain(String largeFaceListId, Req */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Mono> addFaceFromUrlImplWithResponse(String largeFaceListId, BinaryData addFaceFromUrlRequest1, + Mono> addFaceFromUrlImplWithResponse(BinaryData addFaceFromUrlRequest1, RequestOptions requestOptions) { - return this.serviceClient.addFaceFromUrlImplWithResponseAsync(largeFaceListId, addFaceFromUrlRequest1, - requestOptions); + return this.serviceClient.addFaceFromUrlImplWithResponseAsync(addFaceFromUrlRequest1, requestOptions); } /** * Add a face to a specified Large Face List, up to 1,000,000 faces. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/add-large-face-list-face for more * details. *

Query Parameters

@@ -347,8 +336,7 @@ Mono> addFaceFromUrlImplWithResponse(String largeFaceListId * persistedFaceId: String (Required) * } * } - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @param imageContent The image to be analyzed. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -359,16 +347,14 @@ Mono> addFaceFromUrlImplWithResponse(String largeFaceListId */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Mono> addFaceImplWithResponse(String largeFaceListId, BinaryData imageContent, - RequestOptions requestOptions) { - return this.serviceClient.addFaceImplWithResponseAsync(largeFaceListId, imageContent, requestOptions); + Mono> addFaceImplWithResponse(BinaryData imageContent, RequestOptions requestOptions) { + return this.serviceClient.addFaceImplWithResponseAsync(imageContent, requestOptions); } /** * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/delete-large-face-list-face for * more details. - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @param persistedFaceId Face ID of the face. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -379,9 +365,8 @@ Mono> addFaceImplWithResponse(String largeFaceListId, Binar */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteFaceWithResponse(String largeFaceListId, String persistedFaceId, - RequestOptions requestOptions) { - return this.serviceClient.deleteFaceWithResponseAsync(largeFaceListId, persistedFaceId, requestOptions); + public Mono> deleteFaceWithResponse(String persistedFaceId, RequestOptions requestOptions) { + return this.serviceClient.deleteFaceWithResponseAsync(persistedFaceId, requestOptions); } /** @@ -395,8 +380,7 @@ public Mono> deleteFaceWithResponse(String largeFaceListId, Strin * userData: String (Optional) * } * } - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @param persistedFaceId Face ID of the face. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -407,9 +391,8 @@ public Mono> deleteFaceWithResponse(String largeFaceListId, Strin */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getFaceWithResponse(String largeFaceListId, String persistedFaceId, - RequestOptions requestOptions) { - return this.serviceClient.getFaceWithResponseAsync(largeFaceListId, persistedFaceId, requestOptions); + public Mono> getFaceWithResponse(String persistedFaceId, RequestOptions requestOptions) { + return this.serviceClient.getFaceWithResponseAsync(persistedFaceId, requestOptions); } /** @@ -422,8 +405,7 @@ public Mono> getFaceWithResponse(String largeFaceListId, St * userData: String (Optional) * } * } - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @param persistedFaceId Face ID of the face. * @param updateFaceRequest1 The updateFaceRequest1 parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -435,15 +417,14 @@ public Mono> getFaceWithResponse(String largeFaceListId, St */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateFaceWithResponse(String largeFaceListId, String persistedFaceId, - BinaryData updateFaceRequest1, RequestOptions requestOptions) { - return this.serviceClient.updateFaceWithResponseAsync(largeFaceListId, persistedFaceId, updateFaceRequest1, - requestOptions); + public Mono> updateFaceWithResponse(String persistedFaceId, BinaryData updateFaceRequest1, + RequestOptions requestOptions) { + return this.serviceClient.updateFaceWithResponseAsync(persistedFaceId, updateFaceRequest1, requestOptions); } /** * List faces' persistedFaceId and userData in a specified Large Face List. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-list-faces for more * details. *

Query Parameters

@@ -466,8 +447,7 @@ public Mono> updateFaceWithResponse(String largeFaceListId, Strin * } * ] * } - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @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. @@ -477,18 +457,17 @@ public Mono> updateFaceWithResponse(String largeFaceListId, Strin */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getFacesWithResponse(String largeFaceListId, RequestOptions requestOptions) { - return this.serviceClient.getFacesWithResponseAsync(largeFaceListId, requestOptions); + public Mono> getFacesWithResponse(RequestOptions requestOptions) { + return this.serviceClient.getFacesWithResponseAsync(requestOptions); } /** * Create an empty Large Face List with user-specified largeFaceListId, name, an optional userData and * recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/create-large-face-list for more * details. - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @param name User defined name, maximum length is 128. * @param userData Optional user defined data. Length should not exceed 16K. * @param recognitionModel The 'recognitionModel' associated with this face list. Supported 'recognitionModel' @@ -505,24 +484,22 @@ public Mono> getFacesWithResponse(String largeFaceListId, R */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono create(String largeFaceListId, String name, String userData, - FaceRecognitionModel recognitionModel) { + public Mono create(String name, String userData, FaceRecognitionModel recognitionModel) { // Generated convenience method for createWithResponse RequestOptions requestOptions = new RequestOptions(); CreateRequest1 createRequest1Obj = new CreateRequest1(name).setUserData(userData).setRecognitionModel(recognitionModel); BinaryData createRequest1 = BinaryData.fromObject(createRequest1Obj); - return createWithResponse(largeFaceListId, createRequest1, requestOptions).flatMap(FluxUtil::toMono); + return createWithResponse(createRequest1, requestOptions).flatMap(FluxUtil::toMono); } /** * Create an empty Large Face List with user-specified largeFaceListId, name, an optional userData and * recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/create-large-face-list for more * details. - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @param name User defined name, maximum length is 128. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -534,22 +511,20 @@ public Mono create(String largeFaceListId, String name, String userData, */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono create(String largeFaceListId, String name) { + public Mono create(String name) { // Generated convenience method for createWithResponse RequestOptions requestOptions = new RequestOptions(); CreateRequest1 createRequest1Obj = new CreateRequest1(name); BinaryData createRequest1 = BinaryData.fromObject(createRequest1Obj); - return createWithResponse(largeFaceListId, createRequest1, requestOptions).flatMap(FluxUtil::toMono); + return createWithResponse(createRequest1, requestOptions).flatMap(FluxUtil::toMono); } /** * Delete a face from a Large Face List by specified largeFaceListId and persistedFaceId. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/delete-large-face-list for more * details. - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. - * @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. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -559,17 +534,16 @@ public Mono create(String largeFaceListId, String name) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono delete(String largeFaceListId) { + public Mono delete() { // Generated convenience method for deleteWithResponse RequestOptions requestOptions = new RequestOptions(); - return deleteWithResponse(largeFaceListId, requestOptions).flatMap(FluxUtil::toMono); + return deleteWithResponse(requestOptions).flatMap(FluxUtil::toMono); } /** * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-list for more * details. - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @param returnRecognitionModel Return 'recognitionModel' or not. The default value is false. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -581,22 +555,20 @@ public Mono delete(String largeFaceListId) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono get(String largeFaceListId, Boolean returnRecognitionModel) { + public Mono get(Boolean returnRecognitionModel) { // Generated convenience method for getWithResponse RequestOptions requestOptions = new RequestOptions(); if (returnRecognitionModel != null) { requestOptions.addQueryParam("returnRecognitionModel", String.valueOf(returnRecognitionModel), false); } - return getWithResponse(largeFaceListId, requestOptions).flatMap(FluxUtil::toMono) + return getWithResponse(requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(LargeFaceList.class)); } /** * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-list for more * details. - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. - * @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. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -606,18 +578,17 @@ public Mono get(String largeFaceListId, Boolean returnRecognition */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono get(String largeFaceListId) { + public Mono get() { // Generated convenience method for getWithResponse RequestOptions requestOptions = new RequestOptions(); - return getWithResponse(largeFaceListId, requestOptions).flatMap(FluxUtil::toMono) + return getWithResponse(requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(LargeFaceList.class)); } /** * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/update-large-face-list for more * details. - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @param name User defined name, maximum length is 128. * @param userData Optional user defined data. Length should not exceed 16K. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -630,20 +601,18 @@ public Mono get(String largeFaceListId) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono update(String largeFaceListId, String name, String userData) { + public Mono update(String name, String userData) { // Generated convenience method for updateWithResponse RequestOptions requestOptions = new RequestOptions(); UpdateRequest1 updateRequest1Obj = new UpdateRequest1().setName(name).setUserData(userData); BinaryData updateRequest1 = BinaryData.fromObject(updateRequest1Obj); - return updateWithResponse(largeFaceListId, updateRequest1, requestOptions).flatMap(FluxUtil::toMono); + return updateWithResponse(updateRequest1, requestOptions).flatMap(FluxUtil::toMono); } /** * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/update-large-face-list for more * details. - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. - * @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. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -653,20 +622,20 @@ public Mono update(String largeFaceListId, String name, String userData) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono update(String largeFaceListId) { + public Mono update() { // Generated convenience method for updateWithResponse RequestOptions requestOptions = new RequestOptions(); UpdateRequest1 updateRequest1Obj = new UpdateRequest1(); BinaryData updateRequest1 = BinaryData.fromObject(updateRequest1Obj); - return updateWithResponse(largeFaceListId, updateRequest1, requestOptions).flatMap(FluxUtil::toMono); + return updateWithResponse(updateRequest1, requestOptions).flatMap(FluxUtil::toMono); } /** * List Large Face Lists' information of largeFaceListId, name, userData and recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-lists for more * details. - * + * * @param start List resources greater than the "start". It contains no more than 64 characters. Default is empty. * @param top The number of items to list, ranging in [1, 1000]. Default is 1000. * @param returnRecognitionModel Return 'recognitionModel' or not. The default value is false. @@ -698,10 +667,10 @@ public Mono> getLargeFaceLists(String start, Integer top, Bo /** * List Large Face Lists' information of largeFaceListId, name, userData and recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-lists for more * details. - * + * * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -722,9 +691,7 @@ public Mono> getLargeFaceLists() { * Please refer to * https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-list-training-status for more * details. - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. - * @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. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -734,21 +701,19 @@ public Mono> getLargeFaceLists() { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getTrainingStatus(String largeFaceListId) { + public Mono getTrainingStatus() { // Generated convenience method for getTrainingStatusWithResponse RequestOptions requestOptions = new RequestOptions(); - return getTrainingStatusWithResponse(largeFaceListId, requestOptions).flatMap(FluxUtil::toMono) + return getTrainingStatusWithResponse(requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(FaceTrainingResult.class)); } /** * Submit a Large Face List training task. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/train-large-face-list for more * details. - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. - * @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. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -758,19 +723,18 @@ public Mono getTrainingStatus(String largeFaceListId) { */ @Generated @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux beginTrain(String largeFaceListId) { + public PollerFlux beginTrain() { // Generated convenience method for beginTrainWithModel RequestOptions requestOptions = new RequestOptions(); - return serviceClient.beginTrainWithModelAsync(largeFaceListId, requestOptions); + return serviceClient.beginTrainWithModelAsync(requestOptions); } /** * Add a face to a specified Large Face List, up to 1,000,000 faces. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/add-large-face-list-face-from-url * for more details. - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @param url URL of input image. * @param targetFace A face rectangle to specify the target face to be added to a person, in the format of * 'targetFace=left,top,width,height'. @@ -787,8 +751,8 @@ public PollerFlux beginTrain(String largeFaceListId) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Mono addFaceFromUrlImpl(String largeFaceListId, String url, List targetFace, - FaceDetectionModel detectionModel, String userData) { + Mono addFaceFromUrlImpl(String url, List targetFace, FaceDetectionModel detectionModel, + String userData) { // Generated convenience method for addFaceFromUrlImplWithResponse RequestOptions requestOptions = new RequestOptions(); AddFaceFromUrlRequest1 addFaceFromUrlRequest1Obj = new AddFaceFromUrlRequest1(url); @@ -804,18 +768,16 @@ Mono addFaceFromUrlImpl(String largeFaceListId, String url, List< if (userData != null) { requestOptions.addQueryParam("userData", userData, false); } - return addFaceFromUrlImplWithResponse(largeFaceListId, addFaceFromUrlRequest1, requestOptions) - .flatMap(FluxUtil::toMono) + return addFaceFromUrlImplWithResponse(addFaceFromUrlRequest1, requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(AddFaceResult.class)); } /** * Add a face to a specified Large Face List, up to 1,000,000 faces. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/add-large-face-list-face-from-url * for more details. - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @param url URL of input image. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -827,23 +789,21 @@ Mono addFaceFromUrlImpl(String largeFaceListId, String url, List< */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Mono addFaceFromUrlImpl(String largeFaceListId, String url) { + Mono addFaceFromUrlImpl(String url) { // Generated convenience method for addFaceFromUrlImplWithResponse RequestOptions requestOptions = new RequestOptions(); AddFaceFromUrlRequest1 addFaceFromUrlRequest1Obj = new AddFaceFromUrlRequest1(url); BinaryData addFaceFromUrlRequest1 = BinaryData.fromObject(addFaceFromUrlRequest1Obj); - return addFaceFromUrlImplWithResponse(largeFaceListId, addFaceFromUrlRequest1, requestOptions) - .flatMap(FluxUtil::toMono) + return addFaceFromUrlImplWithResponse(addFaceFromUrlRequest1, requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(AddFaceResult.class)); } /** * Add a face to a specified Large Face List, up to 1,000,000 faces. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/add-large-face-list-face for more * details. - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @param imageContent The image to be analyzed. * @param targetFace A face rectangle to specify the target face to be added to a person, in the format of * 'targetFace=left,top,width,height'. @@ -860,7 +820,7 @@ Mono addFaceFromUrlImpl(String largeFaceListId, String url) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Mono addFaceImpl(String largeFaceListId, BinaryData imageContent, List targetFace, + Mono addFaceImpl(BinaryData imageContent, List targetFace, FaceDetectionModel detectionModel, String userData) { // Generated convenience method for addFaceImplWithResponse RequestOptions requestOptions = new RequestOptions(); @@ -875,17 +835,16 @@ Mono addFaceImpl(String largeFaceListId, BinaryData imageContent, if (userData != null) { requestOptions.addQueryParam("userData", userData, false); } - return addFaceImplWithResponse(largeFaceListId, imageContent, requestOptions).flatMap(FluxUtil::toMono) + return addFaceImplWithResponse(imageContent, requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(AddFaceResult.class)); } /** * Add a face to a specified Large Face List, up to 1,000,000 faces. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/add-large-face-list-face for more * details. - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @param imageContent The image to be analyzed. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -897,18 +856,17 @@ Mono addFaceImpl(String largeFaceListId, BinaryData imageContent, */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Mono addFaceImpl(String largeFaceListId, BinaryData imageContent) { + Mono addFaceImpl(BinaryData imageContent) { // Generated convenience method for addFaceImplWithResponse RequestOptions requestOptions = new RequestOptions(); - return addFaceImplWithResponse(largeFaceListId, imageContent, requestOptions).flatMap(FluxUtil::toMono) + return addFaceImplWithResponse(imageContent, requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(AddFaceResult.class)); } /** * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/delete-large-face-list-face for * more details. - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @param persistedFaceId Face ID of the face. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -920,17 +878,16 @@ Mono addFaceImpl(String largeFaceListId, BinaryData imageContent) */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteFace(String largeFaceListId, String persistedFaceId) { + public Mono deleteFace(String persistedFaceId) { // Generated convenience method for deleteFaceWithResponse RequestOptions requestOptions = new RequestOptions(); - return deleteFaceWithResponse(largeFaceListId, persistedFaceId, requestOptions).flatMap(FluxUtil::toMono); + return deleteFaceWithResponse(persistedFaceId, requestOptions).flatMap(FluxUtil::toMono); } /** * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-list-face for more * details. - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @param persistedFaceId Face ID of the face. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -942,18 +899,17 @@ public Mono deleteFace(String largeFaceListId, String persistedFaceId) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getFace(String largeFaceListId, String persistedFaceId) { + public Mono getFace(String persistedFaceId) { // Generated convenience method for getFaceWithResponse RequestOptions requestOptions = new RequestOptions(); - return getFaceWithResponse(largeFaceListId, persistedFaceId, requestOptions).flatMap(FluxUtil::toMono) + return getFaceWithResponse(persistedFaceId, requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(LargeFaceListFace.class)); } /** * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/update-large-face-list-face for * more details. - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @param persistedFaceId Face ID of the face. * @param userData User-provided data attached to the face. The length limit is 1K. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -966,20 +922,18 @@ public Mono getFace(String largeFaceListId, String persistedF */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateFace(String largeFaceListId, String persistedFaceId, String userData) { + public Mono updateFace(String persistedFaceId, String userData) { // Generated convenience method for updateFaceWithResponse RequestOptions requestOptions = new RequestOptions(); UpdateFaceRequest1 updateFaceRequest1Obj = new UpdateFaceRequest1().setUserData(userData); BinaryData updateFaceRequest1 = BinaryData.fromObject(updateFaceRequest1Obj); - return updateFaceWithResponse(largeFaceListId, persistedFaceId, updateFaceRequest1, requestOptions) - .flatMap(FluxUtil::toMono); + return updateFaceWithResponse(persistedFaceId, updateFaceRequest1, requestOptions).flatMap(FluxUtil::toMono); } /** * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/update-large-face-list-face for * more details. - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @param persistedFaceId Face ID of the face. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -991,22 +945,20 @@ public Mono updateFace(String largeFaceListId, String persistedFaceId, Str */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateFace(String largeFaceListId, String persistedFaceId) { + public Mono updateFace(String persistedFaceId) { // Generated convenience method for updateFaceWithResponse RequestOptions requestOptions = new RequestOptions(); UpdateFaceRequest1 updateFaceRequest1Obj = new UpdateFaceRequest1(); BinaryData updateFaceRequest1 = BinaryData.fromObject(updateFaceRequest1Obj); - return updateFaceWithResponse(largeFaceListId, persistedFaceId, updateFaceRequest1, requestOptions) - .flatMap(FluxUtil::toMono); + return updateFaceWithResponse(persistedFaceId, updateFaceRequest1, requestOptions).flatMap(FluxUtil::toMono); } /** * List faces' persistedFaceId and userData in a specified Large Face List. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-list-faces for more * details. - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @param start List resources greater than the "start". It contains no more than 64 characters. Default is empty. * @param top The number of items to list, ranging in [1, 1000]. Default is 1000. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1019,7 +971,7 @@ public Mono updateFace(String largeFaceListId, String persistedFaceId) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getFaces(String largeFaceListId, String start, Integer top) { + public Mono> getFaces(String start, Integer top) { // Generated convenience method for getFacesWithResponse RequestOptions requestOptions = new RequestOptions(); if (start != null) { @@ -1028,18 +980,16 @@ public Mono> getFaces(String largeFaceListId, String sta if (top != null) { requestOptions.addQueryParam("top", String.valueOf(top), false); } - return getFacesWithResponse(largeFaceListId, requestOptions).flatMap(FluxUtil::toMono) + return getFacesWithResponse(requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(TYPE_REFERENCE_LIST_LARGE_FACE_LIST_FACE)); } /** * List faces' persistedFaceId and userData in a specified Large Face List. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-list-faces for more * details. - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. - * @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. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -1049,10 +999,10 @@ public Mono> getFaces(String largeFaceListId, String sta */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getFaces(String largeFaceListId) { + public Mono> getFaces() { // Generated convenience method for getFacesWithResponse RequestOptions requestOptions = new RequestOptions(); - return getFacesWithResponse(largeFaceListId, requestOptions).flatMap(FluxUtil::toMono) + return getFacesWithResponse(requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(TYPE_REFERENCE_LIST_LARGE_FACE_LIST_FACE)); } diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/LargeFaceListClient.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/LargeFaceListClient.java similarity index 81% rename from sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/LargeFaceListClient.java rename to sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/LargeFaceListClient.java index 2ef761ba3de9..506d64147d5e 100644 --- a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/LargeFaceListClient.java +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/LargeFaceListClient.java @@ -1,7 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.ai.vision.face; + +package com.azure.ai.vision.face.administration; import com.azure.ai.vision.face.implementation.LargeFaceListsImpl; import com.azure.ai.vision.face.implementation.models.AddFaceFromUrlRequest1; @@ -36,13 +37,12 @@ */ @ServiceClient(builder = FaceAdministrationClientBuilder.class) public final class LargeFaceListClient { - @Generated private final LargeFaceListsImpl serviceClient; /** * Initializes an instance of LargeFaceListClient class. - * + * * @param serviceClient the service client implementation. */ @Generated @@ -53,7 +53,7 @@ public final class LargeFaceListClient { /** * Create an empty Large Face List with user-specified largeFaceListId, name, an optional userData and * recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/create-large-face-list for more * details. *

Request Body Schema

@@ -65,8 +65,7 @@ public final class LargeFaceListClient { * recognitionModel: String(recognition_01/recognition_02/recognition_03/recognition_04) (Optional) * } * } - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @param createRequest1 The createRequest1 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. @@ -77,18 +76,16 @@ public final class LargeFaceListClient { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse(String largeFaceListId, BinaryData createRequest1, - RequestOptions requestOptions) { - return this.serviceClient.createWithResponse(largeFaceListId, createRequest1, requestOptions); + public Response createWithResponse(BinaryData createRequest1, RequestOptions requestOptions) { + return this.serviceClient.createWithResponse(createRequest1, requestOptions); } /** * Delete a face from a Large Face List by specified largeFaceListId and persistedFaceId. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/delete-large-face-list for more * details. - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @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,8 +95,8 @@ public Response createWithResponse(String largeFaceListId, BinaryData crea */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String largeFaceListId, RequestOptions requestOptions) { - return this.serviceClient.deleteWithResponse(largeFaceListId, requestOptions); + public Response deleteWithResponse(RequestOptions requestOptions) { + return this.serviceClient.deleteWithResponse(requestOptions); } /** @@ -123,8 +120,7 @@ public Response deleteWithResponse(String largeFaceListId, RequestOptions * largeFaceListId: String (Required) * } * } - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @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. @@ -134,8 +130,8 @@ public Response deleteWithResponse(String largeFaceListId, RequestOptions */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String largeFaceListId, RequestOptions requestOptions) { - return this.serviceClient.getWithResponse(largeFaceListId, requestOptions); + public Response getWithResponse(RequestOptions requestOptions) { + return this.serviceClient.getWithResponse(requestOptions); } /** @@ -149,8 +145,7 @@ public Response getWithResponse(String largeFaceListId, RequestOptio * userData: String (Optional) * } * } - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @param updateRequest1 The updateRequest1 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. @@ -161,14 +156,13 @@ public Response getWithResponse(String largeFaceListId, RequestOptio */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String largeFaceListId, BinaryData updateRequest1, - RequestOptions requestOptions) { - return this.serviceClient.updateWithResponse(largeFaceListId, updateRequest1, requestOptions); + public Response updateWithResponse(BinaryData updateRequest1, RequestOptions requestOptions) { + return this.serviceClient.updateWithResponse(updateRequest1, requestOptions); } /** * List Large Face Lists' information of largeFaceListId, name, userData and recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-lists for more * details. *

Query Parameters

@@ -195,7 +189,7 @@ public Response updateWithResponse(String largeFaceListId, BinaryData upda * } * ] * } - * + * * @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. @@ -224,8 +218,7 @@ public Response getLargeFaceListsWithResponse(RequestOptions request * message: String (Optional) * } * } - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @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. @@ -235,17 +228,16 @@ public Response getLargeFaceListsWithResponse(RequestOptions request */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response getTrainingStatusWithResponse(String largeFaceListId, RequestOptions requestOptions) { - return this.serviceClient.getTrainingStatusWithResponse(largeFaceListId, requestOptions); + public Response getTrainingStatusWithResponse(RequestOptions requestOptions) { + return this.serviceClient.getTrainingStatusWithResponse(requestOptions); } /** * Submit a Large Face List training task. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/train-large-face-list for more * details. - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @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. @@ -255,13 +247,13 @@ public Response getTrainingStatusWithResponse(String largeFaceListId */ @Generated @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller beginTrain(String largeFaceListId, RequestOptions requestOptions) { - return this.serviceClient.beginTrain(largeFaceListId, requestOptions); + public SyncPoller beginTrain(RequestOptions requestOptions) { + return this.serviceClient.beginTrain(requestOptions); } /** * Add a face to a specified Large Face List, up to 1,000,000 faces. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/add-large-face-list-face-from-url * for more details. *

Query Parameters

@@ -293,8 +285,7 @@ public SyncPoller beginTrain(String largeFaceListId, Req * persistedFaceId: String (Required) * } * } - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @param addFaceFromUrlRequest1 The addFaceFromUrlRequest1 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. @@ -305,15 +296,14 @@ public SyncPoller beginTrain(String largeFaceListId, Req */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Response addFaceFromUrlImplWithResponse(String largeFaceListId, BinaryData addFaceFromUrlRequest1, + Response addFaceFromUrlImplWithResponse(BinaryData addFaceFromUrlRequest1, RequestOptions requestOptions) { - return this.serviceClient.addFaceFromUrlImplWithResponse(largeFaceListId, addFaceFromUrlRequest1, - requestOptions); + return this.serviceClient.addFaceFromUrlImplWithResponse(addFaceFromUrlRequest1, requestOptions); } /** * Add a face to a specified Large Face List, up to 1,000,000 faces. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/add-large-face-list-face for more * details. *

Query Parameters

@@ -343,8 +333,7 @@ Response addFaceFromUrlImplWithResponse(String largeFaceListId, Bina * persistedFaceId: String (Required) * } * } - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @param imageContent The image to be analyzed. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -355,16 +344,14 @@ Response addFaceFromUrlImplWithResponse(String largeFaceListId, Bina */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Response addFaceImplWithResponse(String largeFaceListId, BinaryData imageContent, - RequestOptions requestOptions) { - return this.serviceClient.addFaceImplWithResponse(largeFaceListId, imageContent, requestOptions); + Response addFaceImplWithResponse(BinaryData imageContent, RequestOptions requestOptions) { + return this.serviceClient.addFaceImplWithResponse(imageContent, requestOptions); } /** * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/delete-large-face-list-face for * more details. - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @param persistedFaceId Face ID of the face. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -375,9 +362,8 @@ Response addFaceImplWithResponse(String largeFaceListId, BinaryData */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteFaceWithResponse(String largeFaceListId, String persistedFaceId, - RequestOptions requestOptions) { - return this.serviceClient.deleteFaceWithResponse(largeFaceListId, persistedFaceId, requestOptions); + public Response deleteFaceWithResponse(String persistedFaceId, RequestOptions requestOptions) { + return this.serviceClient.deleteFaceWithResponse(persistedFaceId, requestOptions); } /** @@ -391,8 +377,7 @@ public Response deleteFaceWithResponse(String largeFaceListId, String pers * userData: String (Optional) * } * } - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @param persistedFaceId Face ID of the face. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -403,9 +388,8 @@ public Response deleteFaceWithResponse(String largeFaceListId, String pers */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response getFaceWithResponse(String largeFaceListId, String persistedFaceId, - RequestOptions requestOptions) { - return this.serviceClient.getFaceWithResponse(largeFaceListId, persistedFaceId, requestOptions); + public Response getFaceWithResponse(String persistedFaceId, RequestOptions requestOptions) { + return this.serviceClient.getFaceWithResponse(persistedFaceId, requestOptions); } /** @@ -418,8 +402,7 @@ public Response getFaceWithResponse(String largeFaceListId, String p * userData: String (Optional) * } * } - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @param persistedFaceId Face ID of the face. * @param updateFaceRequest1 The updateFaceRequest1 parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -431,15 +414,14 @@ public Response getFaceWithResponse(String largeFaceListId, String p */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateFaceWithResponse(String largeFaceListId, String persistedFaceId, - BinaryData updateFaceRequest1, RequestOptions requestOptions) { - return this.serviceClient.updateFaceWithResponse(largeFaceListId, persistedFaceId, updateFaceRequest1, - requestOptions); + public Response updateFaceWithResponse(String persistedFaceId, BinaryData updateFaceRequest1, + RequestOptions requestOptions) { + return this.serviceClient.updateFaceWithResponse(persistedFaceId, updateFaceRequest1, requestOptions); } /** * List faces' persistedFaceId and userData in a specified Large Face List. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-list-faces for more * details. *

Query Parameters

@@ -462,8 +444,7 @@ public Response updateFaceWithResponse(String largeFaceListId, String pers * } * ] * } - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @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,18 +454,17 @@ public Response updateFaceWithResponse(String largeFaceListId, String pers */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response getFacesWithResponse(String largeFaceListId, RequestOptions requestOptions) { - return this.serviceClient.getFacesWithResponse(largeFaceListId, requestOptions); + public Response getFacesWithResponse(RequestOptions requestOptions) { + return this.serviceClient.getFacesWithResponse(requestOptions); } /** * Create an empty Large Face List with user-specified largeFaceListId, name, an optional userData and * recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/create-large-face-list for more * details. - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @param name User defined name, maximum length is 128. * @param userData Optional user defined data. Length should not exceed 16K. * @param recognitionModel The 'recognitionModel' associated with this face list. Supported 'recognitionModel' @@ -500,23 +480,22 @@ public Response getFacesWithResponse(String largeFaceListId, Request */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public void create(String largeFaceListId, String name, String userData, FaceRecognitionModel recognitionModel) { + public void create(String name, String userData, FaceRecognitionModel recognitionModel) { // Generated convenience method for createWithResponse RequestOptions requestOptions = new RequestOptions(); CreateRequest1 createRequest1Obj = new CreateRequest1(name).setUserData(userData).setRecognitionModel(recognitionModel); BinaryData createRequest1 = BinaryData.fromObject(createRequest1Obj); - createWithResponse(largeFaceListId, createRequest1, requestOptions).getValue(); + createWithResponse(createRequest1, requestOptions).getValue(); } /** * Create an empty Large Face List with user-specified largeFaceListId, name, an optional userData and * recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/create-large-face-list for more * details. - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @param name User defined name, maximum length is 128. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -527,22 +506,20 @@ public void create(String largeFaceListId, String name, String userData, FaceRec */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public void create(String largeFaceListId, String name) { + public void create(String name) { // Generated convenience method for createWithResponse RequestOptions requestOptions = new RequestOptions(); CreateRequest1 createRequest1Obj = new CreateRequest1(name); BinaryData createRequest1 = BinaryData.fromObject(createRequest1Obj); - createWithResponse(largeFaceListId, createRequest1, requestOptions).getValue(); + createWithResponse(createRequest1, requestOptions).getValue(); } /** * Delete a face from a Large Face List by specified largeFaceListId and persistedFaceId. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/delete-large-face-list for more * details. - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. - * @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. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -551,17 +528,16 @@ public void create(String largeFaceListId, String name) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String largeFaceListId) { + public void delete() { // Generated convenience method for deleteWithResponse RequestOptions requestOptions = new RequestOptions(); - deleteWithResponse(largeFaceListId, requestOptions).getValue(); + deleteWithResponse(requestOptions).getValue(); } /** * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-list for more * details. - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @param returnRecognitionModel Return 'recognitionModel' or not. The default value is false. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -573,21 +549,19 @@ public void delete(String largeFaceListId) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public LargeFaceList get(String largeFaceListId, Boolean returnRecognitionModel) { + public LargeFaceList get(Boolean returnRecognitionModel) { // Generated convenience method for getWithResponse RequestOptions requestOptions = new RequestOptions(); if (returnRecognitionModel != null) { requestOptions.addQueryParam("returnRecognitionModel", String.valueOf(returnRecognitionModel), false); } - return getWithResponse(largeFaceListId, requestOptions).getValue().toObject(LargeFaceList.class); + return getWithResponse(requestOptions).getValue().toObject(LargeFaceList.class); } /** * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-list for more * details. - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. - * @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. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -597,17 +571,16 @@ public LargeFaceList get(String largeFaceListId, Boolean returnRecognitionModel) */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public LargeFaceList get(String largeFaceListId) { + public LargeFaceList get() { // Generated convenience method for getWithResponse RequestOptions requestOptions = new RequestOptions(); - return getWithResponse(largeFaceListId, requestOptions).getValue().toObject(LargeFaceList.class); + return getWithResponse(requestOptions).getValue().toObject(LargeFaceList.class); } /** * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/update-large-face-list for more * details. - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @param name User defined name, maximum length is 128. * @param userData Optional user defined data. Length should not exceed 16K. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -619,20 +592,18 @@ public LargeFaceList get(String largeFaceListId) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public void update(String largeFaceListId, String name, String userData) { + public void update(String name, String userData) { // Generated convenience method for updateWithResponse RequestOptions requestOptions = new RequestOptions(); UpdateRequest1 updateRequest1Obj = new UpdateRequest1().setName(name).setUserData(userData); BinaryData updateRequest1 = BinaryData.fromObject(updateRequest1Obj); - updateWithResponse(largeFaceListId, updateRequest1, requestOptions).getValue(); + updateWithResponse(updateRequest1, requestOptions).getValue(); } /** * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/update-large-face-list for more * details. - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. - * @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. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -641,20 +612,20 @@ public void update(String largeFaceListId, String name, String userData) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public void update(String largeFaceListId) { + public void update() { // Generated convenience method for updateWithResponse RequestOptions requestOptions = new RequestOptions(); UpdateRequest1 updateRequest1Obj = new UpdateRequest1(); BinaryData updateRequest1 = BinaryData.fromObject(updateRequest1Obj); - updateWithResponse(largeFaceListId, updateRequest1, requestOptions).getValue(); + updateWithResponse(updateRequest1, requestOptions).getValue(); } /** * List Large Face Lists' information of largeFaceListId, name, userData and recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-lists for more * details. - * + * * @param start List resources greater than the "start". It contains no more than 64 characters. Default is empty. * @param top The number of items to list, ranging in [1, 1000]. Default is 1000. * @param returnRecognitionModel Return 'recognitionModel' or not. The default value is false. @@ -685,10 +656,10 @@ public List getLargeFaceLists(String start, Integer top, Boolean /** * List Large Face Lists' information of largeFaceListId, name, userData and recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-lists for more * details. - * + * * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -708,9 +679,7 @@ public List getLargeFaceLists() { * Please refer to * https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-list-training-status for more * details. - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. - * @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. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -720,21 +689,18 @@ public List getLargeFaceLists() { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public FaceTrainingResult getTrainingStatus(String largeFaceListId) { + public FaceTrainingResult getTrainingStatus() { // Generated convenience method for getTrainingStatusWithResponse RequestOptions requestOptions = new RequestOptions(); - return getTrainingStatusWithResponse(largeFaceListId, requestOptions).getValue() - .toObject(FaceTrainingResult.class); + return getTrainingStatusWithResponse(requestOptions).getValue().toObject(FaceTrainingResult.class); } /** * Submit a Large Face List training task. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/train-large-face-list for more * details. - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. - * @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. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -744,19 +710,18 @@ public FaceTrainingResult getTrainingStatus(String largeFaceListId) { */ @Generated @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller beginTrain(String largeFaceListId) { + public SyncPoller beginTrain() { // Generated convenience method for beginTrainWithModel RequestOptions requestOptions = new RequestOptions(); - return serviceClient.beginTrainWithModel(largeFaceListId, requestOptions); + return serviceClient.beginTrainWithModel(requestOptions); } /** * Add a face to a specified Large Face List, up to 1,000,000 faces. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/add-large-face-list-face-from-url * for more details. - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @param url URL of input image. * @param targetFace A face rectangle to specify the target face to be added to a person, in the format of * 'targetFace=left,top,width,height'. @@ -773,8 +738,8 @@ public SyncPoller beginTrain(String largeFaceListId) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - AddFaceResult addFaceFromUrlImpl(String largeFaceListId, String url, List targetFace, - FaceDetectionModel detectionModel, String userData) { + AddFaceResult addFaceFromUrlImpl(String url, List targetFace, FaceDetectionModel detectionModel, + String userData) { // Generated convenience method for addFaceFromUrlImplWithResponse RequestOptions requestOptions = new RequestOptions(); AddFaceFromUrlRequest1 addFaceFromUrlRequest1Obj = new AddFaceFromUrlRequest1(url); @@ -790,17 +755,16 @@ AddFaceResult addFaceFromUrlImpl(String largeFaceListId, String url, List targetFace, - FaceDetectionModel detectionModel, String userData) { + AddFaceResult addFaceImpl(BinaryData imageContent, List targetFace, FaceDetectionModel detectionModel, + String userData) { // Generated convenience method for addFaceImplWithResponse RequestOptions requestOptions = new RequestOptions(); if (targetFace != null) { @@ -859,17 +822,15 @@ AddFaceResult addFaceImpl(String largeFaceListId, BinaryData imageContent, List< if (userData != null) { requestOptions.addQueryParam("userData", userData, false); } - return addFaceImplWithResponse(largeFaceListId, imageContent, requestOptions).getValue() - .toObject(AddFaceResult.class); + return addFaceImplWithResponse(imageContent, requestOptions).getValue().toObject(AddFaceResult.class); } /** * Add a face to a specified Large Face List, up to 1,000,000 faces. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/add-large-face-list-face for more * details. - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @param imageContent The image to be analyzed. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -881,18 +842,16 @@ AddFaceResult addFaceImpl(String largeFaceListId, BinaryData imageContent, List< */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - AddFaceResult addFaceImpl(String largeFaceListId, BinaryData imageContent) { + AddFaceResult addFaceImpl(BinaryData imageContent) { // Generated convenience method for addFaceImplWithResponse RequestOptions requestOptions = new RequestOptions(); - return addFaceImplWithResponse(largeFaceListId, imageContent, requestOptions).getValue() - .toObject(AddFaceResult.class); + return addFaceImplWithResponse(imageContent, requestOptions).getValue().toObject(AddFaceResult.class); } /** * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/delete-large-face-list-face for * more details. - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @param persistedFaceId Face ID of the face. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -903,17 +862,16 @@ AddFaceResult addFaceImpl(String largeFaceListId, BinaryData imageContent) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteFace(String largeFaceListId, String persistedFaceId) { + public void deleteFace(String persistedFaceId) { // Generated convenience method for deleteFaceWithResponse RequestOptions requestOptions = new RequestOptions(); - deleteFaceWithResponse(largeFaceListId, persistedFaceId, requestOptions).getValue(); + deleteFaceWithResponse(persistedFaceId, requestOptions).getValue(); } /** * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-list-face for more * details. - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @param persistedFaceId Face ID of the face. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -925,18 +883,16 @@ public void deleteFace(String largeFaceListId, String persistedFaceId) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public LargeFaceListFace getFace(String largeFaceListId, String persistedFaceId) { + public LargeFaceListFace getFace(String persistedFaceId) { // Generated convenience method for getFaceWithResponse RequestOptions requestOptions = new RequestOptions(); - return getFaceWithResponse(largeFaceListId, persistedFaceId, requestOptions).getValue() - .toObject(LargeFaceListFace.class); + return getFaceWithResponse(persistedFaceId, requestOptions).getValue().toObject(LargeFaceListFace.class); } /** * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/update-large-face-list-face for * more details. - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @param persistedFaceId Face ID of the face. * @param userData User-provided data attached to the face. The length limit is 1K. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -948,19 +904,18 @@ public LargeFaceListFace getFace(String largeFaceListId, String persistedFaceId) */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public void updateFace(String largeFaceListId, String persistedFaceId, String userData) { + public void updateFace(String persistedFaceId, String userData) { // Generated convenience method for updateFaceWithResponse RequestOptions requestOptions = new RequestOptions(); UpdateFaceRequest1 updateFaceRequest1Obj = new UpdateFaceRequest1().setUserData(userData); BinaryData updateFaceRequest1 = BinaryData.fromObject(updateFaceRequest1Obj); - updateFaceWithResponse(largeFaceListId, persistedFaceId, updateFaceRequest1, requestOptions).getValue(); + updateFaceWithResponse(persistedFaceId, updateFaceRequest1, requestOptions).getValue(); } /** * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/update-large-face-list-face for * more details. - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @param persistedFaceId Face ID of the face. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -971,21 +926,20 @@ public void updateFace(String largeFaceListId, String persistedFaceId, String us */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public void updateFace(String largeFaceListId, String persistedFaceId) { + public void updateFace(String persistedFaceId) { // Generated convenience method for updateFaceWithResponse RequestOptions requestOptions = new RequestOptions(); UpdateFaceRequest1 updateFaceRequest1Obj = new UpdateFaceRequest1(); BinaryData updateFaceRequest1 = BinaryData.fromObject(updateFaceRequest1Obj); - updateFaceWithResponse(largeFaceListId, persistedFaceId, updateFaceRequest1, requestOptions).getValue(); + updateFaceWithResponse(persistedFaceId, updateFaceRequest1, requestOptions).getValue(); } /** * List faces' persistedFaceId and userData in a specified Large Face List. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-list-faces for more * details. - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * * @param start List resources greater than the "start". It contains no more than 64 characters. Default is empty. * @param top The number of items to list, ranging in [1, 1000]. Default is 1000. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -998,7 +952,7 @@ public void updateFace(String largeFaceListId, String persistedFaceId) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public List getFaces(String largeFaceListId, String start, Integer top) { + public List getFaces(String start, Integer top) { // Generated convenience method for getFacesWithResponse RequestOptions requestOptions = new RequestOptions(); if (start != null) { @@ -1007,18 +961,15 @@ public List getFaces(String largeFaceListId, String start, In if (top != null) { requestOptions.addQueryParam("top", String.valueOf(top), false); } - return getFacesWithResponse(largeFaceListId, requestOptions).getValue() - .toObject(TYPE_REFERENCE_LIST_LARGE_FACE_LIST_FACE); + return getFacesWithResponse(requestOptions).getValue().toObject(TYPE_REFERENCE_LIST_LARGE_FACE_LIST_FACE); } /** * List faces' persistedFaceId and userData in a specified Large Face List. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-list-faces for more * details. - * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. - * @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. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -1028,11 +979,10 @@ public List getFaces(String largeFaceListId, String start, In */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public List getFaces(String largeFaceListId) { + public List getFaces() { // Generated convenience method for getFacesWithResponse RequestOptions requestOptions = new RequestOptions(); - return getFacesWithResponse(largeFaceListId, requestOptions).getValue() - .toObject(TYPE_REFERENCE_LIST_LARGE_FACE_LIST_FACE); + return getFacesWithResponse(requestOptions).getValue().toObject(TYPE_REFERENCE_LIST_LARGE_FACE_LIST_FACE); } @Generated diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/LargePersonGroupAsyncClient.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/LargePersonGroupAsyncClient.java similarity index 84% rename from sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/LargePersonGroupAsyncClient.java rename to sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/LargePersonGroupAsyncClient.java index 3e7b21db1285..c49401944f3a 100644 --- a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/LargePersonGroupAsyncClient.java +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/LargePersonGroupAsyncClient.java @@ -1,7 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.ai.vision.face; + +package com.azure.ai.vision.face.administration; import com.azure.ai.vision.face.implementation.LargePersonGroupsImpl; import com.azure.ai.vision.face.implementation.models.AddFaceFromUrlRequest; @@ -42,13 +43,12 @@ */ @ServiceClient(builder = FaceAdministrationClientBuilder.class, isAsync = true) public final class LargePersonGroupAsyncClient { - @Generated private final LargePersonGroupsImpl serviceClient; /** * Initializes an instance of LargePersonGroupAsyncClient class. - * + * * @param serviceClient the service client implementation. */ @Generated @@ -59,7 +59,7 @@ public final class LargePersonGroupAsyncClient { /** * Create a new Large Person Group with user-specified largePersonGroupId, name, an optional userData and * recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/create-large-person-group for * more details. *

Request Body Schema

@@ -71,8 +71,7 @@ public final class LargePersonGroupAsyncClient { * recognitionModel: String(recognition_01/recognition_02/recognition_03/recognition_04) (Optional) * } * } - * - * @param largePersonGroupId ID of the container. + * * @param createRequest The createRequest 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. @@ -83,16 +82,14 @@ public final class LargePersonGroupAsyncClient { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createWithResponse(String largePersonGroupId, BinaryData createRequest, - RequestOptions requestOptions) { - return this.serviceClient.createWithResponseAsync(largePersonGroupId, createRequest, requestOptions); + public Mono> createWithResponse(BinaryData createRequest, RequestOptions requestOptions) { + return this.serviceClient.createWithResponseAsync(createRequest, requestOptions); } /** * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/delete-large-person-group for * more details. - * - * @param largePersonGroupId ID of the container. + * * @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. @@ -102,8 +99,8 @@ public Mono> createWithResponse(String largePersonGroupId, Binary */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponse(String largePersonGroupId, RequestOptions requestOptions) { - return this.serviceClient.deleteWithResponseAsync(largePersonGroupId, requestOptions); + public Mono> deleteWithResponse(RequestOptions requestOptions) { + return this.serviceClient.deleteWithResponseAsync(requestOptions); } /** @@ -127,8 +124,7 @@ public Mono> deleteWithResponse(String largePersonGroupId, Reques * largePersonGroupId: String (Required) * } * } - * - * @param largePersonGroupId ID of the container. + * * @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. @@ -139,8 +135,8 @@ public Mono> deleteWithResponse(String largePersonGroupId, Reques */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponse(String largePersonGroupId, RequestOptions requestOptions) { - return this.serviceClient.getWithResponseAsync(largePersonGroupId, requestOptions); + public Mono> getWithResponse(RequestOptions requestOptions) { + return this.serviceClient.getWithResponseAsync(requestOptions); } /** @@ -154,8 +150,7 @@ public Mono> getWithResponse(String largePersonGroupId, Req * userData: String (Optional) * } * } - * - * @param largePersonGroupId ID of the container. + * * @param updateRequest The updateRequest 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. @@ -166,14 +161,13 @@ public Mono> getWithResponse(String largePersonGroupId, Req */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponse(String largePersonGroupId, BinaryData updateRequest, - RequestOptions requestOptions) { - return this.serviceClient.updateWithResponseAsync(largePersonGroupId, updateRequest, requestOptions); + public Mono> updateWithResponse(BinaryData updateRequest, RequestOptions requestOptions) { + return this.serviceClient.updateWithResponseAsync(updateRequest, requestOptions); } /** * List all existing Large Person Groups' largePersonGroupId, name, userData and recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-groups for * more details. *

Query Parameters

@@ -200,7 +194,7 @@ public Mono> updateWithResponse(String largePersonGroupId, Binary * } * ] * } - * + * * @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. @@ -217,7 +211,7 @@ public Mono> getLargePersonGroupsWithResponse(RequestOption /** * To check Large Person Group training status completed or still ongoing. Large Person Group training is an * asynchronous operation triggered by "Train Large Person Group" API. - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group-training-status for more * details. @@ -232,8 +226,7 @@ public Mono> getLargePersonGroupsWithResponse(RequestOption * message: String (Optional) * } * } - * - * @param largePersonGroupId ID of the container. + * * @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. @@ -243,19 +236,17 @@ public Mono> getLargePersonGroupsWithResponse(RequestOption */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getTrainingStatusWithResponse(String largePersonGroupId, - RequestOptions requestOptions) { - return this.serviceClient.getTrainingStatusWithResponseAsync(largePersonGroupId, requestOptions); + public Mono> getTrainingStatusWithResponse(RequestOptions requestOptions) { + return this.serviceClient.getTrainingStatusWithResponseAsync(requestOptions); } /** * Submit a Large Person Group training task. Training is a crucial step that only a trained Large Person Group can * be used by "Identify From Large Person Group". - * + * * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/train-large-person-group for * more details. - * - * @param largePersonGroupId ID of the container. + * * @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. @@ -265,14 +256,14 @@ public Mono> getTrainingStatusWithResponse(String largePers */ @Generated @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux beginTrain(String largePersonGroupId, RequestOptions requestOptions) { - return this.serviceClient.beginTrainAsync(largePersonGroupId, requestOptions); + public PollerFlux beginTrain(RequestOptions requestOptions) { + return this.serviceClient.beginTrainAsync(requestOptions); } /** * Create a new person in a specified Large Person Group. To add face to this person, please call "Add Large Person * Group Person Face". - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/create-large-person-group-person for more * details. @@ -292,8 +283,7 @@ public PollerFlux beginTrain(String largePersonGroupId, * personId: String (Required) * } * } - * - * @param largePersonGroupId ID of the container. + * * @param createPersonRequest The createPersonRequest 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. @@ -304,18 +294,16 @@ public PollerFlux beginTrain(String largePersonGroupId, */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createPersonWithResponse(String largePersonGroupId, - BinaryData createPersonRequest, RequestOptions requestOptions) { - return this.serviceClient.createPersonWithResponseAsync(largePersonGroupId, createPersonRequest, - requestOptions); + public Mono> createPersonWithResponse(BinaryData createPersonRequest, + RequestOptions requestOptions) { + return this.serviceClient.createPersonWithResponseAsync(createPersonRequest, requestOptions); } /** * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/delete-large-person-group-person for more * details. - * - * @param largePersonGroupId ID of the container. + * * @param personId ID of the person. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -326,9 +314,8 @@ public Mono> createPersonWithResponse(String largePersonGro */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deletePersonWithResponse(String largePersonGroupId, String personId, - RequestOptions requestOptions) { - return this.serviceClient.deletePersonWithResponseAsync(largePersonGroupId, personId, requestOptions); + public Mono> deletePersonWithResponse(String personId, RequestOptions requestOptions) { + return this.serviceClient.deletePersonWithResponseAsync(personId, requestOptions); } /** @@ -346,8 +333,7 @@ public Mono> deletePersonWithResponse(String largePersonGroupId, * ] * } * } - * - * @param largePersonGroupId ID of the container. + * * @param personId ID of the person. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -359,9 +345,8 @@ public Mono> deletePersonWithResponse(String largePersonGroupId, */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getPersonWithResponse(String largePersonGroupId, String personId, - RequestOptions requestOptions) { - return this.serviceClient.getPersonWithResponseAsync(largePersonGroupId, personId, requestOptions); + public Mono> getPersonWithResponse(String personId, RequestOptions requestOptions) { + return this.serviceClient.getPersonWithResponseAsync(personId, requestOptions); } /** @@ -376,8 +361,7 @@ public Mono> getPersonWithResponse(String largePersonGroupI * userData: String (Optional) * } * } - * - * @param largePersonGroupId ID of the container. + * * @param personId ID of the person. * @param updatePersonRequest The updatePersonRequest parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -389,16 +373,15 @@ public Mono> getPersonWithResponse(String largePersonGroupI */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updatePersonWithResponse(String largePersonGroupId, String personId, - BinaryData updatePersonRequest, RequestOptions requestOptions) { - return this.serviceClient.updatePersonWithResponseAsync(largePersonGroupId, personId, updatePersonRequest, - requestOptions); + public Mono> updatePersonWithResponse(String personId, BinaryData updatePersonRequest, + RequestOptions requestOptions) { + return this.serviceClient.updatePersonWithResponseAsync(personId, updatePersonRequest, requestOptions); } /** * List all persons' information in the specified Large Person Group, including personId, name, userData and * persistedFaceIds of registered person faces. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group-persons * for more details. *

Query Parameters

@@ -425,8 +408,7 @@ public Mono> updatePersonWithResponse(String largePersonGroupId, * } * ] * } - * - * @param largePersonGroupId ID of the container. + * * @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. @@ -436,13 +418,13 @@ public Mono> updatePersonWithResponse(String largePersonGroupId, */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getPersonsWithResponse(String largePersonGroupId, RequestOptions requestOptions) { - return this.serviceClient.getPersonsWithResponseAsync(largePersonGroupId, requestOptions); + public Mono> getPersonsWithResponse(RequestOptions requestOptions) { + return this.serviceClient.getPersonsWithResponseAsync(requestOptions); } /** * Add a face to a person into a Large Person Group for face identification or verification. - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/add-large-person-group-person-face-from-url for * more details. @@ -475,8 +457,7 @@ public Mono> getPersonsWithResponse(String largePersonGroup * persistedFaceId: String (Required) * } * } - * - * @param largePersonGroupId ID of the container. + * * @param personId ID of the person. * @param addFaceFromUrlRequest The addFaceFromUrlRequest parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -488,15 +469,14 @@ public Mono> getPersonsWithResponse(String largePersonGroup */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Mono> addFaceFromUrlImplWithResponse(String largePersonGroupId, String personId, - BinaryData addFaceFromUrlRequest, RequestOptions requestOptions) { - return this.serviceClient.addFaceFromUrlImplWithResponseAsync(largePersonGroupId, personId, - addFaceFromUrlRequest, requestOptions); + Mono> addFaceFromUrlImplWithResponse(String personId, BinaryData addFaceFromUrlRequest, + RequestOptions requestOptions) { + return this.serviceClient.addFaceFromUrlImplWithResponseAsync(personId, addFaceFromUrlRequest, requestOptions); } /** * Add a face to a person into a Large Person Group for face identification or verification. - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/add-large-person-group-person-face for more * details. @@ -527,8 +507,7 @@ Mono> addFaceFromUrlImplWithResponse(String largePersonGrou * persistedFaceId: String (Required) * } * } - * - * @param largePersonGroupId ID of the container. + * * @param personId ID of the person. * @param imageContent The image to be analyzed. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -540,21 +519,19 @@ Mono> addFaceFromUrlImplWithResponse(String largePersonGrou */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Mono> addFaceImplWithResponse(String largePersonGroupId, String personId, - BinaryData imageContent, RequestOptions requestOptions) { - return this.serviceClient.addFaceImplWithResponseAsync(largePersonGroupId, personId, imageContent, - requestOptions); + Mono> addFaceImplWithResponse(String personId, BinaryData imageContent, + RequestOptions requestOptions) { + return this.serviceClient.addFaceImplWithResponseAsync(personId, imageContent, requestOptions); } /** * Delete a face from a person in a Large Person Group by specified largePersonGroupId, personId and * persistedFaceId. - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/delete-large-person-group-person-face for more * details. - * - * @param largePersonGroupId ID of the container. + * * @param personId ID of the person. * @param persistedFaceId Face ID of the face. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -566,10 +543,9 @@ Mono> addFaceImplWithResponse(String largePersonGroupId, St */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteFaceWithResponse(String largePersonGroupId, String personId, - String persistedFaceId, RequestOptions requestOptions) { - return this.serviceClient.deleteFaceWithResponseAsync(largePersonGroupId, personId, persistedFaceId, - requestOptions); + public Mono> deleteFaceWithResponse(String personId, String persistedFaceId, + RequestOptions requestOptions) { + return this.serviceClient.deleteFaceWithResponseAsync(personId, persistedFaceId, requestOptions); } /** @@ -584,8 +560,7 @@ public Mono> deleteFaceWithResponse(String largePersonGroupId, St * userData: String (Optional) * } * } - * - * @param largePersonGroupId ID of the container. + * * @param personId ID of the person. * @param persistedFaceId Face ID of the face. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -598,10 +573,9 @@ public Mono> deleteFaceWithResponse(String largePersonGroupId, St */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getFaceWithResponse(String largePersonGroupId, String personId, - String persistedFaceId, RequestOptions requestOptions) { - return this.serviceClient.getFaceWithResponseAsync(largePersonGroupId, personId, persistedFaceId, - requestOptions); + public Mono> getFaceWithResponse(String personId, String persistedFaceId, + RequestOptions requestOptions) { + return this.serviceClient.getFaceWithResponseAsync(personId, persistedFaceId, requestOptions); } /** @@ -615,8 +589,7 @@ public Mono> getFaceWithResponse(String largePersonGroupId, * userData: String (Optional) * } * } - * - * @param largePersonGroupId ID of the container. + * * @param personId ID of the person. * @param persistedFaceId Face ID of the face. * @param updateFaceRequest The updateFaceRequest parameter. @@ -629,20 +602,19 @@ public Mono> getFaceWithResponse(String largePersonGroupId, */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateFaceWithResponse(String largePersonGroupId, String personId, - String persistedFaceId, BinaryData updateFaceRequest, RequestOptions requestOptions) { - return this.serviceClient.updateFaceWithResponseAsync(largePersonGroupId, personId, persistedFaceId, - updateFaceRequest, requestOptions); + public Mono> updateFaceWithResponse(String personId, String persistedFaceId, + BinaryData updateFaceRequest, RequestOptions requestOptions) { + return this.serviceClient.updateFaceWithResponseAsync(personId, persistedFaceId, updateFaceRequest, + requestOptions); } /** * Create a new Large Person Group with user-specified largePersonGroupId, name, an optional userData and * recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/create-large-person-group for * more details. - * - * @param largePersonGroupId ID of the container. + * * @param name User defined name, maximum length is 128. * @param userData Optional user defined data. Length should not exceed 16K. * @param recognitionModel The 'recognitionModel' associated with this face list. Supported 'recognitionModel' @@ -659,24 +631,22 @@ public Mono> updateFaceWithResponse(String largePersonGroupId, St */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono create(String largePersonGroupId, String name, String userData, - FaceRecognitionModel recognitionModel) { + public Mono create(String name, String userData, FaceRecognitionModel recognitionModel) { // Generated convenience method for createWithResponse RequestOptions requestOptions = new RequestOptions(); CreateRequest createRequestObj = new CreateRequest(name).setUserData(userData).setRecognitionModel(recognitionModel); BinaryData createRequest = BinaryData.fromObject(createRequestObj); - return createWithResponse(largePersonGroupId, createRequest, requestOptions).flatMap(FluxUtil::toMono); + return createWithResponse(createRequest, requestOptions).flatMap(FluxUtil::toMono); } /** * Create a new Large Person Group with user-specified largePersonGroupId, name, an optional userData and * recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/create-large-person-group for * more details. - * - * @param largePersonGroupId ID of the container. + * * @param name User defined name, maximum length is 128. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -688,20 +658,18 @@ public Mono create(String largePersonGroupId, String name, String userData */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono create(String largePersonGroupId, String name) { + public Mono create(String name) { // Generated convenience method for createWithResponse RequestOptions requestOptions = new RequestOptions(); CreateRequest createRequestObj = new CreateRequest(name); BinaryData createRequest = BinaryData.fromObject(createRequestObj); - return createWithResponse(largePersonGroupId, createRequest, requestOptions).flatMap(FluxUtil::toMono); + return createWithResponse(createRequest, requestOptions).flatMap(FluxUtil::toMono); } /** * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/delete-large-person-group for * more details. - * - * @param largePersonGroupId ID of the container. - * @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. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -711,17 +679,16 @@ public Mono create(String largePersonGroupId, String name) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono delete(String largePersonGroupId) { + public Mono delete() { // Generated convenience method for deleteWithResponse RequestOptions requestOptions = new RequestOptions(); - return deleteWithResponse(largePersonGroupId, requestOptions).flatMap(FluxUtil::toMono); + return deleteWithResponse(requestOptions).flatMap(FluxUtil::toMono); } /** * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group for more * details. - * - * @param largePersonGroupId ID of the container. + * * @param returnRecognitionModel Return 'recognitionModel' or not. The default value is false. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -734,22 +701,20 @@ public Mono delete(String largePersonGroupId) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono get(String largePersonGroupId, Boolean returnRecognitionModel) { + public Mono get(Boolean returnRecognitionModel) { // Generated convenience method for getWithResponse RequestOptions requestOptions = new RequestOptions(); if (returnRecognitionModel != null) { requestOptions.addQueryParam("returnRecognitionModel", String.valueOf(returnRecognitionModel), false); } - return getWithResponse(largePersonGroupId, requestOptions).flatMap(FluxUtil::toMono) + return getWithResponse(requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(LargePersonGroup.class)); } /** * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group for more * details. - * - * @param largePersonGroupId ID of the container. - * @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. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -760,18 +725,17 @@ public Mono get(String largePersonGroupId, Boolean returnRecog */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono get(String largePersonGroupId) { + public Mono get() { // Generated convenience method for getWithResponse RequestOptions requestOptions = new RequestOptions(); - return getWithResponse(largePersonGroupId, requestOptions).flatMap(FluxUtil::toMono) + return getWithResponse(requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(LargePersonGroup.class)); } /** * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/update-large-person-group for * more details. - * - * @param largePersonGroupId ID of the container. + * * @param name User defined name, maximum length is 128. * @param userData Optional user defined data. Length should not exceed 16K. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -784,20 +748,18 @@ public Mono get(String largePersonGroupId) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono update(String largePersonGroupId, String name, String userData) { + public Mono update(String name, String userData) { // Generated convenience method for updateWithResponse RequestOptions requestOptions = new RequestOptions(); UpdateRequest updateRequestObj = new UpdateRequest().setName(name).setUserData(userData); BinaryData updateRequest = BinaryData.fromObject(updateRequestObj); - return updateWithResponse(largePersonGroupId, updateRequest, requestOptions).flatMap(FluxUtil::toMono); + return updateWithResponse(updateRequest, requestOptions).flatMap(FluxUtil::toMono); } /** * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/update-large-person-group for * more details. - * - * @param largePersonGroupId ID of the container. - * @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. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -807,20 +769,20 @@ public Mono update(String largePersonGroupId, String name, String userData */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono update(String largePersonGroupId) { + public Mono update() { // Generated convenience method for updateWithResponse RequestOptions requestOptions = new RequestOptions(); UpdateRequest updateRequestObj = new UpdateRequest(); BinaryData updateRequest = BinaryData.fromObject(updateRequestObj); - return updateWithResponse(largePersonGroupId, updateRequest, requestOptions).flatMap(FluxUtil::toMono); + return updateWithResponse(updateRequest, requestOptions).flatMap(FluxUtil::toMono); } /** * List all existing Large Person Groups' largePersonGroupId, name, userData and recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-groups for * more details. - * + * * @param start List resources greater than the "start". It contains no more than 64 characters. Default is empty. * @param top The number of items to list, ranging in [1, 1000]. Default is 1000. * @param returnRecognitionModel Return 'recognitionModel' or not. The default value is false. @@ -853,10 +815,10 @@ public Mono> getLargePersonGroups(String start, Integer t /** * List all existing Large Person Groups' largePersonGroupId, name, userData and recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-groups for * more details. - * + * * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -876,13 +838,11 @@ public Mono> getLargePersonGroups() { /** * To check Large Person Group training status completed or still ongoing. Large Person Group training is an * asynchronous operation triggered by "Train Large Person Group" API. - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group-training-status for more * details. - * - * @param largePersonGroupId ID of the container. - * @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. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -892,22 +852,20 @@ public Mono> getLargePersonGroups() { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getTrainingStatus(String largePersonGroupId) { + public Mono getTrainingStatus() { // Generated convenience method for getTrainingStatusWithResponse RequestOptions requestOptions = new RequestOptions(); - return getTrainingStatusWithResponse(largePersonGroupId, requestOptions).flatMap(FluxUtil::toMono) + return getTrainingStatusWithResponse(requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(FaceTrainingResult.class)); } /** * Submit a Large Person Group training task. Training is a crucial step that only a trained Large Person Group can * be used by "Identify From Large Person Group". - * + * * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/train-large-person-group for * more details. - * - * @param largePersonGroupId ID of the container. - * @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. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -917,21 +875,20 @@ public Mono getTrainingStatus(String largePersonGroupId) { */ @Generated @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux beginTrain(String largePersonGroupId) { + public PollerFlux beginTrain() { // Generated convenience method for beginTrainWithModel RequestOptions requestOptions = new RequestOptions(); - return serviceClient.beginTrainWithModelAsync(largePersonGroupId, requestOptions); + return serviceClient.beginTrainWithModelAsync(requestOptions); } /** * Create a new person in a specified Large Person Group. To add face to this person, please call "Add Large Person * Group Person Face". - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/create-large-person-group-person for more * details. - * - * @param largePersonGroupId ID of the container. + * * @param name User defined name, maximum length is 128. * @param userData Optional user defined data. Length should not exceed 16K. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -944,25 +901,23 @@ public PollerFlux beginTrain(String largePersonGroupId */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createPerson(String largePersonGroupId, String name, String userData) { + public Mono createPerson(String name, String userData) { // Generated convenience method for createPersonWithResponse RequestOptions requestOptions = new RequestOptions(); CreatePersonRequest createPersonRequestObj = new CreatePersonRequest(name).setUserData(userData); BinaryData createPersonRequest = BinaryData.fromObject(createPersonRequestObj); - return createPersonWithResponse(largePersonGroupId, createPersonRequest, requestOptions) - .flatMap(FluxUtil::toMono) + return createPersonWithResponse(createPersonRequest, requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(CreatePersonResult.class)); } /** * Create a new person in a specified Large Person Group. To add face to this person, please call "Add Large Person * Group Person Face". - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/create-large-person-group-person for more * details. - * - * @param largePersonGroupId ID of the container. + * * @param name User defined name, maximum length is 128. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -974,13 +929,12 @@ public Mono createPerson(String largePersonGroupId, String n */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createPerson(String largePersonGroupId, String name) { + public Mono createPerson(String name) { // Generated convenience method for createPersonWithResponse RequestOptions requestOptions = new RequestOptions(); CreatePersonRequest createPersonRequestObj = new CreatePersonRequest(name); BinaryData createPersonRequest = BinaryData.fromObject(createPersonRequestObj); - return createPersonWithResponse(largePersonGroupId, createPersonRequest, requestOptions) - .flatMap(FluxUtil::toMono) + return createPersonWithResponse(createPersonRequest, requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(CreatePersonResult.class)); } @@ -988,8 +942,7 @@ public Mono createPerson(String largePersonGroupId, String n * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/delete-large-person-group-person for more * details. - * - * @param largePersonGroupId ID of the container. + * * @param personId ID of the person. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -1001,17 +954,16 @@ public Mono createPerson(String largePersonGroupId, String n */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deletePerson(String largePersonGroupId, String personId) { + public Mono deletePerson(String personId) { // Generated convenience method for deletePersonWithResponse RequestOptions requestOptions = new RequestOptions(); - return deletePersonWithResponse(largePersonGroupId, personId, requestOptions).flatMap(FluxUtil::toMono); + return deletePersonWithResponse(personId, requestOptions).flatMap(FluxUtil::toMono); } /** * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group-person * for more details. - * - * @param largePersonGroupId ID of the container. + * * @param personId ID of the person. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -1023,10 +975,10 @@ public Mono deletePerson(String largePersonGroupId, String personId) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getPerson(String largePersonGroupId, String personId) { + public Mono getPerson(String personId) { // Generated convenience method for getPersonWithResponse RequestOptions requestOptions = new RequestOptions(); - return getPersonWithResponse(largePersonGroupId, personId, requestOptions).flatMap(FluxUtil::toMono) + return getPersonWithResponse(personId, requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(LargePersonGroupPerson.class)); } @@ -1034,8 +986,7 @@ public Mono getPerson(String largePersonGroupId, String * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/update-large-person-group-person for more * details. - * - * @param largePersonGroupId ID of the container. + * * @param personId ID of the person. * @param name User defined name, maximum length is 128. * @param userData Optional user defined data. Length should not exceed 16K. @@ -1049,21 +1000,19 @@ public Mono getPerson(String largePersonGroupId, String */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updatePerson(String largePersonGroupId, String personId, String name, String userData) { + public Mono updatePerson(String personId, String name, String userData) { // Generated convenience method for updatePersonWithResponse RequestOptions requestOptions = new RequestOptions(); UpdatePersonRequest updatePersonRequestObj = new UpdatePersonRequest().setName(name).setUserData(userData); BinaryData updatePersonRequest = BinaryData.fromObject(updatePersonRequestObj); - return updatePersonWithResponse(largePersonGroupId, personId, updatePersonRequest, requestOptions) - .flatMap(FluxUtil::toMono); + return updatePersonWithResponse(personId, updatePersonRequest, requestOptions).flatMap(FluxUtil::toMono); } /** * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/update-large-person-group-person for more * details. - * - * @param largePersonGroupId ID of the container. + * * @param personId ID of the person. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -1075,23 +1024,21 @@ public Mono updatePerson(String largePersonGroupId, String personId, Strin */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updatePerson(String largePersonGroupId, String personId) { + public Mono updatePerson(String personId) { // Generated convenience method for updatePersonWithResponse RequestOptions requestOptions = new RequestOptions(); UpdatePersonRequest updatePersonRequestObj = new UpdatePersonRequest(); BinaryData updatePersonRequest = BinaryData.fromObject(updatePersonRequestObj); - return updatePersonWithResponse(largePersonGroupId, personId, updatePersonRequest, requestOptions) - .flatMap(FluxUtil::toMono); + return updatePersonWithResponse(personId, updatePersonRequest, requestOptions).flatMap(FluxUtil::toMono); } /** * List all persons' information in the specified Large Person Group, including personId, name, userData and * persistedFaceIds of registered person faces. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group-persons * for more details. - * - * @param largePersonGroupId ID of the container. + * * @param start List resources greater than the "start". It contains no more than 64 characters. Default is empty. * @param top The number of items to list, ranging in [1, 1000]. Default is 1000. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1104,7 +1051,7 @@ public Mono updatePerson(String largePersonGroupId, String personId) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getPersons(String largePersonGroupId, String start, Integer top) { + public Mono> getPersons(String start, Integer top) { // Generated convenience method for getPersonsWithResponse RequestOptions requestOptions = new RequestOptions(); if (start != null) { @@ -1113,19 +1060,17 @@ public Mono> getPersons(String largePersonGroupId, if (top != null) { requestOptions.addQueryParam("top", String.valueOf(top), false); } - return getPersonsWithResponse(largePersonGroupId, requestOptions).flatMap(FluxUtil::toMono) + return getPersonsWithResponse(requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(TYPE_REFERENCE_LIST_LARGE_PERSON_GROUP_PERSON)); } /** * List all persons' information in the specified Large Person Group, including personId, name, userData and * persistedFaceIds of registered person faces. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group-persons * for more details. - * - * @param largePersonGroupId ID of the container. - * @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. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -1135,21 +1080,20 @@ public Mono> getPersons(String largePersonGroupId, */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getPersons(String largePersonGroupId) { + public Mono> getPersons() { // Generated convenience method for getPersonsWithResponse RequestOptions requestOptions = new RequestOptions(); - return getPersonsWithResponse(largePersonGroupId, requestOptions).flatMap(FluxUtil::toMono) + return getPersonsWithResponse(requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(TYPE_REFERENCE_LIST_LARGE_PERSON_GROUP_PERSON)); } /** * Add a face to a person into a Large Person Group for face identification or verification. - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/add-large-person-group-person-face-from-url for * more details. - * - * @param largePersonGroupId ID of the container. + * * @param personId ID of the person. * @param url URL of input image. * @param targetFace A face rectangle to specify the target face to be added to a person, in the format of @@ -1167,8 +1111,8 @@ public Mono> getPersons(String largePersonGroupId) */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Mono addFaceFromUrlImpl(String largePersonGroupId, String personId, String url, - List targetFace, FaceDetectionModel detectionModel, String userData) { + Mono addFaceFromUrlImpl(String personId, String url, List targetFace, + FaceDetectionModel detectionModel, String userData) { // Generated convenience method for addFaceFromUrlImplWithResponse RequestOptions requestOptions = new RequestOptions(); AddFaceFromUrlRequest addFaceFromUrlRequestObj = new AddFaceFromUrlRequest(url); @@ -1184,19 +1128,17 @@ Mono addFaceFromUrlImpl(String largePersonGroupId, String personI if (userData != null) { requestOptions.addQueryParam("userData", userData, false); } - return addFaceFromUrlImplWithResponse(largePersonGroupId, personId, addFaceFromUrlRequest, requestOptions) - .flatMap(FluxUtil::toMono) + return addFaceFromUrlImplWithResponse(personId, addFaceFromUrlRequest, requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(AddFaceResult.class)); } /** * Add a face to a person into a Large Person Group for face identification or verification. - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/add-large-person-group-person-face-from-url for * more details. - * - * @param largePersonGroupId ID of the container. + * * @param personId ID of the person. * @param url URL of input image. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1209,24 +1151,22 @@ Mono addFaceFromUrlImpl(String largePersonGroupId, String personI */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Mono addFaceFromUrlImpl(String largePersonGroupId, String personId, String url) { + Mono addFaceFromUrlImpl(String personId, String url) { // Generated convenience method for addFaceFromUrlImplWithResponse RequestOptions requestOptions = new RequestOptions(); AddFaceFromUrlRequest addFaceFromUrlRequestObj = new AddFaceFromUrlRequest(url); BinaryData addFaceFromUrlRequest = BinaryData.fromObject(addFaceFromUrlRequestObj); - return addFaceFromUrlImplWithResponse(largePersonGroupId, personId, addFaceFromUrlRequest, requestOptions) - .flatMap(FluxUtil::toMono) + return addFaceFromUrlImplWithResponse(personId, addFaceFromUrlRequest, requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(AddFaceResult.class)); } /** * Add a face to a person into a Large Person Group for face identification or verification. - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/add-large-person-group-person-face for more * details. - * - * @param largePersonGroupId ID of the container. + * * @param personId ID of the person. * @param imageContent The image to be analyzed. * @param targetFace A face rectangle to specify the target face to be added to a person, in the format of @@ -1244,8 +1184,8 @@ Mono addFaceFromUrlImpl(String largePersonGroupId, String personI */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Mono addFaceImpl(String largePersonGroupId, String personId, BinaryData imageContent, - List targetFace, FaceDetectionModel detectionModel, String userData) { + Mono addFaceImpl(String personId, BinaryData imageContent, List targetFace, + FaceDetectionModel detectionModel, String userData) { // Generated convenience method for addFaceImplWithResponse RequestOptions requestOptions = new RequestOptions(); if (targetFace != null) { @@ -1259,19 +1199,17 @@ Mono addFaceImpl(String largePersonGroupId, String personId, Bina if (userData != null) { requestOptions.addQueryParam("userData", userData, false); } - return addFaceImplWithResponse(largePersonGroupId, personId, imageContent, requestOptions) - .flatMap(FluxUtil::toMono) + return addFaceImplWithResponse(personId, imageContent, requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(AddFaceResult.class)); } /** * Add a face to a person into a Large Person Group for face identification or verification. - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/add-large-person-group-person-face for more * details. - * - * @param largePersonGroupId ID of the container. + * * @param personId ID of the person. * @param imageContent The image to be analyzed. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1284,23 +1222,21 @@ Mono addFaceImpl(String largePersonGroupId, String personId, Bina */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Mono addFaceImpl(String largePersonGroupId, String personId, BinaryData imageContent) { + Mono addFaceImpl(String personId, BinaryData imageContent) { // Generated convenience method for addFaceImplWithResponse RequestOptions requestOptions = new RequestOptions(); - return addFaceImplWithResponse(largePersonGroupId, personId, imageContent, requestOptions) - .flatMap(FluxUtil::toMono) + return addFaceImplWithResponse(personId, imageContent, requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(AddFaceResult.class)); } /** * Delete a face from a person in a Large Person Group by specified largePersonGroupId, personId and * persistedFaceId. - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/delete-large-person-group-person-face for more * details. - * - * @param largePersonGroupId ID of the container. + * * @param personId ID of the person. * @param persistedFaceId Face ID of the face. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1313,19 +1249,17 @@ Mono addFaceImpl(String largePersonGroupId, String personId, Bina */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteFace(String largePersonGroupId, String personId, String persistedFaceId) { + public Mono deleteFace(String personId, String persistedFaceId) { // Generated convenience method for deleteFaceWithResponse RequestOptions requestOptions = new RequestOptions(); - return deleteFaceWithResponse(largePersonGroupId, personId, persistedFaceId, requestOptions) - .flatMap(FluxUtil::toMono); + return deleteFaceWithResponse(personId, persistedFaceId, requestOptions).flatMap(FluxUtil::toMono); } /** * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group-person-face for more * details. - * - * @param largePersonGroupId ID of the container. + * * @param personId ID of the person. * @param persistedFaceId Face ID of the face. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1338,12 +1272,10 @@ public Mono deleteFace(String largePersonGroupId, String personId, String */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getFace(String largePersonGroupId, String personId, - String persistedFaceId) { + public Mono getFace(String personId, String persistedFaceId) { // Generated convenience method for getFaceWithResponse RequestOptions requestOptions = new RequestOptions(); - return getFaceWithResponse(largePersonGroupId, personId, persistedFaceId, requestOptions) - .flatMap(FluxUtil::toMono) + return getFaceWithResponse(personId, persistedFaceId, requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(LargePersonGroupPersonFace.class)); } @@ -1351,8 +1283,7 @@ public Mono getFace(String largePersonGroupId, Strin * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/update-large-person-group-person-face for more * details. - * - * @param largePersonGroupId ID of the container. + * * @param personId ID of the person. * @param persistedFaceId Face ID of the face. * @param userData User-provided data attached to the face. The length limit is 1K. @@ -1366,12 +1297,12 @@ public Mono getFace(String largePersonGroupId, Strin */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateFace(String largePersonGroupId, String personId, String persistedFaceId, String userData) { + public Mono updateFace(String personId, String persistedFaceId, String userData) { // Generated convenience method for updateFaceWithResponse RequestOptions requestOptions = new RequestOptions(); UpdateFaceRequest updateFaceRequestObj = new UpdateFaceRequest().setUserData(userData); BinaryData updateFaceRequest = BinaryData.fromObject(updateFaceRequestObj); - return updateFaceWithResponse(largePersonGroupId, personId, persistedFaceId, updateFaceRequest, requestOptions) + return updateFaceWithResponse(personId, persistedFaceId, updateFaceRequest, requestOptions) .flatMap(FluxUtil::toMono); } @@ -1379,8 +1310,7 @@ public Mono updateFace(String largePersonGroupId, String personId, String * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/update-large-person-group-person-face for more * details. - * - * @param largePersonGroupId ID of the container. + * * @param personId ID of the person. * @param persistedFaceId Face ID of the face. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1393,12 +1323,12 @@ public Mono updateFace(String largePersonGroupId, String personId, String */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateFace(String largePersonGroupId, String personId, String persistedFaceId) { + public Mono updateFace(String personId, String persistedFaceId) { // Generated convenience method for updateFaceWithResponse RequestOptions requestOptions = new RequestOptions(); UpdateFaceRequest updateFaceRequestObj = new UpdateFaceRequest(); BinaryData updateFaceRequest = BinaryData.fromObject(updateFaceRequestObj); - return updateFaceWithResponse(largePersonGroupId, personId, persistedFaceId, updateFaceRequest, requestOptions) + return updateFaceWithResponse(personId, persistedFaceId, updateFaceRequest, requestOptions) .flatMap(FluxUtil::toMono); } diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/LargePersonGroupClient.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/LargePersonGroupClient.java similarity index 84% rename from sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/LargePersonGroupClient.java rename to sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/LargePersonGroupClient.java index 675def62bc88..67044da957af 100644 --- a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/LargePersonGroupClient.java +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/LargePersonGroupClient.java @@ -1,7 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.ai.vision.face; + +package com.azure.ai.vision.face.administration; import com.azure.ai.vision.face.implementation.LargePersonGroupsImpl; import com.azure.ai.vision.face.implementation.models.AddFaceFromUrlRequest; @@ -40,13 +41,12 @@ */ @ServiceClient(builder = FaceAdministrationClientBuilder.class) public final class LargePersonGroupClient { - @Generated private final LargePersonGroupsImpl serviceClient; /** * Initializes an instance of LargePersonGroupClient class. - * + * * @param serviceClient the service client implementation. */ @Generated @@ -57,7 +57,7 @@ public final class LargePersonGroupClient { /** * Create a new Large Person Group with user-specified largePersonGroupId, name, an optional userData and * recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/create-large-person-group for * more details. *

Request Body Schema

@@ -69,8 +69,7 @@ public final class LargePersonGroupClient { * recognitionModel: String(recognition_01/recognition_02/recognition_03/recognition_04) (Optional) * } * } - * - * @param largePersonGroupId ID of the container. + * * @param createRequest The createRequest 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. @@ -81,16 +80,14 @@ public final class LargePersonGroupClient { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse(String largePersonGroupId, BinaryData createRequest, - RequestOptions requestOptions) { - return this.serviceClient.createWithResponse(largePersonGroupId, createRequest, requestOptions); + public Response createWithResponse(BinaryData createRequest, RequestOptions requestOptions) { + return this.serviceClient.createWithResponse(createRequest, requestOptions); } /** * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/delete-large-person-group for * more details. - * - * @param largePersonGroupId ID of the container. + * * @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. @@ -100,8 +97,8 @@ public Response createWithResponse(String largePersonGroupId, BinaryData c */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String largePersonGroupId, RequestOptions requestOptions) { - return this.serviceClient.deleteWithResponse(largePersonGroupId, requestOptions); + public Response deleteWithResponse(RequestOptions requestOptions) { + return this.serviceClient.deleteWithResponse(requestOptions); } /** @@ -125,8 +122,7 @@ public Response deleteWithResponse(String largePersonGroupId, RequestOptio * largePersonGroupId: String (Required) * } * } - * - * @param largePersonGroupId ID of the container. + * * @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. @@ -137,8 +133,8 @@ public Response deleteWithResponse(String largePersonGroupId, RequestOptio */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String largePersonGroupId, RequestOptions requestOptions) { - return this.serviceClient.getWithResponse(largePersonGroupId, requestOptions); + public Response getWithResponse(RequestOptions requestOptions) { + return this.serviceClient.getWithResponse(requestOptions); } /** @@ -152,8 +148,7 @@ public Response getWithResponse(String largePersonGroupId, RequestOp * userData: String (Optional) * } * } - * - * @param largePersonGroupId ID of the container. + * * @param updateRequest The updateRequest 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. @@ -164,14 +159,13 @@ public Response getWithResponse(String largePersonGroupId, RequestOp */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String largePersonGroupId, BinaryData updateRequest, - RequestOptions requestOptions) { - return this.serviceClient.updateWithResponse(largePersonGroupId, updateRequest, requestOptions); + public Response updateWithResponse(BinaryData updateRequest, RequestOptions requestOptions) { + return this.serviceClient.updateWithResponse(updateRequest, requestOptions); } /** * List all existing Large Person Groups' largePersonGroupId, name, userData and recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-groups for * more details. *

Query Parameters

@@ -198,7 +192,7 @@ public Response updateWithResponse(String largePersonGroupId, BinaryData u * } * ] * } - * + * * @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. @@ -215,7 +209,7 @@ public Response getLargePersonGroupsWithResponse(RequestOptions requ /** * To check Large Person Group training status completed or still ongoing. Large Person Group training is an * asynchronous operation triggered by "Train Large Person Group" API. - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group-training-status for more * details. @@ -230,8 +224,7 @@ public Response getLargePersonGroupsWithResponse(RequestOptions requ * message: String (Optional) * } * } - * - * @param largePersonGroupId ID of the container. + * * @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. @@ -241,19 +234,17 @@ public Response getLargePersonGroupsWithResponse(RequestOptions requ */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response getTrainingStatusWithResponse(String largePersonGroupId, - RequestOptions requestOptions) { - return this.serviceClient.getTrainingStatusWithResponse(largePersonGroupId, requestOptions); + public Response getTrainingStatusWithResponse(RequestOptions requestOptions) { + return this.serviceClient.getTrainingStatusWithResponse(requestOptions); } /** * Submit a Large Person Group training task. Training is a crucial step that only a trained Large Person Group can * be used by "Identify From Large Person Group". - * + * * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/train-large-person-group for * more details. - * - * @param largePersonGroupId ID of the container. + * * @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. @@ -263,14 +254,14 @@ public Response getTrainingStatusWithResponse(String largePersonGrou */ @Generated @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller beginTrain(String largePersonGroupId, RequestOptions requestOptions) { - return this.serviceClient.beginTrain(largePersonGroupId, requestOptions); + public SyncPoller beginTrain(RequestOptions requestOptions) { + return this.serviceClient.beginTrain(requestOptions); } /** * Create a new person in a specified Large Person Group. To add face to this person, please call "Add Large Person * Group Person Face". - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/create-large-person-group-person for more * details. @@ -290,8 +281,7 @@ public SyncPoller beginTrain(String largePersonGroupId, * personId: String (Required) * } * } - * - * @param largePersonGroupId ID of the container. + * * @param createPersonRequest The createPersonRequest 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. @@ -302,17 +292,16 @@ public SyncPoller beginTrain(String largePersonGroupId, */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response createPersonWithResponse(String largePersonGroupId, BinaryData createPersonRequest, + public Response createPersonWithResponse(BinaryData createPersonRequest, RequestOptions requestOptions) { - return this.serviceClient.createPersonWithResponse(largePersonGroupId, createPersonRequest, requestOptions); + return this.serviceClient.createPersonWithResponse(createPersonRequest, requestOptions); } /** * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/delete-large-person-group-person for more * details. - * - * @param largePersonGroupId ID of the container. + * * @param personId ID of the person. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -323,9 +312,8 @@ public Response createPersonWithResponse(String largePersonGroupId, */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response deletePersonWithResponse(String largePersonGroupId, String personId, - RequestOptions requestOptions) { - return this.serviceClient.deletePersonWithResponse(largePersonGroupId, personId, requestOptions); + public Response deletePersonWithResponse(String personId, RequestOptions requestOptions) { + return this.serviceClient.deletePersonWithResponse(personId, requestOptions); } /** @@ -343,8 +331,7 @@ public Response deletePersonWithResponse(String largePersonGroupId, String * ] * } * } - * - * @param largePersonGroupId ID of the container. + * * @param personId ID of the person. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -355,9 +342,8 @@ public Response deletePersonWithResponse(String largePersonGroupId, String */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response getPersonWithResponse(String largePersonGroupId, String personId, - RequestOptions requestOptions) { - return this.serviceClient.getPersonWithResponse(largePersonGroupId, personId, requestOptions); + public Response getPersonWithResponse(String personId, RequestOptions requestOptions) { + return this.serviceClient.getPersonWithResponse(personId, requestOptions); } /** @@ -372,8 +358,7 @@ public Response getPersonWithResponse(String largePersonGroupId, Str * userData: String (Optional) * } * } - * - * @param largePersonGroupId ID of the container. + * * @param personId ID of the person. * @param updatePersonRequest The updatePersonRequest parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -385,16 +370,15 @@ public Response getPersonWithResponse(String largePersonGroupId, Str */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response updatePersonWithResponse(String largePersonGroupId, String personId, - BinaryData updatePersonRequest, RequestOptions requestOptions) { - return this.serviceClient.updatePersonWithResponse(largePersonGroupId, personId, updatePersonRequest, - requestOptions); + public Response updatePersonWithResponse(String personId, BinaryData updatePersonRequest, + RequestOptions requestOptions) { + return this.serviceClient.updatePersonWithResponse(personId, updatePersonRequest, requestOptions); } /** * List all persons' information in the specified Large Person Group, including personId, name, userData and * persistedFaceIds of registered person faces. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group-persons * for more details. *

Query Parameters

@@ -421,8 +405,7 @@ public Response updatePersonWithResponse(String largePersonGroupId, String * } * ] * } - * - * @param largePersonGroupId ID of the container. + * * @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. @@ -432,13 +415,13 @@ public Response updatePersonWithResponse(String largePersonGroupId, String */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response getPersonsWithResponse(String largePersonGroupId, RequestOptions requestOptions) { - return this.serviceClient.getPersonsWithResponse(largePersonGroupId, requestOptions); + public Response getPersonsWithResponse(RequestOptions requestOptions) { + return this.serviceClient.getPersonsWithResponse(requestOptions); } /** * Add a face to a person into a Large Person Group for face identification or verification. - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/add-large-person-group-person-face-from-url for * more details. @@ -471,8 +454,7 @@ public Response getPersonsWithResponse(String largePersonGroupId, Re * persistedFaceId: String (Required) * } * } - * - * @param largePersonGroupId ID of the container. + * * @param personId ID of the person. * @param addFaceFromUrlRequest The addFaceFromUrlRequest parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -484,15 +466,14 @@ public Response getPersonsWithResponse(String largePersonGroupId, Re */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Response addFaceFromUrlImplWithResponse(String largePersonGroupId, String personId, - BinaryData addFaceFromUrlRequest, RequestOptions requestOptions) { - return this.serviceClient.addFaceFromUrlImplWithResponse(largePersonGroupId, personId, addFaceFromUrlRequest, - requestOptions); + Response addFaceFromUrlImplWithResponse(String personId, BinaryData addFaceFromUrlRequest, + RequestOptions requestOptions) { + return this.serviceClient.addFaceFromUrlImplWithResponse(personId, addFaceFromUrlRequest, requestOptions); } /** * Add a face to a person into a Large Person Group for face identification or verification. - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/add-large-person-group-person-face for more * details. @@ -523,8 +504,7 @@ Response addFaceFromUrlImplWithResponse(String largePersonGroupId, S * persistedFaceId: String (Required) * } * } - * - * @param largePersonGroupId ID of the container. + * * @param personId ID of the person. * @param imageContent The image to be analyzed. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -536,20 +516,19 @@ Response addFaceFromUrlImplWithResponse(String largePersonGroupId, S */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Response addFaceImplWithResponse(String largePersonGroupId, String personId, BinaryData imageContent, + Response addFaceImplWithResponse(String personId, BinaryData imageContent, RequestOptions requestOptions) { - return this.serviceClient.addFaceImplWithResponse(largePersonGroupId, personId, imageContent, requestOptions); + return this.serviceClient.addFaceImplWithResponse(personId, imageContent, requestOptions); } /** * Delete a face from a person in a Large Person Group by specified largePersonGroupId, personId and * persistedFaceId. - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/delete-large-person-group-person-face for more * details. - * - * @param largePersonGroupId ID of the container. + * * @param personId ID of the person. * @param persistedFaceId Face ID of the face. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -561,9 +540,9 @@ Response addFaceImplWithResponse(String largePersonGroupId, String p */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteFaceWithResponse(String largePersonGroupId, String personId, String persistedFaceId, + public Response deleteFaceWithResponse(String personId, String persistedFaceId, RequestOptions requestOptions) { - return this.serviceClient.deleteFaceWithResponse(largePersonGroupId, personId, persistedFaceId, requestOptions); + return this.serviceClient.deleteFaceWithResponse(personId, persistedFaceId, requestOptions); } /** @@ -578,8 +557,7 @@ public Response deleteFaceWithResponse(String largePersonGroupId, String p * userData: String (Optional) * } * } - * - * @param largePersonGroupId ID of the container. + * * @param personId ID of the person. * @param persistedFaceId Face ID of the face. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -591,9 +569,9 @@ public Response deleteFaceWithResponse(String largePersonGroupId, String p */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response getFaceWithResponse(String largePersonGroupId, String personId, String persistedFaceId, + public Response getFaceWithResponse(String personId, String persistedFaceId, RequestOptions requestOptions) { - return this.serviceClient.getFaceWithResponse(largePersonGroupId, personId, persistedFaceId, requestOptions); + return this.serviceClient.getFaceWithResponse(personId, persistedFaceId, requestOptions); } /** @@ -607,8 +585,7 @@ public Response getFaceWithResponse(String largePersonGroupId, Strin * userData: String (Optional) * } * } - * - * @param largePersonGroupId ID of the container. + * * @param personId ID of the person. * @param persistedFaceId Face ID of the face. * @param updateFaceRequest The updateFaceRequest parameter. @@ -621,20 +598,18 @@ public Response getFaceWithResponse(String largePersonGroupId, Strin */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateFaceWithResponse(String largePersonGroupId, String personId, String persistedFaceId, - BinaryData updateFaceRequest, RequestOptions requestOptions) { - return this.serviceClient.updateFaceWithResponse(largePersonGroupId, personId, persistedFaceId, - updateFaceRequest, requestOptions); + public Response updateFaceWithResponse(String personId, String persistedFaceId, BinaryData updateFaceRequest, + RequestOptions requestOptions) { + return this.serviceClient.updateFaceWithResponse(personId, persistedFaceId, updateFaceRequest, requestOptions); } /** * Create a new Large Person Group with user-specified largePersonGroupId, name, an optional userData and * recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/create-large-person-group for * more details. - * - * @param largePersonGroupId ID of the container. + * * @param name User defined name, maximum length is 128. * @param userData Optional user defined data. Length should not exceed 16K. * @param recognitionModel The 'recognitionModel' associated with this face list. Supported 'recognitionModel' @@ -650,23 +625,22 @@ public Response updateFaceWithResponse(String largePersonGroupId, String p */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public void create(String largePersonGroupId, String name, String userData, FaceRecognitionModel recognitionModel) { + public void create(String name, String userData, FaceRecognitionModel recognitionModel) { // Generated convenience method for createWithResponse RequestOptions requestOptions = new RequestOptions(); CreateRequest createRequestObj = new CreateRequest(name).setUserData(userData).setRecognitionModel(recognitionModel); BinaryData createRequest = BinaryData.fromObject(createRequestObj); - createWithResponse(largePersonGroupId, createRequest, requestOptions).getValue(); + createWithResponse(createRequest, requestOptions).getValue(); } /** * Create a new Large Person Group with user-specified largePersonGroupId, name, an optional userData and * recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/create-large-person-group for * more details. - * - * @param largePersonGroupId ID of the container. + * * @param name User defined name, maximum length is 128. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -677,20 +651,18 @@ public void create(String largePersonGroupId, String name, String userData, Face */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public void create(String largePersonGroupId, String name) { + public void create(String name) { // Generated convenience method for createWithResponse RequestOptions requestOptions = new RequestOptions(); CreateRequest createRequestObj = new CreateRequest(name); BinaryData createRequest = BinaryData.fromObject(createRequestObj); - createWithResponse(largePersonGroupId, createRequest, requestOptions).getValue(); + createWithResponse(createRequest, requestOptions).getValue(); } /** * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/delete-large-person-group for * more details. - * - * @param largePersonGroupId ID of the container. - * @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. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -699,17 +671,16 @@ public void create(String largePersonGroupId, String name) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String largePersonGroupId) { + public void delete() { // Generated convenience method for deleteWithResponse RequestOptions requestOptions = new RequestOptions(); - deleteWithResponse(largePersonGroupId, requestOptions).getValue(); + deleteWithResponse(requestOptions).getValue(); } /** * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group for more * details. - * - * @param largePersonGroupId ID of the container. + * * @param returnRecognitionModel Return 'recognitionModel' or not. The default value is false. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -722,21 +693,19 @@ public void delete(String largePersonGroupId) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public LargePersonGroup get(String largePersonGroupId, Boolean returnRecognitionModel) { + public LargePersonGroup get(Boolean returnRecognitionModel) { // Generated convenience method for getWithResponse RequestOptions requestOptions = new RequestOptions(); if (returnRecognitionModel != null) { requestOptions.addQueryParam("returnRecognitionModel", String.valueOf(returnRecognitionModel), false); } - return getWithResponse(largePersonGroupId, requestOptions).getValue().toObject(LargePersonGroup.class); + return getWithResponse(requestOptions).getValue().toObject(LargePersonGroup.class); } /** * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group for more * details. - * - * @param largePersonGroupId ID of the container. - * @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. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -747,17 +716,16 @@ public LargePersonGroup get(String largePersonGroupId, Boolean returnRecognition */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public LargePersonGroup get(String largePersonGroupId) { + public LargePersonGroup get() { // Generated convenience method for getWithResponse RequestOptions requestOptions = new RequestOptions(); - return getWithResponse(largePersonGroupId, requestOptions).getValue().toObject(LargePersonGroup.class); + return getWithResponse(requestOptions).getValue().toObject(LargePersonGroup.class); } /** * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/update-large-person-group for * more details. - * - * @param largePersonGroupId ID of the container. + * * @param name User defined name, maximum length is 128. * @param userData Optional user defined data. Length should not exceed 16K. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -769,20 +737,18 @@ public LargePersonGroup get(String largePersonGroupId) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public void update(String largePersonGroupId, String name, String userData) { + public void update(String name, String userData) { // Generated convenience method for updateWithResponse RequestOptions requestOptions = new RequestOptions(); UpdateRequest updateRequestObj = new UpdateRequest().setName(name).setUserData(userData); BinaryData updateRequest = BinaryData.fromObject(updateRequestObj); - updateWithResponse(largePersonGroupId, updateRequest, requestOptions).getValue(); + updateWithResponse(updateRequest, requestOptions).getValue(); } /** * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/update-large-person-group for * more details. - * - * @param largePersonGroupId ID of the container. - * @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. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -791,20 +757,20 @@ public void update(String largePersonGroupId, String name, String userData) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public void update(String largePersonGroupId) { + public void update() { // Generated convenience method for updateWithResponse RequestOptions requestOptions = new RequestOptions(); UpdateRequest updateRequestObj = new UpdateRequest(); BinaryData updateRequest = BinaryData.fromObject(updateRequestObj); - updateWithResponse(largePersonGroupId, updateRequest, requestOptions).getValue(); + updateWithResponse(updateRequest, requestOptions).getValue(); } /** * List all existing Large Person Groups' largePersonGroupId, name, userData and recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-groups for * more details. - * + * * @param start List resources greater than the "start". It contains no more than 64 characters. Default is empty. * @param top The number of items to list, ranging in [1, 1000]. Default is 1000. * @param returnRecognitionModel Return 'recognitionModel' or not. The default value is false. @@ -836,10 +802,10 @@ public List getLargePersonGroups(String start, Integer top, Bo /** * List all existing Large Person Groups' largePersonGroupId, name, userData and recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-groups for * more details. - * + * * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -859,13 +825,11 @@ public List getLargePersonGroups() { /** * To check Large Person Group training status completed or still ongoing. Large Person Group training is an * asynchronous operation triggered by "Train Large Person Group" API. - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group-training-status for more * details. - * - * @param largePersonGroupId ID of the container. - * @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. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -875,22 +839,19 @@ public List getLargePersonGroups() { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public FaceTrainingResult getTrainingStatus(String largePersonGroupId) { + public FaceTrainingResult getTrainingStatus() { // Generated convenience method for getTrainingStatusWithResponse RequestOptions requestOptions = new RequestOptions(); - return getTrainingStatusWithResponse(largePersonGroupId, requestOptions).getValue() - .toObject(FaceTrainingResult.class); + return getTrainingStatusWithResponse(requestOptions).getValue().toObject(FaceTrainingResult.class); } /** * Submit a Large Person Group training task. Training is a crucial step that only a trained Large Person Group can * be used by "Identify From Large Person Group". - * + * * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/train-large-person-group for * more details. - * - * @param largePersonGroupId ID of the container. - * @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. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -900,21 +861,20 @@ public FaceTrainingResult getTrainingStatus(String largePersonGroupId) { */ @Generated @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller beginTrain(String largePersonGroupId) { + public SyncPoller beginTrain() { // Generated convenience method for beginTrainWithModel RequestOptions requestOptions = new RequestOptions(); - return serviceClient.beginTrainWithModel(largePersonGroupId, requestOptions); + return serviceClient.beginTrainWithModel(requestOptions); } /** * Create a new person in a specified Large Person Group. To add face to this person, please call "Add Large Person * Group Person Face". - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/create-large-person-group-person for more * details. - * - * @param largePersonGroupId ID of the container. + * * @param name User defined name, maximum length is 128. * @param userData Optional user defined data. Length should not exceed 16K. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -927,24 +887,23 @@ public SyncPoller beginTrain(String largePersonGroupId */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public CreatePersonResult createPerson(String largePersonGroupId, String name, String userData) { + public CreatePersonResult createPerson(String name, String userData) { // Generated convenience method for createPersonWithResponse RequestOptions requestOptions = new RequestOptions(); CreatePersonRequest createPersonRequestObj = new CreatePersonRequest(name).setUserData(userData); BinaryData createPersonRequest = BinaryData.fromObject(createPersonRequestObj); - return createPersonWithResponse(largePersonGroupId, createPersonRequest, requestOptions).getValue() + return createPersonWithResponse(createPersonRequest, requestOptions).getValue() .toObject(CreatePersonResult.class); } /** * Create a new person in a specified Large Person Group. To add face to this person, please call "Add Large Person * Group Person Face". - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/create-large-person-group-person for more * details. - * - * @param largePersonGroupId ID of the container. + * * @param name User defined name, maximum length is 128. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -956,12 +915,12 @@ public CreatePersonResult createPerson(String largePersonGroupId, String name, S */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public CreatePersonResult createPerson(String largePersonGroupId, String name) { + public CreatePersonResult createPerson(String name) { // Generated convenience method for createPersonWithResponse RequestOptions requestOptions = new RequestOptions(); CreatePersonRequest createPersonRequestObj = new CreatePersonRequest(name); BinaryData createPersonRequest = BinaryData.fromObject(createPersonRequestObj); - return createPersonWithResponse(largePersonGroupId, createPersonRequest, requestOptions).getValue() + return createPersonWithResponse(createPersonRequest, requestOptions).getValue() .toObject(CreatePersonResult.class); } @@ -969,8 +928,7 @@ public CreatePersonResult createPerson(String largePersonGroupId, String name) { * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/delete-large-person-group-person for more * details. - * - * @param largePersonGroupId ID of the container. + * * @param personId ID of the person. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -981,17 +939,16 @@ public CreatePersonResult createPerson(String largePersonGroupId, String name) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public void deletePerson(String largePersonGroupId, String personId) { + public void deletePerson(String personId) { // Generated convenience method for deletePersonWithResponse RequestOptions requestOptions = new RequestOptions(); - deletePersonWithResponse(largePersonGroupId, personId, requestOptions).getValue(); + deletePersonWithResponse(personId, requestOptions).getValue(); } /** * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group-person * for more details. - * - * @param largePersonGroupId ID of the container. + * * @param personId ID of the person. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -1003,19 +960,17 @@ public void deletePerson(String largePersonGroupId, String personId) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public LargePersonGroupPerson getPerson(String largePersonGroupId, String personId) { + public LargePersonGroupPerson getPerson(String personId) { // Generated convenience method for getPersonWithResponse RequestOptions requestOptions = new RequestOptions(); - return getPersonWithResponse(largePersonGroupId, personId, requestOptions).getValue() - .toObject(LargePersonGroupPerson.class); + return getPersonWithResponse(personId, requestOptions).getValue().toObject(LargePersonGroupPerson.class); } /** * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/update-large-person-group-person for more * details. - * - * @param largePersonGroupId ID of the container. + * * @param personId ID of the person. * @param name User defined name, maximum length is 128. * @param userData Optional user defined data. Length should not exceed 16K. @@ -1028,20 +983,19 @@ public LargePersonGroupPerson getPerson(String largePersonGroupId, String person */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public void updatePerson(String largePersonGroupId, String personId, String name, String userData) { + public void updatePerson(String personId, String name, String userData) { // Generated convenience method for updatePersonWithResponse RequestOptions requestOptions = new RequestOptions(); UpdatePersonRequest updatePersonRequestObj = new UpdatePersonRequest().setName(name).setUserData(userData); BinaryData updatePersonRequest = BinaryData.fromObject(updatePersonRequestObj); - updatePersonWithResponse(largePersonGroupId, personId, updatePersonRequest, requestOptions).getValue(); + updatePersonWithResponse(personId, updatePersonRequest, requestOptions).getValue(); } /** * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/update-large-person-group-person for more * details. - * - * @param largePersonGroupId ID of the container. + * * @param personId ID of the person. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -1052,22 +1006,21 @@ public void updatePerson(String largePersonGroupId, String personId, String name */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public void updatePerson(String largePersonGroupId, String personId) { + public void updatePerson(String personId) { // Generated convenience method for updatePersonWithResponse RequestOptions requestOptions = new RequestOptions(); UpdatePersonRequest updatePersonRequestObj = new UpdatePersonRequest(); BinaryData updatePersonRequest = BinaryData.fromObject(updatePersonRequestObj); - updatePersonWithResponse(largePersonGroupId, personId, updatePersonRequest, requestOptions).getValue(); + updatePersonWithResponse(personId, updatePersonRequest, requestOptions).getValue(); } /** * List all persons' information in the specified Large Person Group, including personId, name, userData and * persistedFaceIds of registered person faces. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group-persons * for more details. - * - * @param largePersonGroupId ID of the container. + * * @param start List resources greater than the "start". It contains no more than 64 characters. Default is empty. * @param top The number of items to list, ranging in [1, 1000]. Default is 1000. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1080,7 +1033,7 @@ public void updatePerson(String largePersonGroupId, String personId) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public List getPersons(String largePersonGroupId, String start, Integer top) { + public List getPersons(String start, Integer top) { // Generated convenience method for getPersonsWithResponse RequestOptions requestOptions = new RequestOptions(); if (start != null) { @@ -1089,19 +1042,17 @@ public List getPersons(String largePersonGroupId, String if (top != null) { requestOptions.addQueryParam("top", String.valueOf(top), false); } - return getPersonsWithResponse(largePersonGroupId, requestOptions).getValue() + return getPersonsWithResponse(requestOptions).getValue() .toObject(TYPE_REFERENCE_LIST_LARGE_PERSON_GROUP_PERSON); } /** * List all persons' information in the specified Large Person Group, including personId, name, userData and * persistedFaceIds of registered person faces. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group-persons * for more details. - * - * @param largePersonGroupId ID of the container. - * @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. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -1111,21 +1062,20 @@ public List getPersons(String largePersonGroupId, String */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public List getPersons(String largePersonGroupId) { + public List getPersons() { // Generated convenience method for getPersonsWithResponse RequestOptions requestOptions = new RequestOptions(); - return getPersonsWithResponse(largePersonGroupId, requestOptions).getValue() + return getPersonsWithResponse(requestOptions).getValue() .toObject(TYPE_REFERENCE_LIST_LARGE_PERSON_GROUP_PERSON); } /** * Add a face to a person into a Large Person Group for face identification or verification. - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/add-large-person-group-person-face-from-url for * more details. - * - * @param largePersonGroupId ID of the container. + * * @param personId ID of the person. * @param url URL of input image. * @param targetFace A face rectangle to specify the target face to be added to a person, in the format of @@ -1143,7 +1093,7 @@ public List getPersons(String largePersonGroupId) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - AddFaceResult addFaceFromUrlImpl(String largePersonGroupId, String personId, String url, List targetFace, + AddFaceResult addFaceFromUrlImpl(String personId, String url, List targetFace, FaceDetectionModel detectionModel, String userData) { // Generated convenience method for addFaceFromUrlImplWithResponse RequestOptions requestOptions = new RequestOptions(); @@ -1160,19 +1110,17 @@ AddFaceResult addFaceFromUrlImpl(String largePersonGroupId, String personId, Str if (userData != null) { requestOptions.addQueryParam("userData", userData, false); } - return addFaceFromUrlImplWithResponse(largePersonGroupId, personId, addFaceFromUrlRequest, requestOptions) - .getValue() + return addFaceFromUrlImplWithResponse(personId, addFaceFromUrlRequest, requestOptions).getValue() .toObject(AddFaceResult.class); } /** * Add a face to a person into a Large Person Group for face identification or verification. - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/add-large-person-group-person-face-from-url for * more details. - * - * @param largePersonGroupId ID of the container. + * * @param personId ID of the person. * @param url URL of input image. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1185,24 +1133,22 @@ AddFaceResult addFaceFromUrlImpl(String largePersonGroupId, String personId, Str */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - AddFaceResult addFaceFromUrlImpl(String largePersonGroupId, String personId, String url) { + AddFaceResult addFaceFromUrlImpl(String personId, String url) { // Generated convenience method for addFaceFromUrlImplWithResponse RequestOptions requestOptions = new RequestOptions(); AddFaceFromUrlRequest addFaceFromUrlRequestObj = new AddFaceFromUrlRequest(url); BinaryData addFaceFromUrlRequest = BinaryData.fromObject(addFaceFromUrlRequestObj); - return addFaceFromUrlImplWithResponse(largePersonGroupId, personId, addFaceFromUrlRequest, requestOptions) - .getValue() + return addFaceFromUrlImplWithResponse(personId, addFaceFromUrlRequest, requestOptions).getValue() .toObject(AddFaceResult.class); } /** * Add a face to a person into a Large Person Group for face identification or verification. - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/add-large-person-group-person-face for more * details. - * - * @param largePersonGroupId ID of the container. + * * @param personId ID of the person. * @param imageContent The image to be analyzed. * @param targetFace A face rectangle to specify the target face to be added to a person, in the format of @@ -1220,8 +1166,8 @@ AddFaceResult addFaceFromUrlImpl(String largePersonGroupId, String personId, Str */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - AddFaceResult addFaceImpl(String largePersonGroupId, String personId, BinaryData imageContent, - List targetFace, FaceDetectionModel detectionModel, String userData) { + AddFaceResult addFaceImpl(String personId, BinaryData imageContent, List targetFace, + FaceDetectionModel detectionModel, String userData) { // Generated convenience method for addFaceImplWithResponse RequestOptions requestOptions = new RequestOptions(); if (targetFace != null) { @@ -1235,18 +1181,16 @@ AddFaceResult addFaceImpl(String largePersonGroupId, String personId, BinaryData if (userData != null) { requestOptions.addQueryParam("userData", userData, false); } - return addFaceImplWithResponse(largePersonGroupId, personId, imageContent, requestOptions).getValue() - .toObject(AddFaceResult.class); + return addFaceImplWithResponse(personId, imageContent, requestOptions).getValue().toObject(AddFaceResult.class); } /** * Add a face to a person into a Large Person Group for face identification or verification. - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/add-large-person-group-person-face for more * details. - * - * @param largePersonGroupId ID of the container. + * * @param personId ID of the person. * @param imageContent The image to be analyzed. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1259,22 +1203,20 @@ AddFaceResult addFaceImpl(String largePersonGroupId, String personId, BinaryData */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - AddFaceResult addFaceImpl(String largePersonGroupId, String personId, BinaryData imageContent) { + AddFaceResult addFaceImpl(String personId, BinaryData imageContent) { // Generated convenience method for addFaceImplWithResponse RequestOptions requestOptions = new RequestOptions(); - return addFaceImplWithResponse(largePersonGroupId, personId, imageContent, requestOptions).getValue() - .toObject(AddFaceResult.class); + return addFaceImplWithResponse(personId, imageContent, requestOptions).getValue().toObject(AddFaceResult.class); } /** * Delete a face from a person in a Large Person Group by specified largePersonGroupId, personId and * persistedFaceId. - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/delete-large-person-group-person-face for more * details. - * - * @param largePersonGroupId ID of the container. + * * @param personId ID of the person. * @param persistedFaceId Face ID of the face. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1286,18 +1228,17 @@ AddFaceResult addFaceImpl(String largePersonGroupId, String personId, BinaryData */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteFace(String largePersonGroupId, String personId, String persistedFaceId) { + public void deleteFace(String personId, String persistedFaceId) { // Generated convenience method for deleteFaceWithResponse RequestOptions requestOptions = new RequestOptions(); - deleteFaceWithResponse(largePersonGroupId, personId, persistedFaceId, requestOptions).getValue(); + deleteFaceWithResponse(personId, persistedFaceId, requestOptions).getValue(); } /** * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group-person-face for more * details. - * - * @param largePersonGroupId ID of the container. + * * @param personId ID of the person. * @param persistedFaceId Face ID of the face. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1310,10 +1251,10 @@ public void deleteFace(String largePersonGroupId, String personId, String persis */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public LargePersonGroupPersonFace getFace(String largePersonGroupId, String personId, String persistedFaceId) { + public LargePersonGroupPersonFace getFace(String personId, String persistedFaceId) { // Generated convenience method for getFaceWithResponse RequestOptions requestOptions = new RequestOptions(); - return getFaceWithResponse(largePersonGroupId, personId, persistedFaceId, requestOptions).getValue() + return getFaceWithResponse(personId, persistedFaceId, requestOptions).getValue() .toObject(LargePersonGroupPersonFace.class); } @@ -1321,8 +1262,7 @@ public LargePersonGroupPersonFace getFace(String largePersonGroupId, String pers * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/update-large-person-group-person-face for more * details. - * - * @param largePersonGroupId ID of the container. + * * @param personId ID of the person. * @param persistedFaceId Face ID of the face. * @param userData User-provided data attached to the face. The length limit is 1K. @@ -1335,21 +1275,19 @@ public LargePersonGroupPersonFace getFace(String largePersonGroupId, String pers */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public void updateFace(String largePersonGroupId, String personId, String persistedFaceId, String userData) { + public void updateFace(String personId, String persistedFaceId, String userData) { // Generated convenience method for updateFaceWithResponse RequestOptions requestOptions = new RequestOptions(); UpdateFaceRequest updateFaceRequestObj = new UpdateFaceRequest().setUserData(userData); BinaryData updateFaceRequest = BinaryData.fromObject(updateFaceRequestObj); - updateFaceWithResponse(largePersonGroupId, personId, persistedFaceId, updateFaceRequest, requestOptions) - .getValue(); + updateFaceWithResponse(personId, persistedFaceId, updateFaceRequest, requestOptions).getValue(); } /** * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/update-large-person-group-person-face for more * details. - * - * @param largePersonGroupId ID of the container. + * * @param personId ID of the person. * @param persistedFaceId Face ID of the face. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1361,13 +1299,12 @@ public void updateFace(String largePersonGroupId, String personId, String persis */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public void updateFace(String largePersonGroupId, String personId, String persistedFaceId) { + public void updateFace(String personId, String persistedFaceId) { // Generated convenience method for updateFaceWithResponse RequestOptions requestOptions = new RequestOptions(); UpdateFaceRequest updateFaceRequestObj = new UpdateFaceRequest(); BinaryData updateFaceRequest = BinaryData.fromObject(updateFaceRequestObj); - updateFaceWithResponse(largePersonGroupId, personId, persistedFaceId, updateFaceRequest, requestOptions) - .getValue(); + updateFaceWithResponse(personId, persistedFaceId, updateFaceRequest, requestOptions).getValue(); } @Generated diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/package-info.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/package-info.java new file mode 100644 index 000000000000..d5ce7be3f6a0 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/package-info.java @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +/** + * + * Package containing the classes for FaceAdministrationClient. + * + */ +package com.azure.ai.vision.face.administration; diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/implementation/FaceAdministrationClientImpl.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/implementation/FaceAdministrationClientImpl.java index 8cacd9361577..195a761e1454 100644 --- a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/implementation/FaceAdministrationClientImpl.java +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/implementation/FaceAdministrationClientImpl.java @@ -32,6 +32,34 @@ public String getEndpoint() { return this.endpoint; } + /** + * Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + */ + private final String largeFaceListId; + + /** + * Gets Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * + * @return the largeFaceListId value. + */ + public String getLargeFaceListId() { + return this.largeFaceListId; + } + + /** + * ID of the container. + */ + private final String largePersonGroupId; + + /** + * Gets ID of the container. + * + * @return the largePersonGroupId value. + */ + public String getLargePersonGroupId() { + return this.largePersonGroupId; + } + /** * Service version. */ @@ -107,11 +135,15 @@ public LargePersonGroupsImpl getLargePersonGroups() { * * @param endpoint Supported Cognitive Services endpoints (protocol and hostname, for example: * https://{resource-name}.cognitiveservices.azure.com). + * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * @param largePersonGroupId ID of the container. * @param serviceVersion Service version. */ - public FaceAdministrationClientImpl(String endpoint, FaceServiceVersion serviceVersion) { + public FaceAdministrationClientImpl(String endpoint, String largeFaceListId, String largePersonGroupId, + FaceServiceVersion serviceVersion) { this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(), - JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion); + JacksonAdapter.createDefaultSerializerAdapter(), endpoint, largeFaceListId, largePersonGroupId, + serviceVersion); } /** @@ -120,10 +152,14 @@ public FaceAdministrationClientImpl(String endpoint, FaceServiceVersion serviceV * @param httpPipeline The HTTP pipeline to send requests through. * @param endpoint Supported Cognitive Services endpoints (protocol and hostname, for example: * https://{resource-name}.cognitiveservices.azure.com). + * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * @param largePersonGroupId ID of the container. * @param serviceVersion Service version. */ - public FaceAdministrationClientImpl(HttpPipeline httpPipeline, String endpoint, FaceServiceVersion serviceVersion) { - this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion); + public FaceAdministrationClientImpl(HttpPipeline httpPipeline, String endpoint, String largeFaceListId, + String largePersonGroupId, FaceServiceVersion serviceVersion) { + this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint, largeFaceListId, + largePersonGroupId, serviceVersion); } /** @@ -133,13 +169,17 @@ public FaceAdministrationClientImpl(HttpPipeline httpPipeline, String endpoint, * @param serializerAdapter The serializer to serialize an object into a string. * @param endpoint Supported Cognitive Services endpoints (protocol and hostname, for example: * https://{resource-name}.cognitiveservices.azure.com). + * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. + * @param largePersonGroupId ID of the container. * @param serviceVersion Service version. */ public FaceAdministrationClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, String endpoint, - FaceServiceVersion serviceVersion) { + String largeFaceListId, String largePersonGroupId, FaceServiceVersion serviceVersion) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.endpoint = endpoint; + this.largeFaceListId = largeFaceListId; + this.largePersonGroupId = largePersonGroupId; this.serviceVersion = serviceVersion; this.largeFaceLists = new LargeFaceListsImpl(this); this.largePersonGroups = new LargePersonGroupsImpl(this); diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/implementation/LargeFaceListsImpl.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/implementation/LargeFaceListsImpl.java index 10c7238f12f2..587ee04f58d1 100644 --- a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/implementation/LargeFaceListsImpl.java +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/implementation/LargeFaceListsImpl.java @@ -378,7 +378,6 @@ Response getFacesSync(@HostParam("endpoint") String endpoint, * } * } * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. * @param createRequest1 The createRequest1 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. @@ -388,13 +387,12 @@ Response getFacesSync(@HostParam("endpoint") String endpoint, * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createWithResponseAsync(String largeFaceListId, BinaryData createRequest1, - RequestOptions requestOptions) { + public Mono> createWithResponseAsync(BinaryData createRequest1, RequestOptions requestOptions) { final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil.withContext( context -> service.create(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), - largeFaceListId, contentType, accept, createRequest1, requestOptions, context)); + this.client.getLargeFaceListId(), contentType, accept, createRequest1, requestOptions, context)); } /** @@ -413,7 +411,6 @@ public Mono> createWithResponseAsync(String largeFaceListId, Bina * } * } * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. * @param createRequest1 The createRequest1 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. @@ -423,12 +420,11 @@ public Mono> createWithResponseAsync(String largeFaceListId, Bina * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse(String largeFaceListId, BinaryData createRequest1, - RequestOptions requestOptions) { + public Response createWithResponse(BinaryData createRequest1, RequestOptions requestOptions) { final String contentType = "application/json"; final String accept = "application/json"; return service.createSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), - largeFaceListId, contentType, accept, createRequest1, requestOptions, Context.NONE); + this.client.getLargeFaceListId(), contentType, accept, createRequest1, requestOptions, Context.NONE); } /** @@ -437,7 +433,6 @@ public Response createWithResponse(String largeFaceListId, BinaryData crea * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/delete-large-face-list for more * details. * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. * @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. @@ -446,10 +441,11 @@ public Response createWithResponse(String largeFaceListId, BinaryData crea * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync(String largeFaceListId, RequestOptions requestOptions) { + public Mono> deleteWithResponseAsync(RequestOptions requestOptions) { final String accept = "application/json"; - return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), - this.client.getServiceVersion().getVersion(), largeFaceListId, accept, requestOptions, context)); + return FluxUtil.withContext( + context -> service.delete(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), + this.client.getLargeFaceListId(), accept, requestOptions, context)); } /** @@ -458,7 +454,6 @@ public Mono> deleteWithResponseAsync(String largeFaceListId, Requ * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/delete-large-face-list for more * details. * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. * @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. @@ -467,10 +462,10 @@ public Mono> deleteWithResponseAsync(String largeFaceListId, Requ * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String largeFaceListId, RequestOptions requestOptions) { + public Response deleteWithResponse(RequestOptions requestOptions) { final String accept = "application/json"; return service.deleteSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), - largeFaceListId, accept, requestOptions, Context.NONE); + this.client.getLargeFaceListId(), accept, requestOptions, Context.NONE); } /** @@ -495,7 +490,6 @@ public Response deleteWithResponse(String largeFaceListId, RequestOptions * } * } * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. * @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. @@ -505,10 +499,11 @@ public Response deleteWithResponse(String largeFaceListId, RequestOptions * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String largeFaceListId, RequestOptions requestOptions) { + public Mono> getWithResponseAsync(RequestOptions requestOptions) { final String accept = "application/json"; - return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), - this.client.getServiceVersion().getVersion(), largeFaceListId, accept, requestOptions, context)); + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), + this.client.getLargeFaceListId(), accept, requestOptions, context)); } /** @@ -533,7 +528,6 @@ public Mono> getWithResponseAsync(String largeFaceListId, R * } * } * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. * @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. @@ -542,10 +536,10 @@ public Mono> getWithResponseAsync(String largeFaceListId, R * @return large face list is a list of faces, up to 1,000,000 faces along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String largeFaceListId, RequestOptions requestOptions) { + public Response getWithResponse(RequestOptions requestOptions) { final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), largeFaceListId, - accept, requestOptions, Context.NONE); + return service.getSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), + this.client.getLargeFaceListId(), accept, requestOptions, Context.NONE); } /** @@ -560,7 +554,6 @@ public Response getWithResponse(String largeFaceListId, RequestOptio * } * } * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. * @param updateRequest1 The updateRequest1 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. @@ -570,13 +563,12 @@ public Response getWithResponse(String largeFaceListId, RequestOptio * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync(String largeFaceListId, BinaryData updateRequest1, - RequestOptions requestOptions) { + public Mono> updateWithResponseAsync(BinaryData updateRequest1, RequestOptions requestOptions) { final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil.withContext( context -> service.update(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), - largeFaceListId, contentType, accept, updateRequest1, requestOptions, context)); + this.client.getLargeFaceListId(), contentType, accept, updateRequest1, requestOptions, context)); } /** @@ -591,7 +583,6 @@ public Mono> updateWithResponseAsync(String largeFaceListId, Bina * } * } * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. * @param updateRequest1 The updateRequest1 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. @@ -601,12 +592,11 @@ public Mono> updateWithResponseAsync(String largeFaceListId, Bina * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String largeFaceListId, BinaryData updateRequest1, - RequestOptions requestOptions) { + public Response updateWithResponse(BinaryData updateRequest1, RequestOptions requestOptions) { final String contentType = "application/json"; final String accept = "application/json"; return service.updateSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), - largeFaceListId, contentType, accept, updateRequest1, requestOptions, Context.NONE); + this.client.getLargeFaceListId(), contentType, accept, updateRequest1, requestOptions, Context.NONE); } /** @@ -713,7 +703,6 @@ public Response getLargeFaceListsWithResponse(RequestOptions request * } * } * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. * @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. @@ -722,11 +711,11 @@ public Response getLargeFaceListsWithResponse(RequestOptions request * @return training result of a container along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getTrainingStatusWithResponseAsync(String largeFaceListId, - RequestOptions requestOptions) { + public Mono> getTrainingStatusWithResponseAsync(RequestOptions requestOptions) { final String accept = "application/json"; return FluxUtil.withContext(context -> service.getTrainingStatus(this.client.getEndpoint(), - this.client.getServiceVersion().getVersion(), largeFaceListId, accept, requestOptions, context)); + this.client.getServiceVersion().getVersion(), this.client.getLargeFaceListId(), accept, requestOptions, + context)); } /** @@ -745,7 +734,6 @@ public Mono> getTrainingStatusWithResponseAsync(String larg * } * } * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. * @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. @@ -754,10 +742,10 @@ public Mono> getTrainingStatusWithResponseAsync(String larg * @return training result of a container along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getTrainingStatusWithResponse(String largeFaceListId, RequestOptions requestOptions) { + public Response getTrainingStatusWithResponse(RequestOptions requestOptions) { final String accept = "application/json"; return service.getTrainingStatusSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), - largeFaceListId, accept, requestOptions, Context.NONE); + this.client.getLargeFaceListId(), accept, requestOptions, Context.NONE); } /** @@ -766,7 +754,6 @@ public Response getTrainingStatusWithResponse(String largeFaceListId * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/train-large-face-list for more * details. * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. * @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. @@ -775,10 +762,11 @@ public Response getTrainingStatusWithResponse(String largeFaceListId * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> trainWithResponseAsync(String largeFaceListId, RequestOptions requestOptions) { + private Mono> trainWithResponseAsync(RequestOptions requestOptions) { final String accept = "application/json"; - return FluxUtil.withContext(context -> service.train(this.client.getEndpoint(), - this.client.getServiceVersion().getVersion(), largeFaceListId, accept, requestOptions, context)); + return FluxUtil.withContext( + context -> service.train(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), + this.client.getLargeFaceListId(), accept, requestOptions, context)); } /** @@ -787,7 +775,6 @@ private Mono> trainWithResponseAsync(String largeFaceListId, Requ * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/train-large-face-list for more * details. * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. * @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. @@ -796,10 +783,10 @@ private Mono> trainWithResponseAsync(String largeFaceListId, Requ * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response trainWithResponse(String largeFaceListId, RequestOptions requestOptions) { + private Response trainWithResponse(RequestOptions requestOptions) { final String accept = "application/json"; return service.trainSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), - largeFaceListId, accept, requestOptions, Context.NONE); + this.client.getLargeFaceListId(), accept, requestOptions, Context.NONE); } /** @@ -808,7 +795,6 @@ private Response trainWithResponse(String largeFaceListId, RequestOptions * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/train-large-face-list for more * details. * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. * @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. @@ -817,9 +803,8 @@ private Response trainWithResponse(String largeFaceListId, RequestOptions * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux beginTrainAsync(String largeFaceListId, RequestOptions requestOptions) { - return PollerFlux.create(Duration.ofSeconds(1), - () -> this.trainWithResponseAsync(largeFaceListId, requestOptions), + public PollerFlux beginTrainAsync(RequestOptions requestOptions) { + return PollerFlux.create(Duration.ofSeconds(1), () -> this.trainWithResponseAsync(requestOptions), new DefaultPollingStrategy<>(new PollingStrategyOptions(this.client.getHttpPipeline()) .setEndpoint("{endpoint}/face/{apiVersion}".replace("{endpoint}", this.client.getEndpoint()) .replace("{apiVersion}", this.client.getServiceVersion().getVersion())) @@ -836,7 +821,6 @@ public PollerFlux beginTrainAsync(String largeFaceListId * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/train-large-face-list for more * details. * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. * @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. @@ -845,9 +829,8 @@ public PollerFlux beginTrainAsync(String largeFaceListId * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller beginTrain(String largeFaceListId, RequestOptions requestOptions) { - return SyncPoller.createPoller(Duration.ofSeconds(1), - () -> this.trainWithResponse(largeFaceListId, requestOptions), + public SyncPoller beginTrain(RequestOptions requestOptions) { + return SyncPoller.createPoller(Duration.ofSeconds(1), () -> this.trainWithResponse(requestOptions), new SyncDefaultPollingStrategy<>(new PollingStrategyOptions(this.client.getHttpPipeline()) .setEndpoint("{endpoint}/face/{apiVersion}".replace("{endpoint}", this.client.getEndpoint()) .replace("{apiVersion}", this.client.getServiceVersion().getVersion())) @@ -864,7 +847,6 @@ public SyncPoller beginTrain(String largeFaceListId, Req * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/train-large-face-list for more * details. * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. * @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. @@ -873,10 +855,8 @@ public SyncPoller beginTrain(String largeFaceListId, Req * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux beginTrainWithModelAsync(String largeFaceListId, - RequestOptions requestOptions) { - return PollerFlux.create(Duration.ofSeconds(1), - () -> this.trainWithResponseAsync(largeFaceListId, requestOptions), + public PollerFlux beginTrainWithModelAsync(RequestOptions requestOptions) { + return PollerFlux.create(Duration.ofSeconds(1), () -> this.trainWithResponseAsync(requestOptions), new DefaultPollingStrategy<>(new PollingStrategyOptions(this.client.getHttpPipeline()) .setEndpoint("{endpoint}/face/{apiVersion}".replace("{endpoint}", this.client.getEndpoint()) .replace("{apiVersion}", this.client.getServiceVersion().getVersion())) @@ -893,7 +873,6 @@ public PollerFlux beginTrainWithModelAsync(String larg * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/train-large-face-list for more * details. * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. * @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. @@ -902,10 +881,8 @@ public PollerFlux beginTrainWithModelAsync(String larg * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller beginTrainWithModel(String largeFaceListId, - RequestOptions requestOptions) { - return SyncPoller.createPoller(Duration.ofSeconds(1), - () -> this.trainWithResponse(largeFaceListId, requestOptions), + public SyncPoller beginTrainWithModel(RequestOptions requestOptions) { + return SyncPoller.createPoller(Duration.ofSeconds(1), () -> this.trainWithResponse(requestOptions), new SyncDefaultPollingStrategy<>(new PollingStrategyOptions(this.client.getHttpPipeline()) .setEndpoint("{endpoint}/face/{apiVersion}".replace("{endpoint}", this.client.getEndpoint()) .replace("{apiVersion}", this.client.getServiceVersion().getVersion())) @@ -951,7 +928,6 @@ public SyncPoller beginTrainWithModel(String largeFace * } * } * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. * @param addFaceFromUrlRequest1 The addFaceFromUrlRequest1 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. @@ -961,13 +937,13 @@ public SyncPoller beginTrainWithModel(String largeFace * @return response body for adding face along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> addFaceFromUrlImplWithResponseAsync(String largeFaceListId, - BinaryData addFaceFromUrlRequest1, RequestOptions requestOptions) { + public Mono> addFaceFromUrlImplWithResponseAsync(BinaryData addFaceFromUrlRequest1, + RequestOptions requestOptions) { final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil.withContext(context -> service.addFaceFromUrlImpl(this.client.getEndpoint(), - this.client.getServiceVersion().getVersion(), largeFaceListId, contentType, accept, addFaceFromUrlRequest1, - requestOptions, context)); + this.client.getServiceVersion().getVersion(), this.client.getLargeFaceListId(), contentType, accept, + addFaceFromUrlRequest1, requestOptions, context)); } /** @@ -1005,7 +981,6 @@ public Mono> addFaceFromUrlImplWithResponseAsync(String lar * } * } * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. * @param addFaceFromUrlRequest1 The addFaceFromUrlRequest1 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. @@ -1015,12 +990,13 @@ public Mono> addFaceFromUrlImplWithResponseAsync(String lar * @return response body for adding face along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response addFaceFromUrlImplWithResponse(String largeFaceListId, - BinaryData addFaceFromUrlRequest1, RequestOptions requestOptions) { + public Response addFaceFromUrlImplWithResponse(BinaryData addFaceFromUrlRequest1, + RequestOptions requestOptions) { final String contentType = "application/json"; final String accept = "application/json"; return service.addFaceFromUrlImplSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), - largeFaceListId, contentType, accept, addFaceFromUrlRequest1, requestOptions, Context.NONE); + this.client.getLargeFaceListId(), contentType, accept, addFaceFromUrlRequest1, requestOptions, + Context.NONE); } /** @@ -1056,7 +1032,6 @@ public Response addFaceFromUrlImplWithResponse(String largeFaceListI * } * } * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. * @param imageContent The image to be analyzed. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -1066,13 +1041,13 @@ public Response addFaceFromUrlImplWithResponse(String largeFaceListI * @return response body for adding face along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> addFaceImplWithResponseAsync(String largeFaceListId, BinaryData imageContent, + public Mono> addFaceImplWithResponseAsync(BinaryData imageContent, RequestOptions requestOptions) { final String contentType = "application/octet-stream"; final String accept = "application/json"; return FluxUtil.withContext( context -> service.addFaceImpl(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), - largeFaceListId, contentType, accept, imageContent, requestOptions, context)); + this.client.getLargeFaceListId(), contentType, accept, imageContent, requestOptions, context)); } /** @@ -1108,7 +1083,6 @@ public Mono> addFaceImplWithResponseAsync(String largeFaceL * } * } * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. * @param imageContent The image to be analyzed. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -1118,19 +1092,17 @@ public Mono> addFaceImplWithResponseAsync(String largeFaceL * @return response body for adding face along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response addFaceImplWithResponse(String largeFaceListId, BinaryData imageContent, - RequestOptions requestOptions) { + public Response addFaceImplWithResponse(BinaryData imageContent, RequestOptions requestOptions) { final String contentType = "application/octet-stream"; final String accept = "application/json"; return service.addFaceImplSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), - largeFaceListId, contentType, accept, imageContent, requestOptions, Context.NONE); + this.client.getLargeFaceListId(), contentType, accept, imageContent, requestOptions, Context.NONE); } /** * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/delete-large-face-list-face for * more details. * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. * @param persistedFaceId Face ID of the face. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -1140,19 +1112,17 @@ public Response addFaceImplWithResponse(String largeFaceListId, Bina * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteFaceWithResponseAsync(String largeFaceListId, String persistedFaceId, - RequestOptions requestOptions) { + public Mono> deleteFaceWithResponseAsync(String persistedFaceId, RequestOptions requestOptions) { final String accept = "application/json"; return FluxUtil.withContext( context -> service.deleteFace(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), - largeFaceListId, persistedFaceId, accept, requestOptions, context)); + this.client.getLargeFaceListId(), persistedFaceId, accept, requestOptions, context)); } /** * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/delete-large-face-list-face for * more details. * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. * @param persistedFaceId Face ID of the face. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -1162,11 +1132,10 @@ public Mono> deleteFaceWithResponseAsync(String largeFaceListId, * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteFaceWithResponse(String largeFaceListId, String persistedFaceId, - RequestOptions requestOptions) { + public Response deleteFaceWithResponse(String persistedFaceId, RequestOptions requestOptions) { final String accept = "application/json"; return service.deleteFaceSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), - largeFaceListId, persistedFaceId, accept, requestOptions, Context.NONE); + this.client.getLargeFaceListId(), persistedFaceId, accept, requestOptions, Context.NONE); } /** @@ -1181,7 +1150,6 @@ public Response deleteFaceWithResponse(String largeFaceListId, String pers * } * } * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. * @param persistedFaceId Face ID of the face. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -1191,12 +1159,11 @@ public Response deleteFaceWithResponse(String largeFaceListId, String pers * @return face resource for large face list along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getFaceWithResponseAsync(String largeFaceListId, String persistedFaceId, - RequestOptions requestOptions) { + public Mono> getFaceWithResponseAsync(String persistedFaceId, RequestOptions requestOptions) { final String accept = "application/json"; return FluxUtil.withContext( context -> service.getFace(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), - largeFaceListId, persistedFaceId, accept, requestOptions, context)); + this.client.getLargeFaceListId(), persistedFaceId, accept, requestOptions, context)); } /** @@ -1211,7 +1178,6 @@ public Mono> getFaceWithResponseAsync(String largeFaceListI * } * } * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. * @param persistedFaceId Face ID of the face. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -1221,11 +1187,10 @@ public Mono> getFaceWithResponseAsync(String largeFaceListI * @return face resource for large face list along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getFaceWithResponse(String largeFaceListId, String persistedFaceId, - RequestOptions requestOptions) { + public Response getFaceWithResponse(String persistedFaceId, RequestOptions requestOptions) { final String accept = "application/json"; return service.getFaceSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), - largeFaceListId, persistedFaceId, accept, requestOptions, Context.NONE); + this.client.getLargeFaceListId(), persistedFaceId, accept, requestOptions, Context.NONE); } /** @@ -1239,7 +1204,6 @@ public Response getFaceWithResponse(String largeFaceListId, String p * } * } * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. * @param persistedFaceId Face ID of the face. * @param updateFaceRequest1 The updateFaceRequest1 parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -1250,13 +1214,13 @@ public Response getFaceWithResponse(String largeFaceListId, String p * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateFaceWithResponseAsync(String largeFaceListId, String persistedFaceId, - BinaryData updateFaceRequest1, RequestOptions requestOptions) { + public Mono> updateFaceWithResponseAsync(String persistedFaceId, BinaryData updateFaceRequest1, + RequestOptions requestOptions) { final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil.withContext( - context -> service.updateFace(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), - largeFaceListId, persistedFaceId, contentType, accept, updateFaceRequest1, requestOptions, context)); + return FluxUtil.withContext(context -> service.updateFace(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), this.client.getLargeFaceListId(), persistedFaceId, + contentType, accept, updateFaceRequest1, requestOptions, context)); } /** @@ -1270,7 +1234,6 @@ public Mono> updateFaceWithResponseAsync(String largeFaceListId, * } * } * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. * @param persistedFaceId Face ID of the face. * @param updateFaceRequest1 The updateFaceRequest1 parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -1281,12 +1244,13 @@ public Mono> updateFaceWithResponseAsync(String largeFaceListId, * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateFaceWithResponse(String largeFaceListId, String persistedFaceId, - BinaryData updateFaceRequest1, RequestOptions requestOptions) { + public Response updateFaceWithResponse(String persistedFaceId, BinaryData updateFaceRequest1, + RequestOptions requestOptions) { final String contentType = "application/json"; final String accept = "application/json"; return service.updateFaceSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), - largeFaceListId, persistedFaceId, contentType, accept, updateFaceRequest1, requestOptions, Context.NONE); + this.client.getLargeFaceListId(), persistedFaceId, contentType, accept, updateFaceRequest1, requestOptions, + Context.NONE); } /** @@ -1315,7 +1279,6 @@ public Response updateFaceWithResponse(String largeFaceListId, String pers * ] * } * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. * @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. @@ -1324,10 +1287,11 @@ public Response updateFaceWithResponse(String largeFaceListId, String pers * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getFacesWithResponseAsync(String largeFaceListId, RequestOptions requestOptions) { + public Mono> getFacesWithResponseAsync(RequestOptions requestOptions) { final String accept = "application/json"; - return FluxUtil.withContext(context -> service.getFaces(this.client.getEndpoint(), - this.client.getServiceVersion().getVersion(), largeFaceListId, accept, requestOptions, context)); + return FluxUtil.withContext( + context -> service.getFaces(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), + this.client.getLargeFaceListId(), accept, requestOptions, context)); } /** @@ -1356,7 +1320,6 @@ public Mono> getFacesWithResponseAsync(String largeFaceList * ] * } * - * @param largeFaceListId Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. * @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. @@ -1365,9 +1328,9 @@ public Mono> getFacesWithResponseAsync(String largeFaceList * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getFacesWithResponse(String largeFaceListId, RequestOptions requestOptions) { + public Response getFacesWithResponse(RequestOptions requestOptions) { final String accept = "application/json"; return service.getFacesSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), - largeFaceListId, accept, requestOptions, Context.NONE); + this.client.getLargeFaceListId(), accept, requestOptions, Context.NONE); } } diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/implementation/LargePersonGroupsImpl.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/implementation/LargePersonGroupsImpl.java index 2cd3391e3b3c..3350bdd2e19c 100644 --- a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/implementation/LargePersonGroupsImpl.java +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/implementation/LargePersonGroupsImpl.java @@ -472,7 +472,6 @@ Response updateFaceSync(@HostParam("endpoint") String endpoint, * } * } * - * @param largePersonGroupId ID of the container. * @param createRequest The createRequest 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. @@ -482,13 +481,12 @@ Response updateFaceSync(@HostParam("endpoint") String endpoint, * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createWithResponseAsync(String largePersonGroupId, BinaryData createRequest, - RequestOptions requestOptions) { + public Mono> createWithResponseAsync(BinaryData createRequest, RequestOptions requestOptions) { final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil.withContext( context -> service.create(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), - largePersonGroupId, contentType, accept, createRequest, requestOptions, context)); + this.client.getLargePersonGroupId(), contentType, accept, createRequest, requestOptions, context)); } /** @@ -507,7 +505,6 @@ public Mono> createWithResponseAsync(String largePersonGroupId, B * } * } * - * @param largePersonGroupId ID of the container. * @param createRequest The createRequest 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. @@ -517,19 +514,17 @@ public Mono> createWithResponseAsync(String largePersonGroupId, B * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse(String largePersonGroupId, BinaryData createRequest, - RequestOptions requestOptions) { + public Response createWithResponse(BinaryData createRequest, RequestOptions requestOptions) { final String contentType = "application/json"; final String accept = "application/json"; return service.createSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), - largePersonGroupId, contentType, accept, createRequest, requestOptions, Context.NONE); + this.client.getLargePersonGroupId(), contentType, accept, createRequest, requestOptions, Context.NONE); } /** * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/delete-large-person-group for * more details. * - * @param largePersonGroupId ID of the container. * @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. @@ -538,17 +533,17 @@ public Response createWithResponse(String largePersonGroupId, BinaryData c * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync(String largePersonGroupId, RequestOptions requestOptions) { + public Mono> deleteWithResponseAsync(RequestOptions requestOptions) { final String accept = "application/json"; - return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), - this.client.getServiceVersion().getVersion(), largePersonGroupId, accept, requestOptions, context)); + return FluxUtil.withContext( + context -> service.delete(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), + this.client.getLargePersonGroupId(), accept, requestOptions, context)); } /** * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/delete-large-person-group for * more details. * - * @param largePersonGroupId ID of the container. * @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. @@ -557,10 +552,10 @@ public Mono> deleteWithResponseAsync(String largePersonGroupId, R * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String largePersonGroupId, RequestOptions requestOptions) { + public Response deleteWithResponse(RequestOptions requestOptions) { final String accept = "application/json"; return service.deleteSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), - largePersonGroupId, accept, requestOptions, Context.NONE); + this.client.getLargePersonGroupId(), accept, requestOptions, Context.NONE); } /** @@ -585,7 +580,6 @@ public Response deleteWithResponse(String largePersonGroupId, RequestOptio * } * } * - * @param largePersonGroupId ID of the container. * @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. @@ -595,10 +589,11 @@ public Response deleteWithResponse(String largePersonGroupId, RequestOptio * along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String largePersonGroupId, RequestOptions requestOptions) { + public Mono> getWithResponseAsync(RequestOptions requestOptions) { final String accept = "application/json"; - return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), - this.client.getServiceVersion().getVersion(), largePersonGroupId, accept, requestOptions, context)); + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), + this.client.getLargePersonGroupId(), accept, requestOptions, context)); } /** @@ -623,7 +618,6 @@ public Mono> getWithResponseAsync(String largePersonGroupId * } * } * - * @param largePersonGroupId ID of the container. * @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. @@ -633,10 +627,10 @@ public Mono> getWithResponseAsync(String largePersonGroupId * along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String largePersonGroupId, RequestOptions requestOptions) { + public Response getWithResponse(RequestOptions requestOptions) { final String accept = "application/json"; return service.getSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), - largePersonGroupId, accept, requestOptions, Context.NONE); + this.client.getLargePersonGroupId(), accept, requestOptions, Context.NONE); } /** @@ -651,7 +645,6 @@ public Response getWithResponse(String largePersonGroupId, RequestOp * } * } * - * @param largePersonGroupId ID of the container. * @param updateRequest The updateRequest 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. @@ -661,13 +654,12 @@ public Response getWithResponse(String largePersonGroupId, RequestOp * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync(String largePersonGroupId, BinaryData updateRequest, - RequestOptions requestOptions) { + public Mono> updateWithResponseAsync(BinaryData updateRequest, RequestOptions requestOptions) { final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil.withContext( context -> service.update(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), - largePersonGroupId, contentType, accept, updateRequest, requestOptions, context)); + this.client.getLargePersonGroupId(), contentType, accept, updateRequest, requestOptions, context)); } /** @@ -682,7 +674,6 @@ public Mono> updateWithResponseAsync(String largePersonGroupId, B * } * } * - * @param largePersonGroupId ID of the container. * @param updateRequest The updateRequest 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. @@ -692,12 +683,11 @@ public Mono> updateWithResponseAsync(String largePersonGroupId, B * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String largePersonGroupId, BinaryData updateRequest, - RequestOptions requestOptions) { + public Response updateWithResponse(BinaryData updateRequest, RequestOptions requestOptions) { final String contentType = "application/json"; final String accept = "application/json"; return service.updateSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), - largePersonGroupId, contentType, accept, updateRequest, requestOptions, Context.NONE); + this.client.getLargePersonGroupId(), contentType, accept, updateRequest, requestOptions, Context.NONE); } /** @@ -807,7 +797,6 @@ public Response getLargePersonGroupsWithResponse(RequestOptions requ * } * } * - * @param largePersonGroupId ID of the container. * @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. @@ -816,11 +805,11 @@ public Response getLargePersonGroupsWithResponse(RequestOptions requ * @return training result of a container along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getTrainingStatusWithResponseAsync(String largePersonGroupId, - RequestOptions requestOptions) { + public Mono> getTrainingStatusWithResponseAsync(RequestOptions requestOptions) { final String accept = "application/json"; return FluxUtil.withContext(context -> service.getTrainingStatus(this.client.getEndpoint(), - this.client.getServiceVersion().getVersion(), largePersonGroupId, accept, requestOptions, context)); + this.client.getServiceVersion().getVersion(), this.client.getLargePersonGroupId(), accept, requestOptions, + context)); } /** @@ -842,7 +831,6 @@ public Mono> getTrainingStatusWithResponseAsync(String larg * } * } * - * @param largePersonGroupId ID of the container. * @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. @@ -851,11 +839,10 @@ public Mono> getTrainingStatusWithResponseAsync(String larg * @return training result of a container along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getTrainingStatusWithResponse(String largePersonGroupId, - RequestOptions requestOptions) { + public Response getTrainingStatusWithResponse(RequestOptions requestOptions) { final String accept = "application/json"; return service.getTrainingStatusSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), - largePersonGroupId, accept, requestOptions, Context.NONE); + this.client.getLargePersonGroupId(), accept, requestOptions, Context.NONE); } /** @@ -865,7 +852,6 @@ public Response getTrainingStatusWithResponse(String largePersonGrou * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/train-large-person-group for * more details. * - * @param largePersonGroupId ID of the container. * @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. @@ -874,10 +860,11 @@ public Response getTrainingStatusWithResponse(String largePersonGrou * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> trainWithResponseAsync(String largePersonGroupId, RequestOptions requestOptions) { + private Mono> trainWithResponseAsync(RequestOptions requestOptions) { final String accept = "application/json"; - return FluxUtil.withContext(context -> service.train(this.client.getEndpoint(), - this.client.getServiceVersion().getVersion(), largePersonGroupId, accept, requestOptions, context)); + return FluxUtil.withContext( + context -> service.train(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), + this.client.getLargePersonGroupId(), accept, requestOptions, context)); } /** @@ -887,7 +874,6 @@ private Mono> trainWithResponseAsync(String largePersonGroupId, R * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/train-large-person-group for * more details. * - * @param largePersonGroupId ID of the container. * @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. @@ -896,10 +882,10 @@ private Mono> trainWithResponseAsync(String largePersonGroupId, R * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response trainWithResponse(String largePersonGroupId, RequestOptions requestOptions) { + private Response trainWithResponse(RequestOptions requestOptions) { final String accept = "application/json"; return service.trainSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), - largePersonGroupId, accept, requestOptions, Context.NONE); + this.client.getLargePersonGroupId(), accept, requestOptions, Context.NONE); } /** @@ -909,7 +895,6 @@ private Response trainWithResponse(String largePersonGroupId, RequestOptio * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/train-large-person-group for * more details. * - * @param largePersonGroupId ID of the container. * @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. @@ -918,10 +903,8 @@ private Response trainWithResponse(String largePersonGroupId, RequestOptio * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux beginTrainAsync(String largePersonGroupId, - RequestOptions requestOptions) { - return PollerFlux.create(Duration.ofSeconds(1), - () -> this.trainWithResponseAsync(largePersonGroupId, requestOptions), + public PollerFlux beginTrainAsync(RequestOptions requestOptions) { + return PollerFlux.create(Duration.ofSeconds(1), () -> this.trainWithResponseAsync(requestOptions), new DefaultPollingStrategy<>(new PollingStrategyOptions(this.client.getHttpPipeline()) .setEndpoint("{endpoint}/face/{apiVersion}".replace("{endpoint}", this.client.getEndpoint()) .replace("{apiVersion}", this.client.getServiceVersion().getVersion())) @@ -939,7 +922,6 @@ public PollerFlux beginTrainAsync(String largePersonGrou * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/train-large-person-group for * more details. * - * @param largePersonGroupId ID of the container. * @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. @@ -948,9 +930,8 @@ public PollerFlux beginTrainAsync(String largePersonGrou * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller beginTrain(String largePersonGroupId, RequestOptions requestOptions) { - return SyncPoller.createPoller(Duration.ofSeconds(1), - () -> this.trainWithResponse(largePersonGroupId, requestOptions), + public SyncPoller beginTrain(RequestOptions requestOptions) { + return SyncPoller.createPoller(Duration.ofSeconds(1), () -> this.trainWithResponse(requestOptions), new SyncDefaultPollingStrategy<>(new PollingStrategyOptions(this.client.getHttpPipeline()) .setEndpoint("{endpoint}/face/{apiVersion}".replace("{endpoint}", this.client.getEndpoint()) .replace("{apiVersion}", this.client.getServiceVersion().getVersion())) @@ -968,7 +949,6 @@ public SyncPoller beginTrain(String largePersonGroupId, * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/train-large-person-group for * more details. * - * @param largePersonGroupId ID of the container. * @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. @@ -977,10 +957,8 @@ public SyncPoller beginTrain(String largePersonGroupId, * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux beginTrainWithModelAsync(String largePersonGroupId, - RequestOptions requestOptions) { - return PollerFlux.create(Duration.ofSeconds(1), - () -> this.trainWithResponseAsync(largePersonGroupId, requestOptions), + public PollerFlux beginTrainWithModelAsync(RequestOptions requestOptions) { + return PollerFlux.create(Duration.ofSeconds(1), () -> this.trainWithResponseAsync(requestOptions), new DefaultPollingStrategy<>(new PollingStrategyOptions(this.client.getHttpPipeline()) .setEndpoint("{endpoint}/face/{apiVersion}".replace("{endpoint}", this.client.getEndpoint()) .replace("{apiVersion}", this.client.getServiceVersion().getVersion())) @@ -998,7 +976,6 @@ public PollerFlux beginTrainWithModelAsync(String larg * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/train-large-person-group for * more details. * - * @param largePersonGroupId ID of the container. * @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. @@ -1007,10 +984,8 @@ public PollerFlux beginTrainWithModelAsync(String larg * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller beginTrainWithModel(String largePersonGroupId, - RequestOptions requestOptions) { - return SyncPoller.createPoller(Duration.ofSeconds(1), - () -> this.trainWithResponse(largePersonGroupId, requestOptions), + public SyncPoller beginTrainWithModel(RequestOptions requestOptions) { + return SyncPoller.createPoller(Duration.ofSeconds(1), () -> this.trainWithResponse(requestOptions), new SyncDefaultPollingStrategy<>(new PollingStrategyOptions(this.client.getHttpPipeline()) .setEndpoint("{endpoint}/face/{apiVersion}".replace("{endpoint}", this.client.getEndpoint()) .replace("{apiVersion}", this.client.getServiceVersion().getVersion())) @@ -1045,7 +1020,6 @@ public SyncPoller beginTrainWithModel(String largePers * } * } * - * @param largePersonGroupId ID of the container. * @param createPersonRequest The createPersonRequest 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. @@ -1055,13 +1029,13 @@ public SyncPoller beginTrainWithModel(String largePers * @return response of create person along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createPersonWithResponseAsync(String largePersonGroupId, - BinaryData createPersonRequest, RequestOptions requestOptions) { + public Mono> createPersonWithResponseAsync(BinaryData createPersonRequest, + RequestOptions requestOptions) { final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil.withContext( - context -> service.createPerson(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), - largePersonGroupId, contentType, accept, createPersonRequest, requestOptions, context)); + return FluxUtil.withContext(context -> service.createPerson(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), this.client.getLargePersonGroupId(), contentType, accept, + createPersonRequest, requestOptions, context)); } /** @@ -1088,7 +1062,6 @@ public Mono> createPersonWithResponseAsync(String largePers * } * } * - * @param largePersonGroupId ID of the container. * @param createPersonRequest The createPersonRequest 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. @@ -1098,12 +1071,13 @@ public Mono> createPersonWithResponseAsync(String largePers * @return response of create person along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createPersonWithResponse(String largePersonGroupId, BinaryData createPersonRequest, + public Response createPersonWithResponse(BinaryData createPersonRequest, RequestOptions requestOptions) { final String contentType = "application/json"; final String accept = "application/json"; return service.createPersonSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), - largePersonGroupId, contentType, accept, createPersonRequest, requestOptions, Context.NONE); + this.client.getLargePersonGroupId(), contentType, accept, createPersonRequest, requestOptions, + Context.NONE); } /** @@ -1111,7 +1085,6 @@ public Response createPersonWithResponse(String largePersonGroupId, * https://learn.microsoft.com/rest/api/face/person-group-operations/delete-large-person-group-person for more * details. * - * @param largePersonGroupId ID of the container. * @param personId ID of the person. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -1121,12 +1094,11 @@ public Response createPersonWithResponse(String largePersonGroupId, * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deletePersonWithResponseAsync(String largePersonGroupId, String personId, - RequestOptions requestOptions) { + public Mono> deletePersonWithResponseAsync(String personId, RequestOptions requestOptions) { final String accept = "application/json"; return FluxUtil.withContext( context -> service.deletePerson(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), - largePersonGroupId, personId, accept, requestOptions, context)); + this.client.getLargePersonGroupId(), personId, accept, requestOptions, context)); } /** @@ -1134,7 +1106,6 @@ public Mono> deletePersonWithResponseAsync(String largePersonGrou * https://learn.microsoft.com/rest/api/face/person-group-operations/delete-large-person-group-person for more * details. * - * @param largePersonGroupId ID of the container. * @param personId ID of the person. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -1144,11 +1115,10 @@ public Mono> deletePersonWithResponseAsync(String largePersonGrou * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deletePersonWithResponse(String largePersonGroupId, String personId, - RequestOptions requestOptions) { + public Response deletePersonWithResponse(String personId, RequestOptions requestOptions) { final String accept = "application/json"; return service.deletePersonSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), - largePersonGroupId, personId, accept, requestOptions, Context.NONE); + this.client.getLargePersonGroupId(), personId, accept, requestOptions, Context.NONE); } /** @@ -1167,7 +1137,6 @@ public Response deletePersonWithResponse(String largePersonGroupId, String * } * } * - * @param largePersonGroupId ID of the container. * @param personId ID of the person. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -1178,12 +1147,11 @@ public Response deletePersonWithResponse(String largePersonGroupId, String * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getPersonWithResponseAsync(String largePersonGroupId, String personId, - RequestOptions requestOptions) { + public Mono> getPersonWithResponseAsync(String personId, RequestOptions requestOptions) { final String accept = "application/json"; return FluxUtil.withContext( context -> service.getPerson(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), - largePersonGroupId, personId, accept, requestOptions, context)); + this.client.getLargePersonGroupId(), personId, accept, requestOptions, context)); } /** @@ -1202,7 +1170,6 @@ public Mono> getPersonWithResponseAsync(String largePersonG * } * } * - * @param largePersonGroupId ID of the container. * @param personId ID of the person. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -1212,11 +1179,10 @@ public Mono> getPersonWithResponseAsync(String largePersonG * @return the person in a specified large person group along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getPersonWithResponse(String largePersonGroupId, String personId, - RequestOptions requestOptions) { + public Response getPersonWithResponse(String personId, RequestOptions requestOptions) { final String accept = "application/json"; return service.getPersonSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), - largePersonGroupId, personId, accept, requestOptions, Context.NONE); + this.client.getLargePersonGroupId(), personId, accept, requestOptions, Context.NONE); } /** @@ -1232,7 +1198,6 @@ public Response getPersonWithResponse(String largePersonGroupId, Str * } * } * - * @param largePersonGroupId ID of the container. * @param personId ID of the person. * @param updatePersonRequest The updatePersonRequest parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -1243,13 +1208,13 @@ public Response getPersonWithResponse(String largePersonGroupId, Str * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updatePersonWithResponseAsync(String largePersonGroupId, String personId, - BinaryData updatePersonRequest, RequestOptions requestOptions) { + public Mono> updatePersonWithResponseAsync(String personId, BinaryData updatePersonRequest, + RequestOptions requestOptions) { final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil.withContext( - context -> service.updatePerson(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), - largePersonGroupId, personId, contentType, accept, updatePersonRequest, requestOptions, context)); + return FluxUtil.withContext(context -> service.updatePerson(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), this.client.getLargePersonGroupId(), personId, contentType, + accept, updatePersonRequest, requestOptions, context)); } /** @@ -1265,7 +1230,6 @@ public Mono> updatePersonWithResponseAsync(String largePersonGrou * } * } * - * @param largePersonGroupId ID of the container. * @param personId ID of the person. * @param updatePersonRequest The updatePersonRequest parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -1276,12 +1240,13 @@ public Mono> updatePersonWithResponseAsync(String largePersonGrou * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updatePersonWithResponse(String largePersonGroupId, String personId, - BinaryData updatePersonRequest, RequestOptions requestOptions) { + public Response updatePersonWithResponse(String personId, BinaryData updatePersonRequest, + RequestOptions requestOptions) { final String contentType = "application/json"; final String accept = "application/json"; return service.updatePersonSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), - largePersonGroupId, personId, contentType, accept, updatePersonRequest, requestOptions, Context.NONE); + this.client.getLargePersonGroupId(), personId, contentType, accept, updatePersonRequest, requestOptions, + Context.NONE); } /** @@ -1315,7 +1280,6 @@ public Response updatePersonWithResponse(String largePersonGroupId, String * ] * } * - * @param largePersonGroupId ID of the container. * @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. @@ -1324,11 +1288,11 @@ public Response updatePersonWithResponse(String largePersonGroupId, String * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getPersonsWithResponseAsync(String largePersonGroupId, - RequestOptions requestOptions) { + public Mono> getPersonsWithResponseAsync(RequestOptions requestOptions) { final String accept = "application/json"; - return FluxUtil.withContext(context -> service.getPersons(this.client.getEndpoint(), - this.client.getServiceVersion().getVersion(), largePersonGroupId, accept, requestOptions, context)); + return FluxUtil.withContext( + context -> service.getPersons(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), + this.client.getLargePersonGroupId(), accept, requestOptions, context)); } /** @@ -1362,7 +1326,6 @@ public Mono> getPersonsWithResponseAsync(String largePerson * ] * } * - * @param largePersonGroupId ID of the container. * @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. @@ -1371,10 +1334,10 @@ public Mono> getPersonsWithResponseAsync(String largePerson * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getPersonsWithResponse(String largePersonGroupId, RequestOptions requestOptions) { + public Response getPersonsWithResponse(RequestOptions requestOptions) { final String accept = "application/json"; return service.getPersonsSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), - largePersonGroupId, accept, requestOptions, Context.NONE); + this.client.getLargePersonGroupId(), accept, requestOptions, Context.NONE); } /** @@ -1413,7 +1376,6 @@ public Response getPersonsWithResponse(String largePersonGroupId, Re * } * } * - * @param largePersonGroupId ID of the container. * @param personId ID of the person. * @param addFaceFromUrlRequest The addFaceFromUrlRequest parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -1424,13 +1386,13 @@ public Response getPersonsWithResponse(String largePersonGroupId, Re * @return response body for adding face along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> addFaceFromUrlImplWithResponseAsync(String largePersonGroupId, String personId, + public Mono> addFaceFromUrlImplWithResponseAsync(String personId, BinaryData addFaceFromUrlRequest, RequestOptions requestOptions) { final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil.withContext(context -> service.addFaceFromUrlImpl(this.client.getEndpoint(), - this.client.getServiceVersion().getVersion(), largePersonGroupId, personId, contentType, accept, - addFaceFromUrlRequest, requestOptions, context)); + this.client.getServiceVersion().getVersion(), this.client.getLargePersonGroupId(), personId, contentType, + accept, addFaceFromUrlRequest, requestOptions, context)); } /** @@ -1469,7 +1431,6 @@ public Mono> addFaceFromUrlImplWithResponseAsync(String lar * } * } * - * @param largePersonGroupId ID of the container. * @param personId ID of the person. * @param addFaceFromUrlRequest The addFaceFromUrlRequest parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -1480,12 +1441,13 @@ public Mono> addFaceFromUrlImplWithResponseAsync(String lar * @return response body for adding face along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response addFaceFromUrlImplWithResponse(String largePersonGroupId, String personId, - BinaryData addFaceFromUrlRequest, RequestOptions requestOptions) { + public Response addFaceFromUrlImplWithResponse(String personId, BinaryData addFaceFromUrlRequest, + RequestOptions requestOptions) { final String contentType = "application/json"; final String accept = "application/json"; return service.addFaceFromUrlImplSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), - largePersonGroupId, personId, contentType, accept, addFaceFromUrlRequest, requestOptions, Context.NONE); + this.client.getLargePersonGroupId(), personId, contentType, accept, addFaceFromUrlRequest, requestOptions, + Context.NONE); } /** @@ -1522,7 +1484,6 @@ public Response addFaceFromUrlImplWithResponse(String largePersonGro * } * } * - * @param largePersonGroupId ID of the container. * @param personId ID of the person. * @param imageContent The image to be analyzed. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -1533,13 +1494,13 @@ public Response addFaceFromUrlImplWithResponse(String largePersonGro * @return response body for adding face along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> addFaceImplWithResponseAsync(String largePersonGroupId, String personId, - BinaryData imageContent, RequestOptions requestOptions) { + public Mono> addFaceImplWithResponseAsync(String personId, BinaryData imageContent, + RequestOptions requestOptions) { final String contentType = "application/octet-stream"; final String accept = "application/json"; - return FluxUtil.withContext( - context -> service.addFaceImpl(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), - largePersonGroupId, personId, contentType, accept, imageContent, requestOptions, context)); + return FluxUtil.withContext(context -> service.addFaceImpl(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), this.client.getLargePersonGroupId(), personId, contentType, + accept, imageContent, requestOptions, context)); } /** @@ -1576,7 +1537,6 @@ public Mono> addFaceImplWithResponseAsync(String largePerso * } * } * - * @param largePersonGroupId ID of the container. * @param personId ID of the person. * @param imageContent The image to be analyzed. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -1587,12 +1547,13 @@ public Mono> addFaceImplWithResponseAsync(String largePerso * @return response body for adding face along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response addFaceImplWithResponse(String largePersonGroupId, String personId, - BinaryData imageContent, RequestOptions requestOptions) { + public Response addFaceImplWithResponse(String personId, BinaryData imageContent, + RequestOptions requestOptions) { final String contentType = "application/octet-stream"; final String accept = "application/json"; return service.addFaceImplSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), - largePersonGroupId, personId, contentType, accept, imageContent, requestOptions, Context.NONE); + this.client.getLargePersonGroupId(), personId, contentType, accept, imageContent, requestOptions, + Context.NONE); } /** @@ -1603,7 +1564,6 @@ public Response addFaceImplWithResponse(String largePersonGroupId, S * https://learn.microsoft.com/rest/api/face/person-group-operations/delete-large-person-group-person-face for more * details. * - * @param largePersonGroupId ID of the container. * @param personId ID of the person. * @param persistedFaceId Face ID of the face. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -1614,12 +1574,12 @@ public Response addFaceImplWithResponse(String largePersonGroupId, S * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteFaceWithResponseAsync(String largePersonGroupId, String personId, - String persistedFaceId, RequestOptions requestOptions) { + public Mono> deleteFaceWithResponseAsync(String personId, String persistedFaceId, + RequestOptions requestOptions) { final String accept = "application/json"; return FluxUtil.withContext( context -> service.deleteFace(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), - largePersonGroupId, personId, persistedFaceId, accept, requestOptions, context)); + this.client.getLargePersonGroupId(), personId, persistedFaceId, accept, requestOptions, context)); } /** @@ -1630,7 +1590,6 @@ public Mono> deleteFaceWithResponseAsync(String largePersonGroupI * https://learn.microsoft.com/rest/api/face/person-group-operations/delete-large-person-group-person-face for more * details. * - * @param largePersonGroupId ID of the container. * @param personId ID of the person. * @param persistedFaceId Face ID of the face. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -1641,11 +1600,11 @@ public Mono> deleteFaceWithResponseAsync(String largePersonGroupI * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteFaceWithResponse(String largePersonGroupId, String personId, String persistedFaceId, + public Response deleteFaceWithResponse(String personId, String persistedFaceId, RequestOptions requestOptions) { final String accept = "application/json"; return service.deleteFaceSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), - largePersonGroupId, personId, persistedFaceId, accept, requestOptions, Context.NONE); + this.client.getLargePersonGroupId(), personId, persistedFaceId, accept, requestOptions, Context.NONE); } /** @@ -1661,7 +1620,6 @@ public Response deleteFaceWithResponse(String largePersonGroupId, String p * } * } * - * @param largePersonGroupId ID of the container. * @param personId ID of the person. * @param persistedFaceId Face ID of the face. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -1673,12 +1631,12 @@ public Response deleteFaceWithResponse(String largePersonGroupId, String p * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getFaceWithResponseAsync(String largePersonGroupId, String personId, - String persistedFaceId, RequestOptions requestOptions) { + public Mono> getFaceWithResponseAsync(String personId, String persistedFaceId, + RequestOptions requestOptions) { final String accept = "application/json"; return FluxUtil.withContext( context -> service.getFace(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), - largePersonGroupId, personId, persistedFaceId, accept, requestOptions, context)); + this.client.getLargePersonGroupId(), personId, persistedFaceId, accept, requestOptions, context)); } /** @@ -1694,7 +1652,6 @@ public Mono> getFaceWithResponseAsync(String largePersonGro * } * } * - * @param largePersonGroupId ID of the container. * @param personId ID of the person. * @param persistedFaceId Face ID of the face. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -1705,11 +1662,11 @@ public Mono> getFaceWithResponseAsync(String largePersonGro * @return face resource for large person group person along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getFaceWithResponse(String largePersonGroupId, String personId, String persistedFaceId, + public Response getFaceWithResponse(String personId, String persistedFaceId, RequestOptions requestOptions) { final String accept = "application/json"; return service.getFaceSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), - largePersonGroupId, personId, persistedFaceId, accept, requestOptions, Context.NONE); + this.client.getLargePersonGroupId(), personId, persistedFaceId, accept, requestOptions, Context.NONE); } /** @@ -1724,7 +1681,6 @@ public Response getFaceWithResponse(String largePersonGroupId, Strin * } * } * - * @param largePersonGroupId ID of the container. * @param personId ID of the person. * @param persistedFaceId Face ID of the face. * @param updateFaceRequest The updateFaceRequest parameter. @@ -1736,13 +1692,13 @@ public Response getFaceWithResponse(String largePersonGroupId, Strin * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateFaceWithResponseAsync(String largePersonGroupId, String personId, - String persistedFaceId, BinaryData updateFaceRequest, RequestOptions requestOptions) { + public Mono> updateFaceWithResponseAsync(String personId, String persistedFaceId, + BinaryData updateFaceRequest, RequestOptions requestOptions) { final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil.withContext(context -> service.updateFace(this.client.getEndpoint(), - this.client.getServiceVersion().getVersion(), largePersonGroupId, personId, persistedFaceId, contentType, - accept, updateFaceRequest, requestOptions, context)); + this.client.getServiceVersion().getVersion(), this.client.getLargePersonGroupId(), personId, + persistedFaceId, contentType, accept, updateFaceRequest, requestOptions, context)); } /** @@ -1757,7 +1713,6 @@ public Mono> updateFaceWithResponseAsync(String largePersonGroupI * } * } * - * @param largePersonGroupId ID of the container. * @param personId ID of the person. * @param persistedFaceId Face ID of the face. * @param updateFaceRequest The updateFaceRequest parameter. @@ -1769,12 +1724,12 @@ public Mono> updateFaceWithResponseAsync(String largePersonGroupI * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateFaceWithResponse(String largePersonGroupId, String personId, String persistedFaceId, - BinaryData updateFaceRequest, RequestOptions requestOptions) { + public Response updateFaceWithResponse(String personId, String persistedFaceId, BinaryData updateFaceRequest, + RequestOptions requestOptions) { final String contentType = "application/json"; final String accept = "application/json"; return service.updateFaceSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), - largePersonGroupId, personId, persistedFaceId, contentType, accept, updateFaceRequest, requestOptions, - Context.NONE); + this.client.getLargePersonGroupId(), personId, persistedFaceId, contentType, accept, updateFaceRequest, + requestOptions, Context.NONE); } } diff --git a/sdk/face/azure-ai-vision-face/src/main/java/module-info.java b/sdk/face/azure-ai-vision-face/src/main/java/module-info.java index 5f89d71fec9c..877286674b86 100644 --- a/sdk/face/azure-ai-vision-face/src/main/java/module-info.java +++ b/sdk/face/azure-ai-vision-face/src/main/java/module-info.java @@ -5,6 +5,7 @@ module com.azure.ai.vision.face { requires transitive com.azure.core; exports com.azure.ai.vision.face; + exports com.azure.ai.vision.face.administration; exports com.azure.ai.vision.face.models; opens com.azure.ai.vision.face.implementation.models to com.azure.core; opens com.azure.ai.vision.face.models to com.azure.core; diff --git a/sdk/face/azure-ai-vision-face/src/main/resources/META-INF/azure-ai-vision-face_apiview_properties.json b/sdk/face/azure-ai-vision-face/src/main/resources/META-INF/azure-ai-vision-face_apiview_properties.json index 21ed9ca1932d..a028a075eab0 100644 --- a/sdk/face/azure-ai-vision-face/src/main/resources/META-INF/azure-ai-vision-face_apiview_properties.json +++ b/sdk/face/azure-ai-vision-face/src/main/resources/META-INF/azure-ai-vision-face_apiview_properties.json @@ -1,7 +1,6 @@ { "flavor": "azure", "CrossLanguageDefinitionId": { - "com.azure.ai.vision.face.FaceAdministrationClientBuilder": "ClientCustomizations.FaceAdministrationClient", "com.azure.ai.vision.face.FaceAsyncClient": "ClientCustomizations.FaceClient", "com.azure.ai.vision.face.FaceAsyncClient.detectFromUrlImpl": "ClientCustomizations.FaceClient.detectFromUrl", "com.azure.ai.vision.face.FaceAsyncClient.detectFromUrlImplWithResponse": "ClientCustomizations.FaceClient.detectFromUrl", @@ -92,130 +91,131 @@ "com.azure.ai.vision.face.FaceSessionClient.getSessionImage": "ClientCustomizations.FaceSessionClient.getSessionImage", "com.azure.ai.vision.face.FaceSessionClient.getSessionImageWithResponse": "ClientCustomizations.FaceSessionClient.getSessionImage", "com.azure.ai.vision.face.FaceSessionClientBuilder": "ClientCustomizations.FaceSessionClient", - "com.azure.ai.vision.face.LargeFaceListAsyncClient": "null", - "com.azure.ai.vision.face.LargeFaceListAsyncClient.addFaceFromUrlImpl": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.addFaceFromUrl", - "com.azure.ai.vision.face.LargeFaceListAsyncClient.addFaceFromUrlImplWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.addFaceFromUrl", - "com.azure.ai.vision.face.LargeFaceListAsyncClient.addFaceImpl": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.addFace", - "com.azure.ai.vision.face.LargeFaceListAsyncClient.addFaceImplWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.addFace", - "com.azure.ai.vision.face.LargeFaceListAsyncClient.beginTrain": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.train", - "com.azure.ai.vision.face.LargeFaceListAsyncClient.beginTrainWithModel": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.train", - "com.azure.ai.vision.face.LargeFaceListAsyncClient.create": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.create", - "com.azure.ai.vision.face.LargeFaceListAsyncClient.createWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.create", - "com.azure.ai.vision.face.LargeFaceListAsyncClient.delete": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.delete", - "com.azure.ai.vision.face.LargeFaceListAsyncClient.deleteFace": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.deleteFace", - "com.azure.ai.vision.face.LargeFaceListAsyncClient.deleteFaceWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.deleteFace", - "com.azure.ai.vision.face.LargeFaceListAsyncClient.deleteWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.delete", - "com.azure.ai.vision.face.LargeFaceListAsyncClient.get": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.get", - "com.azure.ai.vision.face.LargeFaceListAsyncClient.getFace": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.getFace", - "com.azure.ai.vision.face.LargeFaceListAsyncClient.getFaceWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.getFace", - "com.azure.ai.vision.face.LargeFaceListAsyncClient.getFaces": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.getFaces", - "com.azure.ai.vision.face.LargeFaceListAsyncClient.getFacesWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.getFaces", - "com.azure.ai.vision.face.LargeFaceListAsyncClient.getLargeFaceLists": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.getLargeFaceLists", - "com.azure.ai.vision.face.LargeFaceListAsyncClient.getLargeFaceListsWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.getLargeFaceLists", - "com.azure.ai.vision.face.LargeFaceListAsyncClient.getTrainingStatus": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.getTrainingStatus", - "com.azure.ai.vision.face.LargeFaceListAsyncClient.getTrainingStatusWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.getTrainingStatus", - "com.azure.ai.vision.face.LargeFaceListAsyncClient.getWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.get", - "com.azure.ai.vision.face.LargeFaceListAsyncClient.update": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.update", - "com.azure.ai.vision.face.LargeFaceListAsyncClient.updateFace": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.updateFace", - "com.azure.ai.vision.face.LargeFaceListAsyncClient.updateFaceWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.updateFace", - "com.azure.ai.vision.face.LargeFaceListAsyncClient.updateWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.update", - "com.azure.ai.vision.face.LargeFaceListClient": "null", - "com.azure.ai.vision.face.LargeFaceListClient.addFaceFromUrlImpl": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.addFaceFromUrl", - "com.azure.ai.vision.face.LargeFaceListClient.addFaceFromUrlImplWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.addFaceFromUrl", - "com.azure.ai.vision.face.LargeFaceListClient.addFaceImpl": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.addFace", - "com.azure.ai.vision.face.LargeFaceListClient.addFaceImplWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.addFace", - "com.azure.ai.vision.face.LargeFaceListClient.beginTrain": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.train", - "com.azure.ai.vision.face.LargeFaceListClient.beginTrainWithModel": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.train", - "com.azure.ai.vision.face.LargeFaceListClient.create": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.create", - "com.azure.ai.vision.face.LargeFaceListClient.createWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.create", - "com.azure.ai.vision.face.LargeFaceListClient.delete": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.delete", - "com.azure.ai.vision.face.LargeFaceListClient.deleteFace": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.deleteFace", - "com.azure.ai.vision.face.LargeFaceListClient.deleteFaceWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.deleteFace", - "com.azure.ai.vision.face.LargeFaceListClient.deleteWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.delete", - "com.azure.ai.vision.face.LargeFaceListClient.get": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.get", - "com.azure.ai.vision.face.LargeFaceListClient.getFace": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.getFace", - "com.azure.ai.vision.face.LargeFaceListClient.getFaceWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.getFace", - "com.azure.ai.vision.face.LargeFaceListClient.getFaces": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.getFaces", - "com.azure.ai.vision.face.LargeFaceListClient.getFacesWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.getFaces", - "com.azure.ai.vision.face.LargeFaceListClient.getLargeFaceLists": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.getLargeFaceLists", - "com.azure.ai.vision.face.LargeFaceListClient.getLargeFaceListsWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.getLargeFaceLists", - "com.azure.ai.vision.face.LargeFaceListClient.getTrainingStatus": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.getTrainingStatus", - "com.azure.ai.vision.face.LargeFaceListClient.getTrainingStatusWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.getTrainingStatus", - "com.azure.ai.vision.face.LargeFaceListClient.getWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.get", - "com.azure.ai.vision.face.LargeFaceListClient.update": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.update", - "com.azure.ai.vision.face.LargeFaceListClient.updateFace": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.updateFace", - "com.azure.ai.vision.face.LargeFaceListClient.updateFaceWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.updateFace", - "com.azure.ai.vision.face.LargeFaceListClient.updateWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.update", - "com.azure.ai.vision.face.LargePersonGroupAsyncClient": "null", - "com.azure.ai.vision.face.LargePersonGroupAsyncClient.addFaceFromUrlImpl": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.addFaceFromUrl", - "com.azure.ai.vision.face.LargePersonGroupAsyncClient.addFaceFromUrlImplWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.addFaceFromUrl", - "com.azure.ai.vision.face.LargePersonGroupAsyncClient.addFaceImpl": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.addFace", - "com.azure.ai.vision.face.LargePersonGroupAsyncClient.addFaceImplWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.addFace", - "com.azure.ai.vision.face.LargePersonGroupAsyncClient.beginTrain": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.train", - "com.azure.ai.vision.face.LargePersonGroupAsyncClient.beginTrainWithModel": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.train", - "com.azure.ai.vision.face.LargePersonGroupAsyncClient.create": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.create", - "com.azure.ai.vision.face.LargePersonGroupAsyncClient.createPerson": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.createPerson", - "com.azure.ai.vision.face.LargePersonGroupAsyncClient.createPersonWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.createPerson", - "com.azure.ai.vision.face.LargePersonGroupAsyncClient.createWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.create", - "com.azure.ai.vision.face.LargePersonGroupAsyncClient.delete": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.delete", - "com.azure.ai.vision.face.LargePersonGroupAsyncClient.deleteFace": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.deleteFace", - "com.azure.ai.vision.face.LargePersonGroupAsyncClient.deleteFaceWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.deleteFace", - "com.azure.ai.vision.face.LargePersonGroupAsyncClient.deletePerson": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.deletePerson", - "com.azure.ai.vision.face.LargePersonGroupAsyncClient.deletePersonWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.deletePerson", - "com.azure.ai.vision.face.LargePersonGroupAsyncClient.deleteWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.delete", - "com.azure.ai.vision.face.LargePersonGroupAsyncClient.get": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.get", - "com.azure.ai.vision.face.LargePersonGroupAsyncClient.getFace": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.getFace", - "com.azure.ai.vision.face.LargePersonGroupAsyncClient.getFaceWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.getFace", - "com.azure.ai.vision.face.LargePersonGroupAsyncClient.getLargePersonGroups": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.getLargePersonGroups", - "com.azure.ai.vision.face.LargePersonGroupAsyncClient.getLargePersonGroupsWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.getLargePersonGroups", - "com.azure.ai.vision.face.LargePersonGroupAsyncClient.getPerson": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.getPerson", - "com.azure.ai.vision.face.LargePersonGroupAsyncClient.getPersonWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.getPerson", - "com.azure.ai.vision.face.LargePersonGroupAsyncClient.getPersons": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.getPersons", - "com.azure.ai.vision.face.LargePersonGroupAsyncClient.getPersonsWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.getPersons", - "com.azure.ai.vision.face.LargePersonGroupAsyncClient.getTrainingStatus": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.getTrainingStatus", - "com.azure.ai.vision.face.LargePersonGroupAsyncClient.getTrainingStatusWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.getTrainingStatus", - "com.azure.ai.vision.face.LargePersonGroupAsyncClient.getWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.get", - "com.azure.ai.vision.face.LargePersonGroupAsyncClient.update": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.update", - "com.azure.ai.vision.face.LargePersonGroupAsyncClient.updateFace": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.updateFace", - "com.azure.ai.vision.face.LargePersonGroupAsyncClient.updateFaceWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.updateFace", - "com.azure.ai.vision.face.LargePersonGroupAsyncClient.updatePerson": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.updatePerson", - "com.azure.ai.vision.face.LargePersonGroupAsyncClient.updatePersonWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.updatePerson", - "com.azure.ai.vision.face.LargePersonGroupAsyncClient.updateWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.update", - "com.azure.ai.vision.face.LargePersonGroupClient": "null", - "com.azure.ai.vision.face.LargePersonGroupClient.addFaceFromUrlImpl": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.addFaceFromUrl", - "com.azure.ai.vision.face.LargePersonGroupClient.addFaceFromUrlImplWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.addFaceFromUrl", - "com.azure.ai.vision.face.LargePersonGroupClient.addFaceImpl": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.addFace", - "com.azure.ai.vision.face.LargePersonGroupClient.addFaceImplWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.addFace", - "com.azure.ai.vision.face.LargePersonGroupClient.beginTrain": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.train", - "com.azure.ai.vision.face.LargePersonGroupClient.beginTrainWithModel": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.train", - "com.azure.ai.vision.face.LargePersonGroupClient.create": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.create", - "com.azure.ai.vision.face.LargePersonGroupClient.createPerson": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.createPerson", - "com.azure.ai.vision.face.LargePersonGroupClient.createPersonWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.createPerson", - "com.azure.ai.vision.face.LargePersonGroupClient.createWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.create", - "com.azure.ai.vision.face.LargePersonGroupClient.delete": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.delete", - "com.azure.ai.vision.face.LargePersonGroupClient.deleteFace": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.deleteFace", - "com.azure.ai.vision.face.LargePersonGroupClient.deleteFaceWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.deleteFace", - "com.azure.ai.vision.face.LargePersonGroupClient.deletePerson": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.deletePerson", - "com.azure.ai.vision.face.LargePersonGroupClient.deletePersonWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.deletePerson", - "com.azure.ai.vision.face.LargePersonGroupClient.deleteWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.delete", - "com.azure.ai.vision.face.LargePersonGroupClient.get": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.get", - "com.azure.ai.vision.face.LargePersonGroupClient.getFace": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.getFace", - "com.azure.ai.vision.face.LargePersonGroupClient.getFaceWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.getFace", - "com.azure.ai.vision.face.LargePersonGroupClient.getLargePersonGroups": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.getLargePersonGroups", - "com.azure.ai.vision.face.LargePersonGroupClient.getLargePersonGroupsWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.getLargePersonGroups", - "com.azure.ai.vision.face.LargePersonGroupClient.getPerson": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.getPerson", - "com.azure.ai.vision.face.LargePersonGroupClient.getPersonWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.getPerson", - "com.azure.ai.vision.face.LargePersonGroupClient.getPersons": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.getPersons", - "com.azure.ai.vision.face.LargePersonGroupClient.getPersonsWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.getPersons", - "com.azure.ai.vision.face.LargePersonGroupClient.getTrainingStatus": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.getTrainingStatus", - "com.azure.ai.vision.face.LargePersonGroupClient.getTrainingStatusWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.getTrainingStatus", - "com.azure.ai.vision.face.LargePersonGroupClient.getWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.get", - "com.azure.ai.vision.face.LargePersonGroupClient.update": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.update", - "com.azure.ai.vision.face.LargePersonGroupClient.updateFace": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.updateFace", - "com.azure.ai.vision.face.LargePersonGroupClient.updateFaceWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.updateFace", - "com.azure.ai.vision.face.LargePersonGroupClient.updatePerson": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.updatePerson", - "com.azure.ai.vision.face.LargePersonGroupClient.updatePersonWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.updatePerson", - "com.azure.ai.vision.face.LargePersonGroupClient.updateWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.update", + "com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder": "ClientCustomizations.FaceAdministrationClient", + "com.azure.ai.vision.face.administration.LargeFaceListAsyncClient": "null", + "com.azure.ai.vision.face.administration.LargeFaceListAsyncClient.addFaceFromUrlImpl": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.addFaceFromUrl", + "com.azure.ai.vision.face.administration.LargeFaceListAsyncClient.addFaceFromUrlImplWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.addFaceFromUrl", + "com.azure.ai.vision.face.administration.LargeFaceListAsyncClient.addFaceImpl": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.addFace", + "com.azure.ai.vision.face.administration.LargeFaceListAsyncClient.addFaceImplWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.addFace", + "com.azure.ai.vision.face.administration.LargeFaceListAsyncClient.beginTrain": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.train", + "com.azure.ai.vision.face.administration.LargeFaceListAsyncClient.beginTrainWithModel": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.train", + "com.azure.ai.vision.face.administration.LargeFaceListAsyncClient.create": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.create", + "com.azure.ai.vision.face.administration.LargeFaceListAsyncClient.createWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.create", + "com.azure.ai.vision.face.administration.LargeFaceListAsyncClient.delete": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.delete", + "com.azure.ai.vision.face.administration.LargeFaceListAsyncClient.deleteFace": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.deleteFace", + "com.azure.ai.vision.face.administration.LargeFaceListAsyncClient.deleteFaceWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.deleteFace", + "com.azure.ai.vision.face.administration.LargeFaceListAsyncClient.deleteWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.delete", + "com.azure.ai.vision.face.administration.LargeFaceListAsyncClient.get": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.get", + "com.azure.ai.vision.face.administration.LargeFaceListAsyncClient.getFace": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.getFace", + "com.azure.ai.vision.face.administration.LargeFaceListAsyncClient.getFaceWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.getFace", + "com.azure.ai.vision.face.administration.LargeFaceListAsyncClient.getFaces": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.getFaces", + "com.azure.ai.vision.face.administration.LargeFaceListAsyncClient.getFacesWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.getFaces", + "com.azure.ai.vision.face.administration.LargeFaceListAsyncClient.getLargeFaceLists": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.getLargeFaceLists", + "com.azure.ai.vision.face.administration.LargeFaceListAsyncClient.getLargeFaceListsWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.getLargeFaceLists", + "com.azure.ai.vision.face.administration.LargeFaceListAsyncClient.getTrainingStatus": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.getTrainingStatus", + "com.azure.ai.vision.face.administration.LargeFaceListAsyncClient.getTrainingStatusWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.getTrainingStatus", + "com.azure.ai.vision.face.administration.LargeFaceListAsyncClient.getWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.get", + "com.azure.ai.vision.face.administration.LargeFaceListAsyncClient.update": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.update", + "com.azure.ai.vision.face.administration.LargeFaceListAsyncClient.updateFace": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.updateFace", + "com.azure.ai.vision.face.administration.LargeFaceListAsyncClient.updateFaceWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.updateFace", + "com.azure.ai.vision.face.administration.LargeFaceListAsyncClient.updateWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.update", + "com.azure.ai.vision.face.administration.LargeFaceListClient": "null", + "com.azure.ai.vision.face.administration.LargeFaceListClient.addFaceFromUrlImpl": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.addFaceFromUrl", + "com.azure.ai.vision.face.administration.LargeFaceListClient.addFaceFromUrlImplWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.addFaceFromUrl", + "com.azure.ai.vision.face.administration.LargeFaceListClient.addFaceImpl": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.addFace", + "com.azure.ai.vision.face.administration.LargeFaceListClient.addFaceImplWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.addFace", + "com.azure.ai.vision.face.administration.LargeFaceListClient.beginTrain": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.train", + "com.azure.ai.vision.face.administration.LargeFaceListClient.beginTrainWithModel": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.train", + "com.azure.ai.vision.face.administration.LargeFaceListClient.create": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.create", + "com.azure.ai.vision.face.administration.LargeFaceListClient.createWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.create", + "com.azure.ai.vision.face.administration.LargeFaceListClient.delete": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.delete", + "com.azure.ai.vision.face.administration.LargeFaceListClient.deleteFace": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.deleteFace", + "com.azure.ai.vision.face.administration.LargeFaceListClient.deleteFaceWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.deleteFace", + "com.azure.ai.vision.face.administration.LargeFaceListClient.deleteWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.delete", + "com.azure.ai.vision.face.administration.LargeFaceListClient.get": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.get", + "com.azure.ai.vision.face.administration.LargeFaceListClient.getFace": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.getFace", + "com.azure.ai.vision.face.administration.LargeFaceListClient.getFaceWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.getFace", + "com.azure.ai.vision.face.administration.LargeFaceListClient.getFaces": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.getFaces", + "com.azure.ai.vision.face.administration.LargeFaceListClient.getFacesWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.getFaces", + "com.azure.ai.vision.face.administration.LargeFaceListClient.getLargeFaceLists": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.getLargeFaceLists", + "com.azure.ai.vision.face.administration.LargeFaceListClient.getLargeFaceListsWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.getLargeFaceLists", + "com.azure.ai.vision.face.administration.LargeFaceListClient.getTrainingStatus": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.getTrainingStatus", + "com.azure.ai.vision.face.administration.LargeFaceListClient.getTrainingStatusWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.getTrainingStatus", + "com.azure.ai.vision.face.administration.LargeFaceListClient.getWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.get", + "com.azure.ai.vision.face.administration.LargeFaceListClient.update": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.update", + "com.azure.ai.vision.face.administration.LargeFaceListClient.updateFace": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.updateFace", + "com.azure.ai.vision.face.administration.LargeFaceListClient.updateFaceWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.updateFace", + "com.azure.ai.vision.face.administration.LargeFaceListClient.updateWithResponse": "ClientCustomizations.FaceAdministrationClient.LargeFaceList.update", + "com.azure.ai.vision.face.administration.LargePersonGroupAsyncClient": "null", + "com.azure.ai.vision.face.administration.LargePersonGroupAsyncClient.addFaceFromUrlImpl": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.addFaceFromUrl", + "com.azure.ai.vision.face.administration.LargePersonGroupAsyncClient.addFaceFromUrlImplWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.addFaceFromUrl", + "com.azure.ai.vision.face.administration.LargePersonGroupAsyncClient.addFaceImpl": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.addFace", + "com.azure.ai.vision.face.administration.LargePersonGroupAsyncClient.addFaceImplWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.addFace", + "com.azure.ai.vision.face.administration.LargePersonGroupAsyncClient.beginTrain": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.train", + "com.azure.ai.vision.face.administration.LargePersonGroupAsyncClient.beginTrainWithModel": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.train", + "com.azure.ai.vision.face.administration.LargePersonGroupAsyncClient.create": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.create", + "com.azure.ai.vision.face.administration.LargePersonGroupAsyncClient.createPerson": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.createPerson", + "com.azure.ai.vision.face.administration.LargePersonGroupAsyncClient.createPersonWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.createPerson", + "com.azure.ai.vision.face.administration.LargePersonGroupAsyncClient.createWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.create", + "com.azure.ai.vision.face.administration.LargePersonGroupAsyncClient.delete": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.delete", + "com.azure.ai.vision.face.administration.LargePersonGroupAsyncClient.deleteFace": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.deleteFace", + "com.azure.ai.vision.face.administration.LargePersonGroupAsyncClient.deleteFaceWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.deleteFace", + "com.azure.ai.vision.face.administration.LargePersonGroupAsyncClient.deletePerson": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.deletePerson", + "com.azure.ai.vision.face.administration.LargePersonGroupAsyncClient.deletePersonWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.deletePerson", + "com.azure.ai.vision.face.administration.LargePersonGroupAsyncClient.deleteWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.delete", + "com.azure.ai.vision.face.administration.LargePersonGroupAsyncClient.get": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.get", + "com.azure.ai.vision.face.administration.LargePersonGroupAsyncClient.getFace": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.getFace", + "com.azure.ai.vision.face.administration.LargePersonGroupAsyncClient.getFaceWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.getFace", + "com.azure.ai.vision.face.administration.LargePersonGroupAsyncClient.getLargePersonGroups": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.getLargePersonGroups", + "com.azure.ai.vision.face.administration.LargePersonGroupAsyncClient.getLargePersonGroupsWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.getLargePersonGroups", + "com.azure.ai.vision.face.administration.LargePersonGroupAsyncClient.getPerson": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.getPerson", + "com.azure.ai.vision.face.administration.LargePersonGroupAsyncClient.getPersonWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.getPerson", + "com.azure.ai.vision.face.administration.LargePersonGroupAsyncClient.getPersons": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.getPersons", + "com.azure.ai.vision.face.administration.LargePersonGroupAsyncClient.getPersonsWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.getPersons", + "com.azure.ai.vision.face.administration.LargePersonGroupAsyncClient.getTrainingStatus": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.getTrainingStatus", + "com.azure.ai.vision.face.administration.LargePersonGroupAsyncClient.getTrainingStatusWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.getTrainingStatus", + "com.azure.ai.vision.face.administration.LargePersonGroupAsyncClient.getWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.get", + "com.azure.ai.vision.face.administration.LargePersonGroupAsyncClient.update": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.update", + "com.azure.ai.vision.face.administration.LargePersonGroupAsyncClient.updateFace": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.updateFace", + "com.azure.ai.vision.face.administration.LargePersonGroupAsyncClient.updateFaceWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.updateFace", + "com.azure.ai.vision.face.administration.LargePersonGroupAsyncClient.updatePerson": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.updatePerson", + "com.azure.ai.vision.face.administration.LargePersonGroupAsyncClient.updatePersonWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.updatePerson", + "com.azure.ai.vision.face.administration.LargePersonGroupAsyncClient.updateWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.update", + "com.azure.ai.vision.face.administration.LargePersonGroupClient": "null", + "com.azure.ai.vision.face.administration.LargePersonGroupClient.addFaceFromUrlImpl": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.addFaceFromUrl", + "com.azure.ai.vision.face.administration.LargePersonGroupClient.addFaceFromUrlImplWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.addFaceFromUrl", + "com.azure.ai.vision.face.administration.LargePersonGroupClient.addFaceImpl": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.addFace", + "com.azure.ai.vision.face.administration.LargePersonGroupClient.addFaceImplWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.addFace", + "com.azure.ai.vision.face.administration.LargePersonGroupClient.beginTrain": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.train", + "com.azure.ai.vision.face.administration.LargePersonGroupClient.beginTrainWithModel": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.train", + "com.azure.ai.vision.face.administration.LargePersonGroupClient.create": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.create", + "com.azure.ai.vision.face.administration.LargePersonGroupClient.createPerson": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.createPerson", + "com.azure.ai.vision.face.administration.LargePersonGroupClient.createPersonWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.createPerson", + "com.azure.ai.vision.face.administration.LargePersonGroupClient.createWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.create", + "com.azure.ai.vision.face.administration.LargePersonGroupClient.delete": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.delete", + "com.azure.ai.vision.face.administration.LargePersonGroupClient.deleteFace": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.deleteFace", + "com.azure.ai.vision.face.administration.LargePersonGroupClient.deleteFaceWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.deleteFace", + "com.azure.ai.vision.face.administration.LargePersonGroupClient.deletePerson": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.deletePerson", + "com.azure.ai.vision.face.administration.LargePersonGroupClient.deletePersonWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.deletePerson", + "com.azure.ai.vision.face.administration.LargePersonGroupClient.deleteWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.delete", + "com.azure.ai.vision.face.administration.LargePersonGroupClient.get": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.get", + "com.azure.ai.vision.face.administration.LargePersonGroupClient.getFace": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.getFace", + "com.azure.ai.vision.face.administration.LargePersonGroupClient.getFaceWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.getFace", + "com.azure.ai.vision.face.administration.LargePersonGroupClient.getLargePersonGroups": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.getLargePersonGroups", + "com.azure.ai.vision.face.administration.LargePersonGroupClient.getLargePersonGroupsWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.getLargePersonGroups", + "com.azure.ai.vision.face.administration.LargePersonGroupClient.getPerson": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.getPerson", + "com.azure.ai.vision.face.administration.LargePersonGroupClient.getPersonWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.getPerson", + "com.azure.ai.vision.face.administration.LargePersonGroupClient.getPersons": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.getPersons", + "com.azure.ai.vision.face.administration.LargePersonGroupClient.getPersonsWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.getPersons", + "com.azure.ai.vision.face.administration.LargePersonGroupClient.getTrainingStatus": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.getTrainingStatus", + "com.azure.ai.vision.face.administration.LargePersonGroupClient.getTrainingStatusWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.getTrainingStatus", + "com.azure.ai.vision.face.administration.LargePersonGroupClient.getWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.get", + "com.azure.ai.vision.face.administration.LargePersonGroupClient.update": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.update", + "com.azure.ai.vision.face.administration.LargePersonGroupClient.updateFace": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.updateFace", + "com.azure.ai.vision.face.administration.LargePersonGroupClient.updateFaceWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.updateFace", + "com.azure.ai.vision.face.administration.LargePersonGroupClient.updatePerson": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.updatePerson", + "com.azure.ai.vision.face.administration.LargePersonGroupClient.updatePersonWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.updatePerson", + "com.azure.ai.vision.face.administration.LargePersonGroupClient.updateWithResponse": "ClientCustomizations.FaceAdministrationClient.LargePersonGroup.update", "com.azure.ai.vision.face.implementation.models.AddFaceFromUrlRequest": "addFaceFromUrl.Request.anonymous", "com.azure.ai.vision.face.implementation.models.AddFaceFromUrlRequest1": "addFaceFromUrl.Request.anonymous", "com.azure.ai.vision.face.implementation.models.CreateLivenessWithVerifySessionMultipartContent": "Face.CreateLivenessWithVerifySessionMultipartContent", From 86ab1ea3fe7fe41f72f4ab0d4b7dba10ad0242be Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Sat, 14 Sep 2024 14:08:03 +0800 Subject: [PATCH 04/14] customization --- .../src/main/java/FaceCustomizations.java | 15 +- .../FaceAdministrationAsyncClient.java | 63 ++++++++ .../FaceAdministrationClient.java | 62 ++++++++ .../FaceAdministrationClientBuilder.java | 83 +++++++---- .../LargeFaceListAsyncClient.java | 110 +++++++------- .../administration/LargeFaceListClient.java | 110 +++++++------- .../LargePersonGroupAsyncClient.java | 140 +++++++++--------- .../LargePersonGroupClient.java | 140 +++++++++--------- .../face/administration/package-info.java | 1 - 9 files changed, 442 insertions(+), 282 deletions(-) create mode 100644 sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/FaceAdministrationAsyncClient.java create mode 100644 sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/FaceAdministrationClient.java diff --git a/sdk/face/azure-ai-vision-face/customization/src/main/java/FaceCustomizations.java b/sdk/face/azure-ai-vision-face/customization/src/main/java/FaceCustomizations.java index 3c2a636d49a9..1efb57829511 100644 --- a/sdk/face/azure-ai-vision-face/customization/src/main/java/FaceCustomizations.java +++ b/sdk/face/azure-ai-vision-face/customization/src/main/java/FaceCustomizations.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +import com.azure.autorest.customization.ClassCustomization; import com.azure.autorest.customization.Customization; import com.azure.autorest.customization.LibraryCustomization; import org.slf4j.Logger; @@ -15,6 +16,18 @@ public class FaceCustomizations extends Customization { @Override public void customize(LibraryCustomization customization, Logger logger) { - // NOOP + ClassCustomization classCustomization = customization.getClass( + "com.azure.ai.vision.face.administration", + "FaceAdministrationClientBuilder"); + + classCustomization.removeAnnotation("@ServiceClientBuilder"); + classCustomization.addAnnotation("@ServiceClientBuilder(\n" + + " serviceClients = {\n" + + " FaceAdministrationClient.class,\n" + + " FaceAdministrationAsyncClient.class,\n" + + " LargeFaceListClient.class,\n" + + " LargePersonGroupClient.class,\n" + + " LargeFaceListAsyncClient.class,\n" + + " LargePersonGroupAsyncClient.class })"); } } diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/FaceAdministrationAsyncClient.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/FaceAdministrationAsyncClient.java new file mode 100644 index 000000000000..dbb913fe5189 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/FaceAdministrationAsyncClient.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.vision.face.administration; + +import com.azure.ai.vision.face.FaceServiceVersion; +import com.azure.ai.vision.face.implementation.FaceAdministrationClientImpl; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.http.HttpPipeline; +import com.azure.core.util.serializer.SerializerAdapter; + +import java.util.Objects; + +/** + * FaceAdministrationAsyncClient class. + */ +@ServiceClient(builder = FaceAdministrationClientBuilder.class, isAsync = true) +public final class FaceAdministrationAsyncClient { + + private final HttpPipeline pipeline; + private final SerializerAdapter serializerAdapter; + private final String endpoint; + private final FaceServiceVersion serviceVersion; + + FaceAdministrationAsyncClient(HttpPipeline pipeline, SerializerAdapter serializerAdapter, + String endpoint, FaceServiceVersion serviceVersion) { + this.pipeline = pipeline; + this.serializerAdapter = serializerAdapter; + this.endpoint = endpoint; + this.serviceVersion = serviceVersion; + } + + + /** + * Creates a new instance of LargeFaceListAsyncClient. + * + * @param largeFaceListId the ID of LargeFaceList. + * @return a new instance of LargeFaceListAsyncClient. + */ + public LargeFaceListAsyncClient getLargeFaceListAsyncClient(String largeFaceListId) { + Objects.requireNonNull(largeFaceListId, "'largeFaceListId' cannot be null."); + + FaceAdministrationClientImpl client + = new FaceAdministrationClientImpl(this.pipeline, this.serializerAdapter, + this.endpoint, largeFaceListId, null, serviceVersion); + return new LargeFaceListAsyncClient(client.getLargeFaceLists()); + } + + /** + * Creates a new instance of LargePersonGroupAsyncClient. + * + * @param largePersonGroupId the ID of LargePersonGroup. + * @return a new instance of LargePersonGroupAsyncClient. + */ + public LargePersonGroupAsyncClient getLargePersonGroupAsyncClient(String largePersonGroupId) { + Objects.requireNonNull(largePersonGroupId, "'largePersonGroupId' cannot be null."); + + FaceAdministrationClientImpl client + = new FaceAdministrationClientImpl(this.pipeline, this.serializerAdapter, + this.endpoint, null, largePersonGroupId, serviceVersion); + return new LargePersonGroupAsyncClient(client.getLargePersonGroups()); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/FaceAdministrationClient.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/FaceAdministrationClient.java new file mode 100644 index 000000000000..ac285da2e473 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/FaceAdministrationClient.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.vision.face.administration; + +import com.azure.ai.vision.face.FaceServiceVersion; +import com.azure.ai.vision.face.implementation.FaceAdministrationClientImpl; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.http.HttpPipeline; +import com.azure.core.util.serializer.SerializerAdapter; + +import java.util.Objects; + +/** + * FaceAdministrationClient class. + */ +@ServiceClient(builder = FaceAdministrationClientBuilder.class) +public final class FaceAdministrationClient { + + private final HttpPipeline pipeline; + private final SerializerAdapter serializerAdapter; + private final String endpoint; + private final FaceServiceVersion serviceVersion; + + FaceAdministrationClient(HttpPipeline pipeline, SerializerAdapter serializerAdapter, + String endpoint, FaceServiceVersion serviceVersion) { + this.pipeline = pipeline; + this.serializerAdapter = serializerAdapter; + this.endpoint = endpoint; + this.serviceVersion = serviceVersion; + } + + /** + * Creates a new instance of LargeFaceListClient. + * + * @param largeFaceListId the ID of LargeFaceList. + * @return a new instance of LargeFaceListClient. + */ + public LargeFaceListClient getLargeFaceListClient(String largeFaceListId) { + Objects.requireNonNull(largeFaceListId, "'largeFaceListId' cannot be null."); + + FaceAdministrationClientImpl client + = new FaceAdministrationClientImpl(this.pipeline, this.serializerAdapter, + this.endpoint, largeFaceListId, null, serviceVersion); + return new LargeFaceListClient(client.getLargeFaceLists()); + } + + /** + * Creates a new instance of LargePersonGroupClient. + * + * @param largePersonGroupId the ID of LargePersonGroup. + * @return a new instance of LargePersonGroupClient. + */ + public LargePersonGroupClient getLargePersonGroupClient(String largePersonGroupId) { + Objects.requireNonNull(largePersonGroupId, "'largePersonGroupId' cannot be null."); + + FaceAdministrationClientImpl client + = new FaceAdministrationClientImpl(this.pipeline, this.serializerAdapter, + this.endpoint, null, largePersonGroupId, serviceVersion); + return new LargePersonGroupClient(client.getLargePersonGroups()); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/FaceAdministrationClientBuilder.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/FaceAdministrationClientBuilder.java index 12784c5b150c..db5b1641f783 100644 --- a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/FaceAdministrationClientBuilder.java +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/FaceAdministrationClientBuilder.java @@ -1,9 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. - package com.azure.ai.vision.face.administration; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; import com.azure.ai.vision.face.FaceServiceVersion; import com.azure.ai.vision.face.implementation.FaceAdministrationClientImpl; import com.azure.core.annotation.Generated; @@ -24,8 +27,8 @@ import com.azure.core.http.policy.AddHeadersFromContextPolicy; import com.azure.core.http.policy.AddHeadersPolicy; import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; -import com.azure.core.http.policy.HttpLoggingPolicy; import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; import com.azure.core.http.policy.HttpPipelinePolicy; import com.azure.core.http.policy.HttpPolicyProviders; import com.azure.core.http.policy.KeyCredentialPolicy; @@ -39,16 +42,14 @@ import com.azure.core.util.builder.ClientBuilderUtil; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; /** * A builder for creating a new instance of the FaceAdministrationClient type. */ @ServiceClientBuilder( serviceClients = { + FaceAdministrationClient.class, + FaceAdministrationAsyncClient.class, LargeFaceListClient.class, LargePersonGroupClient.class, LargeFaceListAsyncClient.class, @@ -56,6 +57,7 @@ public final class FaceAdministrationClientBuilder implements HttpTrait, ConfigurationTrait, TokenCredentialTrait, KeyCredentialTrait, EndpointTrait { + @Generated private static final String SDK_NAME = "name"; @@ -245,12 +247,11 @@ public FaceAdministrationClientBuilder endpoint(String endpoint) { /** * Sets Valid character is letter in lower case or digit or '-' or '_', maximum length is 64. - * + * * @param largeFaceListId the largeFaceListId value. * @return the FaceAdministrationClientBuilder. */ - @Generated - public FaceAdministrationClientBuilder largeFaceListId(String largeFaceListId) { + FaceAdministrationClientBuilder largeFaceListId(String largeFaceListId) { this.largeFaceListId = largeFaceListId; return this; } @@ -263,12 +264,11 @@ public FaceAdministrationClientBuilder largeFaceListId(String largeFaceListId) { /** * Sets ID of the container. - * + * * @param largePersonGroupId the largePersonGroupId value. * @return the FaceAdministrationClientBuilder. */ - @Generated - public FaceAdministrationClientBuilder largePersonGroupId(String largePersonGroupId) { + FaceAdministrationClientBuilder largePersonGroupId(String largePersonGroupId) { this.largePersonGroupId = largePersonGroupId; return this; } @@ -281,7 +281,7 @@ public FaceAdministrationClientBuilder largePersonGroupId(String largePersonGrou /** * Sets Service version. - * + * * @param serviceVersion the serviceVersion value. * @return the FaceAdministrationClientBuilder. */ @@ -299,7 +299,7 @@ public FaceAdministrationClientBuilder serviceVersion(FaceServiceVersion service /** * Sets The retry policy that will attempt to retry failed requests, if applicable. - * + * * @param retryPolicy the retryPolicy value. * @return the FaceAdministrationClientBuilder. */ @@ -311,7 +311,7 @@ public FaceAdministrationClientBuilder retryPolicy(RetryPolicy retryPolicy) { /** * Builds an instance of FaceAdministrationClientImpl with the provided parameters. - * + * * @return an instance of FaceAdministrationClientImpl. */ @Generated @@ -326,13 +326,12 @@ private FaceAdministrationClientImpl buildInnerClient() { return client; } - @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."); - Objects.requireNonNull(largeFaceListId, "'largeFaceListId' cannot be null."); - Objects.requireNonNull(largePersonGroupId, "'largePersonGroupId' cannot be null."); + // Objects.requireNonNull(largeFaceListId, "'largeFaceListId' cannot be null."); + // Objects.requireNonNull(largePersonGroupId, "'largePersonGroupId' cannot be null."); } @Generated @@ -378,43 +377,67 @@ private HttpPipeline createHttpPipeline() { /** * Builds an instance of LargeFaceListAsyncClient class. - * + * * @return an instance of LargeFaceListAsyncClient. */ - @Generated - public LargeFaceListAsyncClient buildLargeFaceListAsyncClient() { + LargeFaceListAsyncClient buildLargeFaceListAsyncClient() { return new LargeFaceListAsyncClient(buildInnerClient().getLargeFaceLists()); } /** * Builds an instance of LargePersonGroupAsyncClient class. - * + * * @return an instance of LargePersonGroupAsyncClient. */ - @Generated - public LargePersonGroupAsyncClient buildLargePersonGroupAsyncClient() { + LargePersonGroupAsyncClient buildLargePersonGroupAsyncClient() { return new LargePersonGroupAsyncClient(buildInnerClient().getLargePersonGroups()); } /** * Builds an instance of LargeFaceListClient class. - * + * * @return an instance of LargeFaceListClient. */ - @Generated - public LargeFaceListClient buildLargeFaceListClient() { + LargeFaceListClient buildLargeFaceListClient() { return new LargeFaceListClient(buildInnerClient().getLargeFaceLists()); } /** * Builds an instance of LargePersonGroupClient class. - * + * * @return an instance of LargePersonGroupClient. */ - @Generated - public LargePersonGroupClient buildLargePersonGroupClient() { + LargePersonGroupClient buildLargePersonGroupClient() { return new LargePersonGroupClient(buildInnerClient().getLargePersonGroups()); } + /** + * Builds an instance of FaceAdministrationClient class. + * + * @return an instance of FaceAdministrationClient. + */ + public FaceAdministrationClient buildClient() { + this.validateClient(); + HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); + FaceServiceVersion localServiceVersion + = (serviceVersion != null) ? serviceVersion : FaceServiceVersion.getLatest(); + return new FaceAdministrationClient(localPipeline, JacksonAdapter.createDefaultSerializerAdapter(), + this.endpoint, localServiceVersion); + } + + /** + * Builds an instance of FaceAdministrationAsyncClient class. + * + * @return an instance of FaceAdministrationAsyncClient. + */ + public FaceAdministrationAsyncClient buildAsyncClient() { + this.validateClient(); + HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); + FaceServiceVersion localServiceVersion + = (serviceVersion != null) ? serviceVersion : FaceServiceVersion.getLatest(); + return new FaceAdministrationAsyncClient(localPipeline, JacksonAdapter.createDefaultSerializerAdapter(), + this.endpoint, localServiceVersion); + } + private static final ClientLogger LOGGER = new ClientLogger(FaceAdministrationClientBuilder.class); } diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/LargeFaceListAsyncClient.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/LargeFaceListAsyncClient.java index f97ff95d5a52..85959d06fa67 100644 --- a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/LargeFaceListAsyncClient.java +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/LargeFaceListAsyncClient.java @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. - package com.azure.ai.vision.face.administration; import com.azure.ai.vision.face.implementation.LargeFaceListsImpl; @@ -39,12 +38,13 @@ */ @ServiceClient(builder = FaceAdministrationClientBuilder.class, isAsync = true) public final class LargeFaceListAsyncClient { + @Generated private final LargeFaceListsImpl serviceClient; /** * Initializes an instance of LargeFaceListAsyncClient class. - * + * * @param serviceClient the service client implementation. */ @Generated @@ -55,7 +55,7 @@ public final class LargeFaceListAsyncClient { /** * Create an empty Large Face List with user-specified largeFaceListId, name, an optional userData and * recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/create-large-face-list for more * details. *

Request Body Schema

@@ -67,7 +67,7 @@ public final class LargeFaceListAsyncClient { * recognitionModel: String(recognition_01/recognition_02/recognition_03/recognition_04) (Optional) * } * } - * + * * @param createRequest1 The createRequest1 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. @@ -84,10 +84,10 @@ public Mono> createWithResponse(BinaryData createRequest1, Reques /** * Delete a face from a Large Face List by specified largeFaceListId and persistedFaceId. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/delete-large-face-list for more * details. - * + * * @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. @@ -122,7 +122,7 @@ public Mono> deleteWithResponse(RequestOptions requestOptions) { * largeFaceListId: String (Required) * } * } - * + * * @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. @@ -148,7 +148,7 @@ public Mono> getWithResponse(RequestOptions requestOptions) * userData: String (Optional) * } * } - * + * * @param updateRequest1 The updateRequest1 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. @@ -165,7 +165,7 @@ public Mono> updateWithResponse(BinaryData updateRequest1, Reques /** * List Large Face Lists' information of largeFaceListId, name, userData and recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-lists for more * details. *

Query Parameters

@@ -192,7 +192,7 @@ public Mono> updateWithResponse(BinaryData updateRequest1, Reques * } * ] * } - * + * * @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. @@ -221,7 +221,7 @@ public Mono> getLargeFaceListsWithResponse(RequestOptions r * message: String (Optional) * } * } - * + * * @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. @@ -237,10 +237,10 @@ public Mono> getTrainingStatusWithResponse(RequestOptions r /** * Submit a Large Face List training task. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/train-large-face-list for more * details. - * + * * @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. @@ -256,7 +256,7 @@ public PollerFlux beginTrain(RequestOptions requestOptio /** * Add a face to a specified Large Face List, up to 1,000,000 faces. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/add-large-face-list-face-from-url * for more details. *

Query Parameters

@@ -288,7 +288,7 @@ public PollerFlux beginTrain(RequestOptions requestOptio * persistedFaceId: String (Required) * } * } - * + * * @param addFaceFromUrlRequest1 The addFaceFromUrlRequest1 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. @@ -306,7 +306,7 @@ Mono> addFaceFromUrlImplWithResponse(BinaryData addFaceFrom /** * Add a face to a specified Large Face List, up to 1,000,000 faces. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/add-large-face-list-face for more * details. *

Query Parameters

@@ -336,7 +336,7 @@ Mono> addFaceFromUrlImplWithResponse(BinaryData addFaceFrom * persistedFaceId: String (Required) * } * } - * + * * @param imageContent The image to be analyzed. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -354,7 +354,7 @@ Mono> addFaceImplWithResponse(BinaryData imageContent, Requ /** * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/delete-large-face-list-face for * more details. - * + * * @param persistedFaceId Face ID of the face. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -380,7 +380,7 @@ public Mono> deleteFaceWithResponse(String persistedFaceId, Reque * userData: String (Optional) * } * } - * + * * @param persistedFaceId Face ID of the face. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -405,7 +405,7 @@ public Mono> getFaceWithResponse(String persistedFaceId, Re * userData: String (Optional) * } * } - * + * * @param persistedFaceId Face ID of the face. * @param updateFaceRequest1 The updateFaceRequest1 parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -424,7 +424,7 @@ public Mono> updateFaceWithResponse(String persistedFaceId, Binar /** * List faces' persistedFaceId and userData in a specified Large Face List. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-list-faces for more * details. *

Query Parameters

@@ -447,7 +447,7 @@ public Mono> updateFaceWithResponse(String persistedFaceId, Binar * } * ] * } - * + * * @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. @@ -464,10 +464,10 @@ public Mono> getFacesWithResponse(RequestOptions requestOpt /** * Create an empty Large Face List with user-specified largeFaceListId, name, an optional userData and * recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/create-large-face-list for more * details. - * + * * @param name User defined name, maximum length is 128. * @param userData Optional user defined data. Length should not exceed 16K. * @param recognitionModel The 'recognitionModel' associated with this face list. Supported 'recognitionModel' @@ -496,10 +496,10 @@ public Mono create(String name, String userData, FaceRecognitionModel reco /** * Create an empty Large Face List with user-specified largeFaceListId, name, an optional userData and * recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/create-large-face-list for more * details. - * + * * @param name User defined name, maximum length is 128. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -521,10 +521,10 @@ public Mono create(String name) { /** * Delete a face from a Large Face List by specified largeFaceListId and persistedFaceId. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/delete-large-face-list for more * details. - * + * * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -543,7 +543,7 @@ public Mono delete() { /** * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-list for more * details. - * + * * @param returnRecognitionModel Return 'recognitionModel' or not. The default value is false. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -568,7 +568,7 @@ public Mono get(Boolean returnRecognitionModel) { /** * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-list for more * details. - * + * * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -588,7 +588,7 @@ public Mono get() { /** * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/update-large-face-list for more * details. - * + * * @param name User defined name, maximum length is 128. * @param userData Optional user defined data. Length should not exceed 16K. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -612,7 +612,7 @@ public Mono update(String name, String userData) { /** * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/update-large-face-list for more * details. - * + * * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -632,10 +632,10 @@ public Mono update() { /** * List Large Face Lists' information of largeFaceListId, name, userData and recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-lists for more * details. - * + * * @param start List resources greater than the "start". It contains no more than 64 characters. Default is empty. * @param top The number of items to list, ranging in [1, 1000]. Default is 1000. * @param returnRecognitionModel Return 'recognitionModel' or not. The default value is false. @@ -667,10 +667,10 @@ public Mono> getLargeFaceLists(String start, Integer top, Bo /** * List Large Face Lists' information of largeFaceListId, name, userData and recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-lists for more * details. - * + * * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -691,7 +691,7 @@ public Mono> getLargeFaceLists() { * Please refer to * https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-list-training-status for more * details. - * + * * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -710,10 +710,10 @@ public Mono getTrainingStatus() { /** * Submit a Large Face List training task. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/train-large-face-list for more * details. - * + * * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -731,10 +731,10 @@ public PollerFlux beginTrain() { /** * Add a face to a specified Large Face List, up to 1,000,000 faces. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/add-large-face-list-face-from-url * for more details. - * + * * @param url URL of input image. * @param targetFace A face rectangle to specify the target face to be added to a person, in the format of * 'targetFace=left,top,width,height'. @@ -774,10 +774,10 @@ Mono addFaceFromUrlImpl(String url, List targetFace, Fac /** * Add a face to a specified Large Face List, up to 1,000,000 faces. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/add-large-face-list-face-from-url * for more details. - * + * * @param url URL of input image. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -800,10 +800,10 @@ Mono addFaceFromUrlImpl(String url) { /** * Add a face to a specified Large Face List, up to 1,000,000 faces. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/add-large-face-list-face for more * details. - * + * * @param imageContent The image to be analyzed. * @param targetFace A face rectangle to specify the target face to be added to a person, in the format of * 'targetFace=left,top,width,height'. @@ -841,10 +841,10 @@ Mono addFaceImpl(BinaryData imageContent, List targetFac /** * Add a face to a specified Large Face List, up to 1,000,000 faces. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/add-large-face-list-face for more * details. - * + * * @param imageContent The image to be analyzed. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -866,7 +866,7 @@ Mono addFaceImpl(BinaryData imageContent) { /** * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/delete-large-face-list-face for * more details. - * + * * @param persistedFaceId Face ID of the face. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -887,7 +887,7 @@ public Mono deleteFace(String persistedFaceId) { /** * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-list-face for more * details. - * + * * @param persistedFaceId Face ID of the face. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -909,7 +909,7 @@ public Mono getFace(String persistedFaceId) { /** * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/update-large-face-list-face for * more details. - * + * * @param persistedFaceId Face ID of the face. * @param userData User-provided data attached to the face. The length limit is 1K. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -933,7 +933,7 @@ public Mono updateFace(String persistedFaceId, String userData) { /** * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/update-large-face-list-face for * more details. - * + * * @param persistedFaceId Face ID of the face. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -955,10 +955,10 @@ public Mono updateFace(String persistedFaceId) { /** * List faces' persistedFaceId and userData in a specified Large Face List. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-list-faces for more * details. - * + * * @param start List resources greater than the "start". It contains no more than 64 characters. Default is empty. * @param top The number of items to list, ranging in [1, 1000]. Default is 1000. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -986,10 +986,10 @@ public Mono> getFaces(String start, Integer top) { /** * List faces' persistedFaceId and userData in a specified Large Face List. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-list-faces for more * details. - * + * * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/LargeFaceListClient.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/LargeFaceListClient.java index 506d64147d5e..4eee99b775b3 100644 --- a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/LargeFaceListClient.java +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/LargeFaceListClient.java @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. - package com.azure.ai.vision.face.administration; import com.azure.ai.vision.face.implementation.LargeFaceListsImpl; @@ -37,12 +36,13 @@ */ @ServiceClient(builder = FaceAdministrationClientBuilder.class) public final class LargeFaceListClient { + @Generated private final LargeFaceListsImpl serviceClient; /** * Initializes an instance of LargeFaceListClient class. - * + * * @param serviceClient the service client implementation. */ @Generated @@ -53,7 +53,7 @@ public final class LargeFaceListClient { /** * Create an empty Large Face List with user-specified largeFaceListId, name, an optional userData and * recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/create-large-face-list for more * details. *

Request Body Schema

@@ -65,7 +65,7 @@ public final class LargeFaceListClient { * recognitionModel: String(recognition_01/recognition_02/recognition_03/recognition_04) (Optional) * } * } - * + * * @param createRequest1 The createRequest1 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. @@ -82,10 +82,10 @@ public Response createWithResponse(BinaryData createRequest1, RequestOptio /** * Delete a face from a Large Face List by specified largeFaceListId and persistedFaceId. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/delete-large-face-list for more * details. - * + * * @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. @@ -120,7 +120,7 @@ public Response deleteWithResponse(RequestOptions requestOptions) { * largeFaceListId: String (Required) * } * } - * + * * @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. @@ -145,7 +145,7 @@ public Response getWithResponse(RequestOptions requestOptions) { * userData: String (Optional) * } * } - * + * * @param updateRequest1 The updateRequest1 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. @@ -162,7 +162,7 @@ public Response updateWithResponse(BinaryData updateRequest1, RequestOptio /** * List Large Face Lists' information of largeFaceListId, name, userData and recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-lists for more * details. *

Query Parameters

@@ -189,7 +189,7 @@ public Response updateWithResponse(BinaryData updateRequest1, RequestOptio * } * ] * } - * + * * @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. @@ -218,7 +218,7 @@ public Response getLargeFaceListsWithResponse(RequestOptions request * message: String (Optional) * } * } - * + * * @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. @@ -234,10 +234,10 @@ public Response getTrainingStatusWithResponse(RequestOptions request /** * Submit a Large Face List training task. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/train-large-face-list for more * details. - * + * * @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. @@ -253,7 +253,7 @@ public SyncPoller beginTrain(RequestOptions requestOptio /** * Add a face to a specified Large Face List, up to 1,000,000 faces. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/add-large-face-list-face-from-url * for more details. *

Query Parameters

@@ -285,7 +285,7 @@ public SyncPoller beginTrain(RequestOptions requestOptio * persistedFaceId: String (Required) * } * } - * + * * @param addFaceFromUrlRequest1 The addFaceFromUrlRequest1 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. @@ -303,7 +303,7 @@ Response addFaceFromUrlImplWithResponse(BinaryData addFaceFromUrlReq /** * Add a face to a specified Large Face List, up to 1,000,000 faces. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/add-large-face-list-face for more * details. *

Query Parameters

@@ -333,7 +333,7 @@ Response addFaceFromUrlImplWithResponse(BinaryData addFaceFromUrlReq * persistedFaceId: String (Required) * } * } - * + * * @param imageContent The image to be analyzed. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -351,7 +351,7 @@ Response addFaceImplWithResponse(BinaryData imageContent, RequestOpt /** * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/delete-large-face-list-face for * more details. - * + * * @param persistedFaceId Face ID of the face. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -377,7 +377,7 @@ public Response deleteFaceWithResponse(String persistedFaceId, RequestOpti * userData: String (Optional) * } * } - * + * * @param persistedFaceId Face ID of the face. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -402,7 +402,7 @@ public Response getFaceWithResponse(String persistedFaceId, RequestO * userData: String (Optional) * } * } - * + * * @param persistedFaceId Face ID of the face. * @param updateFaceRequest1 The updateFaceRequest1 parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -421,7 +421,7 @@ public Response updateFaceWithResponse(String persistedFaceId, BinaryData /** * List faces' persistedFaceId and userData in a specified Large Face List. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-list-faces for more * details. *

Query Parameters

@@ -444,7 +444,7 @@ public Response updateFaceWithResponse(String persistedFaceId, BinaryData * } * ] * } - * + * * @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. @@ -461,10 +461,10 @@ public Response getFacesWithResponse(RequestOptions requestOptions) /** * Create an empty Large Face List with user-specified largeFaceListId, name, an optional userData and * recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/create-large-face-list for more * details. - * + * * @param name User defined name, maximum length is 128. * @param userData Optional user defined data. Length should not exceed 16K. * @param recognitionModel The 'recognitionModel' associated with this face list. Supported 'recognitionModel' @@ -492,10 +492,10 @@ public void create(String name, String userData, FaceRecognitionModel recognitio /** * Create an empty Large Face List with user-specified largeFaceListId, name, an optional userData and * recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/create-large-face-list for more * details. - * + * * @param name User defined name, maximum length is 128. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -516,10 +516,10 @@ public void create(String name) { /** * Delete a face from a Large Face List by specified largeFaceListId and persistedFaceId. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/delete-large-face-list for more * details. - * + * * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -537,7 +537,7 @@ public void delete() { /** * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-list for more * details. - * + * * @param returnRecognitionModel Return 'recognitionModel' or not. The default value is false. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -561,7 +561,7 @@ public LargeFaceList get(Boolean returnRecognitionModel) { /** * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-list for more * details. - * + * * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -580,7 +580,7 @@ public LargeFaceList get() { /** * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/update-large-face-list for more * details. - * + * * @param name User defined name, maximum length is 128. * @param userData Optional user defined data. Length should not exceed 16K. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -603,7 +603,7 @@ public void update(String name, String userData) { /** * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/update-large-face-list for more * details. - * + * * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -622,10 +622,10 @@ public void update() { /** * List Large Face Lists' information of largeFaceListId, name, userData and recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-lists for more * details. - * + * * @param start List resources greater than the "start". It contains no more than 64 characters. Default is empty. * @param top The number of items to list, ranging in [1, 1000]. Default is 1000. * @param returnRecognitionModel Return 'recognitionModel' or not. The default value is false. @@ -656,10 +656,10 @@ public List getLargeFaceLists(String start, Integer top, Boolean /** * List Large Face Lists' information of largeFaceListId, name, userData and recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-lists for more * details. - * + * * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -679,7 +679,7 @@ public List getLargeFaceLists() { * Please refer to * https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-list-training-status for more * details. - * + * * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -697,10 +697,10 @@ public FaceTrainingResult getTrainingStatus() { /** * Submit a Large Face List training task. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/train-large-face-list for more * details. - * + * * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -718,10 +718,10 @@ public SyncPoller beginTrain() { /** * Add a face to a specified Large Face List, up to 1,000,000 faces. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/add-large-face-list-face-from-url * for more details. - * + * * @param url URL of input image. * @param targetFace A face rectangle to specify the target face to be added to a person, in the format of * 'targetFace=left,top,width,height'. @@ -761,10 +761,10 @@ AddFaceResult addFaceFromUrlImpl(String url, List targetFace, FaceDetec /** * Add a face to a specified Large Face List, up to 1,000,000 faces. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/add-large-face-list-face-from-url * for more details. - * + * * @param url URL of input image. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -787,10 +787,10 @@ AddFaceResult addFaceFromUrlImpl(String url) { /** * Add a face to a specified Large Face List, up to 1,000,000 faces. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/add-large-face-list-face for more * details. - * + * * @param imageContent The image to be analyzed. * @param targetFace A face rectangle to specify the target face to be added to a person, in the format of * 'targetFace=left,top,width,height'. @@ -827,10 +827,10 @@ AddFaceResult addFaceImpl(BinaryData imageContent, List targetFace, Fac /** * Add a face to a specified Large Face List, up to 1,000,000 faces. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/add-large-face-list-face for more * details. - * + * * @param imageContent The image to be analyzed. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -851,7 +851,7 @@ AddFaceResult addFaceImpl(BinaryData imageContent) { /** * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/delete-large-face-list-face for * more details. - * + * * @param persistedFaceId Face ID of the face. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -871,7 +871,7 @@ public void deleteFace(String persistedFaceId) { /** * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-list-face for more * details. - * + * * @param persistedFaceId Face ID of the face. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -892,7 +892,7 @@ public LargeFaceListFace getFace(String persistedFaceId) { /** * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/update-large-face-list-face for * more details. - * + * * @param persistedFaceId Face ID of the face. * @param userData User-provided data attached to the face. The length limit is 1K. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -915,7 +915,7 @@ public void updateFace(String persistedFaceId, String userData) { /** * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/update-large-face-list-face for * more details. - * + * * @param persistedFaceId Face ID of the face. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -936,10 +936,10 @@ public void updateFace(String persistedFaceId) { /** * List faces' persistedFaceId and userData in a specified Large Face List. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-list-faces for more * details. - * + * * @param start List resources greater than the "start". It contains no more than 64 characters. Default is empty. * @param top The number of items to list, ranging in [1, 1000]. Default is 1000. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -966,10 +966,10 @@ public List getFaces(String start, Integer top) { /** * List faces' persistedFaceId and userData in a specified Large Face List. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-list-faces for more * details. - * + * * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/LargePersonGroupAsyncClient.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/LargePersonGroupAsyncClient.java index c49401944f3a..2b487b6d8efa 100644 --- a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/LargePersonGroupAsyncClient.java +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/LargePersonGroupAsyncClient.java @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. - package com.azure.ai.vision.face.administration; import com.azure.ai.vision.face.implementation.LargePersonGroupsImpl; @@ -43,12 +42,13 @@ */ @ServiceClient(builder = FaceAdministrationClientBuilder.class, isAsync = true) public final class LargePersonGroupAsyncClient { + @Generated private final LargePersonGroupsImpl serviceClient; /** * Initializes an instance of LargePersonGroupAsyncClient class. - * + * * @param serviceClient the service client implementation. */ @Generated @@ -59,7 +59,7 @@ public final class LargePersonGroupAsyncClient { /** * Create a new Large Person Group with user-specified largePersonGroupId, name, an optional userData and * recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/create-large-person-group for * more details. *

Request Body Schema

@@ -71,7 +71,7 @@ public final class LargePersonGroupAsyncClient { * recognitionModel: String(recognition_01/recognition_02/recognition_03/recognition_04) (Optional) * } * } - * + * * @param createRequest The createRequest 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. @@ -89,7 +89,7 @@ public Mono> createWithResponse(BinaryData createRequest, Request /** * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/delete-large-person-group for * more details. - * + * * @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. @@ -124,7 +124,7 @@ public Mono> deleteWithResponse(RequestOptions requestOptions) { * largePersonGroupId: String (Required) * } * } - * + * * @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. @@ -150,7 +150,7 @@ public Mono> getWithResponse(RequestOptions requestOptions) * userData: String (Optional) * } * } - * + * * @param updateRequest The updateRequest 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. @@ -167,7 +167,7 @@ public Mono> updateWithResponse(BinaryData updateRequest, Request /** * List all existing Large Person Groups' largePersonGroupId, name, userData and recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-groups for * more details. *

Query Parameters

@@ -194,7 +194,7 @@ public Mono> updateWithResponse(BinaryData updateRequest, Request * } * ] * } - * + * * @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. @@ -211,7 +211,7 @@ public Mono> getLargePersonGroupsWithResponse(RequestOption /** * To check Large Person Group training status completed or still ongoing. Large Person Group training is an * asynchronous operation triggered by "Train Large Person Group" API. - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group-training-status for more * details. @@ -226,7 +226,7 @@ public Mono> getLargePersonGroupsWithResponse(RequestOption * message: String (Optional) * } * } - * + * * @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. @@ -243,10 +243,10 @@ public Mono> getTrainingStatusWithResponse(RequestOptions r /** * Submit a Large Person Group training task. Training is a crucial step that only a trained Large Person Group can * be used by "Identify From Large Person Group". - * + * * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/train-large-person-group for * more details. - * + * * @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. @@ -263,7 +263,7 @@ public PollerFlux beginTrain(RequestOptions requestOptio /** * Create a new person in a specified Large Person Group. To add face to this person, please call "Add Large Person * Group Person Face". - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/create-large-person-group-person for more * details. @@ -283,7 +283,7 @@ public PollerFlux beginTrain(RequestOptions requestOptio * personId: String (Required) * } * } - * + * * @param createPersonRequest The createPersonRequest 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. @@ -303,7 +303,7 @@ public Mono> createPersonWithResponse(BinaryData createPers * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/delete-large-person-group-person for more * details. - * + * * @param personId ID of the person. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -333,7 +333,7 @@ public Mono> deletePersonWithResponse(String personId, RequestOpt * ] * } * } - * + * * @param personId ID of the person. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -361,7 +361,7 @@ public Mono> getPersonWithResponse(String personId, Request * userData: String (Optional) * } * } - * + * * @param personId ID of the person. * @param updatePersonRequest The updatePersonRequest parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -381,7 +381,7 @@ public Mono> updatePersonWithResponse(String personId, BinaryData /** * List all persons' information in the specified Large Person Group, including personId, name, userData and * persistedFaceIds of registered person faces. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group-persons * for more details. *

Query Parameters

@@ -408,7 +408,7 @@ public Mono> updatePersonWithResponse(String personId, BinaryData * } * ] * } - * + * * @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. @@ -424,7 +424,7 @@ public Mono> getPersonsWithResponse(RequestOptions requestO /** * Add a face to a person into a Large Person Group for face identification or verification. - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/add-large-person-group-person-face-from-url for * more details. @@ -457,7 +457,7 @@ public Mono> getPersonsWithResponse(RequestOptions requestO * persistedFaceId: String (Required) * } * } - * + * * @param personId ID of the person. * @param addFaceFromUrlRequest The addFaceFromUrlRequest parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -476,7 +476,7 @@ Mono> addFaceFromUrlImplWithResponse(String personId, Binar /** * Add a face to a person into a Large Person Group for face identification or verification. - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/add-large-person-group-person-face for more * details. @@ -507,7 +507,7 @@ Mono> addFaceFromUrlImplWithResponse(String personId, Binar * persistedFaceId: String (Required) * } * } - * + * * @param personId ID of the person. * @param imageContent The image to be analyzed. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -527,11 +527,11 @@ Mono> addFaceImplWithResponse(String personId, BinaryData i /** * Delete a face from a person in a Large Person Group by specified largePersonGroupId, personId and * persistedFaceId. - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/delete-large-person-group-person-face for more * details. - * + * * @param personId ID of the person. * @param persistedFaceId Face ID of the face. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -560,7 +560,7 @@ public Mono> deleteFaceWithResponse(String personId, String persi * userData: String (Optional) * } * } - * + * * @param personId ID of the person. * @param persistedFaceId Face ID of the face. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -589,7 +589,7 @@ public Mono> getFaceWithResponse(String personId, String pe * userData: String (Optional) * } * } - * + * * @param personId ID of the person. * @param persistedFaceId Face ID of the face. * @param updateFaceRequest The updateFaceRequest parameter. @@ -611,10 +611,10 @@ public Mono> updateFaceWithResponse(String personId, String persi /** * Create a new Large Person Group with user-specified largePersonGroupId, name, an optional userData and * recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/create-large-person-group for * more details. - * + * * @param name User defined name, maximum length is 128. * @param userData Optional user defined data. Length should not exceed 16K. * @param recognitionModel The 'recognitionModel' associated with this face list. Supported 'recognitionModel' @@ -643,10 +643,10 @@ public Mono create(String name, String userData, FaceRecognitionModel reco /** * Create a new Large Person Group with user-specified largePersonGroupId, name, an optional userData and * recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/create-large-person-group for * more details. - * + * * @param name User defined name, maximum length is 128. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -669,7 +669,7 @@ public Mono create(String name) { /** * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/delete-large-person-group for * more details. - * + * * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -688,7 +688,7 @@ public Mono delete() { /** * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group for more * details. - * + * * @param returnRecognitionModel Return 'recognitionModel' or not. The default value is false. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -714,7 +714,7 @@ public Mono get(Boolean returnRecognitionModel) { /** * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group for more * details. - * + * * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -735,7 +735,7 @@ public Mono get() { /** * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/update-large-person-group for * more details. - * + * * @param name User defined name, maximum length is 128. * @param userData Optional user defined data. Length should not exceed 16K. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -759,7 +759,7 @@ public Mono update(String name, String userData) { /** * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/update-large-person-group for * more details. - * + * * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -779,10 +779,10 @@ public Mono update() { /** * List all existing Large Person Groups' largePersonGroupId, name, userData and recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-groups for * more details. - * + * * @param start List resources greater than the "start". It contains no more than 64 characters. Default is empty. * @param top The number of items to list, ranging in [1, 1000]. Default is 1000. * @param returnRecognitionModel Return 'recognitionModel' or not. The default value is false. @@ -815,10 +815,10 @@ public Mono> getLargePersonGroups(String start, Integer t /** * List all existing Large Person Groups' largePersonGroupId, name, userData and recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-groups for * more details. - * + * * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -838,11 +838,11 @@ public Mono> getLargePersonGroups() { /** * To check Large Person Group training status completed or still ongoing. Large Person Group training is an * asynchronous operation triggered by "Train Large Person Group" API. - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group-training-status for more * details. - * + * * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -862,10 +862,10 @@ public Mono getTrainingStatus() { /** * Submit a Large Person Group training task. Training is a crucial step that only a trained Large Person Group can * be used by "Identify From Large Person Group". - * + * * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/train-large-person-group for * more details. - * + * * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -884,11 +884,11 @@ public PollerFlux beginTrain() { /** * Create a new person in a specified Large Person Group. To add face to this person, please call "Add Large Person * Group Person Face". - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/create-large-person-group-person for more * details. - * + * * @param name User defined name, maximum length is 128. * @param userData Optional user defined data. Length should not exceed 16K. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -913,11 +913,11 @@ public Mono createPerson(String name, String userData) { /** * Create a new person in a specified Large Person Group. To add face to this person, please call "Add Large Person * Group Person Face". - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/create-large-person-group-person for more * details. - * + * * @param name User defined name, maximum length is 128. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -942,7 +942,7 @@ public Mono createPerson(String name) { * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/delete-large-person-group-person for more * details. - * + * * @param personId ID of the person. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -963,7 +963,7 @@ public Mono deletePerson(String personId) { /** * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group-person * for more details. - * + * * @param personId ID of the person. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -986,7 +986,7 @@ public Mono getPerson(String personId) { * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/update-large-person-group-person for more * details. - * + * * @param personId ID of the person. * @param name User defined name, maximum length is 128. * @param userData Optional user defined data. Length should not exceed 16K. @@ -1012,7 +1012,7 @@ public Mono updatePerson(String personId, String name, String userData) { * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/update-large-person-group-person for more * details. - * + * * @param personId ID of the person. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -1035,10 +1035,10 @@ public Mono updatePerson(String personId) { /** * List all persons' information in the specified Large Person Group, including personId, name, userData and * persistedFaceIds of registered person faces. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group-persons * for more details. - * + * * @param start List resources greater than the "start". It contains no more than 64 characters. Default is empty. * @param top The number of items to list, ranging in [1, 1000]. Default is 1000. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1067,10 +1067,10 @@ public Mono> getPersons(String start, Integer top) /** * List all persons' information in the specified Large Person Group, including personId, name, userData and * persistedFaceIds of registered person faces. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group-persons * for more details. - * + * * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -1089,11 +1089,11 @@ public Mono> getPersons() { /** * Add a face to a person into a Large Person Group for face identification or verification. - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/add-large-person-group-person-face-from-url for * more details. - * + * * @param personId ID of the person. * @param url URL of input image. * @param targetFace A face rectangle to specify the target face to be added to a person, in the format of @@ -1134,11 +1134,11 @@ Mono addFaceFromUrlImpl(String personId, String url, List addFaceFromUrlImpl(String personId, String url) { /** * Add a face to a person into a Large Person Group for face identification or verification. - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/add-large-person-group-person-face for more * details. - * + * * @param personId ID of the person. * @param imageContent The image to be analyzed. * @param targetFace A face rectangle to specify the target face to be added to a person, in the format of @@ -1205,11 +1205,11 @@ Mono addFaceImpl(String personId, BinaryData imageContent, List addFaceImpl(String personId, BinaryData imageContent) { /** * Delete a face from a person in a Large Person Group by specified largePersonGroupId, personId and * persistedFaceId. - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/delete-large-person-group-person-face for more * details. - * + * * @param personId ID of the person. * @param persistedFaceId Face ID of the face. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1259,7 +1259,7 @@ public Mono deleteFace(String personId, String persistedFaceId) { * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group-person-face for more * details. - * + * * @param personId ID of the person. * @param persistedFaceId Face ID of the face. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1283,7 +1283,7 @@ public Mono getFace(String personId, String persiste * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/update-large-person-group-person-face for more * details. - * + * * @param personId ID of the person. * @param persistedFaceId Face ID of the face. * @param userData User-provided data attached to the face. The length limit is 1K. @@ -1310,7 +1310,7 @@ public Mono updateFace(String personId, String persistedFaceId, String use * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/update-large-person-group-person-face for more * details. - * + * * @param personId ID of the person. * @param persistedFaceId Face ID of the face. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/LargePersonGroupClient.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/LargePersonGroupClient.java index 67044da957af..d0a3892cdb8e 100644 --- a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/LargePersonGroupClient.java +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/LargePersonGroupClient.java @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. - package com.azure.ai.vision.face.administration; import com.azure.ai.vision.face.implementation.LargePersonGroupsImpl; @@ -41,12 +40,13 @@ */ @ServiceClient(builder = FaceAdministrationClientBuilder.class) public final class LargePersonGroupClient { + @Generated private final LargePersonGroupsImpl serviceClient; /** * Initializes an instance of LargePersonGroupClient class. - * + * * @param serviceClient the service client implementation. */ @Generated @@ -57,7 +57,7 @@ public final class LargePersonGroupClient { /** * Create a new Large Person Group with user-specified largePersonGroupId, name, an optional userData and * recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/create-large-person-group for * more details. *

Request Body Schema

@@ -69,7 +69,7 @@ public final class LargePersonGroupClient { * recognitionModel: String(recognition_01/recognition_02/recognition_03/recognition_04) (Optional) * } * } - * + * * @param createRequest The createRequest 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. @@ -87,7 +87,7 @@ public Response createWithResponse(BinaryData createRequest, RequestOption /** * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/delete-large-person-group for * more details. - * + * * @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. @@ -122,7 +122,7 @@ public Response deleteWithResponse(RequestOptions requestOptions) { * largePersonGroupId: String (Required) * } * } - * + * * @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. @@ -148,7 +148,7 @@ public Response getWithResponse(RequestOptions requestOptions) { * userData: String (Optional) * } * } - * + * * @param updateRequest The updateRequest 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. @@ -165,7 +165,7 @@ public Response updateWithResponse(BinaryData updateRequest, RequestOption /** * List all existing Large Person Groups' largePersonGroupId, name, userData and recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-groups for * more details. *

Query Parameters

@@ -192,7 +192,7 @@ public Response updateWithResponse(BinaryData updateRequest, RequestOption * } * ] * } - * + * * @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. @@ -209,7 +209,7 @@ public Response getLargePersonGroupsWithResponse(RequestOptions requ /** * To check Large Person Group training status completed or still ongoing. Large Person Group training is an * asynchronous operation triggered by "Train Large Person Group" API. - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group-training-status for more * details. @@ -224,7 +224,7 @@ public Response getLargePersonGroupsWithResponse(RequestOptions requ * message: String (Optional) * } * } - * + * * @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. @@ -241,10 +241,10 @@ public Response getTrainingStatusWithResponse(RequestOptions request /** * Submit a Large Person Group training task. Training is a crucial step that only a trained Large Person Group can * be used by "Identify From Large Person Group". - * + * * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/train-large-person-group for * more details. - * + * * @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. @@ -261,7 +261,7 @@ public SyncPoller beginTrain(RequestOptions requestOptio /** * Create a new person in a specified Large Person Group. To add face to this person, please call "Add Large Person * Group Person Face". - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/create-large-person-group-person for more * details. @@ -281,7 +281,7 @@ public SyncPoller beginTrain(RequestOptions requestOptio * personId: String (Required) * } * } - * + * * @param createPersonRequest The createPersonRequest 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. @@ -301,7 +301,7 @@ public Response createPersonWithResponse(BinaryData createPersonRequ * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/delete-large-person-group-person for more * details. - * + * * @param personId ID of the person. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -331,7 +331,7 @@ public Response deletePersonWithResponse(String personId, RequestOptions r * ] * } * } - * + * * @param personId ID of the person. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -358,7 +358,7 @@ public Response getPersonWithResponse(String personId, RequestOption * userData: String (Optional) * } * } - * + * * @param personId ID of the person. * @param updatePersonRequest The updatePersonRequest parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -378,7 +378,7 @@ public Response updatePersonWithResponse(String personId, BinaryData updat /** * List all persons' information in the specified Large Person Group, including personId, name, userData and * persistedFaceIds of registered person faces. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group-persons * for more details. *

Query Parameters

@@ -405,7 +405,7 @@ public Response updatePersonWithResponse(String personId, BinaryData updat * } * ] * } - * + * * @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. @@ -421,7 +421,7 @@ public Response getPersonsWithResponse(RequestOptions requestOptions /** * Add a face to a person into a Large Person Group for face identification or verification. - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/add-large-person-group-person-face-from-url for * more details. @@ -454,7 +454,7 @@ public Response getPersonsWithResponse(RequestOptions requestOptions * persistedFaceId: String (Required) * } * } - * + * * @param personId ID of the person. * @param addFaceFromUrlRequest The addFaceFromUrlRequest parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -473,7 +473,7 @@ Response addFaceFromUrlImplWithResponse(String personId, BinaryData /** * Add a face to a person into a Large Person Group for face identification or verification. - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/add-large-person-group-person-face for more * details. @@ -504,7 +504,7 @@ Response addFaceFromUrlImplWithResponse(String personId, BinaryData * persistedFaceId: String (Required) * } * } - * + * * @param personId ID of the person. * @param imageContent The image to be analyzed. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -524,11 +524,11 @@ Response addFaceImplWithResponse(String personId, BinaryData imageCo /** * Delete a face from a person in a Large Person Group by specified largePersonGroupId, personId and * persistedFaceId. - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/delete-large-person-group-person-face for more * details. - * + * * @param personId ID of the person. * @param persistedFaceId Face ID of the face. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -557,7 +557,7 @@ public Response deleteFaceWithResponse(String personId, String persistedFa * userData: String (Optional) * } * } - * + * * @param personId ID of the person. * @param persistedFaceId Face ID of the face. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -585,7 +585,7 @@ public Response getFaceWithResponse(String personId, String persiste * userData: String (Optional) * } * } - * + * * @param personId ID of the person. * @param persistedFaceId Face ID of the face. * @param updateFaceRequest The updateFaceRequest parameter. @@ -606,10 +606,10 @@ public Response updateFaceWithResponse(String personId, String persistedFa /** * Create a new Large Person Group with user-specified largePersonGroupId, name, an optional userData and * recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/create-large-person-group for * more details. - * + * * @param name User defined name, maximum length is 128. * @param userData Optional user defined data. Length should not exceed 16K. * @param recognitionModel The 'recognitionModel' associated with this face list. Supported 'recognitionModel' @@ -637,10 +637,10 @@ public void create(String name, String userData, FaceRecognitionModel recognitio /** * Create a new Large Person Group with user-specified largePersonGroupId, name, an optional userData and * recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/create-large-person-group for * more details. - * + * * @param name User defined name, maximum length is 128. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -662,7 +662,7 @@ public void create(String name) { /** * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/delete-large-person-group for * more details. - * + * * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -680,7 +680,7 @@ public void delete() { /** * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group for more * details. - * + * * @param returnRecognitionModel Return 'recognitionModel' or not. The default value is false. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -705,7 +705,7 @@ public LargePersonGroup get(Boolean returnRecognitionModel) { /** * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group for more * details. - * + * * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -725,7 +725,7 @@ public LargePersonGroup get() { /** * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/update-large-person-group for * more details. - * + * * @param name User defined name, maximum length is 128. * @param userData Optional user defined data. Length should not exceed 16K. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -748,7 +748,7 @@ public void update(String name, String userData) { /** * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/update-large-person-group for * more details. - * + * * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -767,10 +767,10 @@ public void update() { /** * List all existing Large Person Groups' largePersonGroupId, name, userData and recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-groups for * more details. - * + * * @param start List resources greater than the "start". It contains no more than 64 characters. Default is empty. * @param top The number of items to list, ranging in [1, 1000]. Default is 1000. * @param returnRecognitionModel Return 'recognitionModel' or not. The default value is false. @@ -802,10 +802,10 @@ public List getLargePersonGroups(String start, Integer top, Bo /** * List all existing Large Person Groups' largePersonGroupId, name, userData and recognitionModel. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-groups for * more details. - * + * * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -825,11 +825,11 @@ public List getLargePersonGroups() { /** * To check Large Person Group training status completed or still ongoing. Large Person Group training is an * asynchronous operation triggered by "Train Large Person Group" API. - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group-training-status for more * details. - * + * * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -848,10 +848,10 @@ public FaceTrainingResult getTrainingStatus() { /** * Submit a Large Person Group training task. Training is a crucial step that only a trained Large Person Group can * be used by "Identify From Large Person Group". - * + * * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/train-large-person-group for * more details. - * + * * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -870,11 +870,11 @@ public SyncPoller beginTrain() { /** * Create a new person in a specified Large Person Group. To add face to this person, please call "Add Large Person * Group Person Face". - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/create-large-person-group-person for more * details. - * + * * @param name User defined name, maximum length is 128. * @param userData Optional user defined data. Length should not exceed 16K. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -899,11 +899,11 @@ public CreatePersonResult createPerson(String name, String userData) { /** * Create a new person in a specified Large Person Group. To add face to this person, please call "Add Large Person * Group Person Face". - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/create-large-person-group-person for more * details. - * + * * @param name User defined name, maximum length is 128. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -928,7 +928,7 @@ public CreatePersonResult createPerson(String name) { * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/delete-large-person-group-person for more * details. - * + * * @param personId ID of the person. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -948,7 +948,7 @@ public void deletePerson(String personId) { /** * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group-person * for more details. - * + * * @param personId ID of the person. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -970,7 +970,7 @@ public LargePersonGroupPerson getPerson(String personId) { * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/update-large-person-group-person for more * details. - * + * * @param personId ID of the person. * @param name User defined name, maximum length is 128. * @param userData Optional user defined data. Length should not exceed 16K. @@ -995,7 +995,7 @@ public void updatePerson(String personId, String name, String userData) { * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/update-large-person-group-person for more * details. - * + * * @param personId ID of the person. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -1017,10 +1017,10 @@ public void updatePerson(String personId) { /** * List all persons' information in the specified Large Person Group, including personId, name, userData and * persistedFaceIds of registered person faces. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group-persons * for more details. - * + * * @param start List resources greater than the "start". It contains no more than 64 characters. Default is empty. * @param top The number of items to list, ranging in [1, 1000]. Default is 1000. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1049,10 +1049,10 @@ public List getPersons(String start, Integer top) { /** * List all persons' information in the specified Large Person Group, including personId, name, userData and * persistedFaceIds of registered person faces. - * + * * Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group-persons * for more details. - * + * * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -1071,11 +1071,11 @@ public List getPersons() { /** * Add a face to a person into a Large Person Group for face identification or verification. - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/add-large-person-group-person-face-from-url for * more details. - * + * * @param personId ID of the person. * @param url URL of input image. * @param targetFace A face rectangle to specify the target face to be added to a person, in the format of @@ -1116,11 +1116,11 @@ AddFaceResult addFaceFromUrlImpl(String personId, String url, List targ /** * Add a face to a person into a Large Person Group for face identification or verification. - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/add-large-person-group-person-face-from-url for * more details. - * + * * @param personId ID of the person. * @param url URL of input image. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1144,11 +1144,11 @@ AddFaceResult addFaceFromUrlImpl(String personId, String url) { /** * Add a face to a person into a Large Person Group for face identification or verification. - * + * * Please refer to * https://learn.microsoft.com/rest/api/face/person-group-operations/add-large-person-group-person-face for more * details. - * + * * @param personId ID of the person. * @param imageContent The image to be analyzed. * @param targetFace A face rectangle to specify the target face to be added to a person, in the format of @@ -1186,11 +1186,11 @@ AddFaceResult addFaceImpl(String personId, BinaryData imageContent, List * Package containing the classes for FaceAdministrationClient. From c054c41a3667b42a47a1161055f72b1f8eb30c7c Mon Sep 17 00:00:00 2001 From: Han Chiang Date: Wed, 9 Oct 2024 13:44:14 +0000 Subject: [PATCH 05/14] Regen --- .../FaceAdministrationClientBuilder.java | 8 +- .../face/generated/CreateLargeFaceList.java | 25 +++++ .../generated/CreateLargePersonGroup.java | 26 +++++ .../face/generated/CreateLivenessSession.java | 29 ++++++ .../CreatePersonInLargePersonGroup.java | 26 +++++ .../DeleteFaceFromLargeFaceList.java | 24 +++++ .../DeleteFaceFromLargePersonGroupPerson.java | 25 +++++ .../face/generated/DeleteLargeFaceList.java | 24 +++++ .../generated/DeleteLargePersonGroup.java | 24 +++++ .../face/generated/DeleteLivenessSession.java | 22 +++++ .../DeleteLivenessWithVerifySession.java | 22 +++++ .../DeletePersonFromLargePersonGroup.java | 24 +++++ .../generated/DetectFromSessionImageId.java | 36 +++++++ .../generated/FindSimilarAmongFaceIDs.java | 27 ++++++ .../FindSimilarFromLargeFaceList.java | 25 +++++ .../generated/GetFaceFromLargeFaceList.java | 25 +++++ .../GetFaceFromLargePersonGroupPerson.java | 26 +++++ .../generated/GetFacesFromLargeFaceList.java | 26 +++++ .../face/generated/GetLargeFaceList.java | 25 +++++ .../face/generated/GetLargeFaceLists.java | 26 +++++ .../face/generated/GetLargePersonGroup.java | 25 +++++ .../face/generated/GetLargePersonGroups.java | 27 ++++++ .../GetLivenessSessionAuditEntries.java | 25 +++++ .../generated/GetLivenessSessionResult.java | 23 +++++ .../face/generated/GetLivenessSessions.java | 25 +++++ ...LivenessWithVerifySessionAuditEntries.java | 25 +++++ .../GetLivenessWithVerifySessionResult.java | 24 +++++ .../GetLivenessWithVerifySessions.java | 25 +++++ .../GetPersonFromLargePersonGroup.java | 25 +++++ .../GetPersonsFromLargePersonGroup.java | 27 ++++++ .../face/generated/GetSessionImage.java | 23 +++++ .../GetTrainingStatusOfLargeFaceList.java | 25 +++++ .../GetTrainingStatusOfLargePersonGroup.java | 25 +++++ .../vision/face/generated/GroupFaceIDs.java | 27 ++++++ .../IdentifyFromLargePersonGroup.java | 25 +++++ .../face/generated/TrainLargeFaceList.java | 26 +++++ .../face/generated/TrainLargePersonGroup.java | 26 +++++ .../generated/UpdateFaceInLargeFaceList.java | 24 +++++ .../UpdateFaceInLargePersonGroupPerson.java | 25 +++++ .../face/generated/UpdateLargeFaceList.java | 24 +++++ .../generated/UpdateLargePersonGroup.java | 24 +++++ .../UpdatePersonInLargePersonGroup.java | 25 +++++ .../face/generated/VerifyFaceToFace.java | 23 +++++ .../generated/VerifyFromLargePersonGroup.java | 23 +++++ .../generated/CreateLargeFaceListTests.java | 19 ++++ .../CreateLargePersonGroupTests.java | 20 ++++ .../generated/CreateLivenessSessionTests.java | 33 +++++++ .../CreatePersonInLargePersonGroupTests.java | 26 +++++ .../DeleteFaceFromLargeFaceListTests.java | 18 ++++ ...teFaceFromLargePersonGroupPersonTests.java | 19 ++++ .../generated/DeleteLargeFaceListTests.java | 18 ++++ .../DeleteLargePersonGroupTests.java | 18 ++++ .../generated/DeleteLivenessSessionTests.java | 18 ++++ .../DeleteLivenessWithVerifySessionTests.java | 18 ++++ ...DeletePersonFromLargePersonGroupTests.java | 18 ++++ .../DetectFromSessionImageIdTests.java | 32 +++++++ .../FaceAdministrationClientTestBase.java | 96 +++++++++++++++++++ .../FindSimilarAmongFaceIDsTests.java | 24 +++++ .../FindSimilarFromLargeFaceListTests.java | 22 +++++ .../GetFaceFromLargeFaceListTests.java | 27 ++++++ ...etFaceFromLargePersonGroupPersonTests.java | 28 ++++++ .../GetFacesFromLargeFaceListTests.java | 20 ++++ .../face/generated/GetLargeFaceListTests.java | 32 +++++++ .../generated/GetLargeFaceListsTests.java | 20 ++++ .../generated/GetLargePersonGroupTests.java | 32 +++++++ .../generated/GetLargePersonGroupsTests.java | 21 ++++ .../GetLivenessSessionAuditEntriesTests.java | 21 ++++ .../GetLivenessSessionResultTests.java | 67 +++++++++++++ .../generated/GetLivenessSessionsTests.java | 21 ++++ ...essWithVerifySessionAuditEntriesTests.java | 21 ++++ ...tLivenessWithVerifySessionResultTests.java | 68 +++++++++++++ .../GetLivenessWithVerifySessionsTests.java | 21 ++++ .../GetPersonFromLargePersonGroupTests.java | 33 +++++++ .../GetPersonsFromLargePersonGroupTests.java | 21 ++++ .../face/generated/GetSessionImageTests.java | 23 +++++ ...GetTrainingStatusOfLargeFaceListTests.java | 32 +++++++ ...TrainingStatusOfLargePersonGroupTests.java | 32 +++++++ .../face/generated/GroupFaceIDsTests.java | 36 +++++++ .../IdentifyFromLargePersonGroupTests.java | 22 +++++ .../generated/TrainLargeFaceListTests.java | 27 ++++++ .../generated/TrainLargePersonGroupTests.java | 27 ++++++ .../UpdateFaceInLargeFaceListTests.java | 18 ++++ ...dateFaceInLargePersonGroupPersonTests.java | 19 ++++ .../generated/UpdateLargeFaceListTests.java | 18 ++++ .../UpdateLargePersonGroupTests.java | 18 ++++ .../UpdatePersonInLargePersonGroupTests.java | 19 ++++ .../face/generated/VerifyFaceToFaceTests.java | 28 ++++++ .../VerifyFromLargePersonGroupTests.java | 28 ++++++ .../azure-ai-vision-face/tsp-location.yaml | 2 +- 89 files changed, 2287 insertions(+), 5 deletions(-) create mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/CreateLargeFaceList.java create mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/CreateLargePersonGroup.java create mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/CreateLivenessSession.java create mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/CreatePersonInLargePersonGroup.java create mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteFaceFromLargeFaceList.java create mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteFaceFromLargePersonGroupPerson.java create mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteLargeFaceList.java create mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteLargePersonGroup.java create mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteLivenessSession.java create mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteLivenessWithVerifySession.java create mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeletePersonFromLargePersonGroup.java create mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DetectFromSessionImageId.java create mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/FindSimilarAmongFaceIDs.java create mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/FindSimilarFromLargeFaceList.java create mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetFaceFromLargeFaceList.java create mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetFaceFromLargePersonGroupPerson.java create mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetFacesFromLargeFaceList.java create mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLargeFaceList.java create mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLargeFaceLists.java create mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLargePersonGroup.java create mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLargePersonGroups.java create mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessSessionAuditEntries.java create mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessSessionResult.java create mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessSessions.java create mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessionAuditEntries.java create mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessionResult.java create mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessions.java create mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetPersonFromLargePersonGroup.java create mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetPersonsFromLargePersonGroup.java create mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetSessionImage.java create mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetTrainingStatusOfLargeFaceList.java create mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetTrainingStatusOfLargePersonGroup.java create mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GroupFaceIDs.java create mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/IdentifyFromLargePersonGroup.java create mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/TrainLargeFaceList.java create mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/TrainLargePersonGroup.java create mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/UpdateFaceInLargeFaceList.java create mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/UpdateFaceInLargePersonGroupPerson.java create mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/UpdateLargeFaceList.java create mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/UpdateLargePersonGroup.java create mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/UpdatePersonInLargePersonGroup.java create mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/VerifyFaceToFace.java create mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/VerifyFromLargePersonGroup.java create mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/CreateLargeFaceListTests.java create mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/CreateLargePersonGroupTests.java create mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/CreateLivenessSessionTests.java create mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/CreatePersonInLargePersonGroupTests.java create mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteFaceFromLargeFaceListTests.java create mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteFaceFromLargePersonGroupPersonTests.java create mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteLargeFaceListTests.java create mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteLargePersonGroupTests.java create mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteLivenessSessionTests.java create mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteLivenessWithVerifySessionTests.java create mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeletePersonFromLargePersonGroupTests.java create mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DetectFromSessionImageIdTests.java create mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/FaceAdministrationClientTestBase.java create mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/FindSimilarAmongFaceIDsTests.java create mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/FindSimilarFromLargeFaceListTests.java create mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetFaceFromLargeFaceListTests.java create mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetFaceFromLargePersonGroupPersonTests.java create mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetFacesFromLargeFaceListTests.java create mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLargeFaceListTests.java create mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLargeFaceListsTests.java create mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLargePersonGroupTests.java create mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLargePersonGroupsTests.java create mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessSessionAuditEntriesTests.java create mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessSessionResultTests.java create mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessSessionsTests.java create mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessionAuditEntriesTests.java create mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessionResultTests.java create mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessionsTests.java create mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetPersonFromLargePersonGroupTests.java create mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetPersonsFromLargePersonGroupTests.java create mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetSessionImageTests.java create mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetTrainingStatusOfLargeFaceListTests.java create mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetTrainingStatusOfLargePersonGroupTests.java create mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GroupFaceIDsTests.java create mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/IdentifyFromLargePersonGroupTests.java create mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/TrainLargeFaceListTests.java create mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/TrainLargePersonGroupTests.java create mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/UpdateFaceInLargeFaceListTests.java create mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/UpdateFaceInLargePersonGroupPersonTests.java create mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/UpdateLargeFaceListTests.java create mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/UpdateLargePersonGroupTests.java create mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/UpdatePersonInLargePersonGroupTests.java create mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/VerifyFaceToFaceTests.java create mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/VerifyFromLargePersonGroupTests.java diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/FaceAdministrationClientBuilder.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/FaceAdministrationClientBuilder.java index db5b1641f783..12db5144cdea 100644 --- a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/FaceAdministrationClientBuilder.java +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/FaceAdministrationClientBuilder.java @@ -3,10 +3,6 @@ // Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.ai.vision.face.administration; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; import com.azure.ai.vision.face.FaceServiceVersion; import com.azure.ai.vision.face.implementation.FaceAdministrationClientImpl; import com.azure.core.annotation.Generated; @@ -42,6 +38,10 @@ import com.azure.core.util.builder.ClientBuilderUtil; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; /** * A builder for creating a new instance of the FaceAdministrationClient type. diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/CreateLargeFaceList.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/CreateLargeFaceList.java new file mode 100644 index 000000000000..ec26add30c55 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/CreateLargeFaceList.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; +import com.azure.ai.vision.face.administration.LargeFaceListClient; +import com.azure.ai.vision.face.models.FaceRecognitionModel; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class CreateLargeFaceList { + public static void main(String[] args) { + LargeFaceListClient largeFaceListClient + = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .largeFaceListId("your_large_face_list_id") + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .largePersonGroupId(Configuration.getGlobalConfiguration().get("LARGEPERSONGROUPID")) + .buildLargeFaceListClient(); + // BEGIN:com.azure.ai.vision.face.generated.largefacelistcreate.createlargefacelist + largeFaceListClient.create("your_large_face_list_name", "your_user_data", FaceRecognitionModel.RECOGNITION_01); + // END:com.azure.ai.vision.face.generated.largefacelistcreate.createlargefacelist + } +} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/CreateLargePersonGroup.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/CreateLargePersonGroup.java new file mode 100644 index 000000000000..64ad2c8b25dd --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/CreateLargePersonGroup.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; +import com.azure.ai.vision.face.administration.LargePersonGroupClient; +import com.azure.ai.vision.face.models.FaceRecognitionModel; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class CreateLargePersonGroup { + public static void main(String[] args) { + LargePersonGroupClient largePersonGroupClient + = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .largePersonGroupId("your_large_person_group_id") + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .largeFaceListId(Configuration.getGlobalConfiguration().get("LARGEFACELISTID")) + .buildLargePersonGroupClient(); + // BEGIN:com.azure.ai.vision.face.generated.largepersongroupcreate.createlargepersongroup + largePersonGroupClient.create("your_large_person_group_name", "your_user_data", + FaceRecognitionModel.RECOGNITION_01); + // END:com.azure.ai.vision.face.generated.largepersongroupcreate.createlargepersongroup + } +} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/CreateLivenessSession.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/CreateLivenessSession.java new file mode 100644 index 000000000000..c4a59697379a --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/CreateLivenessSession.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.FaceSessionClient; +import com.azure.ai.vision.face.FaceSessionClientBuilder; +import com.azure.ai.vision.face.models.CreateLivenessSessionContent; +import com.azure.ai.vision.face.models.CreateLivenessSessionResult; +import com.azure.ai.vision.face.models.LivenessOperationMode; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class CreateLivenessSession { + public static void main(String[] args) { + FaceSessionClient faceSessionClient + = new FaceSessionClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .buildClient(); + // BEGIN:com.azure.ai.vision.face.generated.createlivenesssession.createlivenesssession + CreateLivenessSessionResult response = faceSessionClient.createLivenessSession( + new CreateLivenessSessionContent(LivenessOperationMode.PASSIVE).setSendResultsToClient(true) + .setDeviceCorrelationIdSetInClient(true) + .setDeviceCorrelationId("your_device_correlation_id") + .setAuthTokenTimeToLiveInSeconds(60)); + // END:com.azure.ai.vision.face.generated.createlivenesssession.createlivenesssession + } +} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/CreatePersonInLargePersonGroup.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/CreatePersonInLargePersonGroup.java new file mode 100644 index 000000000000..5165ccf7b717 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/CreatePersonInLargePersonGroup.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; +import com.azure.ai.vision.face.administration.LargePersonGroupClient; +import com.azure.ai.vision.face.models.CreatePersonResult; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class CreatePersonInLargePersonGroup { + public static void main(String[] args) { + LargePersonGroupClient largePersonGroupClient + = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .largePersonGroupId("your_large_person_group_id") + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .largeFaceListId(Configuration.getGlobalConfiguration().get("LARGEFACELISTID")) + .buildLargePersonGroupClient(); + // BEGIN:com.azure.ai.vision.face.generated.largepersongroupcreateperson.createpersoninlargepersongroup + CreatePersonResult response + = largePersonGroupClient.createPerson("your_large_person_group_person_name", "your_user_data"); + // END:com.azure.ai.vision.face.generated.largepersongroupcreateperson.createpersoninlargepersongroup + } +} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteFaceFromLargeFaceList.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteFaceFromLargeFaceList.java new file mode 100644 index 000000000000..5a54df5cb09a --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteFaceFromLargeFaceList.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; +import com.azure.ai.vision.face.administration.LargeFaceListClient; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class DeleteFaceFromLargeFaceList { + public static void main(String[] args) { + LargeFaceListClient largeFaceListClient + = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .largeFaceListId("your_large_face_list_id") + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .largePersonGroupId(Configuration.getGlobalConfiguration().get("LARGEPERSONGROUPID")) + .buildLargeFaceListClient(); + // BEGIN:com.azure.ai.vision.face.generated.largefacelistdeleteface.deletefacefromlargefacelist + largeFaceListClient.deleteFace("43897a75-8d6f-42cf-885e-74832febb055"); + // END:com.azure.ai.vision.face.generated.largefacelistdeleteface.deletefacefromlargefacelist + } +} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteFaceFromLargePersonGroupPerson.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteFaceFromLargePersonGroupPerson.java new file mode 100644 index 000000000000..4cd1e61a4342 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteFaceFromLargePersonGroupPerson.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; +import com.azure.ai.vision.face.administration.LargePersonGroupClient; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class DeleteFaceFromLargePersonGroupPerson { + public static void main(String[] args) { + LargePersonGroupClient largePersonGroupClient + = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .largePersonGroupId("your_large_person_group_id") + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .largeFaceListId(Configuration.getGlobalConfiguration().get("LARGEFACELISTID")) + .buildLargePersonGroupClient(); + // BEGIN:com.azure.ai.vision.face.generated.largepersongroupdeleteface.deletefacefromlargepersongroupperson + largePersonGroupClient.deleteFace("25985303-c537-4467-b41d-bdb45cd95ca1", + "43897a75-8d6f-42cf-885e-74832febb055"); + // END:com.azure.ai.vision.face.generated.largepersongroupdeleteface.deletefacefromlargepersongroupperson + } +} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteLargeFaceList.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteLargeFaceList.java new file mode 100644 index 000000000000..22ce43828d39 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteLargeFaceList.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; +import com.azure.ai.vision.face.administration.LargeFaceListClient; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class DeleteLargeFaceList { + public static void main(String[] args) { + LargeFaceListClient largeFaceListClient + = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .largeFaceListId("your_large_face_list_id") + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .largePersonGroupId(Configuration.getGlobalConfiguration().get("LARGEPERSONGROUPID")) + .buildLargeFaceListClient(); + // BEGIN:com.azure.ai.vision.face.generated.largefacelistdelete.deletelargefacelist + largeFaceListClient.delete(); + // END:com.azure.ai.vision.face.generated.largefacelistdelete.deletelargefacelist + } +} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteLargePersonGroup.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteLargePersonGroup.java new file mode 100644 index 000000000000..9f5017eab8db --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteLargePersonGroup.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; +import com.azure.ai.vision.face.administration.LargePersonGroupClient; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class DeleteLargePersonGroup { + public static void main(String[] args) { + LargePersonGroupClient largePersonGroupClient + = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .largePersonGroupId("your_large_person_group_id") + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .largeFaceListId(Configuration.getGlobalConfiguration().get("LARGEFACELISTID")) + .buildLargePersonGroupClient(); + // BEGIN:com.azure.ai.vision.face.generated.largepersongroupdelete.deletelargepersongroup + largePersonGroupClient.delete(); + // END:com.azure.ai.vision.face.generated.largepersongroupdelete.deletelargepersongroup + } +} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteLivenessSession.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteLivenessSession.java new file mode 100644 index 000000000000..e547aac617e8 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteLivenessSession.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.FaceSessionClient; +import com.azure.ai.vision.face.FaceSessionClientBuilder; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class DeleteLivenessSession { + public static void main(String[] args) { + FaceSessionClient faceSessionClient + = new FaceSessionClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .buildClient(); + // BEGIN:com.azure.ai.vision.face.generated.deletelivenesssession.deletelivenesssession + faceSessionClient.deleteLivenessSession("b12e033e-bda7-4b83-a211-e721c661f30e"); + // END:com.azure.ai.vision.face.generated.deletelivenesssession.deletelivenesssession + } +} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteLivenessWithVerifySession.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteLivenessWithVerifySession.java new file mode 100644 index 000000000000..93bce9a42d80 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteLivenessWithVerifySession.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.FaceSessionClient; +import com.azure.ai.vision.face.FaceSessionClientBuilder; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class DeleteLivenessWithVerifySession { + public static void main(String[] args) { + FaceSessionClient faceSessionClient + = new FaceSessionClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .buildClient(); + // BEGIN:com.azure.ai.vision.face.generated.deletelivenesswithverifysession.deletelivenesswithverifysession + faceSessionClient.deleteLivenessWithVerifySession("b12e033e-bda7-4b83-a211-e721c661f30e"); + // END:com.azure.ai.vision.face.generated.deletelivenesswithverifysession.deletelivenesswithverifysession + } +} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeletePersonFromLargePersonGroup.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeletePersonFromLargePersonGroup.java new file mode 100644 index 000000000000..0d315d2f2c35 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeletePersonFromLargePersonGroup.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; +import com.azure.ai.vision.face.administration.LargePersonGroupClient; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class DeletePersonFromLargePersonGroup { + public static void main(String[] args) { + LargePersonGroupClient largePersonGroupClient + = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .largePersonGroupId("your_large_person_group_id") + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .largeFaceListId(Configuration.getGlobalConfiguration().get("LARGEFACELISTID")) + .buildLargePersonGroupClient(); + // BEGIN:com.azure.ai.vision.face.generated.largepersongroupdeleteperson.deletepersonfromlargepersongroup + largePersonGroupClient.deletePerson("25985303-c537-4467-b41d-bdb45cd95ca1"); + // END:com.azure.ai.vision.face.generated.largepersongroupdeleteperson.deletepersonfromlargepersongroup + } +} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DetectFromSessionImageId.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DetectFromSessionImageId.java new file mode 100644 index 000000000000..40f326e1754d --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DetectFromSessionImageId.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.FaceSessionClient; +import com.azure.ai.vision.face.FaceSessionClientBuilder; +import com.azure.ai.vision.face.models.DetectFromSessionImageOptions; +import com.azure.ai.vision.face.models.FaceDetectionModel; +import com.azure.ai.vision.face.models.FaceDetectionResult; +import com.azure.ai.vision.face.models.FaceRecognitionModel; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.Arrays; +import java.util.List; + +public class DetectFromSessionImageId { + public static void main(String[] args) { + FaceSessionClient faceSessionClient + = new FaceSessionClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .buildClient(); + // BEGIN:com.azure.ai.vision.face.generated.detectfromsessionimage.detectfromsessionimageid + List response = faceSessionClient + .detectFromSessionImage(new DetectFromSessionImageOptions("aa93ce80-9a9b-48bd-ae1a-1c7543841e92") + .setDetectionModel(FaceDetectionModel.DETECTION_01) + .setRecognitionModel(FaceRecognitionModel.RECOGNITION_03) + .setReturnFaceId(true) + .setReturnFaceAttributes(Arrays.asList()) + .setReturnFaceLandmarks(true) + .setReturnRecognitionModel(true) + .setFaceIdTimeToLive(60)); + // END:com.azure.ai.vision.face.generated.detectfromsessionimage.detectfromsessionimageid + } +} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/FindSimilarAmongFaceIDs.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/FindSimilarAmongFaceIDs.java new file mode 100644 index 000000000000..2f249dbfaedd --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/FindSimilarAmongFaceIDs.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.FaceClient; +import com.azure.ai.vision.face.FaceClientBuilder; +import com.azure.ai.vision.face.models.FaceFindSimilarResult; +import com.azure.ai.vision.face.models.FindSimilarMatchMode; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.Arrays; +import java.util.List; + +public class FindSimilarAmongFaceIDs { + public static void main(String[] args) { + FaceClient faceClient = new FaceClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .buildClient(); + // BEGIN:com.azure.ai.vision.face.generated.findsimilar.findsimilaramongfaceids + List response = faceClient.findSimilar("c5c24a82-6845-4031-9d5d-978df9175426", + Arrays.asList("015839fb-fbd9-4f79-ace9-7675fc2f1dd9", "be386ab3-af91-4104-9e6d-4dae4c9fddb7"), 3, + FindSimilarMatchMode.MATCH_PERSON); + // END:com.azure.ai.vision.face.generated.findsimilar.findsimilaramongfaceids + } +} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/FindSimilarFromLargeFaceList.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/FindSimilarFromLargeFaceList.java new file mode 100644 index 000000000000..bb084061f36b --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/FindSimilarFromLargeFaceList.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.FaceClient; +import com.azure.ai.vision.face.FaceClientBuilder; +import com.azure.ai.vision.face.models.FaceFindSimilarResult; +import com.azure.ai.vision.face.models.FindSimilarMatchMode; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.List; + +public class FindSimilarFromLargeFaceList { + public static void main(String[] args) { + FaceClient faceClient = new FaceClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .buildClient(); + // BEGIN:com.azure.ai.vision.face.generated.findsimilarfromlargefacelist.findsimilarfromlargefacelist + List response = faceClient.findSimilarFromLargeFaceList( + "c5c24a82-6845-4031-9d5d-978df9175426", "your_large_face_list_id", 3, FindSimilarMatchMode.MATCH_PERSON); + // END:com.azure.ai.vision.face.generated.findsimilarfromlargefacelist.findsimilarfromlargefacelist + } +} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetFaceFromLargeFaceList.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetFaceFromLargeFaceList.java new file mode 100644 index 000000000000..e0d2590bd51b --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetFaceFromLargeFaceList.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; +import com.azure.ai.vision.face.administration.LargeFaceListClient; +import com.azure.ai.vision.face.models.LargeFaceListFace; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class GetFaceFromLargeFaceList { + public static void main(String[] args) { + LargeFaceListClient largeFaceListClient + = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .largeFaceListId("your_large_face_list_id") + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .largePersonGroupId(Configuration.getGlobalConfiguration().get("LARGEPERSONGROUPID")) + .buildLargeFaceListClient(); + // BEGIN:com.azure.ai.vision.face.generated.largefacelistgetface.getfacefromlargefacelist + LargeFaceListFace response = largeFaceListClient.getFace("43897a75-8d6f-42cf-885e-74832febb055"); + // END:com.azure.ai.vision.face.generated.largefacelistgetface.getfacefromlargefacelist + } +} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetFaceFromLargePersonGroupPerson.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetFaceFromLargePersonGroupPerson.java new file mode 100644 index 000000000000..015dac2d80bb --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetFaceFromLargePersonGroupPerson.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; +import com.azure.ai.vision.face.administration.LargePersonGroupClient; +import com.azure.ai.vision.face.models.LargePersonGroupPersonFace; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class GetFaceFromLargePersonGroupPerson { + public static void main(String[] args) { + LargePersonGroupClient largePersonGroupClient + = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .largePersonGroupId("your_large_person_group_id") + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .largeFaceListId(Configuration.getGlobalConfiguration().get("LARGEFACELISTID")) + .buildLargePersonGroupClient(); + // BEGIN:com.azure.ai.vision.face.generated.largepersongroupgetface.getfacefromlargepersongroupperson + LargePersonGroupPersonFace response = largePersonGroupClient.getFace("25985303-c537-4467-b41d-bdb45cd95ca1", + "43897a75-8d6f-42cf-885e-74832febb055"); + // END:com.azure.ai.vision.face.generated.largepersongroupgetface.getfacefromlargepersongroupperson + } +} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetFacesFromLargeFaceList.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetFacesFromLargeFaceList.java new file mode 100644 index 000000000000..b5a2495acee4 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetFacesFromLargeFaceList.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; +import com.azure.ai.vision.face.administration.LargeFaceListClient; +import com.azure.ai.vision.face.models.LargeFaceListFace; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.List; + +public class GetFacesFromLargeFaceList { + public static void main(String[] args) { + LargeFaceListClient largeFaceListClient + = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .largeFaceListId("your_large_face_list_id") + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .largePersonGroupId(Configuration.getGlobalConfiguration().get("LARGEPERSONGROUPID")) + .buildLargeFaceListClient(); + // BEGIN:com.azure.ai.vision.face.generated.largefacelistgetfaces.getfacesfromlargefacelist + List response = largeFaceListClient.getFaces("00000000-0000-0000-0000-000000000000", 20); + // END:com.azure.ai.vision.face.generated.largefacelistgetfaces.getfacesfromlargefacelist + } +} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLargeFaceList.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLargeFaceList.java new file mode 100644 index 000000000000..164ea741b410 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLargeFaceList.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; +import com.azure.ai.vision.face.administration.LargeFaceListClient; +import com.azure.ai.vision.face.models.LargeFaceList; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class GetLargeFaceList { + public static void main(String[] args) { + LargeFaceListClient largeFaceListClient + = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .largeFaceListId("your_large_face_list_id") + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .largePersonGroupId(Configuration.getGlobalConfiguration().get("LARGEPERSONGROUPID")) + .buildLargeFaceListClient(); + // BEGIN:com.azure.ai.vision.face.generated.largefacelistget.getlargefacelist + LargeFaceList response = largeFaceListClient.get(true); + // END:com.azure.ai.vision.face.generated.largefacelistget.getlargefacelist + } +} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLargeFaceLists.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLargeFaceLists.java new file mode 100644 index 000000000000..a5f3cff3f3d1 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLargeFaceLists.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; +import com.azure.ai.vision.face.administration.LargeFaceListClient; +import com.azure.ai.vision.face.models.LargeFaceList; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.List; + +public class GetLargeFaceLists { + public static void main(String[] args) { + LargeFaceListClient largeFaceListClient + = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .largeFaceListId(Configuration.getGlobalConfiguration().get("LARGEFACELISTID")) + .largePersonGroupId(Configuration.getGlobalConfiguration().get("LARGEPERSONGROUPID")) + .buildLargeFaceListClient(); + // BEGIN:com.azure.ai.vision.face.generated.largefacelistgetlargefacelists.getlargefacelists + List response = largeFaceListClient.getLargeFaceLists("my_list_id", 20, true); + // END:com.azure.ai.vision.face.generated.largefacelistgetlargefacelists.getlargefacelists + } +} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLargePersonGroup.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLargePersonGroup.java new file mode 100644 index 000000000000..425112906ea7 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLargePersonGroup.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; +import com.azure.ai.vision.face.administration.LargePersonGroupClient; +import com.azure.ai.vision.face.models.LargePersonGroup; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class GetLargePersonGroup { + public static void main(String[] args) { + LargePersonGroupClient largePersonGroupClient + = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .largePersonGroupId("your_large_person_group_id") + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .largeFaceListId(Configuration.getGlobalConfiguration().get("LARGEFACELISTID")) + .buildLargePersonGroupClient(); + // BEGIN:com.azure.ai.vision.face.generated.largepersongroupget.getlargepersongroup + LargePersonGroup response = largePersonGroupClient.get(true); + // END:com.azure.ai.vision.face.generated.largepersongroupget.getlargepersongroup + } +} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLargePersonGroups.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLargePersonGroups.java new file mode 100644 index 000000000000..23dea87b921f --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLargePersonGroups.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; +import com.azure.ai.vision.face.administration.LargePersonGroupClient; +import com.azure.ai.vision.face.models.LargePersonGroup; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.List; + +public class GetLargePersonGroups { + public static void main(String[] args) { + LargePersonGroupClient largePersonGroupClient + = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .largeFaceListId(Configuration.getGlobalConfiguration().get("LARGEFACELISTID")) + .largePersonGroupId(Configuration.getGlobalConfiguration().get("LARGEPERSONGROUPID")) + .buildLargePersonGroupClient(); + // BEGIN:com.azure.ai.vision.face.generated.largepersongroupgetlargepersongroups.getlargepersongroups + List response + = largePersonGroupClient.getLargePersonGroups("00000000-0000-0000-0000-000000000000", 20, true); + // END:com.azure.ai.vision.face.generated.largepersongroupgetlargepersongroups.getlargepersongroups + } +} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessSessionAuditEntries.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessSessionAuditEntries.java new file mode 100644 index 000000000000..817227acfa61 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessSessionAuditEntries.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.FaceSessionClient; +import com.azure.ai.vision.face.FaceSessionClientBuilder; +import com.azure.ai.vision.face.models.LivenessSessionAuditEntry; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.List; + +public class GetLivenessSessionAuditEntries { + public static void main(String[] args) { + FaceSessionClient faceSessionClient + = new FaceSessionClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .buildClient(); + // BEGIN:com.azure.ai.vision.face.generated.getlivenesssessionauditentries.getlivenesssessionauditentries + List response + = faceSessionClient.getLivenessSessionAuditEntries("b12e033e-bda7-4b83-a211-e721c661f30e", "0", 20); + // END:com.azure.ai.vision.face.generated.getlivenesssessionauditentries.getlivenesssessionauditentries + } +} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessSessionResult.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessSessionResult.java new file mode 100644 index 000000000000..7af0331d0b02 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessSessionResult.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.FaceSessionClient; +import com.azure.ai.vision.face.FaceSessionClientBuilder; +import com.azure.ai.vision.face.models.LivenessSession; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class GetLivenessSessionResult { + public static void main(String[] args) { + FaceSessionClient faceSessionClient + = new FaceSessionClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .buildClient(); + // BEGIN:com.azure.ai.vision.face.generated.getlivenesssessionresult.getlivenesssessionresult + LivenessSession response = faceSessionClient.getLivenessSessionResult("b12e033e-bda7-4b83-a211-e721c661f30e"); + // END:com.azure.ai.vision.face.generated.getlivenesssessionresult.getlivenesssessionresult + } +} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessSessions.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessSessions.java new file mode 100644 index 000000000000..aaccecb1e1ca --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessSessions.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.FaceSessionClient; +import com.azure.ai.vision.face.FaceSessionClientBuilder; +import com.azure.ai.vision.face.models.LivenessSessionItem; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.List; + +public class GetLivenessSessions { + public static void main(String[] args) { + FaceSessionClient faceSessionClient + = new FaceSessionClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .buildClient(); + // BEGIN:com.azure.ai.vision.face.generated.getlivenesssessions.getlivenesssessions + List response + = faceSessionClient.getLivenessSessions("00000000-0000-0000-0000-000000000000", 20); + // END:com.azure.ai.vision.face.generated.getlivenesssessions.getlivenesssessions + } +} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessionAuditEntries.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessionAuditEntries.java new file mode 100644 index 000000000000..d3fc3bdfa001 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessionAuditEntries.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.FaceSessionClient; +import com.azure.ai.vision.face.FaceSessionClientBuilder; +import com.azure.ai.vision.face.models.LivenessSessionAuditEntry; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.List; + +public class GetLivenessWithVerifySessionAuditEntries { + public static void main(String[] args) { + FaceSessionClient faceSessionClient + = new FaceSessionClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .buildClient(); + // BEGIN:com.azure.ai.vision.face.generated.getlivenesswithverifysessionauditentries.getlivenesswithverifysessionauditentries + List response = faceSessionClient + .getLivenessWithVerifySessionAuditEntries("b12e033e-bda7-4b83-a211-e721c661f30e", "0", 20); + // END:com.azure.ai.vision.face.generated.getlivenesswithverifysessionauditentries.getlivenesswithverifysessionauditentries + } +} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessionResult.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessionResult.java new file mode 100644 index 000000000000..8ba2b7044a24 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessionResult.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.FaceSessionClient; +import com.azure.ai.vision.face.FaceSessionClientBuilder; +import com.azure.ai.vision.face.models.LivenessWithVerifySession; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class GetLivenessWithVerifySessionResult { + public static void main(String[] args) { + FaceSessionClient faceSessionClient + = new FaceSessionClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .buildClient(); + // BEGIN:com.azure.ai.vision.face.generated.getlivenesswithverifysessionresult.getlivenesswithverifysessionresult + LivenessWithVerifySession response + = faceSessionClient.getLivenessWithVerifySessionResult("b12e033e-bda7-4b83-a211-e721c661f30e"); + // END:com.azure.ai.vision.face.generated.getlivenesswithverifysessionresult.getlivenesswithverifysessionresult + } +} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessions.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessions.java new file mode 100644 index 000000000000..bf9c78d67156 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessions.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.FaceSessionClient; +import com.azure.ai.vision.face.FaceSessionClientBuilder; +import com.azure.ai.vision.face.models.LivenessSessionItem; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.List; + +public class GetLivenessWithVerifySessions { + public static void main(String[] args) { + FaceSessionClient faceSessionClient + = new FaceSessionClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .buildClient(); + // BEGIN:com.azure.ai.vision.face.generated.getlivenesswithverifysessions.getlivenesswithverifysessions + List response + = faceSessionClient.getLivenessWithVerifySessions("00000000-0000-0000-0000-000000000000", 20); + // END:com.azure.ai.vision.face.generated.getlivenesswithverifysessions.getlivenesswithverifysessions + } +} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetPersonFromLargePersonGroup.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetPersonFromLargePersonGroup.java new file mode 100644 index 000000000000..c9c0ba900031 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetPersonFromLargePersonGroup.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; +import com.azure.ai.vision.face.administration.LargePersonGroupClient; +import com.azure.ai.vision.face.models.LargePersonGroupPerson; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class GetPersonFromLargePersonGroup { + public static void main(String[] args) { + LargePersonGroupClient largePersonGroupClient + = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .largePersonGroupId("your_large_person_group_id") + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .largeFaceListId(Configuration.getGlobalConfiguration().get("LARGEFACELISTID")) + .buildLargePersonGroupClient(); + // BEGIN:com.azure.ai.vision.face.generated.largepersongroupgetperson.getpersonfromlargepersongroup + LargePersonGroupPerson response = largePersonGroupClient.getPerson("25985303-c537-4467-b41d-bdb45cd95ca1"); + // END:com.azure.ai.vision.face.generated.largepersongroupgetperson.getpersonfromlargepersongroup + } +} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetPersonsFromLargePersonGroup.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetPersonsFromLargePersonGroup.java new file mode 100644 index 000000000000..8b66f3eb270d --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetPersonsFromLargePersonGroup.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; +import com.azure.ai.vision.face.administration.LargePersonGroupClient; +import com.azure.ai.vision.face.models.LargePersonGroupPerson; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.List; + +public class GetPersonsFromLargePersonGroup { + public static void main(String[] args) { + LargePersonGroupClient largePersonGroupClient + = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .largePersonGroupId("your_large_person_group_id") + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .largeFaceListId(Configuration.getGlobalConfiguration().get("LARGEFACELISTID")) + .buildLargePersonGroupClient(); + // BEGIN:com.azure.ai.vision.face.generated.largepersongroupgetpersons.getpersonsfromlargepersongroup + List response + = largePersonGroupClient.getPersons("00000000-0000-0000-0000-000000000000", 20); + // END:com.azure.ai.vision.face.generated.largepersongroupgetpersons.getpersonsfromlargepersongroup + } +} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetSessionImage.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetSessionImage.java new file mode 100644 index 000000000000..275afb14b73f --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetSessionImage.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.FaceSessionClient; +import com.azure.ai.vision.face.FaceSessionClientBuilder; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class GetSessionImage { + public static void main(String[] args) { + FaceSessionClient faceSessionClient + = new FaceSessionClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .buildClient(); + // BEGIN:com.azure.ai.vision.face.generated.getsessionimage.getsessionimage + BinaryData response = faceSessionClient.getSessionImage("3d035d35-2e01-4ed4-8935-577afde9caaa"); + // END:com.azure.ai.vision.face.generated.getsessionimage.getsessionimage + } +} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetTrainingStatusOfLargeFaceList.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetTrainingStatusOfLargeFaceList.java new file mode 100644 index 000000000000..95b955faff14 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetTrainingStatusOfLargeFaceList.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; +import com.azure.ai.vision.face.administration.LargeFaceListClient; +import com.azure.ai.vision.face.models.FaceTrainingResult; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class GetTrainingStatusOfLargeFaceList { + public static void main(String[] args) { + LargeFaceListClient largeFaceListClient + = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .largeFaceListId("your_large_face_list_id") + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .largePersonGroupId(Configuration.getGlobalConfiguration().get("LARGEPERSONGROUPID")) + .buildLargeFaceListClient(); + // BEGIN:com.azure.ai.vision.face.generated.largefacelistgettrainingstatus.gettrainingstatusoflargefacelist + FaceTrainingResult response = largeFaceListClient.getTrainingStatus(); + // END:com.azure.ai.vision.face.generated.largefacelistgettrainingstatus.gettrainingstatusoflargefacelist + } +} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetTrainingStatusOfLargePersonGroup.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetTrainingStatusOfLargePersonGroup.java new file mode 100644 index 000000000000..2d0645949a2e --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetTrainingStatusOfLargePersonGroup.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; +import com.azure.ai.vision.face.administration.LargePersonGroupClient; +import com.azure.ai.vision.face.models.FaceTrainingResult; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class GetTrainingStatusOfLargePersonGroup { + public static void main(String[] args) { + LargePersonGroupClient largePersonGroupClient + = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .largePersonGroupId("your_large_person_group_id") + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .largeFaceListId(Configuration.getGlobalConfiguration().get("LARGEFACELISTID")) + .buildLargePersonGroupClient(); + // BEGIN:com.azure.ai.vision.face.generated.largepersongroupgettrainingstatus.gettrainingstatusoflargepersongroup + FaceTrainingResult response = largePersonGroupClient.getTrainingStatus(); + // END:com.azure.ai.vision.face.generated.largepersongroupgettrainingstatus.gettrainingstatusoflargepersongroup + } +} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GroupFaceIDs.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GroupFaceIDs.java new file mode 100644 index 000000000000..082ffd095dca --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GroupFaceIDs.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.FaceClient; +import com.azure.ai.vision.face.FaceClientBuilder; +import com.azure.ai.vision.face.models.FaceGroupingResult; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.Arrays; + +public class GroupFaceIDs { + public static void main(String[] args) { + FaceClient faceClient = new FaceClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .buildClient(); + // BEGIN:com.azure.ai.vision.face.generated.group.groupfaceids + FaceGroupingResult response = faceClient + .group(Arrays.asList("c5c24a82-6845-4031-9d5d-978df9175426", "015839fb-fbd9-4f79-ace9-7675fc2f1dd9", + "65d083d4-9447-47d1-af30-b626144bf0fb", "fce92aed-d578-4d2e-8114-068f8af4492e", + "30ea1073-cc9e-4652-b1e3-d08fb7b95315", "be386ab3-af91-4104-9e6d-4dae4c9fddb7", + "fbd2a038-dbff-452c-8e79-2ee81b1aa84e", "b64d5e15-8257-4af2-b20a-5a750f8940e7")); + // END:com.azure.ai.vision.face.generated.group.groupfaceids + } +} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/IdentifyFromLargePersonGroup.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/IdentifyFromLargePersonGroup.java new file mode 100644 index 000000000000..fd4da3eb6fd6 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/IdentifyFromLargePersonGroup.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.FaceClient; +import com.azure.ai.vision.face.FaceClientBuilder; +import com.azure.ai.vision.face.models.FaceIdentificationResult; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.Arrays; +import java.util.List; + +public class IdentifyFromLargePersonGroup { + public static void main(String[] args) { + FaceClient faceClient = new FaceClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .buildClient(); + // BEGIN:com.azure.ai.vision.face.generated.identifyfromlargepersongroup.identifyfromlargepersongroup + List response = faceClient.identifyFromLargePersonGroup( + Arrays.asList("c5c24a82-6845-4031-9d5d-978df9175426"), "your_large_person_group_id", 9, 0.7D); + // END:com.azure.ai.vision.face.generated.identifyfromlargepersongroup.identifyfromlargepersongroup + } +} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/TrainLargeFaceList.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/TrainLargeFaceList.java new file mode 100644 index 000000000000..779b670e337c --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/TrainLargeFaceList.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; +import com.azure.ai.vision.face.administration.LargeFaceListClient; +import com.azure.ai.vision.face.models.FaceTrainingResult; +import com.azure.core.util.Configuration; +import com.azure.core.util.polling.SyncPoller; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class TrainLargeFaceList { + public static void main(String[] args) { + LargeFaceListClient largeFaceListClient + = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .largeFaceListId("your_large_face_list_id") + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .largePersonGroupId(Configuration.getGlobalConfiguration().get("LARGEPERSONGROUPID")) + .buildLargeFaceListClient(); + // BEGIN:com.azure.ai.vision.face.generated.largefacelisttrain.trainlargefacelist + SyncPoller response = largeFaceListClient.beginTrain(); + // END:com.azure.ai.vision.face.generated.largefacelisttrain.trainlargefacelist + } +} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/TrainLargePersonGroup.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/TrainLargePersonGroup.java new file mode 100644 index 000000000000..f44f7742735a --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/TrainLargePersonGroup.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; +import com.azure.ai.vision.face.administration.LargePersonGroupClient; +import com.azure.ai.vision.face.models.FaceTrainingResult; +import com.azure.core.util.Configuration; +import com.azure.core.util.polling.SyncPoller; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class TrainLargePersonGroup { + public static void main(String[] args) { + LargePersonGroupClient largePersonGroupClient + = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .largePersonGroupId("your_large_person_group_id") + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .largeFaceListId(Configuration.getGlobalConfiguration().get("LARGEFACELISTID")) + .buildLargePersonGroupClient(); + // BEGIN:com.azure.ai.vision.face.generated.largepersongrouptrain.trainlargepersongroup + SyncPoller response = largePersonGroupClient.beginTrain(); + // END:com.azure.ai.vision.face.generated.largepersongrouptrain.trainlargepersongroup + } +} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/UpdateFaceInLargeFaceList.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/UpdateFaceInLargeFaceList.java new file mode 100644 index 000000000000..0ff4e672c67b --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/UpdateFaceInLargeFaceList.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; +import com.azure.ai.vision.face.administration.LargeFaceListClient; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class UpdateFaceInLargeFaceList { + public static void main(String[] args) { + LargeFaceListClient largeFaceListClient + = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .largeFaceListId("your_large_face_list_id") + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .largePersonGroupId(Configuration.getGlobalConfiguration().get("LARGEPERSONGROUPID")) + .buildLargeFaceListClient(); + // BEGIN:com.azure.ai.vision.face.generated.largefacelistupdateface.updatefaceinlargefacelist + largeFaceListClient.updateFace("43897a75-8d6f-42cf-885e-74832febb055", "your_user_data"); + // END:com.azure.ai.vision.face.generated.largefacelistupdateface.updatefaceinlargefacelist + } +} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/UpdateFaceInLargePersonGroupPerson.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/UpdateFaceInLargePersonGroupPerson.java new file mode 100644 index 000000000000..3b103d60ff87 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/UpdateFaceInLargePersonGroupPerson.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; +import com.azure.ai.vision.face.administration.LargePersonGroupClient; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class UpdateFaceInLargePersonGroupPerson { + public static void main(String[] args) { + LargePersonGroupClient largePersonGroupClient + = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .largePersonGroupId("your_large_person_group_id") + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .largeFaceListId(Configuration.getGlobalConfiguration().get("LARGEFACELISTID")) + .buildLargePersonGroupClient(); + // BEGIN:com.azure.ai.vision.face.generated.largepersongroupupdateface.updatefaceinlargepersongroupperson + largePersonGroupClient.updateFace("25985303-c537-4467-b41d-bdb45cd95ca1", + "43897a75-8d6f-42cf-885e-74832febb055", "your_user_data"); + // END:com.azure.ai.vision.face.generated.largepersongroupupdateface.updatefaceinlargepersongroupperson + } +} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/UpdateLargeFaceList.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/UpdateLargeFaceList.java new file mode 100644 index 000000000000..f618d778d293 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/UpdateLargeFaceList.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; +import com.azure.ai.vision.face.administration.LargeFaceListClient; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class UpdateLargeFaceList { + public static void main(String[] args) { + LargeFaceListClient largeFaceListClient + = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .largeFaceListId("your_large_face_list_id") + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .largePersonGroupId(Configuration.getGlobalConfiguration().get("LARGEPERSONGROUPID")) + .buildLargeFaceListClient(); + // BEGIN:com.azure.ai.vision.face.generated.largefacelistupdate.updatelargefacelist + largeFaceListClient.update("your_large_face_list_name", "your_user_data"); + // END:com.azure.ai.vision.face.generated.largefacelistupdate.updatelargefacelist + } +} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/UpdateLargePersonGroup.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/UpdateLargePersonGroup.java new file mode 100644 index 000000000000..2e648a56c4e4 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/UpdateLargePersonGroup.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; +import com.azure.ai.vision.face.administration.LargePersonGroupClient; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class UpdateLargePersonGroup { + public static void main(String[] args) { + LargePersonGroupClient largePersonGroupClient + = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .largePersonGroupId("your_large_person_group_id") + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .largeFaceListId(Configuration.getGlobalConfiguration().get("LARGEFACELISTID")) + .buildLargePersonGroupClient(); + // BEGIN:com.azure.ai.vision.face.generated.largepersongroupupdate.updatelargepersongroup + largePersonGroupClient.update("your_large_person_group_name", "your_user_data"); + // END:com.azure.ai.vision.face.generated.largepersongroupupdate.updatelargepersongroup + } +} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/UpdatePersonInLargePersonGroup.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/UpdatePersonInLargePersonGroup.java new file mode 100644 index 000000000000..4efe3bd3c0ad --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/UpdatePersonInLargePersonGroup.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; +import com.azure.ai.vision.face.administration.LargePersonGroupClient; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class UpdatePersonInLargePersonGroup { + public static void main(String[] args) { + LargePersonGroupClient largePersonGroupClient + = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .largePersonGroupId("your_large_person_group_id") + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .largeFaceListId(Configuration.getGlobalConfiguration().get("LARGEFACELISTID")) + .buildLargePersonGroupClient(); + // BEGIN:com.azure.ai.vision.face.generated.largepersongroupupdateperson.updatepersoninlargepersongroup + largePersonGroupClient.updatePerson("25985303-c537-4467-b41d-bdb45cd95ca1", + "your_large_person_group_person_name", "your_user_data"); + // END:com.azure.ai.vision.face.generated.largepersongroupupdateperson.updatepersoninlargepersongroup + } +} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/VerifyFaceToFace.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/VerifyFaceToFace.java new file mode 100644 index 000000000000..82775c00569b --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/VerifyFaceToFace.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.FaceClient; +import com.azure.ai.vision.face.FaceClientBuilder; +import com.azure.ai.vision.face.models.FaceVerificationResult; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class VerifyFaceToFace { + public static void main(String[] args) { + FaceClient faceClient = new FaceClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .buildClient(); + // BEGIN:com.azure.ai.vision.face.generated.verifyfacetoface.verifyfacetoface + FaceVerificationResult response = faceClient.verifyFaceToFace("c5c24a82-6845-4031-9d5d-978df9175426", + "3aa87e30-b380-48eb-ad9e-1aa54fc52bd3"); + // END:com.azure.ai.vision.face.generated.verifyfacetoface.verifyfacetoface + } +} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/VerifyFromLargePersonGroup.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/VerifyFromLargePersonGroup.java new file mode 100644 index 000000000000..781298050c30 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/VerifyFromLargePersonGroup.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.FaceClient; +import com.azure.ai.vision.face.FaceClientBuilder; +import com.azure.ai.vision.face.models.FaceVerificationResult; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class VerifyFromLargePersonGroup { + public static void main(String[] args) { + FaceClient faceClient = new FaceClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .buildClient(); + // BEGIN:com.azure.ai.vision.face.generated.verifyfromlargepersongroup.verifyfromlargepersongroup + FaceVerificationResult response = faceClient.verifyFromLargePersonGroup("c5c24a82-6845-4031-9d5d-978df9175426", + "your_large_person_group", "815df99c-598f-4926-930a-a734b3fd651c"); + // END:com.azure.ai.vision.face.generated.verifyfromlargepersongroup.verifyfromlargepersongroup + } +} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/CreateLargeFaceListTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/CreateLargeFaceListTests.java new file mode 100644 index 000000000000..bd4c4f9adfe1 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/CreateLargeFaceListTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.models.FaceRecognitionModel; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class CreateLargeFaceListTests extends FaceAdministrationClientTestBase { + @Test + @Disabled + public void testCreateLargeFaceListTests() { + // method invocation + largeFaceListClient.create("your_large_face_list_name", "your_user_data", FaceRecognitionModel.RECOGNITION_01); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/CreateLargePersonGroupTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/CreateLargePersonGroupTests.java new file mode 100644 index 000000000000..b9954668e4c1 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/CreateLargePersonGroupTests.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.models.FaceRecognitionModel; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class CreateLargePersonGroupTests extends FaceAdministrationClientTestBase { + @Test + @Disabled + public void testCreateLargePersonGroupTests() { + // method invocation + largePersonGroupClient.create("your_large_person_group_name", "your_user_data", + FaceRecognitionModel.RECOGNITION_01); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/CreateLivenessSessionTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/CreateLivenessSessionTests.java new file mode 100644 index 000000000000..04e8827fb05f --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/CreateLivenessSessionTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.models.CreateLivenessSessionContent; +import com.azure.ai.vision.face.models.CreateLivenessSessionResult; +import com.azure.ai.vision.face.models.LivenessOperationMode; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class CreateLivenessSessionTests extends FaceAdministrationClientTestBase { + @Test + @Disabled + public void testCreateLivenessSessionTests() { + // method invocation + CreateLivenessSessionResult response = faceSessionClient.createLivenessSession( + new CreateLivenessSessionContent(LivenessOperationMode.PASSIVE).setSendResultsToClient(true) + .setDeviceCorrelationIdSetInClient(true) + .setDeviceCorrelationId("your_device_correlation_id") + .setAuthTokenTimeToLiveInSeconds(60)); + + // response assertion + Assertions.assertNotNull(response); + // verify property "sessionId" + Assertions.assertEquals("b12e033e-bda7-4b83-a211-e721c661f30e", response.getSessionId()); + // verify property "authToken" + Assertions.assertEquals("eyJhbGciOiJFUzI1NiIsIm", response.getAuthToken()); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/CreatePersonInLargePersonGroupTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/CreatePersonInLargePersonGroupTests.java new file mode 100644 index 000000000000..1812cdbc2065 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/CreatePersonInLargePersonGroupTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.models.CreatePersonResult; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class CreatePersonInLargePersonGroupTests extends FaceAdministrationClientTestBase { + @Test + @Disabled + public void testCreatePersonInLargePersonGroupTests() { + // method invocation + CreatePersonResult response + = largePersonGroupClient.createPerson("your_large_person_group_person_name", "your_user_data"); + + // response assertion + Assertions.assertNotNull(response); + // verify property "personId" + Assertions.assertEquals("25985303-c537-4467-b41d-bdb45cd95ca1", response.getPersonId()); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteFaceFromLargeFaceListTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteFaceFromLargeFaceListTests.java new file mode 100644 index 000000000000..c7f0aed30a2b --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteFaceFromLargeFaceListTests.java @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class DeleteFaceFromLargeFaceListTests extends FaceAdministrationClientTestBase { + @Test + @Disabled + public void testDeleteFaceFromLargeFaceListTests() { + // method invocation + largeFaceListClient.deleteFace("43897a75-8d6f-42cf-885e-74832febb055"); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteFaceFromLargePersonGroupPersonTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteFaceFromLargePersonGroupPersonTests.java new file mode 100644 index 000000000000..97fac88808da --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteFaceFromLargePersonGroupPersonTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class DeleteFaceFromLargePersonGroupPersonTests extends FaceAdministrationClientTestBase { + @Test + @Disabled + public void testDeleteFaceFromLargePersonGroupPersonTests() { + // method invocation + largePersonGroupClient.deleteFace("25985303-c537-4467-b41d-bdb45cd95ca1", + "43897a75-8d6f-42cf-885e-74832febb055"); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteLargeFaceListTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteLargeFaceListTests.java new file mode 100644 index 000000000000..8af5d89029c1 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteLargeFaceListTests.java @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class DeleteLargeFaceListTests extends FaceAdministrationClientTestBase { + @Test + @Disabled + public void testDeleteLargeFaceListTests() { + // method invocation + largeFaceListClient.delete(); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteLargePersonGroupTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteLargePersonGroupTests.java new file mode 100644 index 000000000000..ef3dc1c66ced --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteLargePersonGroupTests.java @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class DeleteLargePersonGroupTests extends FaceAdministrationClientTestBase { + @Test + @Disabled + public void testDeleteLargePersonGroupTests() { + // method invocation + largePersonGroupClient.delete(); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteLivenessSessionTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteLivenessSessionTests.java new file mode 100644 index 000000000000..abc397b45dc9 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteLivenessSessionTests.java @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class DeleteLivenessSessionTests extends FaceAdministrationClientTestBase { + @Test + @Disabled + public void testDeleteLivenessSessionTests() { + // method invocation + faceSessionClient.deleteLivenessSession("b12e033e-bda7-4b83-a211-e721c661f30e"); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteLivenessWithVerifySessionTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteLivenessWithVerifySessionTests.java new file mode 100644 index 000000000000..17057c80fc54 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteLivenessWithVerifySessionTests.java @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class DeleteLivenessWithVerifySessionTests extends FaceAdministrationClientTestBase { + @Test + @Disabled + public void testDeleteLivenessWithVerifySessionTests() { + // method invocation + faceSessionClient.deleteLivenessWithVerifySession("b12e033e-bda7-4b83-a211-e721c661f30e"); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeletePersonFromLargePersonGroupTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeletePersonFromLargePersonGroupTests.java new file mode 100644 index 000000000000..74cb7ec9fae5 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeletePersonFromLargePersonGroupTests.java @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class DeletePersonFromLargePersonGroupTests extends FaceAdministrationClientTestBase { + @Test + @Disabled + public void testDeletePersonFromLargePersonGroupTests() { + // method invocation + largePersonGroupClient.deletePerson("25985303-c537-4467-b41d-bdb45cd95ca1"); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DetectFromSessionImageIdTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DetectFromSessionImageIdTests.java new file mode 100644 index 000000000000..139ce03a58b6 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DetectFromSessionImageIdTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.models.DetectFromSessionImageOptions; +import com.azure.ai.vision.face.models.FaceDetectionModel; +import com.azure.ai.vision.face.models.FaceDetectionResult; +import com.azure.ai.vision.face.models.FaceRecognitionModel; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class DetectFromSessionImageIdTests extends FaceAdministrationClientTestBase { + @Test + @Disabled + public void testDetectFromSessionImageIdTests() { + // method invocation + List response = faceSessionClient + .detectFromSessionImage(new DetectFromSessionImageOptions("aa93ce80-9a9b-48bd-ae1a-1c7543841e92") + .setDetectionModel(FaceDetectionModel.DETECTION_01) + .setRecognitionModel(FaceRecognitionModel.RECOGNITION_03) + .setReturnFaceId(true) + .setReturnFaceAttributes(Arrays.asList()) + .setReturnFaceLandmarks(true) + .setReturnRecognitionModel(true) + .setFaceIdTimeToLive(60)); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/FaceAdministrationClientTestBase.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/FaceAdministrationClientTestBase.java new file mode 100644 index 000000000000..ae044972d10d --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/FaceAdministrationClientTestBase.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +// The Java test files under 'generated' package are generated for your reference. +// If you wish to modify these files, please copy them out of the 'generated' package, and modify there. +// See https://aka.ms/azsdk/dpg/java/tests for guide on adding a test. + +import com.azure.ai.vision.face.FaceClient; +import com.azure.ai.vision.face.FaceClientBuilder; +import com.azure.ai.vision.face.FaceSessionClient; +import com.azure.ai.vision.face.FaceSessionClientBuilder; +import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; +import com.azure.ai.vision.face.administration.LargeFaceListClient; +import com.azure.ai.vision.face.administration.LargePersonGroupClient; +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.test.TestMode; +import com.azure.core.test.TestProxyTestBase; +import com.azure.core.test.utils.MockTokenCredential; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +class FaceAdministrationClientTestBase extends TestProxyTestBase { + protected LargeFaceListClient largeFaceListClient; + + protected LargePersonGroupClient largePersonGroupClient; + + protected FaceClient faceClient; + + protected FaceSessionClient faceSessionClient; + + @Override + protected void beforeTest() { + FaceAdministrationClientBuilder largeFaceListClientbuilder = new FaceAdministrationClientBuilder() + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint")) + .largeFaceListId(Configuration.getGlobalConfiguration().get("LARGEFACELISTID", "largefacelistid")) + .largePersonGroupId(Configuration.getGlobalConfiguration().get("LARGEPERSONGROUPID", "largepersongroupid")) + .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); + if (getTestMode() == TestMode.PLAYBACK) { + largeFaceListClientbuilder.credential(new MockTokenCredential()); + } else if (getTestMode() == TestMode.RECORD) { + largeFaceListClientbuilder.addPolicy(interceptorManager.getRecordPolicy()) + .credential(new DefaultAzureCredentialBuilder().build()); + } else if (getTestMode() == TestMode.LIVE) { + largeFaceListClientbuilder.credential(new DefaultAzureCredentialBuilder().build()); + } + largeFaceListClient = largeFaceListClientbuilder.buildLargeFaceListClient(); + + FaceAdministrationClientBuilder largePersonGroupClientbuilder = new FaceAdministrationClientBuilder() + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint")) + .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); + if (getTestMode() == TestMode.PLAYBACK) { + largePersonGroupClientbuilder.credential(new MockTokenCredential()); + } else if (getTestMode() == TestMode.RECORD) { + largePersonGroupClientbuilder.addPolicy(interceptorManager.getRecordPolicy()) + .credential(new DefaultAzureCredentialBuilder().build()); + } else if (getTestMode() == TestMode.LIVE) { + largePersonGroupClientbuilder.credential(new DefaultAzureCredentialBuilder().build()); + } + largePersonGroupClient = largePersonGroupClientbuilder.buildLargePersonGroupClient(); + + FaceClientBuilder faceClientbuilder + = new FaceClientBuilder().endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint")) + .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); + if (getTestMode() == TestMode.PLAYBACK) { + faceClientbuilder.credential(new MockTokenCredential()); + } else if (getTestMode() == TestMode.RECORD) { + faceClientbuilder.addPolicy(interceptorManager.getRecordPolicy()) + .credential(new DefaultAzureCredentialBuilder().build()); + } else if (getTestMode() == TestMode.LIVE) { + faceClientbuilder.credential(new DefaultAzureCredentialBuilder().build()); + } + faceClient = faceClientbuilder.buildClient(); + + FaceSessionClientBuilder faceSessionClientbuilder = new FaceSessionClientBuilder() + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint")) + .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); + if (getTestMode() == TestMode.PLAYBACK) { + faceSessionClientbuilder.credential(new MockTokenCredential()); + } else if (getTestMode() == TestMode.RECORD) { + faceSessionClientbuilder.addPolicy(interceptorManager.getRecordPolicy()) + .credential(new DefaultAzureCredentialBuilder().build()); + } else if (getTestMode() == TestMode.LIVE) { + faceSessionClientbuilder.credential(new DefaultAzureCredentialBuilder().build()); + } + faceSessionClient = faceSessionClientbuilder.buildClient(); + + } +} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/FindSimilarAmongFaceIDsTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/FindSimilarAmongFaceIDsTests.java new file mode 100644 index 000000000000..248aed49e84c --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/FindSimilarAmongFaceIDsTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.models.FaceFindSimilarResult; +import com.azure.ai.vision.face.models.FindSimilarMatchMode; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class FindSimilarAmongFaceIDsTests extends FaceAdministrationClientTestBase { + @Test + @Disabled + public void testFindSimilarAmongFaceIDsTests() { + // method invocation + List response = faceClient.findSimilar("c5c24a82-6845-4031-9d5d-978df9175426", + Arrays.asList("015839fb-fbd9-4f79-ace9-7675fc2f1dd9", "be386ab3-af91-4104-9e6d-4dae4c9fddb7"), 3, + FindSimilarMatchMode.MATCH_PERSON); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/FindSimilarFromLargeFaceListTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/FindSimilarFromLargeFaceListTests.java new file mode 100644 index 000000000000..c40409f77c60 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/FindSimilarFromLargeFaceListTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.models.FaceFindSimilarResult; +import com.azure.ai.vision.face.models.FindSimilarMatchMode; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class FindSimilarFromLargeFaceListTests extends FaceAdministrationClientTestBase { + @Test + @Disabled + public void testFindSimilarFromLargeFaceListTests() { + // method invocation + List response = faceClient.findSimilarFromLargeFaceList( + "c5c24a82-6845-4031-9d5d-978df9175426", "your_large_face_list_id", 3, FindSimilarMatchMode.MATCH_PERSON); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetFaceFromLargeFaceListTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetFaceFromLargeFaceListTests.java new file mode 100644 index 000000000000..67e8b5f972ce --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetFaceFromLargeFaceListTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.models.LargeFaceListFace; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class GetFaceFromLargeFaceListTests extends FaceAdministrationClientTestBase { + @Test + @Disabled + public void testGetFaceFromLargeFaceListTests() { + // method invocation + LargeFaceListFace response = largeFaceListClient.getFace("43897a75-8d6f-42cf-885e-74832febb055"); + + // response assertion + Assertions.assertNotNull(response); + // verify property "persistedFaceId" + Assertions.assertEquals("43897a75-8d6f-42cf-885e-74832febb055", response.getPersistedFaceId()); + // verify property "userData" + Assertions.assertEquals("your_user_data", response.getUserData()); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetFaceFromLargePersonGroupPersonTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetFaceFromLargePersonGroupPersonTests.java new file mode 100644 index 000000000000..a791d6833888 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetFaceFromLargePersonGroupPersonTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.models.LargePersonGroupPersonFace; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class GetFaceFromLargePersonGroupPersonTests extends FaceAdministrationClientTestBase { + @Test + @Disabled + public void testGetFaceFromLargePersonGroupPersonTests() { + // method invocation + LargePersonGroupPersonFace response = largePersonGroupClient.getFace("25985303-c537-4467-b41d-bdb45cd95ca1", + "43897a75-8d6f-42cf-885e-74832febb055"); + + // response assertion + Assertions.assertNotNull(response); + // verify property "persistedFaceId" + Assertions.assertEquals("43897a75-8d6f-42cf-885e-74832febb055", response.getPersistedFaceId()); + // verify property "userData" + Assertions.assertEquals("your_user_data", response.getUserData()); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetFacesFromLargeFaceListTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetFacesFromLargeFaceListTests.java new file mode 100644 index 000000000000..0ebb4cd0b53b --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetFacesFromLargeFaceListTests.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.models.LargeFaceListFace; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class GetFacesFromLargeFaceListTests extends FaceAdministrationClientTestBase { + @Test + @Disabled + public void testGetFacesFromLargeFaceListTests() { + // method invocation + List response = largeFaceListClient.getFaces("00000000-0000-0000-0000-000000000000", 20); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLargeFaceListTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLargeFaceListTests.java new file mode 100644 index 000000000000..0bbf11372ca2 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLargeFaceListTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.models.FaceRecognitionModel; +import com.azure.ai.vision.face.models.LargeFaceList; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class GetLargeFaceListTests extends FaceAdministrationClientTestBase { + @Test + @Disabled + public void testGetLargeFaceListTests() { + // method invocation + LargeFaceList response = largeFaceListClient.get(true); + + // response assertion + Assertions.assertNotNull(response); + // verify property "name" + Assertions.assertEquals("your_large_face_list_name", response.getName()); + // verify property "userData" + Assertions.assertEquals("your_user_data", response.getUserData()); + // verify property "recognitionModel" + Assertions.assertEquals(FaceRecognitionModel.RECOGNITION_01, response.getRecognitionModel()); + // verify property "largeFaceListId" + Assertions.assertEquals("your_large_face_list_id", response.getLargeFaceListId()); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLargeFaceListsTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLargeFaceListsTests.java new file mode 100644 index 000000000000..c12107f23d3a --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLargeFaceListsTests.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.models.LargeFaceList; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class GetLargeFaceListsTests extends FaceAdministrationClientTestBase { + @Test + @Disabled + public void testGetLargeFaceListsTests() { + // method invocation + List response = largeFaceListClient.getLargeFaceLists("my_list_id", 20, true); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLargePersonGroupTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLargePersonGroupTests.java new file mode 100644 index 000000000000..847a8033179d --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLargePersonGroupTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.models.FaceRecognitionModel; +import com.azure.ai.vision.face.models.LargePersonGroup; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class GetLargePersonGroupTests extends FaceAdministrationClientTestBase { + @Test + @Disabled + public void testGetLargePersonGroupTests() { + // method invocation + LargePersonGroup response = largePersonGroupClient.get(true); + + // response assertion + Assertions.assertNotNull(response); + // verify property "name" + Assertions.assertEquals("your_large_person_group_name", response.getName()); + // verify property "userData" + Assertions.assertEquals("your_user_data", response.getUserData()); + // verify property "recognitionModel" + Assertions.assertEquals(FaceRecognitionModel.RECOGNITION_01, response.getRecognitionModel()); + // verify property "largePersonGroupId" + Assertions.assertEquals("your_large_person_group_id", response.getLargePersonGroupId()); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLargePersonGroupsTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLargePersonGroupsTests.java new file mode 100644 index 000000000000..e36bb1af1db8 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLargePersonGroupsTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.models.LargePersonGroup; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class GetLargePersonGroupsTests extends FaceAdministrationClientTestBase { + @Test + @Disabled + public void testGetLargePersonGroupsTests() { + // method invocation + List response + = largePersonGroupClient.getLargePersonGroups("00000000-0000-0000-0000-000000000000", 20, true); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessSessionAuditEntriesTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessSessionAuditEntriesTests.java new file mode 100644 index 000000000000..04b286206cfb --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessSessionAuditEntriesTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.models.LivenessSessionAuditEntry; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class GetLivenessSessionAuditEntriesTests extends FaceAdministrationClientTestBase { + @Test + @Disabled + public void testGetLivenessSessionAuditEntriesTests() { + // method invocation + List response + = faceSessionClient.getLivenessSessionAuditEntries("b12e033e-bda7-4b83-a211-e721c661f30e", "0", 20); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessSessionResultTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessSessionResultTests.java new file mode 100644 index 000000000000..aa61ec1b292a --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessSessionResultTests.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.models.AuditLivenessResponseInfo; +import com.azure.ai.vision.face.models.AuditRequestInfo; +import com.azure.ai.vision.face.models.FaceSessionStatus; +import com.azure.ai.vision.face.models.LivenessResponseBody; +import com.azure.ai.vision.face.models.LivenessSession; +import com.azure.ai.vision.face.models.LivenessSessionAuditEntry; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class GetLivenessSessionResultTests extends FaceAdministrationClientTestBase { + @Test + @Disabled + public void testGetLivenessSessionResultTests() { + // method invocation + LivenessSession response = faceSessionClient.getLivenessSessionResult("b12e033e-bda7-4b83-a211-e721c661f30e"); + + // response assertion + Assertions.assertNotNull(response); + // verify property "id" + Assertions.assertEquals("b12e033e-bda7-4b83-a211-e721c661f30e", response.getId()); + // verify property "createdDateTime" + Assertions.assertNotNull(response.getCreatedDateTime()); + // verify property "sessionStartDateTime" + Assertions.assertNotNull(response.getSessionStartDateTime()); + // verify property "sessionExpired" + Assertions.assertEquals(true, response.isSessionExpired()); + // verify property "deviceCorrelationId" + Assertions.assertEquals("your_device_correlation_id", response.getDeviceCorrelationId()); + // verify property "authTokenTimeToLiveInSeconds" + Assertions.assertEquals(600, response.getAuthTokenTimeToLiveInSeconds()); + // verify property "status" + Assertions.assertEquals(FaceSessionStatus.NOT_STARTED, response.getStatus()); + // verify property "result" + LivenessSessionAuditEntry responseResult = response.getResult(); + Assertions.assertNotNull(responseResult); + Assertions.assertEquals(4L, responseResult.getId()); + Assertions.assertEquals("b12e033e-bda7-4b83-a211-e721c661f30e", responseResult.getSessionId()); + Assertions.assertEquals("4af681e9-0e25-43e9-9922-a7adebf13b2f", responseResult.getRequestId()); + Assertions.assertEquals("4af681e9-0e25-43e9-9922-a7adebf13b2f", responseResult.getClientRequestId()); + Assertions.assertNotNull(responseResult.getReceivedDateTime()); + AuditRequestInfo responseResultRequest = responseResult.getRequest(); + Assertions.assertNotNull(responseResultRequest); + Assertions.assertEquals("/face/v1.2-preview.1/detectliveness/singlemodal", responseResultRequest.getUrl()); + Assertions.assertEquals("POST", responseResultRequest.getMethod()); + Assertions.assertEquals(18L, responseResultRequest.getContentLength()); + Assertions.assertEquals("multipart/form-data", responseResultRequest.getContentType()); + Assertions.assertEquals( + "Mozilla/5.0 (Linux) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Mobile Safari/537.36", + responseResultRequest.getUserAgent()); + AuditLivenessResponseInfo responseResultResponse = responseResult.getResponse(); + Assertions.assertNotNull(responseResultResponse); + LivenessResponseBody responseResultResponseBody = responseResultResponse.getBody(); + Assertions.assertNotNull(responseResultResponseBody); + Assertions.assertEquals(200, responseResultResponse.getStatusCode()); + Assertions.assertEquals(1200L, responseResultResponse.getLatencyInMilliseconds()); + Assertions.assertEquals("1CC98BA83EAF1D0FF7F566FAEFCCCC787819FFA01251E2D9299143F7AD6651DB", + responseResult.getDigest()); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessSessionsTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessSessionsTests.java new file mode 100644 index 000000000000..71beaeac0320 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessSessionsTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.models.LivenessSessionItem; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class GetLivenessSessionsTests extends FaceAdministrationClientTestBase { + @Test + @Disabled + public void testGetLivenessSessionsTests() { + // method invocation + List response + = faceSessionClient.getLivenessSessions("00000000-0000-0000-0000-000000000000", 20); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessionAuditEntriesTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessionAuditEntriesTests.java new file mode 100644 index 000000000000..fd84b9e4841a --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessionAuditEntriesTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.models.LivenessSessionAuditEntry; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class GetLivenessWithVerifySessionAuditEntriesTests extends FaceAdministrationClientTestBase { + @Test + @Disabled + public void testGetLivenessWithVerifySessionAuditEntriesTests() { + // method invocation + List response = faceSessionClient + .getLivenessWithVerifySessionAuditEntries("b12e033e-bda7-4b83-a211-e721c661f30e", "0", 20); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessionResultTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessionResultTests.java new file mode 100644 index 000000000000..e443c4844cac --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessionResultTests.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.models.AuditLivenessResponseInfo; +import com.azure.ai.vision.face.models.AuditRequestInfo; +import com.azure.ai.vision.face.models.FaceSessionStatus; +import com.azure.ai.vision.face.models.LivenessResponseBody; +import com.azure.ai.vision.face.models.LivenessSessionAuditEntry; +import com.azure.ai.vision.face.models.LivenessWithVerifySession; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class GetLivenessWithVerifySessionResultTests extends FaceAdministrationClientTestBase { + @Test + @Disabled + public void testGetLivenessWithVerifySessionResultTests() { + // method invocation + LivenessWithVerifySession response + = faceSessionClient.getLivenessWithVerifySessionResult("b12e033e-bda7-4b83-a211-e721c661f30e"); + + // response assertion + Assertions.assertNotNull(response); + // verify property "id" + Assertions.assertEquals("b12e033e-bda7-4b83-a211-e721c661f30e", response.getId()); + // verify property "createdDateTime" + Assertions.assertNotNull(response.getCreatedDateTime()); + // verify property "sessionStartDateTime" + Assertions.assertNotNull(response.getSessionStartDateTime()); + // verify property "sessionExpired" + Assertions.assertEquals(true, response.isSessionExpired()); + // verify property "deviceCorrelationId" + Assertions.assertEquals("your_device_correlation_id", response.getDeviceCorrelationId()); + // verify property "authTokenTimeToLiveInSeconds" + Assertions.assertEquals(600, response.getAuthTokenTimeToLiveInSeconds()); + // verify property "status" + Assertions.assertEquals(FaceSessionStatus.NOT_STARTED, response.getStatus()); + // verify property "result" + LivenessSessionAuditEntry responseResult = response.getResult(); + Assertions.assertNotNull(responseResult); + Assertions.assertEquals(4L, responseResult.getId()); + Assertions.assertEquals("b12e033e-bda7-4b83-a211-e721c661f30e", responseResult.getSessionId()); + Assertions.assertEquals("4af681e9-0e25-43e9-9922-a7adebf13b2f", responseResult.getRequestId()); + Assertions.assertEquals("4af681e9-0e25-43e9-9922-a7adebf13b2f", responseResult.getClientRequestId()); + Assertions.assertNotNull(responseResult.getReceivedDateTime()); + AuditRequestInfo responseResultRequest = responseResult.getRequest(); + Assertions.assertNotNull(responseResultRequest); + Assertions.assertEquals("/face/v1.2-preview.1/detectliveness/singlemodal", responseResultRequest.getUrl()); + Assertions.assertEquals("POST", responseResultRequest.getMethod()); + Assertions.assertEquals(18L, responseResultRequest.getContentLength()); + Assertions.assertEquals("multipart/form-data", responseResultRequest.getContentType()); + Assertions.assertEquals( + "Mozilla/5.0 (Linux) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Mobile Safari/537.36", + responseResultRequest.getUserAgent()); + AuditLivenessResponseInfo responseResultResponse = responseResult.getResponse(); + Assertions.assertNotNull(responseResultResponse); + LivenessResponseBody responseResultResponseBody = responseResultResponse.getBody(); + Assertions.assertNotNull(responseResultResponseBody); + Assertions.assertEquals(200, responseResultResponse.getStatusCode()); + Assertions.assertEquals(1200L, responseResultResponse.getLatencyInMilliseconds()); + Assertions.assertEquals("1CC98BA83EAF1D0FF7F566FAEFCCCC787819FFA01251E2D9299143F7AD6651DB", + responseResult.getDigest()); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessionsTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessionsTests.java new file mode 100644 index 000000000000..6325a3af4958 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessionsTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.models.LivenessSessionItem; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class GetLivenessWithVerifySessionsTests extends FaceAdministrationClientTestBase { + @Test + @Disabled + public void testGetLivenessWithVerifySessionsTests() { + // method invocation + List response + = faceSessionClient.getLivenessWithVerifySessions("00000000-0000-0000-0000-000000000000", 20); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetPersonFromLargePersonGroupTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetPersonFromLargePersonGroupTests.java new file mode 100644 index 000000000000..71b1816e9f1a --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetPersonFromLargePersonGroupTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.models.LargePersonGroupPerson; +import java.util.List; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class GetPersonFromLargePersonGroupTests extends FaceAdministrationClientTestBase { + @Test + @Disabled + public void testGetPersonFromLargePersonGroupTests() { + // method invocation + LargePersonGroupPerson response = largePersonGroupClient.getPerson("25985303-c537-4467-b41d-bdb45cd95ca1"); + + // response assertion + Assertions.assertNotNull(response); + // verify property "personId" + Assertions.assertEquals("25985303-c537-4467-b41d-bdb45cd95ca1", response.getPersonId()); + // verify property "name" + Assertions.assertEquals("your_large_person_group_person_name", response.getName()); + // verify property "userData" + Assertions.assertEquals("your_user_data", response.getUserData()); + // verify property "persistedFaceIds" + List responsePersistedFaceIds = response.getPersistedFaceIds(); + Assertions.assertEquals("43897a75-8d6f-42cf-885e-74832febb055", responsePersistedFaceIds.iterator().next()); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetPersonsFromLargePersonGroupTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetPersonsFromLargePersonGroupTests.java new file mode 100644 index 000000000000..fb93fa187db6 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetPersonsFromLargePersonGroupTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.models.LargePersonGroupPerson; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class GetPersonsFromLargePersonGroupTests extends FaceAdministrationClientTestBase { + @Test + @Disabled + public void testGetPersonsFromLargePersonGroupTests() { + // method invocation + List response + = largePersonGroupClient.getPersons("00000000-0000-0000-0000-000000000000", 20); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetSessionImageTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetSessionImageTests.java new file mode 100644 index 000000000000..a1b28045f61b --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetSessionImageTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class GetSessionImageTests extends FaceAdministrationClientTestBase { + @Test + @Disabled + public void testGetSessionImageTests() { + // method invocation + BinaryData response = faceSessionClient.getSessionImage("3d035d35-2e01-4ed4-8935-577afde9caaa"); + + // response assertion + Assertions.assertNotNull(response); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetTrainingStatusOfLargeFaceListTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetTrainingStatusOfLargeFaceListTests.java new file mode 100644 index 000000000000..150b8646583d --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetTrainingStatusOfLargeFaceListTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.models.FaceOperationStatus; +import com.azure.ai.vision.face.models.FaceTrainingResult; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class GetTrainingStatusOfLargeFaceListTests extends FaceAdministrationClientTestBase { + @Test + @Disabled + public void testGetTrainingStatusOfLargeFaceListTests() { + // method invocation + FaceTrainingResult response = largeFaceListClient.getTrainingStatus(); + + // response assertion + Assertions.assertNotNull(response); + // verify property "status" + Assertions.assertEquals(FaceOperationStatus.NOT_STARTED, response.getStatus()); + // verify property "createdDateTime" + Assertions.assertNotNull(response.getCreatedDateTime()); + // verify property "lastActionDateTime" + Assertions.assertNotNull(response.getLastActionDateTime()); + // verify property "lastSuccessfulTrainingDateTime" + Assertions.assertNotNull(response.getLastSuccessfulTrainingDateTime()); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetTrainingStatusOfLargePersonGroupTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetTrainingStatusOfLargePersonGroupTests.java new file mode 100644 index 000000000000..c1f8b68da74e --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetTrainingStatusOfLargePersonGroupTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.models.FaceOperationStatus; +import com.azure.ai.vision.face.models.FaceTrainingResult; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class GetTrainingStatusOfLargePersonGroupTests extends FaceAdministrationClientTestBase { + @Test + @Disabled + public void testGetTrainingStatusOfLargePersonGroupTests() { + // method invocation + FaceTrainingResult response = largePersonGroupClient.getTrainingStatus(); + + // response assertion + Assertions.assertNotNull(response); + // verify property "status" + Assertions.assertEquals(FaceOperationStatus.NOT_STARTED, response.getStatus()); + // verify property "createdDateTime" + Assertions.assertNotNull(response.getCreatedDateTime()); + // verify property "lastActionDateTime" + Assertions.assertNotNull(response.getLastActionDateTime()); + // verify property "lastSuccessfulTrainingDateTime" + Assertions.assertNotNull(response.getLastSuccessfulTrainingDateTime()); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GroupFaceIDsTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GroupFaceIDsTests.java new file mode 100644 index 000000000000..894ae8f7785a --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GroupFaceIDsTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.models.FaceGroupingResult; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class GroupFaceIDsTests extends FaceAdministrationClientTestBase { + @Test + @Disabled + public void testGroupFaceIDsTests() { + // method invocation + FaceGroupingResult response = faceClient + .group(Arrays.asList("c5c24a82-6845-4031-9d5d-978df9175426", "015839fb-fbd9-4f79-ace9-7675fc2f1dd9", + "65d083d4-9447-47d1-af30-b626144bf0fb", "fce92aed-d578-4d2e-8114-068f8af4492e", + "30ea1073-cc9e-4652-b1e3-d08fb7b95315", "be386ab3-af91-4104-9e6d-4dae4c9fddb7", + "fbd2a038-dbff-452c-8e79-2ee81b1aa84e", "b64d5e15-8257-4af2-b20a-5a750f8940e7")); + + // response assertion + Assertions.assertNotNull(response); + // verify property "groups" + List> responseGroups = response.getGroups(); + List responseGroupsFirstItem = responseGroups.iterator().next(); + Assertions.assertEquals("c5c24a82-6845-4031-9d5d-978df9175426", responseGroupsFirstItem.iterator().next()); + // verify property "messyGroup" + List responseMessyGroup = response.getMessyGroup(); + Assertions.assertEquals("be386ab3-af91-4104-9e6d-4dae4c9fddb7", responseMessyGroup.iterator().next()); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/IdentifyFromLargePersonGroupTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/IdentifyFromLargePersonGroupTests.java new file mode 100644 index 000000000000..85a464a131cc --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/IdentifyFromLargePersonGroupTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.models.FaceIdentificationResult; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class IdentifyFromLargePersonGroupTests extends FaceAdministrationClientTestBase { + @Test + @Disabled + public void testIdentifyFromLargePersonGroupTests() { + // method invocation + List response = faceClient.identifyFromLargePersonGroup( + Arrays.asList("c5c24a82-6845-4031-9d5d-978df9175426"), "your_large_person_group_id", 9, 0.7D); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/TrainLargeFaceListTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/TrainLargeFaceListTests.java new file mode 100644 index 000000000000..30a58434d25f --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/TrainLargeFaceListTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.models.FaceTrainingResult; +import com.azure.core.util.polling.LongRunningOperationStatus; +import com.azure.core.util.polling.SyncPoller; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class TrainLargeFaceListTests extends FaceAdministrationClientTestBase { + @Test + @Disabled + public void testTrainLargeFaceListTests() { + // method invocation + SyncPoller response + = setPlaybackSyncPollerPollInterval(largeFaceListClient.beginTrain()); + + // response assertion + Assertions.assertEquals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, + response.waitForCompletion().getStatus()); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/TrainLargePersonGroupTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/TrainLargePersonGroupTests.java new file mode 100644 index 000000000000..525d99188451 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/TrainLargePersonGroupTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.models.FaceTrainingResult; +import com.azure.core.util.polling.LongRunningOperationStatus; +import com.azure.core.util.polling.SyncPoller; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class TrainLargePersonGroupTests extends FaceAdministrationClientTestBase { + @Test + @Disabled + public void testTrainLargePersonGroupTests() { + // method invocation + SyncPoller response + = setPlaybackSyncPollerPollInterval(largePersonGroupClient.beginTrain()); + + // response assertion + Assertions.assertEquals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, + response.waitForCompletion().getStatus()); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/UpdateFaceInLargeFaceListTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/UpdateFaceInLargeFaceListTests.java new file mode 100644 index 000000000000..cf1a74460d16 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/UpdateFaceInLargeFaceListTests.java @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class UpdateFaceInLargeFaceListTests extends FaceAdministrationClientTestBase { + @Test + @Disabled + public void testUpdateFaceInLargeFaceListTests() { + // method invocation + largeFaceListClient.updateFace("43897a75-8d6f-42cf-885e-74832febb055", "your_user_data"); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/UpdateFaceInLargePersonGroupPersonTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/UpdateFaceInLargePersonGroupPersonTests.java new file mode 100644 index 000000000000..50e5215f8c0f --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/UpdateFaceInLargePersonGroupPersonTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class UpdateFaceInLargePersonGroupPersonTests extends FaceAdministrationClientTestBase { + @Test + @Disabled + public void testUpdateFaceInLargePersonGroupPersonTests() { + // method invocation + largePersonGroupClient.updateFace("25985303-c537-4467-b41d-bdb45cd95ca1", + "43897a75-8d6f-42cf-885e-74832febb055", "your_user_data"); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/UpdateLargeFaceListTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/UpdateLargeFaceListTests.java new file mode 100644 index 000000000000..70e9456f4095 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/UpdateLargeFaceListTests.java @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class UpdateLargeFaceListTests extends FaceAdministrationClientTestBase { + @Test + @Disabled + public void testUpdateLargeFaceListTests() { + // method invocation + largeFaceListClient.update("your_large_face_list_name", "your_user_data"); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/UpdateLargePersonGroupTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/UpdateLargePersonGroupTests.java new file mode 100644 index 000000000000..57b015d4e8d2 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/UpdateLargePersonGroupTests.java @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class UpdateLargePersonGroupTests extends FaceAdministrationClientTestBase { + @Test + @Disabled + public void testUpdateLargePersonGroupTests() { + // method invocation + largePersonGroupClient.update("your_large_person_group_name", "your_user_data"); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/UpdatePersonInLargePersonGroupTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/UpdatePersonInLargePersonGroupTests.java new file mode 100644 index 000000000000..9ce71f697abb --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/UpdatePersonInLargePersonGroupTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class UpdatePersonInLargePersonGroupTests extends FaceAdministrationClientTestBase { + @Test + @Disabled + public void testUpdatePersonInLargePersonGroupTests() { + // method invocation + largePersonGroupClient.updatePerson("25985303-c537-4467-b41d-bdb45cd95ca1", + "your_large_person_group_person_name", "your_user_data"); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/VerifyFaceToFaceTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/VerifyFaceToFaceTests.java new file mode 100644 index 000000000000..7cb74c79cb2c --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/VerifyFaceToFaceTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.models.FaceVerificationResult; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class VerifyFaceToFaceTests extends FaceAdministrationClientTestBase { + @Test + @Disabled + public void testVerifyFaceToFaceTests() { + // method invocation + FaceVerificationResult response = faceClient.verifyFaceToFace("c5c24a82-6845-4031-9d5d-978df9175426", + "3aa87e30-b380-48eb-ad9e-1aa54fc52bd3"); + + // response assertion + Assertions.assertNotNull(response); + // verify property "isIdentical" + Assertions.assertEquals(true, response.isIdentical()); + // verify property "confidence" + Assertions.assertEquals(0.8, response.getConfidence()); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/VerifyFromLargePersonGroupTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/VerifyFromLargePersonGroupTests.java new file mode 100644 index 000000000000..72e90c1bab88 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/VerifyFromLargePersonGroupTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.vision.face.generated; + +import com.azure.ai.vision.face.models.FaceVerificationResult; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class VerifyFromLargePersonGroupTests extends FaceAdministrationClientTestBase { + @Test + @Disabled + public void testVerifyFromLargePersonGroupTests() { + // method invocation + FaceVerificationResult response = faceClient.verifyFromLargePersonGroup("c5c24a82-6845-4031-9d5d-978df9175426", + "your_large_person_group", "815df99c-598f-4926-930a-a734b3fd651c"); + + // response assertion + Assertions.assertNotNull(response); + // verify property "isIdentical" + Assertions.assertEquals(true, response.isIdentical()); + // verify property "confidence" + Assertions.assertEquals(0.8, response.getConfidence()); + } +} diff --git a/sdk/face/azure-ai-vision-face/tsp-location.yaml b/sdk/face/azure-ai-vision-face/tsp-location.yaml index 9ae1dbefc9c2..f371322b5c9e 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: f2b97d9664e113b16602dd3a2f20900a7f9f7c26 +commit: 678deda13a0393a5c1c959ccb80be23ecd966f41 repo: Azure/azure-rest-api-specs additionalDirectories: null From 73994758563ce1bb39fcedbf9bf1f993df5f430e Mon Sep 17 00:00:00 2001 From: Han Chiang Date: Wed, 9 Oct 2024 14:20:33 +0000 Subject: [PATCH 06/14] remove generated test and sample --- .../face/generated/CreateLargeFaceList.java | 25 ----- .../generated/CreateLargePersonGroup.java | 26 ----- .../face/generated/CreateLivenessSession.java | 29 ------ .../CreatePersonInLargePersonGroup.java | 26 ----- .../DeleteFaceFromLargeFaceList.java | 24 ----- .../DeleteFaceFromLargePersonGroupPerson.java | 25 ----- .../face/generated/DeleteLargeFaceList.java | 24 ----- .../generated/DeleteLargePersonGroup.java | 24 ----- .../face/generated/DeleteLivenessSession.java | 22 ----- .../DeleteLivenessWithVerifySession.java | 22 ----- .../DeletePersonFromLargePersonGroup.java | 24 ----- .../generated/DetectFromSessionImageId.java | 36 ------- .../generated/FindSimilarAmongFaceIDs.java | 27 ------ .../FindSimilarFromLargeFaceList.java | 25 ----- .../generated/GetFaceFromLargeFaceList.java | 25 ----- .../GetFaceFromLargePersonGroupPerson.java | 26 ----- .../generated/GetFacesFromLargeFaceList.java | 26 ----- .../face/generated/GetLargeFaceList.java | 25 ----- .../face/generated/GetLargeFaceLists.java | 26 ----- .../face/generated/GetLargePersonGroup.java | 25 ----- .../face/generated/GetLargePersonGroups.java | 27 ------ .../GetLivenessSessionAuditEntries.java | 25 ----- .../generated/GetLivenessSessionResult.java | 23 ----- .../face/generated/GetLivenessSessions.java | 25 ----- ...LivenessWithVerifySessionAuditEntries.java | 25 ----- .../GetLivenessWithVerifySessionResult.java | 24 ----- .../GetLivenessWithVerifySessions.java | 25 ----- .../GetPersonFromLargePersonGroup.java | 25 ----- .../GetPersonsFromLargePersonGroup.java | 27 ------ .../face/generated/GetSessionImage.java | 23 ----- .../GetTrainingStatusOfLargeFaceList.java | 25 ----- .../GetTrainingStatusOfLargePersonGroup.java | 25 ----- .../vision/face/generated/GroupFaceIDs.java | 27 ------ .../IdentifyFromLargePersonGroup.java | 25 ----- .../face/generated/TrainLargeFaceList.java | 26 ----- .../face/generated/TrainLargePersonGroup.java | 26 ----- .../generated/UpdateFaceInLargeFaceList.java | 24 ----- .../UpdateFaceInLargePersonGroupPerson.java | 25 ----- .../face/generated/UpdateLargeFaceList.java | 24 ----- .../generated/UpdateLargePersonGroup.java | 24 ----- .../UpdatePersonInLargePersonGroup.java | 25 ----- .../face/generated/VerifyFaceToFace.java | 23 ----- .../generated/VerifyFromLargePersonGroup.java | 23 ----- .../generated/CreateLargeFaceListTests.java | 19 ---- .../CreateLargePersonGroupTests.java | 20 ---- .../generated/CreateLivenessSessionTests.java | 33 ------- .../CreatePersonInLargePersonGroupTests.java | 26 ----- .../DeleteFaceFromLargeFaceListTests.java | 18 ---- ...teFaceFromLargePersonGroupPersonTests.java | 19 ---- .../generated/DeleteLargeFaceListTests.java | 18 ---- .../DeleteLargePersonGroupTests.java | 18 ---- .../generated/DeleteLivenessSessionTests.java | 18 ---- .../DeleteLivenessWithVerifySessionTests.java | 18 ---- ...DeletePersonFromLargePersonGroupTests.java | 18 ---- .../DetectFromSessionImageIdTests.java | 32 ------- .../FaceAdministrationClientTestBase.java | 96 ------------------- .../FindSimilarAmongFaceIDsTests.java | 24 ----- .../FindSimilarFromLargeFaceListTests.java | 22 ----- .../GetFaceFromLargeFaceListTests.java | 27 ------ ...etFaceFromLargePersonGroupPersonTests.java | 28 ------ .../GetFacesFromLargeFaceListTests.java | 20 ---- .../face/generated/GetLargeFaceListTests.java | 32 ------- .../generated/GetLargeFaceListsTests.java | 20 ---- .../generated/GetLargePersonGroupTests.java | 32 ------- .../generated/GetLargePersonGroupsTests.java | 21 ---- .../GetLivenessSessionAuditEntriesTests.java | 21 ---- .../GetLivenessSessionResultTests.java | 67 ------------- .../generated/GetLivenessSessionsTests.java | 21 ---- ...essWithVerifySessionAuditEntriesTests.java | 21 ---- ...tLivenessWithVerifySessionResultTests.java | 68 ------------- .../GetLivenessWithVerifySessionsTests.java | 21 ---- .../GetPersonFromLargePersonGroupTests.java | 33 ------- .../GetPersonsFromLargePersonGroupTests.java | 21 ---- .../face/generated/GetSessionImageTests.java | 23 ----- ...GetTrainingStatusOfLargeFaceListTests.java | 32 ------- ...TrainingStatusOfLargePersonGroupTests.java | 32 ------- .../face/generated/GroupFaceIDsTests.java | 36 ------- .../IdentifyFromLargePersonGroupTests.java | 22 ----- .../generated/TrainLargeFaceListTests.java | 27 ------ .../generated/TrainLargePersonGroupTests.java | 27 ------ .../UpdateFaceInLargeFaceListTests.java | 18 ---- ...dateFaceInLargePersonGroupPersonTests.java | 19 ---- .../generated/UpdateLargeFaceListTests.java | 18 ---- .../UpdateLargePersonGroupTests.java | 18 ---- .../UpdatePersonInLargePersonGroupTests.java | 19 ---- .../face/generated/VerifyFaceToFaceTests.java | 28 ------ .../VerifyFromLargePersonGroupTests.java | 28 ------ 87 files changed, 2282 deletions(-) delete mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/CreateLargeFaceList.java delete mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/CreateLargePersonGroup.java delete mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/CreateLivenessSession.java delete mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/CreatePersonInLargePersonGroup.java delete mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteFaceFromLargeFaceList.java delete mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteFaceFromLargePersonGroupPerson.java delete mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteLargeFaceList.java delete mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteLargePersonGroup.java delete mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteLivenessSession.java delete mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteLivenessWithVerifySession.java delete mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeletePersonFromLargePersonGroup.java delete mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DetectFromSessionImageId.java delete mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/FindSimilarAmongFaceIDs.java delete mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/FindSimilarFromLargeFaceList.java delete mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetFaceFromLargeFaceList.java delete mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetFaceFromLargePersonGroupPerson.java delete mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetFacesFromLargeFaceList.java delete mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLargeFaceList.java delete mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLargeFaceLists.java delete mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLargePersonGroup.java delete mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLargePersonGroups.java delete mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessSessionAuditEntries.java delete mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessSessionResult.java delete mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessSessions.java delete mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessionAuditEntries.java delete mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessionResult.java delete mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessions.java delete mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetPersonFromLargePersonGroup.java delete mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetPersonsFromLargePersonGroup.java delete mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetSessionImage.java delete mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetTrainingStatusOfLargeFaceList.java delete mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetTrainingStatusOfLargePersonGroup.java delete mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GroupFaceIDs.java delete mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/IdentifyFromLargePersonGroup.java delete mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/TrainLargeFaceList.java delete mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/TrainLargePersonGroup.java delete mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/UpdateFaceInLargeFaceList.java delete mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/UpdateFaceInLargePersonGroupPerson.java delete mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/UpdateLargeFaceList.java delete mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/UpdateLargePersonGroup.java delete mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/UpdatePersonInLargePersonGroup.java delete mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/VerifyFaceToFace.java delete mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/VerifyFromLargePersonGroup.java delete mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/CreateLargeFaceListTests.java delete mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/CreateLargePersonGroupTests.java delete mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/CreateLivenessSessionTests.java delete mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/CreatePersonInLargePersonGroupTests.java delete mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteFaceFromLargeFaceListTests.java delete mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteFaceFromLargePersonGroupPersonTests.java delete mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteLargeFaceListTests.java delete mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteLargePersonGroupTests.java delete mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteLivenessSessionTests.java delete mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteLivenessWithVerifySessionTests.java delete mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeletePersonFromLargePersonGroupTests.java delete mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DetectFromSessionImageIdTests.java delete mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/FaceAdministrationClientTestBase.java delete mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/FindSimilarAmongFaceIDsTests.java delete mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/FindSimilarFromLargeFaceListTests.java delete mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetFaceFromLargeFaceListTests.java delete mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetFaceFromLargePersonGroupPersonTests.java delete mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetFacesFromLargeFaceListTests.java delete mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLargeFaceListTests.java delete mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLargeFaceListsTests.java delete mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLargePersonGroupTests.java delete mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLargePersonGroupsTests.java delete mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessSessionAuditEntriesTests.java delete mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessSessionResultTests.java delete mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessSessionsTests.java delete mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessionAuditEntriesTests.java delete mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessionResultTests.java delete mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessionsTests.java delete mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetPersonFromLargePersonGroupTests.java delete mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetPersonsFromLargePersonGroupTests.java delete mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetSessionImageTests.java delete mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetTrainingStatusOfLargeFaceListTests.java delete mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetTrainingStatusOfLargePersonGroupTests.java delete mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GroupFaceIDsTests.java delete mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/IdentifyFromLargePersonGroupTests.java delete mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/TrainLargeFaceListTests.java delete mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/TrainLargePersonGroupTests.java delete mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/UpdateFaceInLargeFaceListTests.java delete mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/UpdateFaceInLargePersonGroupPersonTests.java delete mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/UpdateLargeFaceListTests.java delete mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/UpdateLargePersonGroupTests.java delete mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/UpdatePersonInLargePersonGroupTests.java delete mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/VerifyFaceToFaceTests.java delete mode 100644 sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/VerifyFromLargePersonGroupTests.java diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/CreateLargeFaceList.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/CreateLargeFaceList.java deleted file mode 100644 index ec26add30c55..000000000000 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/CreateLargeFaceList.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; -import com.azure.ai.vision.face.administration.LargeFaceListClient; -import com.azure.ai.vision.face.models.FaceRecognitionModel; -import com.azure.core.util.Configuration; -import com.azure.identity.DefaultAzureCredentialBuilder; - -public class CreateLargeFaceList { - public static void main(String[] args) { - LargeFaceListClient largeFaceListClient - = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) - .largeFaceListId("your_large_face_list_id") - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) - .largePersonGroupId(Configuration.getGlobalConfiguration().get("LARGEPERSONGROUPID")) - .buildLargeFaceListClient(); - // BEGIN:com.azure.ai.vision.face.generated.largefacelistcreate.createlargefacelist - largeFaceListClient.create("your_large_face_list_name", "your_user_data", FaceRecognitionModel.RECOGNITION_01); - // END:com.azure.ai.vision.face.generated.largefacelistcreate.createlargefacelist - } -} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/CreateLargePersonGroup.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/CreateLargePersonGroup.java deleted file mode 100644 index 64ad2c8b25dd..000000000000 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/CreateLargePersonGroup.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; -import com.azure.ai.vision.face.administration.LargePersonGroupClient; -import com.azure.ai.vision.face.models.FaceRecognitionModel; -import com.azure.core.util.Configuration; -import com.azure.identity.DefaultAzureCredentialBuilder; - -public class CreateLargePersonGroup { - public static void main(String[] args) { - LargePersonGroupClient largePersonGroupClient - = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) - .largePersonGroupId("your_large_person_group_id") - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) - .largeFaceListId(Configuration.getGlobalConfiguration().get("LARGEFACELISTID")) - .buildLargePersonGroupClient(); - // BEGIN:com.azure.ai.vision.face.generated.largepersongroupcreate.createlargepersongroup - largePersonGroupClient.create("your_large_person_group_name", "your_user_data", - FaceRecognitionModel.RECOGNITION_01); - // END:com.azure.ai.vision.face.generated.largepersongroupcreate.createlargepersongroup - } -} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/CreateLivenessSession.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/CreateLivenessSession.java deleted file mode 100644 index c4a59697379a..000000000000 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/CreateLivenessSession.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.FaceSessionClient; -import com.azure.ai.vision.face.FaceSessionClientBuilder; -import com.azure.ai.vision.face.models.CreateLivenessSessionContent; -import com.azure.ai.vision.face.models.CreateLivenessSessionResult; -import com.azure.ai.vision.face.models.LivenessOperationMode; -import com.azure.core.util.Configuration; -import com.azure.identity.DefaultAzureCredentialBuilder; - -public class CreateLivenessSession { - public static void main(String[] args) { - FaceSessionClient faceSessionClient - = new FaceSessionClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) - .buildClient(); - // BEGIN:com.azure.ai.vision.face.generated.createlivenesssession.createlivenesssession - CreateLivenessSessionResult response = faceSessionClient.createLivenessSession( - new CreateLivenessSessionContent(LivenessOperationMode.PASSIVE).setSendResultsToClient(true) - .setDeviceCorrelationIdSetInClient(true) - .setDeviceCorrelationId("your_device_correlation_id") - .setAuthTokenTimeToLiveInSeconds(60)); - // END:com.azure.ai.vision.face.generated.createlivenesssession.createlivenesssession - } -} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/CreatePersonInLargePersonGroup.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/CreatePersonInLargePersonGroup.java deleted file mode 100644 index 5165ccf7b717..000000000000 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/CreatePersonInLargePersonGroup.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; -import com.azure.ai.vision.face.administration.LargePersonGroupClient; -import com.azure.ai.vision.face.models.CreatePersonResult; -import com.azure.core.util.Configuration; -import com.azure.identity.DefaultAzureCredentialBuilder; - -public class CreatePersonInLargePersonGroup { - public static void main(String[] args) { - LargePersonGroupClient largePersonGroupClient - = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) - .largePersonGroupId("your_large_person_group_id") - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) - .largeFaceListId(Configuration.getGlobalConfiguration().get("LARGEFACELISTID")) - .buildLargePersonGroupClient(); - // BEGIN:com.azure.ai.vision.face.generated.largepersongroupcreateperson.createpersoninlargepersongroup - CreatePersonResult response - = largePersonGroupClient.createPerson("your_large_person_group_person_name", "your_user_data"); - // END:com.azure.ai.vision.face.generated.largepersongroupcreateperson.createpersoninlargepersongroup - } -} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteFaceFromLargeFaceList.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteFaceFromLargeFaceList.java deleted file mode 100644 index 5a54df5cb09a..000000000000 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteFaceFromLargeFaceList.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; -import com.azure.ai.vision.face.administration.LargeFaceListClient; -import com.azure.core.util.Configuration; -import com.azure.identity.DefaultAzureCredentialBuilder; - -public class DeleteFaceFromLargeFaceList { - public static void main(String[] args) { - LargeFaceListClient largeFaceListClient - = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) - .largeFaceListId("your_large_face_list_id") - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) - .largePersonGroupId(Configuration.getGlobalConfiguration().get("LARGEPERSONGROUPID")) - .buildLargeFaceListClient(); - // BEGIN:com.azure.ai.vision.face.generated.largefacelistdeleteface.deletefacefromlargefacelist - largeFaceListClient.deleteFace("43897a75-8d6f-42cf-885e-74832febb055"); - // END:com.azure.ai.vision.face.generated.largefacelistdeleteface.deletefacefromlargefacelist - } -} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteFaceFromLargePersonGroupPerson.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteFaceFromLargePersonGroupPerson.java deleted file mode 100644 index 4cd1e61a4342..000000000000 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteFaceFromLargePersonGroupPerson.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; -import com.azure.ai.vision.face.administration.LargePersonGroupClient; -import com.azure.core.util.Configuration; -import com.azure.identity.DefaultAzureCredentialBuilder; - -public class DeleteFaceFromLargePersonGroupPerson { - public static void main(String[] args) { - LargePersonGroupClient largePersonGroupClient - = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) - .largePersonGroupId("your_large_person_group_id") - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) - .largeFaceListId(Configuration.getGlobalConfiguration().get("LARGEFACELISTID")) - .buildLargePersonGroupClient(); - // BEGIN:com.azure.ai.vision.face.generated.largepersongroupdeleteface.deletefacefromlargepersongroupperson - largePersonGroupClient.deleteFace("25985303-c537-4467-b41d-bdb45cd95ca1", - "43897a75-8d6f-42cf-885e-74832febb055"); - // END:com.azure.ai.vision.face.generated.largepersongroupdeleteface.deletefacefromlargepersongroupperson - } -} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteLargeFaceList.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteLargeFaceList.java deleted file mode 100644 index 22ce43828d39..000000000000 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteLargeFaceList.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; -import com.azure.ai.vision.face.administration.LargeFaceListClient; -import com.azure.core.util.Configuration; -import com.azure.identity.DefaultAzureCredentialBuilder; - -public class DeleteLargeFaceList { - public static void main(String[] args) { - LargeFaceListClient largeFaceListClient - = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) - .largeFaceListId("your_large_face_list_id") - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) - .largePersonGroupId(Configuration.getGlobalConfiguration().get("LARGEPERSONGROUPID")) - .buildLargeFaceListClient(); - // BEGIN:com.azure.ai.vision.face.generated.largefacelistdelete.deletelargefacelist - largeFaceListClient.delete(); - // END:com.azure.ai.vision.face.generated.largefacelistdelete.deletelargefacelist - } -} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteLargePersonGroup.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteLargePersonGroup.java deleted file mode 100644 index 9f5017eab8db..000000000000 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteLargePersonGroup.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; -import com.azure.ai.vision.face.administration.LargePersonGroupClient; -import com.azure.core.util.Configuration; -import com.azure.identity.DefaultAzureCredentialBuilder; - -public class DeleteLargePersonGroup { - public static void main(String[] args) { - LargePersonGroupClient largePersonGroupClient - = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) - .largePersonGroupId("your_large_person_group_id") - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) - .largeFaceListId(Configuration.getGlobalConfiguration().get("LARGEFACELISTID")) - .buildLargePersonGroupClient(); - // BEGIN:com.azure.ai.vision.face.generated.largepersongroupdelete.deletelargepersongroup - largePersonGroupClient.delete(); - // END:com.azure.ai.vision.face.generated.largepersongroupdelete.deletelargepersongroup - } -} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteLivenessSession.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteLivenessSession.java deleted file mode 100644 index e547aac617e8..000000000000 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteLivenessSession.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.FaceSessionClient; -import com.azure.ai.vision.face.FaceSessionClientBuilder; -import com.azure.core.util.Configuration; -import com.azure.identity.DefaultAzureCredentialBuilder; - -public class DeleteLivenessSession { - public static void main(String[] args) { - FaceSessionClient faceSessionClient - = new FaceSessionClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) - .buildClient(); - // BEGIN:com.azure.ai.vision.face.generated.deletelivenesssession.deletelivenesssession - faceSessionClient.deleteLivenessSession("b12e033e-bda7-4b83-a211-e721c661f30e"); - // END:com.azure.ai.vision.face.generated.deletelivenesssession.deletelivenesssession - } -} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteLivenessWithVerifySession.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteLivenessWithVerifySession.java deleted file mode 100644 index 93bce9a42d80..000000000000 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeleteLivenessWithVerifySession.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.FaceSessionClient; -import com.azure.ai.vision.face.FaceSessionClientBuilder; -import com.azure.core.util.Configuration; -import com.azure.identity.DefaultAzureCredentialBuilder; - -public class DeleteLivenessWithVerifySession { - public static void main(String[] args) { - FaceSessionClient faceSessionClient - = new FaceSessionClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) - .buildClient(); - // BEGIN:com.azure.ai.vision.face.generated.deletelivenesswithverifysession.deletelivenesswithverifysession - faceSessionClient.deleteLivenessWithVerifySession("b12e033e-bda7-4b83-a211-e721c661f30e"); - // END:com.azure.ai.vision.face.generated.deletelivenesswithverifysession.deletelivenesswithverifysession - } -} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeletePersonFromLargePersonGroup.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeletePersonFromLargePersonGroup.java deleted file mode 100644 index 0d315d2f2c35..000000000000 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DeletePersonFromLargePersonGroup.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; -import com.azure.ai.vision.face.administration.LargePersonGroupClient; -import com.azure.core.util.Configuration; -import com.azure.identity.DefaultAzureCredentialBuilder; - -public class DeletePersonFromLargePersonGroup { - public static void main(String[] args) { - LargePersonGroupClient largePersonGroupClient - = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) - .largePersonGroupId("your_large_person_group_id") - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) - .largeFaceListId(Configuration.getGlobalConfiguration().get("LARGEFACELISTID")) - .buildLargePersonGroupClient(); - // BEGIN:com.azure.ai.vision.face.generated.largepersongroupdeleteperson.deletepersonfromlargepersongroup - largePersonGroupClient.deletePerson("25985303-c537-4467-b41d-bdb45cd95ca1"); - // END:com.azure.ai.vision.face.generated.largepersongroupdeleteperson.deletepersonfromlargepersongroup - } -} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DetectFromSessionImageId.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DetectFromSessionImageId.java deleted file mode 100644 index 40f326e1754d..000000000000 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/DetectFromSessionImageId.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.FaceSessionClient; -import com.azure.ai.vision.face.FaceSessionClientBuilder; -import com.azure.ai.vision.face.models.DetectFromSessionImageOptions; -import com.azure.ai.vision.face.models.FaceDetectionModel; -import com.azure.ai.vision.face.models.FaceDetectionResult; -import com.azure.ai.vision.face.models.FaceRecognitionModel; -import com.azure.core.util.Configuration; -import com.azure.identity.DefaultAzureCredentialBuilder; -import java.util.Arrays; -import java.util.List; - -public class DetectFromSessionImageId { - public static void main(String[] args) { - FaceSessionClient faceSessionClient - = new FaceSessionClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) - .buildClient(); - // BEGIN:com.azure.ai.vision.face.generated.detectfromsessionimage.detectfromsessionimageid - List response = faceSessionClient - .detectFromSessionImage(new DetectFromSessionImageOptions("aa93ce80-9a9b-48bd-ae1a-1c7543841e92") - .setDetectionModel(FaceDetectionModel.DETECTION_01) - .setRecognitionModel(FaceRecognitionModel.RECOGNITION_03) - .setReturnFaceId(true) - .setReturnFaceAttributes(Arrays.asList()) - .setReturnFaceLandmarks(true) - .setReturnRecognitionModel(true) - .setFaceIdTimeToLive(60)); - // END:com.azure.ai.vision.face.generated.detectfromsessionimage.detectfromsessionimageid - } -} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/FindSimilarAmongFaceIDs.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/FindSimilarAmongFaceIDs.java deleted file mode 100644 index 2f249dbfaedd..000000000000 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/FindSimilarAmongFaceIDs.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.FaceClient; -import com.azure.ai.vision.face.FaceClientBuilder; -import com.azure.ai.vision.face.models.FaceFindSimilarResult; -import com.azure.ai.vision.face.models.FindSimilarMatchMode; -import com.azure.core.util.Configuration; -import com.azure.identity.DefaultAzureCredentialBuilder; -import java.util.Arrays; -import java.util.List; - -public class FindSimilarAmongFaceIDs { - public static void main(String[] args) { - FaceClient faceClient = new FaceClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) - .buildClient(); - // BEGIN:com.azure.ai.vision.face.generated.findsimilar.findsimilaramongfaceids - List response = faceClient.findSimilar("c5c24a82-6845-4031-9d5d-978df9175426", - Arrays.asList("015839fb-fbd9-4f79-ace9-7675fc2f1dd9", "be386ab3-af91-4104-9e6d-4dae4c9fddb7"), 3, - FindSimilarMatchMode.MATCH_PERSON); - // END:com.azure.ai.vision.face.generated.findsimilar.findsimilaramongfaceids - } -} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/FindSimilarFromLargeFaceList.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/FindSimilarFromLargeFaceList.java deleted file mode 100644 index bb084061f36b..000000000000 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/FindSimilarFromLargeFaceList.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.FaceClient; -import com.azure.ai.vision.face.FaceClientBuilder; -import com.azure.ai.vision.face.models.FaceFindSimilarResult; -import com.azure.ai.vision.face.models.FindSimilarMatchMode; -import com.azure.core.util.Configuration; -import com.azure.identity.DefaultAzureCredentialBuilder; -import java.util.List; - -public class FindSimilarFromLargeFaceList { - public static void main(String[] args) { - FaceClient faceClient = new FaceClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) - .buildClient(); - // BEGIN:com.azure.ai.vision.face.generated.findsimilarfromlargefacelist.findsimilarfromlargefacelist - List response = faceClient.findSimilarFromLargeFaceList( - "c5c24a82-6845-4031-9d5d-978df9175426", "your_large_face_list_id", 3, FindSimilarMatchMode.MATCH_PERSON); - // END:com.azure.ai.vision.face.generated.findsimilarfromlargefacelist.findsimilarfromlargefacelist - } -} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetFaceFromLargeFaceList.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetFaceFromLargeFaceList.java deleted file mode 100644 index e0d2590bd51b..000000000000 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetFaceFromLargeFaceList.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; -import com.azure.ai.vision.face.administration.LargeFaceListClient; -import com.azure.ai.vision.face.models.LargeFaceListFace; -import com.azure.core.util.Configuration; -import com.azure.identity.DefaultAzureCredentialBuilder; - -public class GetFaceFromLargeFaceList { - public static void main(String[] args) { - LargeFaceListClient largeFaceListClient - = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) - .largeFaceListId("your_large_face_list_id") - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) - .largePersonGroupId(Configuration.getGlobalConfiguration().get("LARGEPERSONGROUPID")) - .buildLargeFaceListClient(); - // BEGIN:com.azure.ai.vision.face.generated.largefacelistgetface.getfacefromlargefacelist - LargeFaceListFace response = largeFaceListClient.getFace("43897a75-8d6f-42cf-885e-74832febb055"); - // END:com.azure.ai.vision.face.generated.largefacelistgetface.getfacefromlargefacelist - } -} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetFaceFromLargePersonGroupPerson.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetFaceFromLargePersonGroupPerson.java deleted file mode 100644 index 015dac2d80bb..000000000000 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetFaceFromLargePersonGroupPerson.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; -import com.azure.ai.vision.face.administration.LargePersonGroupClient; -import com.azure.ai.vision.face.models.LargePersonGroupPersonFace; -import com.azure.core.util.Configuration; -import com.azure.identity.DefaultAzureCredentialBuilder; - -public class GetFaceFromLargePersonGroupPerson { - public static void main(String[] args) { - LargePersonGroupClient largePersonGroupClient - = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) - .largePersonGroupId("your_large_person_group_id") - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) - .largeFaceListId(Configuration.getGlobalConfiguration().get("LARGEFACELISTID")) - .buildLargePersonGroupClient(); - // BEGIN:com.azure.ai.vision.face.generated.largepersongroupgetface.getfacefromlargepersongroupperson - LargePersonGroupPersonFace response = largePersonGroupClient.getFace("25985303-c537-4467-b41d-bdb45cd95ca1", - "43897a75-8d6f-42cf-885e-74832febb055"); - // END:com.azure.ai.vision.face.generated.largepersongroupgetface.getfacefromlargepersongroupperson - } -} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetFacesFromLargeFaceList.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetFacesFromLargeFaceList.java deleted file mode 100644 index b5a2495acee4..000000000000 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetFacesFromLargeFaceList.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; -import com.azure.ai.vision.face.administration.LargeFaceListClient; -import com.azure.ai.vision.face.models.LargeFaceListFace; -import com.azure.core.util.Configuration; -import com.azure.identity.DefaultAzureCredentialBuilder; -import java.util.List; - -public class GetFacesFromLargeFaceList { - public static void main(String[] args) { - LargeFaceListClient largeFaceListClient - = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) - .largeFaceListId("your_large_face_list_id") - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) - .largePersonGroupId(Configuration.getGlobalConfiguration().get("LARGEPERSONGROUPID")) - .buildLargeFaceListClient(); - // BEGIN:com.azure.ai.vision.face.generated.largefacelistgetfaces.getfacesfromlargefacelist - List response = largeFaceListClient.getFaces("00000000-0000-0000-0000-000000000000", 20); - // END:com.azure.ai.vision.face.generated.largefacelistgetfaces.getfacesfromlargefacelist - } -} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLargeFaceList.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLargeFaceList.java deleted file mode 100644 index 164ea741b410..000000000000 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLargeFaceList.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; -import com.azure.ai.vision.face.administration.LargeFaceListClient; -import com.azure.ai.vision.face.models.LargeFaceList; -import com.azure.core.util.Configuration; -import com.azure.identity.DefaultAzureCredentialBuilder; - -public class GetLargeFaceList { - public static void main(String[] args) { - LargeFaceListClient largeFaceListClient - = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) - .largeFaceListId("your_large_face_list_id") - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) - .largePersonGroupId(Configuration.getGlobalConfiguration().get("LARGEPERSONGROUPID")) - .buildLargeFaceListClient(); - // BEGIN:com.azure.ai.vision.face.generated.largefacelistget.getlargefacelist - LargeFaceList response = largeFaceListClient.get(true); - // END:com.azure.ai.vision.face.generated.largefacelistget.getlargefacelist - } -} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLargeFaceLists.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLargeFaceLists.java deleted file mode 100644 index a5f3cff3f3d1..000000000000 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLargeFaceLists.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; -import com.azure.ai.vision.face.administration.LargeFaceListClient; -import com.azure.ai.vision.face.models.LargeFaceList; -import com.azure.core.util.Configuration; -import com.azure.identity.DefaultAzureCredentialBuilder; -import java.util.List; - -public class GetLargeFaceLists { - public static void main(String[] args) { - LargeFaceListClient largeFaceListClient - = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) - .largeFaceListId(Configuration.getGlobalConfiguration().get("LARGEFACELISTID")) - .largePersonGroupId(Configuration.getGlobalConfiguration().get("LARGEPERSONGROUPID")) - .buildLargeFaceListClient(); - // BEGIN:com.azure.ai.vision.face.generated.largefacelistgetlargefacelists.getlargefacelists - List response = largeFaceListClient.getLargeFaceLists("my_list_id", 20, true); - // END:com.azure.ai.vision.face.generated.largefacelistgetlargefacelists.getlargefacelists - } -} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLargePersonGroup.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLargePersonGroup.java deleted file mode 100644 index 425112906ea7..000000000000 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLargePersonGroup.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; -import com.azure.ai.vision.face.administration.LargePersonGroupClient; -import com.azure.ai.vision.face.models.LargePersonGroup; -import com.azure.core.util.Configuration; -import com.azure.identity.DefaultAzureCredentialBuilder; - -public class GetLargePersonGroup { - public static void main(String[] args) { - LargePersonGroupClient largePersonGroupClient - = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) - .largePersonGroupId("your_large_person_group_id") - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) - .largeFaceListId(Configuration.getGlobalConfiguration().get("LARGEFACELISTID")) - .buildLargePersonGroupClient(); - // BEGIN:com.azure.ai.vision.face.generated.largepersongroupget.getlargepersongroup - LargePersonGroup response = largePersonGroupClient.get(true); - // END:com.azure.ai.vision.face.generated.largepersongroupget.getlargepersongroup - } -} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLargePersonGroups.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLargePersonGroups.java deleted file mode 100644 index 23dea87b921f..000000000000 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLargePersonGroups.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; -import com.azure.ai.vision.face.administration.LargePersonGroupClient; -import com.azure.ai.vision.face.models.LargePersonGroup; -import com.azure.core.util.Configuration; -import com.azure.identity.DefaultAzureCredentialBuilder; -import java.util.List; - -public class GetLargePersonGroups { - public static void main(String[] args) { - LargePersonGroupClient largePersonGroupClient - = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) - .largeFaceListId(Configuration.getGlobalConfiguration().get("LARGEFACELISTID")) - .largePersonGroupId(Configuration.getGlobalConfiguration().get("LARGEPERSONGROUPID")) - .buildLargePersonGroupClient(); - // BEGIN:com.azure.ai.vision.face.generated.largepersongroupgetlargepersongroups.getlargepersongroups - List response - = largePersonGroupClient.getLargePersonGroups("00000000-0000-0000-0000-000000000000", 20, true); - // END:com.azure.ai.vision.face.generated.largepersongroupgetlargepersongroups.getlargepersongroups - } -} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessSessionAuditEntries.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessSessionAuditEntries.java deleted file mode 100644 index 817227acfa61..000000000000 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessSessionAuditEntries.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.FaceSessionClient; -import com.azure.ai.vision.face.FaceSessionClientBuilder; -import com.azure.ai.vision.face.models.LivenessSessionAuditEntry; -import com.azure.core.util.Configuration; -import com.azure.identity.DefaultAzureCredentialBuilder; -import java.util.List; - -public class GetLivenessSessionAuditEntries { - public static void main(String[] args) { - FaceSessionClient faceSessionClient - = new FaceSessionClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) - .buildClient(); - // BEGIN:com.azure.ai.vision.face.generated.getlivenesssessionauditentries.getlivenesssessionauditentries - List response - = faceSessionClient.getLivenessSessionAuditEntries("b12e033e-bda7-4b83-a211-e721c661f30e", "0", 20); - // END:com.azure.ai.vision.face.generated.getlivenesssessionauditentries.getlivenesssessionauditentries - } -} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessSessionResult.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessSessionResult.java deleted file mode 100644 index 7af0331d0b02..000000000000 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessSessionResult.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.FaceSessionClient; -import com.azure.ai.vision.face.FaceSessionClientBuilder; -import com.azure.ai.vision.face.models.LivenessSession; -import com.azure.core.util.Configuration; -import com.azure.identity.DefaultAzureCredentialBuilder; - -public class GetLivenessSessionResult { - public static void main(String[] args) { - FaceSessionClient faceSessionClient - = new FaceSessionClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) - .buildClient(); - // BEGIN:com.azure.ai.vision.face.generated.getlivenesssessionresult.getlivenesssessionresult - LivenessSession response = faceSessionClient.getLivenessSessionResult("b12e033e-bda7-4b83-a211-e721c661f30e"); - // END:com.azure.ai.vision.face.generated.getlivenesssessionresult.getlivenesssessionresult - } -} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessSessions.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessSessions.java deleted file mode 100644 index aaccecb1e1ca..000000000000 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessSessions.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.FaceSessionClient; -import com.azure.ai.vision.face.FaceSessionClientBuilder; -import com.azure.ai.vision.face.models.LivenessSessionItem; -import com.azure.core.util.Configuration; -import com.azure.identity.DefaultAzureCredentialBuilder; -import java.util.List; - -public class GetLivenessSessions { - public static void main(String[] args) { - FaceSessionClient faceSessionClient - = new FaceSessionClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) - .buildClient(); - // BEGIN:com.azure.ai.vision.face.generated.getlivenesssessions.getlivenesssessions - List response - = faceSessionClient.getLivenessSessions("00000000-0000-0000-0000-000000000000", 20); - // END:com.azure.ai.vision.face.generated.getlivenesssessions.getlivenesssessions - } -} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessionAuditEntries.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessionAuditEntries.java deleted file mode 100644 index d3fc3bdfa001..000000000000 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessionAuditEntries.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.FaceSessionClient; -import com.azure.ai.vision.face.FaceSessionClientBuilder; -import com.azure.ai.vision.face.models.LivenessSessionAuditEntry; -import com.azure.core.util.Configuration; -import com.azure.identity.DefaultAzureCredentialBuilder; -import java.util.List; - -public class GetLivenessWithVerifySessionAuditEntries { - public static void main(String[] args) { - FaceSessionClient faceSessionClient - = new FaceSessionClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) - .buildClient(); - // BEGIN:com.azure.ai.vision.face.generated.getlivenesswithverifysessionauditentries.getlivenesswithverifysessionauditentries - List response = faceSessionClient - .getLivenessWithVerifySessionAuditEntries("b12e033e-bda7-4b83-a211-e721c661f30e", "0", 20); - // END:com.azure.ai.vision.face.generated.getlivenesswithverifysessionauditentries.getlivenesswithverifysessionauditentries - } -} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessionResult.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessionResult.java deleted file mode 100644 index 8ba2b7044a24..000000000000 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessionResult.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.FaceSessionClient; -import com.azure.ai.vision.face.FaceSessionClientBuilder; -import com.azure.ai.vision.face.models.LivenessWithVerifySession; -import com.azure.core.util.Configuration; -import com.azure.identity.DefaultAzureCredentialBuilder; - -public class GetLivenessWithVerifySessionResult { - public static void main(String[] args) { - FaceSessionClient faceSessionClient - = new FaceSessionClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) - .buildClient(); - // BEGIN:com.azure.ai.vision.face.generated.getlivenesswithverifysessionresult.getlivenesswithverifysessionresult - LivenessWithVerifySession response - = faceSessionClient.getLivenessWithVerifySessionResult("b12e033e-bda7-4b83-a211-e721c661f30e"); - // END:com.azure.ai.vision.face.generated.getlivenesswithverifysessionresult.getlivenesswithverifysessionresult - } -} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessions.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessions.java deleted file mode 100644 index bf9c78d67156..000000000000 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessions.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.FaceSessionClient; -import com.azure.ai.vision.face.FaceSessionClientBuilder; -import com.azure.ai.vision.face.models.LivenessSessionItem; -import com.azure.core.util.Configuration; -import com.azure.identity.DefaultAzureCredentialBuilder; -import java.util.List; - -public class GetLivenessWithVerifySessions { - public static void main(String[] args) { - FaceSessionClient faceSessionClient - = new FaceSessionClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) - .buildClient(); - // BEGIN:com.azure.ai.vision.face.generated.getlivenesswithverifysessions.getlivenesswithverifysessions - List response - = faceSessionClient.getLivenessWithVerifySessions("00000000-0000-0000-0000-000000000000", 20); - // END:com.azure.ai.vision.face.generated.getlivenesswithverifysessions.getlivenesswithverifysessions - } -} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetPersonFromLargePersonGroup.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetPersonFromLargePersonGroup.java deleted file mode 100644 index c9c0ba900031..000000000000 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetPersonFromLargePersonGroup.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; -import com.azure.ai.vision.face.administration.LargePersonGroupClient; -import com.azure.ai.vision.face.models.LargePersonGroupPerson; -import com.azure.core.util.Configuration; -import com.azure.identity.DefaultAzureCredentialBuilder; - -public class GetPersonFromLargePersonGroup { - public static void main(String[] args) { - LargePersonGroupClient largePersonGroupClient - = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) - .largePersonGroupId("your_large_person_group_id") - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) - .largeFaceListId(Configuration.getGlobalConfiguration().get("LARGEFACELISTID")) - .buildLargePersonGroupClient(); - // BEGIN:com.azure.ai.vision.face.generated.largepersongroupgetperson.getpersonfromlargepersongroup - LargePersonGroupPerson response = largePersonGroupClient.getPerson("25985303-c537-4467-b41d-bdb45cd95ca1"); - // END:com.azure.ai.vision.face.generated.largepersongroupgetperson.getpersonfromlargepersongroup - } -} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetPersonsFromLargePersonGroup.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetPersonsFromLargePersonGroup.java deleted file mode 100644 index 8b66f3eb270d..000000000000 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetPersonsFromLargePersonGroup.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; -import com.azure.ai.vision.face.administration.LargePersonGroupClient; -import com.azure.ai.vision.face.models.LargePersonGroupPerson; -import com.azure.core.util.Configuration; -import com.azure.identity.DefaultAzureCredentialBuilder; -import java.util.List; - -public class GetPersonsFromLargePersonGroup { - public static void main(String[] args) { - LargePersonGroupClient largePersonGroupClient - = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) - .largePersonGroupId("your_large_person_group_id") - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) - .largeFaceListId(Configuration.getGlobalConfiguration().get("LARGEFACELISTID")) - .buildLargePersonGroupClient(); - // BEGIN:com.azure.ai.vision.face.generated.largepersongroupgetpersons.getpersonsfromlargepersongroup - List response - = largePersonGroupClient.getPersons("00000000-0000-0000-0000-000000000000", 20); - // END:com.azure.ai.vision.face.generated.largepersongroupgetpersons.getpersonsfromlargepersongroup - } -} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetSessionImage.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetSessionImage.java deleted file mode 100644 index 275afb14b73f..000000000000 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetSessionImage.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.FaceSessionClient; -import com.azure.ai.vision.face.FaceSessionClientBuilder; -import com.azure.core.util.BinaryData; -import com.azure.core.util.Configuration; -import com.azure.identity.DefaultAzureCredentialBuilder; - -public class GetSessionImage { - public static void main(String[] args) { - FaceSessionClient faceSessionClient - = new FaceSessionClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) - .buildClient(); - // BEGIN:com.azure.ai.vision.face.generated.getsessionimage.getsessionimage - BinaryData response = faceSessionClient.getSessionImage("3d035d35-2e01-4ed4-8935-577afde9caaa"); - // END:com.azure.ai.vision.face.generated.getsessionimage.getsessionimage - } -} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetTrainingStatusOfLargeFaceList.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetTrainingStatusOfLargeFaceList.java deleted file mode 100644 index 95b955faff14..000000000000 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetTrainingStatusOfLargeFaceList.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; -import com.azure.ai.vision.face.administration.LargeFaceListClient; -import com.azure.ai.vision.face.models.FaceTrainingResult; -import com.azure.core.util.Configuration; -import com.azure.identity.DefaultAzureCredentialBuilder; - -public class GetTrainingStatusOfLargeFaceList { - public static void main(String[] args) { - LargeFaceListClient largeFaceListClient - = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) - .largeFaceListId("your_large_face_list_id") - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) - .largePersonGroupId(Configuration.getGlobalConfiguration().get("LARGEPERSONGROUPID")) - .buildLargeFaceListClient(); - // BEGIN:com.azure.ai.vision.face.generated.largefacelistgettrainingstatus.gettrainingstatusoflargefacelist - FaceTrainingResult response = largeFaceListClient.getTrainingStatus(); - // END:com.azure.ai.vision.face.generated.largefacelistgettrainingstatus.gettrainingstatusoflargefacelist - } -} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetTrainingStatusOfLargePersonGroup.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetTrainingStatusOfLargePersonGroup.java deleted file mode 100644 index 2d0645949a2e..000000000000 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GetTrainingStatusOfLargePersonGroup.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; -import com.azure.ai.vision.face.administration.LargePersonGroupClient; -import com.azure.ai.vision.face.models.FaceTrainingResult; -import com.azure.core.util.Configuration; -import com.azure.identity.DefaultAzureCredentialBuilder; - -public class GetTrainingStatusOfLargePersonGroup { - public static void main(String[] args) { - LargePersonGroupClient largePersonGroupClient - = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) - .largePersonGroupId("your_large_person_group_id") - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) - .largeFaceListId(Configuration.getGlobalConfiguration().get("LARGEFACELISTID")) - .buildLargePersonGroupClient(); - // BEGIN:com.azure.ai.vision.face.generated.largepersongroupgettrainingstatus.gettrainingstatusoflargepersongroup - FaceTrainingResult response = largePersonGroupClient.getTrainingStatus(); - // END:com.azure.ai.vision.face.generated.largepersongroupgettrainingstatus.gettrainingstatusoflargepersongroup - } -} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GroupFaceIDs.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GroupFaceIDs.java deleted file mode 100644 index 082ffd095dca..000000000000 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/GroupFaceIDs.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.FaceClient; -import com.azure.ai.vision.face.FaceClientBuilder; -import com.azure.ai.vision.face.models.FaceGroupingResult; -import com.azure.core.util.Configuration; -import com.azure.identity.DefaultAzureCredentialBuilder; -import java.util.Arrays; - -public class GroupFaceIDs { - public static void main(String[] args) { - FaceClient faceClient = new FaceClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) - .buildClient(); - // BEGIN:com.azure.ai.vision.face.generated.group.groupfaceids - FaceGroupingResult response = faceClient - .group(Arrays.asList("c5c24a82-6845-4031-9d5d-978df9175426", "015839fb-fbd9-4f79-ace9-7675fc2f1dd9", - "65d083d4-9447-47d1-af30-b626144bf0fb", "fce92aed-d578-4d2e-8114-068f8af4492e", - "30ea1073-cc9e-4652-b1e3-d08fb7b95315", "be386ab3-af91-4104-9e6d-4dae4c9fddb7", - "fbd2a038-dbff-452c-8e79-2ee81b1aa84e", "b64d5e15-8257-4af2-b20a-5a750f8940e7")); - // END:com.azure.ai.vision.face.generated.group.groupfaceids - } -} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/IdentifyFromLargePersonGroup.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/IdentifyFromLargePersonGroup.java deleted file mode 100644 index fd4da3eb6fd6..000000000000 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/IdentifyFromLargePersonGroup.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.FaceClient; -import com.azure.ai.vision.face.FaceClientBuilder; -import com.azure.ai.vision.face.models.FaceIdentificationResult; -import com.azure.core.util.Configuration; -import com.azure.identity.DefaultAzureCredentialBuilder; -import java.util.Arrays; -import java.util.List; - -public class IdentifyFromLargePersonGroup { - public static void main(String[] args) { - FaceClient faceClient = new FaceClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) - .buildClient(); - // BEGIN:com.azure.ai.vision.face.generated.identifyfromlargepersongroup.identifyfromlargepersongroup - List response = faceClient.identifyFromLargePersonGroup( - Arrays.asList("c5c24a82-6845-4031-9d5d-978df9175426"), "your_large_person_group_id", 9, 0.7D); - // END:com.azure.ai.vision.face.generated.identifyfromlargepersongroup.identifyfromlargepersongroup - } -} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/TrainLargeFaceList.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/TrainLargeFaceList.java deleted file mode 100644 index 779b670e337c..000000000000 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/TrainLargeFaceList.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; -import com.azure.ai.vision.face.administration.LargeFaceListClient; -import com.azure.ai.vision.face.models.FaceTrainingResult; -import com.azure.core.util.Configuration; -import com.azure.core.util.polling.SyncPoller; -import com.azure.identity.DefaultAzureCredentialBuilder; - -public class TrainLargeFaceList { - public static void main(String[] args) { - LargeFaceListClient largeFaceListClient - = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) - .largeFaceListId("your_large_face_list_id") - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) - .largePersonGroupId(Configuration.getGlobalConfiguration().get("LARGEPERSONGROUPID")) - .buildLargeFaceListClient(); - // BEGIN:com.azure.ai.vision.face.generated.largefacelisttrain.trainlargefacelist - SyncPoller response = largeFaceListClient.beginTrain(); - // END:com.azure.ai.vision.face.generated.largefacelisttrain.trainlargefacelist - } -} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/TrainLargePersonGroup.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/TrainLargePersonGroup.java deleted file mode 100644 index f44f7742735a..000000000000 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/TrainLargePersonGroup.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; -import com.azure.ai.vision.face.administration.LargePersonGroupClient; -import com.azure.ai.vision.face.models.FaceTrainingResult; -import com.azure.core.util.Configuration; -import com.azure.core.util.polling.SyncPoller; -import com.azure.identity.DefaultAzureCredentialBuilder; - -public class TrainLargePersonGroup { - public static void main(String[] args) { - LargePersonGroupClient largePersonGroupClient - = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) - .largePersonGroupId("your_large_person_group_id") - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) - .largeFaceListId(Configuration.getGlobalConfiguration().get("LARGEFACELISTID")) - .buildLargePersonGroupClient(); - // BEGIN:com.azure.ai.vision.face.generated.largepersongrouptrain.trainlargepersongroup - SyncPoller response = largePersonGroupClient.beginTrain(); - // END:com.azure.ai.vision.face.generated.largepersongrouptrain.trainlargepersongroup - } -} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/UpdateFaceInLargeFaceList.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/UpdateFaceInLargeFaceList.java deleted file mode 100644 index 0ff4e672c67b..000000000000 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/UpdateFaceInLargeFaceList.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; -import com.azure.ai.vision.face.administration.LargeFaceListClient; -import com.azure.core.util.Configuration; -import com.azure.identity.DefaultAzureCredentialBuilder; - -public class UpdateFaceInLargeFaceList { - public static void main(String[] args) { - LargeFaceListClient largeFaceListClient - = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) - .largeFaceListId("your_large_face_list_id") - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) - .largePersonGroupId(Configuration.getGlobalConfiguration().get("LARGEPERSONGROUPID")) - .buildLargeFaceListClient(); - // BEGIN:com.azure.ai.vision.face.generated.largefacelistupdateface.updatefaceinlargefacelist - largeFaceListClient.updateFace("43897a75-8d6f-42cf-885e-74832febb055", "your_user_data"); - // END:com.azure.ai.vision.face.generated.largefacelistupdateface.updatefaceinlargefacelist - } -} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/UpdateFaceInLargePersonGroupPerson.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/UpdateFaceInLargePersonGroupPerson.java deleted file mode 100644 index 3b103d60ff87..000000000000 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/UpdateFaceInLargePersonGroupPerson.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; -import com.azure.ai.vision.face.administration.LargePersonGroupClient; -import com.azure.core.util.Configuration; -import com.azure.identity.DefaultAzureCredentialBuilder; - -public class UpdateFaceInLargePersonGroupPerson { - public static void main(String[] args) { - LargePersonGroupClient largePersonGroupClient - = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) - .largePersonGroupId("your_large_person_group_id") - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) - .largeFaceListId(Configuration.getGlobalConfiguration().get("LARGEFACELISTID")) - .buildLargePersonGroupClient(); - // BEGIN:com.azure.ai.vision.face.generated.largepersongroupupdateface.updatefaceinlargepersongroupperson - largePersonGroupClient.updateFace("25985303-c537-4467-b41d-bdb45cd95ca1", - "43897a75-8d6f-42cf-885e-74832febb055", "your_user_data"); - // END:com.azure.ai.vision.face.generated.largepersongroupupdateface.updatefaceinlargepersongroupperson - } -} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/UpdateLargeFaceList.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/UpdateLargeFaceList.java deleted file mode 100644 index f618d778d293..000000000000 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/UpdateLargeFaceList.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; -import com.azure.ai.vision.face.administration.LargeFaceListClient; -import com.azure.core.util.Configuration; -import com.azure.identity.DefaultAzureCredentialBuilder; - -public class UpdateLargeFaceList { - public static void main(String[] args) { - LargeFaceListClient largeFaceListClient - = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) - .largeFaceListId("your_large_face_list_id") - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) - .largePersonGroupId(Configuration.getGlobalConfiguration().get("LARGEPERSONGROUPID")) - .buildLargeFaceListClient(); - // BEGIN:com.azure.ai.vision.face.generated.largefacelistupdate.updatelargefacelist - largeFaceListClient.update("your_large_face_list_name", "your_user_data"); - // END:com.azure.ai.vision.face.generated.largefacelistupdate.updatelargefacelist - } -} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/UpdateLargePersonGroup.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/UpdateLargePersonGroup.java deleted file mode 100644 index 2e648a56c4e4..000000000000 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/UpdateLargePersonGroup.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; -import com.azure.ai.vision.face.administration.LargePersonGroupClient; -import com.azure.core.util.Configuration; -import com.azure.identity.DefaultAzureCredentialBuilder; - -public class UpdateLargePersonGroup { - public static void main(String[] args) { - LargePersonGroupClient largePersonGroupClient - = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) - .largePersonGroupId("your_large_person_group_id") - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) - .largeFaceListId(Configuration.getGlobalConfiguration().get("LARGEFACELISTID")) - .buildLargePersonGroupClient(); - // BEGIN:com.azure.ai.vision.face.generated.largepersongroupupdate.updatelargepersongroup - largePersonGroupClient.update("your_large_person_group_name", "your_user_data"); - // END:com.azure.ai.vision.face.generated.largepersongroupupdate.updatelargepersongroup - } -} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/UpdatePersonInLargePersonGroup.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/UpdatePersonInLargePersonGroup.java deleted file mode 100644 index 4efe3bd3c0ad..000000000000 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/UpdatePersonInLargePersonGroup.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; -import com.azure.ai.vision.face.administration.LargePersonGroupClient; -import com.azure.core.util.Configuration; -import com.azure.identity.DefaultAzureCredentialBuilder; - -public class UpdatePersonInLargePersonGroup { - public static void main(String[] args) { - LargePersonGroupClient largePersonGroupClient - = new FaceAdministrationClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) - .largePersonGroupId("your_large_person_group_id") - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) - .largeFaceListId(Configuration.getGlobalConfiguration().get("LARGEFACELISTID")) - .buildLargePersonGroupClient(); - // BEGIN:com.azure.ai.vision.face.generated.largepersongroupupdateperson.updatepersoninlargepersongroup - largePersonGroupClient.updatePerson("25985303-c537-4467-b41d-bdb45cd95ca1", - "your_large_person_group_person_name", "your_user_data"); - // END:com.azure.ai.vision.face.generated.largepersongroupupdateperson.updatepersoninlargepersongroup - } -} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/VerifyFaceToFace.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/VerifyFaceToFace.java deleted file mode 100644 index 82775c00569b..000000000000 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/VerifyFaceToFace.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.FaceClient; -import com.azure.ai.vision.face.FaceClientBuilder; -import com.azure.ai.vision.face.models.FaceVerificationResult; -import com.azure.core.util.Configuration; -import com.azure.identity.DefaultAzureCredentialBuilder; - -public class VerifyFaceToFace { - public static void main(String[] args) { - FaceClient faceClient = new FaceClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) - .buildClient(); - // BEGIN:com.azure.ai.vision.face.generated.verifyfacetoface.verifyfacetoface - FaceVerificationResult response = faceClient.verifyFaceToFace("c5c24a82-6845-4031-9d5d-978df9175426", - "3aa87e30-b380-48eb-ad9e-1aa54fc52bd3"); - // END:com.azure.ai.vision.face.generated.verifyfacetoface.verifyfacetoface - } -} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/VerifyFromLargePersonGroup.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/VerifyFromLargePersonGroup.java deleted file mode 100644 index 781298050c30..000000000000 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/generated/VerifyFromLargePersonGroup.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.FaceClient; -import com.azure.ai.vision.face.FaceClientBuilder; -import com.azure.ai.vision.face.models.FaceVerificationResult; -import com.azure.core.util.Configuration; -import com.azure.identity.DefaultAzureCredentialBuilder; - -public class VerifyFromLargePersonGroup { - public static void main(String[] args) { - FaceClient faceClient = new FaceClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) - .buildClient(); - // BEGIN:com.azure.ai.vision.face.generated.verifyfromlargepersongroup.verifyfromlargepersongroup - FaceVerificationResult response = faceClient.verifyFromLargePersonGroup("c5c24a82-6845-4031-9d5d-978df9175426", - "your_large_person_group", "815df99c-598f-4926-930a-a734b3fd651c"); - // END:com.azure.ai.vision.face.generated.verifyfromlargepersongroup.verifyfromlargepersongroup - } -} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/CreateLargeFaceListTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/CreateLargeFaceListTests.java deleted file mode 100644 index bd4c4f9adfe1..000000000000 --- a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/CreateLargeFaceListTests.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.models.FaceRecognitionModel; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -@Disabled -public final class CreateLargeFaceListTests extends FaceAdministrationClientTestBase { - @Test - @Disabled - public void testCreateLargeFaceListTests() { - // method invocation - largeFaceListClient.create("your_large_face_list_name", "your_user_data", FaceRecognitionModel.RECOGNITION_01); - } -} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/CreateLargePersonGroupTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/CreateLargePersonGroupTests.java deleted file mode 100644 index b9954668e4c1..000000000000 --- a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/CreateLargePersonGroupTests.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.models.FaceRecognitionModel; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -@Disabled -public final class CreateLargePersonGroupTests extends FaceAdministrationClientTestBase { - @Test - @Disabled - public void testCreateLargePersonGroupTests() { - // method invocation - largePersonGroupClient.create("your_large_person_group_name", "your_user_data", - FaceRecognitionModel.RECOGNITION_01); - } -} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/CreateLivenessSessionTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/CreateLivenessSessionTests.java deleted file mode 100644 index 04e8827fb05f..000000000000 --- a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/CreateLivenessSessionTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.models.CreateLivenessSessionContent; -import com.azure.ai.vision.face.models.CreateLivenessSessionResult; -import com.azure.ai.vision.face.models.LivenessOperationMode; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -@Disabled -public final class CreateLivenessSessionTests extends FaceAdministrationClientTestBase { - @Test - @Disabled - public void testCreateLivenessSessionTests() { - // method invocation - CreateLivenessSessionResult response = faceSessionClient.createLivenessSession( - new CreateLivenessSessionContent(LivenessOperationMode.PASSIVE).setSendResultsToClient(true) - .setDeviceCorrelationIdSetInClient(true) - .setDeviceCorrelationId("your_device_correlation_id") - .setAuthTokenTimeToLiveInSeconds(60)); - - // response assertion - Assertions.assertNotNull(response); - // verify property "sessionId" - Assertions.assertEquals("b12e033e-bda7-4b83-a211-e721c661f30e", response.getSessionId()); - // verify property "authToken" - Assertions.assertEquals("eyJhbGciOiJFUzI1NiIsIm", response.getAuthToken()); - } -} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/CreatePersonInLargePersonGroupTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/CreatePersonInLargePersonGroupTests.java deleted file mode 100644 index 1812cdbc2065..000000000000 --- a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/CreatePersonInLargePersonGroupTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.models.CreatePersonResult; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -@Disabled -public final class CreatePersonInLargePersonGroupTests extends FaceAdministrationClientTestBase { - @Test - @Disabled - public void testCreatePersonInLargePersonGroupTests() { - // method invocation - CreatePersonResult response - = largePersonGroupClient.createPerson("your_large_person_group_person_name", "your_user_data"); - - // response assertion - Assertions.assertNotNull(response); - // verify property "personId" - Assertions.assertEquals("25985303-c537-4467-b41d-bdb45cd95ca1", response.getPersonId()); - } -} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteFaceFromLargeFaceListTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteFaceFromLargeFaceListTests.java deleted file mode 100644 index c7f0aed30a2b..000000000000 --- a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteFaceFromLargeFaceListTests.java +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -@Disabled -public final class DeleteFaceFromLargeFaceListTests extends FaceAdministrationClientTestBase { - @Test - @Disabled - public void testDeleteFaceFromLargeFaceListTests() { - // method invocation - largeFaceListClient.deleteFace("43897a75-8d6f-42cf-885e-74832febb055"); - } -} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteFaceFromLargePersonGroupPersonTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteFaceFromLargePersonGroupPersonTests.java deleted file mode 100644 index 97fac88808da..000000000000 --- a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteFaceFromLargePersonGroupPersonTests.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -@Disabled -public final class DeleteFaceFromLargePersonGroupPersonTests extends FaceAdministrationClientTestBase { - @Test - @Disabled - public void testDeleteFaceFromLargePersonGroupPersonTests() { - // method invocation - largePersonGroupClient.deleteFace("25985303-c537-4467-b41d-bdb45cd95ca1", - "43897a75-8d6f-42cf-885e-74832febb055"); - } -} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteLargeFaceListTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteLargeFaceListTests.java deleted file mode 100644 index 8af5d89029c1..000000000000 --- a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteLargeFaceListTests.java +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -@Disabled -public final class DeleteLargeFaceListTests extends FaceAdministrationClientTestBase { - @Test - @Disabled - public void testDeleteLargeFaceListTests() { - // method invocation - largeFaceListClient.delete(); - } -} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteLargePersonGroupTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteLargePersonGroupTests.java deleted file mode 100644 index ef3dc1c66ced..000000000000 --- a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteLargePersonGroupTests.java +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -@Disabled -public final class DeleteLargePersonGroupTests extends FaceAdministrationClientTestBase { - @Test - @Disabled - public void testDeleteLargePersonGroupTests() { - // method invocation - largePersonGroupClient.delete(); - } -} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteLivenessSessionTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteLivenessSessionTests.java deleted file mode 100644 index abc397b45dc9..000000000000 --- a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteLivenessSessionTests.java +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -@Disabled -public final class DeleteLivenessSessionTests extends FaceAdministrationClientTestBase { - @Test - @Disabled - public void testDeleteLivenessSessionTests() { - // method invocation - faceSessionClient.deleteLivenessSession("b12e033e-bda7-4b83-a211-e721c661f30e"); - } -} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteLivenessWithVerifySessionTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteLivenessWithVerifySessionTests.java deleted file mode 100644 index 17057c80fc54..000000000000 --- a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeleteLivenessWithVerifySessionTests.java +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -@Disabled -public final class DeleteLivenessWithVerifySessionTests extends FaceAdministrationClientTestBase { - @Test - @Disabled - public void testDeleteLivenessWithVerifySessionTests() { - // method invocation - faceSessionClient.deleteLivenessWithVerifySession("b12e033e-bda7-4b83-a211-e721c661f30e"); - } -} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeletePersonFromLargePersonGroupTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeletePersonFromLargePersonGroupTests.java deleted file mode 100644 index 74cb7ec9fae5..000000000000 --- a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DeletePersonFromLargePersonGroupTests.java +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -@Disabled -public final class DeletePersonFromLargePersonGroupTests extends FaceAdministrationClientTestBase { - @Test - @Disabled - public void testDeletePersonFromLargePersonGroupTests() { - // method invocation - largePersonGroupClient.deletePerson("25985303-c537-4467-b41d-bdb45cd95ca1"); - } -} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DetectFromSessionImageIdTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DetectFromSessionImageIdTests.java deleted file mode 100644 index 139ce03a58b6..000000000000 --- a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/DetectFromSessionImageIdTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.models.DetectFromSessionImageOptions; -import com.azure.ai.vision.face.models.FaceDetectionModel; -import com.azure.ai.vision.face.models.FaceDetectionResult; -import com.azure.ai.vision.face.models.FaceRecognitionModel; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -@Disabled -public final class DetectFromSessionImageIdTests extends FaceAdministrationClientTestBase { - @Test - @Disabled - public void testDetectFromSessionImageIdTests() { - // method invocation - List response = faceSessionClient - .detectFromSessionImage(new DetectFromSessionImageOptions("aa93ce80-9a9b-48bd-ae1a-1c7543841e92") - .setDetectionModel(FaceDetectionModel.DETECTION_01) - .setRecognitionModel(FaceRecognitionModel.RECOGNITION_03) - .setReturnFaceId(true) - .setReturnFaceAttributes(Arrays.asList()) - .setReturnFaceLandmarks(true) - .setReturnRecognitionModel(true) - .setFaceIdTimeToLive(60)); - } -} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/FaceAdministrationClientTestBase.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/FaceAdministrationClientTestBase.java deleted file mode 100644 index ae044972d10d..000000000000 --- a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/FaceAdministrationClientTestBase.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -// The Java test files under 'generated' package are generated for your reference. -// If you wish to modify these files, please copy them out of the 'generated' package, and modify there. -// See https://aka.ms/azsdk/dpg/java/tests for guide on adding a test. - -import com.azure.ai.vision.face.FaceClient; -import com.azure.ai.vision.face.FaceClientBuilder; -import com.azure.ai.vision.face.FaceSessionClient; -import com.azure.ai.vision.face.FaceSessionClientBuilder; -import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; -import com.azure.ai.vision.face.administration.LargeFaceListClient; -import com.azure.ai.vision.face.administration.LargePersonGroupClient; -import com.azure.core.http.policy.HttpLogDetailLevel; -import com.azure.core.http.policy.HttpLogOptions; -import com.azure.core.test.TestMode; -import com.azure.core.test.TestProxyTestBase; -import com.azure.core.test.utils.MockTokenCredential; -import com.azure.core.util.Configuration; -import com.azure.identity.DefaultAzureCredentialBuilder; - -class FaceAdministrationClientTestBase extends TestProxyTestBase { - protected LargeFaceListClient largeFaceListClient; - - protected LargePersonGroupClient largePersonGroupClient; - - protected FaceClient faceClient; - - protected FaceSessionClient faceSessionClient; - - @Override - protected void beforeTest() { - FaceAdministrationClientBuilder largeFaceListClientbuilder = new FaceAdministrationClientBuilder() - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint")) - .largeFaceListId(Configuration.getGlobalConfiguration().get("LARGEFACELISTID", "largefacelistid")) - .largePersonGroupId(Configuration.getGlobalConfiguration().get("LARGEPERSONGROUPID", "largepersongroupid")) - .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) - .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); - if (getTestMode() == TestMode.PLAYBACK) { - largeFaceListClientbuilder.credential(new MockTokenCredential()); - } else if (getTestMode() == TestMode.RECORD) { - largeFaceListClientbuilder.addPolicy(interceptorManager.getRecordPolicy()) - .credential(new DefaultAzureCredentialBuilder().build()); - } else if (getTestMode() == TestMode.LIVE) { - largeFaceListClientbuilder.credential(new DefaultAzureCredentialBuilder().build()); - } - largeFaceListClient = largeFaceListClientbuilder.buildLargeFaceListClient(); - - FaceAdministrationClientBuilder largePersonGroupClientbuilder = new FaceAdministrationClientBuilder() - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint")) - .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) - .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); - if (getTestMode() == TestMode.PLAYBACK) { - largePersonGroupClientbuilder.credential(new MockTokenCredential()); - } else if (getTestMode() == TestMode.RECORD) { - largePersonGroupClientbuilder.addPolicy(interceptorManager.getRecordPolicy()) - .credential(new DefaultAzureCredentialBuilder().build()); - } else if (getTestMode() == TestMode.LIVE) { - largePersonGroupClientbuilder.credential(new DefaultAzureCredentialBuilder().build()); - } - largePersonGroupClient = largePersonGroupClientbuilder.buildLargePersonGroupClient(); - - FaceClientBuilder faceClientbuilder - = new FaceClientBuilder().endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint")) - .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) - .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); - if (getTestMode() == TestMode.PLAYBACK) { - faceClientbuilder.credential(new MockTokenCredential()); - } else if (getTestMode() == TestMode.RECORD) { - faceClientbuilder.addPolicy(interceptorManager.getRecordPolicy()) - .credential(new DefaultAzureCredentialBuilder().build()); - } else if (getTestMode() == TestMode.LIVE) { - faceClientbuilder.credential(new DefaultAzureCredentialBuilder().build()); - } - faceClient = faceClientbuilder.buildClient(); - - FaceSessionClientBuilder faceSessionClientbuilder = new FaceSessionClientBuilder() - .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint")) - .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) - .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); - if (getTestMode() == TestMode.PLAYBACK) { - faceSessionClientbuilder.credential(new MockTokenCredential()); - } else if (getTestMode() == TestMode.RECORD) { - faceSessionClientbuilder.addPolicy(interceptorManager.getRecordPolicy()) - .credential(new DefaultAzureCredentialBuilder().build()); - } else if (getTestMode() == TestMode.LIVE) { - faceSessionClientbuilder.credential(new DefaultAzureCredentialBuilder().build()); - } - faceSessionClient = faceSessionClientbuilder.buildClient(); - - } -} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/FindSimilarAmongFaceIDsTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/FindSimilarAmongFaceIDsTests.java deleted file mode 100644 index 248aed49e84c..000000000000 --- a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/FindSimilarAmongFaceIDsTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.models.FaceFindSimilarResult; -import com.azure.ai.vision.face.models.FindSimilarMatchMode; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -@Disabled -public final class FindSimilarAmongFaceIDsTests extends FaceAdministrationClientTestBase { - @Test - @Disabled - public void testFindSimilarAmongFaceIDsTests() { - // method invocation - List response = faceClient.findSimilar("c5c24a82-6845-4031-9d5d-978df9175426", - Arrays.asList("015839fb-fbd9-4f79-ace9-7675fc2f1dd9", "be386ab3-af91-4104-9e6d-4dae4c9fddb7"), 3, - FindSimilarMatchMode.MATCH_PERSON); - } -} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/FindSimilarFromLargeFaceListTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/FindSimilarFromLargeFaceListTests.java deleted file mode 100644 index c40409f77c60..000000000000 --- a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/FindSimilarFromLargeFaceListTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.models.FaceFindSimilarResult; -import com.azure.ai.vision.face.models.FindSimilarMatchMode; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -@Disabled -public final class FindSimilarFromLargeFaceListTests extends FaceAdministrationClientTestBase { - @Test - @Disabled - public void testFindSimilarFromLargeFaceListTests() { - // method invocation - List response = faceClient.findSimilarFromLargeFaceList( - "c5c24a82-6845-4031-9d5d-978df9175426", "your_large_face_list_id", 3, FindSimilarMatchMode.MATCH_PERSON); - } -} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetFaceFromLargeFaceListTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetFaceFromLargeFaceListTests.java deleted file mode 100644 index 67e8b5f972ce..000000000000 --- a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetFaceFromLargeFaceListTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.models.LargeFaceListFace; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -@Disabled -public final class GetFaceFromLargeFaceListTests extends FaceAdministrationClientTestBase { - @Test - @Disabled - public void testGetFaceFromLargeFaceListTests() { - // method invocation - LargeFaceListFace response = largeFaceListClient.getFace("43897a75-8d6f-42cf-885e-74832febb055"); - - // response assertion - Assertions.assertNotNull(response); - // verify property "persistedFaceId" - Assertions.assertEquals("43897a75-8d6f-42cf-885e-74832febb055", response.getPersistedFaceId()); - // verify property "userData" - Assertions.assertEquals("your_user_data", response.getUserData()); - } -} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetFaceFromLargePersonGroupPersonTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetFaceFromLargePersonGroupPersonTests.java deleted file mode 100644 index a791d6833888..000000000000 --- a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetFaceFromLargePersonGroupPersonTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.models.LargePersonGroupPersonFace; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -@Disabled -public final class GetFaceFromLargePersonGroupPersonTests extends FaceAdministrationClientTestBase { - @Test - @Disabled - public void testGetFaceFromLargePersonGroupPersonTests() { - // method invocation - LargePersonGroupPersonFace response = largePersonGroupClient.getFace("25985303-c537-4467-b41d-bdb45cd95ca1", - "43897a75-8d6f-42cf-885e-74832febb055"); - - // response assertion - Assertions.assertNotNull(response); - // verify property "persistedFaceId" - Assertions.assertEquals("43897a75-8d6f-42cf-885e-74832febb055", response.getPersistedFaceId()); - // verify property "userData" - Assertions.assertEquals("your_user_data", response.getUserData()); - } -} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetFacesFromLargeFaceListTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetFacesFromLargeFaceListTests.java deleted file mode 100644 index 0ebb4cd0b53b..000000000000 --- a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetFacesFromLargeFaceListTests.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.models.LargeFaceListFace; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -@Disabled -public final class GetFacesFromLargeFaceListTests extends FaceAdministrationClientTestBase { - @Test - @Disabled - public void testGetFacesFromLargeFaceListTests() { - // method invocation - List response = largeFaceListClient.getFaces("00000000-0000-0000-0000-000000000000", 20); - } -} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLargeFaceListTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLargeFaceListTests.java deleted file mode 100644 index 0bbf11372ca2..000000000000 --- a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLargeFaceListTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.models.FaceRecognitionModel; -import com.azure.ai.vision.face.models.LargeFaceList; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -@Disabled -public final class GetLargeFaceListTests extends FaceAdministrationClientTestBase { - @Test - @Disabled - public void testGetLargeFaceListTests() { - // method invocation - LargeFaceList response = largeFaceListClient.get(true); - - // response assertion - Assertions.assertNotNull(response); - // verify property "name" - Assertions.assertEquals("your_large_face_list_name", response.getName()); - // verify property "userData" - Assertions.assertEquals("your_user_data", response.getUserData()); - // verify property "recognitionModel" - Assertions.assertEquals(FaceRecognitionModel.RECOGNITION_01, response.getRecognitionModel()); - // verify property "largeFaceListId" - Assertions.assertEquals("your_large_face_list_id", response.getLargeFaceListId()); - } -} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLargeFaceListsTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLargeFaceListsTests.java deleted file mode 100644 index c12107f23d3a..000000000000 --- a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLargeFaceListsTests.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.models.LargeFaceList; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -@Disabled -public final class GetLargeFaceListsTests extends FaceAdministrationClientTestBase { - @Test - @Disabled - public void testGetLargeFaceListsTests() { - // method invocation - List response = largeFaceListClient.getLargeFaceLists("my_list_id", 20, true); - } -} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLargePersonGroupTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLargePersonGroupTests.java deleted file mode 100644 index 847a8033179d..000000000000 --- a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLargePersonGroupTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.models.FaceRecognitionModel; -import com.azure.ai.vision.face.models.LargePersonGroup; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -@Disabled -public final class GetLargePersonGroupTests extends FaceAdministrationClientTestBase { - @Test - @Disabled - public void testGetLargePersonGroupTests() { - // method invocation - LargePersonGroup response = largePersonGroupClient.get(true); - - // response assertion - Assertions.assertNotNull(response); - // verify property "name" - Assertions.assertEquals("your_large_person_group_name", response.getName()); - // verify property "userData" - Assertions.assertEquals("your_user_data", response.getUserData()); - // verify property "recognitionModel" - Assertions.assertEquals(FaceRecognitionModel.RECOGNITION_01, response.getRecognitionModel()); - // verify property "largePersonGroupId" - Assertions.assertEquals("your_large_person_group_id", response.getLargePersonGroupId()); - } -} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLargePersonGroupsTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLargePersonGroupsTests.java deleted file mode 100644 index e36bb1af1db8..000000000000 --- a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLargePersonGroupsTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.models.LargePersonGroup; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -@Disabled -public final class GetLargePersonGroupsTests extends FaceAdministrationClientTestBase { - @Test - @Disabled - public void testGetLargePersonGroupsTests() { - // method invocation - List response - = largePersonGroupClient.getLargePersonGroups("00000000-0000-0000-0000-000000000000", 20, true); - } -} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessSessionAuditEntriesTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessSessionAuditEntriesTests.java deleted file mode 100644 index 04b286206cfb..000000000000 --- a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessSessionAuditEntriesTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.models.LivenessSessionAuditEntry; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -@Disabled -public final class GetLivenessSessionAuditEntriesTests extends FaceAdministrationClientTestBase { - @Test - @Disabled - public void testGetLivenessSessionAuditEntriesTests() { - // method invocation - List response - = faceSessionClient.getLivenessSessionAuditEntries("b12e033e-bda7-4b83-a211-e721c661f30e", "0", 20); - } -} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessSessionResultTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessSessionResultTests.java deleted file mode 100644 index aa61ec1b292a..000000000000 --- a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessSessionResultTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.models.AuditLivenessResponseInfo; -import com.azure.ai.vision.face.models.AuditRequestInfo; -import com.azure.ai.vision.face.models.FaceSessionStatus; -import com.azure.ai.vision.face.models.LivenessResponseBody; -import com.azure.ai.vision.face.models.LivenessSession; -import com.azure.ai.vision.face.models.LivenessSessionAuditEntry; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -@Disabled -public final class GetLivenessSessionResultTests extends FaceAdministrationClientTestBase { - @Test - @Disabled - public void testGetLivenessSessionResultTests() { - // method invocation - LivenessSession response = faceSessionClient.getLivenessSessionResult("b12e033e-bda7-4b83-a211-e721c661f30e"); - - // response assertion - Assertions.assertNotNull(response); - // verify property "id" - Assertions.assertEquals("b12e033e-bda7-4b83-a211-e721c661f30e", response.getId()); - // verify property "createdDateTime" - Assertions.assertNotNull(response.getCreatedDateTime()); - // verify property "sessionStartDateTime" - Assertions.assertNotNull(response.getSessionStartDateTime()); - // verify property "sessionExpired" - Assertions.assertEquals(true, response.isSessionExpired()); - // verify property "deviceCorrelationId" - Assertions.assertEquals("your_device_correlation_id", response.getDeviceCorrelationId()); - // verify property "authTokenTimeToLiveInSeconds" - Assertions.assertEquals(600, response.getAuthTokenTimeToLiveInSeconds()); - // verify property "status" - Assertions.assertEquals(FaceSessionStatus.NOT_STARTED, response.getStatus()); - // verify property "result" - LivenessSessionAuditEntry responseResult = response.getResult(); - Assertions.assertNotNull(responseResult); - Assertions.assertEquals(4L, responseResult.getId()); - Assertions.assertEquals("b12e033e-bda7-4b83-a211-e721c661f30e", responseResult.getSessionId()); - Assertions.assertEquals("4af681e9-0e25-43e9-9922-a7adebf13b2f", responseResult.getRequestId()); - Assertions.assertEquals("4af681e9-0e25-43e9-9922-a7adebf13b2f", responseResult.getClientRequestId()); - Assertions.assertNotNull(responseResult.getReceivedDateTime()); - AuditRequestInfo responseResultRequest = responseResult.getRequest(); - Assertions.assertNotNull(responseResultRequest); - Assertions.assertEquals("/face/v1.2-preview.1/detectliveness/singlemodal", responseResultRequest.getUrl()); - Assertions.assertEquals("POST", responseResultRequest.getMethod()); - Assertions.assertEquals(18L, responseResultRequest.getContentLength()); - Assertions.assertEquals("multipart/form-data", responseResultRequest.getContentType()); - Assertions.assertEquals( - "Mozilla/5.0 (Linux) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Mobile Safari/537.36", - responseResultRequest.getUserAgent()); - AuditLivenessResponseInfo responseResultResponse = responseResult.getResponse(); - Assertions.assertNotNull(responseResultResponse); - LivenessResponseBody responseResultResponseBody = responseResultResponse.getBody(); - Assertions.assertNotNull(responseResultResponseBody); - Assertions.assertEquals(200, responseResultResponse.getStatusCode()); - Assertions.assertEquals(1200L, responseResultResponse.getLatencyInMilliseconds()); - Assertions.assertEquals("1CC98BA83EAF1D0FF7F566FAEFCCCC787819FFA01251E2D9299143F7AD6651DB", - responseResult.getDigest()); - } -} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessSessionsTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessSessionsTests.java deleted file mode 100644 index 71beaeac0320..000000000000 --- a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessSessionsTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.models.LivenessSessionItem; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -@Disabled -public final class GetLivenessSessionsTests extends FaceAdministrationClientTestBase { - @Test - @Disabled - public void testGetLivenessSessionsTests() { - // method invocation - List response - = faceSessionClient.getLivenessSessions("00000000-0000-0000-0000-000000000000", 20); - } -} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessionAuditEntriesTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessionAuditEntriesTests.java deleted file mode 100644 index fd84b9e4841a..000000000000 --- a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessionAuditEntriesTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.models.LivenessSessionAuditEntry; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -@Disabled -public final class GetLivenessWithVerifySessionAuditEntriesTests extends FaceAdministrationClientTestBase { - @Test - @Disabled - public void testGetLivenessWithVerifySessionAuditEntriesTests() { - // method invocation - List response = faceSessionClient - .getLivenessWithVerifySessionAuditEntries("b12e033e-bda7-4b83-a211-e721c661f30e", "0", 20); - } -} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessionResultTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessionResultTests.java deleted file mode 100644 index e443c4844cac..000000000000 --- a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessionResultTests.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.models.AuditLivenessResponseInfo; -import com.azure.ai.vision.face.models.AuditRequestInfo; -import com.azure.ai.vision.face.models.FaceSessionStatus; -import com.azure.ai.vision.face.models.LivenessResponseBody; -import com.azure.ai.vision.face.models.LivenessSessionAuditEntry; -import com.azure.ai.vision.face.models.LivenessWithVerifySession; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -@Disabled -public final class GetLivenessWithVerifySessionResultTests extends FaceAdministrationClientTestBase { - @Test - @Disabled - public void testGetLivenessWithVerifySessionResultTests() { - // method invocation - LivenessWithVerifySession response - = faceSessionClient.getLivenessWithVerifySessionResult("b12e033e-bda7-4b83-a211-e721c661f30e"); - - // response assertion - Assertions.assertNotNull(response); - // verify property "id" - Assertions.assertEquals("b12e033e-bda7-4b83-a211-e721c661f30e", response.getId()); - // verify property "createdDateTime" - Assertions.assertNotNull(response.getCreatedDateTime()); - // verify property "sessionStartDateTime" - Assertions.assertNotNull(response.getSessionStartDateTime()); - // verify property "sessionExpired" - Assertions.assertEquals(true, response.isSessionExpired()); - // verify property "deviceCorrelationId" - Assertions.assertEquals("your_device_correlation_id", response.getDeviceCorrelationId()); - // verify property "authTokenTimeToLiveInSeconds" - Assertions.assertEquals(600, response.getAuthTokenTimeToLiveInSeconds()); - // verify property "status" - Assertions.assertEquals(FaceSessionStatus.NOT_STARTED, response.getStatus()); - // verify property "result" - LivenessSessionAuditEntry responseResult = response.getResult(); - Assertions.assertNotNull(responseResult); - Assertions.assertEquals(4L, responseResult.getId()); - Assertions.assertEquals("b12e033e-bda7-4b83-a211-e721c661f30e", responseResult.getSessionId()); - Assertions.assertEquals("4af681e9-0e25-43e9-9922-a7adebf13b2f", responseResult.getRequestId()); - Assertions.assertEquals("4af681e9-0e25-43e9-9922-a7adebf13b2f", responseResult.getClientRequestId()); - Assertions.assertNotNull(responseResult.getReceivedDateTime()); - AuditRequestInfo responseResultRequest = responseResult.getRequest(); - Assertions.assertNotNull(responseResultRequest); - Assertions.assertEquals("/face/v1.2-preview.1/detectliveness/singlemodal", responseResultRequest.getUrl()); - Assertions.assertEquals("POST", responseResultRequest.getMethod()); - Assertions.assertEquals(18L, responseResultRequest.getContentLength()); - Assertions.assertEquals("multipart/form-data", responseResultRequest.getContentType()); - Assertions.assertEquals( - "Mozilla/5.0 (Linux) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Mobile Safari/537.36", - responseResultRequest.getUserAgent()); - AuditLivenessResponseInfo responseResultResponse = responseResult.getResponse(); - Assertions.assertNotNull(responseResultResponse); - LivenessResponseBody responseResultResponseBody = responseResultResponse.getBody(); - Assertions.assertNotNull(responseResultResponseBody); - Assertions.assertEquals(200, responseResultResponse.getStatusCode()); - Assertions.assertEquals(1200L, responseResultResponse.getLatencyInMilliseconds()); - Assertions.assertEquals("1CC98BA83EAF1D0FF7F566FAEFCCCC787819FFA01251E2D9299143F7AD6651DB", - responseResult.getDigest()); - } -} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessionsTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessionsTests.java deleted file mode 100644 index 6325a3af4958..000000000000 --- a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetLivenessWithVerifySessionsTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.models.LivenessSessionItem; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -@Disabled -public final class GetLivenessWithVerifySessionsTests extends FaceAdministrationClientTestBase { - @Test - @Disabled - public void testGetLivenessWithVerifySessionsTests() { - // method invocation - List response - = faceSessionClient.getLivenessWithVerifySessions("00000000-0000-0000-0000-000000000000", 20); - } -} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetPersonFromLargePersonGroupTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetPersonFromLargePersonGroupTests.java deleted file mode 100644 index 71b1816e9f1a..000000000000 --- a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetPersonFromLargePersonGroupTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.models.LargePersonGroupPerson; -import java.util.List; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -@Disabled -public final class GetPersonFromLargePersonGroupTests extends FaceAdministrationClientTestBase { - @Test - @Disabled - public void testGetPersonFromLargePersonGroupTests() { - // method invocation - LargePersonGroupPerson response = largePersonGroupClient.getPerson("25985303-c537-4467-b41d-bdb45cd95ca1"); - - // response assertion - Assertions.assertNotNull(response); - // verify property "personId" - Assertions.assertEquals("25985303-c537-4467-b41d-bdb45cd95ca1", response.getPersonId()); - // verify property "name" - Assertions.assertEquals("your_large_person_group_person_name", response.getName()); - // verify property "userData" - Assertions.assertEquals("your_user_data", response.getUserData()); - // verify property "persistedFaceIds" - List responsePersistedFaceIds = response.getPersistedFaceIds(); - Assertions.assertEquals("43897a75-8d6f-42cf-885e-74832febb055", responsePersistedFaceIds.iterator().next()); - } -} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetPersonsFromLargePersonGroupTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetPersonsFromLargePersonGroupTests.java deleted file mode 100644 index fb93fa187db6..000000000000 --- a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetPersonsFromLargePersonGroupTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.models.LargePersonGroupPerson; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -@Disabled -public final class GetPersonsFromLargePersonGroupTests extends FaceAdministrationClientTestBase { - @Test - @Disabled - public void testGetPersonsFromLargePersonGroupTests() { - // method invocation - List response - = largePersonGroupClient.getPersons("00000000-0000-0000-0000-000000000000", 20); - } -} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetSessionImageTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetSessionImageTests.java deleted file mode 100644 index a1b28045f61b..000000000000 --- a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetSessionImageTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.core.util.BinaryData; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -@Disabled -public final class GetSessionImageTests extends FaceAdministrationClientTestBase { - @Test - @Disabled - public void testGetSessionImageTests() { - // method invocation - BinaryData response = faceSessionClient.getSessionImage("3d035d35-2e01-4ed4-8935-577afde9caaa"); - - // response assertion - Assertions.assertNotNull(response); - } -} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetTrainingStatusOfLargeFaceListTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetTrainingStatusOfLargeFaceListTests.java deleted file mode 100644 index 150b8646583d..000000000000 --- a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetTrainingStatusOfLargeFaceListTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.models.FaceOperationStatus; -import com.azure.ai.vision.face.models.FaceTrainingResult; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -@Disabled -public final class GetTrainingStatusOfLargeFaceListTests extends FaceAdministrationClientTestBase { - @Test - @Disabled - public void testGetTrainingStatusOfLargeFaceListTests() { - // method invocation - FaceTrainingResult response = largeFaceListClient.getTrainingStatus(); - - // response assertion - Assertions.assertNotNull(response); - // verify property "status" - Assertions.assertEquals(FaceOperationStatus.NOT_STARTED, response.getStatus()); - // verify property "createdDateTime" - Assertions.assertNotNull(response.getCreatedDateTime()); - // verify property "lastActionDateTime" - Assertions.assertNotNull(response.getLastActionDateTime()); - // verify property "lastSuccessfulTrainingDateTime" - Assertions.assertNotNull(response.getLastSuccessfulTrainingDateTime()); - } -} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetTrainingStatusOfLargePersonGroupTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetTrainingStatusOfLargePersonGroupTests.java deleted file mode 100644 index c1f8b68da74e..000000000000 --- a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GetTrainingStatusOfLargePersonGroupTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.models.FaceOperationStatus; -import com.azure.ai.vision.face.models.FaceTrainingResult; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -@Disabled -public final class GetTrainingStatusOfLargePersonGroupTests extends FaceAdministrationClientTestBase { - @Test - @Disabled - public void testGetTrainingStatusOfLargePersonGroupTests() { - // method invocation - FaceTrainingResult response = largePersonGroupClient.getTrainingStatus(); - - // response assertion - Assertions.assertNotNull(response); - // verify property "status" - Assertions.assertEquals(FaceOperationStatus.NOT_STARTED, response.getStatus()); - // verify property "createdDateTime" - Assertions.assertNotNull(response.getCreatedDateTime()); - // verify property "lastActionDateTime" - Assertions.assertNotNull(response.getLastActionDateTime()); - // verify property "lastSuccessfulTrainingDateTime" - Assertions.assertNotNull(response.getLastSuccessfulTrainingDateTime()); - } -} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GroupFaceIDsTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GroupFaceIDsTests.java deleted file mode 100644 index 894ae8f7785a..000000000000 --- a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/GroupFaceIDsTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.models.FaceGroupingResult; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -@Disabled -public final class GroupFaceIDsTests extends FaceAdministrationClientTestBase { - @Test - @Disabled - public void testGroupFaceIDsTests() { - // method invocation - FaceGroupingResult response = faceClient - .group(Arrays.asList("c5c24a82-6845-4031-9d5d-978df9175426", "015839fb-fbd9-4f79-ace9-7675fc2f1dd9", - "65d083d4-9447-47d1-af30-b626144bf0fb", "fce92aed-d578-4d2e-8114-068f8af4492e", - "30ea1073-cc9e-4652-b1e3-d08fb7b95315", "be386ab3-af91-4104-9e6d-4dae4c9fddb7", - "fbd2a038-dbff-452c-8e79-2ee81b1aa84e", "b64d5e15-8257-4af2-b20a-5a750f8940e7")); - - // response assertion - Assertions.assertNotNull(response); - // verify property "groups" - List> responseGroups = response.getGroups(); - List responseGroupsFirstItem = responseGroups.iterator().next(); - Assertions.assertEquals("c5c24a82-6845-4031-9d5d-978df9175426", responseGroupsFirstItem.iterator().next()); - // verify property "messyGroup" - List responseMessyGroup = response.getMessyGroup(); - Assertions.assertEquals("be386ab3-af91-4104-9e6d-4dae4c9fddb7", responseMessyGroup.iterator().next()); - } -} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/IdentifyFromLargePersonGroupTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/IdentifyFromLargePersonGroupTests.java deleted file mode 100644 index 85a464a131cc..000000000000 --- a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/IdentifyFromLargePersonGroupTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.models.FaceIdentificationResult; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -@Disabled -public final class IdentifyFromLargePersonGroupTests extends FaceAdministrationClientTestBase { - @Test - @Disabled - public void testIdentifyFromLargePersonGroupTests() { - // method invocation - List response = faceClient.identifyFromLargePersonGroup( - Arrays.asList("c5c24a82-6845-4031-9d5d-978df9175426"), "your_large_person_group_id", 9, 0.7D); - } -} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/TrainLargeFaceListTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/TrainLargeFaceListTests.java deleted file mode 100644 index 30a58434d25f..000000000000 --- a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/TrainLargeFaceListTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.models.FaceTrainingResult; -import com.azure.core.util.polling.LongRunningOperationStatus; -import com.azure.core.util.polling.SyncPoller; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -@Disabled -public final class TrainLargeFaceListTests extends FaceAdministrationClientTestBase { - @Test - @Disabled - public void testTrainLargeFaceListTests() { - // method invocation - SyncPoller response - = setPlaybackSyncPollerPollInterval(largeFaceListClient.beginTrain()); - - // response assertion - Assertions.assertEquals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, - response.waitForCompletion().getStatus()); - } -} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/TrainLargePersonGroupTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/TrainLargePersonGroupTests.java deleted file mode 100644 index 525d99188451..000000000000 --- a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/TrainLargePersonGroupTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.models.FaceTrainingResult; -import com.azure.core.util.polling.LongRunningOperationStatus; -import com.azure.core.util.polling.SyncPoller; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -@Disabled -public final class TrainLargePersonGroupTests extends FaceAdministrationClientTestBase { - @Test - @Disabled - public void testTrainLargePersonGroupTests() { - // method invocation - SyncPoller response - = setPlaybackSyncPollerPollInterval(largePersonGroupClient.beginTrain()); - - // response assertion - Assertions.assertEquals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, - response.waitForCompletion().getStatus()); - } -} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/UpdateFaceInLargeFaceListTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/UpdateFaceInLargeFaceListTests.java deleted file mode 100644 index cf1a74460d16..000000000000 --- a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/UpdateFaceInLargeFaceListTests.java +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -@Disabled -public final class UpdateFaceInLargeFaceListTests extends FaceAdministrationClientTestBase { - @Test - @Disabled - public void testUpdateFaceInLargeFaceListTests() { - // method invocation - largeFaceListClient.updateFace("43897a75-8d6f-42cf-885e-74832febb055", "your_user_data"); - } -} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/UpdateFaceInLargePersonGroupPersonTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/UpdateFaceInLargePersonGroupPersonTests.java deleted file mode 100644 index 50e5215f8c0f..000000000000 --- a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/UpdateFaceInLargePersonGroupPersonTests.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -@Disabled -public final class UpdateFaceInLargePersonGroupPersonTests extends FaceAdministrationClientTestBase { - @Test - @Disabled - public void testUpdateFaceInLargePersonGroupPersonTests() { - // method invocation - largePersonGroupClient.updateFace("25985303-c537-4467-b41d-bdb45cd95ca1", - "43897a75-8d6f-42cf-885e-74832febb055", "your_user_data"); - } -} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/UpdateLargeFaceListTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/UpdateLargeFaceListTests.java deleted file mode 100644 index 70e9456f4095..000000000000 --- a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/UpdateLargeFaceListTests.java +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -@Disabled -public final class UpdateLargeFaceListTests extends FaceAdministrationClientTestBase { - @Test - @Disabled - public void testUpdateLargeFaceListTests() { - // method invocation - largeFaceListClient.update("your_large_face_list_name", "your_user_data"); - } -} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/UpdateLargePersonGroupTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/UpdateLargePersonGroupTests.java deleted file mode 100644 index 57b015d4e8d2..000000000000 --- a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/UpdateLargePersonGroupTests.java +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -@Disabled -public final class UpdateLargePersonGroupTests extends FaceAdministrationClientTestBase { - @Test - @Disabled - public void testUpdateLargePersonGroupTests() { - // method invocation - largePersonGroupClient.update("your_large_person_group_name", "your_user_data"); - } -} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/UpdatePersonInLargePersonGroupTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/UpdatePersonInLargePersonGroupTests.java deleted file mode 100644 index 9ce71f697abb..000000000000 --- a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/UpdatePersonInLargePersonGroupTests.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -@Disabled -public final class UpdatePersonInLargePersonGroupTests extends FaceAdministrationClientTestBase { - @Test - @Disabled - public void testUpdatePersonInLargePersonGroupTests() { - // method invocation - largePersonGroupClient.updatePerson("25985303-c537-4467-b41d-bdb45cd95ca1", - "your_large_person_group_person_name", "your_user_data"); - } -} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/VerifyFaceToFaceTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/VerifyFaceToFaceTests.java deleted file mode 100644 index 7cb74c79cb2c..000000000000 --- a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/VerifyFaceToFaceTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.models.FaceVerificationResult; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -@Disabled -public final class VerifyFaceToFaceTests extends FaceAdministrationClientTestBase { - @Test - @Disabled - public void testVerifyFaceToFaceTests() { - // method invocation - FaceVerificationResult response = faceClient.verifyFaceToFace("c5c24a82-6845-4031-9d5d-978df9175426", - "3aa87e30-b380-48eb-ad9e-1aa54fc52bd3"); - - // response assertion - Assertions.assertNotNull(response); - // verify property "isIdentical" - Assertions.assertEquals(true, response.isIdentical()); - // verify property "confidence" - Assertions.assertEquals(0.8, response.getConfidence()); - } -} diff --git a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/VerifyFromLargePersonGroupTests.java b/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/VerifyFromLargePersonGroupTests.java deleted file mode 100644 index 72e90c1bab88..000000000000 --- a/sdk/face/azure-ai-vision-face/src/test/java/com/azure/ai/vision/face/generated/VerifyFromLargePersonGroupTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.ai.vision.face.generated; - -import com.azure.ai.vision.face.models.FaceVerificationResult; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -@Disabled -public final class VerifyFromLargePersonGroupTests extends FaceAdministrationClientTestBase { - @Test - @Disabled - public void testVerifyFromLargePersonGroupTests() { - // method invocation - FaceVerificationResult response = faceClient.verifyFromLargePersonGroup("c5c24a82-6845-4031-9d5d-978df9175426", - "your_large_person_group", "815df99c-598f-4926-930a-a734b3fd651c"); - - // response assertion - Assertions.assertNotNull(response); - // verify property "isIdentical" - Assertions.assertEquals(true, response.isIdentical()); - // verify property "confidence" - Assertions.assertEquals(0.8, response.getConfidence()); - } -} From 0d51be0c030cf33e8c8f936871cff768bef973da Mon Sep 17 00:00:00 2001 From: Han Chiang Date: Wed, 9 Oct 2024 14:37:47 +0000 Subject: [PATCH 07/14] Add face customization --- .../com/azure/ai/vision/face/FaceClient.java | 256 ++---------------- .../LargeFaceListAsyncClient.java | 92 +++++++ .../administration/LargeFaceListClient.java | 92 +++++++ .../LargePersonGroupAsyncClient.java | 100 +++++++ .../LargePersonGroupClient.java | 100 +++++++ 5 files changed, 400 insertions(+), 240 deletions(-) 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 47026366554a..5a7923d36ae3 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 @@ -793,36 +793,8 @@ List detectImpl(BinaryData imageContent) { /** * 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 - * https://azure.microsoft.com/en-us/blog/responsible-ai-investments-and-safeguards-for-facial-recognition/. - * - * * - * * No image will be stored. Only the extracted face feature(s) will be stored on server. The faceId is an - * identifier of the face feature and will be used in "Identify", "Verify", and "Find Similar". The stored face - * features will expire and be deleted at the time specified by faceIdTimeToLive after the original detection call. - * * Optional parameters include faceId, landmarks, and attributes. Attributes include headPose, glasses, occlusion, - * accessories, blur, exposure, noise, mask, and qualityForRecognition. Some of the results returned for specific - * attributes may not be highly accurate. - * * JPEG, PNG, GIF (the first frame), and BMP format are supported. The allowed image file size is from 1KB to 6MB. - * * The minimum detectable face size is 36x36 pixels in an image no larger than 1920x1080 pixels. Images with - * dimensions higher than 1920x1080 pixels will need a proportionally larger minimum face size. - * * Up to 100 faces can be returned for an image. Faces are ranked by face rectangle size from large to small. - * * For optimal results when querying "Identify", "Verify", and "Find Similar" ('returnFaceId' is true), please use - * faces that are: frontal, clear, and with a minimum size of 200x200 pixels (100 pixels between eyes). - * * Different 'detectionModel' values can be provided. To use and compare different detection models, please refer - * to https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/how-to/specify-detection-model - * * 'detection_02': Face attributes and landmarks are disabled if you choose this detection model. - * * 'detection_03': Face attributes (mask and headPose only) and landmarks are supported if you choose this - * detection model. - * * Different 'recognitionModel' values are provided. If follow-up operations like "Verify", "Identify", "Find - * Similar" are needed, please specify the recognition model with 'recognitionModel' parameter. The default value - * for 'recognitionModel' is 'recognition_01', if latest model needed, please explicitly specify the model you need - * in this parameter. Once specified, the detected faceIds will be associated with the specified recognition model. - * More details, please refer to - * https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/how-to/specify-recognition-model. + * Please refer to https://learn.microsoft.com/rest/api/face/face-detection-operations/detect for more + * details. * * @param imageContent The input image binary. * @param options Options for detect API. @@ -844,36 +816,8 @@ public List detect(BinaryData imageContent, DetectOptions o /** * 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 - * https://azure.microsoft.com/en-us/blog/responsible-ai-investments-and-safeguards-for-facial-recognition/. - * - * * - * * No image will be stored. Only the extracted face feature(s) will be stored on server. The faceId is an - * identifier of the face feature and will be used in "Identify", "Verify", and "Find Similar". The stored face - * features will expire and be deleted at the time specified by faceIdTimeToLive after the original detection call. - * * Optional parameters include faceId, landmarks, and attributes. Attributes include headPose, glasses, occlusion, - * accessories, blur, exposure, noise, mask, and qualityForRecognition. Some of the results returned for specific - * attributes may not be highly accurate. - * * JPEG, PNG, GIF (the first frame), and BMP format are supported. The allowed image file size is from 1KB to 6MB. - * * The minimum detectable face size is 36x36 pixels in an image no larger than 1920x1080 pixels. Images with - * dimensions higher than 1920x1080 pixels will need a proportionally larger minimum face size. - * * Up to 100 faces can be returned for an image. Faces are ranked by face rectangle size from large to small. - * * For optimal results when querying "Identify", "Verify", and "Find Similar" ('returnFaceId' is true), please use - * faces that are: frontal, clear, and with a minimum size of 200x200 pixels (100 pixels between eyes). - * * Different 'detectionModel' values can be provided. To use and compare different detection models, please refer - * to https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/how-to/specify-detection-model - * * 'detection_02': Face attributes and landmarks are disabled if you choose this detection model. - * * 'detection_03': Face attributes (mask and headPose only) and landmarks are supported if you choose this - * detection model. - * * Different 'recognitionModel' values are provided. If follow-up operations like "Verify", "Identify", "Find - * Similar" are needed, please specify the recognition model with 'recognitionModel' parameter. The default value - * for 'recognitionModel' is 'recognition_01', if latest model needed, please explicitly specify the model you need - * in this parameter. Once specified, the detected faceIds will be associated with the specified recognition model. - * More details, please refer to - * https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/how-to/specify-recognition-model. + * Please refer to https://learn.microsoft.com/rest/api/face/face-detection-operations/detect for more + * details. * * @param imageContent The input image binary. * @param detectionModel The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' @@ -909,36 +853,8 @@ public List detect(BinaryData imageContent, FaceDetectionMo /** * 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 - * https://azure.microsoft.com/en-us/blog/responsible-ai-investments-and-safeguards-for-facial-recognition/. - * - * * - * * No image will be stored. Only the extracted face feature(s) will be stored on server. The faceId is an - * identifier of the face feature and will be used in "Identify", "Verify", and "Find Similar". The stored face - * features will expire and be deleted at the time specified by faceIdTimeToLive after the original detection call. - * * Optional parameters include faceId, landmarks, and attributes. Attributes include headPose, glasses, occlusion, - * accessories, blur, exposure, noise, mask, and qualityForRecognition. Some of the results returned for specific - * attributes may not be highly accurate. - * * JPEG, PNG, GIF (the first frame), and BMP format are supported. The allowed image file size is from 1KB to 6MB. - * * The minimum detectable face size is 36x36 pixels in an image no larger than 1920x1080 pixels. Images with - * dimensions higher than 1920x1080 pixels will need a proportionally larger minimum face size. - * * Up to 100 faces can be returned for an image. Faces are ranked by face rectangle size from large to small. - * * For optimal results when querying "Identify", "Verify", and "Find Similar" ('returnFaceId' is true), please use - * faces that are: frontal, clear, and with a minimum size of 200x200 pixels (100 pixels between eyes). - * * Different 'detectionModel' values can be provided. To use and compare different detection models, please refer - * to https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/how-to/specify-detection-model - * * 'detection_02': Face attributes and landmarks are disabled if you choose this detection model. - * * 'detection_03': Face attributes (mask and headPose only) and landmarks are supported if you choose this - * detection model. - * * Different 'recognitionModel' values are provided. If follow-up operations like "Verify", "Identify", "Find - * Similar" are needed, please specify the recognition model with 'recognitionModel' parameter. The default value - * for 'recognitionModel' is 'recognition_01', if latest model needed, please explicitly specify the model you need - * in this parameter. Once specified, the detected faceIds will be associated with the specified recognition model. - * More details, please refer to - * https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/how-to/specify-recognition-model. + * Please refer to https://learn.microsoft.com/rest/api/face/face-detection-operations/detect for more + * details. * * @param imageContent The input image binary. * @param detectionModel The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' @@ -967,36 +883,8 @@ public List detect(BinaryData imageContent, FaceDetectionMo /** * 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 - * https://azure.microsoft.com/en-us/blog/responsible-ai-investments-and-safeguards-for-facial-recognition/. - * - * * - * * No image will be stored. Only the extracted face feature(s) will be stored on server. The faceId is an - * identifier of the face feature and will be used in "Identify", "Verify", and "Find Similar". The stored face - * features will expire and be deleted at the time specified by faceIdTimeToLive after the original detection call. - * * Optional parameters include faceId, landmarks, and attributes. Attributes include headPose, glasses, occlusion, - * accessories, blur, exposure, noise, mask, and qualityForRecognition. Some of the results returned for specific - * attributes may not be highly accurate. - * * JPEG, PNG, GIF (the first frame), and BMP format are supported. The allowed image file size is from 1KB to 6MB. - * * The minimum detectable face size is 36x36 pixels in an image no larger than 1920x1080 pixels. Images with - * dimensions higher than 1920x1080 pixels will need a proportionally larger minimum face size. - * * Up to 100 faces can be returned for an image. Faces are ranked by face rectangle size from large to small. - * * For optimal results when querying "Identify", "Verify", and "Find Similar" ('returnFaceId' is true), please use - * faces that are: frontal, clear, and with a minimum size of 200x200 pixels (100 pixels between eyes). - * * Different 'detectionModel' values can be provided. To use and compare different detection models, please refer - * to https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/how-to/specify-detection-model - * * 'detection_02': Face attributes and landmarks are disabled if you choose this detection model. - * * 'detection_03': Face attributes (mask and headPose only) and landmarks are supported if you choose this - * detection model. - * * Different 'recognitionModel' values are provided. If follow-up operations like "Verify", "Identify", "Find - * Similar" are needed, please specify the recognition model with 'recognitionModel' parameter. The default value - * for 'recognitionModel' is 'recognition_01', if latest model needed, please explicitly specify the model you need - * in this parameter. Once specified, the detected faceIds will be associated with the specified recognition model. - * More details, please refer to - * https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/how-to/specify-recognition-model. + * Please refer to https://learn.microsoft.com/rest/api/face/face-detection-operations/detect for more + * details. * * @param imageContent The input image binary. * @param detectionModel The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' @@ -1027,36 +915,8 @@ public List detect(BinaryData imageContent, FaceDetectionMo /** * 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 - * https://azure.microsoft.com/en-us/blog/responsible-ai-investments-and-safeguards-for-facial-recognition/. - * - * * - * * No image will be stored. Only the extracted face feature(s) will be stored on server. The faceId is an - * identifier of the face feature and will be used in "Identify", "Verify", and "Find Similar". The stored face - * features will expire and be deleted at the time specified by faceIdTimeToLive after the original detection call. - * * Optional parameters include faceId, landmarks, and attributes. Attributes include headPose, glasses, occlusion, - * accessories, blur, exposure, noise, mask, and qualityForRecognition. Some of the results returned for specific - * attributes may not be highly accurate. - * * JPEG, PNG, GIF (the first frame), and BMP format are supported. The allowed image file size is from 1KB to 6MB. - * * The minimum detectable face size is 36x36 pixels in an image no larger than 1920x1080 pixels. Images with - * dimensions higher than 1920x1080 pixels will need a proportionally larger minimum face size. - * * Up to 100 faces can be returned for an image. Faces are ranked by face rectangle size from large to small. - * * For optimal results when querying "Identify", "Verify", and "Find Similar" ('returnFaceId' is true), please use - * faces that are: frontal, clear, and with a minimum size of 200x200 pixels (100 pixels between eyes). - * * Different 'detectionModel' values can be provided. To use and compare different detection models, please refer - * to https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/how-to/specify-detection-model - * * 'detection_02': Face attributes and landmarks are disabled if you choose this detection model. - * * 'detection_03': Face attributes (mask and headPose only) and landmarks are supported if you choose this - * detection model. - * * Different 'recognitionModel' values are provided. If follow-up operations like "Verify", "Identify", "Find - * Similar" are needed, please specify the recognition model with 'recognitionModel' parameter. The default value - * for 'recognitionModel' is 'recognition_01', if latest model needed, please explicitly specify the model you need - * in this parameter. Once specified, the detected faceIds will be associated with the specified recognition model. - * More details, please refer to - * https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/how-to/specify-recognition-model. + * Please refer to https://learn.microsoft.com/rest/api/face/face-detection-operations/detect-from-url for more + * details. * * @param url the URL of input image. * @param options Options for detectFromUrl API. @@ -1078,36 +938,8 @@ public List detect(String url, DetectOptions 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 - * https://azure.microsoft.com/en-us/blog/responsible-ai-investments-and-safeguards-for-facial-recognition/. - * - * * - * * No image will be stored. Only the extracted face feature(s) will be stored on server. The faceId is an - * identifier of the face feature and will be used in "Identify", "Verify", and "Find Similar". The stored face - * features will expire and be deleted at the time specified by faceIdTimeToLive after the original detection call. - * * Optional parameters include faceId, landmarks, and attributes. Attributes include headPose, glasses, occlusion, - * accessories, blur, exposure, noise, mask, and qualityForRecognition. Some of the results returned for specific - * attributes may not be highly accurate. - * * JPEG, PNG, GIF (the first frame), and BMP format are supported. The allowed image file size is from 1KB to 6MB. - * * The minimum detectable face size is 36x36 pixels in an image no larger than 1920x1080 pixels. Images with - * dimensions higher than 1920x1080 pixels will need a proportionally larger minimum face size. - * * Up to 100 faces can be returned for an image. Faces are ranked by face rectangle size from large to small. - * * For optimal results when querying "Identify", "Verify", and "Find Similar" ('returnFaceId' is true), please use - * faces that are: frontal, clear, and with a minimum size of 200x200 pixels (100 pixels between eyes). - * * Different 'detectionModel' values can be provided. To use and compare different detection models, please refer - * to https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/how-to/specify-detection-model - * * 'detection_02': Face attributes and landmarks are disabled if you choose this detection model. - * * 'detection_03': Face attributes (mask and headPose only) and landmarks are supported if you choose this - * detection model. - * * Different 'recognitionModel' values are provided. If follow-up operations like "Verify", "Identify", "Find - * Similar" are needed, please specify the recognition model with 'recognitionModel' parameter. The default value - * for 'recognitionModel' is 'recognition_01', if latest model needed, please explicitly specify the model you need - * in this parameter. Once specified, the detected faceIds will be associated with the specified recognition model. - * More details, please refer to - * https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/how-to/specify-recognition-model. + * Please refer to https://learn.microsoft.com/rest/api/face/face-detection-operations/detect-from-url for more + * details. * * @param url the URL of input image. * @param detectionModel The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' @@ -1149,36 +981,8 @@ public List detect(String url, FaceDetectionModel detection /** * 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 - * https://azure.microsoft.com/en-us/blog/responsible-ai-investments-and-safeguards-for-facial-recognition/. - * - * * - * * No image will be stored. Only the extracted face feature(s) will be stored on server. The faceId is an - * identifier of the face feature and will be used in "Identify", "Verify", and "Find Similar". The stored face - * features will expire and be deleted at the time specified by faceIdTimeToLive after the original detection call. - * * Optional parameters include faceId, landmarks, and attributes. Attributes include headPose, glasses, occlusion, - * accessories, blur, exposure, noise, mask, and qualityForRecognition. Some of the results returned for specific - * attributes may not be highly accurate. - * * JPEG, PNG, GIF (the first frame), and BMP format are supported. The allowed image file size is from 1KB to 6MB. - * * The minimum detectable face size is 36x36 pixels in an image no larger than 1920x1080 pixels. Images with - * dimensions higher than 1920x1080 pixels will need a proportionally larger minimum face size. - * * Up to 100 faces can be returned for an image. Faces are ranked by face rectangle size from large to small. - * * For optimal results when querying "Identify", "Verify", and "Find Similar" ('returnFaceId' is true), please use - * faces that are: frontal, clear, and with a minimum size of 200x200 pixels (100 pixels between eyes). - * * Different 'detectionModel' values can be provided. To use and compare different detection models, please refer - * to https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/how-to/specify-detection-model - * * 'detection_02': Face attributes and landmarks are disabled if you choose this detection model. - * * 'detection_03': Face attributes (mask and headPose only) and landmarks are supported if you choose this - * detection model. - * * Different 'recognitionModel' values are provided. If follow-up operations like "Verify", "Identify", "Find - * Similar" are needed, please specify the recognition model with 'recognitionModel' parameter. The default value - * for 'recognitionModel' is 'recognition_01', if latest model needed, please explicitly specify the model you need - * in this parameter. Once specified, the detected faceIds will be associated with the specified recognition model. - * More details, please refer to - * https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/how-to/specify-recognition-model. + * Please refer to https://learn.microsoft.com/rest/api/face/face-detection-operations/detect-from-url for more + * details. * * @param url the URL of input image. * @param detectionModel The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' @@ -1206,36 +1010,8 @@ public List detect(String url, FaceDetectionModel detection /** * 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 - * https://azure.microsoft.com/en-us/blog/responsible-ai-investments-and-safeguards-for-facial-recognition/. - * - * * - * * No image will be stored. Only the extracted face feature(s) will be stored on server. The faceId is an - * identifier of the face feature and will be used in "Identify", "Verify", and "Find Similar". The stored face - * features will expire and be deleted at the time specified by faceIdTimeToLive after the original detection call. - * * Optional parameters include faceId, landmarks, and attributes. Attributes include headPose, glasses, occlusion, - * accessories, blur, exposure, noise, mask, and qualityForRecognition. Some of the results returned for specific - * attributes may not be highly accurate. - * * JPEG, PNG, GIF (the first frame), and BMP format are supported. The allowed image file size is from 1KB to 6MB. - * * The minimum detectable face size is 36x36 pixels in an image no larger than 1920x1080 pixels. Images with - * dimensions higher than 1920x1080 pixels will need a proportionally larger minimum face size. - * * Up to 100 faces can be returned for an image. Faces are ranked by face rectangle size from large to small. - * * For optimal results when querying "Identify", "Verify", and "Find Similar" ('returnFaceId' is true), please use - * faces that are: frontal, clear, and with a minimum size of 200x200 pixels (100 pixels between eyes). - * * Different 'detectionModel' values can be provided. To use and compare different detection models, please refer - * to https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/how-to/specify-detection-model - * * 'detection_02': Face attributes and landmarks are disabled if you choose this detection model. - * * 'detection_03': Face attributes (mask and headPose only) and landmarks are supported if you choose this - * detection model. - * * Different 'recognitionModel' values are provided. If follow-up operations like "Verify", "Identify", "Find - * Similar" are needed, please specify the recognition model with 'recognitionModel' parameter. The default value - * for 'recognitionModel' is 'recognition_01', if latest model needed, please explicitly specify the model you need - * in this parameter. Once specified, the detected faceIds will be associated with the specified recognition model. - * More details, please refer to - * https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/how-to/specify-recognition-model. + * Please refer to https://learn.microsoft.com/rest/api/face/face-detection-operations/detect-from-url for more + * details. * * @param url the URL of input image. * @param detectionModel The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/LargeFaceListAsyncClient.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/LargeFaceListAsyncClient.java index 85f18fbe6fd1..abecb39a0ac6 100644 --- a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/LargeFaceListAsyncClient.java +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/LargeFaceListAsyncClient.java @@ -887,6 +887,98 @@ Mono addFaceImpl(BinaryData imageContent) { .map(protocolMethodData -> protocolMethodData.toObject(AddFaceResult.class)); } + /** + * Add a face to a specified Large Face List, up to 1,000,000 faces. + * + * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/add-large-face-list-face-from-url + * for more details. + * + * @param url URL of input image. + * @param targetFace A face rectangle to specify the target face to be added to a person, in the format of + * 'targetFace=left,top,width,height'. + * @param detectionModel The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' + * values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. + * @param userData User-provided data attached to the face. The size limit is 1K. + * @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. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response body for adding face on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono addFace(String url, List targetFace, FaceDetectionModel detectionModel, + String userData) { + return addFaceFromUrlImpl(url, targetFace, detectionModel, userData); + } + + /** + * Add a face to a specified Large Face List, up to 1,000,000 faces. + * + * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/add-large-face-list-face-from-url + * for more details. + * + * @param url URL of input image. + * @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. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response body for adding face on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono addFace(String url) { + return addFaceFromUrlImpl(url); + } + + /** + * Add a face to a specified Large Face List, up to 1,000,000 faces. + * + * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/add-large-face-list-face for more + * details. + * + * @param imageContent The image to be analyzed. + * @param targetFace A face rectangle to specify the target face to be added to a person, in the format of + * 'targetFace=left,top,width,height'. + * @param detectionModel The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' + * values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. + * @param userData User-provided data attached to the face. The size limit is 1K. + * @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. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response body for adding face on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono addFace(BinaryData imageContent, List targetFace, + FaceDetectionModel detectionModel, String userData) { + return addFaceImpl(imageContent, targetFace, detectionModel, userData); + } + + /** + * Add a face to a specified Large Face List, up to 1,000,000 faces. + * + * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/add-large-face-list-face for more + * details. + * + * @param imageContent The image to be analyzed. + * @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. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response body for adding face on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono addFace(BinaryData imageContent) { + return addFaceImpl(imageContent); + } + /** * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/delete-large-face-list-face for * more details. diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/LargeFaceListClient.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/LargeFaceListClient.java index 34e03656d34d..89cc2752c875 100644 --- a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/LargeFaceListClient.java +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/LargeFaceListClient.java @@ -740,6 +740,98 @@ public SyncPoller beginTrain() { return serviceClient.beginTrainWithModel(requestOptions); } + /** + * Add a face to a specified Large Face List, up to 1,000,000 faces. + * + * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/add-large-face-list-face-from-url + * for more details. + * + * @param url URL of input image. + * @param targetFace A face rectangle to specify the target face to be added to a person, in the format of + * 'targetFace=left,top,width,height'. + * @param detectionModel The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' + * values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. + * @param userData User-provided data attached to the face. The size limit is 1K. + * @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. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response body for adding face. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AddFaceResult addFace(String url, List targetFace, FaceDetectionModel detectionModel, + String userData) { + return addFaceFromUrlImpl(url, targetFace, detectionModel, userData); + } + + /** + * Add a face to a specified Large Face List, up to 1,000,000 faces. + * + * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/add-large-face-list-face-from-url + * for more details. + * + * @param url URL of input image. + * @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. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response body for adding face. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AddFaceResult addFace(String url) { + return addFaceFromUrlImpl(url); + } + + /** + * Add a face to a specified Large Face List, up to 1,000,000 faces. + * + * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/add-large-face-list-face for more + * details. + * + * @param imageContent The image to be analyzed. + * @param targetFace A face rectangle to specify the target face to be added to a person, in the format of + * 'targetFace=left,top,width,height'. + * @param detectionModel The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' + * values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. + * @param userData User-provided data attached to the face. The size limit is 1K. + * @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. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response body for adding face. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AddFaceResult addFace(BinaryData imageContent, List targetFace, FaceDetectionModel detectionModel, + String userData) { + return addFaceImpl(imageContent, targetFace, detectionModel, userData); + } + + /** + * Add a face to a specified Large Face List, up to 1,000,000 faces. + * + * Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/add-large-face-list-face for more + * details. + * + * @param imageContent The image to be analyzed. + * @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. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response body for adding face. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AddFaceResult addFace(BinaryData imageContent) { + return addFaceImpl(imageContent); + } + /** * Add a face to a specified Large Face List, up to 1,000,000 faces. * diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/LargePersonGroupAsyncClient.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/LargePersonGroupAsyncClient.java index 4f819eca8fb3..7acdd051e154 100644 --- a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/LargePersonGroupAsyncClient.java +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/LargePersonGroupAsyncClient.java @@ -1119,6 +1119,106 @@ public Mono> getPersons() { .map(protocolMethodData -> protocolMethodData.toObject(TYPE_REFERENCE_LIST_LARGE_PERSON_GROUP_PERSON)); } + /** + * Add a face to a person into a Large Person Group for face identification or verification. + * + * Please refer to + * https://learn.microsoft.com/rest/api/face/person-group-operations/add-large-person-group-person-face-from-url for + * more details. + * + * @param personId ID of the person. + * @param url URL of input image. + * @param targetFace A face rectangle to specify the target face to be added to a person, in the format of + * 'targetFace=left,top,width,height'. + * @param detectionModel The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' + * values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. + * @param userData User-provided data attached to the face. The size limit is 1K. + * @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. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response body for adding face on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono addFace(String personId, String url, List targetFace, + FaceDetectionModel detectionModel, String userData) { + return addFaceFromUrlImpl(personId, url, targetFace, detectionModel, userData); + } + + /** + * Add a face to a person into a Large Person Group for face identification or verification. + * + * Please refer to + * https://learn.microsoft.com/rest/api/face/person-group-operations/add-large-person-group-person-face-from-url for + * more details. + * + * @param personId ID of the person. + * @param url URL of input image. + * @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. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response body for adding face on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono addFace(String personId, String url) { + return addFaceFromUrlImpl(personId, url); + } + + /** + * Add a face to a person into a Large Person Group for face identification or verification. + * + * Please refer to + * https://learn.microsoft.com/rest/api/face/person-group-operations/add-large-person-group-person-face for more + * details. + * + * @param personId ID of the person. + * @param imageContent The image to be analyzed. + * @param targetFace A face rectangle to specify the target face to be added to a person, in the format of + * 'targetFace=left,top,width,height'. + * @param detectionModel The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' + * values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. + * @param userData User-provided data attached to the face. The size limit is 1K. + * @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. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response body for adding face on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono addFace(String personId, BinaryData imageContent, List targetFace, + FaceDetectionModel detectionModel, String userData) { + return addFaceImpl(personId, imageContent, targetFace, detectionModel, userData); + } + + /** + * Add a face to a person into a Large Person Group for face identification or verification. + * + * Please refer to + * https://learn.microsoft.com/rest/api/face/person-group-operations/add-large-person-group-person-face for more + * details. + * + * @param personId ID of the person. + * @param imageContent The image to be analyzed. + * @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. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response body for adding face on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono addFace(String personId, BinaryData imageContent) { + return addFaceImpl(personId, imageContent); + } + /** * Add a face to a person into a Large Person Group for face identification or verification. * diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/LargePersonGroupClient.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/LargePersonGroupClient.java index 419963547e18..f02eed463e50 100644 --- a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/LargePersonGroupClient.java +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/LargePersonGroupClient.java @@ -1101,6 +1101,106 @@ public List getPersons() { .toObject(TYPE_REFERENCE_LIST_LARGE_PERSON_GROUP_PERSON); } + /** + * Add a face to a person into a Large Person Group for face identification or verification. + * + * Please refer to + * https://learn.microsoft.com/rest/api/face/person-group-operations/add-large-person-group-person-face-from-url for + * more details. + * + * @param personId ID of the person. + * @param url URL of input image. + * @param targetFace A face rectangle to specify the target face to be added to a person, in the format of + * 'targetFace=left,top,width,height'. + * @param detectionModel The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' + * values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. + * @param userData User-provided data attached to the face. The size limit is 1K. + * @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. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response body for adding face. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AddFaceResult addFace(String personId, String url, List targetFace, + FaceDetectionModel detectionModel, String userData) { + return addFaceFromUrlImpl(personId, url, targetFace, detectionModel, userData); + } + + /** + * Add a face to a person into a Large Person Group for face identification or verification. + * + * Please refer to + * https://learn.microsoft.com/rest/api/face/person-group-operations/add-large-person-group-person-face-from-url for + * more details. + * + * @param personId ID of the person. + * @param url URL of input image. + * @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. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response body for adding face. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AddFaceResult addFace(String personId, String url) { + return addFaceFromUrlImpl(personId, url); + } + + /** + * Add a face to a person into a Large Person Group for face identification or verification. + * + * Please refer to + * https://learn.microsoft.com/rest/api/face/person-group-operations/add-large-person-group-person-face for more + * details. + * + * @param personId ID of the person. + * @param imageContent The image to be analyzed. + * @param targetFace A face rectangle to specify the target face to be added to a person, in the format of + * 'targetFace=left,top,width,height'. + * @param detectionModel The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' + * values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. + * @param userData User-provided data attached to the face. The size limit is 1K. + * @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. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response body for adding face. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AddFaceResult addFace(String personId, BinaryData imageContent, List targetFace, + FaceDetectionModel detectionModel, String userData) { + return addFaceImpl(personId, imageContent, targetFace, detectionModel, userData); + } + + /** + * Add a face to a person into a Large Person Group for face identification or verification. + * + * Please refer to + * https://learn.microsoft.com/rest/api/face/person-group-operations/add-large-person-group-person-face for more + * details. + * + * @param personId ID of the person. + * @param imageContent The image to be analyzed. + * @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. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response body for adding face. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AddFaceResult addFace(String personId, BinaryData imageContent) { + return addFaceImpl(personId, imageContent); + } + /** * Add a face to a person into a Large Person Group for face identification or verification. * From ece6d90b42f3b3b9cd7d42870ec34e51f368eccc Mon Sep 17 00:00:00 2001 From: Han Chiang Date: Wed, 9 Oct 2024 15:05:57 +0000 Subject: [PATCH 08/14] Add sample --- sdk/face/azure-ai-vision-face/CHANGELOG.md | 13 ++ sdk/face/azure-ai-vision-face/README.md | 5 + .../samples/FindSimilarWithLargeFaceList.java | 101 ++++++++++ .../IdentifyFromLargePersonGroups.java | 172 ++++++++++++++++++ 4 files changed, 291 insertions(+) create mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/FindSimilarWithLargeFaceList.java create mode 100644 sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/IdentifyFromLargePersonGroups.java diff --git a/sdk/face/azure-ai-vision-face/CHANGELOG.md b/sdk/face/azure-ai-vision-face/CHANGELOG.md index f811ae0691c0..dbd7c2206d3c 100644 --- a/sdk/face/azure-ai-vision-face/CHANGELOG.md +++ b/sdk/face/azure-ai-vision-face/CHANGELOG.md @@ -2,14 +2,27 @@ ## 1.0.0-beta.2 (Unreleased) +- Added support for the Large Face List and Large Person Group: + - Added client `LargeFaceListClient` and `LargePersonGroupClient`. + - Added operations `FindSimilarFromLargeFaceList`, `IdentifyFromLargePersonGroup` and `VerifyFromLargePersonGroup` to `FaceClient`. + - Added models for supporting Large Face List and Large Person Group. +- Added support for latest Detect Liveness Session API: + - Added operations `GetSessionImage` and `DetectFromSessionImage` to `FaceSessionClient`. + - Added properties `EnableSessionImage ` and `LivenessSingleModalModel` to model `CreateLivenessSessionContent`. + - Added model `CreateLivenessWithVerifySessionContent`. + ### Features Added ### Breaking Changes +- Changed the parameter of `CreateLivenessWithVerifySession` from model `CreateLivenessSessionContent` to `CreateLivenessWithVerifySessionContent`. + ### Bugs Fixed ### Other Changes +- Change the default service API version to `v1.2-preview.1`. + ## 1.0.0-beta.1 (2024-05-28) Version 1.0.0-beta.1 is a preview of our efforts in creating a client library for Azure AI Vision Face Service that is developer-friendly diff --git a/sdk/face/azure-ai-vision-face/README.md b/sdk/face/azure-ai-vision-face/README.md index 267a30e8703c..062f2770adf0 100644 --- a/sdk/face/azure-ai-vision-face/README.md +++ b/sdk/face/azure-ai-vision-face/README.md @@ -6,6 +6,7 @@ The Azure AI Face service provides AI algorithms that detect, recognize, and ana - Liveness detection - Face recognition - Face verification ("one-to-one" matching) + - Face identification ("one-to-many" matching) - Find similar faces - Group faces @@ -47,6 +48,7 @@ Azure AI Face supports both [multi-service][azure_cognitive_service_account] and In order to interact with the Face service, you will need to create an instance of a client class, [FaceAsyncClient][face_client_async] or [FaceClient][face_client] by using [FaceClientBuilder][face_client_builder]. +[FaceAdministrationAsyncClient][face_administration_client_async] or [FaceAdministrationClient][face_administration_client] by using [FaceAdministrationClientBuilder][face_administration_client_builder]. [FaceSessionAsyncClient][face_session_client_async] or [FaceSessionClient][face_session_client] by using [FaceSessionClientBuilder][face_session_client_builder]. An **endpoint** and **credential** are necessary to instantiate the client object. @@ -305,6 +307,9 @@ For details on contributing to this repository, see the [contributing guide](htt [face_client_async]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceAsyncClient.java [face_client]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceClient.java [face_client_builder]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceClientBuilder.java +[face_administration_client_async]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/FaceAdministrationAsyncClient.java +[face_administration_client]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/FaceAdministrationClient.java +[face_administration_client_builder]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/FaceAdministrationClientBuilder.java [face_session_client_async]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceSessionAsyncClient.java [face_session_client]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceSessionClient.java [face_session_client_builder]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceSessionClientBuilder.java diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/FindSimilarWithLargeFaceList.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/FindSimilarWithLargeFaceList.java new file mode 100644 index 000000000000..ee5ff8b18537 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/FindSimilarWithLargeFaceList.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.vision.face.samples; + +import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; +import com.azure.ai.vision.face.administration.LargeFaceListClient; +import com.azure.ai.vision.face.FaceClient; +import com.azure.ai.vision.face.FaceClientBuilder; +import com.azure.ai.vision.face.models.FaceTrainingResult; +import com.azure.ai.vision.face.models.FaceDetectionModel; +import com.azure.ai.vision.face.models.FaceDetectionResult; +import com.azure.ai.vision.face.models.FaceRecognitionModel; +import com.azure.ai.vision.face.models.FindSimilarMatchMode; +import com.azure.ai.vision.face.samples.utils.ConfigurationHelper; +import com.azure.ai.vision.face.samples.utils.Resources; +import com.azure.ai.vision.face.samples.utils.Utils; +import com.azure.core.credential.AzureKeyCredential; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.SyncPoller; +import com.nimbusds.jose.util.Pair; + +import java.util.List; + +import static com.azure.ai.vision.face.samples.utils.Utils.log; +import static com.azure.ai.vision.face.samples.utils.Utils.logObject; + +public class FindSimilarWithLargeFaceList { + public static void main(String[] args) { + //Create LargeFaceList + String largeFaceListId = "lfl01"; + + //Create LargeFaceListClient + LargeFaceListClient largeFaceListClient = new FaceAdministrationClientBuilder() + .endpoint(ConfigurationHelper.getEndpoint()) + .credential(new AzureKeyCredential(ConfigurationHelper.getAccountKey())) + .buildClient() + .getLargeFaceListClient(largeFaceListId); + + + largeFaceListClient.create("List of Face", "Large Face List for Test", FaceRecognitionModel.RECOGNITION_04); + + try { + addFaceToLargeFaceListAndTrain(largeFaceListId, largeFaceListClient); + + //Create client to run Detect and FindSimilar operations + FaceClient client = new FaceClientBuilder() + .endpoint(ConfigurationHelper.getEndpoint()) + .credential(new AzureKeyCredential(ConfigurationHelper.getAccountKey())) + .buildClient(); + + // Detect faces to find similar faces in above collection. + // There are two different faces in this image. + BinaryData imageBinary = Utils.loadFromFile(Resources.TEST_IMAGE_PATH_FINDSIMAR_SAMPLE); + List faceToFindSimilar = client.detect( + imageBinary, FaceDetectionModel.DETECTION_03, FaceRecognitionModel.RECOGNITION_04, true); + + faceToFindSimilar.stream() + .map(face -> Pair.of(face, + // Call FindSimilar for each face. + client.findSimilarFromLargeFaceList( + face.getFaceId(), largeFaceListId, 2, FindSimilarMatchMode.MATCH_FACE))) + .forEach(result -> logObject("FindSimilar faces for " + result.getLeft().getFaceId() + ": ", result.getRight(), true)); + } finally { + // Delete the LargeFaceList + largeFaceListClient.delete(); + } + } + + private static void addFaceToLargeFaceListAndTrain(String largeFaceListId, LargeFaceListClient client) { + log("Add face to LargeFaceList ... "); + //Add six image to the LargeFaceList + client.addFace( + Utils.loadFromFile(Resources.TEST_IMAGE_PATH_FAMILY1_MON1), + null, FaceDetectionModel.DETECTION_02, "Lady1-1"); + + client.addFace( + Utils.loadFromFile(Resources.TEST_IMAGE_PATH_FAMILY1_MON2), + null, FaceDetectionModel.DETECTION_02, "Lady1-2"); + + client.addFace( + Utils.loadFromFile(Resources.TEST_IMAGE_PATH_FAMILY2_LADY1), + null, FaceDetectionModel.DETECTION_02, "Lady2-1"); + + client.addFace( + Utils.loadFromFile(Resources.TEST_IMAGE_PATH_FAMILY2_LADY2), + null, FaceDetectionModel.DETECTION_02, "Lady2-2"); + + client.addFace( + Utils.loadFromFile(Resources.TEST_IMAGE_PATH_FAMILY3_LADY1), + null, FaceDetectionModel.DETECTION_02, "Lady3-1"); + + log("Done"); + + log("Train LargeFaceList ... "); + // We need to call /train to make all the newly added visible for the FindSimilar operation. + SyncPoller poller = client.beginTrain(); + poller.waitForCompletion(); + log("Done"); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/IdentifyFromLargePersonGroups.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/IdentifyFromLargePersonGroups.java new file mode 100644 index 000000000000..70924b2e9015 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/IdentifyFromLargePersonGroups.java @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.vision.face.samples; + +import com.azure.ai.vision.face.FaceClient; +import com.azure.ai.vision.face.FaceClientBuilder; +import com.azure.ai.vision.face.administration.FaceAdministrationClientBuilder; +import com.azure.ai.vision.face.administration.LargePersonGroupClient; +import com.azure.ai.vision.face.models.CreatePersonResult; +import com.azure.ai.vision.face.models.FaceTrainingResult; +import com.azure.ai.vision.face.models.FaceDetectionModel; +import com.azure.ai.vision.face.models.FaceDetectionResult; +import com.azure.ai.vision.face.models.FaceIdentificationCandidate; +import com.azure.ai.vision.face.models.FaceIdentificationResult; +import com.azure.ai.vision.face.models.FaceRecognitionModel; +import com.azure.ai.vision.face.models.FaceVerificationResult; +import com.azure.ai.vision.face.models.LargePersonGroupPerson; +import com.azure.ai.vision.face.samples.utils.ConfigurationHelper; +import com.azure.ai.vision.face.samples.utils.Resources; +import com.azure.ai.vision.face.samples.utils.Utils; +import com.azure.core.credential.AzureKeyCredential; +import com.azure.core.util.polling.SyncPoller; + +import java.util.Collections; +import java.util.List; + +import static com.azure.ai.vision.face.samples.utils.Utils.log; + +public class IdentifyFromLargePersonGroups { + public static void main(String[] args) { + String largePersonGroupId = "lpg_family1"; + //Create LargePersonGroupClient + LargePersonGroupClient largePersonGroupClient = new FaceAdministrationClientBuilder() + .endpoint(ConfigurationHelper.getEndpoint()) + .credential(new AzureKeyCredential(ConfigurationHelper.getAccountKey())) + .buildClient() + .getLargePersonGroupClient(largePersonGroupId); + + largePersonGroupClient.create( + "Family 1", "A sweet family", FaceRecognitionModel.RECOGNITION_04); + try { + //Add 3 Persons with 2 faces for each of them to LargePersonGroup + createThreePersonInLargePersonGroupAndTrain(largePersonGroupClient, largePersonGroupId); + + //Create client to run Detect and Verify and Identify operations + FaceClient client = createFaceClient(); + + // Detect a face to execute Verify and Identify operations + final String faceIdBill = detectOneFaceFromImage(client, Resources.TEST_IMAGE_PATH_FAMILY1_DAD3); + + // Get all Persons in LargePersonGroup + List persons = + largePersonGroupClient.getPersons(); + + persons.forEach(person -> { + // Verify if the face belongs to any one of the Person. + FaceVerificationResult verificationResult = client.verifyFromLargePersonGroup( + faceIdBill, largePersonGroupId, person.getPersonId()); + log("Verify if the face belongs to " + person.getName() + ", result: " + + verificationResult.isIdentical() + ", confidence:" + verificationResult.getConfidence()); + }); + + // Call Identify to find out this face belong to whom + log("Identify the first face"); + identifyIfFaceBelongsToAPerson(client, largePersonGroupClient, largePersonGroupId, faceIdBill); + + // Detect another faces to execute Verify and Identify operations + String faceIdGill = detectOneFaceFromImage(client, Resources.TEST_IMAGE_PATH_FAMILY1_DAUGHTER3); + + // Call Identify to again with another face, we expect 'No such person'. + log("Identify the second face"); + identifyIfFaceBelongsToAPerson(client, largePersonGroupClient, largePersonGroupId, faceIdGill); + + // Add another Person to whom the second face belongs to. + createAnotherPersonInLargePersonGroupAndTrain(largePersonGroupClient, largePersonGroupId); + + // Call Identify to again, we expect that we can find Gill this time. + log("Identify the second face again"); + identifyIfFaceBelongsToAPerson(client, largePersonGroupClient, largePersonGroupId, faceIdGill); + + } finally { + largePersonGroupClient.delete(); + } + } + + private static String detectOneFaceFromImage(FaceClient client, String imagePath) { + List detectionResultList = client.detect( + Utils.loadFromFile(imagePath), FaceDetectionModel.DETECTION_03, + FaceRecognitionModel.RECOGNITION_04, true); + FaceDetectionResult result = detectionResultList.get(0); + return result.getFaceId(); + } + + private static void identifyIfFaceBelongsToAPerson( + FaceClient client, LargePersonGroupClient largePersonGroupClient, String largePersonGroupId, String faceId) { + List identificationResults = client.identifyFromLargePersonGroup( + Collections.singletonList(faceId), largePersonGroupId, 1, null); + + List candidates = identificationResults.get(0).getCandidates(); + if (!candidates.isEmpty()) { + FaceIdentificationCandidate candidate = candidates.get(0); + // Query Person Data + LargePersonGroupPerson peron = largePersonGroupClient.getPerson(candidate.getPersonId()); + log("The face belongs to " + peron.getName() + ", confidence: " + candidate.getConfidence()); + } else { + log("No such person"); + } + } + + private static void createThreePersonInLargePersonGroupAndTrain( + LargePersonGroupClient client, String largePersonGroupId) { + + log("Add 3 Persons with 2 faces for each of them to LargePersonGroup... "); + //Add 3 People with 2 faces from two different images to the LargePersonGroup + createPersonToLargePersonGroupAndAddFaces( + client, largePersonGroupId, "Bill", "Dad", + Resources.TEST_IMAGE_PATH_FAMILY1_DAD1, Resources.TEST_IMAGE_PATH_FAMILY1_DAD2); + + createPersonToLargePersonGroupAndAddFaces( + client, largePersonGroupId, "Clare", "Mon", + Resources.TEST_IMAGE_PATH_FAMILY1_MON1, Resources.TEST_IMAGE_PATH_FAMILY1_MON2); + + createPersonToLargePersonGroupAndAddFaces( + client, largePersonGroupId, "Ron", "Son", + Resources.TEST_IMAGE_PATH_FAMILY1_SON1, Resources.TEST_IMAGE_PATH_FAMILY1_SON2); + log("Done"); + + log("Train LargePersonGroup ... "); + // We need to call /train to make all the newly added visible for Identify operation. + SyncPoller poller = client.beginTrain(); + poller.waitForCompletion(); + log("Done"); + } + + private static void createAnotherPersonInLargePersonGroupAndTrain( + LargePersonGroupClient client, String largePersonGroupId) { + + log("Add another Person to LargePersonGroup and add faces to the Person... "); + //Add 3 People with 2 faces from two different images to the LargePersonGroup + createPersonToLargePersonGroupAndAddFaces( + client, largePersonGroupId, "Gill", "Daughter", + Resources.TEST_IMAGE_PATH_FAMILY1_DAUGHTER1, Resources.TEST_IMAGE_PATH_FAMILY1_DAUGHTER2); + log("Done"); + + log("Train LargePersonGroup ... "); + // We need to call /train to make all the newly added visible for Identify operation. + SyncPoller poller = client.beginTrain(); + poller.waitForCompletion(); + log("Done"); + } + + private static void createPersonToLargePersonGroupAndAddFaces(LargePersonGroupClient client, + String name, String userData, String... paths) { + CreatePersonResult resultForPersonCreation = client.createPerson(name, userData); + String personId = resultForPersonCreation.getPersonId(); + + int index = 0; + for (String path : paths) { + ++index; + client.addFace(personId, Utils.loadFromFile(path), null, FaceDetectionModel.DETECTION_03, + userData + "-" + index); + } + } + + private static FaceClient createFaceClient() { + return new FaceClientBuilder() + .endpoint(ConfigurationHelper.getEndpoint()) + .credential(new AzureKeyCredential(ConfigurationHelper.getAccountKey())) + .buildClient(); + } +} From bdc4de162f48a98e3ab57b7328f453553013ed5c Mon Sep 17 00:00:00 2001 From: Han Chiang Date: Thu, 10 Oct 2024 15:36:05 +0000 Subject: [PATCH 09/14] Refine sample --- .../samples/FindSimilarWithLargeFaceList.java | 19 +++++++++---------- .../IdentifyFromLargePersonGroups.java | 16 ++++++++-------- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/FindSimilarWithLargeFaceList.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/FindSimilarWithLargeFaceList.java index ee5ff8b18537..de7423438870 100644 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/FindSimilarWithLargeFaceList.java +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/FindSimilarWithLargeFaceList.java @@ -10,6 +10,7 @@ import com.azure.ai.vision.face.models.FaceTrainingResult; import com.azure.ai.vision.face.models.FaceDetectionModel; import com.azure.ai.vision.face.models.FaceDetectionResult; +import com.azure.ai.vision.face.models.FaceFindSimilarResult; import com.azure.ai.vision.face.models.FaceRecognitionModel; import com.azure.ai.vision.face.models.FindSimilarMatchMode; import com.azure.ai.vision.face.samples.utils.ConfigurationHelper; @@ -18,12 +19,10 @@ import com.azure.core.credential.AzureKeyCredential; import com.azure.core.util.BinaryData; import com.azure.core.util.polling.SyncPoller; -import com.nimbusds.jose.util.Pair; import java.util.List; import static com.azure.ai.vision.face.samples.utils.Utils.log; -import static com.azure.ai.vision.face.samples.utils.Utils.logObject; public class FindSimilarWithLargeFaceList { public static void main(String[] args) { @@ -41,7 +40,7 @@ public static void main(String[] args) { largeFaceListClient.create("List of Face", "Large Face List for Test", FaceRecognitionModel.RECOGNITION_04); try { - addFaceToLargeFaceListAndTrain(largeFaceListId, largeFaceListClient); + addFaceToLargeFaceListAndTrain(largeFaceListClient); //Create client to run Detect and FindSimilar operations FaceClient client = new FaceClientBuilder() @@ -55,19 +54,19 @@ public static void main(String[] args) { List faceToFindSimilar = client.detect( imageBinary, FaceDetectionModel.DETECTION_03, FaceRecognitionModel.RECOGNITION_04, true); - faceToFindSimilar.stream() - .map(face -> Pair.of(face, - // Call FindSimilar for each face. - client.findSimilarFromLargeFaceList( - face.getFaceId(), largeFaceListId, 2, FindSimilarMatchMode.MATCH_FACE))) - .forEach(result -> logObject("FindSimilar faces for " + result.getLeft().getFaceId() + ": ", result.getRight(), true)); + for (FaceDetectionResult face : faceToFindSimilar) { + List results = client.findSimilarFromLargeFaceList(face.getFaceId(), largeFaceListId, 2, FindSimilarMatchMode.MATCH_FACE); + for (FaceFindSimilarResult result : results) { + log("FindSimilar face for " + face.getFaceId() + ": " + result.getConfidence() + " with persistedFaceId: " + result.getPersistedFaceId()); + } + } } finally { // Delete the LargeFaceList largeFaceListClient.delete(); } } - private static void addFaceToLargeFaceListAndTrain(String largeFaceListId, LargeFaceListClient client) { + private static void addFaceToLargeFaceListAndTrain(LargeFaceListClient client) { log("Add face to LargeFaceList ... "); //Add six image to the LargeFaceList client.addFace( diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/IdentifyFromLargePersonGroups.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/IdentifyFromLargePersonGroups.java index 70924b2e9015..146728e16193 100644 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/IdentifyFromLargePersonGroups.java +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/IdentifyFromLargePersonGroups.java @@ -41,7 +41,7 @@ public static void main(String[] args) { "Family 1", "A sweet family", FaceRecognitionModel.RECOGNITION_04); try { //Add 3 Persons with 2 faces for each of them to LargePersonGroup - createThreePersonInLargePersonGroupAndTrain(largePersonGroupClient, largePersonGroupId); + createThreePersonInLargePersonGroupAndTrain(largePersonGroupClient); //Create client to run Detect and Verify and Identify operations FaceClient client = createFaceClient(); @@ -73,7 +73,7 @@ public static void main(String[] args) { identifyIfFaceBelongsToAPerson(client, largePersonGroupClient, largePersonGroupId, faceIdGill); // Add another Person to whom the second face belongs to. - createAnotherPersonInLargePersonGroupAndTrain(largePersonGroupClient, largePersonGroupId); + createAnotherPersonInLargePersonGroupAndTrain(largePersonGroupClient); // Call Identify to again, we expect that we can find Gill this time. log("Identify the second face again"); @@ -109,20 +109,20 @@ private static void identifyIfFaceBelongsToAPerson( } private static void createThreePersonInLargePersonGroupAndTrain( - LargePersonGroupClient client, String largePersonGroupId) { + LargePersonGroupClient client) { log("Add 3 Persons with 2 faces for each of them to LargePersonGroup... "); //Add 3 People with 2 faces from two different images to the LargePersonGroup createPersonToLargePersonGroupAndAddFaces( - client, largePersonGroupId, "Bill", "Dad", + client, "Bill", "Dad", Resources.TEST_IMAGE_PATH_FAMILY1_DAD1, Resources.TEST_IMAGE_PATH_FAMILY1_DAD2); createPersonToLargePersonGroupAndAddFaces( - client, largePersonGroupId, "Clare", "Mon", + client, "Clare", "Mon", Resources.TEST_IMAGE_PATH_FAMILY1_MON1, Resources.TEST_IMAGE_PATH_FAMILY1_MON2); createPersonToLargePersonGroupAndAddFaces( - client, largePersonGroupId, "Ron", "Son", + client, "Ron", "Son", Resources.TEST_IMAGE_PATH_FAMILY1_SON1, Resources.TEST_IMAGE_PATH_FAMILY1_SON2); log("Done"); @@ -134,12 +134,12 @@ private static void createThreePersonInLargePersonGroupAndTrain( } private static void createAnotherPersonInLargePersonGroupAndTrain( - LargePersonGroupClient client, String largePersonGroupId) { + LargePersonGroupClient client) { log("Add another Person to LargePersonGroup and add faces to the Person... "); //Add 3 People with 2 faces from two different images to the LargePersonGroup createPersonToLargePersonGroupAndAddFaces( - client, largePersonGroupId, "Gill", "Daughter", + client, "Gill", "Daughter", Resources.TEST_IMAGE_PATH_FAMILY1_DAUGHTER1, Resources.TEST_IMAGE_PATH_FAMILY1_DAUGHTER2); log("Done"); From 18e43244424aa52e33b1212f48e64c1d1474efdb Mon Sep 17 00:00:00 2001 From: Han Chiang Date: Fri, 11 Oct 2024 01:57:08 +0000 Subject: [PATCH 10/14] Disable test and sample generation --- sdk/face/azure-ai-vision-face/tsp-location.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/face/azure-ai-vision-face/tsp-location.yaml b/sdk/face/azure-ai-vision-face/tsp-location.yaml index f371322b5c9e..947eb195603f 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: 678deda13a0393a5c1c959ccb80be23ecd966f41 +commit: 67ea6166f396a1d94276ca04649db5fa2e9706b2 repo: Azure/azure-rest-api-specs additionalDirectories: null From d841d6d34fe2edf835d8386db771875c5fab1e67 Mon Sep 17 00:00:00 2001 From: Han Chiang Date: Fri, 11 Oct 2024 08:17:18 +0000 Subject: [PATCH 11/14] Switch sample to token cred --- .../java/com/azure/ai/vision/face/samples/DetectFaces.java | 4 ++-- .../com/azure/ai/vision/face/samples/DetectFacesAsync.java | 5 +++-- .../com/azure/ai/vision/face/samples/DetectLiveness.java | 4 ++-- .../azure/ai/vision/face/samples/DetectLivenessAsync.java | 4 ++-- .../ai/vision/face/samples/DetectLivenessWithVerify.java | 4 ++-- .../vision/face/samples/DetectLivenessWithVerifyAsync.java | 4 ++-- .../azure/ai/vision/face/samples/FindSimilarWithIds.java | 4 ++-- .../vision/face/samples/FindSimilarWithLargeFaceList.java | 6 +++--- .../java/com/azure/ai/vision/face/samples/Grouping.java | 4 ++-- .../vision/face/samples/IdentifyFromLargePersonGroups.java | 6 +++--- .../azure/ai/vision/face/samples/StatelessVerification.java | 4 ++-- 11 files changed, 25 insertions(+), 24 deletions(-) diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/DetectFaces.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/DetectFaces.java index 9cf0bf3633b0..698ce28f0fa1 100644 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/DetectFaces.java +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/DetectFaces.java @@ -12,8 +12,8 @@ import com.azure.ai.vision.face.models.FaceDetectionModel; import com.azure.ai.vision.face.models.FaceDetectionResult; import com.azure.ai.vision.face.models.FaceRecognitionModel; -import com.azure.core.credential.AzureKeyCredential; import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; import java.nio.file.FileSystems; import java.util.Arrays; @@ -28,7 +28,7 @@ public class DetectFaces { public static void main(String[] args) { FaceClient client = new FaceClientBuilder() .endpoint(ConfigurationHelper.getEndpoint()) - .credential(new AzureKeyCredential(ConfigurationHelper.getAccountKey())) + .credential(new DefaultAzureCredentialBuilder().build()) .buildClient(); BinaryData imageBinary = BinaryData.fromFile(FileSystems.getDefault().getPath(Resources.TEST_IMAGE_PATH_DETECT_SAMPLE_IMAGE)); diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/DetectFacesAsync.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/DetectFacesAsync.java index e472cd7b3188..c345afaeecb3 100644 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/DetectFacesAsync.java +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/DetectFacesAsync.java @@ -12,8 +12,9 @@ import com.azure.ai.vision.face.samples.utils.ConfigurationHelper; import com.azure.ai.vision.face.samples.utils.Resources; import com.azure.ai.vision.face.samples.utils.Utils; -import com.azure.core.credential.AzureKeyCredential; import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + import reactor.core.publisher.Flux; import java.util.Arrays; @@ -27,7 +28,7 @@ public class DetectFacesAsync { public static void main(String[] args) { FaceAsyncClient client = new FaceClientBuilder() .endpoint(ConfigurationHelper.getEndpoint()) - .credential(new AzureKeyCredential(ConfigurationHelper.getAccountKey())) + .credential(new DefaultAzureCredentialBuilder().build()) .buildAsyncClient(); BinaryData imageBinary = Utils.loadFromFile(Resources.TEST_IMAGE_PATH_DETECT_SAMPLE_IMAGE); diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/DetectLiveness.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/DetectLiveness.java index dcba044f09ba..11bb7deeb27f 100644 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/DetectLiveness.java +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/DetectLiveness.java @@ -14,8 +14,8 @@ import com.azure.ai.vision.face.samples.utils.ConfigurationHelper; import com.azure.ai.vision.face.samples.utils.Resources; import com.azure.ai.vision.face.samples.utils.Utils; -import com.azure.core.credential.AzureKeyCredential; import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; import java.util.List; import java.util.UUID; @@ -38,7 +38,7 @@ public static void main(String[] args) { // Create a FaceSessionClient FaceSessionClient faceSessionClient = new FaceSessionClientBuilder() .endpoint(ConfigurationHelper.getEndpoint()) - .credential(new AzureKeyCredential(ConfigurationHelper.getAccountKey())) + .credential(new DefaultAzureCredentialBuilder().build()) .buildClient(); // Create a liveness session diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/DetectLivenessAsync.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/DetectLivenessAsync.java index ad0c9e7f5728..f3577b523e72 100644 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/DetectLivenessAsync.java +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/DetectLivenessAsync.java @@ -14,8 +14,8 @@ import com.azure.ai.vision.face.samples.utils.ConfigurationHelper; import com.azure.ai.vision.face.samples.utils.Resources; import com.azure.ai.vision.face.samples.utils.Utils; -import com.azure.core.credential.AzureKeyCredential; import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; import java.util.List; import java.util.UUID; @@ -38,7 +38,7 @@ public static void main(String[] args) { // Create a FaceSessionClient FaceSessionAsyncClient faceSessionClient = new FaceSessionClientBuilder() .endpoint(ConfigurationHelper.getEndpoint()) - .credential(new AzureKeyCredential(ConfigurationHelper.getAccountKey())) + .credential(new DefaultAzureCredentialBuilder().build()) .buildAsyncClient(); // Create a liveness session diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/DetectLivenessWithVerify.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/DetectLivenessWithVerify.java index 449d8d11b7a4..e62d6aaf8c4e 100644 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/DetectLivenessWithVerify.java +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/DetectLivenessWithVerify.java @@ -14,8 +14,8 @@ import com.azure.ai.vision.face.samples.utils.ConfigurationHelper; import com.azure.ai.vision.face.samples.utils.Resources; import com.azure.ai.vision.face.samples.utils.Utils; -import com.azure.core.credential.AzureKeyCredential; import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; import java.util.List; import java.util.UUID; @@ -38,7 +38,7 @@ public static void main(String[] args) { // Create a FaceSessionClient FaceSessionClient faceSessionClient = new FaceSessionClientBuilder() .endpoint(ConfigurationHelper.getEndpoint()) - .credential(new AzureKeyCredential(ConfigurationHelper.getAccountKey())) + .credential(new DefaultAzureCredentialBuilder().build()) .buildClient(); CreateLivenessWithVerifySessionContent parameters = new CreateLivenessWithVerifySessionContent(LivenessOperationMode.PASSIVE) diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/DetectLivenessWithVerifyAsync.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/DetectLivenessWithVerifyAsync.java index 76dc5d0c3e3a..01a36620a78b 100644 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/DetectLivenessWithVerifyAsync.java +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/DetectLivenessWithVerifyAsync.java @@ -14,8 +14,8 @@ import com.azure.ai.vision.face.samples.utils.ConfigurationHelper; import com.azure.ai.vision.face.samples.utils.Resources; import com.azure.ai.vision.face.samples.utils.Utils; -import com.azure.core.credential.AzureKeyCredential; import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; import java.util.List; import java.util.UUID; @@ -38,7 +38,7 @@ public static void main(String[] args) { // Create a FaceSessionClient FaceSessionAsyncClient faceSessionClient = new FaceSessionClientBuilder() .endpoint(ConfigurationHelper.getEndpoint()) - .credential(new AzureKeyCredential(ConfigurationHelper.getAccountKey())) + .credential(new DefaultAzureCredentialBuilder().build()) .buildAsyncClient(); CreateLivenessWithVerifySessionContent parameters = new CreateLivenessWithVerifySessionContent(LivenessOperationMode.PASSIVE) diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/FindSimilarWithIds.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/FindSimilarWithIds.java index e200506b2645..c844cf56cda9 100644 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/FindSimilarWithIds.java +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/FindSimilarWithIds.java @@ -12,9 +12,9 @@ import com.azure.ai.vision.face.samples.utils.ConfigurationHelper; import com.azure.ai.vision.face.samples.utils.Resources; import com.azure.ai.vision.face.samples.utils.Utils; -import com.azure.core.credential.AzureKeyCredential; import com.azure.core.util.BinaryData; import com.nimbusds.jose.util.Pair; +import com.azure.identity.DefaultAzureCredentialBuilder; import java.util.List; import java.util.stream.Collectors; @@ -24,7 +24,7 @@ public class FindSimilarWithIds { public static void main(String[] args) { FaceClient client = new FaceClientBuilder() .endpoint(ConfigurationHelper.getEndpoint()) - .credential(new AzureKeyCredential(ConfigurationHelper.getAccountKey())) + .credential(new DefaultAzureCredentialBuilder().build()) .buildClient(); // Detect faces in an image. diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/FindSimilarWithLargeFaceList.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/FindSimilarWithLargeFaceList.java index de7423438870..63d4bd57fb54 100644 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/FindSimilarWithLargeFaceList.java +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/FindSimilarWithLargeFaceList.java @@ -16,9 +16,9 @@ import com.azure.ai.vision.face.samples.utils.ConfigurationHelper; import com.azure.ai.vision.face.samples.utils.Resources; import com.azure.ai.vision.face.samples.utils.Utils; -import com.azure.core.credential.AzureKeyCredential; import com.azure.core.util.BinaryData; import com.azure.core.util.polling.SyncPoller; +import com.azure.identity.DefaultAzureCredentialBuilder; import java.util.List; @@ -32,7 +32,7 @@ public static void main(String[] args) { //Create LargeFaceListClient LargeFaceListClient largeFaceListClient = new FaceAdministrationClientBuilder() .endpoint(ConfigurationHelper.getEndpoint()) - .credential(new AzureKeyCredential(ConfigurationHelper.getAccountKey())) + .credential(new DefaultAzureCredentialBuilder().build()) .buildClient() .getLargeFaceListClient(largeFaceListId); @@ -45,7 +45,7 @@ public static void main(String[] args) { //Create client to run Detect and FindSimilar operations FaceClient client = new FaceClientBuilder() .endpoint(ConfigurationHelper.getEndpoint()) - .credential(new AzureKeyCredential(ConfigurationHelper.getAccountKey())) + .credential(new DefaultAzureCredentialBuilder().build()) .buildClient(); // Detect faces to find similar faces in above collection. diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/Grouping.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/Grouping.java index c66f621460d6..63432b7f8428 100644 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/Grouping.java +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/Grouping.java @@ -12,8 +12,8 @@ import com.azure.ai.vision.face.samples.utils.ConfigurationHelper; import com.azure.ai.vision.face.samples.utils.Resources; import com.azure.ai.vision.face.samples.utils.Utils; -import com.azure.core.credential.AzureKeyCredential; import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; import java.util.List; import java.util.stream.Collectors; @@ -25,7 +25,7 @@ public class Grouping { public static void main(String[] args) { FaceClient client = new FaceClientBuilder() .endpoint(ConfigurationHelper.getEndpoint()) - .credential(new AzureKeyCredential(ConfigurationHelper.getAccountKey())) + .credential(new DefaultAzureCredentialBuilder().build()) .buildClient(); // Detect faces in an image. diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/IdentifyFromLargePersonGroups.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/IdentifyFromLargePersonGroups.java index 146728e16193..909964858f7c 100644 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/IdentifyFromLargePersonGroups.java +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/IdentifyFromLargePersonGroups.java @@ -19,8 +19,8 @@ import com.azure.ai.vision.face.samples.utils.ConfigurationHelper; import com.azure.ai.vision.face.samples.utils.Resources; import com.azure.ai.vision.face.samples.utils.Utils; -import com.azure.core.credential.AzureKeyCredential; import com.azure.core.util.polling.SyncPoller; +import com.azure.identity.DefaultAzureCredentialBuilder; import java.util.Collections; import java.util.List; @@ -33,7 +33,7 @@ public static void main(String[] args) { //Create LargePersonGroupClient LargePersonGroupClient largePersonGroupClient = new FaceAdministrationClientBuilder() .endpoint(ConfigurationHelper.getEndpoint()) - .credential(new AzureKeyCredential(ConfigurationHelper.getAccountKey())) + .credential(new DefaultAzureCredentialBuilder().build()) .buildClient() .getLargePersonGroupClient(largePersonGroupId); @@ -166,7 +166,7 @@ private static void createPersonToLargePersonGroupAndAddFaces(LargePersonGroupCl private static FaceClient createFaceClient() { return new FaceClientBuilder() .endpoint(ConfigurationHelper.getEndpoint()) - .credential(new AzureKeyCredential(ConfigurationHelper.getAccountKey())) + .credential(new DefaultAzureCredentialBuilder().build()) .buildClient(); } } diff --git a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/StatelessVerification.java b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/StatelessVerification.java index 86e5093f70af..4528387f030d 100644 --- a/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/StatelessVerification.java +++ b/sdk/face/azure-ai-vision-face/src/samples/java/com/azure/ai/vision/face/samples/StatelessVerification.java @@ -12,8 +12,8 @@ import com.azure.ai.vision.face.samples.utils.ConfigurationHelper; import com.azure.ai.vision.face.samples.utils.Resources; import com.azure.ai.vision.face.samples.utils.Utils; -import com.azure.core.credential.AzureKeyCredential; import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; import java.util.List; @@ -23,7 +23,7 @@ public static void main(String[] args) { //Create client to run detect and identify operations FaceClient client = new FaceClientBuilder() .endpoint(ConfigurationHelper.getEndpoint()) - .credential(new AzureKeyCredential(ConfigurationHelper.getAccountKey())) + .credential(new DefaultAzureCredentialBuilder().build()) .buildClient(); //Detect a face From 5b1f9494de6693bcff4d4e75bba882f916841acc Mon Sep 17 00:00:00 2001 From: Han Chiang Date: Thu, 17 Oct 2024 09:57:14 +0000 Subject: [PATCH 12/14] Remove unused import --- .../customization/src/main/java/FaceCustomizations.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/sdk/face/azure-ai-vision-face/customization/src/main/java/FaceCustomizations.java b/sdk/face/azure-ai-vision-face/customization/src/main/java/FaceCustomizations.java index 1efb57829511..049bbc35faaf 100644 --- a/sdk/face/azure-ai-vision-face/customization/src/main/java/FaceCustomizations.java +++ b/sdk/face/azure-ai-vision-face/customization/src/main/java/FaceCustomizations.java @@ -6,9 +6,6 @@ import com.azure.autorest.customization.LibraryCustomization; import org.slf4j.Logger; -import java.lang.reflect.Modifier; -import java.util.Arrays; - /** * This class contains the customization code to customize the AutoRest generated code for OpenAI. */ From 96177273b6b0c1749956a168fa4ec30d1e01789f Mon Sep 17 00:00:00 2001 From: Han Chiang Date: Thu, 17 Oct 2024 09:58:22 +0000 Subject: [PATCH 13/14] Refine administration client doc --- .../face/administration/FaceAdministrationAsyncClient.java | 2 +- .../ai/vision/face/administration/FaceAdministrationClient.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/FaceAdministrationAsyncClient.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/FaceAdministrationAsyncClient.java index dbb913fe5189..b6ba45e35fe5 100644 --- a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/FaceAdministrationAsyncClient.java +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/FaceAdministrationAsyncClient.java @@ -12,7 +12,7 @@ import java.util.Objects; /** - * FaceAdministrationAsyncClient class. + * Initializes a new instance of the asynchronous FaceAdministrationAsyncClient type. */ @ServiceClient(builder = FaceAdministrationClientBuilder.class, isAsync = true) public final class FaceAdministrationAsyncClient { diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/FaceAdministrationClient.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/FaceAdministrationClient.java index ac285da2e473..75ee12f0a899 100644 --- a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/FaceAdministrationClient.java +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/administration/FaceAdministrationClient.java @@ -12,7 +12,7 @@ import java.util.Objects; /** - * FaceAdministrationClient class. + * Initializes a new instance of the synchronous FaceAdministrationClient type. */ @ServiceClient(builder = FaceAdministrationClientBuilder.class) public final class FaceAdministrationClient { From c220b64388f4de820cbf91c8306adb63b3ebe333 Mon Sep 17 00:00:00 2001 From: Han Chiang Date: Wed, 23 Oct 2024 03:43:31 +0000 Subject: [PATCH 14/14] Update tsp commit and changelog --- sdk/face/azure-ai-vision-face/CHANGELOG.md | 6 +----- sdk/face/azure-ai-vision-face/tsp-location.yaml | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/sdk/face/azure-ai-vision-face/CHANGELOG.md b/sdk/face/azure-ai-vision-face/CHANGELOG.md index dbd7c2206d3c..a141882bda56 100644 --- a/sdk/face/azure-ai-vision-face/CHANGELOG.md +++ b/sdk/face/azure-ai-vision-face/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0-beta.2 (2024-10-23) - Added support for the Large Face List and Large Person Group: - Added client `LargeFaceListClient` and `LargePersonGroupClient`. @@ -11,14 +11,10 @@ - Added properties `EnableSessionImage ` and `LivenessSingleModalModel` to model `CreateLivenessSessionContent`. - Added model `CreateLivenessWithVerifySessionContent`. -### Features Added - ### Breaking Changes - Changed the parameter of `CreateLivenessWithVerifySession` from model `CreateLivenessSessionContent` to `CreateLivenessWithVerifySessionContent`. -### Bugs Fixed - ### Other Changes - Change the default service API version to `v1.2-preview.1`. diff --git a/sdk/face/azure-ai-vision-face/tsp-location.yaml b/sdk/face/azure-ai-vision-face/tsp-location.yaml index 947eb195603f..5a9a9d70f2b6 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: 67ea6166f396a1d94276ca04649db5fa2e9706b2 +commit: cf80ee4aacdb4ef9926b42f09837fe16add9e66a repo: Azure/azure-rest-api-specs additionalDirectories: null