Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(subscriptionId: string, apiVersion: string, options?: Models.AutoRestValidationTestOptions) {
if (subscriptionId == undefined) {
throw new Error("'subscriptionId' cannot be null.");
}
if (apiVersion == undefined) {
throw new Error("'apiVersion' cannot be null.");
}
if (!options) {
options = {};
}
if (!options.userAgent) {
const defaultUserAgent = coreHttp.getDefaultUserAgentValue();
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
}
super(undefined, options);
this.baseUri = options.baseUri || this.baseUri || "http://localhost:3000";
this.requestContentType = "application/json; charset=utf-8";
this.subscriptionId = subscriptionId;
this.apiVersion = apiVersion;
}
}
constructor(subscriptionId: string, options?: Models.AutoRestParameterizedCustomHostTestClientOptions) {
if (subscriptionId == undefined) {
throw new Error("'subscriptionId' cannot be null.");
}
if (!options) {
options = {};
}
if (!options.userAgent) {
const defaultUserAgent = coreHttp.getDefaultUserAgentValue();
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
}
super(undefined, options);
this.dnsSuffix = 'host';
this.baseUri = "{vault}{secret}{dnsSuffix}";
this.requestContentType = "application/json; charset=utf-8";
this.subscriptionId = subscriptionId;
if (options.dnsSuffix !== null && options.dnsSuffix !== undefined) {
this.dnsSuffix = options.dnsSuffix;
}
}
}
constructor(options?: Models.AutoRestDateTimeTestServiceOptions) {
if (!options) {
options = {};
}
if (!options.userAgent) {
const defaultUserAgent = coreHttp.getDefaultUserAgentValue();
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
}
super(undefined, options);
this.baseUri = options.baseUri || this.baseUri || "http://localhost:3000";
this.requestContentType = "application/json; charset=utf-8";
}
}
constructor(options?: Models.AutoRestParameterizedHostTestClientOptions) {
if (!options) {
options = {};
}
if (!options.userAgent) {
const defaultUserAgent = coreHttp.getDefaultUserAgentValue();
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
}
super(undefined, options);
this.host = 'host';
this.baseUri = "http://{accountName}{host}";
this.requestContentType = "application/json; charset=utf-8";
if (options.host !== null && options.host !== undefined) {
this.host = options.host;
}
}
}
constructor(options?: Models.AutoRestSwaggerBATdictionaryServiceOptions) {
if (!options) {
options = {};
}
if (!options.userAgent) {
const defaultUserAgent = coreHttp.getDefaultUserAgentValue();
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
}
super(undefined, options);
this.baseUri = options.baseUri || this.baseUri || "http://localhost:3000";
this.requestContentType = "application/json; charset=utf-8";
}
}
constructor(options?: Models.ComplexModelClientOptions) {
if (!options) {
options = {};
}
if (!options.userAgent) {
const defaultUserAgent = coreHttp.getDefaultUserAgentValue();
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
}
super(undefined, options);
this.subscriptionId = '123456';
this.apiVersion = '2014-04-01-preview';
this.baseUri = options.baseUri || this.baseUri || "http://localhost:3000";
this.requestContentType = "application/json; charset=utf-8";
}
}
constructor(options?: Models.XMSErrorResponseExtensionsOptions) {
if (!options) {
options = {};
}
if (!options.userAgent) {
const defaultUserAgent = coreHttp.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(options?: Models.AutoRestSwaggerBATByteServiceOptions) {
if (!options) {
options = {};
}
if (!options.userAgent) {
const defaultUserAgent = coreHttp.getDefaultUserAgentValue();
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
}
super(undefined, options);
this.baseUri = options.baseUri || this.baseUri || "http://localhost:3000";
this.requestContentType = "application/json; charset=utf-8";
}
}
apiVersion: string,
options?: coreHttp.ServiceClientOptions
) {
if (apiVersion == undefined) {
throw new Error("'apiVersion' cannot be null.");
}
if (credentials == undefined) {
throw new Error("'credentials' cannot be null.");
}
if (!options) {
options = {};
}
if (!options.userAgent) {
const defaultUserAgent = coreHttp.getDefaultUserAgentValue();
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
}
super(credentials, options);
this.baseUri = "{vaultBaseUrl}";
this.requestContentType = "application/json; charset=utf-8";
this.apiVersion = apiVersion;
this.credentials = credentials;
}
}
apiVersion: string,
options?: coreHttp.ServiceClientOptions
) {
if (apiVersion == undefined) {
throw new Error("'apiVersion' cannot be null.");
}
if (credentials == undefined) {
throw new Error("'credentials' cannot be null.");
}
if (!options) {
options = {};
}
if (!options.userAgent) {
const defaultUserAgent = coreHttp.getDefaultUserAgentValue();
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
}
super(credentials, options);
this.baseUri = "{vaultBaseUrl}";
this.requestContentType = "application/json; charset=utf-8";
this.apiVersion = apiVersion;
this.credentials = credentials;
}
}