Skip to content
This repository was archived by the owner on May 5, 2023. It is now read-only.
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
51 changes: 51 additions & 0 deletions lib/services/contentModerator/lib/contentModeratorClient.d.ts
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 { ServiceClient, ServiceClientOptions, ServiceClientCredentials } from 'ms-rest';
import * as models from "./models";
import * as operations from "./operations";

export default class ContentModeratorClient extends ServiceClient {
/**
* @class
* Initializes a new instance of the ContentModeratorClient 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
imageModeration: operations.ImageModeration;
textModeration: operations.TextModeration;
listManagementImageLists: operations.ListManagementImageLists;
listManagementTermLists: operations.ListManagementTermLists;
listManagementImage: operations.ListManagementImage;
listManagementTerm: operations.ListManagementTerm;
reviews: operations.Reviews;
}

export { ContentModeratorClient, models as ContentModeratorModels };
70 changes: 70 additions & 0 deletions lib/services/contentModerator/lib/contentModeratorClient.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
/*
* 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 ContentModeratorClient. */
class ContentModeratorClient extends ServiceClient {
/**
* Create a ContentModeratorClient.
* @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}';
this.credentials = credentials;
this.endpoint = endpoint;

let packageInfo = this.getPackageJsonInfo(__dirname);
this.addUserAgentInfo(`${packageInfo.name}/${packageInfo.version}`);
this.imageModeration = new operations.ImageModeration(this);
this.textModeration = new operations.TextModeration(this);
this.listManagementImageLists = new operations.ListManagementImageLists(this);
this.listManagementTermLists = new operations.ListManagementTermLists(this);
this.listManagementImage = new operations.ListManagementImage(this);
this.listManagementTerm = new operations.ListManagementTerm(this);
this.reviews = new operations.Reviews(this);
this.models = models;
msRest.addSerializationMixin(this);
}

}

module.exports = ContentModeratorClient;
module.exports['default'] = ContentModeratorClient;
module.exports.ContentModeratorClient = ContentModeratorClient;
module.exports.ContentModeratorModels = models;
12 changes: 12 additions & 0 deletions lib/services/contentModerator/lib/models/imageList.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,18 @@ class ImageList {
serializedName: 'Metadata',
type: {
name: 'Composite',
additionalProperties: {
type: {
name: 'Dictionary',
value: {
required: false,
serializedName: 'StringElementType',
type: {
name: 'String'
}
}
}
},
className: 'ImageListMetadata'
}
}
Expand Down
12 changes: 12 additions & 0 deletions lib/services/contentModerator/lib/models/imageListMetadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,18 @@ class ImageListMetadata {
serializedName: 'ImageList_Metadata',
type: {
name: 'Composite',
additionalProperties: {
type: {
name: 'Dictionary',
value: {
required: false,
serializedName: 'StringElementType',
type: {
name: 'String'
}
}
}
},
className: 'ImageListMetadata',
modelProperties: {
keyOne: {
Expand Down
12 changes: 12 additions & 0 deletions lib/services/contentModerator/lib/models/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,12 @@ export interface DetectedLanguage {
export interface ImageListMetadata {
keyOne?: string;
keyTwo?: string;
/**
* @property Describes unknown properties. The value of an unknown property
* MUST be of type "string". Due to valid TS constraints we have modeled this
* as a union of `string | any`.
*/
[property: string]: string | any;
}

/**
Expand Down Expand Up @@ -561,6 +567,12 @@ export interface ImageList {
export interface TermListMetadata {
keyOne?: string;
keyTwo?: string;
/**
* @property Describes unknown properties. The value of an unknown property
* MUST be of type "string". Due to valid TS constraints we have modeled this
* as a union of `string | any`.
*/
[property: string]: string | any;
}

/**
Expand Down
12 changes: 12 additions & 0 deletions lib/services/contentModerator/lib/models/termList.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,18 @@ class TermList {
serializedName: 'Metadata',
type: {
name: 'Composite',
additionalProperties: {
type: {
name: 'Dictionary',
value: {
required: false,
serializedName: 'StringElementType',
type: {
name: 'String'
}
}
}
},
className: 'TermListMetadata'
}
}
Expand Down
12 changes: 12 additions & 0 deletions lib/services/contentModerator/lib/models/termListMetadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,18 @@ class TermListMetadata {
serializedName: 'TermList_Metadata',
type: {
name: 'Composite',
additionalProperties: {
type: {
name: 'Dictionary',
value: {
required: false,
serializedName: 'StringElementType',
type: {
name: 'String'
}
}
}
},
className: 'TermListMetadata',
modelProperties: {
keyOne: {
Expand Down
Loading