diff --git a/lib/services/cognitiveServicesFace/README.md b/lib/services/cognitiveServicesFace/README.md index 1208c39903..da9031227c 100644 --- a/lib/services/cognitiveServicesFace/README.md +++ b/lib/services/cognitiveServicesFace/README.md @@ -5,6 +5,7 @@ summary: *content --- **This SDK will be deprecated next year and will be replaced by a new TypeScript-based isomorphic SDK (found at https://github.com/Azure/azure-sdk-for-js) which works on Node.js and browsers.** ## Microsoft Azure SDK for Node.js - FaceClient + This project provides a Node.js package for accessing Azure. Right now it supports: - **Node.js version 6.x.x or higher** @@ -19,7 +20,7 @@ npm install azure-cognitiveservices-face ### How to use -#### Authentication, client creation and list personGroupPerson as an example. +#### Authentication, client creation, and list personGroupPerson as an example. ```javascript const msRest = require("ms-rest"); @@ -31,6 +32,7 @@ const client = new FaceClient(creds, subscriptionId); const personGroupId = "testpersonGroupId"; const start = "teststart"; const top = 1; + client.personGroupPerson.list(personGroupId, start, top).then((result) => { console.log("The result is:"); console.log(result); @@ -38,6 +40,7 @@ client.personGroupPerson.list(personGroupId, start, top).then((result) => { console.log('An error occurred:'); console.dir(err, {depth: null, colors: true}); }); +``` ### Related projects diff --git a/lib/services/cognitiveServicesFace/lib/models/faceList.js b/lib/services/cognitiveServicesFace/lib/models/faceList.js index 3bb30f696e..bcf45cbb04 100644 --- a/lib/services/cognitiveServicesFace/lib/models/faceList.js +++ b/lib/services/cognitiveServicesFace/lib/models/faceList.js @@ -66,7 +66,7 @@ class FaceList extends models['NameAndUserDataContract'] { serializedName: 'faceListId', constraints: { MaxLength: 64, - Pattern: '^[a-z0-9-_]+$' + Pattern: /^[a-z0-9-_]+$/ }, type: { name: 'String' diff --git a/lib/services/cognitiveServicesFace/lib/models/findSimilarRequest.js b/lib/services/cognitiveServicesFace/lib/models/findSimilarRequest.js index d9dfa71b0f..9a62013ad5 100644 --- a/lib/services/cognitiveServicesFace/lib/models/findSimilarRequest.js +++ b/lib/services/cognitiveServicesFace/lib/models/findSimilarRequest.js @@ -70,7 +70,7 @@ class FindSimilarRequest { serializedName: 'faceListId', constraints: { MaxLength: 64, - Pattern: '^[a-z0-9-_]+$' + Pattern: /^[a-z0-9-_]+$/ }, type: { name: 'String' @@ -81,7 +81,7 @@ class FindSimilarRequest { serializedName: 'largeFaceListId', constraints: { MaxLength: 64, - Pattern: '^[a-z0-9-_]+$' + Pattern: /^[a-z0-9-_]+$/ }, type: { name: 'String' diff --git a/lib/services/cognitiveServicesFace/lib/models/identifyRequest.js b/lib/services/cognitiveServicesFace/lib/models/identifyRequest.js index 03012c7dd8..637690d711 100644 --- a/lib/services/cognitiveServicesFace/lib/models/identifyRequest.js +++ b/lib/services/cognitiveServicesFace/lib/models/identifyRequest.js @@ -73,7 +73,7 @@ class IdentifyRequest { serializedName: 'personGroupId', constraints: { MaxLength: 64, - Pattern: '^[a-z0-9-_]+$' + Pattern: /^[a-z0-9-_]+$/ }, type: { name: 'String' @@ -84,7 +84,7 @@ class IdentifyRequest { serializedName: 'largePersonGroupId', constraints: { MaxLength: 64, - Pattern: '^[a-z0-9-_]+$' + Pattern: /^[a-z0-9-_]+$/ }, type: { name: 'String' diff --git a/lib/services/cognitiveServicesFace/lib/models/index.d.ts b/lib/services/cognitiveServicesFace/lib/models/index.d.ts index 2e7cfaa3b1..6e5546befa 100644 --- a/lib/services/cognitiveServicesFace/lib/models/index.d.ts +++ b/lib/services/cognitiveServicesFace/lib/models/index.d.ts @@ -1,24 +1,15 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import * as moment from "moment"; - /** - * @class - * Initializes a new instance of the ErrorModel class. - * @constructor * Error body. - * - * @property {string} [code] - * @property {string} [message] */ export interface ErrorModel { code?: string; @@ -26,147 +17,51 @@ export interface ErrorModel { } /** - * @class - * Initializes a new instance of the APIError class. - * @constructor * Error information returned by the API - * - * @property {object} [error] - * @property {string} [error.code] - * @property {string} [error.message] - */ +*/ export interface APIError { error?: ErrorModel; } /** - * @class - * Initializes a new instance of the FaceRectangle class. - * @constructor * A rectangle within which a face can be found - * - * @property {number} width The width of the rectangle, in pixels. - * @property {number} height The height of the rectangle, in pixels. - * @property {number} left The distance from the left edge if the image to the - * left edge of the rectangle, in pixels. - * @property {number} top The distance from the top edge if the image to the - * top edge of the rectangle, in pixels. - */ +*/ export interface FaceRectangle { + /** + * The width of the rectangle, in pixels. + */ width: number; + /** + * The height of the rectangle, in pixels. + */ height: number; + /** + * The distance from the left edge if the image to the left edge of the rectangle, in pixels. + */ left: number; + /** + * The distance from the top edge if the image to the top edge of the rectangle, in pixels. + */ top: number; } /** - * @class - * Initializes a new instance of the Coordinate class. - * @constructor * Coordinates within an image - * - * @property {number} x The horizontal component, in pixels. - * @property {number} y The vertical component, in pixels. - */ +*/ export interface Coordinate { + /** + * The horizontal component, in pixels. + */ x: number; + /** + * The vertical component, in pixels. + */ y: number; } /** - * @class - * Initializes a new instance of the FaceLandmarks class. - * @constructor - * A collection of 27-point face landmarks pointing to the important positions - * of face components. - * - * @property {object} [pupilLeft] - * @property {number} [pupilLeft.x] The horizontal component, in pixels. - * @property {number} [pupilLeft.y] The vertical component, in pixels. - * @property {object} [pupilRight] - * @property {number} [pupilRight.x] The horizontal component, in pixels. - * @property {number} [pupilRight.y] The vertical component, in pixels. - * @property {object} [noseTip] - * @property {number} [noseTip.x] The horizontal component, in pixels. - * @property {number} [noseTip.y] The vertical component, in pixels. - * @property {object} [mouthLeft] - * @property {number} [mouthLeft.x] The horizontal component, in pixels. - * @property {number} [mouthLeft.y] The vertical component, in pixels. - * @property {object} [mouthRight] - * @property {number} [mouthRight.x] The horizontal component, in pixels. - * @property {number} [mouthRight.y] The vertical component, in pixels. - * @property {object} [eyebrowLeftOuter] - * @property {number} [eyebrowLeftOuter.x] The horizontal component, in pixels. - * @property {number} [eyebrowLeftOuter.y] The vertical component, in pixels. - * @property {object} [eyebrowLeftInner] - * @property {number} [eyebrowLeftInner.x] The horizontal component, in pixels. - * @property {number} [eyebrowLeftInner.y] The vertical component, in pixels. - * @property {object} [eyeLeftOuter] - * @property {number} [eyeLeftOuter.x] The horizontal component, in pixels. - * @property {number} [eyeLeftOuter.y] The vertical component, in pixels. - * @property {object} [eyeLeftTop] - * @property {number} [eyeLeftTop.x] The horizontal component, in pixels. - * @property {number} [eyeLeftTop.y] The vertical component, in pixels. - * @property {object} [eyeLeftBottom] - * @property {number} [eyeLeftBottom.x] The horizontal component, in pixels. - * @property {number} [eyeLeftBottom.y] The vertical component, in pixels. - * @property {object} [eyeLeftInner] - * @property {number} [eyeLeftInner.x] The horizontal component, in pixels. - * @property {number} [eyeLeftInner.y] The vertical component, in pixels. - * @property {object} [eyebrowRightInner] - * @property {number} [eyebrowRightInner.x] The horizontal component, in - * pixels. - * @property {number} [eyebrowRightInner.y] The vertical component, in pixels. - * @property {object} [eyebrowRightOuter] - * @property {number} [eyebrowRightOuter.x] The horizontal component, in - * pixels. - * @property {number} [eyebrowRightOuter.y] The vertical component, in pixels. - * @property {object} [eyeRightInner] - * @property {number} [eyeRightInner.x] The horizontal component, in pixels. - * @property {number} [eyeRightInner.y] The vertical component, in pixels. - * @property {object} [eyeRightTop] - * @property {number} [eyeRightTop.x] The horizontal component, in pixels. - * @property {number} [eyeRightTop.y] The vertical component, in pixels. - * @property {object} [eyeRightBottom] - * @property {number} [eyeRightBottom.x] The horizontal component, in pixels. - * @property {number} [eyeRightBottom.y] The vertical component, in pixels. - * @property {object} [eyeRightOuter] - * @property {number} [eyeRightOuter.x] The horizontal component, in pixels. - * @property {number} [eyeRightOuter.y] The vertical component, in pixels. - * @property {object} [noseRootLeft] - * @property {number} [noseRootLeft.x] The horizontal component, in pixels. - * @property {number} [noseRootLeft.y] The vertical component, in pixels. - * @property {object} [noseRootRight] - * @property {number} [noseRootRight.x] The horizontal component, in pixels. - * @property {number} [noseRootRight.y] The vertical component, in pixels. - * @property {object} [noseLeftAlarTop] - * @property {number} [noseLeftAlarTop.x] The horizontal component, in pixels. - * @property {number} [noseLeftAlarTop.y] The vertical component, in pixels. - * @property {object} [noseRightAlarTop] - * @property {number} [noseRightAlarTop.x] The horizontal component, in pixels. - * @property {number} [noseRightAlarTop.y] The vertical component, in pixels. - * @property {object} [noseLeftAlarOutTip] - * @property {number} [noseLeftAlarOutTip.x] The horizontal component, in - * pixels. - * @property {number} [noseLeftAlarOutTip.y] The vertical component, in pixels. - * @property {object} [noseRightAlarOutTip] - * @property {number} [noseRightAlarOutTip.x] The horizontal component, in - * pixels. - * @property {number} [noseRightAlarOutTip.y] The vertical component, in - * pixels. - * @property {object} [upperLipTop] - * @property {number} [upperLipTop.x] The horizontal component, in pixels. - * @property {number} [upperLipTop.y] The vertical component, in pixels. - * @property {object} [upperLipBottom] - * @property {number} [upperLipBottom.x] The horizontal component, in pixels. - * @property {number} [upperLipBottom.y] The vertical component, in pixels. - * @property {object} [underLipTop] - * @property {number} [underLipTop.x] The horizontal component, in pixels. - * @property {number} [underLipTop.y] The vertical component, in pixels. - * @property {object} [underLipBottom] - * @property {number} [underLipBottom.x] The horizontal component, in pixels. - * @property {number} [underLipBottom.y] The vertical component, in pixels. - */ + * A collection of 27-point face landmarks pointing to the important positions of face components. +*/ export interface FaceLandmarks { pupilLeft?: Coordinate; pupilRight?: Coordinate; @@ -198,15 +93,8 @@ export interface FaceLandmarks { } /** - * @class - * Initializes a new instance of the FacialHair class. - * @constructor * Properties describing facial hair attributes. - * - * @property {number} [moustache] - * @property {number} [beard] - * @property {number} [sideburns] - */ +*/ export interface FacialHair { moustache?: number; beard?: number; @@ -214,15 +102,8 @@ export interface FacialHair { } /** - * @class - * Initializes a new instance of the HeadPose class. - * @constructor * Properties indicating head pose of the face. - * - * @property {number} [roll] - * @property {number} [yaw] - * @property {number} [pitch] - */ +*/ export interface HeadPose { roll?: number; yaw?: number; @@ -230,21 +111,8 @@ export interface HeadPose { } /** - * @class - * Initializes a new instance of the Emotion class. - * @constructor - * Properties describing facial emotion in form of confidence ranging from 0 to - * 1. - * - * @property {number} [anger] - * @property {number} [contempt] - * @property {number} [disgust] - * @property {number} [fear] - * @property {number} [happiness] - * @property {number} [neutral] - * @property {number} [sadness] - * @property {number} [surprise] - */ + * Properties describing facial emotion in form of confidence ranging from 0 to 1. +*/ export interface Emotion { anger?: number; contempt?: number; @@ -257,463 +125,196 @@ export interface Emotion { } /** - * @class - * Initializes a new instance of the HairColor class. - * @constructor * Hair color and associated confidence - * - * @property {string} [color] Name of the hair color. Possible values include: - * 'unknown', 'white', 'gray', 'blond', 'brown', 'red', 'black', 'other' - * @property {number} [confidence] Confidence level of the color - */ +*/ export interface HairColor { + /** + * Name of the hair color. Possible values include: 'unknown', 'white', 'gray', 'blond', 'brown', + * 'red', 'black', 'other' + */ color?: string; + /** + * Confidence level of the color + */ confidence?: number; } /** - * @class - * Initializes a new instance of the Hair class. - * @constructor * Properties describing hair attributes. - * - * @property {number} [bald] A number describing confidence level of whether - * the person is bald. - * @property {boolean} [invisible] A boolean value describing whether the hair - * is visible in the image. - * @property {array} [hairColor] An array of candidate colors and confidence - * level in the presence of each. - */ +*/ export interface Hair { + /** + * A number describing confidence level of whether the person is bald. + */ bald?: number; + /** + * A boolean value describing whether the hair is visible in the image. + */ invisible?: boolean; + /** + * An array of candidate colors and confidence level in the presence of each. + */ hairColor?: HairColor[]; } /** - * @class - * Initializes a new instance of the Makeup class. - * @constructor * Properties describing present makeups on a given face. - * - * @property {boolean} [eyeMakeup] A boolean value describing whether eye - * makeup is present on a face. - * @property {boolean} [lipMakeup] A boolean value describing whether lip - * makeup is present on a face. - */ +*/ export interface Makeup { + /** + * A boolean value describing whether eye makeup is present on a face. + */ eyeMakeup?: boolean; + /** + * A boolean value describing whether lip makeup is present on a face. + */ lipMakeup?: boolean; } /** - * @class - * Initializes a new instance of the Occlusion class. - * @constructor * Properties describing occlusions on a given face. - * - * @property {boolean} [foreheadOccluded] A boolean value indicating whether - * forehead is occluded. - * @property {boolean} [eyeOccluded] A boolean value indicating whether eyes - * are occluded. - * @property {boolean} [mouthOccluded] A boolean value indicating whether the - * mouth is occluded. - */ +*/ export interface Occlusion { + /** + * A boolean value indicating whether forehead is occluded. + */ foreheadOccluded?: boolean; + /** + * A boolean value indicating whether eyes are occluded. + */ eyeOccluded?: boolean; + /** + * A boolean value indicating whether the mouth is occluded. + */ mouthOccluded?: boolean; } /** - * @class - * Initializes a new instance of the Accessory class. - * @constructor * Accessory item and corresponding confidence level. - * - * @property {string} [type] Type of an accessory. Possible values include: - * 'headWear', 'glasses', 'mask' - * @property {number} [confidence] Confidence level of an accessory - */ +*/ export interface Accessory { + /** + * Type of an accessory. Possible values include: 'headWear', 'glasses', 'mask' + */ type?: string; + /** + * Confidence level of an accessory + */ confidence?: number; } /** - * @class - * Initializes a new instance of the Blur class. - * @constructor * Properties describing any presence of blur within the image. - * - * @property {string} [blurLevel] An enum value indicating level of blurriness. - * Possible values include: 'Low', 'Medium', 'High' - * @property {number} [value] A number indicating level of blurriness ranging - * from 0 to 1. - */ +*/ export interface Blur { + /** + * An enum value indicating level of blurriness. Possible values include: 'Low', 'Medium', 'High' + */ blurLevel?: string; + /** + * A number indicating level of blurriness ranging from 0 to 1. + */ value?: number; } /** - * @class - * Initializes a new instance of the Exposure class. - * @constructor * Properties describing exposure level of the image. - * - * @property {string} [exposureLevel] An enum value indicating level of - * exposure. Possible values include: 'UnderExposure', 'GoodExposure', - * 'OverExposure' - * @property {number} [value] A number indicating level of exposure level - * ranging from 0 to 1. [0, 0.25) is under exposure. [0.25, 0.75) is good - * exposure. [0.75, 1] is over exposure. - */ +*/ export interface Exposure { + /** + * An enum value indicating level of exposure. Possible values include: 'UnderExposure', + * 'GoodExposure', 'OverExposure' + */ exposureLevel?: string; + /** + * A number indicating level of exposure level ranging from 0 to 1. [0, 0.25) is under exposure. + * [0.25, 0.75) is good exposure. [0.75, 1] is over exposure. + */ value?: number; } /** - * @class - * Initializes a new instance of the Noise class. - * @constructor * Properties describing noise level of the image. - * - * @property {string} [noiseLevel] An enum value indicating level of noise. - * Possible values include: 'Low', 'Medium', 'High' - * @property {number} [value] A number indicating level of noise level ranging - * from 0 to 1. [0, 0.25) is under exposure. [0.25, 0.75) is good exposure. - * [0.75, 1] is over exposure. [0, 0.3) is low noise level. [0.3, 0.7) is - * medium noise level. [0.7, 1] is high noise level. - */ +*/ export interface Noise { + /** + * An enum value indicating level of noise. Possible values include: 'Low', 'Medium', 'High' + */ noiseLevel?: string; + /** + * A number indicating level of noise level ranging from 0 to 1. [0, 0.25) is under exposure. + * [0.25, 0.75) is good exposure. [0.75, 1] is over exposure. [0, 0.3) is low noise level. [0.3, + * 0.7) is medium noise level. [0.7, 1] is high noise level. + */ value?: number; } /** - * @class - * Initializes a new instance of the FaceAttributes class. - * @constructor * Face Attributes - * - * @property {number} [age] Age in years - * @property {string} [gender] Possible gender of the face. Possible values - * include: 'male', 'female', 'genderless' - * @property {number} [smile] Smile intensity, a number between [0,1] - * @property {object} [facialHair] Properties describing facial hair - * attributes. - * @property {number} [facialHair.moustache] - * @property {number} [facialHair.beard] - * @property {number} [facialHair.sideburns] - * @property {string} [glasses] Glasses type if any of the face. Possible - * values include: 'noGlasses', 'readingGlasses', 'sunglasses', - * 'swimmingGoggles' - * @property {object} [headPose] Properties indicating head pose of the face. - * @property {number} [headPose.roll] - * @property {number} [headPose.yaw] - * @property {number} [headPose.pitch] - * @property {object} [emotion] Properties describing facial emotion in form of - * confidence ranging from 0 to 1. - * @property {number} [emotion.anger] - * @property {number} [emotion.contempt] - * @property {number} [emotion.disgust] - * @property {number} [emotion.fear] - * @property {number} [emotion.happiness] - * @property {number} [emotion.neutral] - * @property {number} [emotion.sadness] - * @property {number} [emotion.surprise] - * @property {object} [hair] Properties describing hair attributes. - * @property {number} [hair.bald] A number describing confidence level of - * whether the person is bald. - * @property {boolean} [hair.invisible] A boolean value describing whether the - * hair is visible in the image. - * @property {array} [hair.hairColor] An array of candidate colors and - * confidence level in the presence of each. - * @property {object} [makeup] Properties describing present makeups on a given - * face. - * @property {boolean} [makeup.eyeMakeup] A boolean value describing whether - * eye makeup is present on a face. - * @property {boolean} [makeup.lipMakeup] A boolean value describing whether - * lip makeup is present on a face. - * @property {object} [occlusion] Properties describing occlusions on a given - * face. - * @property {boolean} [occlusion.foreheadOccluded] A boolean value indicating - * whether forehead is occluded. - * @property {boolean} [occlusion.eyeOccluded] A boolean value indicating - * whether eyes are occluded. - * @property {boolean} [occlusion.mouthOccluded] A boolean value indicating - * whether the mouth is occluded. - * @property {array} [accessories] Properties describing any accessories on a - * given face. - * @property {object} [blur] Properties describing any presence of blur within - * the image. - * @property {string} [blur.blurLevel] An enum value indicating level of - * blurriness. Possible values include: 'Low', 'Medium', 'High' - * @property {number} [blur.value] A number indicating level of blurriness - * ranging from 0 to 1. - * @property {object} [exposure] Properties describing exposure level of the - * image. - * @property {string} [exposure.exposureLevel] An enum value indicating level - * of exposure. Possible values include: 'UnderExposure', 'GoodExposure', - * 'OverExposure' - * @property {number} [exposure.value] A number indicating level of exposure - * level ranging from 0 to 1. [0, 0.25) is under exposure. [0.25, 0.75) is good - * exposure. [0.75, 1] is over exposure. - * @property {object} [noise] Properties describing noise level of the image. - * @property {string} [noise.noiseLevel] An enum value indicating level of - * noise. Possible values include: 'Low', 'Medium', 'High' - * @property {number} [noise.value] A number indicating level of noise level - * ranging from 0 to 1. [0, 0.25) is under exposure. [0.25, 0.75) is good - * exposure. [0.75, 1] is over exposure. [0, 0.3) is low noise level. [0.3, - * 0.7) is medium noise level. [0.7, 1] is high noise level. - */ +*/ export interface FaceAttributes { + /** + * Age in years + */ age?: number; + /** + * Possible gender of the face. Possible values include: 'male', 'female', 'genderless' + */ gender?: string; + /** + * Smile intensity, a number between [0,1] + */ smile?: number; + /** + * Properties describing facial hair attributes. + */ facialHair?: FacialHair; + /** + * Glasses type if any of the face. Possible values include: 'noGlasses', 'readingGlasses', + * 'sunglasses', 'swimmingGoggles' + */ glasses?: string; + /** + * Properties indicating head pose of the face. + */ headPose?: HeadPose; + /** + * Properties describing facial emotion in form of confidence ranging from 0 to 1. + */ emotion?: Emotion; + /** + * Properties describing hair attributes. + */ hair?: Hair; + /** + * Properties describing present makeups on a given face. + */ makeup?: Makeup; + /** + * Properties describing occlusions on a given face. + */ occlusion?: Occlusion; + /** + * Properties describing any accessories on a given face. + */ accessories?: Accessory[]; + /** + * Properties describing any presence of blur within the image. + */ blur?: Blur; + /** + * Properties describing exposure level of the image. + */ exposure?: Exposure; + /** + * Properties describing noise level of the image. + */ noise?: Noise; } /** - * @class - * Initializes a new instance of the DetectedFace class. - * @constructor * Detected Face object. - * - * @property {uuid} [faceId] - * @property {object} faceRectangle - * @property {number} [faceRectangle.width] The width of the rectangle, in - * pixels. - * @property {number} [faceRectangle.height] The height of the rectangle, in - * pixels. - * @property {number} [faceRectangle.left] The distance from the left edge if - * the image to the left edge of the rectangle, in pixels. - * @property {number} [faceRectangle.top] The distance from the top edge if the - * image to the top edge of the rectangle, in pixels. - * @property {object} [faceLandmarks] - * @property {object} [faceLandmarks.pupilLeft] - * @property {number} [faceLandmarks.pupilLeft.x] The horizontal component, in - * pixels. - * @property {number} [faceLandmarks.pupilLeft.y] The vertical component, in - * pixels. - * @property {object} [faceLandmarks.pupilRight] - * @property {number} [faceLandmarks.pupilRight.x] The horizontal component, in - * pixels. - * @property {number} [faceLandmarks.pupilRight.y] The vertical component, in - * pixels. - * @property {object} [faceLandmarks.noseTip] - * @property {number} [faceLandmarks.noseTip.x] The horizontal component, in - * pixels. - * @property {number} [faceLandmarks.noseTip.y] The vertical component, in - * pixels. - * @property {object} [faceLandmarks.mouthLeft] - * @property {number} [faceLandmarks.mouthLeft.x] The horizontal component, in - * pixels. - * @property {number} [faceLandmarks.mouthLeft.y] The vertical component, in - * pixels. - * @property {object} [faceLandmarks.mouthRight] - * @property {number} [faceLandmarks.mouthRight.x] The horizontal component, in - * pixels. - * @property {number} [faceLandmarks.mouthRight.y] The vertical component, in - * pixels. - * @property {object} [faceLandmarks.eyebrowLeftOuter] - * @property {number} [faceLandmarks.eyebrowLeftOuter.x] The horizontal - * component, in pixels. - * @property {number} [faceLandmarks.eyebrowLeftOuter.y] The vertical - * component, in pixels. - * @property {object} [faceLandmarks.eyebrowLeftInner] - * @property {number} [faceLandmarks.eyebrowLeftInner.x] The horizontal - * component, in pixels. - * @property {number} [faceLandmarks.eyebrowLeftInner.y] The vertical - * component, in pixels. - * @property {object} [faceLandmarks.eyeLeftOuter] - * @property {number} [faceLandmarks.eyeLeftOuter.x] The horizontal component, - * in pixels. - * @property {number} [faceLandmarks.eyeLeftOuter.y] The vertical component, in - * pixels. - * @property {object} [faceLandmarks.eyeLeftTop] - * @property {number} [faceLandmarks.eyeLeftTop.x] The horizontal component, in - * pixels. - * @property {number} [faceLandmarks.eyeLeftTop.y] The vertical component, in - * pixels. - * @property {object} [faceLandmarks.eyeLeftBottom] - * @property {number} [faceLandmarks.eyeLeftBottom.x] The horizontal component, - * in pixels. - * @property {number} [faceLandmarks.eyeLeftBottom.y] The vertical component, - * in pixels. - * @property {object} [faceLandmarks.eyeLeftInner] - * @property {number} [faceLandmarks.eyeLeftInner.x] The horizontal component, - * in pixels. - * @property {number} [faceLandmarks.eyeLeftInner.y] The vertical component, in - * pixels. - * @property {object} [faceLandmarks.eyebrowRightInner] - * @property {number} [faceLandmarks.eyebrowRightInner.x] The horizontal - * component, in pixels. - * @property {number} [faceLandmarks.eyebrowRightInner.y] The vertical - * component, in pixels. - * @property {object} [faceLandmarks.eyebrowRightOuter] - * @property {number} [faceLandmarks.eyebrowRightOuter.x] The horizontal - * component, in pixels. - * @property {number} [faceLandmarks.eyebrowRightOuter.y] The vertical - * component, in pixels. - * @property {object} [faceLandmarks.eyeRightInner] - * @property {number} [faceLandmarks.eyeRightInner.x] The horizontal component, - * in pixels. - * @property {number} [faceLandmarks.eyeRightInner.y] The vertical component, - * in pixels. - * @property {object} [faceLandmarks.eyeRightTop] - * @property {number} [faceLandmarks.eyeRightTop.x] The horizontal component, - * in pixels. - * @property {number} [faceLandmarks.eyeRightTop.y] The vertical component, in - * pixels. - * @property {object} [faceLandmarks.eyeRightBottom] - * @property {number} [faceLandmarks.eyeRightBottom.x] The horizontal - * component, in pixels. - * @property {number} [faceLandmarks.eyeRightBottom.y] The vertical component, - * in pixels. - * @property {object} [faceLandmarks.eyeRightOuter] - * @property {number} [faceLandmarks.eyeRightOuter.x] The horizontal component, - * in pixels. - * @property {number} [faceLandmarks.eyeRightOuter.y] The vertical component, - * in pixels. - * @property {object} [faceLandmarks.noseRootLeft] - * @property {number} [faceLandmarks.noseRootLeft.x] The horizontal component, - * in pixels. - * @property {number} [faceLandmarks.noseRootLeft.y] The vertical component, in - * pixels. - * @property {object} [faceLandmarks.noseRootRight] - * @property {number} [faceLandmarks.noseRootRight.x] The horizontal component, - * in pixels. - * @property {number} [faceLandmarks.noseRootRight.y] The vertical component, - * in pixels. - * @property {object} [faceLandmarks.noseLeftAlarTop] - * @property {number} [faceLandmarks.noseLeftAlarTop.x] The horizontal - * component, in pixels. - * @property {number} [faceLandmarks.noseLeftAlarTop.y] The vertical component, - * in pixels. - * @property {object} [faceLandmarks.noseRightAlarTop] - * @property {number} [faceLandmarks.noseRightAlarTop.x] The horizontal - * component, in pixels. - * @property {number} [faceLandmarks.noseRightAlarTop.y] The vertical - * component, in pixels. - * @property {object} [faceLandmarks.noseLeftAlarOutTip] - * @property {number} [faceLandmarks.noseLeftAlarOutTip.x] The horizontal - * component, in pixels. - * @property {number} [faceLandmarks.noseLeftAlarOutTip.y] The vertical - * component, in pixels. - * @property {object} [faceLandmarks.noseRightAlarOutTip] - * @property {number} [faceLandmarks.noseRightAlarOutTip.x] The horizontal - * component, in pixels. - * @property {number} [faceLandmarks.noseRightAlarOutTip.y] The vertical - * component, in pixels. - * @property {object} [faceLandmarks.upperLipTop] - * @property {number} [faceLandmarks.upperLipTop.x] The horizontal component, - * in pixels. - * @property {number} [faceLandmarks.upperLipTop.y] The vertical component, in - * pixels. - * @property {object} [faceLandmarks.upperLipBottom] - * @property {number} [faceLandmarks.upperLipBottom.x] The horizontal - * component, in pixels. - * @property {number} [faceLandmarks.upperLipBottom.y] The vertical component, - * in pixels. - * @property {object} [faceLandmarks.underLipTop] - * @property {number} [faceLandmarks.underLipTop.x] The horizontal component, - * in pixels. - * @property {number} [faceLandmarks.underLipTop.y] The vertical component, in - * pixels. - * @property {object} [faceLandmarks.underLipBottom] - * @property {number} [faceLandmarks.underLipBottom.x] The horizontal - * component, in pixels. - * @property {number} [faceLandmarks.underLipBottom.y] The vertical component, - * in pixels. - * @property {object} [faceAttributes] - * @property {number} [faceAttributes.age] Age in years - * @property {string} [faceAttributes.gender] Possible gender of the face. - * Possible values include: 'male', 'female', 'genderless' - * @property {number} [faceAttributes.smile] Smile intensity, a number between - * [0,1] - * @property {object} [faceAttributes.facialHair] Properties describing facial - * hair attributes. - * @property {number} [faceAttributes.facialHair.moustache] - * @property {number} [faceAttributes.facialHair.beard] - * @property {number} [faceAttributes.facialHair.sideburns] - * @property {string} [faceAttributes.glasses] Glasses type if any of the face. - * Possible values include: 'noGlasses', 'readingGlasses', 'sunglasses', - * 'swimmingGoggles' - * @property {object} [faceAttributes.headPose] Properties indicating head pose - * of the face. - * @property {number} [faceAttributes.headPose.roll] - * @property {number} [faceAttributes.headPose.yaw] - * @property {number} [faceAttributes.headPose.pitch] - * @property {object} [faceAttributes.emotion] Properties describing facial - * emotion in form of confidence ranging from 0 to 1. - * @property {number} [faceAttributes.emotion.anger] - * @property {number} [faceAttributes.emotion.contempt] - * @property {number} [faceAttributes.emotion.disgust] - * @property {number} [faceAttributes.emotion.fear] - * @property {number} [faceAttributes.emotion.happiness] - * @property {number} [faceAttributes.emotion.neutral] - * @property {number} [faceAttributes.emotion.sadness] - * @property {number} [faceAttributes.emotion.surprise] - * @property {object} [faceAttributes.hair] Properties describing hair - * attributes. - * @property {number} [faceAttributes.hair.bald] A number describing confidence - * level of whether the person is bald. - * @property {boolean} [faceAttributes.hair.invisible] A boolean value - * describing whether the hair is visible in the image. - * @property {array} [faceAttributes.hair.hairColor] An array of candidate - * colors and confidence level in the presence of each. - * @property {object} [faceAttributes.makeup] Properties describing present - * makeups on a given face. - * @property {boolean} [faceAttributes.makeup.eyeMakeup] A boolean value - * describing whether eye makeup is present on a face. - * @property {boolean} [faceAttributes.makeup.lipMakeup] A boolean value - * describing whether lip makeup is present on a face. - * @property {object} [faceAttributes.occlusion] Properties describing - * occlusions on a given face. - * @property {boolean} [faceAttributes.occlusion.foreheadOccluded] A boolean - * value indicating whether forehead is occluded. - * @property {boolean} [faceAttributes.occlusion.eyeOccluded] A boolean value - * indicating whether eyes are occluded. - * @property {boolean} [faceAttributes.occlusion.mouthOccluded] A boolean value - * indicating whether the mouth is occluded. - * @property {array} [faceAttributes.accessories] Properties describing any - * accessories on a given face. - * @property {object} [faceAttributes.blur] Properties describing any presence - * of blur within the image. - * @property {string} [faceAttributes.blur.blurLevel] An enum value indicating - * level of blurriness. Possible values include: 'Low', 'Medium', 'High' - * @property {number} [faceAttributes.blur.value] A number indicating level of - * blurriness ranging from 0 to 1. - * @property {object} [faceAttributes.exposure] Properties describing exposure - * level of the image. - * @property {string} [faceAttributes.exposure.exposureLevel] An enum value - * indicating level of exposure. Possible values include: 'UnderExposure', - * 'GoodExposure', 'OverExposure' - * @property {number} [faceAttributes.exposure.value] A number indicating level - * of exposure level ranging from 0 to 1. [0, 0.25) is under exposure. [0.25, - * 0.75) is good exposure. [0.75, 1] is over exposure. - * @property {object} [faceAttributes.noise] Properties describing noise level - * of the image. - * @property {string} [faceAttributes.noise.noiseLevel] An enum value - * indicating level of noise. Possible values include: 'Low', 'Medium', 'High' - * @property {number} [faceAttributes.noise.value] A number indicating level of - * noise level ranging from 0 to 1. [0, 0.25) is under exposure. [0.25, 0.75) - * is good exposure. [0.75, 1] is over exposure. [0, 0.3) is low noise level. - * [0.3, 0.7) is medium noise level. [0.7, 1] is high noise level. - */ +*/ export interface DetectedFace { faceId?: string; faceRectangle: FaceRectangle; @@ -722,372 +323,348 @@ export interface DetectedFace { } /** - * @class - * Initializes a new instance of the FindSimilarRequest class. - * @constructor * Request body for find similar operation. - * - * @property {uuid} faceId FaceId of the query face. User needs to call Face - - * Detect first to get a valid faceId. Note that this faceId is not persisted - * and will expire 24 hours after the detection call - * @property {string} [faceListId] An existing user-specified unique candidate - * face list, created in Face List - Create a Face List. Face list contains a - * set of persistedFaceIds which are persisted and will never expire. Parameter - * faceListId, largeFaceListId and faceIds should not be provided at the same - * time。 - * @property {string} [largeFaceListId] An existing user-specified unique - * candidate large face list, created in LargeFaceList - Create. Large face - * list contains a set of persistedFaceIds which are persisted and will never - * expire. Parameter faceListId, largeFaceListId and faceIds should not be - * provided at the same time. - * @property {array} [faceIds] An array of candidate faceIds. All of them are - * created by Face - Detect and the faceIds will expire 24 hours after the - * detection call. The number of faceIds is limited to 1000. Parameter - * faceListId, largeFaceListId and faceIds should not be provided at the same - * time. - * @property {number} [maxNumOfCandidatesReturned] The number of top similar - * faces returned. The valid range is [1, 1000]. Default value: 20 . - * @property {string} [mode] Similar face searching mode. It can be - * "matchPerson" or "matchFace". Possible values include: 'matchPerson', - * 'matchFace'. Default value: 'matchPerson' . - */ +*/ export interface FindSimilarRequest { + /** + * FaceId of the query face. User needs to call Face - Detect first to get a valid faceId. Note + * that this faceId is not persisted and will expire 24 hours after the detection call + */ faceId: string; + /** + * An existing user-specified unique candidate face list, created in Face List - Create a Face + * List. Face list contains a set of persistedFaceIds which are persisted and will never expire. + * Parameter faceListId, largeFaceListId and faceIds should not be provided at the same time。 + */ faceListId?: string; + /** + * An existing user-specified unique candidate large face list, created in LargeFaceList - + * Create. Large face list contains a set of persistedFaceIds which are persisted and will never + * expire. Parameter faceListId, largeFaceListId and faceIds should not be provided at the same + * time. + */ largeFaceListId?: string; + /** + * An array of candidate faceIds. All of them are created by Face - Detect and the faceIds will + * expire 24 hours after the detection call. The number of faceIds is limited to 1000. Parameter + * faceListId, largeFaceListId and faceIds should not be provided at the same time. + */ faceIds?: string[]; + /** + * The number of top similar faces returned. The valid range is [1, 1000]. + */ maxNumOfCandidatesReturned?: number; + /** + * Similar face searching mode. It can be "matchPerson" or "matchFace". Possible values include: + * 'matchPerson', 'matchFace' + */ mode?: string; } /** - * @class - * Initializes a new instance of the SimilarFace class. - * @constructor * Response body for find similar face operation. - * - * @property {uuid} [faceId] FaceId of candidate face when find by faceIds. - * faceId is created by Face - Detect and will expire 24 hours after the - * detection call - * @property {uuid} [persistedFaceId] PersistedFaceId of candidate face when - * find by faceListId. persistedFaceId in face list is persisted and will not - * expire. As showed in below response - * @property {number} confidence Similarity confidence of the candidate face. - * The higher confidence, the more similar. Range between [0,1]. - */ +*/ export interface SimilarFace { + /** + * FaceId of candidate face when find by faceIds. faceId is created by Face - Detect and will + * expire 24 hours after the detection call + */ faceId?: string; + /** + * PersistedFaceId of candidate face when find by faceListId. persistedFaceId in face list is + * persisted and will not expire. As showed in below response + */ persistedFaceId?: string; + /** + * Similarity confidence of the candidate face. The higher confidence, the more similar. Range + * between [0,1]. + */ confidence: number; } /** - * @class - * Initializes a new instance of the GroupRequest class. - * @constructor * Request body for group request. - * - * @property {array} faceIds Array of candidate faceId created by Face - - * Detect. The maximum is 1000 faces - */ +*/ export interface GroupRequest { + /** + * Array of candidate faceId created by Face - Detect. The maximum is 1000 faces + */ faceIds: string[]; } /** - * @class - * Initializes a new instance of the GroupResult class. - * @constructor * An array of face groups based on face similarity. - * - * @property {array} groups A partition of the original faces based on face - * similarity. Groups are ranked by number of faces - * @property {array} [messyGroup] Face ids array of faces that cannot find any - * similar faces from original faces. - */ +*/ export interface GroupResult { + /** + * A partition of the original faces based on face similarity. Groups are ranked by number of + * faces + */ groups: string[][]; + /** + * Face ids array of faces that cannot find any similar faces from original faces. + */ messyGroup?: string[]; } /** - * @class - * Initializes a new instance of the IdentifyRequest class. - * @constructor * Request body for identify face operation. - * - * @property {array} faceIds Array of query faces faceIds, created by the Face - * - Detect. Each of the faces are identified independently. The valid number - * of faceIds is between [1, 10]. - * @property {string} [personGroupId] PersonGroupId of the target person group, - * created by PersonGroup - Create. Parameter personGroupId and - * largePersonGroupId should not be provided at the same time. - * @property {string} [largePersonGroupId] LargePersonGroupId of the target - * large person group, created by LargePersonGroup - Create. Parameter - * personGroupId and largePersonGroupId should not be provided at the same - * time. - * @property {number} [maxNumOfCandidatesReturned] The range of - * maxNumOfCandidatesReturned is between 1 and 5 (default is 1). Default value: - * 1 . - * @property {number} [confidenceThreshold] Confidence threshold of - * identification, used to judge whether one face belong to one person. The - * range of confidenceThreshold is [0, 1] (default specified by algorithm). - */ +*/ export interface IdentifyRequest { + /** + * Array of query faces faceIds, created by the Face - Detect. Each of the faces are identified + * independently. The valid number of faceIds is between [1, 10]. + */ faceIds: string[]; + /** + * PersonGroupId of the target person group, created by PersonGroup - Create. Parameter + * personGroupId and largePersonGroupId should not be provided at the same time. + */ personGroupId?: string; + /** + * LargePersonGroupId of the target large person group, created by LargePersonGroup - Create. + * Parameter personGroupId and largePersonGroupId should not be provided at the same time. + */ largePersonGroupId?: string; + /** + * The range of maxNumOfCandidatesReturned is between 1 and 5 (default is 1). + */ maxNumOfCandidatesReturned?: number; + /** + * Confidence threshold of identification, used to judge whether one face belong to one person. + * The range of confidenceThreshold is [0, 1] (default specified by algorithm). + */ confidenceThreshold?: number; } /** - * @class - * Initializes a new instance of the IdentifyCandidate class. - * @constructor * All possible faces that may qualify. - * - * @property {uuid} personId Id of candidate - * @property {number} confidence Confidence threshold of identification, used - * to judge whether one face belong to one person. The range of - * confidenceThreshold is [0, 1] (default specified by algorithm). - */ +*/ export interface IdentifyCandidate { + /** + * Id of candidate + */ personId: string; + /** + * Confidence threshold of identification, used to judge whether one face belong to one person. + * The range of confidenceThreshold is [0, 1] (default specified by algorithm). + */ confidence: number; } /** - * @class - * Initializes a new instance of the IdentifyResult class. - * @constructor * Response body for identify face operation. - * - * @property {uuid} faceId FaceId of the query face - * @property {array} candidates Identified person candidates for that face - * (ranked by confidence). Array size should be no larger than input - * maxNumOfCandidatesReturned. If no person is identified, will return an empty - * array. - */ +*/ export interface IdentifyResult { + /** + * FaceId of the query face + */ faceId: string; + /** + * Identified person candidates for that face (ranked by confidence). Array size should be no + * larger than input maxNumOfCandidatesReturned. If no person is identified, will return an empty + * array. + */ candidates: IdentifyCandidate[]; } /** - * @class - * Initializes a new instance of the VerifyFaceToPersonRequest class. - * @constructor * Request body for face to person verification. - * - * @property {uuid} faceId FaceId of the face, comes from Face - Detect - * @property {string} [personGroupId] Using existing personGroupId and personId - * for fast loading a specified person. personGroupId is created in PersonGroup - * - Create. Parameter personGroupId and largePersonGroupId should not be - * provided at the same time. - * @property {string} [largePersonGroupId] Using existing largePersonGroupId - * and personId for fast loading a specified person. largePersonGroupId is - * created in LargePersonGroup - Create. Parameter personGroupId and - * largePersonGroupId should not be provided at the same time. - * @property {uuid} personId Specify a certain person in a person group or a - * large person group. personId is created in PersonGroup Person - Create or - * LargePersonGroup Person - Create. - */ +*/ export interface VerifyFaceToPersonRequest { + /** + * FaceId of the face, comes from Face - Detect + */ faceId: string; + /** + * Using existing personGroupId and personId for fast loading a specified person. personGroupId + * is created in PersonGroup - Create. Parameter personGroupId and largePersonGroupId should not + * be provided at the same time. + */ personGroupId?: string; + /** + * Using existing largePersonGroupId and personId for fast loading a specified person. + * largePersonGroupId is created in LargePersonGroup - Create. Parameter personGroupId and + * largePersonGroupId should not be provided at the same time. + */ largePersonGroupId?: string; + /** + * Specify a certain person in a person group or a large person group. personId is created in + * PersonGroup Person - Create or LargePersonGroup Person - Create. + */ personId: string; } /** - * @class - * Initializes a new instance of the VerifyFaceToFaceRequest class. - * @constructor * Request body for face to face verification. - * - * @property {uuid} faceId1 FaceId of the first face, comes from Face - Detect - * @property {uuid} faceId2 FaceId of the second face, comes from Face - Detect - */ +*/ export interface VerifyFaceToFaceRequest { + /** + * FaceId of the first face, comes from Face - Detect + */ faceId1: string; + /** + * FaceId of the second face, comes from Face - Detect + */ faceId2: string; } /** - * @class - * Initializes a new instance of the VerifyResult class. - * @constructor * Result of the verify operation. - * - * @property {boolean} isIdentical True if the two faces belong to the same - * person or the face belongs to the person, otherwise false. - * @property {number} confidence A number indicates the similarity confidence - * of whether two faces belong to the same person, or whether the face belongs - * to the person. By default, isIdentical is set to True if similarity - * confidence is greater than or equal to 0.5. This is useful for advanced - * users to override "isIdentical" and fine-tune the result on their own data. - */ +*/ export interface VerifyResult { + /** + * True if the two faces belong to the same person or the face belongs to the person, otherwise + * false. + */ isIdentical: boolean; + /** + * A number indicates the similarity confidence of whether two faces belong to the same person, + * or whether the face belongs to the person. By default, isIdentical is set to True if + * similarity confidence is greater than or equal to 0.5. This is useful for advanced users to + * override "isIdentical" and fine-tune the result on their own data. + */ confidence: number; } /** - * @class - * Initializes a new instance of the PersistedFace class. - * @constructor * PersonFace object. - * - * @property {uuid} persistedFaceId The persistedFaceId of the target face, - * which is persisted and will not expire. Different from faceId created by - * Face - Detect and will expire in 24 hours after the detection call. - * @property {string} [userData] User-provided data attached to the face. The - * size limit is 1KB. - */ +*/ export interface PersistedFace { + /** + * The persistedFaceId of the target face, which is persisted and will not expire. Different from + * faceId created by Face - Detect and will expire in 24 hours after the detection call. + */ persistedFaceId: string; + /** + * User-provided data attached to the face. The size limit is 1KB. + */ userData?: string; } /** - * @class - * Initializes a new instance of the NameAndUserDataContract class. - * @constructor * A combination of user defined name and user specified data for the person, * largePersonGroup/personGroup, and largeFaceList/faceList. - * - * @property {string} [name] User defined name, maximum length is 128. - * @property {string} [userData] User specified data. Length should not exceed - * 16KB. - */ +*/ export interface NameAndUserDataContract { + /** + * User defined name, maximum length is 128. + */ name?: string; + /** + * User specified data. Length should not exceed 16KB. + */ userData?: string; } /** - * @class - * Initializes a new instance of the FaceList class. - * @constructor * Face list object. - * - * @property {string} faceListId FaceListId of the target face list. - * @property {array} [persistedFaces] Persisted faces within the face list. - */ +*/ export interface FaceList extends NameAndUserDataContract { + /** + * FaceListId of the target face list. + */ faceListId: string; + /** + * Persisted faces within the face list. + */ persistedFaces?: PersistedFace[]; } /** - * @class - * Initializes a new instance of the PersonGroup class. - * @constructor * Person group object. - * - * @property {string} personGroupId PersonGroupId of the target person group. - */ +*/ export interface PersonGroup extends NameAndUserDataContract { + /** + * PersonGroupId of the target person group. + */ personGroupId: string; } /** - * @class - * Initializes a new instance of the Person class. - * @constructor * Person object. - * - * @property {uuid} personId PersonId of the target face list. - * @property {array} [persistedFaceIds] PersistedFaceIds of registered faces in - * the person. These persistedFaceIds are returned from Person - Add a Person - * Face, and will not expire. - */ +*/ export interface Person extends NameAndUserDataContract { + /** + * PersonId of the target face list. + */ personId: string; + /** + * PersistedFaceIds of registered faces in the person. These persistedFaceIds are returned from + * Person - Add a Person Face, and will not expire. + */ persistedFaceIds?: string[]; } /** - * @class - * Initializes a new instance of the LargeFaceList class. - * @constructor * Large face list object. - * - * @property {string} largeFaceListId LargeFaceListId of the target large face - * list. - */ +*/ export interface LargeFaceList extends NameAndUserDataContract { + /** + * LargeFaceListId of the target large face list. + */ largeFaceListId: string; } /** - * @class - * Initializes a new instance of the LargePersonGroup class. - * @constructor * Large person group object. - * - * @property {string} largePersonGroupId LargePersonGroupId of the target large - * person groups - */ +*/ export interface LargePersonGroup extends NameAndUserDataContract { + /** + * LargePersonGroupId of the target large person groups + */ largePersonGroupId: string; } /** - * @class - * Initializes a new instance of the UpdateFaceRequest class. - * @constructor * Request to update face data. - * - * @property {string} [userData] User-provided data attached to the face. The - * size limit is 1KB. - */ +*/ export interface UpdateFaceRequest { + /** + * User-provided data attached to the face. The size limit is 1KB. + */ userData?: string; } /** - * @class - * Initializes a new instance of the TrainingStatus class. - * @constructor * Training status object. - * - * @property {string} status Training status: notstarted, running, succeeded, - * failed. If the training process is waiting to perform, the status is - * notstarted. If the training is ongoing, the status is running. Status - * succeed means this person group or large person group is ready for Face - - * Identify, or this large face list is ready for Face - Find Similar. Status - * failed is often caused by no person or no persisted face exist in the person - * group or large person group, or no persisted face exist in the large face - * list. Possible values include: 'nonstarted', 'running', 'succeeded', - * 'failed' - * @property {date} created A combined UTC date and time string that describes - * the created time of the person group, large person group or large face list. - * @property {date} [lastAction] A combined UTC date and time string that - * describes the last modify time of the person group, large person group or - * large face list, could be null value when the group is not successfully - * trained. - * @property {date} [lastSuccessfulTraining] A combined UTC date and time - * string that describes the last successful training time of the person group, - * large person group or large face list. - * @property {string} [message] Show failure message when training failed - * (omitted when training succeed). - */ +*/ export interface TrainingStatus { + /** + * Training status: notstarted, running, succeeded, failed. If the training process is waiting to + * perform, the status is notstarted. If the training is ongoing, the status is running. Status + * succeed means this person group or large person group is ready for Face - Identify, or this + * large face list is ready for Face - Find Similar. Status failed is often caused by no person + * or no persisted face exist in the person group or large person group, or no persisted face + * exist in the large face list. Possible values include: 'nonstarted', 'running', 'succeeded', + * 'failed' + */ status: string; + /** + * A combined UTC date and time string that describes the created time of the person group, large + * person group or large face list. + */ created: Date; + /** + * A combined UTC date and time string that describes the last modify time of the person group, + * large person group or large face list, could be null value when the group is not successfully + * trained. + */ lastAction?: Date; + /** + * A combined UTC date and time string that describes the last successful training time of the + * person group, large person group or large face list. + */ lastSuccessfulTraining?: Date; + /** + * Show failure message when training failed (omitted when training succeed). + */ message?: string; } -/** - * @class - * Initializes a new instance of the ImageUrl class. - * @constructor - * @property {string} url Publicly reachable URL of an image - */ export interface ImageUrl { + /** + * Publicly reachable URL of an image + */ url: string; } diff --git a/lib/services/cognitiveServicesFace/lib/models/largeFaceList.js b/lib/services/cognitiveServicesFace/lib/models/largeFaceList.js index 8daaacfdf5..6869490bcc 100644 --- a/lib/services/cognitiveServicesFace/lib/models/largeFaceList.js +++ b/lib/services/cognitiveServicesFace/lib/models/largeFaceList.js @@ -66,7 +66,7 @@ class LargeFaceList extends models['NameAndUserDataContract'] { serializedName: 'largeFaceListId', constraints: { MaxLength: 64, - Pattern: '^[a-z0-9-_]+$' + Pattern: /^[a-z0-9-_]+$/ }, type: { name: 'String' diff --git a/lib/services/cognitiveServicesFace/lib/models/largePersonGroup.js b/lib/services/cognitiveServicesFace/lib/models/largePersonGroup.js index fb03f2fef2..85ea84d0e3 100644 --- a/lib/services/cognitiveServicesFace/lib/models/largePersonGroup.js +++ b/lib/services/cognitiveServicesFace/lib/models/largePersonGroup.js @@ -66,7 +66,7 @@ class LargePersonGroup extends models['NameAndUserDataContract'] { serializedName: 'largePersonGroupId', constraints: { MaxLength: 64, - Pattern: '^[a-z0-9-_]+$' + Pattern: /^[a-z0-9-_]+$/ }, type: { name: 'String' diff --git a/lib/services/cognitiveServicesFace/lib/models/personGroup.js b/lib/services/cognitiveServicesFace/lib/models/personGroup.js index 8a29bb25d3..4b04ac0dbd 100644 --- a/lib/services/cognitiveServicesFace/lib/models/personGroup.js +++ b/lib/services/cognitiveServicesFace/lib/models/personGroup.js @@ -65,7 +65,7 @@ class PersonGroup extends models['NameAndUserDataContract'] { serializedName: 'personGroupId', constraints: { MaxLength: 64, - Pattern: '^[a-z0-9-_]+$' + Pattern: /^[a-z0-9-_]+$/ }, type: { name: 'String' diff --git a/lib/services/cognitiveServicesFace/lib/models/verifyFaceToPersonRequest.js b/lib/services/cognitiveServicesFace/lib/models/verifyFaceToPersonRequest.js index 8893e5bcf0..250e68a9ec 100644 --- a/lib/services/cognitiveServicesFace/lib/models/verifyFaceToPersonRequest.js +++ b/lib/services/cognitiveServicesFace/lib/models/verifyFaceToPersonRequest.js @@ -59,7 +59,7 @@ class VerifyFaceToPersonRequest { serializedName: 'personGroupId', constraints: { MaxLength: 64, - Pattern: '^[a-z0-9-_]+$' + Pattern: /^[a-z0-9-_]+$/ }, type: { name: 'String' @@ -70,7 +70,7 @@ class VerifyFaceToPersonRequest { serializedName: 'largePersonGroupId', constraints: { MaxLength: 64, - Pattern: '^[a-z0-9-_]+$' + Pattern: /^[a-z0-9-_]+$/ }, type: { name: 'String' diff --git a/lib/services/cognitiveServicesFace/lib/operations/faceListOperations.js b/lib/services/cognitiveServicesFace/lib/operations/faceListOperations.js index 4a07e8019a..0aec0bad7e 100644 --- a/lib/services/cognitiveServicesFace/lib/operations/faceListOperations.js +++ b/lib/services/cognitiveServicesFace/lib/operations/faceListOperations.js @@ -715,7 +715,7 @@ function _list(options, callback) { } /** - * Delete an existing face from a face list (given by a persisitedFaceId and a + * Delete an existing face from a face list (given by a persistedFaceId and a * faceListId). Persisted image related to the face will also be deleted. * * @param {string} faceListId Id referencing a particular face list. @@ -1661,7 +1661,7 @@ class FaceListOperations { } /** - * Delete an existing face from a face list (given by a persisitedFaceId and a + * Delete an existing face from a face list (given by a persistedFaceId and a * faceListId). Persisted image related to the face will also be deleted. * * @param {string} faceListId Id referencing a particular face list. @@ -1695,7 +1695,7 @@ class FaceListOperations { } /** - * Delete an existing face from a face list (given by a persisitedFaceId and a + * Delete an existing face from a face list (given by a persistedFaceId and a * faceListId). Persisted image related to the face will also be deleted. * * @param {string} faceListId Id referencing a particular face list. diff --git a/lib/services/cognitiveServicesFace/lib/operations/index.d.ts b/lib/services/cognitiveServicesFace/lib/operations/index.d.ts index 2533bf0007..037cbaabe3 100644 --- a/lib/services/cognitiveServicesFace/lib/operations/index.d.ts +++ b/lib/services/cognitiveServicesFace/lib/operations/index.d.ts @@ -2021,7 +2021,7 @@ export interface FaceListOperations { /** - * Delete an existing face from a face list (given by a persisitedFaceId and a + * Delete an existing face from a face list (given by a persistedFaceId and a * faceListId). Persisted image related to the face will also be deleted. * * @param {string} faceListId Id referencing a particular face list. @@ -2043,7 +2043,7 @@ export interface FaceListOperations { deleteFaceWithHttpOperationResponse(faceListId: string, persistedFaceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Delete an existing face from a face list (given by a persisitedFaceId and a + * Delete an existing face from a face list (given by a persistedFaceId and a * faceListId). Persisted image related to the face will also be deleted. * * @param {string} faceListId Id referencing a particular face list. @@ -3825,7 +3825,7 @@ export interface LargeFaceListOperations { /** - * Delete an existing face from a large face list (given by a persisitedFaceId + * Delete an existing face from a large face list (given by a persistedFaceId * and a largeFaceListId). Persisted image related to the face will also be * deleted. * @@ -3848,7 +3848,7 @@ export interface LargeFaceListOperations { deleteFaceWithHttpOperationResponse(largeFaceListId: string, persistedFaceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Delete an existing face from a large face list (given by a persisitedFaceId + * Delete an existing face from a large face list (given by a persistedFaceId * and a largeFaceListId). Persisted image related to the face will also be * deleted. * diff --git a/lib/services/cognitiveServicesFace/lib/operations/largeFaceListOperations.js b/lib/services/cognitiveServicesFace/lib/operations/largeFaceListOperations.js index f263e3e763..0f91439d76 100644 --- a/lib/services/cognitiveServicesFace/lib/operations/largeFaceListOperations.js +++ b/lib/services/cognitiveServicesFace/lib/operations/largeFaceListOperations.js @@ -964,7 +964,7 @@ function _train(largeFaceListId, options, callback) { } /** - * Delete an existing face from a large face list (given by a persisitedFaceId + * Delete an existing face from a large face list (given by a persistedFaceId * and a largeFaceListId). Persisted image related to the face will also be * deleted. * @@ -2557,7 +2557,7 @@ class LargeFaceListOperations { } /** - * Delete an existing face from a large face list (given by a persisitedFaceId + * Delete an existing face from a large face list (given by a persistedFaceId * and a largeFaceListId). Persisted image related to the face will also be * deleted. * @@ -2592,7 +2592,7 @@ class LargeFaceListOperations { } /** - * Delete an existing face from a large face list (given by a persisitedFaceId + * Delete an existing face from a large face list (given by a persistedFaceId * and a largeFaceListId). Persisted image related to the face will also be * deleted. *