This repository has been archived by the owner on May 5, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate azure-cognitiveservices-face package (#5053)
* Generate azure-cognitiveservices-face package * Bump the version to 3.0.0
- Loading branch information
Showing
31 changed files
with
5,766 additions
and
982 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
lib/services/cognitiveServicesFace/.scripts/postinstall.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// 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. | ||
|
||
const resetColor = "\x1b[0m"; | ||
const brightColor = "\x1b[1m"; | ||
const highlightColor = "\x1b[31m"; | ||
|
||
try { | ||
const invisibleCharactersLength = resetColor.length + brightColor.length + highlightColor.length; | ||
|
||
const firstLine = `Active development of this SDK has been moved to ${highlightColor}@azure/cognitiveservices-face${resetColor}${brightColor} package.`; | ||
const secondLine = "This package is in maintenance mode and will be deprecated in July 2019."; | ||
const thirdLine = "Visit https://aka.ms/azure-sdk-for-js-migration for more information."; | ||
|
||
const framePadding = 4; | ||
const adjustedFirstLineLength = firstLine.length - invisibleCharactersLength; | ||
const width = Math.max(adjustedFirstLineLength, secondLine.length, thirdLine.length) + framePadding; | ||
const getPaddingLength = (strLength) => width - strLength - framePadding; | ||
|
||
const firstLinePaddingLength = getPaddingLength(adjustedFirstLineLength); | ||
const secondLinePaddingLength = getPaddingLength(secondLine.length); | ||
const thirdLinePaddingLength = getPaddingLength(thirdLine.length); | ||
const line = "#".repeat(width); | ||
|
||
const formatTextLine = (text, padding) => `#${" ".repeat(Math.floor(padding / 2))} ${text} ${" ".repeat(Math.ceil(padding / 2))}#`; | ||
|
||
console.log(brightColor); | ||
console.log("\n" + line); | ||
console.log(formatTextLine(firstLine, firstLinePaddingLength)); | ||
console.log(formatTextLine(secondLine, secondLinePaddingLength)); | ||
console.log(formatTextLine(thirdLine, thirdLinePaddingLength)); | ||
console.log(line + "\n"); | ||
console.log(resetColor); | ||
} catch (err) { | ||
// ignore | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
lib/services/cognitiveServicesFace/lib/models/applySnapshotRequest.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
/* | ||
* 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'; | ||
|
||
/** | ||
* Request body for applying snapshot operation. | ||
* | ||
*/ | ||
class ApplySnapshotRequest { | ||
/** | ||
* Create a ApplySnapshotRequest. | ||
* @property {string} objectId User specified target object id to be created | ||
* from the snapshot. | ||
* @property {string} [mode] Snapshot applying mode. Currently only CreateNew | ||
* is supported, which means the apply operation will fail if target | ||
* subscription already contains an object of same type and using the same | ||
* objectId. Users can specify the "objectId" in request body to avoid such | ||
* conflicts. Possible values include: 'CreateNew'. Default value: | ||
* 'CreateNew' . | ||
*/ | ||
constructor() { | ||
} | ||
|
||
/** | ||
* Defines the metadata of ApplySnapshotRequest | ||
* | ||
* @returns {object} metadata of ApplySnapshotRequest | ||
* | ||
*/ | ||
mapper() { | ||
return { | ||
required: false, | ||
serializedName: 'ApplySnapshotRequest', | ||
type: { | ||
name: 'Composite', | ||
className: 'ApplySnapshotRequest', | ||
modelProperties: { | ||
objectId: { | ||
required: true, | ||
serializedName: 'objectId', | ||
constraints: { | ||
MaxLength: 64, | ||
Pattern: /^[a-z0-9-_]+$/ | ||
}, | ||
type: { | ||
name: 'String' | ||
} | ||
}, | ||
mode: { | ||
required: false, | ||
nullable: false, | ||
serializedName: 'mode', | ||
defaultValue: 'CreateNew', | ||
type: { | ||
name: 'Enum', | ||
allowedValues: [ 'CreateNew' ] | ||
} | ||
} | ||
} | ||
} | ||
}; | ||
} | ||
} | ||
|
||
module.exports = ApplySnapshotRequest; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.