Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions sdk/cognitiveservices/cognitiveservices-face/lib/faceClient.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* 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.
*/

import * as msRest from "@azure/ms-rest-js";
import * as Models from "./models";
import * as Mappers from "./models/mappers";
import * as operations from "./operations";
import { FaceClientContext } from "./faceClientContext";

class FaceClient extends FaceClientContext {
// Operation groups
face: operations.Face;
personGroupPerson: operations.PersonGroupPerson;
personGroup: operations.PersonGroupOperations;
faceList: operations.FaceListOperations;
largePersonGroupPerson: operations.LargePersonGroupPerson;
largePersonGroup: operations.LargePersonGroupOperations;
largeFaceList: operations.LargeFaceListOperations;
snapshot: operations.SnapshotOperations;

/**
* Initializes a new instance of the FaceClient class.
* @param endpoint Supported Cognitive Services endpoints (protocol and hostname, for example:
* https://westus.api.cognitive.microsoft.com).
* @param credentials Subscription credentials which uniquely identify client subscription.
* @param [options] The parameter options
*/
constructor(endpoint: string, credentials: msRest.ServiceClientCredentials, options?: msRest.ServiceClientOptions) {
super(endpoint, credentials, options);
this.face = new operations.Face(this);
this.personGroupPerson = new operations.PersonGroupPerson(this);
this.personGroup = new operations.PersonGroupOperations(this);
this.faceList = new operations.FaceListOperations(this);
this.largePersonGroupPerson = new operations.LargePersonGroupPerson(this);
this.largePersonGroup = new operations.LargePersonGroupOperations(this);
this.largeFaceList = new operations.LargeFaceListOperations(this);
this.snapshot = new operations.SnapshotOperations(this);
}
}

// Operation Specifications

export {
FaceClient,
FaceClientContext,
Models as FaceModels,
Mappers as FaceMappers
};
export * from "./operations";
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* 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.
*/

import * as msRest from "@azure/ms-rest-js";

const packageName = "@azure/cognitiveservices-face";
const packageVersion = "3.0.0";

export class FaceClientContext extends msRest.ServiceClient {
endpoint: string;
credentials: msRest.ServiceClientCredentials;

/**
* Initializes a new instance of the FaceClientContext class.
* @param endpoint Supported Cognitive Services endpoints (protocol and hostname, for example:
* https://westus.api.cognitive.microsoft.com).
* @param credentials Subscription credentials which uniquely identify client subscription.
* @param [options] The parameter options
*/
constructor(endpoint: string, credentials: msRest.ServiceClientCredentials, options?: msRest.ServiceClientOptions) {
if (endpoint === null || endpoint === undefined) {
throw new Error('\'endpoint\' cannot be null.');
}
if (credentials === null || credentials === undefined) {
throw new Error('\'credentials\' cannot be null.');
}

if (!options) {
options = {};
}
if(!options.userAgent) {
const defaultUserAgent = msRest.getDefaultUserAgentValue();
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
}

super(credentials, options);

this.baseUri = "{Endpoint}";
this.requestContentType = "application/json; charset=utf-8";
this.endpoint = endpoint;
this.credentials = credentials;

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* 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.
*/

export {
MetaDataContract,
NameAndUserDataContract,
APIError,
ErrorModel,
FaceList,
PersistedFace,
ImageUrl,
PersonGroup,
Person,
LargeFaceList,
LargePersonGroup
} from "../models/mappers";

Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* 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.
*/

export {
FindSimilarRequest,
SimilarFace,
APIError,
ErrorModel,
GroupRequest,
GroupResult,
IdentifyRequest,
IdentifyResult,
IdentifyCandidate,
VerifyFaceToFaceRequest,
VerifyResult,
ImageUrl,
DetectedFace,
FaceRectangle,
FaceLandmarks,
Coordinate,
FaceAttributes,
FacialHair,
HeadPose,
Emotion,
Hair,
HairColor,
Makeup,
Occlusion,
Accessory,
Blur,
Exposure,
Noise,
VerifyFaceToPersonRequest
} from "../models/mappers";

Loading