Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(credentials: msRest.ServiceClientCredentials, options?: Models.VideoSearchClientOptions) {
if (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.endpoint = 'https://api.cognitive.microsoft.com';
this.baseUri = "{Endpoint}/bing/v7.0";
this.requestContentType = "application/json; charset=utf-8";
this.credentials = credentials;
if (options.endpoint !== null && options.endpoint !== undefined) {
this.endpoint = options.endpoint;
}
}
}
constructor(credentials: msRest.ServiceClientCredentials, endpoint: string, options?: msRest.ServiceClientOptions) {
if (endpoint == undefined) {
throw new Error("'endpoint' cannot be null.");
}
if (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}/anomalydetector/v1.0";
this.requestContentType = "application/json; charset=utf-8";
this.endpoint = endpoint;
this.credentials = credentials;
}
}
constructor(credentials: msRest.ServiceClientCredentials, options?: Models.AzureOpcTwinClientOptions) {
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 = options.baseUri || this.baseUri || "http://localhost";
this.requestContentType = "application/json-patch+json; charset=utf-8";
this.credentials = credentials;
}
}
constructor(apiKey: string, endpoint: string, options?: msRest.ServiceClientOptions) {
if (apiKey == undefined) {
throw new Error("'apiKey' cannot be null.");
}
if (endpoint == undefined) {
throw new Error("'endpoint' cannot be null.");
}
if (!options) {
options = {};
}
if (!options.userAgent) {
const defaultUserAgent = msRest.getDefaultUserAgentValue();
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
}
super(undefined, options);
this.baseUri = "{Endpoint}/customvision/v3.0/prediction";
this.requestContentType = "application/json; charset=utf-8";
this.apiKey = apiKey;
this.endpoint = endpoint;
}
}
constructor(credentials: msRest.ServiceClientCredentials, options?: Models.EntitySearchClientOptions) {
if (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.endpoint = 'https://api.cognitive.microsoft.com';
this.baseUri = "{Endpoint}/bing/v7.0";
this.requestContentType = "application/json; charset=utf-8";
this.credentials = credentials;
if (options.endpoint !== null && options.endpoint !== undefined) {
this.endpoint = options.endpoint;
}
}
}
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;
}
}
constructor(credentials: msRest.ServiceClientCredentials, options?: Models.AutoSuggestClientOptions) {
if (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.endpoint = 'https://api.cognitive.microsoft.com';
this.baseUri = "{Endpoint}/bing/v7.0";
this.requestContentType = "application/json; charset=utf-8";
this.credentials = credentials;
if (options.endpoint !== null && options.endpoint !== undefined) {
this.endpoint = options.endpoint;
}
}
}
constructor(options?: Models.LeifDbClientAPIOptions) {
if (!options) {
options = {};
}
if (!options.userAgent) {
const defaultUserAgent = msRest.getDefaultUserAgentValue();
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
}
super(undefined, options);
this.baseUri = options.baseUri || this.baseUri || "http://localhost";
this.requestContentType = "application/json; charset=utf-8";
}
}
constructor(credentials: msRest.ServiceClientCredentials, options?: Models.VideoSearchClientOptions) {
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.endpoint = 'https://api.cognitive.microsoft.com';
this.baseUri = "{Endpoint}";
this.requestContentType = "application/json; charset=utf-8";
this.credentials = credentials;
if(options.endpoint !== null && options.endpoint !== undefined) {
this.endpoint = options.endpoint;
}
}
}
constructor(credentials: msRest.ServiceClientCredentials, endpoint: string, options?: msRest.ServiceClientOptions) {
if (endpoint == undefined) {
throw new Error("'endpoint' cannot be null.");
}
if (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}/formrecognizer/v1.0-preview";
this.requestContentType = "application/json; charset=utf-8";
this.endpoint = endpoint;
this.credentials = credentials;
}
}