Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

[AutoPR cognitiveservices/data-plane/ContentModerator] Add SSN parameter #2666

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/contentModerator/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.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
*/

import { ServiceClient, ServiceClientOptions, ServiceClientCredentials } from 'ms-rest';
import * as models from "./models";
import * as operations from "./operations";

declare class ContentModeratorAPIClient extends ServiceClient {
export default class ContentModeratorAPIClient extends ServiceClient {
/**
* @class
* Initializes a new instance of the ContentModeratorAPIClient class.
Expand Down Expand Up @@ -47,4 +48,4 @@ declare class ContentModeratorAPIClient extends ServiceClient {
reviews: operations.Reviews;
}

export = ContentModeratorAPIClient;
export { ContentModeratorAPIClient, models as ContentModeratorAPIModels };
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,6 @@ class ContentModeratorAPIClient extends ServiceClient {
}

module.exports = ContentModeratorAPIClient;
module.exports['default'] = ContentModeratorAPIClient;
module.exports.ContentModeratorAPIClient = ContentModeratorAPIClient;
module.exports.ContentModeratorAPIModels = models;
38 changes: 26 additions & 12 deletions lib/services/contentModerator/lib/models/classification.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,27 @@

'use strict';

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

/**
* The classification details of the text.
*
*/
class Classification {
/**
* Create a Classification.
* @member {number} [adultScore] The adult score.
* @member {number} [racyScore] The racy score.
* @member {number} [offensiveScore] The offensive score.
* @member {object} [category1] The category1 score details of the text. <a
* href="https://aka.ms/textClassifyCategories">Click here</a> for more
* details on category classification.
* @member {number} [category1.score] The category1 score.
* @member {object} [category2] The category2 score details of the text. <a
* href="https://aka.ms/textClassifyCategories">Click here</a> for more
* details on category classification.
* @member {number} [category2.score] The category2 score.
* @member {object} [category3] The category3 score details of the text. <a
* href="https://aka.ms/textClassifyCategories">Click here</a> for more
* details on category classification.
* @member {number} [category3.score] The category3 score.
* @member {boolean} [reviewRecommended] The review recommended flag.
*/
constructor() {
Expand All @@ -39,25 +50,28 @@ class Classification {
name: 'Composite',
className: 'Classification',
modelProperties: {
adultScore: {
category1: {
required: false,
serializedName: 'AdultScore',
serializedName: 'Category1',
type: {
name: 'Number'
name: 'Composite',
className: 'ClassificationCategory1'
}
},
racyScore: {
category2: {
required: false,
serializedName: 'RacyScore',
serializedName: 'Category2',
type: {
name: 'Number'
name: 'Composite',
className: 'ClassificationCategory2'
}
},
offensiveScore: {
category3: {
required: false,
serializedName: 'OffensiveScore',
serializedName: 'Category3',
type: {
name: 'Number'
name: 'Composite',
className: 'ClassificationCategory3'
}
},
reviewRecommended: {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/*
* 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';

/**
* The category1 score details of the text. <a
* href="https://aka.ms/textClassifyCategories">Click here</a> for more details
* on category classification.
*
*/
class ClassificationCategory1 {
/**
* Create a ClassificationCategory1.
* @member {number} [score] The category1 score.
*/
constructor() {
}

/**
* Defines the metadata of ClassificationCategory1
*
* @returns {object} metadata of ClassificationCategory1
*
*/
mapper() {
return {
required: false,
serializedName: 'Classification_Category1',
type: {
name: 'Composite',
className: 'ClassificationCategory1',
modelProperties: {
score: {
required: false,
serializedName: 'Score',
type: {
name: 'Number'
}
}
}
}
};
}
}

module.exports = ClassificationCategory1;
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/*
* 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';

/**
* The category2 score details of the text. <a
* href="https://aka.ms/textClassifyCategories">Click here</a> for more details
* on category classification.
*
*/
class ClassificationCategory2 {
/**
* Create a ClassificationCategory2.
* @member {number} [score] The category2 score.
*/
constructor() {
}

/**
* Defines the metadata of ClassificationCategory2
*
* @returns {object} metadata of ClassificationCategory2
*
*/
mapper() {
return {
required: false,
serializedName: 'Classification_Category2',
type: {
name: 'Composite',
className: 'ClassificationCategory2',
modelProperties: {
score: {
required: false,
serializedName: 'Score',
type: {
name: 'Number'
}
}
}
}
};
}
}

module.exports = ClassificationCategory2;
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/*
* 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';

/**
* The category3 score details of the text. <a
* href="https://aka.ms/textClassifyCategories">Click here</a> for more details
* on category classification.
*
*/
class ClassificationCategory3 {
/**
* Create a ClassificationCategory3.
* @member {number} [score] The category3 score.
*/
constructor() {
}

/**
* Defines the metadata of ClassificationCategory3
*
* @returns {object} metadata of ClassificationCategory3
*
*/
mapper() {
return {
required: false,
serializedName: 'Classification_Category3',
type: {
name: 'Composite',
className: 'ClassificationCategory3',
modelProperties: {
score: {
required: false,
serializedName: 'Score',
type: {
name: 'Number'
}
}
}
}
};
}
}

module.exports = ClassificationCategory3;
Loading