Skip to content
This repository was archived by the owner on May 5, 2023. It is now read-only.
Merged
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
42 changes: 21 additions & 21 deletions lib/services/face/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
The MIT License (MIT)

Copyright (c) 2017 Microsoft

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
The MIT License (MIT)
Copyright (c) 2018 Microsoft
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
48 changes: 48 additions & 0 deletions lib/services/face/lib/faceClient.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* 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 { ServiceClient, ServiceClientOptions, ServiceClientCredentials } from 'ms-rest';
import * as models from "./models";
import * as operations from "./operations";

export default class FaceClient extends ServiceClient {
/**
* @class
* Initializes a new instance of the FaceClient class.
* @constructor
*
* @param {credentials} credentials - Subscription credentials which uniquely identify client subscription.
*
* @param {string} endpoint - Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com).
*
* @param {object} [options] - The parameter options
*
* @param {Array} [options.filters] - Filters to be added to the request pipeline
*
* @param {object} [options.requestOptions] - Options for the underlying request object
* {@link https://github.com/request/request#requestoptions-callback Options doc}
*
* @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy
*
*/
constructor(credentials: ServiceClientCredentials, endpoint: string, options?: ServiceClientOptions);

credentials: ServiceClientCredentials;

endpoint: string;

// Operation groups
face: operations.Face;
personGroupPerson: operations.PersonGroupPerson;
personGroupOperations: operations.PersonGroupOperations;
faceListOperations: operations.FaceListOperations;
}

export { FaceClient, models as FaceModels };
67 changes: 67 additions & 0 deletions lib/services/face/lib/faceClient.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/*
* 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.
*/

/* jshint latedef:false */
/* jshint forin:false */
/* jshint noempty:false */

'use strict';

const msRest = require('ms-rest');
const ServiceClient = msRest.ServiceClient;

const models = require('./models');
const operations = require('./operations');


/** Class representing a FaceClient. */
class FaceClient extends ServiceClient {
/**
* Create a FaceClient.
* @param {credentials} credentials - Subscription credentials which uniquely identify client subscription.
* @param {string} endpoint - Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com).
* @param {object} [options] - The parameter options
* @param {Array} [options.filters] - Filters to be added to the request pipeline
* @param {object} [options.requestOptions] - Options for the underlying request object
* {@link https://github.com/request/request#requestoptions-callback Options doc}
* @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy
*/
constructor(credentials, endpoint, options) {
if (credentials === null || credentials === undefined) {
throw new Error('\'credentials\' cannot be null.');
}
if (endpoint === null || endpoint === undefined) {
throw new Error('\'endpoint\' cannot be null.');
}

if (!options) options = {};

super(credentials, options);

this.baseUri = '{Endpoint}/face/v1.0';
this.credentials = credentials;
this.endpoint = endpoint;

let packageInfo = this.getPackageJsonInfo(__dirname);
this.addUserAgentInfo(`${packageInfo.name}/${packageInfo.version}`);
this.face = new operations.Face(this);
this.personGroupPerson = new operations.PersonGroupPerson(this);
this.personGroupOperations = new operations.PersonGroupOperations(this);
this.faceListOperations = new operations.FaceListOperations(this);
this.models = models;
msRest.addSerializationMixin(this);
}

}

module.exports = FaceClient;
module.exports['default'] = FaceClient;
module.exports.FaceClient = FaceClient;
module.exports.FaceModels = models;
62 changes: 62 additions & 0 deletions lib/services/face/lib/models/accessory.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/*
* 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.
*/

'use strict';

/**
* Accessory item and corresponding confidence level.
*
*/
class Accessory {
/**
* Create a Accessory.
* @member {string} [type] Type of an accessory. Possible values include:
* 'headWear', 'glasses', 'mask'
* @member {number} [confidence] Confidence level of an accessory
*/
constructor() {
}

/**
* Defines the metadata of Accessory
*
* @returns {object} metadata of Accessory
*
*/
mapper() {
return {
required: false,
serializedName: 'Accessory',
type: {
name: 'Composite',
className: 'Accessory',
modelProperties: {
type: {
required: false,
serializedName: 'type',
type: {
name: 'Enum',
allowedValues: [ 'headWear', 'glasses', 'mask' ]
}
},
confidence: {
required: false,
serializedName: 'confidence',
type: {
name: 'Number'
}
}
}
}
};
}
}

module.exports = Accessory;
63 changes: 63 additions & 0 deletions lib/services/face/lib/models/blur.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/*
* 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.
*/

'use strict';

/**
* Properties describing any presence of blur within the image.
*
*/
class Blur {
/**
* Create a Blur.
* @member {string} [blurLevel] An enum value indicating level of blurriness.
* Possible values include: 'Low', 'Medium', 'High'
* @member {number} [value] A number indicating level of blurriness ranging
* from 0 to 1.
*/
constructor() {
}

/**
* Defines the metadata of Blur
*
* @returns {object} metadata of Blur
*
*/
mapper() {
return {
required: false,
serializedName: 'Blur',
type: {
name: 'Composite',
className: 'Blur',
modelProperties: {
blurLevel: {
required: false,
serializedName: 'blurLevel',
type: {
name: 'Enum',
allowedValues: [ 'Low', 'Medium', 'High' ]
}
},
value: {
required: false,
serializedName: 'value',
type: {
name: 'Number'
}
}
}
}
};
}
}

module.exports = Blur;
60 changes: 60 additions & 0 deletions lib/services/face/lib/models/coordinate.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/*
* 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.
*/

'use strict';

/**
* Coordinates within an image
*
*/
class Coordinate {
/**
* Create a Coordinate.
* @member {number} x The horizontal component, in pixels.
* @member {number} y The vertical component, in pixels.
*/
constructor() {
}

/**
* Defines the metadata of Coordinate
*
* @returns {object} metadata of Coordinate
*
*/
mapper() {
return {
required: false,
serializedName: 'Coordinate',
type: {
name: 'Composite',
className: 'Coordinate',
modelProperties: {
x: {
required: true,
serializedName: 'x',
type: {
name: 'Number'
}
},
y: {
required: true,
serializedName: 'y',
type: {
name: 'Number'
}
}
}
}
};
}
}

module.exports = Coordinate;
Loading