diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceServiceVersion.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceServiceVersion.java index af9dcc3ead7f..ec1a4464357d 100644 --- a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceServiceVersion.java +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceServiceVersion.java @@ -18,7 +18,12 @@ public enum FaceServiceVersion implements ServiceVersion { /** * Enum value v1.2-preview.1. */ - V1_2_PREVIEW_1("v1.2-preview.1"); + V1_2_PREVIEW_1("v1.2-preview.1"), + + /** + * Enum value v1.2. + */ + V1_2("v1.2"); private final String version; @@ -40,6 +45,6 @@ public String getVersion() { * @return The latest {@link FaceServiceVersion}. */ public static FaceServiceVersion getLatest() { - return V1_2_PREVIEW_1; + return V1_2; } } diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceSessionAsyncClient.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceSessionAsyncClient.java index 8aa67438dbd9..2652c0eb2b33 100644 --- a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceSessionAsyncClient.java +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceSessionAsyncClient.java @@ -9,7 +9,6 @@ import com.azure.ai.vision.face.implementation.models.DetectFromSessionImageRequest; import com.azure.ai.vision.face.implementation.models.VerifyImageFileDetails; import com.azure.ai.vision.face.models.CreateLivenessSessionContent; -import com.azure.ai.vision.face.models.CreateLivenessSessionResult; import com.azure.ai.vision.face.models.CreateLivenessWithVerifySessionContent; import com.azure.ai.vision.face.models.CreateLivenessWithVerifySessionResult; import com.azure.ai.vision.face.models.DetectFromSessionImageOptions; @@ -18,9 +17,8 @@ import com.azure.ai.vision.face.models.FaceDetectionResult; import com.azure.ai.vision.face.models.FaceRecognitionModel; import com.azure.ai.vision.face.models.LivenessSession; -import com.azure.ai.vision.face.models.LivenessSessionAuditEntry; -import com.azure.ai.vision.face.models.LivenessSessionItem; import com.azure.ai.vision.face.models.LivenessWithVerifySession; +import com.azure.ai.vision.face.models.VerifyImageFileDetails; import com.azure.core.annotation.Generated; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceClient; @@ -69,10 +67,9 @@ public final class FaceSessionAsyncClient { * {@code * { * livenessOperationMode: String(Passive/PassiveActive) (Required) - * sendResultsToClient: Boolean (Optional) * deviceCorrelationIdSetInClient: Boolean (Optional) * enableSessionImage: Boolean (Optional) - * livenessSingleModalModel: String(2022-10-15-preview.04/2023-12-20-preview.06) (Optional) + * livenessModelVersion: String(2024-11-15) (Optional) * deviceCorrelationId: String (Optional) * authTokenTimeToLiveInSeconds: Integer (Optional) * } @@ -86,6 +83,36 @@ public final class FaceSessionAsyncClient { * { * sessionId: String (Required) * authToken: String (Required) + * status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required) + * modelVersion: String(2024-11-15) (Optional) + * results (Required): { + * attempts (Required): [ + * (Required){ + * attemptId: int (Required) + * attemptStatus: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required) + * result (Optional): { + * livenessDecision: String(uncertain/realface/spoofface) (Optional) + * targets (Required): { + * color (Required): { + * faceRectangle (Required): { + * top: int (Required) + * left: int (Required) + * width: int (Required) + * height: int (Required) + * } + * } + * } + * digest: String (Required) + * sessionImageId: String (Optional) + * } + * error (Optional): { + * code: String (Required) + * message: String (Required) + * targets (Required): (recursive schema, see targets above) + * } + * } + * ] + * } * } * } * @@ -96,8 +123,7 @@ public final class FaceSessionAsyncClient { * @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. - * @return response of liveness session creation along with {@link Response} on successful completion of - * {@link Mono}. + * @return session result of detect liveness along with {@link Response} on successful completion of {@link Mono}. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) @@ -134,59 +160,37 @@ public Mono> deleteLivenessSessionWithResponse(String sessionId, *
      * {@code
      * {
-     *     id: String (Required)
-     *     createdDateTime: OffsetDateTime (Required)
-     *     sessionStartDateTime: OffsetDateTime (Optional)
-     *     sessionExpired: boolean (Required)
-     *     deviceCorrelationId: String (Optional)
-     *     authTokenTimeToLiveInSeconds: Integer (Optional)
-     *     status: String(NotStarted/Started/ResultAvailable) (Required)
-     *     result (Optional): {
-     *         id: long (Required)
-     *         sessionId: String (Required)
-     *         requestId: String (Required)
-     *         clientRequestId: String (Required)
-     *         receivedDateTime: OffsetDateTime (Required)
-     *         request (Required): {
-     *             url: String (Required)
-     *             method: String (Required)
-     *             contentLength: Long (Optional)
-     *             contentType: String (Required)
-     *             userAgent: String (Optional)
-     *         }
-     *         response (Required): {
-     *             body (Required): {
-     *                 livenessDecision: String(uncertain/realface/spoofface) (Optional)
-     *                 target (Optional): {
-     *                     faceRectangle (Required): {
-     *                         top: int (Required)
-     *                         left: int (Required)
-     *                         width: int (Required)
-     *                         height: int (Required)
-     *                     }
-     *                     fileName: String (Required)
-     *                     timeOffsetWithinFile: int (Required)
-     *                     imageType: String(Color/Infrared/Depth) (Required)
-     *                 }
-     *                 modelVersionUsed: String(2022-10-15-preview.04/2023-12-20-preview.06) (Optional)
-     *                 verifyResult (Optional): {
-     *                     verifyImage (Required): {
-     *                         faceRectangle (Required): (recursive schema, see faceRectangle above)
-     *                         qualityForRecognition: String(low/medium/high) (Required)
+     *     sessionId: String (Required)
+     *     authToken: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *     modelVersion: String(2024-11-15) (Optional)
+     *     results (Required): {
+     *         attempts (Required): [
+     *              (Required){
+     *                 attemptId: int (Required)
+     *                 attemptStatus: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *                 result (Optional): {
+     *                     livenessDecision: String(uncertain/realface/spoofface) (Optional)
+     *                     targets (Required): {
+     *                         color (Required): {
+     *                             faceRectangle (Required): {
+     *                                 top: int (Required)
+     *                                 left: int (Required)
+     *                                 width: int (Required)
+     *                                 height: int (Required)
+     *                             }
+     *                         }
      *                     }
-     *                     matchConfidence: double (Required)
-     *                     isIdentical: boolean (Required)
+     *                     digest: String (Required)
+     *                     sessionImageId: String (Optional)
      *                 }
-     *                  (Optional): {
-     *                     String: BinaryData (Required)
+     *                 error (Optional): {
+     *                     code: String (Required)
+     *                     message: String (Required)
+     *                     targets (Required): (recursive schema, see targets above)
      *                 }
      *             }
-     *             statusCode: int (Required)
-     *             latencyInMilliseconds: long (Required)
-     *         }
-     *         digest: String (Required)
-     *         sessionImageId: String (Optional)
-     *         verifyImageHash: String (Optional)
+     *         ]
      *     }
      * }
      * }
@@ -207,197 +211,6 @@ public Mono> getLivenessSessionResultWithResponse(String se
         return this.serviceClient.getLivenessSessionResultWithResponseAsync(sessionId, requestOptions);
     }
 
-    /**
-     * Lists sessions for /detectLiveness/SingleModal.
-     *
-     * Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-sessions for
-     * more details.
-     * 

Query Parameters

- * - * - * - * - * - *
Query Parameters
NameTypeRequiredDescription
startStringNoList resources greater than the "start". It contains no more than - * 64 characters. Default is empty.
topIntegerNoThe number of items to list, ranging in [1, 1000]. Default is - * 1000.
- * You can add these to a request with {@link RequestOptions#addQueryParam} - *

Response Body Schema

- * - *
-     * {@code
-     * [
-     *      (Required){
-     *         id: String (Required)
-     *         createdDateTime: OffsetDateTime (Required)
-     *         sessionStartDateTime: OffsetDateTime (Optional)
-     *         sessionExpired: boolean (Required)
-     *         deviceCorrelationId: String (Optional)
-     *         authTokenTimeToLiveInSeconds: Integer (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. - * @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. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getLivenessSessionsWithResponse(RequestOptions requestOptions) { - return this.serviceClient.getLivenessSessionsWithResponseAsync(requestOptions); - } - - /** - * Please refer to - * https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-session-audit-entries for more - * details. - *

Query Parameters

- * - * - * - * - * - *
Query Parameters
NameTypeRequiredDescription
startStringNoList resources greater than the "start". It contains no more than - * 64 characters. Default is empty.
topIntegerNoThe number of items to list, ranging in [1, 1000]. Default is - * 1000.
- * You can add these to a request with {@link RequestOptions#addQueryParam} - *

Response Body Schema

- * - *
-     * {@code
-     * [
-     *      (Required){
-     *         id: long (Required)
-     *         sessionId: String (Required)
-     *         requestId: String (Required)
-     *         clientRequestId: String (Required)
-     *         receivedDateTime: OffsetDateTime (Required)
-     *         request (Required): {
-     *             url: String (Required)
-     *             method: String (Required)
-     *             contentLength: Long (Optional)
-     *             contentType: String (Required)
-     *             userAgent: String (Optional)
-     *         }
-     *         response (Required): {
-     *             body (Required): {
-     *                 livenessDecision: String(uncertain/realface/spoofface) (Optional)
-     *                 target (Optional): {
-     *                     faceRectangle (Required): {
-     *                         top: int (Required)
-     *                         left: int (Required)
-     *                         width: int (Required)
-     *                         height: int (Required)
-     *                     }
-     *                     fileName: String (Required)
-     *                     timeOffsetWithinFile: int (Required)
-     *                     imageType: String(Color/Infrared/Depth) (Required)
-     *                 }
-     *                 modelVersionUsed: String(2022-10-15-preview.04/2023-12-20-preview.06) (Optional)
-     *                 verifyResult (Optional): {
-     *                     verifyImage (Required): {
-     *                         faceRectangle (Required): (recursive schema, see faceRectangle above)
-     *                         qualityForRecognition: String(low/medium/high) (Required)
-     *                     }
-     *                     matchConfidence: double (Required)
-     *                     isIdentical: boolean (Required)
-     *                 }
-     *                  (Optional): {
-     *                     String: BinaryData (Required)
-     *                 }
-     *             }
-     *             statusCode: int (Required)
-     *             latencyInMilliseconds: long (Required)
-     *         }
-     *         digest: String (Required)
-     *         sessionImageId: String (Optional)
-     *         verifyImageHash: String (Optional)
-     *     }
-     * ]
-     * }
-     * 
- * - * @param sessionId The unique ID to reference this session. - * @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. - * @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. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getLivenessSessionAuditEntriesWithResponse(String sessionId, - RequestOptions requestOptions) { - return this.serviceClient.getLivenessSessionAuditEntriesWithResponseAsync(sessionId, requestOptions); - } - - /** - * Create a new liveness session with verify. Client device submits VerifyImage during the - * /detectLivenessWithVerify/singleModal call. - * - * Please refer to - * https://learn.microsoft.com/rest/api/face/liveness-session-operations/create-liveness-with-verify-session for - * more details. - *

Request Body Schema

- * - *
-     * {@code
-     * {
-     *     livenessOperationMode: String(Passive/PassiveActive) (Required)
-     *     sendResultsToClient: Boolean (Optional)
-     *     deviceCorrelationIdSetInClient: Boolean (Optional)
-     *     enableSessionImage: Boolean (Optional)
-     *     livenessSingleModalModel: String(2022-10-15-preview.04/2023-12-20-preview.06) (Optional)
-     *     deviceCorrelationId: String (Optional)
-     *     authTokenTimeToLiveInSeconds: Integer (Optional)
-     *     returnVerifyImageHash: Boolean (Optional)
-     *     verifyConfidenceThreshold: Double (Optional)
-     * }
-     * }
-     * 
- * - *

Response Body Schema

- * - *
-     * {@code
-     * {
-     *     sessionId: String (Required)
-     *     authToken: String (Required)
-     *     verifyImage (Optional): {
-     *         faceRectangle (Required): {
-     *             top: int (Required)
-     *             left: int (Required)
-     *             width: int (Required)
-     *             height: int (Required)
-     *         }
-     *         qualityForRecognition: String(low/medium/high) (Required)
-     *     }
-     * }
-     * }
-     * 
- * - * @param body Body parameter. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @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. - * @return response of liveness session with verify creation with verify image provided along with {@link Response} - * on successful completion of {@link Mono}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createLivenessWithVerifySessionWithResponse(BinaryData body, - RequestOptions requestOptions) { - return this.serviceClient.createLivenessWithVerifySessionWithResponseAsync(body, requestOptions); - } - /** * Create a new liveness session with verify. Provide the verify image during session creation. * @@ -411,14 +224,47 @@ Mono> createLivenessWithVerifySessionWithResponse(BinaryDat * { * sessionId: String (Required) * authToken: String (Required) - * verifyImage (Optional): { - * faceRectangle (Required): { - * top: int (Required) - * left: int (Required) - * width: int (Required) - * height: int (Required) - * } - * qualityForRecognition: String(low/medium/high) (Required) + * status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required) + * modelVersion: String(2024-11-15) (Optional) + * results (Required): { + * verifyReferences (Required): [ + * (Required){ + * referenceType: String(Color/Infrared/Depth) (Required) + * faceRectangle (Required): { + * top: int (Required) + * left: int (Required) + * width: int (Required) + * height: int (Required) + * } + * qualityForRecognition: String(low/medium/high) (Required) + * } + * ] + * attempts (Required): [ + * (Required){ + * attemptId: int (Required) + * attemptStatus: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required) + * result (Optional): { + * livenessDecision: String(uncertain/realface/spoofface) (Optional) + * targets (Required): { + * color (Required): { + * faceRectangle (Required): (recursive schema, see faceRectangle above) + * } + * } + * digest: String (Required) + * sessionImageId: String (Optional) + * verifyResult (Optional): { + * matchConfidence: double (Required) + * isIdentical: boolean (Required) + * } + * verifyImageHash: String (Optional) + * } + * error (Optional): { + * code: String (Required) + * message: String (Required) + * targets (Required): (recursive schema, see targets above) + * } + * } + * ] * } * } * } @@ -430,16 +276,16 @@ Mono> createLivenessWithVerifySessionWithResponse(BinaryDat * @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. - * @return response of liveness session with verify creation with verify image provided along with {@link Response} - * on successful completion of {@link Mono}. + * @return session result of detect liveness with verify along with {@link Response} on successful completion of + * {@link Mono}. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createLivenessWithVerifySessionWithVerifyImageWithResponse(BinaryData body, + Mono> createLivenessWithVerifySessionWithResponse(BinaryData body, RequestOptions requestOptions) { - // Operation 'createLivenessWithVerifySessionWithVerifyImage' is of content-type 'multipart/form-data'. Protocol - // API is not usable and hence not generated. - return this.serviceClient.createLivenessWithVerifySessionWithVerifyImageWithResponseAsync(body, requestOptions); + // Operation 'createLivenessWithVerifySession' is of content-type 'multipart/form-data'. Protocol API is not + // usable and hence not generated. + return this.serviceClient.createLivenessWithVerifySessionWithResponseAsync(body, requestOptions); } /** @@ -473,59 +319,49 @@ public Mono> deleteLivenessWithVerifySessionWithResponse(String s *
      * {@code
      * {
-     *     id: String (Required)
-     *     createdDateTime: OffsetDateTime (Required)
-     *     sessionStartDateTime: OffsetDateTime (Optional)
-     *     sessionExpired: boolean (Required)
-     *     deviceCorrelationId: String (Optional)
-     *     authTokenTimeToLiveInSeconds: Integer (Optional)
-     *     status: String(NotStarted/Started/ResultAvailable) (Required)
-     *     result (Optional): {
-     *         id: long (Required)
-     *         sessionId: String (Required)
-     *         requestId: String (Required)
-     *         clientRequestId: String (Required)
-     *         receivedDateTime: OffsetDateTime (Required)
-     *         request (Required): {
-     *             url: String (Required)
-     *             method: String (Required)
-     *             contentLength: Long (Optional)
-     *             contentType: String (Required)
-     *             userAgent: String (Optional)
-     *         }
-     *         response (Required): {
-     *             body (Required): {
-     *                 livenessDecision: String(uncertain/realface/spoofface) (Optional)
-     *                 target (Optional): {
-     *                     faceRectangle (Required): {
-     *                         top: int (Required)
-     *                         left: int (Required)
-     *                         width: int (Required)
-     *                         height: int (Required)
-     *                     }
-     *                     fileName: String (Required)
-     *                     timeOffsetWithinFile: int (Required)
-     *                     imageType: String(Color/Infrared/Depth) (Required)
+     *     sessionId: String (Required)
+     *     authToken: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *     modelVersion: String(2024-11-15) (Optional)
+     *     results (Required): {
+     *         verifyReferences (Required): [
+     *              (Required){
+     *                 referenceType: String(Color/Infrared/Depth) (Required)
+     *                 faceRectangle (Required): {
+     *                     top: int (Required)
+     *                     left: int (Required)
+     *                     width: int (Required)
+     *                     height: int (Required)
      *                 }
-     *                 modelVersionUsed: String(2022-10-15-preview.04/2023-12-20-preview.06) (Optional)
-     *                 verifyResult (Optional): {
-     *                     verifyImage (Required): {
-     *                         faceRectangle (Required): (recursive schema, see faceRectangle above)
-     *                         qualityForRecognition: String(low/medium/high) (Required)
+     *                 qualityForRecognition: String(low/medium/high) (Required)
+     *             }
+     *         ]
+     *         attempts (Required): [
+     *              (Required){
+     *                 attemptId: int (Required)
+     *                 attemptStatus: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *                 result (Optional): {
+     *                     livenessDecision: String(uncertain/realface/spoofface) (Optional)
+     *                     targets (Required): {
+     *                         color (Required): {
+     *                             faceRectangle (Required): (recursive schema, see faceRectangle above)
+     *                         }
      *                     }
-     *                     matchConfidence: double (Required)
-     *                     isIdentical: boolean (Required)
+     *                     digest: String (Required)
+     *                     sessionImageId: String (Optional)
+     *                     verifyResult (Optional): {
+     *                         matchConfidence: double (Required)
+     *                         isIdentical: boolean (Required)
+     *                     }
+     *                     verifyImageHash: String (Optional)
      *                 }
-     *                  (Optional): {
-     *                     String: BinaryData (Required)
+     *                 error (Optional): {
+     *                     code: String (Required)
+     *                     message: String (Required)
+     *                     targets (Required): (recursive schema, see targets above)
      *                 }
      *             }
-     *             statusCode: int (Required)
-     *             latencyInMilliseconds: long (Required)
-     *         }
-     *         digest: String (Required)
-     *         sessionImageId: String (Optional)
-     *         verifyImageHash: String (Optional)
+     *         ]
      *     }
      * }
      * }
@@ -547,137 +383,6 @@ public Mono> getLivenessWithVerifySessionResultWithResponse
         return this.serviceClient.getLivenessWithVerifySessionResultWithResponseAsync(sessionId, requestOptions);
     }
 
-    /**
-     * Lists sessions for /detectLivenessWithVerify/SingleModal.
-     *
-     * Please refer to
-     * https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-with-verify-sessions for more
-     * details.
-     * 

Query Parameters

- * - * - * - * - * - *
Query Parameters
NameTypeRequiredDescription
startStringNoList resources greater than the "start". It contains no more than - * 64 characters. Default is empty.
topIntegerNoThe number of items to list, ranging in [1, 1000]. Default is - * 1000.
- * You can add these to a request with {@link RequestOptions#addQueryParam} - *

Response Body Schema

- * - *
-     * {@code
-     * [
-     *      (Required){
-     *         id: String (Required)
-     *         createdDateTime: OffsetDateTime (Required)
-     *         sessionStartDateTime: OffsetDateTime (Optional)
-     *         sessionExpired: boolean (Required)
-     *         deviceCorrelationId: String (Optional)
-     *         authTokenTimeToLiveInSeconds: Integer (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. - * @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. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getLivenessWithVerifySessionsWithResponse(RequestOptions requestOptions) { - return this.serviceClient.getLivenessWithVerifySessionsWithResponseAsync(requestOptions); - } - - /** - * Please refer to - * https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-with-verify-session-audit-entries - * for more details. - *

Query Parameters

- * - * - * - * - * - *
Query Parameters
NameTypeRequiredDescription
startStringNoList resources greater than the "start". It contains no more than - * 64 characters. Default is empty.
topIntegerNoThe number of items to list, ranging in [1, 1000]. Default is - * 1000.
- * You can add these to a request with {@link RequestOptions#addQueryParam} - *

Response Body Schema

- * - *
-     * {@code
-     * [
-     *      (Required){
-     *         id: long (Required)
-     *         sessionId: String (Required)
-     *         requestId: String (Required)
-     *         clientRequestId: String (Required)
-     *         receivedDateTime: OffsetDateTime (Required)
-     *         request (Required): {
-     *             url: String (Required)
-     *             method: String (Required)
-     *             contentLength: Long (Optional)
-     *             contentType: String (Required)
-     *             userAgent: String (Optional)
-     *         }
-     *         response (Required): {
-     *             body (Required): {
-     *                 livenessDecision: String(uncertain/realface/spoofface) (Optional)
-     *                 target (Optional): {
-     *                     faceRectangle (Required): {
-     *                         top: int (Required)
-     *                         left: int (Required)
-     *                         width: int (Required)
-     *                         height: int (Required)
-     *                     }
-     *                     fileName: String (Required)
-     *                     timeOffsetWithinFile: int (Required)
-     *                     imageType: String(Color/Infrared/Depth) (Required)
-     *                 }
-     *                 modelVersionUsed: String(2022-10-15-preview.04/2023-12-20-preview.06) (Optional)
-     *                 verifyResult (Optional): {
-     *                     verifyImage (Required): {
-     *                         faceRectangle (Required): (recursive schema, see faceRectangle above)
-     *                         qualityForRecognition: String(low/medium/high) (Required)
-     *                     }
-     *                     matchConfidence: double (Required)
-     *                     isIdentical: boolean (Required)
-     *                 }
-     *                  (Optional): {
-     *                     String: BinaryData (Required)
-     *                 }
-     *             }
-     *             statusCode: int (Required)
-     *             latencyInMilliseconds: long (Required)
-     *         }
-     *         digest: String (Required)
-     *         sessionImageId: String (Optional)
-     *         verifyImageHash: String (Optional)
-     *     }
-     * ]
-     * }
-     * 
- * - * @param sessionId The unique ID to reference this session. - * @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. - * @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. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getLivenessWithVerifySessionAuditEntriesWithResponse(String sessionId, - RequestOptions requestOptions) { - return this.serviceClient.getLivenessWithVerifySessionAuditEntriesWithResponseAsync(sessionId, requestOptions); - } - /** * Create a new detect liveness session. * @@ -691,15 +396,15 @@ public Mono> getLivenessWithVerifySessionAuditEntriesWithRe * @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 of liveness session creation on successful completion of {@link Mono}. + * @return session result of detect liveness on successful completion of {@link Mono}. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createLivenessSession(CreateLivenessSessionContent body) { + public Mono createLivenessSession(CreateLivenessSessionContent body) { // Generated convenience method for createLivenessSessionWithResponse RequestOptions requestOptions = new RequestOptions(); return createLivenessSessionWithResponse(BinaryData.fromObject(body), requestOptions).flatMap(FluxUtil::toMono) - .map(protocolMethodData -> protocolMethodData.toObject(CreateLivenessSessionResult.class)); + .map(protocolMethodData -> protocolMethodData.toObject(LivenessSession.class)); } /** @@ -747,114 +452,6 @@ public Mono getLivenessSessionResult(String sessionId) { .map(protocolMethodData -> protocolMethodData.toObject(LivenessSession.class)); } - /** - * Lists sessions for /detectLiveness/SingleModal. - * - * Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-sessions 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. - * @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 the response body on successful completion of {@link Mono}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getLivenessSessions(String start, Integer top) { - // Generated convenience method for getLivenessSessionsWithResponse - RequestOptions requestOptions = new RequestOptions(); - if (start != null) { - requestOptions.addQueryParam("start", start, false); - } - if (top != null) { - requestOptions.addQueryParam("top", String.valueOf(top), false); - } - return getLivenessSessionsWithResponse(requestOptions).flatMap(FluxUtil::toMono) - .map(protocolMethodData -> protocolMethodData.toObject(TYPE_REFERENCE_LIST_LIVENESS_SESSION_ITEM)); - } - - /** - * Lists sessions for /detectLiveness/SingleModal. - * - * Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-sessions 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. - * @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 the response body on successful completion of {@link Mono}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getLivenessSessions() { - // Generated convenience method for getLivenessSessionsWithResponse - RequestOptions requestOptions = new RequestOptions(); - return getLivenessSessionsWithResponse(requestOptions).flatMap(FluxUtil::toMono) - .map(protocolMethodData -> protocolMethodData.toObject(TYPE_REFERENCE_LIST_LIVENESS_SESSION_ITEM)); - } - - /** - * Please refer to - * https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-session-audit-entries for more - * details. - * - * @param sessionId The unique ID to reference this session. - * @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. - * @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 the response body on successful completion of {@link Mono}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getLivenessSessionAuditEntries(String sessionId, String start, - Integer top) { - // Generated convenience method for getLivenessSessionAuditEntriesWithResponse - RequestOptions requestOptions = new RequestOptions(); - if (start != null) { - requestOptions.addQueryParam("start", start, false); - } - if (top != null) { - requestOptions.addQueryParam("top", String.valueOf(top), false); - } - return getLivenessSessionAuditEntriesWithResponse(sessionId, requestOptions).flatMap(FluxUtil::toMono) - .map(protocolMethodData -> protocolMethodData.toObject(TYPE_REFERENCE_LIST_LIVENESS_SESSION_AUDIT_ENTRY)); - } - - /** - * Please refer to - * https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-session-audit-entries for more - * details. - * - * @param sessionId The unique ID to reference this session. - * @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 the response body on successful completion of {@link Mono}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getLivenessSessionAuditEntries(String sessionId) { - // Generated convenience method for getLivenessSessionAuditEntriesWithResponse - RequestOptions requestOptions = new RequestOptions(); - return getLivenessSessionAuditEntriesWithResponse(sessionId, requestOptions).flatMap(FluxUtil::toMono) - .map(protocolMethodData -> protocolMethodData.toObject(TYPE_REFERENCE_LIST_LIVENESS_SESSION_AUDIT_ENTRY)); - } - /** * Delete all session related information for matching the specified session id. * @@ -902,159 +499,6 @@ public Mono getLivenessWithVerifySessionResult(String .map(protocolMethodData -> protocolMethodData.toObject(LivenessWithVerifySession.class)); } - /** - * Lists sessions for /detectLivenessWithVerify/SingleModal. - * - * Please refer to - * https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-with-verify-sessions 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. - * @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 the response body on successful completion of {@link Mono}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getLivenessWithVerifySessions(String start, Integer top) { - // Generated convenience method for getLivenessWithVerifySessionsWithResponse - RequestOptions requestOptions = new RequestOptions(); - if (start != null) { - requestOptions.addQueryParam("start", start, false); - } - if (top != null) { - requestOptions.addQueryParam("top", String.valueOf(top), false); - } - return getLivenessWithVerifySessionsWithResponse(requestOptions).flatMap(FluxUtil::toMono) - .map(protocolMethodData -> protocolMethodData.toObject(TYPE_REFERENCE_LIST_LIVENESS_SESSION_ITEM)); - } - - /** - * Lists sessions for /detectLivenessWithVerify/SingleModal. - * - * Please refer to - * https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-with-verify-sessions 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. - * @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 the response body on successful completion of {@link Mono}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getLivenessWithVerifySessions() { - // Generated convenience method for getLivenessWithVerifySessionsWithResponse - RequestOptions requestOptions = new RequestOptions(); - return getLivenessWithVerifySessionsWithResponse(requestOptions).flatMap(FluxUtil::toMono) - .map(protocolMethodData -> protocolMethodData.toObject(TYPE_REFERENCE_LIST_LIVENESS_SESSION_ITEM)); - } - - /** - * Please refer to - * https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-with-verify-session-audit-entries - * for more details. - * - * @param sessionId The unique ID to reference this session. - * @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. - * @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 the response body on successful completion of {@link Mono}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getLivenessWithVerifySessionAuditEntries(String sessionId, - String start, Integer top) { - // Generated convenience method for getLivenessWithVerifySessionAuditEntriesWithResponse - RequestOptions requestOptions = new RequestOptions(); - if (start != null) { - requestOptions.addQueryParam("start", start, false); - } - if (top != null) { - requestOptions.addQueryParam("top", String.valueOf(top), false); - } - return getLivenessWithVerifySessionAuditEntriesWithResponse(sessionId, requestOptions).flatMap(FluxUtil::toMono) - .map(protocolMethodData -> protocolMethodData.toObject(TYPE_REFERENCE_LIST_LIVENESS_SESSION_AUDIT_ENTRY)); - } - - /** - * Please refer to - * https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-with-verify-session-audit-entries - * for more details. - * - * @param sessionId The unique ID to reference this session. - * @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 the response body on successful completion of {@link Mono}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getLivenessWithVerifySessionAuditEntries(String sessionId) { - // Generated convenience method for getLivenessWithVerifySessionAuditEntriesWithResponse - RequestOptions requestOptions = new RequestOptions(); - return getLivenessWithVerifySessionAuditEntriesWithResponse(sessionId, requestOptions).flatMap(FluxUtil::toMono) - .map(protocolMethodData -> protocolMethodData.toObject(TYPE_REFERENCE_LIST_LIVENESS_SESSION_AUDIT_ENTRY)); - } - - @Generated - private static final TypeReference> TYPE_REFERENCE_LIST_LIVENESS_SESSION_ITEM - = new TypeReference>() { - }; - - @Generated - private static final TypeReference> TYPE_REFERENCE_LIST_LIVENESS_SESSION_AUDIT_ENTRY - = new TypeReference>() { - }; - - /** - * Create a new liveness session with verify. Provide the verify image during session creation. - * - * Please refer to - * https://learn.microsoft.com/rest/api/face/liveness-session-operations/create-liveness-with-verify-session-with-verify-image - * for more details. - * - * @param body Request content of liveness with verify session creation. - * @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 of liveness session with verify creation with verify image provided on successful completion of - * {@link Mono}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - Mono - createLivenessWithVerifySessionWithVerifyImage(CreateLivenessWithVerifySessionMultipartContent body) { - // Generated convenience method for createLivenessWithVerifySessionWithVerifyImageWithResponse - RequestOptions requestOptions = new RequestOptions(); - return createLivenessWithVerifySessionWithVerifyImageWithResponse( - new MultipartFormDataHelper(requestOptions).serializeJsonField("Parameters", body.getParameters()) - .serializeFileField("VerifyImage", body.getVerifyImage().getContent(), - body.getVerifyImage().getContentType(), body.getVerifyImage().getFilename()) - .end() - .getRequestBody(), - requestOptions).flatMap(FluxUtil::toMono) - .map(protocolMethodData -> protocolMethodData.toObject(CreateLivenessWithVerifySessionResult.class)); - } - /** * Detect human faces in an image, return face rectangles, and optionally with faceIds, landmarks, and attributes. * @@ -1330,32 +774,43 @@ public Mono getSessionImage(String sessionImageId) { }; /** - * Create a new liveness session with verify. Client device submits VerifyImage during the - * /detectLivenessWithVerify/singleModal call. + * Create a new liveness session with verify. Provide the verify image during session creation. * * Please refer to - * https://learn.microsoft.com/rest/api/face/liveness-session-operations/create-liveness-with-verify-session for - * more details. + * https://learn.microsoft.com/rest/api/face/liveness-session-operations/create-liveness-with-verify-session-with-verify-image + * for more details. * - * @param body Body parameter. + * @param body Request content of liveness with verify session creation. * @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 of liveness session with verify creation with verify image provided on successful completion of - * {@link Mono}. + * @return session result of detect liveness with verify on successful completion of {@link Mono}. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Mono + public Mono createLivenessWithVerifySession(CreateLivenessWithVerifySessionContent body) { // Generated convenience method for createLivenessWithVerifySessionWithResponse RequestOptions requestOptions = new RequestOptions(); - return createLivenessWithVerifySessionWithResponse(BinaryData.fromObject(body), requestOptions) - .flatMap(FluxUtil::toMono) - .map(protocolMethodData -> protocolMethodData.toObject(CreateLivenessWithVerifySessionResult.class)); + return createLivenessWithVerifySessionWithResponse(new MultipartFormDataHelper(requestOptions) + .serializeTextField("livenessOperationMode", Objects.toString(body.getLivenessOperationMode())) + .serializeTextField("deviceCorrelationIdSetInClient", + Objects.toString(body.isDeviceCorrelationIdSetInClient())) + .serializeTextField("enableSessionImage", Objects.toString(body.isEnableSessionImage())) + .serializeTextField("livenessModelVersion", Objects.toString(body.getLivenessModelVersion())) + .serializeTextField("returnVerifyImageHash", Objects.toString(body.isReturnVerifyImageHash())) + .serializeTextField("verifyConfidenceThreshold", Objects.toString(body.getVerifyConfidenceThreshold())) + .serializeFileField("verifyImage", body.getVerifyImage().getContent(), + body.getVerifyImage().getContentType(), body.getVerifyImage().getFilename()) + .serializeTextField("deviceCorrelationId", body.getDeviceCorrelationId()) + .serializeTextField("authTokenTimeToLiveInSeconds", + Objects.toString(body.getAuthTokenTimeToLiveInSeconds())) + .end() + .getRequestBody(), requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(LivenessWithVerifySession.class)); } /** diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceSessionClient.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceSessionClient.java index dceef3d438cd..028b960b0a7c 100644 --- a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceSessionClient.java +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceSessionClient.java @@ -9,7 +9,6 @@ import com.azure.ai.vision.face.implementation.models.DetectFromSessionImageRequest; import com.azure.ai.vision.face.implementation.models.VerifyImageFileDetails; import com.azure.ai.vision.face.models.CreateLivenessSessionContent; -import com.azure.ai.vision.face.models.CreateLivenessSessionResult; import com.azure.ai.vision.face.models.CreateLivenessWithVerifySessionContent; import com.azure.ai.vision.face.models.CreateLivenessWithVerifySessionResult; import com.azure.ai.vision.face.models.DetectFromSessionImageOptions; @@ -18,9 +17,8 @@ import com.azure.ai.vision.face.models.FaceDetectionResult; import com.azure.ai.vision.face.models.FaceRecognitionModel; import com.azure.ai.vision.face.models.LivenessSession; -import com.azure.ai.vision.face.models.LivenessSessionAuditEntry; -import com.azure.ai.vision.face.models.LivenessSessionItem; import com.azure.ai.vision.face.models.LivenessWithVerifySession; +import com.azure.ai.vision.face.models.VerifyImageFileDetails; import com.azure.core.annotation.Generated; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceClient; @@ -67,10 +65,9 @@ public final class FaceSessionClient { * {@code * { * livenessOperationMode: String(Passive/PassiveActive) (Required) - * sendResultsToClient: Boolean (Optional) * deviceCorrelationIdSetInClient: Boolean (Optional) * enableSessionImage: Boolean (Optional) - * livenessSingleModalModel: String(2022-10-15-preview.04/2023-12-20-preview.06) (Optional) + * livenessModelVersion: String(2024-11-15) (Optional) * deviceCorrelationId: String (Optional) * authTokenTimeToLiveInSeconds: Integer (Optional) * } @@ -84,6 +81,36 @@ public final class FaceSessionClient { * { * sessionId: String (Required) * authToken: String (Required) + * status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required) + * modelVersion: String(2024-11-15) (Optional) + * results (Required): { + * attempts (Required): [ + * (Required){ + * attemptId: int (Required) + * attemptStatus: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required) + * result (Optional): { + * livenessDecision: String(uncertain/realface/spoofface) (Optional) + * targets (Required): { + * color (Required): { + * faceRectangle (Required): { + * top: int (Required) + * left: int (Required) + * width: int (Required) + * height: int (Required) + * } + * } + * } + * digest: String (Required) + * sessionImageId: String (Optional) + * } + * error (Optional): { + * code: String (Required) + * message: String (Required) + * targets (Required): (recursive schema, see targets above) + * } + * } + * ] + * } * } * } *
@@ -94,7 +121,7 @@ public final class FaceSessionClient { * @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. - * @return response of liveness session creation along with {@link Response}. + * @return session result of detect liveness along with {@link Response}. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) @@ -130,59 +157,37 @@ public Response deleteLivenessSessionWithResponse(String sessionId, Reques *
      * {@code
      * {
-     *     id: String (Required)
-     *     createdDateTime: OffsetDateTime (Required)
-     *     sessionStartDateTime: OffsetDateTime (Optional)
-     *     sessionExpired: boolean (Required)
-     *     deviceCorrelationId: String (Optional)
-     *     authTokenTimeToLiveInSeconds: Integer (Optional)
-     *     status: String(NotStarted/Started/ResultAvailable) (Required)
-     *     result (Optional): {
-     *         id: long (Required)
-     *         sessionId: String (Required)
-     *         requestId: String (Required)
-     *         clientRequestId: String (Required)
-     *         receivedDateTime: OffsetDateTime (Required)
-     *         request (Required): {
-     *             url: String (Required)
-     *             method: String (Required)
-     *             contentLength: Long (Optional)
-     *             contentType: String (Required)
-     *             userAgent: String (Optional)
-     *         }
-     *         response (Required): {
-     *             body (Required): {
-     *                 livenessDecision: String(uncertain/realface/spoofface) (Optional)
-     *                 target (Optional): {
-     *                     faceRectangle (Required): {
-     *                         top: int (Required)
-     *                         left: int (Required)
-     *                         width: int (Required)
-     *                         height: int (Required)
-     *                     }
-     *                     fileName: String (Required)
-     *                     timeOffsetWithinFile: int (Required)
-     *                     imageType: String(Color/Infrared/Depth) (Required)
-     *                 }
-     *                 modelVersionUsed: String(2022-10-15-preview.04/2023-12-20-preview.06) (Optional)
-     *                 verifyResult (Optional): {
-     *                     verifyImage (Required): {
-     *                         faceRectangle (Required): (recursive schema, see faceRectangle above)
-     *                         qualityForRecognition: String(low/medium/high) (Required)
+     *     sessionId: String (Required)
+     *     authToken: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *     modelVersion: String(2024-11-15) (Optional)
+     *     results (Required): {
+     *         attempts (Required): [
+     *              (Required){
+     *                 attemptId: int (Required)
+     *                 attemptStatus: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *                 result (Optional): {
+     *                     livenessDecision: String(uncertain/realface/spoofface) (Optional)
+     *                     targets (Required): {
+     *                         color (Required): {
+     *                             faceRectangle (Required): {
+     *                                 top: int (Required)
+     *                                 left: int (Required)
+     *                                 width: int (Required)
+     *                                 height: int (Required)
+     *                             }
+     *                         }
      *                     }
-     *                     matchConfidence: double (Required)
-     *                     isIdentical: boolean (Required)
+     *                     digest: String (Required)
+     *                     sessionImageId: String (Optional)
      *                 }
-     *                  (Optional): {
-     *                     String: BinaryData (Required)
+     *                 error (Optional): {
+     *                     code: String (Required)
+     *                     message: String (Required)
+     *                     targets (Required): (recursive schema, see targets above)
      *                 }
      *             }
-     *             statusCode: int (Required)
-     *             latencyInMilliseconds: long (Required)
-     *         }
-     *         digest: String (Required)
-     *         sessionImageId: String (Optional)
-     *         verifyImageHash: String (Optional)
+     *         ]
      *     }
      * }
      * }
@@ -202,195 +207,6 @@ public Response getLivenessSessionResultWithResponse(String sessionI
         return this.serviceClient.getLivenessSessionResultWithResponse(sessionId, requestOptions);
     }
 
-    /**
-     * Lists sessions for /detectLiveness/SingleModal.
-     *
-     * Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-sessions for
-     * more details.
-     * 

Query Parameters

- * - * - * - * - * - *
Query Parameters
NameTypeRequiredDescription
startStringNoList resources greater than the "start". It contains no more than - * 64 characters. Default is empty.
topIntegerNoThe number of items to list, ranging in [1, 1000]. Default is - * 1000.
- * You can add these to a request with {@link RequestOptions#addQueryParam} - *

Response Body Schema

- * - *
-     * {@code
-     * [
-     *      (Required){
-     *         id: String (Required)
-     *         createdDateTime: OffsetDateTime (Required)
-     *         sessionStartDateTime: OffsetDateTime (Optional)
-     *         sessionExpired: boolean (Required)
-     *         deviceCorrelationId: String (Optional)
-     *         authTokenTimeToLiveInSeconds: Integer (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. - * @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. - * @return the response body along with {@link Response}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getLivenessSessionsWithResponse(RequestOptions requestOptions) { - return this.serviceClient.getLivenessSessionsWithResponse(requestOptions); - } - - /** - * Please refer to - * https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-session-audit-entries for more - * details. - *

Query Parameters

- * - * - * - * - * - *
Query Parameters
NameTypeRequiredDescription
startStringNoList resources greater than the "start". It contains no more than - * 64 characters. Default is empty.
topIntegerNoThe number of items to list, ranging in [1, 1000]. Default is - * 1000.
- * You can add these to a request with {@link RequestOptions#addQueryParam} - *

Response Body Schema

- * - *
-     * {@code
-     * [
-     *      (Required){
-     *         id: long (Required)
-     *         sessionId: String (Required)
-     *         requestId: String (Required)
-     *         clientRequestId: String (Required)
-     *         receivedDateTime: OffsetDateTime (Required)
-     *         request (Required): {
-     *             url: String (Required)
-     *             method: String (Required)
-     *             contentLength: Long (Optional)
-     *             contentType: String (Required)
-     *             userAgent: String (Optional)
-     *         }
-     *         response (Required): {
-     *             body (Required): {
-     *                 livenessDecision: String(uncertain/realface/spoofface) (Optional)
-     *                 target (Optional): {
-     *                     faceRectangle (Required): {
-     *                         top: int (Required)
-     *                         left: int (Required)
-     *                         width: int (Required)
-     *                         height: int (Required)
-     *                     }
-     *                     fileName: String (Required)
-     *                     timeOffsetWithinFile: int (Required)
-     *                     imageType: String(Color/Infrared/Depth) (Required)
-     *                 }
-     *                 modelVersionUsed: String(2022-10-15-preview.04/2023-12-20-preview.06) (Optional)
-     *                 verifyResult (Optional): {
-     *                     verifyImage (Required): {
-     *                         faceRectangle (Required): (recursive schema, see faceRectangle above)
-     *                         qualityForRecognition: String(low/medium/high) (Required)
-     *                     }
-     *                     matchConfidence: double (Required)
-     *                     isIdentical: boolean (Required)
-     *                 }
-     *                  (Optional): {
-     *                     String: BinaryData (Required)
-     *                 }
-     *             }
-     *             statusCode: int (Required)
-     *             latencyInMilliseconds: long (Required)
-     *         }
-     *         digest: String (Required)
-     *         sessionImageId: String (Optional)
-     *         verifyImageHash: String (Optional)
-     *     }
-     * ]
-     * }
-     * 
- * - * @param sessionId The unique ID to reference this session. - * @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. - * @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. - * @return the response body along with {@link Response}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getLivenessSessionAuditEntriesWithResponse(String sessionId, - RequestOptions requestOptions) { - return this.serviceClient.getLivenessSessionAuditEntriesWithResponse(sessionId, requestOptions); - } - - /** - * Create a new liveness session with verify. Client device submits VerifyImage during the - * /detectLivenessWithVerify/singleModal call. - * - * Please refer to - * https://learn.microsoft.com/rest/api/face/liveness-session-operations/create-liveness-with-verify-session for - * more details. - *

Request Body Schema

- * - *
-     * {@code
-     * {
-     *     livenessOperationMode: String(Passive/PassiveActive) (Required)
-     *     sendResultsToClient: Boolean (Optional)
-     *     deviceCorrelationIdSetInClient: Boolean (Optional)
-     *     enableSessionImage: Boolean (Optional)
-     *     livenessSingleModalModel: String(2022-10-15-preview.04/2023-12-20-preview.06) (Optional)
-     *     deviceCorrelationId: String (Optional)
-     *     authTokenTimeToLiveInSeconds: Integer (Optional)
-     *     returnVerifyImageHash: Boolean (Optional)
-     *     verifyConfidenceThreshold: Double (Optional)
-     * }
-     * }
-     * 
- * - *

Response Body Schema

- * - *
-     * {@code
-     * {
-     *     sessionId: String (Required)
-     *     authToken: String (Required)
-     *     verifyImage (Optional): {
-     *         faceRectangle (Required): {
-     *             top: int (Required)
-     *             left: int (Required)
-     *             width: int (Required)
-     *             height: int (Required)
-     *         }
-     *         qualityForRecognition: String(low/medium/high) (Required)
-     *     }
-     * }
-     * }
-     * 
- * - * @param body Body parameter. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @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. - * @return response of liveness session with verify creation with verify image provided along with {@link Response}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - Response createLivenessWithVerifySessionWithResponse(BinaryData body, RequestOptions requestOptions) { - return this.serviceClient.createLivenessWithVerifySessionWithResponse(body, requestOptions); - } - /** * Create a new liveness session with verify. Provide the verify image during session creation. * @@ -404,14 +220,47 @@ Response createLivenessWithVerifySessionWithResponse(BinaryData body * { * sessionId: String (Required) * authToken: String (Required) - * verifyImage (Optional): { - * faceRectangle (Required): { - * top: int (Required) - * left: int (Required) - * width: int (Required) - * height: int (Required) - * } - * qualityForRecognition: String(low/medium/high) (Required) + * status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required) + * modelVersion: String(2024-11-15) (Optional) + * results (Required): { + * verifyReferences (Required): [ + * (Required){ + * referenceType: String(Color/Infrared/Depth) (Required) + * faceRectangle (Required): { + * top: int (Required) + * left: int (Required) + * width: int (Required) + * height: int (Required) + * } + * qualityForRecognition: String(low/medium/high) (Required) + * } + * ] + * attempts (Required): [ + * (Required){ + * attemptId: int (Required) + * attemptStatus: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required) + * result (Optional): { + * livenessDecision: String(uncertain/realface/spoofface) (Optional) + * targets (Required): { + * color (Required): { + * faceRectangle (Required): (recursive schema, see faceRectangle above) + * } + * } + * digest: String (Required) + * sessionImageId: String (Optional) + * verifyResult (Optional): { + * matchConfidence: double (Required) + * isIdentical: boolean (Required) + * } + * verifyImageHash: String (Optional) + * } + * error (Optional): { + * code: String (Required) + * message: String (Required) + * targets (Required): (recursive schema, see targets above) + * } + * } + * ] * } * } * } @@ -423,15 +272,14 @@ Response createLivenessWithVerifySessionWithResponse(BinaryData body * @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. - * @return response of liveness session with verify creation with verify image provided along with {@link Response}. + * @return session result of detect liveness with verify along with {@link Response}. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Response createLivenessWithVerifySessionWithVerifyImageWithResponse(BinaryData body, - RequestOptions requestOptions) { - // Operation 'createLivenessWithVerifySessionWithVerifyImage' is of content-type 'multipart/form-data'. Protocol - // API is not usable and hence not generated. - return this.serviceClient.createLivenessWithVerifySessionWithVerifyImageWithResponse(body, requestOptions); + Response createLivenessWithVerifySessionWithResponse(BinaryData body, RequestOptions requestOptions) { + // Operation 'createLivenessWithVerifySession' is of content-type 'multipart/form-data'. Protocol API is not + // usable and hence not generated. + return this.serviceClient.createLivenessWithVerifySessionWithResponse(body, requestOptions); } /** @@ -464,59 +312,49 @@ public Response deleteLivenessWithVerifySessionWithResponse(String session *
      * {@code
      * {
-     *     id: String (Required)
-     *     createdDateTime: OffsetDateTime (Required)
-     *     sessionStartDateTime: OffsetDateTime (Optional)
-     *     sessionExpired: boolean (Required)
-     *     deviceCorrelationId: String (Optional)
-     *     authTokenTimeToLiveInSeconds: Integer (Optional)
-     *     status: String(NotStarted/Started/ResultAvailable) (Required)
-     *     result (Optional): {
-     *         id: long (Required)
-     *         sessionId: String (Required)
-     *         requestId: String (Required)
-     *         clientRequestId: String (Required)
-     *         receivedDateTime: OffsetDateTime (Required)
-     *         request (Required): {
-     *             url: String (Required)
-     *             method: String (Required)
-     *             contentLength: Long (Optional)
-     *             contentType: String (Required)
-     *             userAgent: String (Optional)
-     *         }
-     *         response (Required): {
-     *             body (Required): {
-     *                 livenessDecision: String(uncertain/realface/spoofface) (Optional)
-     *                 target (Optional): {
-     *                     faceRectangle (Required): {
-     *                         top: int (Required)
-     *                         left: int (Required)
-     *                         width: int (Required)
-     *                         height: int (Required)
-     *                     }
-     *                     fileName: String (Required)
-     *                     timeOffsetWithinFile: int (Required)
-     *                     imageType: String(Color/Infrared/Depth) (Required)
+     *     sessionId: String (Required)
+     *     authToken: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *     modelVersion: String(2024-11-15) (Optional)
+     *     results (Required): {
+     *         verifyReferences (Required): [
+     *              (Required){
+     *                 referenceType: String(Color/Infrared/Depth) (Required)
+     *                 faceRectangle (Required): {
+     *                     top: int (Required)
+     *                     left: int (Required)
+     *                     width: int (Required)
+     *                     height: int (Required)
      *                 }
-     *                 modelVersionUsed: String(2022-10-15-preview.04/2023-12-20-preview.06) (Optional)
-     *                 verifyResult (Optional): {
-     *                     verifyImage (Required): {
-     *                         faceRectangle (Required): (recursive schema, see faceRectangle above)
-     *                         qualityForRecognition: String(low/medium/high) (Required)
+     *                 qualityForRecognition: String(low/medium/high) (Required)
+     *             }
+     *         ]
+     *         attempts (Required): [
+     *              (Required){
+     *                 attemptId: int (Required)
+     *                 attemptStatus: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *                 result (Optional): {
+     *                     livenessDecision: String(uncertain/realface/spoofface) (Optional)
+     *                     targets (Required): {
+     *                         color (Required): {
+     *                             faceRectangle (Required): (recursive schema, see faceRectangle above)
+     *                         }
      *                     }
-     *                     matchConfidence: double (Required)
-     *                     isIdentical: boolean (Required)
+     *                     digest: String (Required)
+     *                     sessionImageId: String (Optional)
+     *                     verifyResult (Optional): {
+     *                         matchConfidence: double (Required)
+     *                         isIdentical: boolean (Required)
+     *                     }
+     *                     verifyImageHash: String (Optional)
      *                 }
-     *                  (Optional): {
-     *                     String: BinaryData (Required)
+     *                 error (Optional): {
+     *                     code: String (Required)
+     *                     message: String (Required)
+     *                     targets (Required): (recursive schema, see targets above)
      *                 }
      *             }
-     *             statusCode: int (Required)
-     *             latencyInMilliseconds: long (Required)
-     *         }
-     *         digest: String (Required)
-     *         sessionImageId: String (Optional)
-     *         verifyImageHash: String (Optional)
+     *         ]
      *     }
      * }
      * }
@@ -537,137 +375,6 @@ public Response getLivenessWithVerifySessionResultWithResponse(Strin
         return this.serviceClient.getLivenessWithVerifySessionResultWithResponse(sessionId, requestOptions);
     }
 
-    /**
-     * Lists sessions for /detectLivenessWithVerify/SingleModal.
-     *
-     * Please refer to
-     * https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-with-verify-sessions for more
-     * details.
-     * 

Query Parameters

- * - * - * - * - * - *
Query Parameters
NameTypeRequiredDescription
startStringNoList resources greater than the "start". It contains no more than - * 64 characters. Default is empty.
topIntegerNoThe number of items to list, ranging in [1, 1000]. Default is - * 1000.
- * You can add these to a request with {@link RequestOptions#addQueryParam} - *

Response Body Schema

- * - *
-     * {@code
-     * [
-     *      (Required){
-     *         id: String (Required)
-     *         createdDateTime: OffsetDateTime (Required)
-     *         sessionStartDateTime: OffsetDateTime (Optional)
-     *         sessionExpired: boolean (Required)
-     *         deviceCorrelationId: String (Optional)
-     *         authTokenTimeToLiveInSeconds: Integer (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. - * @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. - * @return the response body along with {@link Response}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getLivenessWithVerifySessionsWithResponse(RequestOptions requestOptions) { - return this.serviceClient.getLivenessWithVerifySessionsWithResponse(requestOptions); - } - - /** - * Please refer to - * https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-with-verify-session-audit-entries - * for more details. - *

Query Parameters

- * - * - * - * - * - *
Query Parameters
NameTypeRequiredDescription
startStringNoList resources greater than the "start". It contains no more than - * 64 characters. Default is empty.
topIntegerNoThe number of items to list, ranging in [1, 1000]. Default is - * 1000.
- * You can add these to a request with {@link RequestOptions#addQueryParam} - *

Response Body Schema

- * - *
-     * {@code
-     * [
-     *      (Required){
-     *         id: long (Required)
-     *         sessionId: String (Required)
-     *         requestId: String (Required)
-     *         clientRequestId: String (Required)
-     *         receivedDateTime: OffsetDateTime (Required)
-     *         request (Required): {
-     *             url: String (Required)
-     *             method: String (Required)
-     *             contentLength: Long (Optional)
-     *             contentType: String (Required)
-     *             userAgent: String (Optional)
-     *         }
-     *         response (Required): {
-     *             body (Required): {
-     *                 livenessDecision: String(uncertain/realface/spoofface) (Optional)
-     *                 target (Optional): {
-     *                     faceRectangle (Required): {
-     *                         top: int (Required)
-     *                         left: int (Required)
-     *                         width: int (Required)
-     *                         height: int (Required)
-     *                     }
-     *                     fileName: String (Required)
-     *                     timeOffsetWithinFile: int (Required)
-     *                     imageType: String(Color/Infrared/Depth) (Required)
-     *                 }
-     *                 modelVersionUsed: String(2022-10-15-preview.04/2023-12-20-preview.06) (Optional)
-     *                 verifyResult (Optional): {
-     *                     verifyImage (Required): {
-     *                         faceRectangle (Required): (recursive schema, see faceRectangle above)
-     *                         qualityForRecognition: String(low/medium/high) (Required)
-     *                     }
-     *                     matchConfidence: double (Required)
-     *                     isIdentical: boolean (Required)
-     *                 }
-     *                  (Optional): {
-     *                     String: BinaryData (Required)
-     *                 }
-     *             }
-     *             statusCode: int (Required)
-     *             latencyInMilliseconds: long (Required)
-     *         }
-     *         digest: String (Required)
-     *         sessionImageId: String (Optional)
-     *         verifyImageHash: String (Optional)
-     *     }
-     * ]
-     * }
-     * 
- * - * @param sessionId The unique ID to reference this session. - * @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. - * @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. - * @return the response body along with {@link Response}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getLivenessWithVerifySessionAuditEntriesWithResponse(String sessionId, - RequestOptions requestOptions) { - return this.serviceClient.getLivenessWithVerifySessionAuditEntriesWithResponse(sessionId, requestOptions); - } - /** * Create a new detect liveness session. * @@ -681,15 +388,15 @@ public Response getLivenessWithVerifySessionAuditEntriesWithResponse * @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 of liveness session creation. + * @return session result of detect liveness. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public CreateLivenessSessionResult createLivenessSession(CreateLivenessSessionContent body) { + public LivenessSession createLivenessSession(CreateLivenessSessionContent body) { // Generated convenience method for createLivenessSessionWithResponse RequestOptions requestOptions = new RequestOptions(); return createLivenessSessionWithResponse(BinaryData.fromObject(body), requestOptions).getValue() - .toObject(CreateLivenessSessionResult.class); + .toObject(LivenessSession.class); } /** @@ -736,113 +443,6 @@ public LivenessSession getLivenessSessionResult(String sessionId) { .toObject(LivenessSession.class); } - /** - * Lists sessions for /detectLiveness/SingleModal. - * - * Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-sessions 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. - * @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 the response. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public List getLivenessSessions(String start, Integer top) { - // Generated convenience method for getLivenessSessionsWithResponse - RequestOptions requestOptions = new RequestOptions(); - if (start != null) { - requestOptions.addQueryParam("start", start, false); - } - if (top != null) { - requestOptions.addQueryParam("top", String.valueOf(top), false); - } - return getLivenessSessionsWithResponse(requestOptions).getValue() - .toObject(TYPE_REFERENCE_LIST_LIVENESS_SESSION_ITEM); - } - - /** - * Lists sessions for /detectLiveness/SingleModal. - * - * Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-sessions 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. - * @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 the response. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public List getLivenessSessions() { - // Generated convenience method for getLivenessSessionsWithResponse - RequestOptions requestOptions = new RequestOptions(); - return getLivenessSessionsWithResponse(requestOptions).getValue() - .toObject(TYPE_REFERENCE_LIST_LIVENESS_SESSION_ITEM); - } - - /** - * Please refer to - * https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-session-audit-entries for more - * details. - * - * @param sessionId The unique ID to reference this session. - * @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. - * @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 the response. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public List getLivenessSessionAuditEntries(String sessionId, String start, Integer top) { - // Generated convenience method for getLivenessSessionAuditEntriesWithResponse - RequestOptions requestOptions = new RequestOptions(); - if (start != null) { - requestOptions.addQueryParam("start", start, false); - } - if (top != null) { - requestOptions.addQueryParam("top", String.valueOf(top), false); - } - return getLivenessSessionAuditEntriesWithResponse(sessionId, requestOptions).getValue() - .toObject(TYPE_REFERENCE_LIST_LIVENESS_SESSION_AUDIT_ENTRY); - } - - /** - * Please refer to - * https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-session-audit-entries for more - * details. - * - * @param sessionId The unique ID to reference this session. - * @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 the response. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public List getLivenessSessionAuditEntries(String sessionId) { - // Generated convenience method for getLivenessSessionAuditEntriesWithResponse - RequestOptions requestOptions = new RequestOptions(); - return getLivenessSessionAuditEntriesWithResponse(sessionId, requestOptions).getValue() - .toObject(TYPE_REFERENCE_LIST_LIVENESS_SESSION_AUDIT_ENTRY); - } - /** * Delete all session related information for matching the specified session id. * @@ -889,157 +489,6 @@ public LivenessWithVerifySession getLivenessWithVerifySessionResult(String sessi .toObject(LivenessWithVerifySession.class); } - /** - * Lists sessions for /detectLivenessWithVerify/SingleModal. - * - * Please refer to - * https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-with-verify-sessions 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. - * @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 the response. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public List getLivenessWithVerifySessions(String start, Integer top) { - // Generated convenience method for getLivenessWithVerifySessionsWithResponse - RequestOptions requestOptions = new RequestOptions(); - if (start != null) { - requestOptions.addQueryParam("start", start, false); - } - if (top != null) { - requestOptions.addQueryParam("top", String.valueOf(top), false); - } - return getLivenessWithVerifySessionsWithResponse(requestOptions).getValue() - .toObject(TYPE_REFERENCE_LIST_LIVENESS_SESSION_ITEM); - } - - /** - * Lists sessions for /detectLivenessWithVerify/SingleModal. - * - * Please refer to - * https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-with-verify-sessions 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. - * @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 the response. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public List getLivenessWithVerifySessions() { - // Generated convenience method for getLivenessWithVerifySessionsWithResponse - RequestOptions requestOptions = new RequestOptions(); - return getLivenessWithVerifySessionsWithResponse(requestOptions).getValue() - .toObject(TYPE_REFERENCE_LIST_LIVENESS_SESSION_ITEM); - } - - /** - * Please refer to - * https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-with-verify-session-audit-entries - * for more details. - * - * @param sessionId The unique ID to reference this session. - * @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. - * @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 the response. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public List getLivenessWithVerifySessionAuditEntries(String sessionId, String start, - Integer top) { - // Generated convenience method for getLivenessWithVerifySessionAuditEntriesWithResponse - RequestOptions requestOptions = new RequestOptions(); - if (start != null) { - requestOptions.addQueryParam("start", start, false); - } - if (top != null) { - requestOptions.addQueryParam("top", String.valueOf(top), false); - } - return getLivenessWithVerifySessionAuditEntriesWithResponse(sessionId, requestOptions).getValue() - .toObject(TYPE_REFERENCE_LIST_LIVENESS_SESSION_AUDIT_ENTRY); - } - - /** - * Please refer to - * https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-with-verify-session-audit-entries - * for more details. - * - * @param sessionId The unique ID to reference this session. - * @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 the response. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public List getLivenessWithVerifySessionAuditEntries(String sessionId) { - // Generated convenience method for getLivenessWithVerifySessionAuditEntriesWithResponse - RequestOptions requestOptions = new RequestOptions(); - return getLivenessWithVerifySessionAuditEntriesWithResponse(sessionId, requestOptions).getValue() - .toObject(TYPE_REFERENCE_LIST_LIVENESS_SESSION_AUDIT_ENTRY); - } - - @Generated - private static final TypeReference> TYPE_REFERENCE_LIST_LIVENESS_SESSION_ITEM - = new TypeReference>() { - }; - - @Generated - private static final TypeReference> TYPE_REFERENCE_LIST_LIVENESS_SESSION_AUDIT_ENTRY - = new TypeReference>() { - }; - - /** - * Create a new liveness session with verify. Provide the verify image during session creation. - * - * Please refer to - * https://learn.microsoft.com/rest/api/face/liveness-session-operations/create-liveness-with-verify-session-with-verify-image - * for more details. - * - * @param body Request content of liveness with verify session creation. - * @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 of liveness session with verify creation with verify image provided. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - CreateLivenessWithVerifySessionResult - createLivenessWithVerifySessionWithVerifyImage(CreateLivenessWithVerifySessionMultipartContent body) { - // Generated convenience method for createLivenessWithVerifySessionWithVerifyImageWithResponse - RequestOptions requestOptions = new RequestOptions(); - return createLivenessWithVerifySessionWithVerifyImageWithResponse( - new MultipartFormDataHelper(requestOptions).serializeJsonField("Parameters", body.getParameters()) - .serializeFileField("VerifyImage", body.getVerifyImage().getContent(), - body.getVerifyImage().getContentType(), body.getVerifyImage().getFilename()) - .end() - .getRequestBody(), - requestOptions).getValue().toObject(CreateLivenessWithVerifySessionResult.class); - } - /** * Detect human faces in an image, return face rectangles, and optionally with faceIds, landmarks, and attributes. * @@ -1312,29 +761,41 @@ public BinaryData getSessionImage(String sessionImageId) { }; /** - * Create a new liveness session with verify. Client device submits VerifyImage during the - * /detectLivenessWithVerify/singleModal call. + * Create a new liveness session with verify. Provide the verify image during session creation. * * Please refer to - * https://learn.microsoft.com/rest/api/face/liveness-session-operations/create-liveness-with-verify-session for - * more details. + * https://learn.microsoft.com/rest/api/face/liveness-session-operations/create-liveness-with-verify-session-with-verify-image + * for more details. * - * @param body Body parameter. + * @param body Request content of liveness with verify session creation. * @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 of liveness session with verify creation with verify image provided. + * @return session result of detect liveness with verify. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - CreateLivenessWithVerifySessionResult createLivenessWithVerifySession(CreateLivenessWithVerifySessionContent body) { + public LivenessWithVerifySession createLivenessWithVerifySession(CreateLivenessWithVerifySessionContent body) { // Generated convenience method for createLivenessWithVerifySessionWithResponse RequestOptions requestOptions = new RequestOptions(); - return createLivenessWithVerifySessionWithResponse(BinaryData.fromObject(body), requestOptions).getValue() - .toObject(CreateLivenessWithVerifySessionResult.class); + return createLivenessWithVerifySessionWithResponse(new MultipartFormDataHelper(requestOptions) + .serializeTextField("livenessOperationMode", Objects.toString(body.getLivenessOperationMode())) + .serializeTextField("deviceCorrelationIdSetInClient", + Objects.toString(body.isDeviceCorrelationIdSetInClient())) + .serializeTextField("enableSessionImage", Objects.toString(body.isEnableSessionImage())) + .serializeTextField("livenessModelVersion", Objects.toString(body.getLivenessModelVersion())) + .serializeTextField("returnVerifyImageHash", Objects.toString(body.isReturnVerifyImageHash())) + .serializeTextField("verifyConfidenceThreshold", Objects.toString(body.getVerifyConfidenceThreshold())) + .serializeFileField("verifyImage", body.getVerifyImage().getContent(), + body.getVerifyImage().getContentType(), body.getVerifyImage().getFilename()) + .serializeTextField("deviceCorrelationId", body.getDeviceCorrelationId()) + .serializeTextField("authTokenTimeToLiveInSeconds", + Objects.toString(body.getAuthTokenTimeToLiveInSeconds())) + .end() + .getRequestBody(), requestOptions).getValue().toObject(LivenessWithVerifySession.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 abecb39a0ac6..bf3df95ce0e2 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 @@ -4,10 +4,10 @@ package com.azure.ai.vision.face.administration; import com.azure.ai.vision.face.implementation.LargeFaceListsImpl; -import com.azure.ai.vision.face.implementation.models.AddFaceFromUrlRequest1; -import com.azure.ai.vision.face.implementation.models.CreateRequest1; -import com.azure.ai.vision.face.implementation.models.UpdateFaceRequest1; -import com.azure.ai.vision.face.implementation.models.UpdateRequest1; +import com.azure.ai.vision.face.implementation.models.AddFaceFromUrlRequest2; +import com.azure.ai.vision.face.implementation.models.CreateRequest; +import com.azure.ai.vision.face.implementation.models.UpdateFaceRequest; +import com.azure.ai.vision.face.implementation.models.UpdateRequest; import com.azure.ai.vision.face.models.AddFaceResult; import com.azure.ai.vision.face.models.FaceDetectionModel; import com.azure.ai.vision.face.models.FaceRecognitionModel; @@ -70,7 +70,7 @@ public final class LargeFaceListAsyncClient { * } *
* - * @param createRequest1 The createRequest1 parameter. + * @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. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -80,8 +80,8 @@ public final class LargeFaceListAsyncClient { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createWithResponse(BinaryData createRequest1, RequestOptions requestOptions) { - return this.serviceClient.createWithResponseAsync(createRequest1, requestOptions); + public Mono> createWithResponse(BinaryData createRequest, RequestOptions requestOptions) { + return this.serviceClient.createWithResponseAsync(createRequest, requestOptions); } /** @@ -155,7 +155,7 @@ public Mono> getWithResponse(RequestOptions requestOptions) * } *
* - * @param updateRequest1 The updateRequest1 parameter. + * @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. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -165,8 +165,8 @@ public Mono> getWithResponse(RequestOptions requestOptions) */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponse(BinaryData updateRequest1, RequestOptions requestOptions) { - return this.serviceClient.updateWithResponseAsync(updateRequest1, requestOptions); + public Mono> updateWithResponse(BinaryData updateRequest, RequestOptions requestOptions) { + return this.serviceClient.updateWithResponseAsync(updateRequest, requestOptions); } /** @@ -303,7 +303,7 @@ public PollerFlux beginTrain(RequestOptions requestOptio * } *
* - * @param addFaceFromUrlRequest1 The addFaceFromUrlRequest1 parameter. + * @param addFaceFromUrlRequest2 The addFaceFromUrlRequest2 parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -313,9 +313,9 @@ public PollerFlux beginTrain(RequestOptions requestOptio */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Mono> addFaceFromUrlImplWithResponse(BinaryData addFaceFromUrlRequest1, + Mono> addFaceFromUrlImplWithResponse(BinaryData addFaceFromUrlRequest2, RequestOptions requestOptions) { - return this.serviceClient.addFaceFromUrlImplWithResponseAsync(addFaceFromUrlRequest1, requestOptions); + return this.serviceClient.addFaceFromUrlImplWithResponseAsync(addFaceFromUrlRequest2, requestOptions); } /** @@ -429,7 +429,7 @@ public Mono> getFaceWithResponse(String persistedFaceId, Re * * * @param persistedFaceId Face ID of the face. - * @param updateFaceRequest1 The updateFaceRequest1 parameter. + * @param updateFaceRequest The updateFaceRequest parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -439,9 +439,9 @@ public Mono> getFaceWithResponse(String persistedFaceId, Re */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateFaceWithResponse(String persistedFaceId, BinaryData updateFaceRequest1, + public Mono> updateFaceWithResponse(String persistedFaceId, BinaryData updateFaceRequest, RequestOptions requestOptions) { - return this.serviceClient.updateFaceWithResponseAsync(persistedFaceId, updateFaceRequest1, requestOptions); + return this.serviceClient.updateFaceWithResponseAsync(persistedFaceId, updateFaceRequest, requestOptions); } /** @@ -511,10 +511,10 @@ public Mono> getFacesWithResponse(RequestOptions requestOpt 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(createRequest1, requestOptions).flatMap(FluxUtil::toMono); + CreateRequest createRequestObj + = new CreateRequest(name).setUserData(userData).setRecognitionModel(recognitionModel); + BinaryData createRequest = BinaryData.fromObject(createRequestObj); + return createWithResponse(createRequest, requestOptions).flatMap(FluxUtil::toMono); } /** @@ -538,9 +538,9 @@ public Mono create(String name, String userData, FaceRecognitionModel reco 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(createRequest1, requestOptions).flatMap(FluxUtil::toMono); + CreateRequest createRequestObj = new CreateRequest(name); + BinaryData createRequest = BinaryData.fromObject(createRequestObj); + return createWithResponse(createRequest, requestOptions).flatMap(FluxUtil::toMono); } /** @@ -628,9 +628,9 @@ public Mono get() { 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(updateRequest1, requestOptions).flatMap(FluxUtil::toMono); + UpdateRequest updateRequestObj = new UpdateRequest().setName(name).setUserData(userData); + BinaryData updateRequest = BinaryData.fromObject(updateRequestObj); + return updateWithResponse(updateRequest, requestOptions).flatMap(FluxUtil::toMono); } /** @@ -649,9 +649,9 @@ public Mono update(String name, String userData) { public Mono update() { // Generated convenience method for updateWithResponse RequestOptions requestOptions = new RequestOptions(); - UpdateRequest1 updateRequest1Obj = new UpdateRequest1(); - BinaryData updateRequest1 = BinaryData.fromObject(updateRequest1Obj); - return updateWithResponse(updateRequest1, requestOptions).flatMap(FluxUtil::toMono); + UpdateRequest updateRequestObj = new UpdateRequest(); + BinaryData updateRequest = BinaryData.fromObject(updateRequestObj); + return updateWithResponse(updateRequest, requestOptions).flatMap(FluxUtil::toMono); } /** @@ -779,8 +779,8 @@ Mono addFaceFromUrlImpl(String url, List targetFace, Fac String userData) { // Generated convenience method for addFaceFromUrlImplWithResponse RequestOptions requestOptions = new RequestOptions(); - AddFaceFromUrlRequest1 addFaceFromUrlRequest1Obj = new AddFaceFromUrlRequest1(url); - BinaryData addFaceFromUrlRequest1 = BinaryData.fromObject(addFaceFromUrlRequest1Obj); + AddFaceFromUrlRequest2 addFaceFromUrlRequest2Obj = new AddFaceFromUrlRequest2(url); + BinaryData addFaceFromUrlRequest2 = BinaryData.fromObject(addFaceFromUrlRequest2Obj); if (targetFace != null) { requestOptions.addQueryParam("targetFace", JacksonAdapter.createDefaultSerializerAdapter().serializeIterable(targetFace, CollectionFormat.CSV), @@ -792,7 +792,7 @@ Mono addFaceFromUrlImpl(String url, List targetFace, Fac if (userData != null) { requestOptions.addQueryParam("userData", userData, false); } - return addFaceFromUrlImplWithResponse(addFaceFromUrlRequest1, requestOptions).flatMap(FluxUtil::toMono) + return addFaceFromUrlImplWithResponse(addFaceFromUrlRequest2, requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(AddFaceResult.class)); } @@ -816,9 +816,9 @@ Mono addFaceFromUrlImpl(String url, List targetFace, Fac 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(addFaceFromUrlRequest1, requestOptions).flatMap(FluxUtil::toMono) + AddFaceFromUrlRequest2 addFaceFromUrlRequest2Obj = new AddFaceFromUrlRequest2(url); + BinaryData addFaceFromUrlRequest2 = BinaryData.fromObject(addFaceFromUrlRequest2Obj); + return addFaceFromUrlImplWithResponse(addFaceFromUrlRequest2, requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(AddFaceResult.class)); } @@ -1041,9 +1041,9 @@ public Mono getFace(String persistedFaceId) { 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(persistedFaceId, updateFaceRequest1, requestOptions).flatMap(FluxUtil::toMono); + UpdateFaceRequest updateFaceRequestObj = new UpdateFaceRequest().setUserData(userData); + BinaryData updateFaceRequest = BinaryData.fromObject(updateFaceRequestObj); + return updateFaceWithResponse(persistedFaceId, updateFaceRequest, requestOptions).flatMap(FluxUtil::toMono); } /** @@ -1064,9 +1064,9 @@ public Mono updateFace(String persistedFaceId, String userData) { 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(persistedFaceId, updateFaceRequest1, requestOptions).flatMap(FluxUtil::toMono); + UpdateFaceRequest updateFaceRequestObj = new UpdateFaceRequest(); + BinaryData updateFaceRequest = BinaryData.fromObject(updateFaceRequestObj); + return updateFaceWithResponse(persistedFaceId, updateFaceRequest, requestOptions).flatMap(FluxUtil::toMono); } /** 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 89cc2752c875..f29ddc95c76f 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 @@ -4,10 +4,10 @@ package com.azure.ai.vision.face.administration; import com.azure.ai.vision.face.implementation.LargeFaceListsImpl; -import com.azure.ai.vision.face.implementation.models.AddFaceFromUrlRequest1; -import com.azure.ai.vision.face.implementation.models.CreateRequest1; -import com.azure.ai.vision.face.implementation.models.UpdateFaceRequest1; -import com.azure.ai.vision.face.implementation.models.UpdateRequest1; +import com.azure.ai.vision.face.implementation.models.AddFaceFromUrlRequest2; +import com.azure.ai.vision.face.implementation.models.CreateRequest; +import com.azure.ai.vision.face.implementation.models.UpdateFaceRequest; +import com.azure.ai.vision.face.implementation.models.UpdateRequest; import com.azure.ai.vision.face.models.AddFaceResult; import com.azure.ai.vision.face.models.FaceDetectionModel; import com.azure.ai.vision.face.models.FaceRecognitionModel; @@ -68,7 +68,7 @@ public final class LargeFaceListClient { * } * * - * @param createRequest1 The createRequest1 parameter. + * @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. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -78,8 +78,8 @@ public final class LargeFaceListClient { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse(BinaryData createRequest1, RequestOptions requestOptions) { - return this.serviceClient.createWithResponse(createRequest1, requestOptions); + public Response createWithResponse(BinaryData createRequest, RequestOptions requestOptions) { + return this.serviceClient.createWithResponse(createRequest, requestOptions); } /** @@ -152,7 +152,7 @@ public Response getWithResponse(RequestOptions requestOptions) { * } * * - * @param updateRequest1 The updateRequest1 parameter. + * @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. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -162,8 +162,8 @@ public Response getWithResponse(RequestOptions requestOptions) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(BinaryData updateRequest1, RequestOptions requestOptions) { - return this.serviceClient.updateWithResponse(updateRequest1, requestOptions); + public Response updateWithResponse(BinaryData updateRequest, RequestOptions requestOptions) { + return this.serviceClient.updateWithResponse(updateRequest, requestOptions); } /** @@ -300,7 +300,7 @@ public SyncPoller beginTrain(RequestOptions requestOptio * } * * - * @param addFaceFromUrlRequest1 The addFaceFromUrlRequest1 parameter. + * @param addFaceFromUrlRequest2 The addFaceFromUrlRequest2 parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -310,9 +310,9 @@ public SyncPoller beginTrain(RequestOptions requestOptio */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Response addFaceFromUrlImplWithResponse(BinaryData addFaceFromUrlRequest1, + Response addFaceFromUrlImplWithResponse(BinaryData addFaceFromUrlRequest2, RequestOptions requestOptions) { - return this.serviceClient.addFaceFromUrlImplWithResponse(addFaceFromUrlRequest1, requestOptions); + return this.serviceClient.addFaceFromUrlImplWithResponse(addFaceFromUrlRequest2, requestOptions); } /** @@ -426,7 +426,7 @@ public Response getFaceWithResponse(String persistedFaceId, RequestO * * * @param persistedFaceId Face ID of the face. - * @param updateFaceRequest1 The updateFaceRequest1 parameter. + * @param updateFaceRequest The updateFaceRequest parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -436,9 +436,9 @@ public Response getFaceWithResponse(String persistedFaceId, RequestO */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateFaceWithResponse(String persistedFaceId, BinaryData updateFaceRequest1, + public Response updateFaceWithResponse(String persistedFaceId, BinaryData updateFaceRequest, RequestOptions requestOptions) { - return this.serviceClient.updateFaceWithResponse(persistedFaceId, updateFaceRequest1, requestOptions); + return this.serviceClient.updateFaceWithResponse(persistedFaceId, updateFaceRequest, requestOptions); } /** @@ -507,10 +507,10 @@ public Response getFacesWithResponse(RequestOptions requestOptions) 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(createRequest1, requestOptions).getValue(); + CreateRequest createRequestObj + = new CreateRequest(name).setUserData(userData).setRecognitionModel(recognitionModel); + BinaryData createRequest = BinaryData.fromObject(createRequestObj); + createWithResponse(createRequest, requestOptions).getValue(); } /** @@ -533,9 +533,9 @@ public void create(String name, String userData, FaceRecognitionModel recognitio 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(createRequest1, requestOptions).getValue(); + CreateRequest createRequestObj = new CreateRequest(name); + BinaryData createRequest = BinaryData.fromObject(createRequestObj); + createWithResponse(createRequest, requestOptions).getValue(); } /** @@ -619,9 +619,9 @@ public LargeFaceList get() { 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(updateRequest1, requestOptions).getValue(); + UpdateRequest updateRequestObj = new UpdateRequest().setName(name).setUserData(userData); + BinaryData updateRequest = BinaryData.fromObject(updateRequestObj); + updateWithResponse(updateRequest, requestOptions).getValue(); } /** @@ -639,9 +639,9 @@ public void update(String name, String userData) { public void update() { // Generated convenience method for updateWithResponse RequestOptions requestOptions = new RequestOptions(); - UpdateRequest1 updateRequest1Obj = new UpdateRequest1(); - BinaryData updateRequest1 = BinaryData.fromObject(updateRequest1Obj); - updateWithResponse(updateRequest1, requestOptions).getValue(); + UpdateRequest updateRequestObj = new UpdateRequest(); + BinaryData updateRequest = BinaryData.fromObject(updateRequestObj); + updateWithResponse(updateRequest, requestOptions).getValue(); } /** @@ -858,8 +858,8 @@ AddFaceResult addFaceFromUrlImpl(String url, List targetFace, FaceDetec String userData) { // Generated convenience method for addFaceFromUrlImplWithResponse RequestOptions requestOptions = new RequestOptions(); - AddFaceFromUrlRequest1 addFaceFromUrlRequest1Obj = new AddFaceFromUrlRequest1(url); - BinaryData addFaceFromUrlRequest1 = BinaryData.fromObject(addFaceFromUrlRequest1Obj); + AddFaceFromUrlRequest2 addFaceFromUrlRequest2Obj = new AddFaceFromUrlRequest2(url); + BinaryData addFaceFromUrlRequest2 = BinaryData.fromObject(addFaceFromUrlRequest2Obj); if (targetFace != null) { requestOptions.addQueryParam("targetFace", JacksonAdapter.createDefaultSerializerAdapter().serializeIterable(targetFace, CollectionFormat.CSV), @@ -871,7 +871,7 @@ AddFaceResult addFaceFromUrlImpl(String url, List targetFace, FaceDetec if (userData != null) { requestOptions.addQueryParam("userData", userData, false); } - return addFaceFromUrlImplWithResponse(addFaceFromUrlRequest1, requestOptions).getValue() + return addFaceFromUrlImplWithResponse(addFaceFromUrlRequest2, requestOptions).getValue() .toObject(AddFaceResult.class); } @@ -895,9 +895,9 @@ AddFaceResult addFaceFromUrlImpl(String url, List targetFace, FaceDetec AddFaceResult addFaceFromUrlImpl(String url) { // Generated convenience method for addFaceFromUrlImplWithResponse RequestOptions requestOptions = new RequestOptions(); - AddFaceFromUrlRequest1 addFaceFromUrlRequest1Obj = new AddFaceFromUrlRequest1(url); - BinaryData addFaceFromUrlRequest1 = BinaryData.fromObject(addFaceFromUrlRequest1Obj); - return addFaceFromUrlImplWithResponse(addFaceFromUrlRequest1, requestOptions).getValue() + AddFaceFromUrlRequest2 addFaceFromUrlRequest2Obj = new AddFaceFromUrlRequest2(url); + BinaryData addFaceFromUrlRequest2 = BinaryData.fromObject(addFaceFromUrlRequest2Obj); + return addFaceFromUrlImplWithResponse(addFaceFromUrlRequest2, requestOptions).getValue() .toObject(AddFaceResult.class); } @@ -1023,9 +1023,9 @@ public LargeFaceListFace getFace(String persistedFaceId) { 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(persistedFaceId, updateFaceRequest1, requestOptions).getValue(); + UpdateFaceRequest updateFaceRequestObj = new UpdateFaceRequest().setUserData(userData); + BinaryData updateFaceRequest = BinaryData.fromObject(updateFaceRequestObj); + updateFaceWithResponse(persistedFaceId, updateFaceRequest, requestOptions).getValue(); } /** @@ -1045,9 +1045,9 @@ public void updateFace(String persistedFaceId, String userData) { public void updateFace(String persistedFaceId) { // Generated convenience method for updateFaceWithResponse RequestOptions requestOptions = new RequestOptions(); - UpdateFaceRequest1 updateFaceRequest1Obj = new UpdateFaceRequest1(); - BinaryData updateFaceRequest1 = BinaryData.fromObject(updateFaceRequest1Obj); - updateFaceWithResponse(persistedFaceId, updateFaceRequest1, requestOptions).getValue(); + UpdateFaceRequest updateFaceRequestObj = new UpdateFaceRequest(); + BinaryData updateFaceRequest = BinaryData.fromObject(updateFaceRequestObj); + updateFaceWithResponse(persistedFaceId, updateFaceRequest, requestOptions).getValue(); } /** 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 7acdd051e154..22b2a81ebbdf 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 @@ -4,12 +4,12 @@ package com.azure.ai.vision.face.administration; import com.azure.ai.vision.face.implementation.LargePersonGroupsImpl; -import com.azure.ai.vision.face.implementation.models.AddFaceFromUrlRequest; +import com.azure.ai.vision.face.implementation.models.AddFaceFromUrlRequest1; import com.azure.ai.vision.face.implementation.models.CreatePersonRequest; -import com.azure.ai.vision.face.implementation.models.CreateRequest; -import com.azure.ai.vision.face.implementation.models.UpdateFaceRequest; +import com.azure.ai.vision.face.implementation.models.CreateRequest1; +import com.azure.ai.vision.face.implementation.models.UpdateFaceRequest1; import com.azure.ai.vision.face.implementation.models.UpdatePersonRequest; -import com.azure.ai.vision.face.implementation.models.UpdateRequest; +import com.azure.ai.vision.face.implementation.models.UpdateRequest1; import com.azure.ai.vision.face.models.AddFaceResult; import com.azure.ai.vision.face.models.CreatePersonResult; import com.azure.ai.vision.face.models.FaceDetectionModel; @@ -74,7 +74,7 @@ public final class LargePersonGroupAsyncClient { * } * * - * @param createRequest The createRequest parameter. + * @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. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -84,8 +84,8 @@ public final class LargePersonGroupAsyncClient { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createWithResponse(BinaryData createRequest, RequestOptions requestOptions) { - return this.serviceClient.createWithResponseAsync(createRequest, requestOptions); + public Mono> createWithResponse(BinaryData createRequest1, RequestOptions requestOptions) { + return this.serviceClient.createWithResponseAsync(createRequest1, requestOptions); } /** @@ -157,7 +157,7 @@ public Mono> getWithResponse(RequestOptions requestOptions) * } * * - * @param updateRequest The updateRequest parameter. + * @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. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -167,8 +167,8 @@ public Mono> getWithResponse(RequestOptions requestOptions) */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponse(BinaryData updateRequest, RequestOptions requestOptions) { - return this.serviceClient.updateWithResponseAsync(updateRequest, requestOptions); + public Mono> updateWithResponse(BinaryData updateRequest1, RequestOptions requestOptions) { + return this.serviceClient.updateWithResponseAsync(updateRequest1, requestOptions); } /** @@ -483,7 +483,7 @@ public Mono> getPersonsWithResponse(RequestOptions requestO * * * @param personId ID of the person. - * @param addFaceFromUrlRequest The addFaceFromUrlRequest parameter. + * @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. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -493,9 +493,9 @@ public Mono> getPersonsWithResponse(RequestOptions requestO */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Mono> addFaceFromUrlImplWithResponse(String personId, BinaryData addFaceFromUrlRequest, + Mono> addFaceFromUrlImplWithResponse(String personId, BinaryData addFaceFromUrlRequest1, RequestOptions requestOptions) { - return this.serviceClient.addFaceFromUrlImplWithResponseAsync(personId, addFaceFromUrlRequest, requestOptions); + return this.serviceClient.addFaceFromUrlImplWithResponseAsync(personId, addFaceFromUrlRequest1, requestOptions); } /** @@ -624,7 +624,7 @@ public Mono> getFaceWithResponse(String personId, String pe * * @param personId ID of the person. * @param persistedFaceId Face ID of the face. - * @param updateFaceRequest The updateFaceRequest parameter. + * @param updateFaceRequest1 The updateFaceRequest1 parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -635,8 +635,8 @@ public Mono> getFaceWithResponse(String personId, String pe @Generated @ServiceMethod(returns = ReturnType.SINGLE) public Mono> updateFaceWithResponse(String personId, String persistedFaceId, - BinaryData updateFaceRequest, RequestOptions requestOptions) { - return this.serviceClient.updateFaceWithResponseAsync(personId, persistedFaceId, updateFaceRequest, + BinaryData updateFaceRequest1, RequestOptions requestOptions) { + return this.serviceClient.updateFaceWithResponseAsync(personId, persistedFaceId, updateFaceRequest1, requestOptions); } @@ -666,10 +666,10 @@ public Mono> updateFaceWithResponse(String personId, String persi 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(createRequest, requestOptions).flatMap(FluxUtil::toMono); + CreateRequest1 createRequest1Obj + = new CreateRequest1(name).setUserData(userData).setRecognitionModel(recognitionModel); + BinaryData createRequest1 = BinaryData.fromObject(createRequest1Obj); + return createWithResponse(createRequest1, requestOptions).flatMap(FluxUtil::toMono); } /** @@ -693,9 +693,9 @@ public Mono create(String name, String userData, FaceRecognitionModel reco 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(createRequest, requestOptions).flatMap(FluxUtil::toMono); + CreateRequest1 createRequest1Obj = new CreateRequest1(name); + BinaryData createRequest1 = BinaryData.fromObject(createRequest1Obj); + return createWithResponse(createRequest1, requestOptions).flatMap(FluxUtil::toMono); } /** @@ -783,9 +783,9 @@ public Mono get() { 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(updateRequest, requestOptions).flatMap(FluxUtil::toMono); + UpdateRequest1 updateRequest1Obj = new UpdateRequest1().setName(name).setUserData(userData); + BinaryData updateRequest1 = BinaryData.fromObject(updateRequest1Obj); + return updateWithResponse(updateRequest1, requestOptions).flatMap(FluxUtil::toMono); } /** @@ -804,9 +804,9 @@ public Mono update(String name, String userData) { public Mono update() { // Generated convenience method for updateWithResponse RequestOptions requestOptions = new RequestOptions(); - UpdateRequest updateRequestObj = new UpdateRequest(); - BinaryData updateRequest = BinaryData.fromObject(updateRequestObj); - return updateWithResponse(updateRequest, requestOptions).flatMap(FluxUtil::toMono); + UpdateRequest1 updateRequest1Obj = new UpdateRequest1(); + BinaryData updateRequest1 = BinaryData.fromObject(updateRequest1Obj); + return updateWithResponse(updateRequest1, requestOptions).flatMap(FluxUtil::toMono); } /** @@ -1247,8 +1247,8 @@ Mono addFaceFromUrlImpl(String personId, String url, List addFaceFromUrlImpl(String personId, String url, List protocolMethodData.toObject(AddFaceResult.class)); } @@ -1286,9 +1287,10 @@ Mono addFaceFromUrlImpl(String personId, String url, List 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(personId, addFaceFromUrlRequest, requestOptions).flatMap(FluxUtil::toMono) + AddFaceFromUrlRequest1 addFaceFromUrlRequest1Obj = new AddFaceFromUrlRequest1(url); + BinaryData addFaceFromUrlRequest1 = BinaryData.fromObject(addFaceFromUrlRequest1Obj); + return addFaceFromUrlImplWithResponse(personId, addFaceFromUrlRequest1, requestOptions) + .flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(AddFaceResult.class)); } @@ -1432,9 +1434,9 @@ public Mono getFace(String personId, String persiste 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(personId, persistedFaceId, updateFaceRequest, requestOptions) + UpdateFaceRequest1 updateFaceRequest1Obj = new UpdateFaceRequest1().setUserData(userData); + BinaryData updateFaceRequest1 = BinaryData.fromObject(updateFaceRequest1Obj); + return updateFaceWithResponse(personId, persistedFaceId, updateFaceRequest1, requestOptions) .flatMap(FluxUtil::toMono); } @@ -1458,9 +1460,9 @@ public Mono updateFace(String personId, String persistedFaceId, String use 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(personId, persistedFaceId, updateFaceRequest, requestOptions) + UpdateFaceRequest1 updateFaceRequest1Obj = new UpdateFaceRequest1(); + BinaryData updateFaceRequest1 = BinaryData.fromObject(updateFaceRequest1Obj); + return updateFaceWithResponse(personId, persistedFaceId, updateFaceRequest1, requestOptions) .flatMap(FluxUtil::toMono); } 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 f02eed463e50..9d12c0c0b159 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 @@ -4,12 +4,12 @@ package com.azure.ai.vision.face.administration; import com.azure.ai.vision.face.implementation.LargePersonGroupsImpl; -import com.azure.ai.vision.face.implementation.models.AddFaceFromUrlRequest; +import com.azure.ai.vision.face.implementation.models.AddFaceFromUrlRequest1; import com.azure.ai.vision.face.implementation.models.CreatePersonRequest; -import com.azure.ai.vision.face.implementation.models.CreateRequest; -import com.azure.ai.vision.face.implementation.models.UpdateFaceRequest; +import com.azure.ai.vision.face.implementation.models.CreateRequest1; +import com.azure.ai.vision.face.implementation.models.UpdateFaceRequest1; import com.azure.ai.vision.face.implementation.models.UpdatePersonRequest; -import com.azure.ai.vision.face.implementation.models.UpdateRequest; +import com.azure.ai.vision.face.implementation.models.UpdateRequest1; import com.azure.ai.vision.face.models.AddFaceResult; import com.azure.ai.vision.face.models.CreatePersonResult; import com.azure.ai.vision.face.models.FaceDetectionModel; @@ -72,7 +72,7 @@ public final class LargePersonGroupClient { * } * * - * @param createRequest The createRequest parameter. + * @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. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -82,8 +82,8 @@ public final class LargePersonGroupClient { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse(BinaryData createRequest, RequestOptions requestOptions) { - return this.serviceClient.createWithResponse(createRequest, requestOptions); + public Response createWithResponse(BinaryData createRequest1, RequestOptions requestOptions) { + return this.serviceClient.createWithResponse(createRequest1, requestOptions); } /** @@ -155,7 +155,7 @@ public Response getWithResponse(RequestOptions requestOptions) { * } * * - * @param updateRequest The updateRequest parameter. + * @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. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -165,8 +165,8 @@ public Response getWithResponse(RequestOptions requestOptions) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(BinaryData updateRequest, RequestOptions requestOptions) { - return this.serviceClient.updateWithResponse(updateRequest, requestOptions); + public Response updateWithResponse(BinaryData updateRequest1, RequestOptions requestOptions) { + return this.serviceClient.updateWithResponse(updateRequest1, requestOptions); } /** @@ -480,7 +480,7 @@ public Response getPersonsWithResponse(RequestOptions requestOptions * * * @param personId ID of the person. - * @param addFaceFromUrlRequest The addFaceFromUrlRequest parameter. + * @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. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -490,9 +490,9 @@ public Response getPersonsWithResponse(RequestOptions requestOptions */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Response addFaceFromUrlImplWithResponse(String personId, BinaryData addFaceFromUrlRequest, + Response addFaceFromUrlImplWithResponse(String personId, BinaryData addFaceFromUrlRequest1, RequestOptions requestOptions) { - return this.serviceClient.addFaceFromUrlImplWithResponse(personId, addFaceFromUrlRequest, requestOptions); + return this.serviceClient.addFaceFromUrlImplWithResponse(personId, addFaceFromUrlRequest1, requestOptions); } /** @@ -620,7 +620,7 @@ public Response getFaceWithResponse(String personId, String persiste * * @param personId ID of the person. * @param persistedFaceId Face ID of the face. - * @param updateFaceRequest The updateFaceRequest parameter. + * @param updateFaceRequest1 The updateFaceRequest1 parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -630,9 +630,9 @@ public Response getFaceWithResponse(String personId, String persiste */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateFaceWithResponse(String personId, String persistedFaceId, BinaryData updateFaceRequest, + public Response updateFaceWithResponse(String personId, String persistedFaceId, BinaryData updateFaceRequest1, RequestOptions requestOptions) { - return this.serviceClient.updateFaceWithResponse(personId, persistedFaceId, updateFaceRequest, requestOptions); + return this.serviceClient.updateFaceWithResponse(personId, persistedFaceId, updateFaceRequest1, requestOptions); } /** @@ -660,10 +660,10 @@ public Response updateFaceWithResponse(String personId, String persistedFa 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(createRequest, requestOptions).getValue(); + CreateRequest1 createRequest1Obj + = new CreateRequest1(name).setUserData(userData).setRecognitionModel(recognitionModel); + BinaryData createRequest1 = BinaryData.fromObject(createRequest1Obj); + createWithResponse(createRequest1, requestOptions).getValue(); } /** @@ -686,9 +686,9 @@ public void create(String name, String userData, FaceRecognitionModel recognitio 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(createRequest, requestOptions).getValue(); + CreateRequest1 createRequest1Obj = new CreateRequest1(name); + BinaryData createRequest1 = BinaryData.fromObject(createRequest1Obj); + createWithResponse(createRequest1, requestOptions).getValue(); } /** @@ -772,9 +772,9 @@ public LargePersonGroup get() { 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(updateRequest, requestOptions).getValue(); + UpdateRequest1 updateRequest1Obj = new UpdateRequest1().setName(name).setUserData(userData); + BinaryData updateRequest1 = BinaryData.fromObject(updateRequest1Obj); + updateWithResponse(updateRequest1, requestOptions).getValue(); } /** @@ -792,9 +792,9 @@ public void update(String name, String userData) { public void update() { // Generated convenience method for updateWithResponse RequestOptions requestOptions = new RequestOptions(); - UpdateRequest updateRequestObj = new UpdateRequest(); - BinaryData updateRequest = BinaryData.fromObject(updateRequestObj); - updateWithResponse(updateRequest, requestOptions).getValue(); + UpdateRequest1 updateRequest1Obj = new UpdateRequest1(); + BinaryData updateRequest1 = BinaryData.fromObject(updateRequest1Obj); + updateWithResponse(updateRequest1, requestOptions).getValue(); } /** @@ -1229,8 +1229,8 @@ AddFaceResult addFaceFromUrlImpl(String personId, String url, List targ FaceDetectionModel detectionModel, String userData) { // Generated convenience method for addFaceFromUrlImplWithResponse RequestOptions requestOptions = new RequestOptions(); - AddFaceFromUrlRequest addFaceFromUrlRequestObj = new AddFaceFromUrlRequest(url); - BinaryData addFaceFromUrlRequest = BinaryData.fromObject(addFaceFromUrlRequestObj); + AddFaceFromUrlRequest1 addFaceFromUrlRequest1Obj = new AddFaceFromUrlRequest1(url); + BinaryData addFaceFromUrlRequest1 = BinaryData.fromObject(addFaceFromUrlRequest1Obj); if (targetFace != null) { requestOptions.addQueryParam("targetFace", JacksonAdapter.createDefaultSerializerAdapter().serializeIterable(targetFace, CollectionFormat.CSV), @@ -1242,7 +1242,7 @@ AddFaceResult addFaceFromUrlImpl(String personId, String url, List targ if (userData != null) { requestOptions.addQueryParam("userData", userData, false); } - return addFaceFromUrlImplWithResponse(personId, addFaceFromUrlRequest, requestOptions).getValue() + return addFaceFromUrlImplWithResponse(personId, addFaceFromUrlRequest1, requestOptions).getValue() .toObject(AddFaceResult.class); } @@ -1268,9 +1268,9 @@ AddFaceResult addFaceFromUrlImpl(String personId, String url, List targ 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(personId, addFaceFromUrlRequest, requestOptions).getValue() + AddFaceFromUrlRequest1 addFaceFromUrlRequest1Obj = new AddFaceFromUrlRequest1(url); + BinaryData addFaceFromUrlRequest1 = BinaryData.fromObject(addFaceFromUrlRequest1Obj); + return addFaceFromUrlImplWithResponse(personId, addFaceFromUrlRequest1, requestOptions).getValue() .toObject(AddFaceResult.class); } @@ -1410,9 +1410,9 @@ public LargePersonGroupPersonFace getFace(String personId, String persistedFaceI 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(personId, persistedFaceId, updateFaceRequest, requestOptions).getValue(); + UpdateFaceRequest1 updateFaceRequest1Obj = new UpdateFaceRequest1().setUserData(userData); + BinaryData updateFaceRequest1 = BinaryData.fromObject(updateFaceRequest1Obj); + updateFaceWithResponse(personId, persistedFaceId, updateFaceRequest1, requestOptions).getValue(); } /** @@ -1434,9 +1434,9 @@ public void updateFace(String personId, String persistedFaceId, String userData) 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(personId, persistedFaceId, updateFaceRequest, requestOptions).getValue(); + UpdateFaceRequest1 updateFaceRequest1Obj = new UpdateFaceRequest1(); + BinaryData updateFaceRequest1 = BinaryData.fromObject(updateFaceRequest1Obj); + updateFaceWithResponse(personId, persistedFaceId, updateFaceRequest1, requestOptions).getValue(); } @Generated diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/implementation/FaceSessionClientImpl.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/implementation/FaceSessionClientImpl.java index 0f60b72bfc6c..6979a24cd79e 100644 --- a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/implementation/FaceSessionClientImpl.java +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/implementation/FaceSessionClientImpl.java @@ -152,7 +152,7 @@ public FaceSessionClientImpl(HttpPipeline httpPipeline, SerializerAdapter serial @Host("{endpoint}/face/{apiVersion}") @ServiceInterface(name = "FaceSessionClient") public interface FaceSessionClientService { - @Post("/detectLiveness/singleModal/sessions") + @Post("/detectLiveness-sessions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) @@ -163,7 +163,7 @@ Mono> createLivenessSession(@HostParam("endpoint") String e @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); - @Post("/detectLiveness/singleModal/sessions") + @Post("/detectLiveness-sessions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) @@ -174,8 +174,8 @@ Response createLivenessSessionSync(@HostParam("endpoint") String end @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); - @Delete("/detectLiveness/singleModal/sessions/{sessionId}") - @ExpectedResponses({ 200 }) + @Delete("/detectLiveness-sessions/{sessionId}") + @ExpectedResponses({ 204 }) @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @@ -184,8 +184,8 @@ Mono> deleteLivenessSession(@HostParam("endpoint") String endpoin @HostParam("apiVersion") String apiVersion, @PathParam("sessionId") String sessionId, @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); - @Delete("/detectLiveness/singleModal/sessions/{sessionId}") - @ExpectedResponses({ 200 }) + @Delete("/detectLiveness-sessions/{sessionId}") + @ExpectedResponses({ 204 }) @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @@ -194,7 +194,7 @@ Response deleteLivenessSessionSync(@HostParam("endpoint") String endpoint, @HostParam("apiVersion") String apiVersion, @PathParam("sessionId") String sessionId, @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); - @Get("/detectLiveness/singleModal/sessions/{sessionId}") + @Get("/detectLiveness-sessions/{sessionId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) @@ -204,7 +204,7 @@ Mono> getLivenessSessionResult(@HostParam("endpoint") Strin @HostParam("apiVersion") String apiVersion, @PathParam("sessionId") String sessionId, @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); - @Get("/detectLiveness/singleModal/sessions/{sessionId}") + @Get("/detectLiveness-sessions/{sessionId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) @@ -214,94 +214,32 @@ Response getLivenessSessionResultSync(@HostParam("endpoint") String @HostParam("apiVersion") String apiVersion, @PathParam("sessionId") String sessionId, @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); - @Get("/detectLiveness/singleModal/sessions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono> getLivenessSessions(@HostParam("endpoint") String endpoint, - @HostParam("apiVersion") String apiVersion, @HeaderParam("Accept") String accept, - RequestOptions requestOptions, Context context); - - @Get("/detectLiveness/singleModal/sessions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Response getLivenessSessionsSync(@HostParam("endpoint") String endpoint, - @HostParam("apiVersion") String apiVersion, @HeaderParam("Accept") String accept, - RequestOptions requestOptions, Context context); - - @Get("/detectLiveness/singleModal/sessions/{sessionId}/audit") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono> getLivenessSessionAuditEntries(@HostParam("endpoint") String endpoint, - @HostParam("apiVersion") String apiVersion, @PathParam("sessionId") String sessionId, - @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); - - @Get("/detectLiveness/singleModal/sessions/{sessionId}/audit") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Response getLivenessSessionAuditEntriesSync(@HostParam("endpoint") String endpoint, - @HostParam("apiVersion") String apiVersion, @PathParam("sessionId") String sessionId, - @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); - - @Post("/detectLivenessWithVerify/singleModal/sessions") + // @Multipart not supported by RestProxy + @Post("/detectLivenessWithVerify-sessions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @UnexpectedResponseExceptionType(HttpResponseException.class) Mono> createLivenessWithVerifySession(@HostParam("endpoint") String endpoint, - @HostParam("apiVersion") String apiVersion, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body, - RequestOptions requestOptions, Context context); - - @Post("/detectLivenessWithVerify/singleModal/sessions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Response createLivenessWithVerifySessionSync(@HostParam("endpoint") String endpoint, - @HostParam("apiVersion") String apiVersion, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body, + @HostParam("apiVersion") String apiVersion, @HeaderParam("content-type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("multipart/form-data") BinaryData body, RequestOptions requestOptions, Context context); // @Multipart not supported by RestProxy - @Post("/detectLivenessWithVerify/singleModal/sessions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono> createLivenessWithVerifySessionWithVerifyImage( - @HostParam("endpoint") String endpoint, @HostParam("apiVersion") String apiVersion, - @HeaderParam("content-type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("multipart/form-data") BinaryData body, RequestOptions requestOptions, Context context); - - // @Multipart not supported by RestProxy - @Post("/detectLivenessWithVerify/singleModal/sessions") + @Post("/detectLivenessWithVerify-sessions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @UnexpectedResponseExceptionType(HttpResponseException.class) - Response createLivenessWithVerifySessionWithVerifyImageSync(@HostParam("endpoint") String endpoint, + Response createLivenessWithVerifySessionSync(@HostParam("endpoint") String endpoint, @HostParam("apiVersion") String apiVersion, @HeaderParam("content-type") String contentType, @HeaderParam("Accept") String accept, @BodyParam("multipart/form-data") BinaryData body, RequestOptions requestOptions, Context context); - @Delete("/detectLivenessWithVerify/singleModal/sessions/{sessionId}") - @ExpectedResponses({ 200 }) + @Delete("/detectLivenessWithVerify-sessions/{sessionId}") + @ExpectedResponses({ 204 }) @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @@ -310,8 +248,8 @@ Mono> deleteLivenessWithVerifySession(@HostParam("endpoint") Stri @HostParam("apiVersion") String apiVersion, @PathParam("sessionId") String sessionId, @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); - @Delete("/detectLivenessWithVerify/singleModal/sessions/{sessionId}") - @ExpectedResponses({ 200 }) + @Delete("/detectLivenessWithVerify-sessions/{sessionId}") + @ExpectedResponses({ 204 }) @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @@ -320,7 +258,7 @@ Response deleteLivenessWithVerifySessionSync(@HostParam("endpoint") String @HostParam("apiVersion") String apiVersion, @PathParam("sessionId") String sessionId, @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); - @Get("/detectLivenessWithVerify/singleModal/sessions/{sessionId}") + @Get("/detectLivenessWithVerify-sessions/{sessionId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) @@ -330,7 +268,7 @@ Mono> getLivenessWithVerifySessionResult(@HostParam("endpoi @HostParam("apiVersion") String apiVersion, @PathParam("sessionId") String sessionId, @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); - @Get("/detectLivenessWithVerify/singleModal/sessions/{sessionId}") + @Get("/detectLivenessWithVerify-sessions/{sessionId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) @@ -340,46 +278,6 @@ Response getLivenessWithVerifySessionResultSync(@HostParam("endpoint @HostParam("apiVersion") String apiVersion, @PathParam("sessionId") String sessionId, @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); - @Get("/detectLivenessWithVerify/singleModal/sessions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono> getLivenessWithVerifySessions(@HostParam("endpoint") String endpoint, - @HostParam("apiVersion") String apiVersion, @HeaderParam("Accept") String accept, - RequestOptions requestOptions, Context context); - - @Get("/detectLivenessWithVerify/singleModal/sessions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Response getLivenessWithVerifySessionsSync(@HostParam("endpoint") String endpoint, - @HostParam("apiVersion") String apiVersion, @HeaderParam("Accept") String accept, - RequestOptions requestOptions, Context context); - - @Get("/detectLivenessWithVerify/singleModal/sessions/{sessionId}/audit") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono> getLivenessWithVerifySessionAuditEntries(@HostParam("endpoint") String endpoint, - @HostParam("apiVersion") String apiVersion, @PathParam("sessionId") String sessionId, - @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); - - @Get("/detectLivenessWithVerify/singleModal/sessions/{sessionId}/audit") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Response getLivenessWithVerifySessionAuditEntriesSync(@HostParam("endpoint") String endpoint, - @HostParam("apiVersion") String apiVersion, @PathParam("sessionId") String sessionId, - @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); - @Post("/detect") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) @@ -404,7 +302,7 @@ Response detectFromSessionImageSync(@HostParam("endpoint") String en @BodyParam("application/json") BinaryData detectFromSessionImageRequest, RequestOptions requestOptions, Context context); - @Get("/session/sessionImages/{sessionImageId}") + @Get("/sessionImages/{sessionImageId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) @@ -414,7 +312,7 @@ Mono> getSessionImage(@HostParam("endpoint") String endpoin @HostParam("apiVersion") String apiVersion, @PathParam("sessionImageId") String sessionImageId, @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); - @Get("/session/sessionImages/{sessionImageId}") + @Get("/sessionImages/{sessionImageId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) @@ -436,10 +334,9 @@ Response getSessionImageSync(@HostParam("endpoint") String endpoint, * {@code * { * livenessOperationMode: String(Passive/PassiveActive) (Required) - * sendResultsToClient: Boolean (Optional) * deviceCorrelationIdSetInClient: Boolean (Optional) * enableSessionImage: Boolean (Optional) - * livenessSingleModalModel: String(2022-10-15-preview.04/2023-12-20-preview.06) (Optional) + * livenessModelVersion: String(2024-11-15) (Optional) * deviceCorrelationId: String (Optional) * authTokenTimeToLiveInSeconds: Integer (Optional) * } @@ -453,6 +350,36 @@ Response getSessionImageSync(@HostParam("endpoint") String endpoint, * { * sessionId: String (Required) * authToken: String (Required) + * status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required) + * modelVersion: String(2024-11-15) (Optional) + * results (Required): { + * attempts (Required): [ + * (Required){ + * attemptId: int (Required) + * attemptStatus: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required) + * result (Optional): { + * livenessDecision: String(uncertain/realface/spoofface) (Optional) + * targets (Required): { + * color (Required): { + * faceRectangle (Required): { + * top: int (Required) + * left: int (Required) + * width: int (Required) + * height: int (Required) + * } + * } + * } + * digest: String (Required) + * sessionImageId: String (Optional) + * } + * error (Optional): { + * code: String (Required) + * message: String (Required) + * targets (Required): (recursive schema, see targets above) + * } + * } + * ] + * } * } * } * @@ -463,8 +390,7 @@ Response getSessionImageSync(@HostParam("endpoint") String endpoint, * @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. - * @return response of liveness session creation along with {@link Response} on successful completion of - * {@link Mono}. + * @return session result of detect liveness along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> createLivenessSessionWithResponseAsync(BinaryData body, @@ -486,10 +412,9 @@ public Mono> createLivenessSessionWithResponseAsync(BinaryD * {@code * { * livenessOperationMode: String(Passive/PassiveActive) (Required) - * sendResultsToClient: Boolean (Optional) * deviceCorrelationIdSetInClient: Boolean (Optional) * enableSessionImage: Boolean (Optional) - * livenessSingleModalModel: String(2022-10-15-preview.04/2023-12-20-preview.06) (Optional) + * livenessModelVersion: String(2024-11-15) (Optional) * deviceCorrelationId: String (Optional) * authTokenTimeToLiveInSeconds: Integer (Optional) * } @@ -503,6 +428,36 @@ public Mono> createLivenessSessionWithResponseAsync(BinaryD * { * sessionId: String (Required) * authToken: String (Required) + * status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required) + * modelVersion: String(2024-11-15) (Optional) + * results (Required): { + * attempts (Required): [ + * (Required){ + * attemptId: int (Required) + * attemptStatus: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required) + * result (Optional): { + * livenessDecision: String(uncertain/realface/spoofface) (Optional) + * targets (Required): { + * color (Required): { + * faceRectangle (Required): { + * top: int (Required) + * left: int (Required) + * width: int (Required) + * height: int (Required) + * } + * } + * } + * digest: String (Required) + * sessionImageId: String (Optional) + * } + * error (Optional): { + * code: String (Required) + * message: String (Required) + * targets (Required): (recursive schema, see targets above) + * } + * } + * ] + * } * } * } * @@ -513,7 +468,7 @@ public Mono> createLivenessSessionWithResponseAsync(BinaryD * @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. - * @return response of liveness session creation along with {@link Response}. + * @return session result of detect liveness along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response createLivenessSessionWithResponse(BinaryData body, RequestOptions requestOptions) { @@ -574,59 +529,37 @@ public Response deleteLivenessSessionWithResponse(String sessionId, Reques *
      * {@code
      * {
-     *     id: String (Required)
-     *     createdDateTime: OffsetDateTime (Required)
-     *     sessionStartDateTime: OffsetDateTime (Optional)
-     *     sessionExpired: boolean (Required)
-     *     deviceCorrelationId: String (Optional)
-     *     authTokenTimeToLiveInSeconds: Integer (Optional)
-     *     status: String(NotStarted/Started/ResultAvailable) (Required)
-     *     result (Optional): {
-     *         id: long (Required)
-     *         sessionId: String (Required)
-     *         requestId: String (Required)
-     *         clientRequestId: String (Required)
-     *         receivedDateTime: OffsetDateTime (Required)
-     *         request (Required): {
-     *             url: String (Required)
-     *             method: String (Required)
-     *             contentLength: Long (Optional)
-     *             contentType: String (Required)
-     *             userAgent: String (Optional)
-     *         }
-     *         response (Required): {
-     *             body (Required): {
-     *                 livenessDecision: String(uncertain/realface/spoofface) (Optional)
-     *                 target (Optional): {
-     *                     faceRectangle (Required): {
-     *                         top: int (Required)
-     *                         left: int (Required)
-     *                         width: int (Required)
-     *                         height: int (Required)
-     *                     }
-     *                     fileName: String (Required)
-     *                     timeOffsetWithinFile: int (Required)
-     *                     imageType: String(Color/Infrared/Depth) (Required)
-     *                 }
-     *                 modelVersionUsed: String(2022-10-15-preview.04/2023-12-20-preview.06) (Optional)
-     *                 verifyResult (Optional): {
-     *                     verifyImage (Required): {
-     *                         faceRectangle (Required): (recursive schema, see faceRectangle above)
-     *                         qualityForRecognition: String(low/medium/high) (Required)
+     *     sessionId: String (Required)
+     *     authToken: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *     modelVersion: String(2024-11-15) (Optional)
+     *     results (Required): {
+     *         attempts (Required): [
+     *              (Required){
+     *                 attemptId: int (Required)
+     *                 attemptStatus: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *                 result (Optional): {
+     *                     livenessDecision: String(uncertain/realface/spoofface) (Optional)
+     *                     targets (Required): {
+     *                         color (Required): {
+     *                             faceRectangle (Required): {
+     *                                 top: int (Required)
+     *                                 left: int (Required)
+     *                                 width: int (Required)
+     *                                 height: int (Required)
+     *                             }
+     *                         }
      *                     }
-     *                     matchConfidence: double (Required)
-     *                     isIdentical: boolean (Required)
+     *                     digest: String (Required)
+     *                     sessionImageId: String (Optional)
      *                 }
-     *                  (Optional): {
-     *                     String: BinaryData (Required)
+     *                 error (Optional): {
+     *                     code: String (Required)
+     *                     message: String (Required)
+     *                     targets (Required): (recursive schema, see targets above)
      *                 }
      *             }
-     *             statusCode: int (Required)
-     *             latencyInMilliseconds: long (Required)
-     *         }
-     *         digest: String (Required)
-     *         sessionImageId: String (Optional)
-     *         verifyImageHash: String (Optional)
+     *         ]
      *     }
      * }
      * }
@@ -656,59 +589,37 @@ public Mono> getLivenessSessionResultWithResponseAsync(Stri
      * 
      * {@code
      * {
-     *     id: String (Required)
-     *     createdDateTime: OffsetDateTime (Required)
-     *     sessionStartDateTime: OffsetDateTime (Optional)
-     *     sessionExpired: boolean (Required)
-     *     deviceCorrelationId: String (Optional)
-     *     authTokenTimeToLiveInSeconds: Integer (Optional)
-     *     status: String(NotStarted/Started/ResultAvailable) (Required)
-     *     result (Optional): {
-     *         id: long (Required)
-     *         sessionId: String (Required)
-     *         requestId: String (Required)
-     *         clientRequestId: String (Required)
-     *         receivedDateTime: OffsetDateTime (Required)
-     *         request (Required): {
-     *             url: String (Required)
-     *             method: String (Required)
-     *             contentLength: Long (Optional)
-     *             contentType: String (Required)
-     *             userAgent: String (Optional)
-     *         }
-     *         response (Required): {
-     *             body (Required): {
-     *                 livenessDecision: String(uncertain/realface/spoofface) (Optional)
-     *                 target (Optional): {
-     *                     faceRectangle (Required): {
-     *                         top: int (Required)
-     *                         left: int (Required)
-     *                         width: int (Required)
-     *                         height: int (Required)
-     *                     }
-     *                     fileName: String (Required)
-     *                     timeOffsetWithinFile: int (Required)
-     *                     imageType: String(Color/Infrared/Depth) (Required)
-     *                 }
-     *                 modelVersionUsed: String(2022-10-15-preview.04/2023-12-20-preview.06) (Optional)
-     *                 verifyResult (Optional): {
-     *                     verifyImage (Required): {
-     *                         faceRectangle (Required): (recursive schema, see faceRectangle above)
-     *                         qualityForRecognition: String(low/medium/high) (Required)
+     *     sessionId: String (Required)
+     *     authToken: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *     modelVersion: String(2024-11-15) (Optional)
+     *     results (Required): {
+     *         attempts (Required): [
+     *              (Required){
+     *                 attemptId: int (Required)
+     *                 attemptStatus: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *                 result (Optional): {
+     *                     livenessDecision: String(uncertain/realface/spoofface) (Optional)
+     *                     targets (Required): {
+     *                         color (Required): {
+     *                             faceRectangle (Required): {
+     *                                 top: int (Required)
+     *                                 left: int (Required)
+     *                                 width: int (Required)
+     *                                 height: int (Required)
+     *                             }
+     *                         }
      *                     }
-     *                     matchConfidence: double (Required)
-     *                     isIdentical: boolean (Required)
+     *                     digest: String (Required)
+     *                     sessionImageId: String (Optional)
      *                 }
-     *                  (Optional): {
-     *                     String: BinaryData (Required)
+     *                 error (Optional): {
+     *                     code: String (Required)
+     *                     message: String (Required)
+     *                     targets (Required): (recursive schema, see targets above)
      *                 }
      *             }
-     *             statusCode: int (Required)
-     *             latencyInMilliseconds: long (Required)
-     *         }
-     *         digest: String (Required)
-     *         sessionImageId: String (Optional)
-     *         verifyImageHash: String (Optional)
+     *         ]
      *     }
      * }
      * }
@@ -730,166 +641,164 @@ public Response getLivenessSessionResultWithResponse(String sessionI
     }
 
     /**
-     * Lists sessions for /detectLiveness/SingleModal.
+     * Create a new liveness session with verify. Provide the verify image during session creation.
      * 
-     * Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-sessions for
-     * more details.
-     * 

Query Parameters

- * - * - * - * - * - *
Query Parameters
NameTypeRequiredDescription
startStringNoList resources greater than the "start". It contains no more than - * 64 characters. Default is empty.
topIntegerNoThe number of items to list, ranging in [1, 1000]. Default is - * 1000.
- * You can add these to a request with {@link RequestOptions#addQueryParam} + * Please refer to + * https://learn.microsoft.com/rest/api/face/liveness-session-operations/create-liveness-with-verify-session-with-verify-image + * for more details. *

Response Body Schema

* *
      * {@code
-     * [
-     *      (Required){
-     *         id: String (Required)
-     *         createdDateTime: OffsetDateTime (Required)
-     *         sessionStartDateTime: OffsetDateTime (Optional)
-     *         sessionExpired: boolean (Required)
-     *         deviceCorrelationId: String (Optional)
-     *         authTokenTimeToLiveInSeconds: Integer (Optional)
+     * {
+     *     sessionId: String (Required)
+     *     authToken: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *     modelVersion: String(2024-11-15) (Optional)
+     *     results (Required): {
+     *         verifyReferences (Required): [
+     *              (Required){
+     *                 referenceType: String(Color/Infrared/Depth) (Required)
+     *                 faceRectangle (Required): {
+     *                     top: int (Required)
+     *                     left: int (Required)
+     *                     width: int (Required)
+     *                     height: int (Required)
+     *                 }
+     *                 qualityForRecognition: String(low/medium/high) (Required)
+     *             }
+     *         ]
+     *         attempts (Required): [
+     *              (Required){
+     *                 attemptId: int (Required)
+     *                 attemptStatus: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *                 result (Optional): {
+     *                     livenessDecision: String(uncertain/realface/spoofface) (Optional)
+     *                     targets (Required): {
+     *                         color (Required): {
+     *                             faceRectangle (Required): (recursive schema, see faceRectangle above)
+     *                         }
+     *                     }
+     *                     digest: String (Required)
+     *                     sessionImageId: String (Optional)
+     *                     verifyResult (Optional): {
+     *                         matchConfidence: double (Required)
+     *                         isIdentical: boolean (Required)
+     *                     }
+     *                     verifyImageHash: String (Optional)
+     *                 }
+     *                 error (Optional): {
+     *                     code: String (Required)
+     *                     message: String (Required)
+     *                     targets (Required): (recursive schema, see targets above)
+     *                 }
+     *             }
+     *         ]
      *     }
-     * ]
+     * }
      * }
      * 
* + * @param body Request content of liveness with verify session creation. * @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. * @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. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. + * @return session result of detect liveness with verify along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getLivenessSessionsWithResponseAsync(RequestOptions requestOptions) { + public Mono> createLivenessWithVerifySessionWithResponseAsync(BinaryData body, + RequestOptions requestOptions) { + final String contentType = "multipart/form-data"; final String accept = "application/json"; - return FluxUtil.withContext(context -> service.getLivenessSessions(this.getEndpoint(), - this.getServiceVersion().getVersion(), accept, requestOptions, context)); + return FluxUtil.withContext(context -> service.createLivenessWithVerifySession(this.getEndpoint(), + this.getServiceVersion().getVersion(), contentType, accept, body, requestOptions, context)); } /** - * Lists sessions for /detectLiveness/SingleModal. + * Create a new liveness session with verify. Provide the verify image during session creation. * - * Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-sessions for - * more details. - *

Query Parameters

- * - * - * - * - * - *
Query Parameters
NameTypeRequiredDescription
startStringNoList resources greater than the "start". It contains no more than - * 64 characters. Default is empty.
topIntegerNoThe number of items to list, ranging in [1, 1000]. Default is - * 1000.
- * You can add these to a request with {@link RequestOptions#addQueryParam} + * Please refer to + * https://learn.microsoft.com/rest/api/face/liveness-session-operations/create-liveness-with-verify-session-with-verify-image + * for more details. *

Response Body Schema

* *
      * {@code
-     * [
-     *      (Required){
-     *         id: String (Required)
-     *         createdDateTime: OffsetDateTime (Required)
-     *         sessionStartDateTime: OffsetDateTime (Optional)
-     *         sessionExpired: boolean (Required)
-     *         deviceCorrelationId: String (Optional)
-     *         authTokenTimeToLiveInSeconds: Integer (Optional)
+     * {
+     *     sessionId: String (Required)
+     *     authToken: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *     modelVersion: String(2024-11-15) (Optional)
+     *     results (Required): {
+     *         verifyReferences (Required): [
+     *              (Required){
+     *                 referenceType: String(Color/Infrared/Depth) (Required)
+     *                 faceRectangle (Required): {
+     *                     top: int (Required)
+     *                     left: int (Required)
+     *                     width: int (Required)
+     *                     height: int (Required)
+     *                 }
+     *                 qualityForRecognition: String(low/medium/high) (Required)
+     *             }
+     *         ]
+     *         attempts (Required): [
+     *              (Required){
+     *                 attemptId: int (Required)
+     *                 attemptStatus: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *                 result (Optional): {
+     *                     livenessDecision: String(uncertain/realface/spoofface) (Optional)
+     *                     targets (Required): {
+     *                         color (Required): {
+     *                             faceRectangle (Required): (recursive schema, see faceRectangle above)
+     *                         }
+     *                     }
+     *                     digest: String (Required)
+     *                     sessionImageId: String (Optional)
+     *                     verifyResult (Optional): {
+     *                         matchConfidence: double (Required)
+     *                         isIdentical: boolean (Required)
+     *                     }
+     *                     verifyImageHash: String (Optional)
+     *                 }
+     *                 error (Optional): {
+     *                     code: String (Required)
+     *                     message: String (Required)
+     *                     targets (Required): (recursive schema, see targets above)
+     *                 }
+     *             }
+     *         ]
      *     }
-     * ]
+     * }
      * }
      * 
* + * @param body Request content of liveness with verify session creation. * @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. * @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. - * @return the response body along with {@link Response}. + * @return session result of detect liveness with verify along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getLivenessSessionsWithResponse(RequestOptions requestOptions) { + public Response createLivenessWithVerifySessionWithResponse(BinaryData body, + RequestOptions requestOptions) { + final String contentType = "multipart/form-data"; final String accept = "application/json"; - return service.getLivenessSessionsSync(this.getEndpoint(), this.getServiceVersion().getVersion(), accept, - requestOptions, Context.NONE); + return service.createLivenessWithVerifySessionSync(this.getEndpoint(), this.getServiceVersion().getVersion(), + contentType, accept, body, requestOptions, Context.NONE); } /** - * Please refer to - * https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-session-audit-entries for more - * details. - *

Query Parameters

- * - * - * - * - * - *
Query Parameters
NameTypeRequiredDescription
startStringNoList resources greater than the "start". It contains no more than - * 64 characters. Default is empty.
topIntegerNoThe number of items to list, ranging in [1, 1000]. Default is - * 1000.
- * You can add these to a request with {@link RequestOptions#addQueryParam} - *

Response Body Schema

+ * Delete all session related information for matching the specified session id. * - *
-     * {@code
-     * [
-     *      (Required){
-     *         id: long (Required)
-     *         sessionId: String (Required)
-     *         requestId: String (Required)
-     *         clientRequestId: String (Required)
-     *         receivedDateTime: OffsetDateTime (Required)
-     *         request (Required): {
-     *             url: String (Required)
-     *             method: String (Required)
-     *             contentLength: Long (Optional)
-     *             contentType: String (Required)
-     *             userAgent: String (Optional)
-     *         }
-     *         response (Required): {
-     *             body (Required): {
-     *                 livenessDecision: String(uncertain/realface/spoofface) (Optional)
-     *                 target (Optional): {
-     *                     faceRectangle (Required): {
-     *                         top: int (Required)
-     *                         left: int (Required)
-     *                         width: int (Required)
-     *                         height: int (Required)
-     *                     }
-     *                     fileName: String (Required)
-     *                     timeOffsetWithinFile: int (Required)
-     *                     imageType: String(Color/Infrared/Depth) (Required)
-     *                 }
-     *                 modelVersionUsed: String(2022-10-15-preview.04/2023-12-20-preview.06) (Optional)
-     *                 verifyResult (Optional): {
-     *                     verifyImage (Required): {
-     *                         faceRectangle (Required): (recursive schema, see faceRectangle above)
-     *                         qualityForRecognition: String(low/medium/high) (Required)
-     *                     }
-     *                     matchConfidence: double (Required)
-     *                     isIdentical: boolean (Required)
-     *                 }
-     *                  (Optional): {
-     *                     String: BinaryData (Required)
-     *                 }
-     *             }
-     *             statusCode: int (Required)
-     *             latencyInMilliseconds: long (Required)
-     *         }
-     *         digest: String (Required)
-     *         sessionImageId: String (Optional)
-     *         verifyImageHash: String (Optional)
-     *     }
-     * ]
-     * }
-     * 
+ * Please refer to + * https://learn.microsoft.com/rest/api/face/liveness-session-operations/delete-liveness-with-verify-session for + * more details. * * @param sessionId The unique ID to reference this session. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -897,85 +806,22 @@ public Response getLivenessSessionsWithResponse(RequestOptions reque * @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. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getLivenessSessionAuditEntriesWithResponseAsync(String sessionId, + public Mono> deleteLivenessWithVerifySessionWithResponseAsync(String sessionId, RequestOptions requestOptions) { final String accept = "application/json"; - return FluxUtil.withContext(context -> service.getLivenessSessionAuditEntries(this.getEndpoint(), + return FluxUtil.withContext(context -> service.deleteLivenessWithVerifySession(this.getEndpoint(), this.getServiceVersion().getVersion(), sessionId, accept, requestOptions, context)); } /** - * Please refer to - * https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-session-audit-entries for more - * details. - *

Query Parameters

- * - * - * - * - * - *
Query Parameters
NameTypeRequiredDescription
startStringNoList resources greater than the "start". It contains no more than - * 64 characters. Default is empty.
topIntegerNoThe number of items to list, ranging in [1, 1000]. Default is - * 1000.
- * You can add these to a request with {@link RequestOptions#addQueryParam} - *

Response Body Schema

+ * Delete all session related information for matching the specified session id. * - *
-     * {@code
-     * [
-     *      (Required){
-     *         id: long (Required)
-     *         sessionId: String (Required)
-     *         requestId: String (Required)
-     *         clientRequestId: String (Required)
-     *         receivedDateTime: OffsetDateTime (Required)
-     *         request (Required): {
-     *             url: String (Required)
-     *             method: String (Required)
-     *             contentLength: Long (Optional)
-     *             contentType: String (Required)
-     *             userAgent: String (Optional)
-     *         }
-     *         response (Required): {
-     *             body (Required): {
-     *                 livenessDecision: String(uncertain/realface/spoofface) (Optional)
-     *                 target (Optional): {
-     *                     faceRectangle (Required): {
-     *                         top: int (Required)
-     *                         left: int (Required)
-     *                         width: int (Required)
-     *                         height: int (Required)
-     *                     }
-     *                     fileName: String (Required)
-     *                     timeOffsetWithinFile: int (Required)
-     *                     imageType: String(Color/Infrared/Depth) (Required)
-     *                 }
-     *                 modelVersionUsed: String(2022-10-15-preview.04/2023-12-20-preview.06) (Optional)
-     *                 verifyResult (Optional): {
-     *                     verifyImage (Required): {
-     *                         faceRectangle (Required): (recursive schema, see faceRectangle above)
-     *                         qualityForRecognition: String(low/medium/high) (Required)
-     *                     }
-     *                     matchConfidence: double (Required)
-     *                     isIdentical: boolean (Required)
-     *                 }
-     *                  (Optional): {
-     *                     String: BinaryData (Required)
-     *                 }
-     *             }
-     *             statusCode: int (Required)
-     *             latencyInMilliseconds: long (Required)
-     *         }
-     *         digest: String (Required)
-     *         sessionImageId: String (Optional)
-     *         verifyImageHash: String (Optional)
-     *     }
-     * ]
-     * }
-     * 
+ * Please refer to + * https://learn.microsoft.com/rest/api/face/liveness-session-operations/delete-liveness-with-verify-session for + * more details. * * @param sessionId The unique ID to reference this session. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -983,336 +829,67 @@ public Mono> getLivenessSessionAuditEntriesWithResponseAsyn * @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. - * @return the response body along with {@link Response}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getLivenessSessionAuditEntriesWithResponse(String sessionId, - RequestOptions requestOptions) { + public Response deleteLivenessWithVerifySessionWithResponse(String sessionId, RequestOptions requestOptions) { final String accept = "application/json"; - return service.getLivenessSessionAuditEntriesSync(this.getEndpoint(), this.getServiceVersion().getVersion(), + return service.deleteLivenessWithVerifySessionSync(this.getEndpoint(), this.getServiceVersion().getVersion(), sessionId, accept, requestOptions, Context.NONE); } /** - * Create a new liveness session with verify. Client device submits VerifyImage during the - * /detectLivenessWithVerify/singleModal call. - * * Please refer to - * https://learn.microsoft.com/rest/api/face/liveness-session-operations/create-liveness-with-verify-session for + * https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-with-verify-session-result for * more details. - *

Request Body Schema

- * - *
-     * {@code
-     * {
-     *     livenessOperationMode: String(Passive/PassiveActive) (Required)
-     *     sendResultsToClient: Boolean (Optional)
-     *     deviceCorrelationIdSetInClient: Boolean (Optional)
-     *     enableSessionImage: Boolean (Optional)
-     *     livenessSingleModalModel: String(2022-10-15-preview.04/2023-12-20-preview.06) (Optional)
-     *     deviceCorrelationId: String (Optional)
-     *     authTokenTimeToLiveInSeconds: Integer (Optional)
-     *     returnVerifyImageHash: Boolean (Optional)
-     *     verifyConfidenceThreshold: Double (Optional)
-     * }
-     * }
-     * 
- * - *

Response Body Schema

- * - *
-     * {@code
-     * {
-     *     sessionId: String (Required)
-     *     authToken: String (Required)
-     *     verifyImage (Optional): {
-     *         faceRectangle (Required): {
-     *             top: int (Required)
-     *             left: int (Required)
-     *             width: int (Required)
-     *             height: int (Required)
-     *         }
-     *         qualityForRecognition: String(low/medium/high) (Required)
-     *     }
-     * }
-     * }
-     * 
- * - * @param body Body parameter. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @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. - * @return response of liveness session with verify creation with verify image provided along with {@link Response} - * on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createLivenessWithVerifySessionWithResponseAsync(BinaryData body, - RequestOptions requestOptions) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.createLivenessWithVerifySession(this.getEndpoint(), - this.getServiceVersion().getVersion(), contentType, accept, body, requestOptions, context)); - } - - /** - * Create a new liveness session with verify. Client device submits VerifyImage during the - * /detectLivenessWithVerify/singleModal call. - * - * Please refer to - * https://learn.microsoft.com/rest/api/face/liveness-session-operations/create-liveness-with-verify-session for - * more details. - *

Request Body Schema

- * - *
-     * {@code
-     * {
-     *     livenessOperationMode: String(Passive/PassiveActive) (Required)
-     *     sendResultsToClient: Boolean (Optional)
-     *     deviceCorrelationIdSetInClient: Boolean (Optional)
-     *     enableSessionImage: Boolean (Optional)
-     *     livenessSingleModalModel: String(2022-10-15-preview.04/2023-12-20-preview.06) (Optional)
-     *     deviceCorrelationId: String (Optional)
-     *     authTokenTimeToLiveInSeconds: Integer (Optional)
-     *     returnVerifyImageHash: Boolean (Optional)
-     *     verifyConfidenceThreshold: Double (Optional)
-     * }
-     * }
-     * 
- * - *

Response Body Schema

- * - *
-     * {@code
-     * {
-     *     sessionId: String (Required)
-     *     authToken: String (Required)
-     *     verifyImage (Optional): {
-     *         faceRectangle (Required): {
-     *             top: int (Required)
-     *             left: int (Required)
-     *             width: int (Required)
-     *             height: int (Required)
-     *         }
-     *         qualityForRecognition: String(low/medium/high) (Required)
-     *     }
-     * }
-     * }
-     * 
- * - * @param body Body parameter. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @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. - * @return response of liveness session with verify creation with verify image provided along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createLivenessWithVerifySessionWithResponse(BinaryData body, - RequestOptions requestOptions) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createLivenessWithVerifySessionSync(this.getEndpoint(), this.getServiceVersion().getVersion(), - contentType, accept, body, requestOptions, Context.NONE); - } - - /** - * Create a new liveness session with verify. Provide the verify image during session creation. - * - * Please refer to - * https://learn.microsoft.com/rest/api/face/liveness-session-operations/create-liveness-with-verify-session-with-verify-image - * for more details. - *

Response Body Schema

- * - *
-     * {@code
-     * {
-     *     sessionId: String (Required)
-     *     authToken: String (Required)
-     *     verifyImage (Optional): {
-     *         faceRectangle (Required): {
-     *             top: int (Required)
-     *             left: int (Required)
-     *             width: int (Required)
-     *             height: int (Required)
-     *         }
-     *         qualityForRecognition: String(low/medium/high) (Required)
-     *     }
-     * }
-     * }
-     * 
- * - * @param body Request content of liveness with verify session creation. - * @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. - * @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. - * @return response of liveness session with verify creation with verify image provided along with {@link Response} - * on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createLivenessWithVerifySessionWithVerifyImageWithResponseAsync(BinaryData body, - RequestOptions requestOptions) { - final String contentType = "multipart/form-data"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createLivenessWithVerifySessionWithVerifyImage(this.getEndpoint(), - this.getServiceVersion().getVersion(), contentType, accept, body, requestOptions, context)); - } - - /** - * Create a new liveness session with verify. Provide the verify image during session creation. - * - * Please refer to - * https://learn.microsoft.com/rest/api/face/liveness-session-operations/create-liveness-with-verify-session-with-verify-image - * for more details. - *

Response Body Schema

+ *

Response Body Schema

* *
      * {@code
      * {
      *     sessionId: String (Required)
      *     authToken: String (Required)
-     *     verifyImage (Optional): {
-     *         faceRectangle (Required): {
-     *             top: int (Required)
-     *             left: int (Required)
-     *             width: int (Required)
-     *             height: int (Required)
-     *         }
-     *         qualityForRecognition: String(low/medium/high) (Required)
-     *     }
-     * }
-     * }
-     * 
- * - * @param body Request content of liveness with verify session creation. - * @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. - * @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. - * @return response of liveness session with verify creation with verify image provided along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createLivenessWithVerifySessionWithVerifyImageWithResponse(BinaryData body, - RequestOptions requestOptions) { - final String contentType = "multipart/form-data"; - final String accept = "application/json"; - return service.createLivenessWithVerifySessionWithVerifyImageSync(this.getEndpoint(), - this.getServiceVersion().getVersion(), contentType, accept, body, requestOptions, Context.NONE); - } - - /** - * Delete all session related information for matching the specified session id. - * - * Please refer to - * https://learn.microsoft.com/rest/api/face/liveness-session-operations/delete-liveness-with-verify-session for - * more details. - * - * @param sessionId The unique ID to reference this session. - * @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. - * @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. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteLivenessWithVerifySessionWithResponseAsync(String sessionId, - RequestOptions requestOptions) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.deleteLivenessWithVerifySession(this.getEndpoint(), - this.getServiceVersion().getVersion(), sessionId, accept, requestOptions, context)); - } - - /** - * Delete all session related information for matching the specified session id. - * - * Please refer to - * https://learn.microsoft.com/rest/api/face/liveness-session-operations/delete-liveness-with-verify-session for - * more details. - * - * @param sessionId The unique ID to reference this session. - * @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. - * @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. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteLivenessWithVerifySessionWithResponse(String sessionId, RequestOptions requestOptions) { - final String accept = "application/json"; - return service.deleteLivenessWithVerifySessionSync(this.getEndpoint(), this.getServiceVersion().getVersion(), - sessionId, accept, requestOptions, Context.NONE); - } - - /** - * Please refer to - * https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-with-verify-session-result for - * more details. - *

Response Body Schema

- * - *
-     * {@code
-     * {
-     *     id: String (Required)
-     *     createdDateTime: OffsetDateTime (Required)
-     *     sessionStartDateTime: OffsetDateTime (Optional)
-     *     sessionExpired: boolean (Required)
-     *     deviceCorrelationId: String (Optional)
-     *     authTokenTimeToLiveInSeconds: Integer (Optional)
-     *     status: String(NotStarted/Started/ResultAvailable) (Required)
-     *     result (Optional): {
-     *         id: long (Required)
-     *         sessionId: String (Required)
-     *         requestId: String (Required)
-     *         clientRequestId: String (Required)
-     *         receivedDateTime: OffsetDateTime (Required)
-     *         request (Required): {
-     *             url: String (Required)
-     *             method: String (Required)
-     *             contentLength: Long (Optional)
-     *             contentType: String (Required)
-     *             userAgent: String (Optional)
-     *         }
-     *         response (Required): {
-     *             body (Required): {
-     *                 livenessDecision: String(uncertain/realface/spoofface) (Optional)
-     *                 target (Optional): {
-     *                     faceRectangle (Required): {
-     *                         top: int (Required)
-     *                         left: int (Required)
-     *                         width: int (Required)
-     *                         height: int (Required)
-     *                     }
-     *                     fileName: String (Required)
-     *                     timeOffsetWithinFile: int (Required)
-     *                     imageType: String(Color/Infrared/Depth) (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *     modelVersion: String(2024-11-15) (Optional)
+     *     results (Required): {
+     *         verifyReferences (Required): [
+     *              (Required){
+     *                 referenceType: String(Color/Infrared/Depth) (Required)
+     *                 faceRectangle (Required): {
+     *                     top: int (Required)
+     *                     left: int (Required)
+     *                     width: int (Required)
+     *                     height: int (Required)
      *                 }
-     *                 modelVersionUsed: String(2022-10-15-preview.04/2023-12-20-preview.06) (Optional)
-     *                 verifyResult (Optional): {
-     *                     verifyImage (Required): {
-     *                         faceRectangle (Required): (recursive schema, see faceRectangle above)
-     *                         qualityForRecognition: String(low/medium/high) (Required)
+     *                 qualityForRecognition: String(low/medium/high) (Required)
+     *             }
+     *         ]
+     *         attempts (Required): [
+     *              (Required){
+     *                 attemptId: int (Required)
+     *                 attemptStatus: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *                 result (Optional): {
+     *                     livenessDecision: String(uncertain/realface/spoofface) (Optional)
+     *                     targets (Required): {
+     *                         color (Required): {
+     *                             faceRectangle (Required): (recursive schema, see faceRectangle above)
+     *                         }
+     *                     }
+     *                     digest: String (Required)
+     *                     sessionImageId: String (Optional)
+     *                     verifyResult (Optional): {
+     *                         matchConfidence: double (Required)
+     *                         isIdentical: boolean (Required)
      *                     }
-     *                     matchConfidence: double (Required)
-     *                     isIdentical: boolean (Required)
+     *                     verifyImageHash: String (Optional)
      *                 }
-     *                  (Optional): {
-     *                     String: BinaryData (Required)
+     *                 error (Optional): {
+     *                     code: String (Required)
+     *                     message: String (Required)
+     *                     targets (Required): (recursive schema, see targets above)
      *                 }
      *             }
-     *             statusCode: int (Required)
-     *             latencyInMilliseconds: long (Required)
-     *         }
-     *         digest: String (Required)
-     *         sessionImageId: String (Optional)
-     *         verifyImageHash: String (Optional)
+     *         ]
      *     }
      * }
      * }
@@ -1344,59 +921,49 @@ public Mono> getLivenessWithVerifySessionResultWithResponse
      * 
      * {@code
      * {
-     *     id: String (Required)
-     *     createdDateTime: OffsetDateTime (Required)
-     *     sessionStartDateTime: OffsetDateTime (Optional)
-     *     sessionExpired: boolean (Required)
-     *     deviceCorrelationId: String (Optional)
-     *     authTokenTimeToLiveInSeconds: Integer (Optional)
-     *     status: String(NotStarted/Started/ResultAvailable) (Required)
-     *     result (Optional): {
-     *         id: long (Required)
-     *         sessionId: String (Required)
-     *         requestId: String (Required)
-     *         clientRequestId: String (Required)
-     *         receivedDateTime: OffsetDateTime (Required)
-     *         request (Required): {
-     *             url: String (Required)
-     *             method: String (Required)
-     *             contentLength: Long (Optional)
-     *             contentType: String (Required)
-     *             userAgent: String (Optional)
-     *         }
-     *         response (Required): {
-     *             body (Required): {
-     *                 livenessDecision: String(uncertain/realface/spoofface) (Optional)
-     *                 target (Optional): {
-     *                     faceRectangle (Required): {
-     *                         top: int (Required)
-     *                         left: int (Required)
-     *                         width: int (Required)
-     *                         height: int (Required)
-     *                     }
-     *                     fileName: String (Required)
-     *                     timeOffsetWithinFile: int (Required)
-     *                     imageType: String(Color/Infrared/Depth) (Required)
+     *     sessionId: String (Required)
+     *     authToken: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *     modelVersion: String(2024-11-15) (Optional)
+     *     results (Required): {
+     *         verifyReferences (Required): [
+     *              (Required){
+     *                 referenceType: String(Color/Infrared/Depth) (Required)
+     *                 faceRectangle (Required): {
+     *                     top: int (Required)
+     *                     left: int (Required)
+     *                     width: int (Required)
+     *                     height: int (Required)
      *                 }
-     *                 modelVersionUsed: String(2022-10-15-preview.04/2023-12-20-preview.06) (Optional)
-     *                 verifyResult (Optional): {
-     *                     verifyImage (Required): {
-     *                         faceRectangle (Required): (recursive schema, see faceRectangle above)
-     *                         qualityForRecognition: String(low/medium/high) (Required)
+     *                 qualityForRecognition: String(low/medium/high) (Required)
+     *             }
+     *         ]
+     *         attempts (Required): [
+     *              (Required){
+     *                 attemptId: int (Required)
+     *                 attemptStatus: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *                 result (Optional): {
+     *                     livenessDecision: String(uncertain/realface/spoofface) (Optional)
+     *                     targets (Required): {
+     *                         color (Required): {
+     *                             faceRectangle (Required): (recursive schema, see faceRectangle above)
+     *                         }
+     *                     }
+     *                     digest: String (Required)
+     *                     sessionImageId: String (Optional)
+     *                     verifyResult (Optional): {
+     *                         matchConfidence: double (Required)
+     *                         isIdentical: boolean (Required)
      *                     }
-     *                     matchConfidence: double (Required)
-     *                     isIdentical: boolean (Required)
+     *                     verifyImageHash: String (Optional)
      *                 }
-     *                  (Optional): {
-     *                     String: BinaryData (Required)
+     *                 error (Optional): {
+     *                     code: String (Required)
+     *                     message: String (Required)
+     *                     targets (Required): (recursive schema, see targets above)
      *                 }
      *             }
-     *             statusCode: int (Required)
-     *             latencyInMilliseconds: long (Required)
-     *         }
-     *         digest: String (Required)
-     *         sessionImageId: String (Optional)
-     *         verifyImageHash: String (Optional)
+     *         ]
      *     }
      * }
      * }
@@ -1418,272 +985,6 @@ public Response getLivenessWithVerifySessionResultWithResponse(Strin
             sessionId, accept, requestOptions, Context.NONE);
     }
 
-    /**
-     * Lists sessions for /detectLivenessWithVerify/SingleModal.
-     * 
-     * Please refer to
-     * https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-with-verify-sessions for more
-     * details.
-     * 

Query Parameters

- * - * - * - * - * - *
Query Parameters
NameTypeRequiredDescription
startStringNoList resources greater than the "start". It contains no more than - * 64 characters. Default is empty.
topIntegerNoThe number of items to list, ranging in [1, 1000]. Default is - * 1000.
- * You can add these to a request with {@link RequestOptions#addQueryParam} - *

Response Body Schema

- * - *
-     * {@code
-     * [
-     *      (Required){
-     *         id: String (Required)
-     *         createdDateTime: OffsetDateTime (Required)
-     *         sessionStartDateTime: OffsetDateTime (Optional)
-     *         sessionExpired: boolean (Required)
-     *         deviceCorrelationId: String (Optional)
-     *         authTokenTimeToLiveInSeconds: Integer (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. - * @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. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getLivenessWithVerifySessionsWithResponseAsync(RequestOptions requestOptions) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.getLivenessWithVerifySessions(this.getEndpoint(), - this.getServiceVersion().getVersion(), accept, requestOptions, context)); - } - - /** - * Lists sessions for /detectLivenessWithVerify/SingleModal. - * - * Please refer to - * https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-with-verify-sessions for more - * details. - *

Query Parameters

- * - * - * - * - * - *
Query Parameters
NameTypeRequiredDescription
startStringNoList resources greater than the "start". It contains no more than - * 64 characters. Default is empty.
topIntegerNoThe number of items to list, ranging in [1, 1000]. Default is - * 1000.
- * You can add these to a request with {@link RequestOptions#addQueryParam} - *

Response Body Schema

- * - *
-     * {@code
-     * [
-     *      (Required){
-     *         id: String (Required)
-     *         createdDateTime: OffsetDateTime (Required)
-     *         sessionStartDateTime: OffsetDateTime (Optional)
-     *         sessionExpired: boolean (Required)
-     *         deviceCorrelationId: String (Optional)
-     *         authTokenTimeToLiveInSeconds: Integer (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. - * @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. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getLivenessWithVerifySessionsWithResponse(RequestOptions requestOptions) { - final String accept = "application/json"; - return service.getLivenessWithVerifySessionsSync(this.getEndpoint(), this.getServiceVersion().getVersion(), - accept, requestOptions, Context.NONE); - } - - /** - * Please refer to - * https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-with-verify-session-audit-entries - * for more details. - *

Query Parameters

- * - * - * - * - * - *
Query Parameters
NameTypeRequiredDescription
startStringNoList resources greater than the "start". It contains no more than - * 64 characters. Default is empty.
topIntegerNoThe number of items to list, ranging in [1, 1000]. Default is - * 1000.
- * You can add these to a request with {@link RequestOptions#addQueryParam} - *

Response Body Schema

- * - *
-     * {@code
-     * [
-     *      (Required){
-     *         id: long (Required)
-     *         sessionId: String (Required)
-     *         requestId: String (Required)
-     *         clientRequestId: String (Required)
-     *         receivedDateTime: OffsetDateTime (Required)
-     *         request (Required): {
-     *             url: String (Required)
-     *             method: String (Required)
-     *             contentLength: Long (Optional)
-     *             contentType: String (Required)
-     *             userAgent: String (Optional)
-     *         }
-     *         response (Required): {
-     *             body (Required): {
-     *                 livenessDecision: String(uncertain/realface/spoofface) (Optional)
-     *                 target (Optional): {
-     *                     faceRectangle (Required): {
-     *                         top: int (Required)
-     *                         left: int (Required)
-     *                         width: int (Required)
-     *                         height: int (Required)
-     *                     }
-     *                     fileName: String (Required)
-     *                     timeOffsetWithinFile: int (Required)
-     *                     imageType: String(Color/Infrared/Depth) (Required)
-     *                 }
-     *                 modelVersionUsed: String(2022-10-15-preview.04/2023-12-20-preview.06) (Optional)
-     *                 verifyResult (Optional): {
-     *                     verifyImage (Required): {
-     *                         faceRectangle (Required): (recursive schema, see faceRectangle above)
-     *                         qualityForRecognition: String(low/medium/high) (Required)
-     *                     }
-     *                     matchConfidence: double (Required)
-     *                     isIdentical: boolean (Required)
-     *                 }
-     *                  (Optional): {
-     *                     String: BinaryData (Required)
-     *                 }
-     *             }
-     *             statusCode: int (Required)
-     *             latencyInMilliseconds: long (Required)
-     *         }
-     *         digest: String (Required)
-     *         sessionImageId: String (Optional)
-     *         verifyImageHash: String (Optional)
-     *     }
-     * ]
-     * }
-     * 
- * - * @param sessionId The unique ID to reference this session. - * @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. - * @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. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getLivenessWithVerifySessionAuditEntriesWithResponseAsync(String sessionId, - RequestOptions requestOptions) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.getLivenessWithVerifySessionAuditEntries(this.getEndpoint(), - this.getServiceVersion().getVersion(), sessionId, accept, requestOptions, context)); - } - - /** - * Please refer to - * https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-with-verify-session-audit-entries - * for more details. - *

Query Parameters

- * - * - * - * - * - *
Query Parameters
NameTypeRequiredDescription
startStringNoList resources greater than the "start". It contains no more than - * 64 characters. Default is empty.
topIntegerNoThe number of items to list, ranging in [1, 1000]. Default is - * 1000.
- * You can add these to a request with {@link RequestOptions#addQueryParam} - *

Response Body Schema

- * - *
-     * {@code
-     * [
-     *      (Required){
-     *         id: long (Required)
-     *         sessionId: String (Required)
-     *         requestId: String (Required)
-     *         clientRequestId: String (Required)
-     *         receivedDateTime: OffsetDateTime (Required)
-     *         request (Required): {
-     *             url: String (Required)
-     *             method: String (Required)
-     *             contentLength: Long (Optional)
-     *             contentType: String (Required)
-     *             userAgent: String (Optional)
-     *         }
-     *         response (Required): {
-     *             body (Required): {
-     *                 livenessDecision: String(uncertain/realface/spoofface) (Optional)
-     *                 target (Optional): {
-     *                     faceRectangle (Required): {
-     *                         top: int (Required)
-     *                         left: int (Required)
-     *                         width: int (Required)
-     *                         height: int (Required)
-     *                     }
-     *                     fileName: String (Required)
-     *                     timeOffsetWithinFile: int (Required)
-     *                     imageType: String(Color/Infrared/Depth) (Required)
-     *                 }
-     *                 modelVersionUsed: String(2022-10-15-preview.04/2023-12-20-preview.06) (Optional)
-     *                 verifyResult (Optional): {
-     *                     verifyImage (Required): {
-     *                         faceRectangle (Required): (recursive schema, see faceRectangle above)
-     *                         qualityForRecognition: String(low/medium/high) (Required)
-     *                     }
-     *                     matchConfidence: double (Required)
-     *                     isIdentical: boolean (Required)
-     *                 }
-     *                  (Optional): {
-     *                     String: BinaryData (Required)
-     *                 }
-     *             }
-     *             statusCode: int (Required)
-     *             latencyInMilliseconds: long (Required)
-     *         }
-     *         digest: String (Required)
-     *         sessionImageId: String (Optional)
-     *         verifyImageHash: String (Optional)
-     *     }
-     * ]
-     * }
-     * 
- * - * @param sessionId The unique ID to reference this session. - * @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. - * @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. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getLivenessWithVerifySessionAuditEntriesWithResponse(String sessionId, - RequestOptions requestOptions) { - final String accept = "application/json"; - return service.getLivenessWithVerifySessionAuditEntriesSync(this.getEndpoint(), - this.getServiceVersion().getVersion(), sessionId, accept, requestOptions, Context.NONE); - } - /** * Detect human faces in an image, return face rectangles, and optionally with faceIds, landmarks, and attributes. * 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 06740b10fb4d..7192da633153 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 @@ -89,7 +89,7 @@ public interface LargeFaceListsService { @UnexpectedResponseExceptionType(HttpResponseException.class) Mono> create(@HostParam("endpoint") String endpoint, @HostParam("apiVersion") String apiVersion, @PathParam("largeFaceListId") String largeFaceListId, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData createRequest1, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData createRequest, RequestOptions requestOptions, Context context); @Put("/largefacelists/{largeFaceListId}") @@ -100,7 +100,7 @@ Mono> create(@HostParam("endpoint") String endpoint, @HostParam(" @UnexpectedResponseExceptionType(HttpResponseException.class) Response createSync(@HostParam("endpoint") String endpoint, @HostParam("apiVersion") String apiVersion, @PathParam("largeFaceListId") String largeFaceListId, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData createRequest1, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData createRequest, RequestOptions requestOptions, Context context); @Delete("/largefacelists/{largeFaceListId}") @@ -151,7 +151,7 @@ Response getSync(@HostParam("endpoint") String endpoint, @HostParam( @UnexpectedResponseExceptionType(HttpResponseException.class) Mono> update(@HostParam("endpoint") String endpoint, @HostParam("apiVersion") String apiVersion, @PathParam("largeFaceListId") String largeFaceListId, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData updateRequest1, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData updateRequest, RequestOptions requestOptions, Context context); @Patch("/largefacelists/{largeFaceListId}") @@ -162,7 +162,7 @@ Mono> update(@HostParam("endpoint") String endpoint, @HostParam(" @UnexpectedResponseExceptionType(HttpResponseException.class) Response updateSync(@HostParam("endpoint") String endpoint, @HostParam("apiVersion") String apiVersion, @PathParam("largeFaceListId") String largeFaceListId, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData updateRequest1, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData updateRequest, RequestOptions requestOptions, Context context); @Get("/largefacelists") @@ -234,7 +234,7 @@ Response trainSync(@HostParam("endpoint") String endpoint, @HostParam("api Mono> addFaceFromUrlImpl(@HostParam("endpoint") String endpoint, @HostParam("apiVersion") String apiVersion, @PathParam("largeFaceListId") String largeFaceListId, @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") BinaryData addFaceFromUrlRequest1, RequestOptions requestOptions, + @BodyParam("application/json") BinaryData addFaceFromUrlRequest2, RequestOptions requestOptions, Context context); @Post("/largefacelists/{largeFaceListId}/persistedfaces") @@ -246,7 +246,7 @@ Mono> addFaceFromUrlImpl(@HostParam("endpoint") String endp Response addFaceFromUrlImplSync(@HostParam("endpoint") String endpoint, @HostParam("apiVersion") String apiVersion, @PathParam("largeFaceListId") String largeFaceListId, @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") BinaryData addFaceFromUrlRequest1, RequestOptions requestOptions, + @BodyParam("application/json") BinaryData addFaceFromUrlRequest2, RequestOptions requestOptions, Context context); @Post("/largefacelists/{largeFaceListId}/persistedfaces") @@ -326,7 +326,7 @@ Response getFaceSync(@HostParam("endpoint") String endpoint, Mono> updateFace(@HostParam("endpoint") String endpoint, @HostParam("apiVersion") String apiVersion, @PathParam("largeFaceListId") String largeFaceListId, @PathParam("persistedFaceId") String persistedFaceId, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData updateFaceRequest1, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData updateFaceRequest, RequestOptions requestOptions, Context context); @Patch("/largefacelists/{largeFaceListId}/persistedfaces/{persistedFaceId}") @@ -338,7 +338,7 @@ Mono> updateFace(@HostParam("endpoint") String endpoint, Response updateFaceSync(@HostParam("endpoint") String endpoint, @HostParam("apiVersion") String apiVersion, @PathParam("largeFaceListId") String largeFaceListId, @PathParam("persistedFaceId") String persistedFaceId, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData updateFaceRequest1, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData updateFaceRequest, RequestOptions requestOptions, Context context); @Get("/largefacelists/{largeFaceListId}/persistedfaces") @@ -380,7 +380,7 @@ Response getFacesSync(@HostParam("endpoint") String endpoint, * } *
* - * @param createRequest1 The createRequest1 parameter. + * @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. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -389,12 +389,12 @@ Response getFacesSync(@HostParam("endpoint") String endpoint, * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createWithResponseAsync(BinaryData createRequest1, 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(), - this.client.getLargeFaceListId(), contentType, accept, createRequest1, requestOptions, context)); + this.client.getLargeFaceListId(), contentType, accept, createRequest, requestOptions, context)); } /** @@ -415,7 +415,7 @@ public Mono> createWithResponseAsync(BinaryData createRequest1, R * } *
* - * @param createRequest1 The createRequest1 parameter. + * @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. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -424,11 +424,11 @@ public Mono> createWithResponseAsync(BinaryData createRequest1, R * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse(BinaryData createRequest1, 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(), - this.client.getLargeFaceListId(), contentType, accept, createRequest1, requestOptions, Context.NONE); + this.client.getLargeFaceListId(), contentType, accept, createRequest, requestOptions, Context.NONE); } /** @@ -564,7 +564,7 @@ public Response getWithResponse(RequestOptions requestOptions) { * } *
* - * @param updateRequest1 The updateRequest1 parameter. + * @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. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -573,12 +573,12 @@ public Response getWithResponse(RequestOptions requestOptions) { * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync(BinaryData updateRequest1, 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(), - this.client.getLargeFaceListId(), contentType, accept, updateRequest1, requestOptions, context)); + this.client.getLargeFaceListId(), contentType, accept, updateRequest, requestOptions, context)); } /** @@ -595,7 +595,7 @@ public Mono> updateWithResponseAsync(BinaryData updateRequest1, R * } *
* - * @param updateRequest1 The updateRequest1 parameter. + * @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. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -604,11 +604,11 @@ public Mono> updateWithResponseAsync(BinaryData updateRequest1, R * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(BinaryData updateRequest1, 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(), - this.client.getLargeFaceListId(), contentType, accept, updateRequest1, requestOptions, Context.NONE); + this.client.getLargeFaceListId(), contentType, accept, updateRequest, requestOptions, Context.NONE); } /** @@ -952,7 +952,7 @@ public SyncPoller beginTrainWithModel(RequestOptions r * } * * - * @param addFaceFromUrlRequest1 The addFaceFromUrlRequest1 parameter. + * @param addFaceFromUrlRequest2 The addFaceFromUrlRequest2 parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -961,13 +961,13 @@ public SyncPoller beginTrainWithModel(RequestOptions r * @return response body for adding face along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> addFaceFromUrlImplWithResponseAsync(BinaryData addFaceFromUrlRequest1, + public Mono> addFaceFromUrlImplWithResponseAsync(BinaryData addFaceFromUrlRequest2, 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(), this.client.getLargeFaceListId(), contentType, accept, - addFaceFromUrlRequest1, requestOptions, context)); + addFaceFromUrlRequest2, requestOptions, context)); } /** @@ -1009,7 +1009,7 @@ public Mono> addFaceFromUrlImplWithResponseAsync(BinaryData * } * * - * @param addFaceFromUrlRequest1 The addFaceFromUrlRequest1 parameter. + * @param addFaceFromUrlRequest2 The addFaceFromUrlRequest2 parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -1018,12 +1018,12 @@ public Mono> addFaceFromUrlImplWithResponseAsync(BinaryData * @return response body for adding face along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response addFaceFromUrlImplWithResponse(BinaryData addFaceFromUrlRequest1, + public Response addFaceFromUrlImplWithResponse(BinaryData addFaceFromUrlRequest2, RequestOptions requestOptions) { final String contentType = "application/json"; final String accept = "application/json"; return service.addFaceFromUrlImplSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), - this.client.getLargeFaceListId(), contentType, accept, addFaceFromUrlRequest1, requestOptions, + this.client.getLargeFaceListId(), contentType, accept, addFaceFromUrlRequest2, requestOptions, Context.NONE); } @@ -1247,7 +1247,7 @@ public Response getFaceWithResponse(String persistedFaceId, RequestO * * * @param persistedFaceId Face ID of the face. - * @param updateFaceRequest1 The updateFaceRequest1 parameter. + * @param updateFaceRequest The updateFaceRequest parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -1256,13 +1256,13 @@ public Response getFaceWithResponse(String persistedFaceId, RequestO * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateFaceWithResponseAsync(String persistedFaceId, BinaryData updateFaceRequest1, + public Mono> updateFaceWithResponseAsync(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(), this.client.getLargeFaceListId(), persistedFaceId, - contentType, accept, updateFaceRequest1, requestOptions, context)); + contentType, accept, updateFaceRequest, requestOptions, context)); } /** @@ -1279,7 +1279,7 @@ public Mono> updateFaceWithResponseAsync(String persistedFaceId, * * * @param persistedFaceId Face ID of the face. - * @param updateFaceRequest1 The updateFaceRequest1 parameter. + * @param updateFaceRequest The updateFaceRequest parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -1288,12 +1288,12 @@ public Mono> updateFaceWithResponseAsync(String persistedFaceId, * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateFaceWithResponse(String persistedFaceId, BinaryData updateFaceRequest1, + public Response updateFaceWithResponse(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(), - this.client.getLargeFaceListId(), persistedFaceId, contentType, accept, updateFaceRequest1, requestOptions, + this.client.getLargeFaceListId(), persistedFaceId, contentType, accept, updateFaceRequest, 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 851591b35e01..f4bdfd1133c1 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 @@ -89,7 +89,7 @@ public interface LargePersonGroupsService { @UnexpectedResponseExceptionType(HttpResponseException.class) Mono> create(@HostParam("endpoint") String endpoint, @HostParam("apiVersion") String apiVersion, @PathParam("largePersonGroupId") String largePersonGroupId, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData createRequest, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData createRequest1, RequestOptions requestOptions, Context context); @Put("/largepersongroups/{largePersonGroupId}") @@ -100,7 +100,7 @@ Mono> create(@HostParam("endpoint") String endpoint, @HostParam(" @UnexpectedResponseExceptionType(HttpResponseException.class) Response createSync(@HostParam("endpoint") String endpoint, @HostParam("apiVersion") String apiVersion, @PathParam("largePersonGroupId") String largePersonGroupId, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData createRequest, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData createRequest1, RequestOptions requestOptions, Context context); @Delete("/largepersongroups/{largePersonGroupId}") @@ -151,7 +151,7 @@ Response getSync(@HostParam("endpoint") String endpoint, @HostParam( @UnexpectedResponseExceptionType(HttpResponseException.class) Mono> update(@HostParam("endpoint") String endpoint, @HostParam("apiVersion") String apiVersion, @PathParam("largePersonGroupId") String largePersonGroupId, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData updateRequest, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData updateRequest1, RequestOptions requestOptions, Context context); @Patch("/largepersongroups/{largePersonGroupId}") @@ -162,7 +162,7 @@ Mono> update(@HostParam("endpoint") String endpoint, @HostParam(" @UnexpectedResponseExceptionType(HttpResponseException.class) Response updateSync(@HostParam("endpoint") String endpoint, @HostParam("apiVersion") String apiVersion, @PathParam("largePersonGroupId") String largePersonGroupId, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData updateRequest, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData updateRequest1, RequestOptions requestOptions, Context context); @Get("/largepersongroups") @@ -346,7 +346,7 @@ Response getPersonsSync(@HostParam("endpoint") String endpoint, Mono> addFaceFromUrlImpl(@HostParam("endpoint") String endpoint, @HostParam("apiVersion") String apiVersion, @PathParam("largePersonGroupId") String largePersonGroupId, @PathParam("personId") String personId, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData addFaceFromUrlRequest, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData addFaceFromUrlRequest1, RequestOptions requestOptions, Context context); @Post("/largepersongroups/{largePersonGroupId}/persons/{personId}/persistedfaces") @@ -358,7 +358,7 @@ Mono> addFaceFromUrlImpl(@HostParam("endpoint") String endp Response addFaceFromUrlImplSync(@HostParam("endpoint") String endpoint, @HostParam("apiVersion") String apiVersion, @PathParam("largePersonGroupId") String largePersonGroupId, @PathParam("personId") String personId, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData addFaceFromUrlRequest, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData addFaceFromUrlRequest1, RequestOptions requestOptions, Context context); @Post("/largepersongroups/{largePersonGroupId}/persons/{personId}/persistedfaces") @@ -439,7 +439,7 @@ Mono> updateFace(@HostParam("endpoint") String endpoint, @HostParam("apiVersion") String apiVersion, @PathParam("largePersonGroupId") String largePersonGroupId, @PathParam("personId") String personId, @PathParam("persistedFaceId") String persistedFaceId, @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") BinaryData updateFaceRequest, RequestOptions requestOptions, + @BodyParam("application/json") BinaryData updateFaceRequest1, RequestOptions requestOptions, Context context); @Patch("/largepersongroups/{largePersonGroupId}/persons/{personId}/persistedfaces/{persistedFaceId}") @@ -452,7 +452,7 @@ Response updateFaceSync(@HostParam("endpoint") String endpoint, @HostParam("apiVersion") String apiVersion, @PathParam("largePersonGroupId") String largePersonGroupId, @PathParam("personId") String personId, @PathParam("persistedFaceId") String persistedFaceId, @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") BinaryData updateFaceRequest, RequestOptions requestOptions, + @BodyParam("application/json") BinaryData updateFaceRequest1, RequestOptions requestOptions, Context context); } @@ -474,7 +474,7 @@ Response updateFaceSync(@HostParam("endpoint") String endpoint, * } * * - * @param createRequest The createRequest parameter. + * @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. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -483,12 +483,12 @@ Response updateFaceSync(@HostParam("endpoint") String endpoint, * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createWithResponseAsync(BinaryData createRequest, 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(), - this.client.getLargePersonGroupId(), contentType, accept, createRequest, requestOptions, context)); + this.client.getLargePersonGroupId(), contentType, accept, createRequest1, requestOptions, context)); } /** @@ -509,7 +509,7 @@ public Mono> createWithResponseAsync(BinaryData createRequest, Re * } * * - * @param createRequest The createRequest parameter. + * @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. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -518,11 +518,11 @@ public Mono> createWithResponseAsync(BinaryData createRequest, Re * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse(BinaryData createRequest, 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(), - this.client.getLargePersonGroupId(), contentType, accept, createRequest, requestOptions, Context.NONE); + this.client.getLargePersonGroupId(), contentType, accept, createRequest1, requestOptions, Context.NONE); } /** @@ -655,7 +655,7 @@ public Response getWithResponse(RequestOptions requestOptions) { * } * * - * @param updateRequest The updateRequest parameter. + * @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. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -664,12 +664,12 @@ public Response getWithResponse(RequestOptions requestOptions) { * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync(BinaryData updateRequest, 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(), - this.client.getLargePersonGroupId(), contentType, accept, updateRequest, requestOptions, context)); + this.client.getLargePersonGroupId(), contentType, accept, updateRequest1, requestOptions, context)); } /** @@ -686,7 +686,7 @@ public Mono> updateWithResponseAsync(BinaryData updateRequest, Re * } * * - * @param updateRequest The updateRequest parameter. + * @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. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -695,11 +695,11 @@ public Mono> updateWithResponseAsync(BinaryData updateRequest, Re * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(BinaryData updateRequest, 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(), - this.client.getLargePersonGroupId(), contentType, accept, updateRequest, requestOptions, Context.NONE); + this.client.getLargePersonGroupId(), contentType, accept, updateRequest1, requestOptions, Context.NONE); } /** @@ -1421,7 +1421,7 @@ public Response getPersonsWithResponse(RequestOptions requestOptions * * * @param personId ID of the person. - * @param addFaceFromUrlRequest The addFaceFromUrlRequest parameter. + * @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. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -1431,12 +1431,12 @@ public Response getPersonsWithResponse(RequestOptions requestOptions */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> addFaceFromUrlImplWithResponseAsync(String personId, - BinaryData addFaceFromUrlRequest, RequestOptions requestOptions) { + 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(), this.client.getLargePersonGroupId(), personId, contentType, - accept, addFaceFromUrlRequest, requestOptions, context)); + accept, addFaceFromUrlRequest1, requestOptions, context)); } /** @@ -1480,7 +1480,7 @@ public Mono> addFaceFromUrlImplWithResponseAsync(String per * * * @param personId ID of the person. - * @param addFaceFromUrlRequest The addFaceFromUrlRequest parameter. + * @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. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -1489,12 +1489,12 @@ public Mono> addFaceFromUrlImplWithResponseAsync(String per * @return response body for adding face along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response addFaceFromUrlImplWithResponse(String personId, BinaryData addFaceFromUrlRequest, + public Response addFaceFromUrlImplWithResponse(String personId, BinaryData addFaceFromUrlRequest1, RequestOptions requestOptions) { final String contentType = "application/json"; final String accept = "application/json"; return service.addFaceFromUrlImplSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), - this.client.getLargePersonGroupId(), personId, contentType, accept, addFaceFromUrlRequest, requestOptions, + this.client.getLargePersonGroupId(), personId, contentType, accept, addFaceFromUrlRequest1, requestOptions, Context.NONE); } @@ -1745,7 +1745,7 @@ public Response getFaceWithResponse(String personId, String persiste * * @param personId ID of the person. * @param persistedFaceId Face ID of the face. - * @param updateFaceRequest The updateFaceRequest parameter. + * @param updateFaceRequest1 The updateFaceRequest1 parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -1755,12 +1755,12 @@ public Response getFaceWithResponse(String personId, String persiste */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> updateFaceWithResponseAsync(String personId, String persistedFaceId, - BinaryData updateFaceRequest, RequestOptions requestOptions) { + 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(), this.client.getLargePersonGroupId(), personId, - persistedFaceId, contentType, accept, updateFaceRequest, requestOptions, context)); + persistedFaceId, contentType, accept, updateFaceRequest1, requestOptions, context)); } /** @@ -1779,7 +1779,7 @@ public Mono> updateFaceWithResponseAsync(String personId, String * * @param personId ID of the person. * @param persistedFaceId Face ID of the face. - * @param updateFaceRequest The updateFaceRequest parameter. + * @param updateFaceRequest1 The updateFaceRequest1 parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -1788,12 +1788,12 @@ public Mono> updateFaceWithResponseAsync(String personId, String * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateFaceWithResponse(String personId, String persistedFaceId, BinaryData updateFaceRequest, + public Response updateFaceWithResponse(String personId, 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(), - this.client.getLargePersonGroupId(), personId, persistedFaceId, contentType, accept, updateFaceRequest, + this.client.getLargePersonGroupId(), personId, persistedFaceId, contentType, accept, updateFaceRequest1, requestOptions, Context.NONE); } } diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/implementation/models/AddFaceFromUrlRequest2.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/implementation/models/AddFaceFromUrlRequest2.java new file mode 100644 index 000000000000..3afcba7a72ea --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/implementation/models/AddFaceFromUrlRequest2.java @@ -0,0 +1,83 @@ +// 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.implementation.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The AddFaceFromUrlRequest2 model. + */ +@Immutable +public final class AddFaceFromUrlRequest2 implements JsonSerializable { + /* + * URL of input image. + */ + @Generated + private final String url; + + /** + * Creates an instance of AddFaceFromUrlRequest2 class. + * + * @param url the url value to set. + */ + @Generated + public AddFaceFromUrlRequest2(String url) { + this.url = url; + } + + /** + * Get the url property: URL of input image. + * + * @return the url value. + */ + @Generated + public String getUrl() { + return this.url; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("url", this.url); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AddFaceFromUrlRequest2 from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AddFaceFromUrlRequest2 if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AddFaceFromUrlRequest2. + */ + @Generated + public static AddFaceFromUrlRequest2 fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String url = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("url".equals(fieldName)) { + url = reader.getString(); + } else { + reader.skipChildren(); + } + } + return new AddFaceFromUrlRequest2(url); + }); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/CreateLivenessSessionContent.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/CreateLivenessSessionContent.java index aac886809d00..6bc73b6fed55 100644 --- a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/CreateLivenessSessionContent.java +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/CreateLivenessSessionContent.java @@ -23,15 +23,6 @@ public final class CreateLivenessSessionContent implements JsonSerializable { LivenessOperationMode livenessOperationMode = null; - Boolean sendResultsToClient = null; Boolean deviceCorrelationIdSetInClient = null; Boolean enableSessionImage = null; - LivenessModel livenessSingleModalModel = null; + LivenessModel livenessModelVersion = null; String deviceCorrelationId = null; Integer authTokenTimeToLiveInSeconds = null; while (reader.nextToken() != JsonToken.END_OBJECT) { @@ -219,14 +180,12 @@ public static CreateLivenessSessionContent fromJson(JsonReader jsonReader) throw reader.nextToken(); if ("livenessOperationMode".equals(fieldName)) { livenessOperationMode = LivenessOperationMode.fromString(reader.getString()); - } else if ("sendResultsToClient".equals(fieldName)) { - sendResultsToClient = reader.getNullable(JsonReader::getBoolean); } else if ("deviceCorrelationIdSetInClient".equals(fieldName)) { deviceCorrelationIdSetInClient = reader.getNullable(JsonReader::getBoolean); } else if ("enableSessionImage".equals(fieldName)) { enableSessionImage = reader.getNullable(JsonReader::getBoolean); - } else if ("livenessSingleModalModel".equals(fieldName)) { - livenessSingleModalModel = LivenessModel.fromString(reader.getString()); + } else if ("livenessModelVersion".equals(fieldName)) { + livenessModelVersion = LivenessModel.fromString(reader.getString()); } else if ("deviceCorrelationId".equals(fieldName)) { deviceCorrelationId = reader.getString(); } else if ("authTokenTimeToLiveInSeconds".equals(fieldName)) { @@ -237,10 +196,9 @@ public static CreateLivenessSessionContent fromJson(JsonReader jsonReader) throw } CreateLivenessSessionContent deserializedCreateLivenessSessionContent = new CreateLivenessSessionContent(livenessOperationMode); - deserializedCreateLivenessSessionContent.sendResultsToClient = sendResultsToClient; deserializedCreateLivenessSessionContent.deviceCorrelationIdSetInClient = deviceCorrelationIdSetInClient; deserializedCreateLivenessSessionContent.enableSessionImage = enableSessionImage; - deserializedCreateLivenessSessionContent.livenessSingleModalModel = livenessSingleModalModel; + deserializedCreateLivenessSessionContent.livenessModelVersion = livenessModelVersion; deserializedCreateLivenessSessionContent.deviceCorrelationId = deviceCorrelationId; deserializedCreateLivenessSessionContent.authTokenTimeToLiveInSeconds = authTokenTimeToLiveInSeconds; return deserializedCreateLivenessSessionContent; @@ -253,13 +211,6 @@ public static CreateLivenessSessionContent fromJson(JsonReader jsonReader) throw @Generated private Boolean enableSessionImage; - /* - * The model version used for liveness classification. This is an optional parameter, and if this is not specified, - * then the latest supported model version will be chosen - */ - @Generated - private LivenessModel livenessSingleModalModel; - /** * Get the enableSessionImage property: Whether or not store the session image. * @@ -282,27 +233,34 @@ public CreateLivenessSessionContent setEnableSessionImage(Boolean enableSessionI return this; } + /* + * The model version used for liveness classification. This is an optional parameter, and if this is not specified, + * then the latest supported model version will be chosen + */ + @Generated + private LivenessModel livenessModelVersion; + /** - * Get the livenessSingleModalModel property: The model version used for liveness classification. This is an - * optional parameter, and if this is not specified, then the latest supported model version will be chosen. + * Get the livenessModelVersion property: The model version used for liveness classification. This is an optional + * parameter, and if this is not specified, then the latest supported model version will be chosen. * - * @return the livenessSingleModalModel value. + * @return the livenessModelVersion value. */ @Generated - public LivenessModel getLivenessSingleModalModel() { - return this.livenessSingleModalModel; + public LivenessModel getLivenessModelVersion() { + return this.livenessModelVersion; } /** - * Set the livenessSingleModalModel property: The model version used for liveness classification. This is an - * optional parameter, and if this is not specified, then the latest supported model version will be chosen. + * Set the livenessModelVersion property: The model version used for liveness classification. This is an optional + * parameter, and if this is not specified, then the latest supported model version will be chosen. * - * @param livenessSingleModalModel the livenessSingleModalModel value to set. + * @param livenessModelVersion the livenessModelVersion value to set. * @return the CreateLivenessSessionContent object itself. */ @Generated - public CreateLivenessSessionContent setLivenessSingleModalModel(LivenessModel livenessSingleModalModel) { - this.livenessSingleModalModel = livenessSingleModalModel; + public CreateLivenessSessionContent setLivenessModelVersion(LivenessModel livenessModelVersion) { + this.livenessModelVersion = livenessModelVersion; return this; } } diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/CreateLivenessWithVerifySessionContent.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/CreateLivenessWithVerifySessionContent.java index fcd6d226adca..f0f497d4c524 100644 --- a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/CreateLivenessWithVerifySessionContent.java +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/CreateLivenessWithVerifySessionContent.java @@ -5,18 +5,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; /** - * Request for creating liveness with verify session. + * Request of liveness with verify session creation. */ @Fluent -public final class CreateLivenessWithVerifySessionContent - implements JsonSerializable { +public final class CreateLivenessWithVerifySessionContent { /* * Type of liveness mode the client should follow. @@ -24,15 +18,6 @@ public final class CreateLivenessWithVerifySessionContent @Generated private final LivenessOperationMode livenessOperationMode; - /* - * Whether or not to allow a '200 - Success' response body to be sent to the client, which may be undesirable for - * security reasons. Default is false, clients will receive a '204 - NoContent' empty body response. Regardless of - * selection, calling Session GetResult will always contain a response body enabling business logic to be - * implemented. - */ - @Generated - private Boolean sendResultsToClient; - /* * Whether or not to allow client to set their own 'deviceCorrelationId' via the Vision SDK. Default is false, and * 'deviceCorrelationId' must be set in this request body. @@ -46,13 +31,6 @@ public final class CreateLivenessWithVerifySessionContent @Generated private Boolean enableSessionImage; - /* - * The model version used for liveness classification. This is an optional parameter, and if this is not specified, - * then the latest supported model version will be chosen - */ - @Generated - private LivenessModel livenessSingleModalModel; - /* * Unique Guid per each end-user device. This is to provide rate limiting and anti-hammering. If * 'deviceCorrelationIdSetInClient' is true in this request, this 'deviceCorrelationId' must be null. @@ -73,21 +51,13 @@ public final class CreateLivenessWithVerifySessionContent private Boolean returnVerifyImageHash; /* - * Threshold for confidence of the face verification. + * Threshold for confidence of the face verification. Please refer to the documentation for more details. + * https://learn.microsoft.com/legal/cognitive-services/face/characteristics-and-limitations?context=%2Fazure%2Fai- + * services%2Fcomputer-vision%2Fcontext%2Fcontext#recognition-confidence-score */ @Generated private Double verifyConfidenceThreshold; - /** - * Creates an instance of CreateLivenessWithVerifySessionContent class. - * - * @param livenessOperationMode the livenessOperationMode value to set. - */ - @Generated - public CreateLivenessWithVerifySessionContent(LivenessOperationMode livenessOperationMode) { - this.livenessOperationMode = livenessOperationMode; - } - /** * Get the livenessOperationMode property: Type of liveness mode the client should follow. * @@ -98,34 +68,6 @@ public LivenessOperationMode getLivenessOperationMode() { return this.livenessOperationMode; } - /** - * Get the sendResultsToClient property: Whether or not to allow a '200 - Success' response body to be sent to the - * client, which may be undesirable for security reasons. Default is false, clients will receive a '204 - NoContent' - * empty body response. Regardless of selection, calling Session GetResult will always contain a response body - * enabling business logic to be implemented. - * - * @return the sendResultsToClient value. - */ - @Generated - public Boolean isSendResultsToClient() { - return this.sendResultsToClient; - } - - /** - * Set the sendResultsToClient property: Whether or not to allow a '200 - Success' response body to be sent to the - * client, which may be undesirable for security reasons. Default is false, clients will receive a '204 - NoContent' - * empty body response. Regardless of selection, calling Session GetResult will always contain a response body - * enabling business logic to be implemented. - * - * @param sendResultsToClient the sendResultsToClient value to set. - * @return the CreateLivenessWithVerifySessionContent object itself. - */ - @Generated - public CreateLivenessWithVerifySessionContent setSendResultsToClient(Boolean sendResultsToClient) { - this.sendResultsToClient = sendResultsToClient; - return this; - } - /** * Get the deviceCorrelationIdSetInClient property: Whether or not to allow client to set their own * 'deviceCorrelationId' via the Vision SDK. Default is false, and 'deviceCorrelationId' must be set in this request @@ -175,30 +117,6 @@ public CreateLivenessWithVerifySessionContent setEnableSessionImage(Boolean enab return this; } - /** - * Get the livenessSingleModalModel property: The model version used for liveness classification. This is an - * optional parameter, and if this is not specified, then the latest supported model version will be chosen. - * - * @return the livenessSingleModalModel value. - */ - @Generated - public LivenessModel getLivenessSingleModalModel() { - return this.livenessSingleModalModel; - } - - /** - * Set the livenessSingleModalModel property: The model version used for liveness classification. This is an - * optional parameter, and if this is not specified, then the latest supported model version will be chosen. - * - * @param livenessSingleModalModel the livenessSingleModalModel value to set. - * @return the CreateLivenessWithVerifySessionContent object itself. - */ - @Generated - public CreateLivenessWithVerifySessionContent setLivenessSingleModalModel(LivenessModel livenessSingleModalModel) { - this.livenessSingleModalModel = livenessSingleModalModel; - return this; - } - /** * Get the deviceCorrelationId property: Unique Guid per each end-user device. This is to provide rate limiting and * anti-hammering. If 'deviceCorrelationIdSetInClient' is true in this request, this 'deviceCorrelationId' must be @@ -273,7 +191,9 @@ public CreateLivenessWithVerifySessionContent setReturnVerifyImageHash(Boolean r } /** - * Get the verifyConfidenceThreshold property: Threshold for confidence of the face verification. + * Get the verifyConfidenceThreshold property: Threshold for confidence of the face verification. Please refer to + * the documentation for more details. + * https://learn.microsoft.com/legal/cognitive-services/face/characteristics-and-limitations?context=%2Fazure%2Fai-services%2Fcomputer-vision%2Fcontext%2Fcontext#recognition-confidence-score. * * @return the verifyConfidenceThreshold value. */ @@ -283,7 +203,9 @@ public Double getVerifyConfidenceThreshold() { } /** - * Set the verifyConfidenceThreshold property: Threshold for confidence of the face verification. + * Set the verifyConfidenceThreshold property: Threshold for confidence of the face verification. Please refer to + * the documentation for more details. + * https://learn.microsoft.com/legal/cognitive-services/face/characteristics-and-limitations?context=%2Fazure%2Fai-services%2Fcomputer-vision%2Fcontext%2Fcontext#recognition-confidence-score. * * @param verifyConfidenceThreshold the verifyConfidenceThreshold value to set. * @return the CreateLivenessWithVerifySessionContent object itself. @@ -294,86 +216,64 @@ public CreateLivenessWithVerifySessionContent setVerifyConfidenceThreshold(Doubl return this; } + /* + * The model version used for liveness classification. This is an optional parameter, and if this is not specified, + * then the latest supported model version will be chosen + */ + @Generated + private LivenessModel livenessModelVersion; + + /* + * The image stream for verify. Content-Disposition header field for this part must have filename. + */ + @Generated + private final VerifyImageFileDetails verifyImage; + /** - * {@inheritDoc} + * Creates an instance of CreateLivenessWithVerifySessionContent class. + * + * @param livenessOperationMode the livenessOperationMode value to set. + * @param verifyImage the verifyImage value to set. + */ + @Generated + public CreateLivenessWithVerifySessionContent(LivenessOperationMode livenessOperationMode, + VerifyImageFileDetails verifyImage) { + this.livenessOperationMode = livenessOperationMode; + this.verifyImage = verifyImage; + } + + /** + * Get the livenessModelVersion property: The model version used for liveness classification. This is an optional + * parameter, and if this is not specified, then the latest supported model version will be chosen. + * + * @return the livenessModelVersion value. */ @Generated - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("livenessOperationMode", - this.livenessOperationMode == null ? null : this.livenessOperationMode.toString()); - jsonWriter.writeBooleanField("sendResultsToClient", this.sendResultsToClient); - jsonWriter.writeBooleanField("deviceCorrelationIdSetInClient", this.deviceCorrelationIdSetInClient); - jsonWriter.writeBooleanField("enableSessionImage", this.enableSessionImage); - jsonWriter.writeStringField("livenessSingleModalModel", - this.livenessSingleModalModel == null ? null : this.livenessSingleModalModel.toString()); - jsonWriter.writeStringField("deviceCorrelationId", this.deviceCorrelationId); - jsonWriter.writeNumberField("authTokenTimeToLiveInSeconds", this.authTokenTimeToLiveInSeconds); - jsonWriter.writeBooleanField("returnVerifyImageHash", this.returnVerifyImageHash); - jsonWriter.writeNumberField("verifyConfidenceThreshold", this.verifyConfidenceThreshold); - return jsonWriter.writeEndObject(); + public LivenessModel getLivenessModelVersion() { + return this.livenessModelVersion; + } + + /** + * Set the livenessModelVersion property: The model version used for liveness classification. This is an optional + * parameter, and if this is not specified, then the latest supported model version will be chosen. + * + * @param livenessModelVersion the livenessModelVersion value to set. + * @return the CreateLivenessWithVerifySessionContent object itself. + */ + @Generated + public CreateLivenessWithVerifySessionContent setLivenessModelVersion(LivenessModel livenessModelVersion) { + this.livenessModelVersion = livenessModelVersion; + return this; } /** - * Reads an instance of CreateLivenessWithVerifySessionContent from the JsonReader. + * Get the verifyImage property: The image stream for verify. Content-Disposition header field for this part must + * have filename. * - * @param jsonReader The JsonReader being read. - * @return An instance of CreateLivenessWithVerifySessionContent if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the CreateLivenessWithVerifySessionContent. + * @return the verifyImage value. */ @Generated - public static CreateLivenessWithVerifySessionContent fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - LivenessOperationMode livenessOperationMode = null; - Boolean sendResultsToClient = null; - Boolean deviceCorrelationIdSetInClient = null; - Boolean enableSessionImage = null; - LivenessModel livenessSingleModalModel = null; - String deviceCorrelationId = null; - Integer authTokenTimeToLiveInSeconds = null; - Boolean returnVerifyImageHash = null; - Double verifyConfidenceThreshold = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("livenessOperationMode".equals(fieldName)) { - livenessOperationMode = LivenessOperationMode.fromString(reader.getString()); - } else if ("sendResultsToClient".equals(fieldName)) { - sendResultsToClient = reader.getNullable(JsonReader::getBoolean); - } else if ("deviceCorrelationIdSetInClient".equals(fieldName)) { - deviceCorrelationIdSetInClient = reader.getNullable(JsonReader::getBoolean); - } else if ("enableSessionImage".equals(fieldName)) { - enableSessionImage = reader.getNullable(JsonReader::getBoolean); - } else if ("livenessSingleModalModel".equals(fieldName)) { - livenessSingleModalModel = LivenessModel.fromString(reader.getString()); - } else if ("deviceCorrelationId".equals(fieldName)) { - deviceCorrelationId = reader.getString(); - } else if ("authTokenTimeToLiveInSeconds".equals(fieldName)) { - authTokenTimeToLiveInSeconds = reader.getNullable(JsonReader::getInt); - } else if ("returnVerifyImageHash".equals(fieldName)) { - returnVerifyImageHash = reader.getNullable(JsonReader::getBoolean); - } else if ("verifyConfidenceThreshold".equals(fieldName)) { - verifyConfidenceThreshold = reader.getNullable(JsonReader::getDouble); - } else { - reader.skipChildren(); - } - } - CreateLivenessWithVerifySessionContent deserializedCreateLivenessWithVerifySessionContent - = new CreateLivenessWithVerifySessionContent(livenessOperationMode); - deserializedCreateLivenessWithVerifySessionContent.sendResultsToClient = sendResultsToClient; - deserializedCreateLivenessWithVerifySessionContent.deviceCorrelationIdSetInClient - = deviceCorrelationIdSetInClient; - deserializedCreateLivenessWithVerifySessionContent.enableSessionImage = enableSessionImage; - deserializedCreateLivenessWithVerifySessionContent.livenessSingleModalModel = livenessSingleModalModel; - deserializedCreateLivenessWithVerifySessionContent.deviceCorrelationId = deviceCorrelationId; - deserializedCreateLivenessWithVerifySessionContent.authTokenTimeToLiveInSeconds - = authTokenTimeToLiveInSeconds; - deserializedCreateLivenessWithVerifySessionContent.returnVerifyImageHash = returnVerifyImageHash; - deserializedCreateLivenessWithVerifySessionContent.verifyConfidenceThreshold = verifyConfidenceThreshold; - return deserializedCreateLivenessWithVerifySessionContent; - }); + public VerifyImageFileDetails getVerifyImage() { + return this.verifyImage; } } diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/LivenessColorDecisionTarget.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/LivenessColorDecisionTarget.java new file mode 100644 index 000000000000..799489bbe968 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/LivenessColorDecisionTarget.java @@ -0,0 +1,83 @@ +// 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.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The target from color image used for liveness classification. + */ +@Immutable +public final class LivenessColorDecisionTarget implements JsonSerializable { + /* + * The face region where the liveness classification was made on. + */ + @Generated + private final FaceRectangle faceRectangle; + + /** + * Creates an instance of LivenessColorDecisionTarget class. + * + * @param faceRectangle the faceRectangle value to set. + */ + @Generated + private LivenessColorDecisionTarget(FaceRectangle faceRectangle) { + this.faceRectangle = faceRectangle; + } + + /** + * Get the faceRectangle property: The face region where the liveness classification was made on. + * + * @return the faceRectangle value. + */ + @Generated + public FaceRectangle getFaceRectangle() { + return this.faceRectangle; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("faceRectangle", this.faceRectangle); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LivenessColorDecisionTarget from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LivenessColorDecisionTarget if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LivenessColorDecisionTarget. + */ + @Generated + public static LivenessColorDecisionTarget fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FaceRectangle faceRectangle = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("faceRectangle".equals(fieldName)) { + faceRectangle = FaceRectangle.fromJson(reader); + } else { + reader.skipChildren(); + } + } + return new LivenessColorDecisionTarget(faceRectangle); + }); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/LivenessDecisionTargets.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/LivenessDecisionTargets.java new file mode 100644 index 000000000000..3cba2ad11ddb --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/LivenessDecisionTargets.java @@ -0,0 +1,83 @@ +// 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.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The targets used for liveness classification. + */ +@Immutable +public final class LivenessDecisionTargets implements JsonSerializable { + /* + * The target from color image used for liveness classification. + */ + @Generated + private final LivenessColorDecisionTarget color; + + /** + * Creates an instance of LivenessDecisionTargets class. + * + * @param color the color value to set. + */ + @Generated + private LivenessDecisionTargets(LivenessColorDecisionTarget color) { + this.color = color; + } + + /** + * Get the color property: The target from color image used for liveness classification. + * + * @return the color value. + */ + @Generated + public LivenessColorDecisionTarget getColor() { + return this.color; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("color", this.color); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LivenessDecisionTargets from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LivenessDecisionTargets if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LivenessDecisionTargets. + */ + @Generated + public static LivenessDecisionTargets fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LivenessColorDecisionTarget color = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("color".equals(fieldName)) { + color = LivenessColorDecisionTarget.fromJson(reader); + } else { + reader.skipChildren(); + } + } + return new LivenessDecisionTargets(color); + }); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/LivenessError.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/LivenessError.java new file mode 100644 index 000000000000..645d0d25f142 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/LivenessError.java @@ -0,0 +1,127 @@ +// 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.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The error of the liveness classification. + */ +@Immutable +public final class LivenessError implements JsonSerializable { + /* + * The error code. + */ + @Generated + private final String code; + + /* + * The error message. + */ + @Generated + private final String message; + + /* + * Targets used for liveness classification. + */ + @Generated + private final LivenessDecisionTargets targets; + + /** + * Creates an instance of LivenessError class. + * + * @param code the code value to set. + * @param message the message value to set. + * @param targets the targets value to set. + */ + @Generated + private LivenessError(String code, String message, LivenessDecisionTargets targets) { + this.code = code; + this.message = message; + this.targets = targets; + } + + /** + * Get the code property: The error code. + * + * @return the code value. + */ + @Generated + public String getCode() { + return this.code; + } + + /** + * Get the message property: The error message. + * + * @return the message value. + */ + @Generated + public String getMessage() { + return this.message; + } + + /** + * Get the targets property: Targets used for liveness classification. + * + * @return the targets value. + */ + @Generated + public LivenessDecisionTargets getTargets() { + return this.targets; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("code", this.code); + jsonWriter.writeStringField("message", this.message); + jsonWriter.writeJsonField("targets", this.targets); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LivenessError from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LivenessError if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LivenessError. + */ + @Generated + public static LivenessError fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String code = null; + String message = null; + LivenessDecisionTargets targets = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("code".equals(fieldName)) { + code = reader.getString(); + } else if ("message".equals(fieldName)) { + message = reader.getString(); + } else if ("targets".equals(fieldName)) { + targets = LivenessDecisionTargets.fromJson(reader); + } else { + reader.skipChildren(); + } + } + return new LivenessError(code, message, targets); + }); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/LivenessModel.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/LivenessModel.java index 857334e3bc2b..1b005925cbfe 100644 --- a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/LivenessModel.java +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/LivenessModel.java @@ -12,12 +12,6 @@ */ public final class LivenessModel extends ExpandableStringEnum { - /** - * Static value 2022-10-15-preview.04 for LivenessModel. - */ - @Generated - public static final LivenessModel V2022_10_15_PREVIEW_04 = fromString("2022-10-15-preview.04"); - /** * Creates a new instance of LivenessModel value. * @@ -50,8 +44,8 @@ public static Collection values() { } /** - * Static value 2023-12-20-preview.06 for LivenessModel. + * Static value 2024-11-15 for LivenessModel. */ @Generated - public static final LivenessModel V2023_12_20_PREVIEW_06 = fromString("2023-12-20-preview.06"); + public static final LivenessModel V2024_11_15 = fromString("2024-11-15"); } diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/LivenessResult.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/LivenessResult.java new file mode 100644 index 000000000000..9c23f6893205 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/LivenessResult.java @@ -0,0 +1,156 @@ +// 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.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The results of the liveness classification. + */ +@Immutable +public final class LivenessResult implements JsonSerializable { + /* + * The liveness classification for the target face. + */ + @Generated + private FaceLivenessDecision livenessDecision; + + /* + * Targets used for liveness classification. + */ + @Generated + private final LivenessDecisionTargets targets; + + /* + * The server calculated digest for this request. If the client reported digest differs from the server calculated + * digest, then the message integrity between the client and service has been compromised and the result should not + * be trusted. For more information, see how to guides on how to leverage this value to secure your end-to-end + * solution. + */ + @Generated + private final String digest; + + /* + * The image ID of the session request. + */ + @Generated + private String sessionImageId; + + /** + * Creates an instance of LivenessResult class. + * + * @param targets the targets value to set. + * @param digest the digest value to set. + */ + @Generated + private LivenessResult(LivenessDecisionTargets targets, String digest) { + this.targets = targets; + this.digest = digest; + } + + /** + * Get the livenessDecision property: The liveness classification for the target face. + * + * @return the livenessDecision value. + */ + @Generated + public FaceLivenessDecision getLivenessDecision() { + return this.livenessDecision; + } + + /** + * Get the targets property: Targets used for liveness classification. + * + * @return the targets value. + */ + @Generated + public LivenessDecisionTargets getTargets() { + return this.targets; + } + + /** + * Get the digest property: The server calculated digest for this request. If the client reported digest differs + * from the server calculated digest, then the message integrity between the client and service has been compromised + * and the result should not be trusted. For more information, see how to guides on how to leverage this value to + * secure your end-to-end solution. + * + * @return the digest value. + */ + @Generated + public String getDigest() { + return this.digest; + } + + /** + * Get the sessionImageId property: The image ID of the session request. + * + * @return the sessionImageId value. + */ + @Generated + public String getSessionImageId() { + return this.sessionImageId; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("targets", this.targets); + jsonWriter.writeStringField("digest", this.digest); + jsonWriter.writeStringField("livenessDecision", + this.livenessDecision == null ? null : this.livenessDecision.toString()); + jsonWriter.writeStringField("sessionImageId", this.sessionImageId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LivenessResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LivenessResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LivenessResult. + */ + @Generated + public static LivenessResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LivenessDecisionTargets targets = null; + String digest = null; + FaceLivenessDecision livenessDecision = null; + String sessionImageId = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("targets".equals(fieldName)) { + targets = LivenessDecisionTargets.fromJson(reader); + } else if ("digest".equals(fieldName)) { + digest = reader.getString(); + } else if ("livenessDecision".equals(fieldName)) { + livenessDecision = FaceLivenessDecision.fromString(reader.getString()); + } else if ("sessionImageId".equals(fieldName)) { + sessionImageId = reader.getString(); + } else { + reader.skipChildren(); + } + } + LivenessResult deserializedLivenessResult = new LivenessResult(targets, digest); + deserializedLivenessResult.livenessDecision = livenessDecision; + deserializedLivenessResult.sessionImageId = sessionImageId; + + return deserializedLivenessResult; + }); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/LivenessSession.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/LivenessSession.java index 79f5a40e7a43..fbf40fb11639 100644 --- a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/LivenessSession.java +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/LivenessSession.java @@ -5,14 +5,11 @@ import com.azure.core.annotation.Generated; import com.azure.core.annotation.Immutable; -import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; /** * Session result of detect liveness. @@ -21,224 +18,156 @@ public final class LivenessSession implements JsonSerializable { /* - * The unique ID to reference this session. + * The current status of the session. */ @Generated - private String id; + private final OperationState status; - /* - * DateTime when this session was created. + /** + * Get the status property: The current status of the session. + * + * @return the status value. */ @Generated - private final OffsetDateTime createdDateTime; + public OperationState getStatus() { + return this.status; + } - /* - * DateTime when this session was started by the client. + /** + * {@inheritDoc} */ @Generated - private OffsetDateTime sessionStartDateTime; + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("authToken", this.authToken); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); + jsonWriter.writeJsonField("results", this.results); + jsonWriter.writeStringField("modelVersion", this.modelVersion == null ? null : this.modelVersion.toString()); + return jsonWriter.writeEndObject(); + } - /* - * Whether or not the session is expired. + /** + * Reads an instance of LivenessSession from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LivenessSession if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LivenessSession. */ @Generated - private final boolean sessionExpired; + public static LivenessSession fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String sessionId = null; + String authToken = null; + OperationState status = null; + LivenessSessionResults results = null; + LivenessModel modelVersion = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("sessionId".equals(fieldName)) { + sessionId = reader.getString(); + } else if ("authToken".equals(fieldName)) { + authToken = reader.getString(); + } else if ("status".equals(fieldName)) { + status = OperationState.fromString(reader.getString()); + } else if ("results".equals(fieldName)) { + results = LivenessSessionResults.fromJson(reader); + } else if ("modelVersion".equals(fieldName)) { + modelVersion = LivenessModel.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + LivenessSession deserializedLivenessSession = new LivenessSession(authToken, status, results); + deserializedLivenessSession.sessionId = sessionId; + deserializedLivenessSession.modelVersion = modelVersion; + return deserializedLivenessSession; + }); + } /* - * Unique Guid per each end-user device. This is to provide rate limiting and anti-hammering. If - * 'deviceCorrelationIdSetInClient' is true in this request, this 'deviceCorrelationId' must be null. + * The unique ID to reference this session. */ @Generated - private String deviceCorrelationId; + private String sessionId; /* - * Seconds the session should last for. Range is 60 to 86400 seconds. Default value is 600. + * Bearer token to provide authentication for the Vision SDK running on a client application. This Bearer token has + * limited permissions to perform only the required action and expires after the TTL time. It is also auditable. */ @Generated - private Integer authTokenTimeToLiveInSeconds; + private final String authToken; /* - * The current status of the session. + * The model version used for liveness classification. This is an optional parameter, and if this is not specified, + * then the latest supported model version will be chosen */ @Generated - private final FaceSessionStatus status; + private LivenessModel modelVersion; /* - * The latest session audit result only populated if status == 'ResultAvailable'. + * The results of the liveness session. */ @Generated - private LivenessSessionAuditEntry result; + private final LivenessSessionResults results; /** * Creates an instance of LivenessSession class. * - * @param createdDateTime the createdDateTime value to set. - * @param sessionExpired the sessionExpired value to set. + * @param authToken the authToken value to set. * @param status the status value to set. + * @param results the results value to set. */ @Generated - private LivenessSession(OffsetDateTime createdDateTime, boolean sessionExpired, FaceSessionStatus status) { - this.createdDateTime = createdDateTime; - this.sessionExpired = sessionExpired; + private LivenessSession(String authToken, OperationState status, LivenessSessionResults results) { + this.authToken = authToken; this.status = status; + this.results = results; } /** - * Get the id property: The unique ID to reference this session. - * - * @return the id value. - */ - @Generated - public String getId() { - return this.id; - } - - /** - * Get the createdDateTime property: DateTime when this session was created. - * - * @return the createdDateTime value. - */ - @Generated - public OffsetDateTime getCreatedDateTime() { - return this.createdDateTime; - } - - /** - * Get the sessionStartDateTime property: DateTime when this session was started by the client. - * - * @return the sessionStartDateTime value. - */ - @Generated - public OffsetDateTime getSessionStartDateTime() { - return this.sessionStartDateTime; - } - - /** - * Get the sessionExpired property: Whether or not the session is expired. - * - * @return the sessionExpired value. - */ - @Generated - public boolean isSessionExpired() { - return this.sessionExpired; - } - - /** - * Get the deviceCorrelationId property: Unique Guid per each end-user device. This is to provide rate limiting and - * anti-hammering. If 'deviceCorrelationIdSetInClient' is true in this request, this 'deviceCorrelationId' must be - * null. + * Get the sessionId property: The unique ID to reference this session. * - * @return the deviceCorrelationId value. + * @return the sessionId value. */ @Generated - public String getDeviceCorrelationId() { - return this.deviceCorrelationId; + public String getSessionId() { + return this.sessionId; } /** - * Get the authTokenTimeToLiveInSeconds property: Seconds the session should last for. Range is 60 to 86400 seconds. - * Default value is 600. + * Get the authToken property: Bearer token to provide authentication for the Vision SDK running on a client + * application. This Bearer token has limited permissions to perform only the required action and expires after the + * TTL time. It is also auditable. * - * @return the authTokenTimeToLiveInSeconds value. + * @return the authToken value. */ @Generated - public Integer getAuthTokenTimeToLiveInSeconds() { - return this.authTokenTimeToLiveInSeconds; + public String getAuthToken() { + return this.authToken; } /** - * Get the status property: The current status of the session. + * Get the modelVersion property: The model version used for liveness classification. This is an optional parameter, + * and if this is not specified, then the latest supported model version will be chosen. * - * @return the status value. - */ - @Generated - public FaceSessionStatus getStatus() { - return this.status; - } - - /** - * Get the result property: The latest session audit result only populated if status == 'ResultAvailable'. - * - * @return the result value. - */ - @Generated - public LivenessSessionAuditEntry getResult() { - return this.result; - } - - /** - * {@inheritDoc} + * @return the modelVersion value. */ @Generated - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("createdDateTime", - this.createdDateTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.createdDateTime)); - jsonWriter.writeBooleanField("sessionExpired", this.sessionExpired); - jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); - jsonWriter.writeStringField("sessionStartDateTime", - this.sessionStartDateTime == null - ? null - : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.sessionStartDateTime)); - jsonWriter.writeStringField("deviceCorrelationId", this.deviceCorrelationId); - jsonWriter.writeNumberField("authTokenTimeToLiveInSeconds", this.authTokenTimeToLiveInSeconds); - jsonWriter.writeJsonField("result", this.result); - return jsonWriter.writeEndObject(); + public LivenessModel getModelVersion() { + return this.modelVersion; } /** - * Reads an instance of LivenessSession from the JsonReader. + * Get the results property: The results of the liveness session. * - * @param jsonReader The JsonReader being read. - * @return An instance of LivenessSession if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the LivenessSession. + * @return the results value. */ @Generated - public static LivenessSession fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String id = null; - OffsetDateTime createdDateTime = null; - boolean sessionExpired = false; - FaceSessionStatus status = null; - OffsetDateTime sessionStartDateTime = null; - String deviceCorrelationId = null; - Integer authTokenTimeToLiveInSeconds = null; - LivenessSessionAuditEntry result = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("id".equals(fieldName)) { - id = reader.getString(); - } else if ("createdDateTime".equals(fieldName)) { - createdDateTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("sessionExpired".equals(fieldName)) { - sessionExpired = reader.getBoolean(); - } else if ("status".equals(fieldName)) { - status = FaceSessionStatus.fromString(reader.getString()); - } else if ("sessionStartDateTime".equals(fieldName)) { - sessionStartDateTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("deviceCorrelationId".equals(fieldName)) { - deviceCorrelationId = reader.getString(); - } else if ("authTokenTimeToLiveInSeconds".equals(fieldName)) { - authTokenTimeToLiveInSeconds = reader.getNullable(JsonReader::getInt); - } else if ("result".equals(fieldName)) { - result = LivenessSessionAuditEntry.fromJson(reader); - } else { - reader.skipChildren(); - } - } - LivenessSession deserializedLivenessSession = new LivenessSession(createdDateTime, sessionExpired, status); - deserializedLivenessSession.id = id; - deserializedLivenessSession.sessionStartDateTime = sessionStartDateTime; - deserializedLivenessSession.deviceCorrelationId = deviceCorrelationId; - deserializedLivenessSession.authTokenTimeToLiveInSeconds = authTokenTimeToLiveInSeconds; - deserializedLivenessSession.result = result; - return deserializedLivenessSession; - }); + public LivenessSessionResults getResults() { + return this.results; } } diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/LivenessSessionAttempt.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/LivenessSessionAttempt.java new file mode 100644 index 000000000000..6c76c29eb628 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/LivenessSessionAttempt.java @@ -0,0 +1,150 @@ +// 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.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The liveness session attempt. + */ +@Immutable +public final class LivenessSessionAttempt implements JsonSerializable { + /* + * The attempt ID, start from 1. + */ + @Generated + private final int attemptId; + + /* + * The status of the attempt. + */ + @Generated + private final OperationState attemptStatus; + + /* + * The result of the liveness call, will be null if there is error. + */ + @Generated + private LivenessResult result; + + /* + * The error of the liveness call, will be null if there is result. + */ + @Generated + private LivenessError error; + + /** + * Creates an instance of LivenessSessionAttempt class. + * + * @param attemptId the attemptId value to set. + * @param attemptStatus the attemptStatus value to set. + */ + @Generated + private LivenessSessionAttempt(int attemptId, OperationState attemptStatus) { + this.attemptId = attemptId; + this.attemptStatus = attemptStatus; + } + + /** + * Get the attemptId property: The attempt ID, start from 1. + * + * @return the attemptId value. + */ + @Generated + public int getAttemptId() { + return this.attemptId; + } + + /** + * Get the attemptStatus property: The status of the attempt. + * + * @return the attemptStatus value. + */ + @Generated + public OperationState getAttemptStatus() { + return this.attemptStatus; + } + + /** + * Get the result property: The result of the liveness call, will be null if there is error. + * + * @return the result value. + */ + @Generated + public LivenessResult getResult() { + return this.result; + } + + /** + * Get the error property: The error of the liveness call, will be null if there is result. + * + * @return the error value. + */ + @Generated + public LivenessError getError() { + return this.error; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeIntField("attemptId", this.attemptId); + jsonWriter.writeStringField("attemptStatus", this.attemptStatus == null ? null : this.attemptStatus.toString()); + jsonWriter.writeJsonField("result", this.result); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LivenessSessionAttempt from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LivenessSessionAttempt if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LivenessSessionAttempt. + */ + @Generated + public static LivenessSessionAttempt fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + int attemptId = 0; + OperationState attemptStatus = null; + LivenessResult result = null; + LivenessError error = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("attemptId".equals(fieldName)) { + attemptId = reader.getInt(); + } else if ("attemptStatus".equals(fieldName)) { + attemptStatus = OperationState.fromString(reader.getString()); + } else if ("result".equals(fieldName)) { + result = LivenessResult.fromJson(reader); + } else if ("error".equals(fieldName)) { + error = LivenessError.fromJson(reader); + } else { + reader.skipChildren(); + } + } + LivenessSessionAttempt deserializedLivenessSessionAttempt + = new LivenessSessionAttempt(attemptId, attemptStatus); + deserializedLivenessSessionAttempt.result = result; + deserializedLivenessSessionAttempt.error = error; + + return deserializedLivenessSessionAttempt; + }); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/LivenessSessionResults.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/LivenessSessionResults.java new file mode 100644 index 000000000000..cfb22dbe3e6c --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/LivenessSessionResults.java @@ -0,0 +1,84 @@ +// 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.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The results of the liveness session. + */ +@Immutable +public final class LivenessSessionResults implements JsonSerializable { + /* + * The attempts data of underlying liveness call with the session. + */ + @Generated + private final List attempts; + + /** + * Creates an instance of LivenessSessionResults class. + * + * @param attempts the attempts value to set. + */ + @Generated + private LivenessSessionResults(List attempts) { + this.attempts = attempts; + } + + /** + * Get the attempts property: The attempts data of underlying liveness call with the session. + * + * @return the attempts value. + */ + @Generated + public List getAttempts() { + return this.attempts; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("attempts", this.attempts, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LivenessSessionResults from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LivenessSessionResults if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LivenessSessionResults. + */ + @Generated + public static LivenessSessionResults fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + List attempts = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("attempts".equals(fieldName)) { + attempts = reader.readArray(reader1 -> LivenessSessionAttempt.fromJson(reader1)); + } else { + reader.skipChildren(); + } + } + return new LivenessSessionResults(attempts); + }); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/LivenessWithVerifyOutputs.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/LivenessWithVerifyOutputs.java index 155cd96c2565..b4ae3be5e962 100644 --- a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/LivenessWithVerifyOutputs.java +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/LivenessWithVerifyOutputs.java @@ -17,12 +17,6 @@ @Immutable public final class LivenessWithVerifyOutputs implements JsonSerializable { - /* - * The detail of face for verification. - */ - @Generated - private final LivenessWithVerifyImage verifyImage; - /* * The target face liveness face and comparison image face verification confidence. */ @@ -35,31 +29,6 @@ public final class LivenessWithVerifyOutputs implements JsonSerializable { - LivenessWithVerifyImage verifyImage = null; double matchConfidence = 0.0; boolean isIdentical = false; while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("verifyImage".equals(fieldName)) { - verifyImage = LivenessWithVerifyImage.fromJson(reader); - } else if ("matchConfidence".equals(fieldName)) { + if ("matchConfidence".equals(fieldName)) { matchConfidence = reader.getDouble(); } else if ("isIdentical".equals(fieldName)) { isIdentical = reader.getBoolean(); @@ -122,7 +87,19 @@ public static LivenessWithVerifyOutputs fromJson(JsonReader jsonReader) throws I reader.skipChildren(); } } - return new LivenessWithVerifyOutputs(verifyImage, matchConfidence, isIdentical); + return new LivenessWithVerifyOutputs(matchConfidence, isIdentical); }); } + + /** + * Creates an instance of LivenessWithVerifyOutputs class. + * + * @param matchConfidence the matchConfidence value to set. + * @param isIdentical the isIdentical value to set. + */ + @Generated + private LivenessWithVerifyOutputs(double matchConfidence, boolean isIdentical) { + this.matchConfidence = matchConfidence; + this.isIdentical = isIdentical; + } } diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/LivenessWithVerifyReference.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/LivenessWithVerifyReference.java new file mode 100644 index 000000000000..b7050ac90476 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/LivenessWithVerifyReference.java @@ -0,0 +1,130 @@ +// 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.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The detail of face for verification. + */ +@Immutable +public final class LivenessWithVerifyReference implements JsonSerializable { + /* + * The image type which contains the face rectangle where the liveness classification was made on. + */ + @Generated + private final FaceImageType referenceType; + + /* + * The face region where the comparison image's classification was made. + */ + @Generated + private final FaceRectangle faceRectangle; + + /* + * Quality of face image for recognition. + */ + @Generated + private final QualityForRecognition qualityForRecognition; + + /** + * Creates an instance of LivenessWithVerifyReference class. + * + * @param referenceType the referenceType value to set. + * @param faceRectangle the faceRectangle value to set. + * @param qualityForRecognition the qualityForRecognition value to set. + */ + @Generated + private LivenessWithVerifyReference(FaceImageType referenceType, FaceRectangle faceRectangle, + QualityForRecognition qualityForRecognition) { + this.referenceType = referenceType; + this.faceRectangle = faceRectangle; + this.qualityForRecognition = qualityForRecognition; + } + + /** + * Get the referenceType property: The image type which contains the face rectangle where the liveness + * classification was made on. + * + * @return the referenceType value. + */ + @Generated + public FaceImageType getReferenceType() { + return this.referenceType; + } + + /** + * Get the faceRectangle property: The face region where the comparison image's classification was made. + * + * @return the faceRectangle value. + */ + @Generated + public FaceRectangle getFaceRectangle() { + return this.faceRectangle; + } + + /** + * Get the qualityForRecognition property: Quality of face image for recognition. + * + * @return the qualityForRecognition value. + */ + @Generated + public QualityForRecognition getQualityForRecognition() { + return this.qualityForRecognition; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("referenceType", this.referenceType == null ? null : this.referenceType.toString()); + jsonWriter.writeJsonField("faceRectangle", this.faceRectangle); + jsonWriter.writeStringField("qualityForRecognition", + this.qualityForRecognition == null ? null : this.qualityForRecognition.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LivenessWithVerifyReference from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LivenessWithVerifyReference if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LivenessWithVerifyReference. + */ + @Generated + public static LivenessWithVerifyReference fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FaceImageType referenceType = null; + FaceRectangle faceRectangle = null; + QualityForRecognition qualityForRecognition = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("referenceType".equals(fieldName)) { + referenceType = FaceImageType.fromString(reader.getString()); + } else if ("faceRectangle".equals(fieldName)) { + faceRectangle = FaceRectangle.fromJson(reader); + } else if ("qualityForRecognition".equals(fieldName)) { + qualityForRecognition = QualityForRecognition.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + return new LivenessWithVerifyReference(referenceType, faceRectangle, qualityForRecognition); + }); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/LivenessWithVerifyResult.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/LivenessWithVerifyResult.java new file mode 100644 index 000000000000..dd41c35066fa --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/LivenessWithVerifyResult.java @@ -0,0 +1,200 @@ +// 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.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The results of the liveness with verify call. + */ +@Immutable +public final class LivenessWithVerifyResult implements JsonSerializable { + /* + * The liveness classification for the target face. + */ + @Generated + private FaceLivenessDecision livenessDecision; + + /* + * Targets used for liveness classification. + */ + @Generated + private final LivenessDecisionTargets targets; + + /* + * The server calculated digest for this request. If the client reported digest differs from the server calculated + * digest, then the message integrity between the client and service has been compromised and the result should not + * be trusted. For more information, see how to guides on how to leverage this value to secure your end-to-end + * solution. + */ + @Generated + private final String digest; + + /* + * The image ID of the session request. + */ + @Generated + private String sessionImageId; + + /* + * The face verification output. Only available when the request is liveness with verify. + */ + @Generated + private LivenessWithVerifyOutputs verifyResult; + + /* + * The sha256 hash of the verify-image in the request. + */ + @Generated + private String verifyImageHash; + + /** + * Creates an instance of LivenessWithVerifyResult class. + * + * @param targets the targets value to set. + * @param digest the digest value to set. + */ + @Generated + private LivenessWithVerifyResult(LivenessDecisionTargets targets, String digest) { + this.targets = targets; + this.digest = digest; + } + + /** + * Get the livenessDecision property: The liveness classification for the target face. + * + * @return the livenessDecision value. + */ + @Generated + public FaceLivenessDecision getLivenessDecision() { + return this.livenessDecision; + } + + /** + * Get the targets property: Targets used for liveness classification. + * + * @return the targets value. + */ + @Generated + public LivenessDecisionTargets getTargets() { + return this.targets; + } + + /** + * Get the digest property: The server calculated digest for this request. If the client reported digest differs + * from the server calculated digest, then the message integrity between the client and service has been compromised + * and the result should not be trusted. For more information, see how to guides on how to leverage this value to + * secure your end-to-end solution. + * + * @return the digest value. + */ + @Generated + public String getDigest() { + return this.digest; + } + + /** + * Get the sessionImageId property: The image ID of the session request. + * + * @return the sessionImageId value. + */ + @Generated + public String getSessionImageId() { + return this.sessionImageId; + } + + /** + * Get the verifyResult property: The face verification output. Only available when the request is liveness with + * verify. + * + * @return the verifyResult value. + */ + @Generated + public LivenessWithVerifyOutputs getVerifyResult() { + return this.verifyResult; + } + + /** + * Get the verifyImageHash property: The sha256 hash of the verify-image in the request. + * + * @return the verifyImageHash value. + */ + @Generated + public String getVerifyImageHash() { + return this.verifyImageHash; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("targets", this.targets); + jsonWriter.writeStringField("digest", this.digest); + jsonWriter.writeStringField("livenessDecision", + this.livenessDecision == null ? null : this.livenessDecision.toString()); + jsonWriter.writeStringField("sessionImageId", this.sessionImageId); + jsonWriter.writeJsonField("verifyResult", this.verifyResult); + jsonWriter.writeStringField("verifyImageHash", this.verifyImageHash); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LivenessWithVerifyResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LivenessWithVerifyResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LivenessWithVerifyResult. + */ + @Generated + public static LivenessWithVerifyResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LivenessDecisionTargets targets = null; + String digest = null; + FaceLivenessDecision livenessDecision = null; + String sessionImageId = null; + LivenessWithVerifyOutputs verifyResult = null; + String verifyImageHash = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("targets".equals(fieldName)) { + targets = LivenessDecisionTargets.fromJson(reader); + } else if ("digest".equals(fieldName)) { + digest = reader.getString(); + } else if ("livenessDecision".equals(fieldName)) { + livenessDecision = FaceLivenessDecision.fromString(reader.getString()); + } else if ("sessionImageId".equals(fieldName)) { + sessionImageId = reader.getString(); + } else if ("verifyResult".equals(fieldName)) { + verifyResult = LivenessWithVerifyOutputs.fromJson(reader); + } else if ("verifyImageHash".equals(fieldName)) { + verifyImageHash = reader.getString(); + } else { + reader.skipChildren(); + } + } + LivenessWithVerifyResult deserializedLivenessWithVerifyResult + = new LivenessWithVerifyResult(targets, digest); + deserializedLivenessWithVerifyResult.livenessDecision = livenessDecision; + deserializedLivenessWithVerifyResult.sessionImageId = sessionImageId; + deserializedLivenessWithVerifyResult.verifyResult = verifyResult; + deserializedLivenessWithVerifyResult.verifyImageHash = verifyImageHash; + + return deserializedLivenessWithVerifyResult; + }); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/LivenessWithVerifySession.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/LivenessWithVerifySession.java index e4f177a95cf8..204ef024b526 100644 --- a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/LivenessWithVerifySession.java +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/LivenessWithVerifySession.java @@ -5,14 +5,11 @@ import com.azure.core.annotation.Generated; import com.azure.core.annotation.Immutable; -import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; /** * Session result of detect liveness with verify. @@ -21,226 +18,158 @@ public final class LivenessWithVerifySession implements JsonSerializable { /* - * The unique ID to reference this session. + * The current status of the session. */ @Generated - private String id; + private final OperationState status; - /* - * DateTime when this session was created. + /** + * Get the status property: The current status of the session. + * + * @return the status value. */ @Generated - private final OffsetDateTime createdDateTime; + public OperationState getStatus() { + return this.status; + } - /* - * DateTime when this session was started by the client. + /** + * {@inheritDoc} */ @Generated - private OffsetDateTime sessionStartDateTime; + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("authToken", this.authToken); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); + jsonWriter.writeJsonField("results", this.results); + jsonWriter.writeStringField("modelVersion", this.modelVersion == null ? null : this.modelVersion.toString()); + return jsonWriter.writeEndObject(); + } - /* - * Whether or not the session is expired. + /** + * Reads an instance of LivenessWithVerifySession from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LivenessWithVerifySession if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LivenessWithVerifySession. */ @Generated - private final boolean sessionExpired; + public static LivenessWithVerifySession fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String sessionId = null; + String authToken = null; + OperationState status = null; + LivenessWithVerifySessionResults results = null; + LivenessModel modelVersion = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("sessionId".equals(fieldName)) { + sessionId = reader.getString(); + } else if ("authToken".equals(fieldName)) { + authToken = reader.getString(); + } else if ("status".equals(fieldName)) { + status = OperationState.fromString(reader.getString()); + } else if ("results".equals(fieldName)) { + results = LivenessWithVerifySessionResults.fromJson(reader); + } else if ("modelVersion".equals(fieldName)) { + modelVersion = LivenessModel.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + LivenessWithVerifySession deserializedLivenessWithVerifySession + = new LivenessWithVerifySession(authToken, status, results); + deserializedLivenessWithVerifySession.sessionId = sessionId; + deserializedLivenessWithVerifySession.modelVersion = modelVersion; + return deserializedLivenessWithVerifySession; + }); + } /* - * Unique Guid per each end-user device. This is to provide rate limiting and anti-hammering. If - * 'deviceCorrelationIdSetInClient' is true in this request, this 'deviceCorrelationId' must be null. + * The unique ID to reference this session. */ @Generated - private String deviceCorrelationId; + private String sessionId; /* - * Seconds the session should last for. Range is 60 to 86400 seconds. Default value is 600. + * Bearer token to provide authentication for the Vision SDK running on a client application. This Bearer token has + * limited permissions to perform only the required action and expires after the TTL time. It is also auditable. */ @Generated - private Integer authTokenTimeToLiveInSeconds; + private final String authToken; /* - * The current status of the session. + * The model version used for liveness classification. This is an optional parameter, and if this is not specified, + * then the latest supported model version will be chosen */ @Generated - private final FaceSessionStatus status; + private LivenessModel modelVersion; /* - * The latest session audit result only populated if status == 'ResultAvailable'. + * The results of the liveness with verify session. */ @Generated - private LivenessSessionAuditEntry result; + private final LivenessWithVerifySessionResults results; /** * Creates an instance of LivenessWithVerifySession class. * - * @param createdDateTime the createdDateTime value to set. - * @param sessionExpired the sessionExpired value to set. + * @param authToken the authToken value to set. * @param status the status value to set. + * @param results the results value to set. */ @Generated - private LivenessWithVerifySession(OffsetDateTime createdDateTime, boolean sessionExpired, - FaceSessionStatus status) { - this.createdDateTime = createdDateTime; - this.sessionExpired = sessionExpired; + private LivenessWithVerifySession(String authToken, OperationState status, + LivenessWithVerifySessionResults results) { + this.authToken = authToken; this.status = status; + this.results = results; } /** - * Get the id property: The unique ID to reference this session. - * - * @return the id value. - */ - @Generated - public String getId() { - return this.id; - } - - /** - * Get the createdDateTime property: DateTime when this session was created. - * - * @return the createdDateTime value. - */ - @Generated - public OffsetDateTime getCreatedDateTime() { - return this.createdDateTime; - } - - /** - * Get the sessionStartDateTime property: DateTime when this session was started by the client. - * - * @return the sessionStartDateTime value. - */ - @Generated - public OffsetDateTime getSessionStartDateTime() { - return this.sessionStartDateTime; - } - - /** - * Get the sessionExpired property: Whether or not the session is expired. + * Get the sessionId property: The unique ID to reference this session. * - * @return the sessionExpired value. + * @return the sessionId value. */ @Generated - public boolean isSessionExpired() { - return this.sessionExpired; + public String getSessionId() { + return this.sessionId; } /** - * Get the deviceCorrelationId property: Unique Guid per each end-user device. This is to provide rate limiting and - * anti-hammering. If 'deviceCorrelationIdSetInClient' is true in this request, this 'deviceCorrelationId' must be - * null. + * Get the authToken property: Bearer token to provide authentication for the Vision SDK running on a client + * application. This Bearer token has limited permissions to perform only the required action and expires after the + * TTL time. It is also auditable. * - * @return the deviceCorrelationId value. + * @return the authToken value. */ @Generated - public String getDeviceCorrelationId() { - return this.deviceCorrelationId; + public String getAuthToken() { + return this.authToken; } /** - * Get the authTokenTimeToLiveInSeconds property: Seconds the session should last for. Range is 60 to 86400 seconds. - * Default value is 600. + * Get the modelVersion property: The model version used for liveness classification. This is an optional parameter, + * and if this is not specified, then the latest supported model version will be chosen. * - * @return the authTokenTimeToLiveInSeconds value. + * @return the modelVersion value. */ @Generated - public Integer getAuthTokenTimeToLiveInSeconds() { - return this.authTokenTimeToLiveInSeconds; + public LivenessModel getModelVersion() { + return this.modelVersion; } /** - * Get the status property: The current status of the session. + * Get the results property: The results of the liveness with verify session. * - * @return the status value. + * @return the results value. */ @Generated - public FaceSessionStatus getStatus() { - return this.status; - } - - /** - * Get the result property: The latest session audit result only populated if status == 'ResultAvailable'. - * - * @return the result value. - */ - @Generated - public LivenessSessionAuditEntry getResult() { - return this.result; - } - - /** - * {@inheritDoc} - */ - @Generated - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("createdDateTime", - this.createdDateTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.createdDateTime)); - jsonWriter.writeBooleanField("sessionExpired", this.sessionExpired); - jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); - jsonWriter.writeStringField("sessionStartDateTime", - this.sessionStartDateTime == null - ? null - : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.sessionStartDateTime)); - jsonWriter.writeStringField("deviceCorrelationId", this.deviceCorrelationId); - jsonWriter.writeNumberField("authTokenTimeToLiveInSeconds", this.authTokenTimeToLiveInSeconds); - jsonWriter.writeJsonField("result", this.result); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LivenessWithVerifySession from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LivenessWithVerifySession if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the LivenessWithVerifySession. - */ - @Generated - public static LivenessWithVerifySession fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String id = null; - OffsetDateTime createdDateTime = null; - boolean sessionExpired = false; - FaceSessionStatus status = null; - OffsetDateTime sessionStartDateTime = null; - String deviceCorrelationId = null; - Integer authTokenTimeToLiveInSeconds = null; - LivenessSessionAuditEntry result = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("id".equals(fieldName)) { - id = reader.getString(); - } else if ("createdDateTime".equals(fieldName)) { - createdDateTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("sessionExpired".equals(fieldName)) { - sessionExpired = reader.getBoolean(); - } else if ("status".equals(fieldName)) { - status = FaceSessionStatus.fromString(reader.getString()); - } else if ("sessionStartDateTime".equals(fieldName)) { - sessionStartDateTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("deviceCorrelationId".equals(fieldName)) { - deviceCorrelationId = reader.getString(); - } else if ("authTokenTimeToLiveInSeconds".equals(fieldName)) { - authTokenTimeToLiveInSeconds = reader.getNullable(JsonReader::getInt); - } else if ("result".equals(fieldName)) { - result = LivenessSessionAuditEntry.fromJson(reader); - } else { - reader.skipChildren(); - } - } - LivenessWithVerifySession deserializedLivenessWithVerifySession - = new LivenessWithVerifySession(createdDateTime, sessionExpired, status); - deserializedLivenessWithVerifySession.id = id; - deserializedLivenessWithVerifySession.sessionStartDateTime = sessionStartDateTime; - deserializedLivenessWithVerifySession.deviceCorrelationId = deviceCorrelationId; - deserializedLivenessWithVerifySession.authTokenTimeToLiveInSeconds = authTokenTimeToLiveInSeconds; - deserializedLivenessWithVerifySession.result = result; - return deserializedLivenessWithVerifySession; - }); + public LivenessWithVerifySessionResults getResults() { + return this.results; } } diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/LivenessWithVerifySessionAttempt.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/LivenessWithVerifySessionAttempt.java new file mode 100644 index 000000000000..f6aef1813a59 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/LivenessWithVerifySessionAttempt.java @@ -0,0 +1,150 @@ +// 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.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The liveness with verify session attempt. + */ +@Immutable +public final class LivenessWithVerifySessionAttempt implements JsonSerializable { + /* + * The attempt ID, start from 1. + */ + @Generated + private final int attemptId; + + /* + * The status of the attempt. + */ + @Generated + private final OperationState attemptStatus; + + /* + * The result of the liveness with verify call, will be null if there is error. + */ + @Generated + private LivenessWithVerifyResult result; + + /* + * The error of the liveness with verify call, will be null if there is result. + */ + @Generated + private LivenessError error; + + /** + * Creates an instance of LivenessWithVerifySessionAttempt class. + * + * @param attemptId the attemptId value to set. + * @param attemptStatus the attemptStatus value to set. + */ + @Generated + private LivenessWithVerifySessionAttempt(int attemptId, OperationState attemptStatus) { + this.attemptId = attemptId; + this.attemptStatus = attemptStatus; + } + + /** + * Get the attemptId property: The attempt ID, start from 1. + * + * @return the attemptId value. + */ + @Generated + public int getAttemptId() { + return this.attemptId; + } + + /** + * Get the attemptStatus property: The status of the attempt. + * + * @return the attemptStatus value. + */ + @Generated + public OperationState getAttemptStatus() { + return this.attemptStatus; + } + + /** + * Get the result property: The result of the liveness with verify call, will be null if there is error. + * + * @return the result value. + */ + @Generated + public LivenessWithVerifyResult getResult() { + return this.result; + } + + /** + * Get the error property: The error of the liveness with verify call, will be null if there is result. + * + * @return the error value. + */ + @Generated + public LivenessError getError() { + return this.error; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeIntField("attemptId", this.attemptId); + jsonWriter.writeStringField("attemptStatus", this.attemptStatus == null ? null : this.attemptStatus.toString()); + jsonWriter.writeJsonField("result", this.result); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LivenessWithVerifySessionAttempt from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LivenessWithVerifySessionAttempt if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LivenessWithVerifySessionAttempt. + */ + @Generated + public static LivenessWithVerifySessionAttempt fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + int attemptId = 0; + OperationState attemptStatus = null; + LivenessWithVerifyResult result = null; + LivenessError error = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("attemptId".equals(fieldName)) { + attemptId = reader.getInt(); + } else if ("attemptStatus".equals(fieldName)) { + attemptStatus = OperationState.fromString(reader.getString()); + } else if ("result".equals(fieldName)) { + result = LivenessWithVerifyResult.fromJson(reader); + } else if ("error".equals(fieldName)) { + error = LivenessError.fromJson(reader); + } else { + reader.skipChildren(); + } + } + LivenessWithVerifySessionAttempt deserializedLivenessWithVerifySessionAttempt + = new LivenessWithVerifySessionAttempt(attemptId, attemptStatus); + deserializedLivenessWithVerifySessionAttempt.result = result; + deserializedLivenessWithVerifySessionAttempt.error = error; + + return deserializedLivenessWithVerifySessionAttempt; + }); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/LivenessWithVerifySessionResults.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/LivenessWithVerifySessionResults.java new file mode 100644 index 000000000000..e02a27869903 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/LivenessWithVerifySessionResults.java @@ -0,0 +1,108 @@ +// 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.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The results of the liveness with verify session. + */ +@Immutable +public final class LivenessWithVerifySessionResults implements JsonSerializable { + /* + * The references used for face verification. + */ + @Generated + private final List verifyReferences; + + /* + * The attempts data of underlying liveness with verify call with the session. + */ + @Generated + private final List attempts; + + /** + * Creates an instance of LivenessWithVerifySessionResults class. + * + * @param verifyReferences the verifyReferences value to set. + * @param attempts the attempts value to set. + */ + @Generated + private LivenessWithVerifySessionResults(List verifyReferences, + List attempts) { + this.verifyReferences = verifyReferences; + this.attempts = attempts; + } + + /** + * Get the verifyReferences property: The references used for face verification. + * + * @return the verifyReferences value. + */ + @Generated + public List getVerifyReferences() { + return this.verifyReferences; + } + + /** + * Get the attempts property: The attempts data of underlying liveness with verify call with the session. + * + * @return the attempts value. + */ + @Generated + public List getAttempts() { + return this.attempts; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("verifyReferences", this.verifyReferences, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("attempts", this.attempts, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LivenessWithVerifySessionResults from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LivenessWithVerifySessionResults if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LivenessWithVerifySessionResults. + */ + @Generated + public static LivenessWithVerifySessionResults fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + List verifyReferences = null; + List attempts = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("verifyReferences".equals(fieldName)) { + verifyReferences = reader.readArray(reader1 -> LivenessWithVerifyReference.fromJson(reader1)); + } else if ("attempts".equals(fieldName)) { + attempts = reader.readArray(reader1 -> LivenessWithVerifySessionAttempt.fromJson(reader1)); + } else { + reader.skipChildren(); + } + } + return new LivenessWithVerifySessionResults(verifyReferences, attempts); + }); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/OperationState.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/OperationState.java new file mode 100644 index 000000000000..5c76bfdd9759 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/OperationState.java @@ -0,0 +1,75 @@ +// 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.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Enum describing allowed operation states. + */ +public final class OperationState extends ExpandableStringEnum { + /** + * The operation has not started. + */ + @Generated + public static final OperationState NOT_STARTED = fromString("NotStarted"); + + /** + * The operation is in progress. + */ + @Generated + public static final OperationState RUNNING = fromString("Running"); + + /** + * The operation has completed successfully. + */ + @Generated + public static final OperationState SUCCEEDED = fromString("Succeeded"); + + /** + * The operation has failed. + */ + @Generated + public static final OperationState FAILED = fromString("Failed"); + + /** + * The operation has been canceled by the user. + */ + @Generated + public static final OperationState CANCELED = fromString("Canceled"); + + /** + * Creates a new instance of OperationState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public OperationState() { + } + + /** + * Creates or finds a OperationState from its string representation. + * + * @param name a name to look for. + * @return the corresponding OperationState. + */ + @Generated + public static OperationState fromString(String name) { + return fromString(name, OperationState.class); + } + + /** + * Gets known OperationState values. + * + * @return known OperationState values. + */ + @Generated + public static Collection values() { + return values(OperationState.class); + } +} diff --git a/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/VerifyImageFileDetails.java b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/VerifyImageFileDetails.java new file mode 100644 index 000000000000..c91ad18d2db2 --- /dev/null +++ b/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/models/VerifyImageFileDetails.java @@ -0,0 +1,97 @@ +// 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.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.core.util.BinaryData; + +/** + * The file details for the "verifyImage" field. + */ +@Fluent +public final class VerifyImageFileDetails { + /* + * The content of the file. + */ + @Generated + private final BinaryData content; + + /* + * The filename of the file. + */ + @Generated + private String filename; + + /* + * The content-type of the file. + */ + @Generated + private String contentType = "application/octet-stream"; + + /** + * Creates an instance of VerifyImageFileDetails class. + * + * @param content the content value to set. + */ + @Generated + public VerifyImageFileDetails(BinaryData content) { + this.content = content; + } + + /** + * Get the content property: The content of the file. + * + * @return the content value. + */ + @Generated + public BinaryData getContent() { + return this.content; + } + + /** + * Get the filename property: The filename of the file. + * + * @return the filename value. + */ + @Generated + public String getFilename() { + return this.filename; + } + + /** + * Set the filename property: The filename of the file. + * + * @param filename the filename value to set. + * @return the VerifyImageFileDetails object itself. + */ + @Generated + public VerifyImageFileDetails setFilename(String filename) { + this.filename = filename; + return this; + } + + /** + * Get the contentType property: The content-type of the file. + * + * @return the contentType value. + */ + @Generated + public String getContentType() { + return this.contentType; + } + + /** + * Set the contentType property: The content-type of the file. + * + * @param contentType the contentType value to set. + * @return the VerifyImageFileDetails object itself. + */ + @Generated + public VerifyImageFileDetails setContentType(String contentType) { + this.contentType = contentType; + return this; + } +} 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 533f46100fcc..7bf9bb1cd209 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 @@ -41,26 +41,16 @@ "com.azure.ai.vision.face.FaceSessionAsyncClient.createLivenessSessionWithResponse": "ClientCustomizations.FaceSessionClient.createLivenessSession", "com.azure.ai.vision.face.FaceSessionAsyncClient.createLivenessWithVerifySession": "ClientCustomizations.FaceSessionClient.createLivenessWithVerifySession", "com.azure.ai.vision.face.FaceSessionAsyncClient.createLivenessWithVerifySessionWithResponse": "ClientCustomizations.FaceSessionClient.createLivenessWithVerifySession", - "com.azure.ai.vision.face.FaceSessionAsyncClient.createLivenessWithVerifySessionWithVerifyImage": "ClientCustomizations.FaceSessionClient.createLivenessWithVerifySessionWithVerifyImage", - "com.azure.ai.vision.face.FaceSessionAsyncClient.createLivenessWithVerifySessionWithVerifyImageWithResponse": "ClientCustomizations.FaceSessionClient.createLivenessWithVerifySessionWithVerifyImage", "com.azure.ai.vision.face.FaceSessionAsyncClient.deleteLivenessSession": "ClientCustomizations.FaceSessionClient.deleteLivenessSession", "com.azure.ai.vision.face.FaceSessionAsyncClient.deleteLivenessSessionWithResponse": "ClientCustomizations.FaceSessionClient.deleteLivenessSession", "com.azure.ai.vision.face.FaceSessionAsyncClient.deleteLivenessWithVerifySession": "ClientCustomizations.FaceSessionClient.deleteLivenessWithVerifySession", "com.azure.ai.vision.face.FaceSessionAsyncClient.deleteLivenessWithVerifySessionWithResponse": "ClientCustomizations.FaceSessionClient.deleteLivenessWithVerifySession", "com.azure.ai.vision.face.FaceSessionAsyncClient.detectFromSessionImage": "ClientCustomizations.FaceSessionClient.detectFromSessionImage", "com.azure.ai.vision.face.FaceSessionAsyncClient.detectFromSessionImageWithResponse": "ClientCustomizations.FaceSessionClient.detectFromSessionImage", - "com.azure.ai.vision.face.FaceSessionAsyncClient.getLivenessSessionAuditEntries": "ClientCustomizations.FaceSessionClient.getLivenessSessionAuditEntries", - "com.azure.ai.vision.face.FaceSessionAsyncClient.getLivenessSessionAuditEntriesWithResponse": "ClientCustomizations.FaceSessionClient.getLivenessSessionAuditEntries", "com.azure.ai.vision.face.FaceSessionAsyncClient.getLivenessSessionResult": "ClientCustomizations.FaceSessionClient.getLivenessSessionResult", "com.azure.ai.vision.face.FaceSessionAsyncClient.getLivenessSessionResultWithResponse": "ClientCustomizations.FaceSessionClient.getLivenessSessionResult", - "com.azure.ai.vision.face.FaceSessionAsyncClient.getLivenessSessions": "ClientCustomizations.FaceSessionClient.getLivenessSessions", - "com.azure.ai.vision.face.FaceSessionAsyncClient.getLivenessSessionsWithResponse": "ClientCustomizations.FaceSessionClient.getLivenessSessions", - "com.azure.ai.vision.face.FaceSessionAsyncClient.getLivenessWithVerifySessionAuditEntries": "ClientCustomizations.FaceSessionClient.getLivenessWithVerifySessionAuditEntries", - "com.azure.ai.vision.face.FaceSessionAsyncClient.getLivenessWithVerifySessionAuditEntriesWithResponse": "ClientCustomizations.FaceSessionClient.getLivenessWithVerifySessionAuditEntries", "com.azure.ai.vision.face.FaceSessionAsyncClient.getLivenessWithVerifySessionResult": "ClientCustomizations.FaceSessionClient.getLivenessWithVerifySessionResult", "com.azure.ai.vision.face.FaceSessionAsyncClient.getLivenessWithVerifySessionResultWithResponse": "ClientCustomizations.FaceSessionClient.getLivenessWithVerifySessionResult", - "com.azure.ai.vision.face.FaceSessionAsyncClient.getLivenessWithVerifySessions": "ClientCustomizations.FaceSessionClient.getLivenessWithVerifySessions", - "com.azure.ai.vision.face.FaceSessionAsyncClient.getLivenessWithVerifySessionsWithResponse": "ClientCustomizations.FaceSessionClient.getLivenessWithVerifySessions", "com.azure.ai.vision.face.FaceSessionAsyncClient.getSessionImage": "ClientCustomizations.FaceSessionClient.getSessionImage", "com.azure.ai.vision.face.FaceSessionAsyncClient.getSessionImageWithResponse": "ClientCustomizations.FaceSessionClient.getSessionImage", "com.azure.ai.vision.face.FaceSessionClient": "ClientCustomizations.FaceSessionClient", @@ -68,26 +58,16 @@ "com.azure.ai.vision.face.FaceSessionClient.createLivenessSessionWithResponse": "ClientCustomizations.FaceSessionClient.createLivenessSession", "com.azure.ai.vision.face.FaceSessionClient.createLivenessWithVerifySession": "ClientCustomizations.FaceSessionClient.createLivenessWithVerifySession", "com.azure.ai.vision.face.FaceSessionClient.createLivenessWithVerifySessionWithResponse": "ClientCustomizations.FaceSessionClient.createLivenessWithVerifySession", - "com.azure.ai.vision.face.FaceSessionClient.createLivenessWithVerifySessionWithVerifyImage": "ClientCustomizations.FaceSessionClient.createLivenessWithVerifySessionWithVerifyImage", - "com.azure.ai.vision.face.FaceSessionClient.createLivenessWithVerifySessionWithVerifyImageWithResponse": "ClientCustomizations.FaceSessionClient.createLivenessWithVerifySessionWithVerifyImage", "com.azure.ai.vision.face.FaceSessionClient.deleteLivenessSession": "ClientCustomizations.FaceSessionClient.deleteLivenessSession", "com.azure.ai.vision.face.FaceSessionClient.deleteLivenessSessionWithResponse": "ClientCustomizations.FaceSessionClient.deleteLivenessSession", "com.azure.ai.vision.face.FaceSessionClient.deleteLivenessWithVerifySession": "ClientCustomizations.FaceSessionClient.deleteLivenessWithVerifySession", "com.azure.ai.vision.face.FaceSessionClient.deleteLivenessWithVerifySessionWithResponse": "ClientCustomizations.FaceSessionClient.deleteLivenessWithVerifySession", "com.azure.ai.vision.face.FaceSessionClient.detectFromSessionImage": "ClientCustomizations.FaceSessionClient.detectFromSessionImage", "com.azure.ai.vision.face.FaceSessionClient.detectFromSessionImageWithResponse": "ClientCustomizations.FaceSessionClient.detectFromSessionImage", - "com.azure.ai.vision.face.FaceSessionClient.getLivenessSessionAuditEntries": "ClientCustomizations.FaceSessionClient.getLivenessSessionAuditEntries", - "com.azure.ai.vision.face.FaceSessionClient.getLivenessSessionAuditEntriesWithResponse": "ClientCustomizations.FaceSessionClient.getLivenessSessionAuditEntries", "com.azure.ai.vision.face.FaceSessionClient.getLivenessSessionResult": "ClientCustomizations.FaceSessionClient.getLivenessSessionResult", "com.azure.ai.vision.face.FaceSessionClient.getLivenessSessionResultWithResponse": "ClientCustomizations.FaceSessionClient.getLivenessSessionResult", - "com.azure.ai.vision.face.FaceSessionClient.getLivenessSessions": "ClientCustomizations.FaceSessionClient.getLivenessSessions", - "com.azure.ai.vision.face.FaceSessionClient.getLivenessSessionsWithResponse": "ClientCustomizations.FaceSessionClient.getLivenessSessions", - "com.azure.ai.vision.face.FaceSessionClient.getLivenessWithVerifySessionAuditEntries": "ClientCustomizations.FaceSessionClient.getLivenessWithVerifySessionAuditEntries", - "com.azure.ai.vision.face.FaceSessionClient.getLivenessWithVerifySessionAuditEntriesWithResponse": "ClientCustomizations.FaceSessionClient.getLivenessWithVerifySessionAuditEntries", "com.azure.ai.vision.face.FaceSessionClient.getLivenessWithVerifySessionResult": "ClientCustomizations.FaceSessionClient.getLivenessWithVerifySessionResult", "com.azure.ai.vision.face.FaceSessionClient.getLivenessWithVerifySessionResultWithResponse": "ClientCustomizations.FaceSessionClient.getLivenessWithVerifySessionResult", - "com.azure.ai.vision.face.FaceSessionClient.getLivenessWithVerifySessions": "ClientCustomizations.FaceSessionClient.getLivenessWithVerifySessions", - "com.azure.ai.vision.face.FaceSessionClient.getLivenessWithVerifySessionsWithResponse": "ClientCustomizations.FaceSessionClient.getLivenessWithVerifySessions", "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", @@ -216,9 +196,8 @@ "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": "ClientCustomizations.FaceAdministrationClient.addFaceFromUrl.Request.anonymous", "com.azure.ai.vision.face.implementation.models.AddFaceFromUrlRequest1": "ClientCustomizations.FaceAdministrationClient.addFaceFromUrl.Request.anonymous", - "com.azure.ai.vision.face.implementation.models.CreateLivenessWithVerifySessionMultipartContent": "Face.CreateLivenessWithVerifySessionMultipartContent", + "com.azure.ai.vision.face.implementation.models.AddFaceFromUrlRequest2": "ClientCustomizations.FaceAdministrationClient.addFaceFromUrl.Request.anonymous", "com.azure.ai.vision.face.implementation.models.CreatePersonRequest": "ClientCustomizations.FaceAdministrationClient.createPerson.Request.anonymous", "com.azure.ai.vision.face.implementation.models.CreateRequest": "ClientCustomizations.FaceAdministrationClient.create.Request.anonymous", "com.azure.ai.vision.face.implementation.models.CreateRequest1": "ClientCustomizations.FaceAdministrationClient.create.Request.anonymous", @@ -236,18 +215,13 @@ "com.azure.ai.vision.face.implementation.models.UpdateRequest1": "ClientCustomizations.FaceAdministrationClient.update.Request.anonymous", "com.azure.ai.vision.face.implementation.models.VerifyFaceToFaceRequest": "ClientCustomizations.verifyFaceToFace.Request.anonymous", "com.azure.ai.vision.face.implementation.models.VerifyFromLargePersonGroupRequest": "ClientCustomizations.verifyFromLargePersonGroup.Request.anonymous", - "com.azure.ai.vision.face.implementation.models.VerifyImageFileDetails": null, "com.azure.ai.vision.face.models.AccessoryItem": "Face.AccessoryItem", "com.azure.ai.vision.face.models.AccessoryType": "Face.AccessoryType", "com.azure.ai.vision.face.models.AddFaceResult": "Face.AddFaceResult", - "com.azure.ai.vision.face.models.AuditLivenessResponseInfo": "Face.AuditLivenessResponseInfo", - "com.azure.ai.vision.face.models.AuditRequestInfo": "Face.AuditRequestInfo", "com.azure.ai.vision.face.models.BlurLevel": "Face.BlurLevel", "com.azure.ai.vision.face.models.BlurProperties": "Face.BlurProperties", "com.azure.ai.vision.face.models.CreateLivenessSessionContent": "Face.CreateLivenessSessionContent", - "com.azure.ai.vision.face.models.CreateLivenessSessionResult": "Face.CreateLivenessSessionResult", - "com.azure.ai.vision.face.models.CreateLivenessWithVerifySessionContent": "Face.CreateLivenessWithVerifySessionJsonContent", - "com.azure.ai.vision.face.models.CreateLivenessWithVerifySessionResult": "Face.CreateLivenessWithVerifySessionResult", + "com.azure.ai.vision.face.models.CreateLivenessWithVerifySessionContent": "Face.CreateLivenessWithVerifySessionContent", "com.azure.ai.vision.face.models.CreatePersonResult": "Face.CreatePersonResult", "com.azure.ai.vision.face.models.DetectFromSessionImageOptions": null, "com.azure.ai.vision.face.models.ExposureLevel": "Face.ExposureLevel", @@ -266,7 +240,6 @@ "com.azure.ai.vision.face.models.FaceOperationStatus": "Face.OperationStatus", "com.azure.ai.vision.face.models.FaceRecognitionModel": "Face.RecognitionModel", "com.azure.ai.vision.face.models.FaceRectangle": "Face.FaceRectangle", - "com.azure.ai.vision.face.models.FaceSessionStatus": "Face.FaceSessionStatus", "com.azure.ai.vision.face.models.FaceTrainingResult": "Face.TrainingResult", "com.azure.ai.vision.face.models.FaceVerificationResult": "Face.VerificationResult", "com.azure.ai.vision.face.models.FacialHair": "Face.FacialHair", @@ -282,21 +255,28 @@ "com.azure.ai.vision.face.models.LargePersonGroup": "Face.LargePersonGroup", "com.azure.ai.vision.face.models.LargePersonGroupPerson": "Face.LargePersonGroupPerson", "com.azure.ai.vision.face.models.LargePersonGroupPersonFace": "Face.LargePersonGroupPersonFace", + "com.azure.ai.vision.face.models.LivenessColorDecisionTarget": "Face.LivenessColorDecisionTarget", + "com.azure.ai.vision.face.models.LivenessDecisionTargets": "Face.LivenessDecisionTargets", + "com.azure.ai.vision.face.models.LivenessError": "Face.LivenessError", "com.azure.ai.vision.face.models.LivenessModel": "Face.LivenessModel", "com.azure.ai.vision.face.models.LivenessOperationMode": "Face.LivenessOperationMode", - "com.azure.ai.vision.face.models.LivenessOutputsTarget": "Face.LivenessOutputsTarget", - "com.azure.ai.vision.face.models.LivenessResponseBody": "Face.LivenessResponseBody", + "com.azure.ai.vision.face.models.LivenessResult": "Face.LivenessResult", "com.azure.ai.vision.face.models.LivenessSession": "Face.LivenessSession", - "com.azure.ai.vision.face.models.LivenessSessionAuditEntry": "Face.LivenessSessionAuditEntry", - "com.azure.ai.vision.face.models.LivenessSessionItem": "Face.LivenessSessionItem", - "com.azure.ai.vision.face.models.LivenessWithVerifyImage": "Face.LivenessWithVerifyImage", + "com.azure.ai.vision.face.models.LivenessSessionAttempt": "Face.LivenessSessionAttempt", + "com.azure.ai.vision.face.models.LivenessSessionResults": "Face.LivenessSessionResults", "com.azure.ai.vision.face.models.LivenessWithVerifyOutputs": "Face.LivenessWithVerifyOutputs", + "com.azure.ai.vision.face.models.LivenessWithVerifyReference": "Face.LivenessWithVerifyReference", + "com.azure.ai.vision.face.models.LivenessWithVerifyResult": "Face.LivenessWithVerifyResult", "com.azure.ai.vision.face.models.LivenessWithVerifySession": "Face.LivenessWithVerifySession", + "com.azure.ai.vision.face.models.LivenessWithVerifySessionAttempt": "Face.LivenessWithVerifySessionAttempt", + "com.azure.ai.vision.face.models.LivenessWithVerifySessionResults": "Face.LivenessWithVerifySessionResults", "com.azure.ai.vision.face.models.MaskProperties": "Face.MaskProperties", "com.azure.ai.vision.face.models.MaskType": "Face.MaskType", "com.azure.ai.vision.face.models.NoiseLevel": "Face.NoiseLevel", "com.azure.ai.vision.face.models.NoiseProperties": "Face.NoiseProperties", "com.azure.ai.vision.face.models.OcclusionProperties": "Face.OcclusionProperties", - "com.azure.ai.vision.face.models.QualityForRecognition": "Face.QualityForRecognition" + "com.azure.ai.vision.face.models.OperationState": "Azure.Core.Foundations.OperationState", + "com.azure.ai.vision.face.models.QualityForRecognition": "Face.QualityForRecognition", + "com.azure.ai.vision.face.models.VerifyImageFileDetails": null } } diff --git a/sdk/face/azure-ai-vision-face/tsp-location.yaml b/sdk/face/azure-ai-vision-face/tsp-location.yaml index 5a9a9d70f2b6..159988ea6eca 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: cf80ee4aacdb4ef9926b42f09837fe16add9e66a -repo: Azure/azure-rest-api-specs -additionalDirectories: null +commit: 9ed37b09d0daec5e064834bdde5323490765e174 +repo: test-repo-billy/azure-rest-api-specs +additionalDirectories: