Azure Arc extension (#10400)

Adds an extension for Azure Arc with some initial Postgres pages
This commit is contained in:
Brian Bergeron
2020-05-18 14:32:48 -07:00
committed by GitHub
parent 21b650ba49
commit 283ffd7af6
130 changed files with 11850 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
# Updating the Swagger generated clients
The TypeScript clients used to communicate with the controller are generated from the controller's Swagger specification. To update the clients:
1. Get the Swagger specification from a running controller, and save it locally:
* `https://<controller_ip>:30080/api/<api_name>/swagger.json`
2. Generate the clients:
* At the time of writing, [editor.swagger.io](https://editor.swagger.io) does not support typescript-node client generation from OpenAPI 3.x specifications. So we'll use [openapi-generator.tech](https://openapi-generator.tech) instead.
* Run openapi-generator:
* Either by [installing it](https://openapi-generator.tech/docs/installation) (requires Java) and running:
* `openapi-generator generate -i swagger.json -g typescript-node -o out --additional-properties supportsES6=true`
* Or by running the Docker image (works in Linux or PowerShell):
* `docker run --rm -v ${PWD}:/local openapitools/openapi-generator-cli generate -i /local/swagger.json -g typescript-node -o /local/out --additional-properties supportsES6=true`
3. Copy the generated clients (api.ts, api/, model/) to ./generated/<api_name>.
4. The generated clients have some unused imports. This will not compile. VS Code has an "Organize Imports" command (Shift + Alt + O) that fixes this, but it fixes a single file. To organize imports for all files in a folder, you can use the [Folder Source Actions extension](https://marketplace.visualstudio.com/items?itemName=bierner.folder-source-actions). Followed by File -> Save All.

View File

@@ -0,0 +1,77 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as request from 'request';
import * as vscode from 'vscode';
export interface Authentication {
applyToRequest(requestOptions: request.Options): Promise<void> | void;
}
class SslAuth implements Authentication {
constructor() { }
applyToRequest(requestOptions: request.Options): void {
requestOptions['agentOptions'] = {
rejectUnauthorized: !getIgnoreSslVerificationConfigSetting()
};
}
}
export class KerberosAuth extends SslAuth implements Authentication {
constructor(public kerberosToken: string) {
super();
}
applyToRequest(requestOptions: request.Options): void {
super.applyToRequest(requestOptions);
if (requestOptions && requestOptions.headers) {
requestOptions.headers['Authorization'] = `Negotiate ${this.kerberosToken}`;
}
requestOptions.auth = undefined;
}
}
export class BasicAuth extends SslAuth implements Authentication {
constructor(public username: string, public password: string) {
super();
}
applyToRequest(requestOptions: request.Options): void {
super.applyToRequest(requestOptions);
requestOptions.auth = {
username: this.username, password: this.password
};
}
}
export class OAuthWithSsl extends SslAuth implements Authentication {
constructor(public accessToken: string) {
super();
}
applyToRequest(requestOptions: request.Options): void {
super.applyToRequest(requestOptions);
if (requestOptions && requestOptions.headers) {
requestOptions.headers['Authorization'] = `Bearer ${this.accessToken}`;
}
requestOptions.auth = undefined;
}
}
/* Retrieves the current setting for whether to ignore SSL verification errors */
export function getIgnoreSslVerificationConfigSetting(): boolean {
const arcConfigSectionName = 'arc';
const ignoreSslConfigName = 'ignoreSslVerification';
try {
const config = vscode.workspace.getConfiguration(arcConfigSectionName);
return config.get<boolean>(ignoreSslConfigName, true);
} catch (error) {
console.error(`Unexpected error retrieving ${arcConfigSectionName}.${ignoreSslConfigName} setting : ${error}`);
}
return true;
}

View File

@@ -0,0 +1,3 @@
// This is the entrypoint for the package
export * from './api/apis';
export * from './model/models';

View File

@@ -0,0 +1,31 @@
export * from './databaseRouterApi';
export * from './databaseValidateRouterApi';
export * from './logsRouterApi';
export * from './metricRouterApi';
export * from './operatorRouterApi';
import * as fs from 'fs';
import * as http from 'http';
import { DatabaseRouterApi } from './databaseRouterApi';
import { DatabaseValidateRouterApi } from './databaseValidateRouterApi';
import { LogsRouterApi } from './logsRouterApi';
import { MetricRouterApi } from './metricRouterApi';
import { OperatorRouterApi } from './operatorRouterApi';
export class HttpError extends Error {
constructor (public response: http.IncomingMessage, public body: any, public statusCode?: number) {
super('HTTP request failed');
this.name = 'HttpError';
}
}
export interface RequestDetailedFile {
value: Buffer;
options?: {
filename?: string;
contentType?: string;
}
}
export type RequestFile = string | Buffer | fs.ReadStream | RequestDetailedFile;
export const APIS = [DatabaseRouterApi, DatabaseValidateRouterApi, LogsRouterApi, MetricRouterApi, OperatorRouterApi];

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,260 @@
/**
* Dusky API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import localVarRequest = require('request');
import http = require('http');
/* tslint:disable:no-unused-locals */
import { DuskyObjectModelsDatabaseService } from '../model/duskyObjectModelsDatabaseService';
import { DuskyObjectModelsDuskyValidationResult } from '../model/duskyObjectModelsDuskyValidationResult';
import { Authentication, HttpBasicAuth, HttpBearerAuth, Interceptor, ObjectSerializer, VoidAuth } from '../model/models';
import { HttpError } from './apis';
let defaultBasePath = 'https://10.135.16.138:30080';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
export enum DatabaseValidateRouterApiApiKeys {
}
export class DatabaseValidateRouterApi {
protected _basePath = defaultBasePath;
protected _defaultHeaders : any = {};
protected _useQuerystring : boolean = false;
protected authentications = {
'default': <Authentication>new VoidAuth(),
'BasicAuth': new HttpBasicAuth(),
'BearerAuth': new HttpBearerAuth(),
}
protected interceptors: Interceptor[] = [];
constructor(basePath?: string);
constructor(username: string, password: string, basePath?: string);
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
if (password) {
this.username = basePathOrUsername;
this.password = password
if (basePath) {
this.basePath = basePath;
}
} else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername
}
}
}
set useQuerystring(value: boolean) {
this._useQuerystring = value;
}
set basePath(basePath: string) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders: any) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
public setDefaultAuthentication(auth: Authentication) {
this.authentications.default = auth;
}
public setApiKey(key: DatabaseValidateRouterApiApiKeys, value: string) {
(this.authentications as any)[DatabaseValidateRouterApiApiKeys[key]].apiKey = value;
}
set username(username: string) {
this.authentications.BasicAuth.username = username;
}
set password(password: string) {
this.authentications.BasicAuth.password = password;
}
set accessToken(accessToken: string | (() => string)) {
this.authentications.BearerAuth.accessToken = accessToken;
}
public addInterceptor(interceptor: Interceptor) {
this.interceptors.push(interceptor);
}
/**
*
* @summary Validate database service creation.
* @param duskyObjectModelsDatabaseService
*/
public async validateCreateDatabaseService (duskyObjectModelsDatabaseService?: DuskyObjectModelsDatabaseService, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: DuskyObjectModelsDuskyValidationResult; }> {
const localVarPath = this.basePath + '/dusky/databases/validate';
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
const produces = ['application/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams: any = {};
(<any>Object).assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions: localVarRequest.Options = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: ObjectSerializer.serialize(duskyObjectModelsDatabaseService, "DuskyObjectModelsDatabaseService")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BasicAuth.username && this.authentications.BasicAuth.password) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BasicAuth.applyToRequest(localVarRequestOptions));
}
if (this.authentications.BearerAuth.accessToken) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerAuth.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
(<any>localVarRequestOptions).formData = localVarFormParams;
} else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise<{ response: http.IncomingMessage; body: DuskyObjectModelsDuskyValidationResult; }>((resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
} else {
body = ObjectSerializer.deserialize(body, "DuskyObjectModelsDuskyValidationResult");
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
} else {
reject(new HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
*
* @summary Validate database service update.
* @param ns The namespace of the database service.
* @param name The name of the database service to update.
* @param duskyObjectModelsDatabaseService
*/
public async validateUpdateDatabaseService (ns: string, name: string, duskyObjectModelsDatabaseService?: DuskyObjectModelsDatabaseService, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: DuskyObjectModelsDuskyValidationResult; }> {
const localVarPath = this.basePath + '/dusky/databases/validate/{ns}/{name}'
.replace('{' + 'ns' + '}', encodeURIComponent(String(ns)))
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
const produces = ['application/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams: any = {};
// verify required parameter 'ns' is not null or undefined
if (ns === null || ns === undefined) {
throw new Error('Required parameter ns was null or undefined when calling validateUpdateDatabaseService.');
}
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling validateUpdateDatabaseService.');
}
(<any>Object).assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions: localVarRequest.Options = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: ObjectSerializer.serialize(duskyObjectModelsDatabaseService, "DuskyObjectModelsDatabaseService")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BasicAuth.username && this.authentications.BasicAuth.password) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BasicAuth.applyToRequest(localVarRequestOptions));
}
if (this.authentications.BearerAuth.accessToken) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerAuth.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
(<any>localVarRequestOptions).formData = localVarFormParams;
} else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise<{ response: http.IncomingMessage; body: DuskyObjectModelsDuskyValidationResult; }>((resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
} else {
body = ObjectSerializer.deserialize(body, "DuskyObjectModelsDuskyValidationResult");
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
} else {
reject(new HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}

View File

@@ -0,0 +1,175 @@
/**
* Dusky API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import localVarRequest = require('request');
import http = require('http');
/* tslint:disable:no-unused-locals */
import { LogsRequest } from '../model/logsRequest';
import { Authentication, HttpBasicAuth, HttpBearerAuth, Interceptor, ObjectSerializer, VoidAuth } from '../model/models';
import { HttpError } from './apis';
let defaultBasePath = 'https://10.135.16.138:30080';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
export enum LogsRouterApiApiKeys {
}
export class LogsRouterApi {
protected _basePath = defaultBasePath;
protected _defaultHeaders : any = {};
protected _useQuerystring : boolean = false;
protected authentications = {
'default': <Authentication>new VoidAuth(),
'BasicAuth': new HttpBasicAuth(),
'BearerAuth': new HttpBearerAuth(),
}
protected interceptors: Interceptor[] = [];
constructor(basePath?: string);
constructor(username: string, password: string, basePath?: string);
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
if (password) {
this.username = basePathOrUsername;
this.password = password
if (basePath) {
this.basePath = basePath;
}
} else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername
}
}
}
set useQuerystring(value: boolean) {
this._useQuerystring = value;
}
set basePath(basePath: string) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders: any) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
public setDefaultAuthentication(auth: Authentication) {
this.authentications.default = auth;
}
public setApiKey(key: LogsRouterApiApiKeys, value: string) {
(this.authentications as any)[LogsRouterApiApiKeys[key]].apiKey = value;
}
set username(username: string) {
this.authentications.BasicAuth.username = username;
}
set password(password: string) {
this.authentications.BasicAuth.password = password;
}
set accessToken(accessToken: string | (() => string)) {
this.authentications.BearerAuth.accessToken = accessToken;
}
public addInterceptor(interceptor: Interceptor) {
this.interceptors.push(interceptor);
}
/**
*
* @summary Gets logs from Elasticsearch.
* @param logsRequest
*/
public async apiV1LogsPost (logsRequest?: LogsRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: object; }> {
const localVarPath = this.basePath + '/api/v1/logs';
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
const produces = ['application/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams: any = {};
(<any>Object).assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions: localVarRequest.Options = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: ObjectSerializer.serialize(logsRequest, "LogsRequest")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BasicAuth.username && this.authentications.BasicAuth.password) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BasicAuth.applyToRequest(localVarRequestOptions));
}
if (this.authentications.BearerAuth.accessToken) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerAuth.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
(<any>localVarRequestOptions).formData = localVarFormParams;
} else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise<{ response: http.IncomingMessage; body: object; }>((resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
} else {
body = ObjectSerializer.deserialize(body, "object");
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
} else {
reject(new HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}

View File

@@ -0,0 +1,171 @@
/**
* Dusky API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import localVarRequest = require('request');
import http = require('http');
/* tslint:disable:no-unused-locals */
import { Authentication, HttpBasicAuth, HttpBearerAuth, Interceptor, ObjectSerializer, VoidAuth } from '../model/models';
import { HttpError } from './apis';
let defaultBasePath = 'https://10.135.16.138:30080';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
export enum MetricRouterApiApiKeys {
}
export class MetricRouterApi {
protected _basePath = defaultBasePath;
protected _defaultHeaders : any = {};
protected _useQuerystring : boolean = false;
protected authentications = {
'default': <Authentication>new VoidAuth(),
'BasicAuth': new HttpBasicAuth(),
'BearerAuth': new HttpBearerAuth(),
}
protected interceptors: Interceptor[] = [];
constructor(basePath?: string);
constructor(username: string, password: string, basePath?: string);
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
if (password) {
this.username = basePathOrUsername;
this.password = password
if (basePath) {
this.basePath = basePath;
}
} else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername
}
}
}
set useQuerystring(value: boolean) {
this._useQuerystring = value;
}
set basePath(basePath: string) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders: any) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
public setDefaultAuthentication(auth: Authentication) {
this.authentications.default = auth;
}
public setApiKey(key: MetricRouterApiApiKeys, value: string) {
(this.authentications as any)[MetricRouterApiApiKeys[key]].apiKey = value;
}
set username(username: string) {
this.authentications.BasicAuth.username = username;
}
set password(password: string) {
this.authentications.BasicAuth.password = password;
}
set accessToken(accessToken: string | (() => string)) {
this.authentications.BearerAuth.accessToken = accessToken;
}
public addInterceptor(interceptor: Interceptor) {
this.interceptors.push(interceptor);
}
/**
*
*/
public async apiV1MetricsPost (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: object; }> {
const localVarPath = this.basePath + '/api/v1/metrics';
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
const produces = ['application/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams: any = {};
(<any>Object).assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions: localVarRequest.Options = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BasicAuth.username && this.authentications.BasicAuth.password) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BasicAuth.applyToRequest(localVarRequestOptions));
}
if (this.authentications.BearerAuth.accessToken) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerAuth.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
(<any>localVarRequestOptions).formData = localVarFormParams;
} else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise<{ response: http.IncomingMessage; body: object; }>((resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
} else {
body = ObjectSerializer.deserialize(body, "object");
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
} else {
reject(new HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}

View File

@@ -0,0 +1,236 @@
/**
* Dusky API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import localVarRequest = require('request');
import http = require('http');
/* tslint:disable:no-unused-locals */
import { ClusterPatchModel } from '../model/clusterPatchModel';
import { DuskyObjectModelsOperatorStatus } from '../model/duskyObjectModelsOperatorStatus';
import { Authentication, HttpBasicAuth, HttpBearerAuth, Interceptor, ObjectSerializer, VoidAuth } from '../model/models';
import { HttpError } from './apis';
let defaultBasePath = 'https://10.135.16.138:30080';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
export enum OperatorRouterApiApiKeys {
}
export class OperatorRouterApi {
protected _basePath = defaultBasePath;
protected _defaultHeaders : any = {};
protected _useQuerystring : boolean = false;
protected authentications = {
'default': <Authentication>new VoidAuth(),
'BasicAuth': new HttpBasicAuth(),
'BearerAuth': new HttpBearerAuth(),
}
protected interceptors: Interceptor[] = [];
constructor(basePath?: string);
constructor(username: string, password: string, basePath?: string);
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
if (password) {
this.username = basePathOrUsername;
this.password = password
if (basePath) {
this.basePath = basePath;
}
} else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername
}
}
}
set useQuerystring(value: boolean) {
this._useQuerystring = value;
}
set basePath(basePath: string) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders: any) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
public setDefaultAuthentication(auth: Authentication) {
this.authentications.default = auth;
}
public setApiKey(key: OperatorRouterApiApiKeys, value: string) {
(this.authentications as any)[OperatorRouterApiApiKeys[key]].apiKey = value;
}
set username(username: string) {
this.authentications.BasicAuth.username = username;
}
set password(password: string) {
this.authentications.BasicAuth.password = password;
}
set accessToken(accessToken: string | (() => string)) {
this.authentications.BearerAuth.accessToken = accessToken;
}
public addInterceptor(interceptor: Interceptor) {
this.interceptors.push(interceptor);
}
/**
*
* @summary Gets the status of the Dusky operator.
*/
public async getDuskyOperatorStatus (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: DuskyObjectModelsOperatorStatus; }> {
const localVarPath = this.basePath + '/dusky/operator/status';
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
const produces = ['application/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams: any = {};
(<any>Object).assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions: localVarRequest.Options = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BasicAuth.username && this.authentications.BasicAuth.password) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BasicAuth.applyToRequest(localVarRequestOptions));
}
if (this.authentications.BearerAuth.accessToken) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerAuth.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
(<any>localVarRequestOptions).formData = localVarFormParams;
} else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise<{ response: http.IncomingMessage; body: DuskyObjectModelsOperatorStatus; }>((resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
} else {
body = ObjectSerializer.deserialize(body, "DuskyObjectModelsOperatorStatus");
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
} else {
reject(new HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
*
* @summary Upgrades the Dusky operator.
* @param clusterPatchModel
*/
public async upgradeDuskyOperator (clusterPatchModel?: ClusterPatchModel, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
const localVarPath = this.basePath + '/dusky/operator/upgrade';
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
let localVarFormParams: any = {};
(<any>Object).assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions: localVarRequest.Options = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: ObjectSerializer.serialize(clusterPatchModel, "ClusterPatchModel")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BasicAuth.username && this.authentications.BasicAuth.password) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BasicAuth.applyToRequest(localVarRequestOptions));
}
if (this.authentications.BearerAuth.accessToken) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerAuth.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
(<any>localVarRequestOptions).formData = localVarFormParams;
} else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
} else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
} else {
reject(new HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}

View File

@@ -0,0 +1,36 @@
/**
* Dusky API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export class ClusterPatchModel {
'targetVersion': string;
'targetRepository'?: string;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "targetVersion",
"baseName": "targetVersion",
"type": "string"
},
{
"name": "targetRepository",
"baseName": "targetRepository",
"type": "string"
} ];
static getAttributeTypeMap() {
return ClusterPatchModel.attributeTypeMap;
}
}

View File

@@ -0,0 +1,67 @@
/**
* Dusky API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { DuskyObjectModelsError } from './duskyObjectModelsError';
export class DuskyObjectModelsBackup {
'error'?: DuskyObjectModelsError;
'id'?: string;
'name'?: string;
'timestamp': Date;
'size'?: number | null;
'state': string;
'tiers'?: number | null;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "error",
"baseName": "error",
"type": "DuskyObjectModelsError"
},
{
"name": "id",
"baseName": "id",
"type": "string"
},
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "timestamp",
"baseName": "timestamp",
"type": "Date"
},
{
"name": "size",
"baseName": "size",
"type": "number"
},
{
"name": "state",
"baseName": "state",
"type": "string"
},
{
"name": "tiers",
"baseName": "tiers",
"type": "number"
} ];
static getAttributeTypeMap() {
return DuskyObjectModelsBackup.attributeTypeMap;
}
}

View File

@@ -0,0 +1,36 @@
/**
* Dusky API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export class DuskyObjectModelsBackupCopySchedule {
'interval': string;
'offset'?: string;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "interval",
"baseName": "interval",
"type": "string"
},
{
"name": "offset",
"baseName": "offset",
"type": "string"
} ];
static getAttributeTypeMap() {
return DuskyObjectModelsBackupCopySchedule.attributeTypeMap;
}
}

View File

@@ -0,0 +1,36 @@
/**
* Dusky API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export class DuskyObjectModelsBackupRetention {
'maximums'?: Array<string>;
'minimums'?: Array<string>;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "maximums",
"baseName": "maximums",
"type": "Array<string>"
},
{
"name": "minimums",
"baseName": "minimums",
"type": "Array<string>"
} ];
static getAttributeTypeMap() {
return DuskyObjectModelsBackupRetention.attributeTypeMap;
}
}

View File

@@ -0,0 +1,50 @@
/**
* Dusky API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { DuskyObjectModelsBackupCopySchedule } from './duskyObjectModelsBackupCopySchedule';
import { DuskyObjectModelsBackupTier } from './duskyObjectModelsBackupTier';
export class DuskyObjectModelsBackupSpec {
'deltaMinutes'?: number | null;
'fullMinutes'?: number | null;
'copySchedule'?: DuskyObjectModelsBackupCopySchedule;
'tiers': Array<DuskyObjectModelsBackupTier>;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "deltaMinutes",
"baseName": "deltaMinutes",
"type": "number"
},
{
"name": "fullMinutes",
"baseName": "fullMinutes",
"type": "number"
},
{
"name": "copySchedule",
"baseName": "copySchedule",
"type": "DuskyObjectModelsBackupCopySchedule"
},
{
"name": "tiers",
"baseName": "tiers",
"type": "Array<DuskyObjectModelsBackupTier>"
} ];
static getAttributeTypeMap() {
return DuskyObjectModelsBackupSpec.attributeTypeMap;
}
}

View File

@@ -0,0 +1,38 @@
/**
* Dusky API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { DuskyObjectModelsRetentionSpec } from './duskyObjectModelsRetentionSpec';
import { DuskyObjectModelsStorageSpec } from './duskyObjectModelsStorageSpec';
export class DuskyObjectModelsBackupTier {
'retention'?: DuskyObjectModelsRetentionSpec;
'storage': DuskyObjectModelsStorageSpec;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "retention",
"baseName": "retention",
"type": "DuskyObjectModelsRetentionSpec"
},
{
"name": "storage",
"baseName": "storage",
"type": "DuskyObjectModelsStorageSpec"
} ];
static getAttributeTypeMap() {
return DuskyObjectModelsBackupTier.attributeTypeMap;
}
}

View File

@@ -0,0 +1,42 @@
/**
* Dusky API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export class DuskyObjectModelsDatabase {
'name': string;
'owner'?: string;
'sharded'?: boolean;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "owner",
"baseName": "owner",
"type": "string"
},
{
"name": "sharded",
"baseName": "sharded",
"type": "boolean"
} ];
static getAttributeTypeMap() {
return DuskyObjectModelsDatabase.attributeTypeMap;
}
}

View File

@@ -0,0 +1,64 @@
/**
* Dusky API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { DuskyObjectModelsDatabaseServiceArcPayload } from './duskyObjectModelsDatabaseServiceArcPayload';
import { DuskyObjectModelsDatabaseServiceSpec } from './duskyObjectModelsDatabaseServiceSpec';
import { DuskyObjectModelsDatabaseServiceStatus } from './duskyObjectModelsDatabaseServiceStatus';
import { DuskyObjectModelsObjectMeta } from './duskyObjectModelsObjectMeta';
export class DuskyObjectModelsDatabaseService {
'kind'?: string;
'apiVersion'?: string;
'metadata'?: DuskyObjectModelsObjectMeta;
'spec': DuskyObjectModelsDatabaseServiceSpec;
'status'?: DuskyObjectModelsDatabaseServiceStatus;
'arc'?: DuskyObjectModelsDatabaseServiceArcPayload;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "DuskyObjectModelsObjectMeta"
},
{
"name": "spec",
"baseName": "spec",
"type": "DuskyObjectModelsDatabaseServiceSpec"
},
{
"name": "status",
"baseName": "status",
"type": "DuskyObjectModelsDatabaseServiceStatus"
},
{
"name": "arc",
"baseName": "arc",
"type": "DuskyObjectModelsDatabaseServiceArcPayload"
} ];
static getAttributeTypeMap() {
return DuskyObjectModelsDatabaseService.attributeTypeMap;
}
}

View File

@@ -0,0 +1,30 @@
/**
* Dusky API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export class DuskyObjectModelsDatabaseServiceArcPayload {
'servicePassword'?: string;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "servicePassword",
"baseName": "servicePassword",
"type": "string"
} ];
static getAttributeTypeMap() {
return DuskyObjectModelsDatabaseServiceArcPayload.attributeTypeMap;
}
}

View File

@@ -0,0 +1,61 @@
/**
* Dusky API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export class DuskyObjectModelsDatabaseServiceCondition {
'type': string;
'status': DuskyObjectModelsDatabaseServiceCondition.StatusEnum;
'lastTransitionTime'?: Date | null;
'reason'?: string;
'message'?: string;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "type",
"baseName": "type",
"type": "string"
},
{
"name": "status",
"baseName": "status",
"type": "DuskyObjectModelsDatabaseServiceCondition.StatusEnum"
},
{
"name": "lastTransitionTime",
"baseName": "lastTransitionTime",
"type": "Date"
},
{
"name": "reason",
"baseName": "reason",
"type": "string"
},
{
"name": "message",
"baseName": "message",
"type": "string"
} ];
static getAttributeTypeMap() {
return DuskyObjectModelsDatabaseServiceCondition.attributeTypeMap;
}
}
export namespace DuskyObjectModelsDatabaseServiceCondition {
export enum StatusEnum {
Unknown = <any> 'Unknown',
False = <any> 'False',
True = <any> 'True'
}
}

View File

@@ -0,0 +1,49 @@
/**
* Dusky API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { DuskyObjectModelsDatabaseService } from './duskyObjectModelsDatabaseService';
export class DuskyObjectModelsDatabaseServiceList {
'kind'?: string;
'apiVersion'?: string;
'metadata'?: object;
'items': Array<DuskyObjectModelsDatabaseService>;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "object"
},
{
"name": "items",
"baseName": "items",
"type": "Array<DuskyObjectModelsDatabaseService>"
} ];
static getAttributeTypeMap() {
return DuskyObjectModelsDatabaseServiceList.attributeTypeMap;
}
}

View File

@@ -0,0 +1,80 @@
/**
* Dusky API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { DuskyObjectModelsBackupSpec } from './duskyObjectModelsBackupSpec';
import { DuskyObjectModelsDockerSpec } from './duskyObjectModelsDockerSpec';
import { DuskyObjectModelsEngineSpec } from './duskyObjectModelsEngineSpec';
import { DuskyObjectModelsMonitoringSpec } from './duskyObjectModelsMonitoringSpec';
import { DuskyObjectModelsScaleSpec } from './duskyObjectModelsScaleSpec';
import { DuskyObjectModelsSchedulingSpec } from './duskyObjectModelsSchedulingSpec';
import { DuskyObjectModelsServiceSpec } from './duskyObjectModelsServiceSpec';
import { DuskyObjectModelsStorageSpec } from './duskyObjectModelsStorageSpec';
export class DuskyObjectModelsDatabaseServiceSpec {
'backups'?: DuskyObjectModelsBackupSpec;
'docker'?: DuskyObjectModelsDockerSpec;
'engine': DuskyObjectModelsEngineSpec;
'monitoring'?: DuskyObjectModelsMonitoringSpec;
'scale'?: DuskyObjectModelsScaleSpec;
'scheduling'?: DuskyObjectModelsSchedulingSpec;
'service'?: DuskyObjectModelsServiceSpec;
'storage': DuskyObjectModelsStorageSpec;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "backups",
"baseName": "backups",
"type": "DuskyObjectModelsBackupSpec"
},
{
"name": "docker",
"baseName": "docker",
"type": "DuskyObjectModelsDockerSpec"
},
{
"name": "engine",
"baseName": "engine",
"type": "DuskyObjectModelsEngineSpec"
},
{
"name": "monitoring",
"baseName": "monitoring",
"type": "DuskyObjectModelsMonitoringSpec"
},
{
"name": "scale",
"baseName": "scale",
"type": "DuskyObjectModelsScaleSpec"
},
{
"name": "scheduling",
"baseName": "scheduling",
"type": "DuskyObjectModelsSchedulingSpec"
},
{
"name": "service",
"baseName": "service",
"type": "DuskyObjectModelsServiceSpec"
},
{
"name": "storage",
"baseName": "storage",
"type": "DuskyObjectModelsStorageSpec"
} ];
static getAttributeTypeMap() {
return DuskyObjectModelsDatabaseServiceSpec.attributeTypeMap;
}
}

View File

@@ -0,0 +1,115 @@
/**
* Dusky API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { DuskyObjectModelsDatabaseServiceCondition } from './duskyObjectModelsDatabaseServiceCondition';
export class DuskyObjectModelsDatabaseServiceStatus {
'state': string;
'appliedGeneration'?: number | null;
'conditions'?: Array<DuskyObjectModelsDatabaseServiceCondition>;
'internalIP'?: string;
'internalPort'?: number | null;
'externalIP'?: string;
'externalPort'?: number | null;
'podsFailed': number;
'podsPending': number;
'podsRunning': number;
'podsUnknown': number;
'restartRequired': boolean;
'execFailCount'?: number | null;
'settingsUpdatePending'?: boolean;
'shardsProvisioned'?: number | null;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "state",
"baseName": "state",
"type": "string"
},
{
"name": "appliedGeneration",
"baseName": "appliedGeneration",
"type": "number"
},
{
"name": "conditions",
"baseName": "conditions",
"type": "Array<DuskyObjectModelsDatabaseServiceCondition>"
},
{
"name": "internalIP",
"baseName": "internalIP",
"type": "string"
},
{
"name": "internalPort",
"baseName": "internalPort",
"type": "number"
},
{
"name": "externalIP",
"baseName": "externalIP",
"type": "string"
},
{
"name": "externalPort",
"baseName": "externalPort",
"type": "number"
},
{
"name": "podsFailed",
"baseName": "podsFailed",
"type": "number"
},
{
"name": "podsPending",
"baseName": "podsPending",
"type": "number"
},
{
"name": "podsRunning",
"baseName": "podsRunning",
"type": "number"
},
{
"name": "podsUnknown",
"baseName": "podsUnknown",
"type": "number"
},
{
"name": "restartRequired",
"baseName": "restartRequired",
"type": "boolean"
},
{
"name": "execFailCount",
"baseName": "execFailCount",
"type": "number"
},
{
"name": "settingsUpdatePending",
"baseName": "settingsUpdatePending",
"type": "boolean"
},
{
"name": "shardsProvisioned",
"baseName": "shardsProvisioned",
"type": "number"
} ];
static getAttributeTypeMap() {
return DuskyObjectModelsDatabaseServiceStatus.attributeTypeMap;
}
}

View File

@@ -0,0 +1,54 @@
/**
* Dusky API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export class DuskyObjectModelsDatabaseServiceVolumeStatus {
'id'?: string;
'count'?: number;
'totalSize'?: number;
'storageClass'?: string;
'state'?: string;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "id",
"baseName": "id",
"type": "string"
},
{
"name": "count",
"baseName": "count",
"type": "number"
},
{
"name": "totalSize",
"baseName": "totalSize",
"type": "number"
},
{
"name": "storageClass",
"baseName": "storageClass",
"type": "string"
},
{
"name": "state",
"baseName": "state",
"type": "string"
} ];
static getAttributeTypeMap() {
return DuskyObjectModelsDatabaseServiceVolumeStatus.attributeTypeMap;
}
}

View File

@@ -0,0 +1,54 @@
/**
* Dusky API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export class DuskyObjectModelsDockerSpec {
'registry'?: string;
'repository'?: string;
'imagePullPolicy'?: string;
'imagePullSecret'?: string;
'imageTagSuffix'?: string;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "registry",
"baseName": "registry",
"type": "string"
},
{
"name": "repository",
"baseName": "repository",
"type": "string"
},
{
"name": "imagePullPolicy",
"baseName": "imagePullPolicy",
"type": "string"
},
{
"name": "imagePullSecret",
"baseName": "imagePullSecret",
"type": "string"
},
{
"name": "imageTagSuffix",
"baseName": "imageTagSuffix",
"type": "string"
} ];
static getAttributeTypeMap() {
return DuskyObjectModelsDockerSpec.attributeTypeMap;
}
}

View File

@@ -0,0 +1,57 @@
/**
* Dusky API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export class DuskyObjectModelsDuskyValidationMessage {
'type'?: DuskyObjectModelsDuskyValidationMessage.TypeEnum;
'code'?: DuskyObjectModelsDuskyValidationMessage.CodeEnum;
'message'?: string;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "type",
"baseName": "type",
"type": "DuskyObjectModelsDuskyValidationMessage.TypeEnum"
},
{
"name": "code",
"baseName": "code",
"type": "DuskyObjectModelsDuskyValidationMessage.CodeEnum"
},
{
"name": "message",
"baseName": "message",
"type": "string"
} ];
static getAttributeTypeMap() {
return DuskyObjectModelsDuskyValidationMessage.attributeTypeMap;
}
}
export namespace DuskyObjectModelsDuskyValidationMessage {
export enum TypeEnum {
Info = <any> 'Info',
Warning = <any> 'Warning',
Fail = <any> 'Fail'
}
export enum CodeEnum {
InvalidInput = <any> 'InvalidInput',
ResourceExists = <any> 'ResourceExists',
ResourceNotFound = <any> 'ResourceNotFound',
ResourceNotRunning = <any> 'ResourceNotRunning',
AvailableResources = <any> 'AvailableResources',
InsufficientResources = <any> 'InsufficientResources'
}
}

View File

@@ -0,0 +1,31 @@
/**
* Dusky API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { DuskyObjectModelsDuskyValidationMessage } from './duskyObjectModelsDuskyValidationMessage';
export class DuskyObjectModelsDuskyValidationResult {
'messages'?: Array<DuskyObjectModelsDuskyValidationMessage>;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "messages",
"baseName": "messages",
"type": "Array<DuskyObjectModelsDuskyValidationMessage>"
} ];
static getAttributeTypeMap() {
return DuskyObjectModelsDuskyValidationResult.attributeTypeMap;
}
}

View File

@@ -0,0 +1,49 @@
/**
* Dusky API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { DuskyObjectModelsPluginSpec } from './duskyObjectModelsPluginSpec';
export class DuskyObjectModelsEngineSpec {
'type': string;
'version'?: number | null;
'settings'?: { [key: string]: string; };
'plugins'?: Array<DuskyObjectModelsPluginSpec>;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "type",
"baseName": "type",
"type": "string"
},
{
"name": "version",
"baseName": "version",
"type": "number"
},
{
"name": "settings",
"baseName": "settings",
"type": "{ [key: string]: string; }"
},
{
"name": "plugins",
"baseName": "plugins",
"type": "Array<DuskyObjectModelsPluginSpec>"
} ];
static getAttributeTypeMap() {
return DuskyObjectModelsEngineSpec.attributeTypeMap;
}
}

View File

@@ -0,0 +1,49 @@
/**
* Dusky API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { DuskyObjectModelsErrorDetails } from './duskyObjectModelsErrorDetails';
export class DuskyObjectModelsError {
'reason'?: string;
'message'?: string;
'details'?: DuskyObjectModelsErrorDetails;
'code'?: number | null;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "reason",
"baseName": "reason",
"type": "string"
},
{
"name": "message",
"baseName": "message",
"type": "string"
},
{
"name": "details",
"baseName": "details",
"type": "DuskyObjectModelsErrorDetails"
},
{
"name": "code",
"baseName": "code",
"type": "number"
} ];
static getAttributeTypeMap() {
return DuskyObjectModelsError.attributeTypeMap;
}
}

View File

@@ -0,0 +1,42 @@
/**
* Dusky API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export class DuskyObjectModelsErrorDetails {
'reason'?: string;
'message'?: string;
'details'?: DuskyObjectModelsErrorDetails;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "reason",
"baseName": "reason",
"type": "string"
},
{
"name": "message",
"baseName": "message",
"type": "string"
},
{
"name": "details",
"baseName": "details",
"type": "DuskyObjectModelsErrorDetails"
} ];
static getAttributeTypeMap() {
return DuskyObjectModelsErrorDetails.attributeTypeMap;
}
}

View File

@@ -0,0 +1,31 @@
/**
* Dusky API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { DuskyObjectModelsTINASpec } from './duskyObjectModelsTINASpec';
export class DuskyObjectModelsMonitoringSpec {
'tina'?: DuskyObjectModelsTINASpec;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "tina",
"baseName": "tina",
"type": "DuskyObjectModelsTINASpec"
} ];
static getAttributeTypeMap() {
return DuskyObjectModelsMonitoringSpec.attributeTypeMap;
}
}

View File

@@ -0,0 +1,102 @@
/**
* Dusky API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export class DuskyObjectModelsObjectMeta {
'annotations'?: { [key: string]: string; };
'creationTimestamp'?: Date | null;
'deletionTimestamp'?: Date | null;
'finalizers'?: Array<object>;
'generateName'?: string;
'generation'?: number | null;
'labels'?: { [key: string]: string; };
'name'?: string;
'namespace'?: string;
'ownerReferences'?: Array<object>;
'resourceVersion'?: string;
'selfLink'?: string;
'uid'?: string | null;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "annotations",
"baseName": "annotations",
"type": "{ [key: string]: string; }"
},
{
"name": "creationTimestamp",
"baseName": "creationTimestamp",
"type": "Date"
},
{
"name": "deletionTimestamp",
"baseName": "deletionTimestamp",
"type": "Date"
},
{
"name": "finalizers",
"baseName": "finalizers",
"type": "Array<object>"
},
{
"name": "generateName",
"baseName": "generateName",
"type": "string"
},
{
"name": "generation",
"baseName": "generation",
"type": "number"
},
{
"name": "labels",
"baseName": "labels",
"type": "{ [key: string]: string; }"
},
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "namespace",
"baseName": "namespace",
"type": "string"
},
{
"name": "ownerReferences",
"baseName": "ownerReferences",
"type": "Array<object>"
},
{
"name": "resourceVersion",
"baseName": "resourceVersion",
"type": "string"
},
{
"name": "selfLink",
"baseName": "selfLink",
"type": "string"
},
{
"name": "uid",
"baseName": "uid",
"type": "string"
} ];
static getAttributeTypeMap() {
return DuskyObjectModelsObjectMeta.attributeTypeMap;
}
}

View File

@@ -0,0 +1,31 @@
/**
* Dusky API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { DuskyObjectModelsReplicaStatus } from './duskyObjectModelsReplicaStatus';
export class DuskyObjectModelsOperatorStatus {
'statuses'?: { [key: string]: DuskyObjectModelsReplicaStatus; };
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "statuses",
"baseName": "statuses",
"type": "{ [key: string]: DuskyObjectModelsReplicaStatus; }"
} ];
static getAttributeTypeMap() {
return DuskyObjectModelsOperatorStatus.attributeTypeMap;
}
}

View File

@@ -0,0 +1,30 @@
/**
* Dusky API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export class DuskyObjectModelsPluginSpec {
'name': string;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "name",
"baseName": "name",
"type": "string"
} ];
static getAttributeTypeMap() {
return DuskyObjectModelsPluginSpec.attributeTypeMap;
}
}

View File

@@ -0,0 +1,36 @@
/**
* Dusky API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export class DuskyObjectModelsReplicaStatus {
'replicas'?: number;
'readyReplicas'?: number;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "replicas",
"baseName": "replicas",
"type": "number"
},
{
"name": "readyReplicas",
"baseName": "readyReplicas",
"type": "number"
} ];
static getAttributeTypeMap() {
return DuskyObjectModelsReplicaStatus.attributeTypeMap;
}
}

View File

@@ -0,0 +1,36 @@
/**
* Dusky API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export class DuskyObjectModelsResourceRequirements {
'limits'?: { [key: string]: string; };
'requests'?: { [key: string]: string; };
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "limits",
"baseName": "limits",
"type": "{ [key: string]: string; }"
},
{
"name": "requests",
"baseName": "requests",
"type": "{ [key: string]: string; }"
} ];
static getAttributeTypeMap() {
return DuskyObjectModelsResourceRequirements.attributeTypeMap;
}
}

View File

@@ -0,0 +1,67 @@
/**
* Dusky API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { DuskyObjectModelsError } from './duskyObjectModelsError';
export class DuskyObjectModelsRestoreStatus {
'backupId'?: string;
'endTime'?: Date;
'error'?: DuskyObjectModelsError;
'fromServer'?: string;
'restoreTime'?: Date;
'startTime'?: Date;
'state': string;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "backupId",
"baseName": "backupId",
"type": "string"
},
{
"name": "endTime",
"baseName": "endTime",
"type": "Date"
},
{
"name": "error",
"baseName": "error",
"type": "DuskyObjectModelsError"
},
{
"name": "fromServer",
"baseName": "fromServer",
"type": "string"
},
{
"name": "restoreTime",
"baseName": "restoreTime",
"type": "Date"
},
{
"name": "startTime",
"baseName": "startTime",
"type": "Date"
},
{
"name": "state",
"baseName": "state",
"type": "string"
} ];
static getAttributeTypeMap() {
return DuskyObjectModelsRestoreStatus.attributeTypeMap;
}
}

View File

@@ -0,0 +1,36 @@
/**
* Dusky API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export class DuskyObjectModelsRetentionSpec {
'maximums'?: Array<string>;
'minimums'?: Array<string>;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "maximums",
"baseName": "maximums",
"type": "Array<string>"
},
{
"name": "minimums",
"baseName": "minimums",
"type": "Array<string>"
} ];
static getAttributeTypeMap() {
return DuskyObjectModelsRetentionSpec.attributeTypeMap;
}
}

View File

@@ -0,0 +1,30 @@
/**
* Dusky API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export class DuskyObjectModelsRole {
'name': string;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "name",
"baseName": "name",
"type": "string"
} ];
static getAttributeTypeMap() {
return DuskyObjectModelsRole.attributeTypeMap;
}
}

View File

@@ -0,0 +1,36 @@
/**
* Dusky API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export class DuskyObjectModelsScaleSpec {
'replicas'?: number | null;
'shards'?: number | null;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "replicas",
"baseName": "replicas",
"type": "number"
},
{
"name": "shards",
"baseName": "shards",
"type": "number"
} ];
static getAttributeTypeMap() {
return DuskyObjectModelsScaleSpec.attributeTypeMap;
}
}

View File

@@ -0,0 +1,37 @@
/**
* Dusky API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { DuskyObjectModelsResourceRequirements } from './duskyObjectModelsResourceRequirements';
export class DuskyObjectModelsSchedulingSpec {
'nodeSelector'?: { [key: string]: string; };
'resources'?: DuskyObjectModelsResourceRequirements;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "nodeSelector",
"baseName": "nodeSelector",
"type": "{ [key: string]: string; }"
},
{
"name": "resources",
"baseName": "resources",
"type": "DuskyObjectModelsResourceRequirements"
} ];
static getAttributeTypeMap() {
return DuskyObjectModelsSchedulingSpec.attributeTypeMap;
}
}

View File

@@ -0,0 +1,42 @@
/**
* Dusky API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export class DuskyObjectModelsServiceSpec {
'port'?: number | null;
'type'?: string;
'externalIPs'?: Array<string>;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "port",
"baseName": "port",
"type": "number"
},
{
"name": "type",
"baseName": "type",
"type": "string"
},
{
"name": "externalIPs",
"baseName": "externalIPs",
"type": "Array<string>"
} ];
static getAttributeTypeMap() {
return DuskyObjectModelsServiceSpec.attributeTypeMap;
}
}

View File

@@ -0,0 +1,48 @@
/**
* Dusky API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export class DuskyObjectModelsStorageSpec {
'storageClassName'?: string;
'volumeClaimName'?: string;
'volumeSize'?: string;
'matchLabels'?: { [key: string]: string; };
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "storageClassName",
"baseName": "storageClassName",
"type": "string"
},
{
"name": "volumeClaimName",
"baseName": "volumeClaimName",
"type": "string"
},
{
"name": "volumeSize",
"baseName": "volumeSize",
"type": "string"
},
{
"name": "matchLabels",
"baseName": "matchLabels",
"type": "{ [key: string]: string; }"
} ];
static getAttributeTypeMap() {
return DuskyObjectModelsStorageSpec.attributeTypeMap;
}
}

View File

@@ -0,0 +1,30 @@
/**
* Dusky API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export class DuskyObjectModelsTINASpec {
'namespace': string;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "namespace",
"baseName": "namespace",
"type": "string"
} ];
static getAttributeTypeMap() {
return DuskyObjectModelsTINASpec.attributeTypeMap;
}
}

View File

@@ -0,0 +1,42 @@
/**
* Dusky API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export class DuskyObjectModelsUser {
'name': string;
'password'?: string;
'roles': Array<string>;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "password",
"baseName": "password",
"type": "string"
},
{
"name": "roles",
"baseName": "roles",
"type": "Array<string>"
} ];
static getAttributeTypeMap() {
return DuskyObjectModelsUser.attributeTypeMap;
}
}

View File

@@ -0,0 +1,48 @@
/**
* Dusky API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export class LogsRequest {
'startTime': string;
'endTime': string;
'termQueries'?: { [key: string]: string; };
'regexQueries'?: { [key: string]: string; };
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "startTime",
"baseName": "startTime",
"type": "string"
},
{
"name": "endTime",
"baseName": "endTime",
"type": "string"
},
{
"name": "termQueries",
"baseName": "termQueries",
"type": "{ [key: string]: string; }"
},
{
"name": "regexQueries",
"baseName": "regexQueries",
"type": "{ [key: string]: string; }"
} ];
static getAttributeTypeMap() {
return LogsRequest.attributeTypeMap;
}
}

View File

@@ -0,0 +1,329 @@
export * from './clusterPatchModel';
export * from './duskyObjectModelsBackup';
export * from './duskyObjectModelsBackupCopySchedule';
export * from './duskyObjectModelsBackupRetention';
export * from './duskyObjectModelsBackupSpec';
export * from './duskyObjectModelsBackupTier';
export * from './duskyObjectModelsDatabase';
export * from './duskyObjectModelsDatabaseService';
export * from './duskyObjectModelsDatabaseServiceArcPayload';
export * from './duskyObjectModelsDatabaseServiceCondition';
export * from './duskyObjectModelsDatabaseServiceList';
export * from './duskyObjectModelsDatabaseServiceSpec';
export * from './duskyObjectModelsDatabaseServiceStatus';
export * from './duskyObjectModelsDatabaseServiceVolumeStatus';
export * from './duskyObjectModelsDockerSpec';
export * from './duskyObjectModelsDuskyValidationMessage';
export * from './duskyObjectModelsDuskyValidationResult';
export * from './duskyObjectModelsEngineSpec';
export * from './duskyObjectModelsError';
export * from './duskyObjectModelsErrorDetails';
export * from './duskyObjectModelsMonitoringSpec';
export * from './duskyObjectModelsObjectMeta';
export * from './duskyObjectModelsOperatorStatus';
export * from './duskyObjectModelsPluginSpec';
export * from './duskyObjectModelsReplicaStatus';
export * from './duskyObjectModelsResourceRequirements';
export * from './duskyObjectModelsRestoreStatus';
export * from './duskyObjectModelsRetentionSpec';
export * from './duskyObjectModelsRole';
export * from './duskyObjectModelsScaleSpec';
export * from './duskyObjectModelsSchedulingSpec';
export * from './duskyObjectModelsServiceSpec';
export * from './duskyObjectModelsStorageSpec';
export * from './duskyObjectModelsTINASpec';
export * from './duskyObjectModelsUser';
export * from './logsRequest';
export * from './v1ListMeta';
export * from './v1Status';
export * from './v1StatusCause';
export * from './v1StatusDetails';
import localVarRequest = require('request');
import { ClusterPatchModel } from './clusterPatchModel';
import { DuskyObjectModelsBackup } from './duskyObjectModelsBackup';
import { DuskyObjectModelsBackupCopySchedule } from './duskyObjectModelsBackupCopySchedule';
import { DuskyObjectModelsBackupRetention } from './duskyObjectModelsBackupRetention';
import { DuskyObjectModelsBackupSpec } from './duskyObjectModelsBackupSpec';
import { DuskyObjectModelsBackupTier } from './duskyObjectModelsBackupTier';
import { DuskyObjectModelsDatabase } from './duskyObjectModelsDatabase';
import { DuskyObjectModelsDatabaseService } from './duskyObjectModelsDatabaseService';
import { DuskyObjectModelsDatabaseServiceArcPayload } from './duskyObjectModelsDatabaseServiceArcPayload';
import { DuskyObjectModelsDatabaseServiceCondition } from './duskyObjectModelsDatabaseServiceCondition';
import { DuskyObjectModelsDatabaseServiceList } from './duskyObjectModelsDatabaseServiceList';
import { DuskyObjectModelsDatabaseServiceSpec } from './duskyObjectModelsDatabaseServiceSpec';
import { DuskyObjectModelsDatabaseServiceStatus } from './duskyObjectModelsDatabaseServiceStatus';
import { DuskyObjectModelsDatabaseServiceVolumeStatus } from './duskyObjectModelsDatabaseServiceVolumeStatus';
import { DuskyObjectModelsDockerSpec } from './duskyObjectModelsDockerSpec';
import { DuskyObjectModelsDuskyValidationMessage } from './duskyObjectModelsDuskyValidationMessage';
import { DuskyObjectModelsDuskyValidationResult } from './duskyObjectModelsDuskyValidationResult';
import { DuskyObjectModelsEngineSpec } from './duskyObjectModelsEngineSpec';
import { DuskyObjectModelsError } from './duskyObjectModelsError';
import { DuskyObjectModelsErrorDetails } from './duskyObjectModelsErrorDetails';
import { DuskyObjectModelsMonitoringSpec } from './duskyObjectModelsMonitoringSpec';
import { DuskyObjectModelsObjectMeta } from './duskyObjectModelsObjectMeta';
import { DuskyObjectModelsOperatorStatus } from './duskyObjectModelsOperatorStatus';
import { DuskyObjectModelsPluginSpec } from './duskyObjectModelsPluginSpec';
import { DuskyObjectModelsReplicaStatus } from './duskyObjectModelsReplicaStatus';
import { DuskyObjectModelsResourceRequirements } from './duskyObjectModelsResourceRequirements';
import { DuskyObjectModelsRestoreStatus } from './duskyObjectModelsRestoreStatus';
import { DuskyObjectModelsRetentionSpec } from './duskyObjectModelsRetentionSpec';
import { DuskyObjectModelsRole } from './duskyObjectModelsRole';
import { DuskyObjectModelsScaleSpec } from './duskyObjectModelsScaleSpec';
import { DuskyObjectModelsSchedulingSpec } from './duskyObjectModelsSchedulingSpec';
import { DuskyObjectModelsServiceSpec } from './duskyObjectModelsServiceSpec';
import { DuskyObjectModelsStorageSpec } from './duskyObjectModelsStorageSpec';
import { DuskyObjectModelsTINASpec } from './duskyObjectModelsTINASpec';
import { DuskyObjectModelsUser } from './duskyObjectModelsUser';
import { LogsRequest } from './logsRequest';
import { V1ListMeta } from './v1ListMeta';
import { V1Status } from './v1Status';
import { V1StatusCause } from './v1StatusCause';
import { V1StatusDetails } from './v1StatusDetails';
/* tslint:disable:no-unused-variable */
let primitives = [
"string",
"boolean",
"double",
"integer",
"long",
"float",
"number",
"any"
];
let enumsMap: {[index: string]: any} = {
"DuskyObjectModelsDatabaseServiceCondition.StatusEnum": DuskyObjectModelsDatabaseServiceCondition.StatusEnum,
"DuskyObjectModelsDuskyValidationMessage.TypeEnum": DuskyObjectModelsDuskyValidationMessage.TypeEnum,
"DuskyObjectModelsDuskyValidationMessage.CodeEnum": DuskyObjectModelsDuskyValidationMessage.CodeEnum,
}
let typeMap: {[index: string]: any} = {
"ClusterPatchModel": ClusterPatchModel,
"DuskyObjectModelsBackup": DuskyObjectModelsBackup,
"DuskyObjectModelsBackupCopySchedule": DuskyObjectModelsBackupCopySchedule,
"DuskyObjectModelsBackupRetention": DuskyObjectModelsBackupRetention,
"DuskyObjectModelsBackupSpec": DuskyObjectModelsBackupSpec,
"DuskyObjectModelsBackupTier": DuskyObjectModelsBackupTier,
"DuskyObjectModelsDatabase": DuskyObjectModelsDatabase,
"DuskyObjectModelsDatabaseService": DuskyObjectModelsDatabaseService,
"DuskyObjectModelsDatabaseServiceArcPayload": DuskyObjectModelsDatabaseServiceArcPayload,
"DuskyObjectModelsDatabaseServiceCondition": DuskyObjectModelsDatabaseServiceCondition,
"DuskyObjectModelsDatabaseServiceList": DuskyObjectModelsDatabaseServiceList,
"DuskyObjectModelsDatabaseServiceSpec": DuskyObjectModelsDatabaseServiceSpec,
"DuskyObjectModelsDatabaseServiceStatus": DuskyObjectModelsDatabaseServiceStatus,
"DuskyObjectModelsDatabaseServiceVolumeStatus": DuskyObjectModelsDatabaseServiceVolumeStatus,
"DuskyObjectModelsDockerSpec": DuskyObjectModelsDockerSpec,
"DuskyObjectModelsDuskyValidationMessage": DuskyObjectModelsDuskyValidationMessage,
"DuskyObjectModelsDuskyValidationResult": DuskyObjectModelsDuskyValidationResult,
"DuskyObjectModelsEngineSpec": DuskyObjectModelsEngineSpec,
"DuskyObjectModelsError": DuskyObjectModelsError,
"DuskyObjectModelsErrorDetails": DuskyObjectModelsErrorDetails,
"DuskyObjectModelsMonitoringSpec": DuskyObjectModelsMonitoringSpec,
"DuskyObjectModelsObjectMeta": DuskyObjectModelsObjectMeta,
"DuskyObjectModelsOperatorStatus": DuskyObjectModelsOperatorStatus,
"DuskyObjectModelsPluginSpec": DuskyObjectModelsPluginSpec,
"DuskyObjectModelsReplicaStatus": DuskyObjectModelsReplicaStatus,
"DuskyObjectModelsResourceRequirements": DuskyObjectModelsResourceRequirements,
"DuskyObjectModelsRestoreStatus": DuskyObjectModelsRestoreStatus,
"DuskyObjectModelsRetentionSpec": DuskyObjectModelsRetentionSpec,
"DuskyObjectModelsRole": DuskyObjectModelsRole,
"DuskyObjectModelsScaleSpec": DuskyObjectModelsScaleSpec,
"DuskyObjectModelsSchedulingSpec": DuskyObjectModelsSchedulingSpec,
"DuskyObjectModelsServiceSpec": DuskyObjectModelsServiceSpec,
"DuskyObjectModelsStorageSpec": DuskyObjectModelsStorageSpec,
"DuskyObjectModelsTINASpec": DuskyObjectModelsTINASpec,
"DuskyObjectModelsUser": DuskyObjectModelsUser,
"LogsRequest": LogsRequest,
"V1ListMeta": V1ListMeta,
"V1Status": V1Status,
"V1StatusCause": V1StatusCause,
"V1StatusDetails": V1StatusDetails,
}
export class ObjectSerializer {
public static findCorrectType(data: any, expectedType: string) {
if (data == undefined) {
return expectedType;
} else if (primitives.indexOf(expectedType.toLowerCase()) !== -1) {
return expectedType;
} else if (expectedType === "Date") {
return expectedType;
} else {
if (enumsMap[expectedType]) {
return expectedType;
}
if (!typeMap[expectedType]) {
return expectedType; // w/e we don't know the type
}
// Check the discriminator
let discriminatorProperty = typeMap[expectedType].discriminator;
if (discriminatorProperty == null) {
return expectedType; // the type does not have a discriminator. use it.
} else {
if (data[discriminatorProperty]) {
var discriminatorType = data[discriminatorProperty];
if(typeMap[discriminatorType]){
return discriminatorType; // use the type given in the discriminator
} else {
return expectedType; // discriminator did not map to a type
}
} else {
return expectedType; // discriminator was not present (or an empty string)
}
}
}
}
public static serialize(data: any, type: string) {
if (data == undefined) {
return data;
} else if (primitives.indexOf(type.toLowerCase()) !== -1) {
return data;
} else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6
let subType: string = type.replace("Array<", ""); // Array<Type> => Type>
subType = subType.substring(0, subType.length - 1); // Type> => Type
let transformedData: any[] = [];
for (let index in data) {
let date = data[index];
transformedData.push(ObjectSerializer.serialize(date, subType));
}
return transformedData;
} else if (type === "Date") {
return data.toISOString();
} else {
if (enumsMap[type]) {
return data;
}
if (!typeMap[type]) { // in case we dont know the type
return data;
}
// Get the actual type of this object
type = this.findCorrectType(data, type);
// get the map for the correct type.
let attributeTypes = typeMap[type].getAttributeTypeMap();
let instance: {[index: string]: any} = {};
for (let index in attributeTypes) {
let attributeType = attributeTypes[index];
instance[attributeType.baseName] = ObjectSerializer.serialize(data[attributeType.name], attributeType.type);
}
return instance;
}
}
public static deserialize(data: any, type: string) {
// polymorphism may change the actual type.
type = ObjectSerializer.findCorrectType(data, type);
if (data == undefined) {
return data;
} else if (primitives.indexOf(type.toLowerCase()) !== -1) {
return data;
} else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6
let subType: string = type.replace("Array<", ""); // Array<Type> => Type>
subType = subType.substring(0, subType.length - 1); // Type> => Type
let transformedData: any[] = [];
for (let index in data) {
let date = data[index];
transformedData.push(ObjectSerializer.deserialize(date, subType));
}
return transformedData;
} else if (type === "Date") {
return new Date(data);
} else {
if (enumsMap[type]) {// is Enum
return data;
}
if (!typeMap[type]) { // dont know the type
return data;
}
let instance = new typeMap[type]();
let attributeTypes = typeMap[type].getAttributeTypeMap();
for (let index in attributeTypes) {
let attributeType = attributeTypes[index];
instance[attributeType.name] = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type);
}
return instance;
}
}
}
export interface Authentication {
/**
* Apply authentication settings to header and query params.
*/
applyToRequest(requestOptions: localVarRequest.Options): Promise<void> | void;
}
export class HttpBasicAuth implements Authentication {
public username: string = '';
public password: string = '';
applyToRequest(requestOptions: localVarRequest.Options): void {
requestOptions.auth = {
username: this.username, password: this.password
}
}
}
export class HttpBearerAuth implements Authentication {
public accessToken: string | (() => string) = '';
applyToRequest(requestOptions: localVarRequest.Options): void {
if (requestOptions && requestOptions.headers) {
const accessToken = typeof this.accessToken === 'function'
? this.accessToken()
: this.accessToken;
requestOptions.headers["Authorization"] = "Bearer " + accessToken;
}
}
}
export class ApiKeyAuth implements Authentication {
public apiKey: string = '';
constructor(private location: string, private paramName: string) {
}
applyToRequest(requestOptions: localVarRequest.Options): void {
if (this.location == "query") {
(<any>requestOptions.qs)[this.paramName] = this.apiKey;
} else if (this.location == "header" && requestOptions && requestOptions.headers) {
requestOptions.headers[this.paramName] = this.apiKey;
} else if (this.location == 'cookie' && requestOptions && requestOptions.headers) {
if (requestOptions.headers['Cookie']) {
requestOptions.headers['Cookie'] += '; ' + this.paramName + '=' + encodeURIComponent(this.apiKey);
}
else {
requestOptions.headers['Cookie'] = this.paramName + '=' + encodeURIComponent(this.apiKey);
}
}
}
}
export class OAuth implements Authentication {
public accessToken: string = '';
applyToRequest(requestOptions: localVarRequest.Options): void {
if (requestOptions && requestOptions.headers) {
requestOptions.headers["Authorization"] = "Bearer " + this.accessToken;
}
}
}
export class VoidAuth implements Authentication {
public username: string = '';
public password: string = '';
applyToRequest(_: localVarRequest.Options): void {
// Do nothing
}
}
export type Interceptor = (requestOptions: localVarRequest.Options) => (Promise<void> | void);

View File

@@ -0,0 +1,42 @@
/**
* Dusky API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export class V1ListMeta {
'_continue'?: string;
'resourceVersion'?: string;
'selfLink'?: string;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "_continue",
"baseName": "continue",
"type": "string"
},
{
"name": "resourceVersion",
"baseName": "resourceVersion",
"type": "string"
},
{
"name": "selfLink",
"baseName": "selfLink",
"type": "string"
} ];
static getAttributeTypeMap() {
return V1ListMeta.attributeTypeMap;
}
}

View File

@@ -0,0 +1,80 @@
/**
* Dusky API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { V1ListMeta } from './v1ListMeta';
import { V1StatusDetails } from './v1StatusDetails';
export class V1Status {
'apiVersion'?: string;
'code'?: number | null;
'details'?: V1StatusDetails;
'kind'?: string;
'message'?: string;
'metadata'?: V1ListMeta;
'reason'?: string;
'status'?: string;
'hasObject'?: boolean;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "code",
"baseName": "code",
"type": "number"
},
{
"name": "details",
"baseName": "details",
"type": "V1StatusDetails"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "message",
"baseName": "message",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ListMeta"
},
{
"name": "reason",
"baseName": "reason",
"type": "string"
},
{
"name": "status",
"baseName": "status",
"type": "string"
},
{
"name": "hasObject",
"baseName": "hasObject",
"type": "boolean"
} ];
static getAttributeTypeMap() {
return V1Status.attributeTypeMap;
}
}

View File

@@ -0,0 +1,42 @@
/**
* Dusky API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export class V1StatusCause {
'field'?: string;
'message'?: string;
'reason'?: string;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "field",
"baseName": "field",
"type": "string"
},
{
"name": "message",
"baseName": "message",
"type": "string"
},
{
"name": "reason",
"baseName": "reason",
"type": "string"
} ];
static getAttributeTypeMap() {
return V1StatusCause.attributeTypeMap;
}
}

View File

@@ -0,0 +1,61 @@
/**
* Dusky API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { V1StatusCause } from './v1StatusCause';
export class V1StatusDetails {
'causes'?: Array<V1StatusCause>;
'group'?: string;
'kind'?: string;
'name'?: string;
'retryAfterSeconds'?: number | null;
'uid'?: string;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "causes",
"baseName": "causes",
"type": "Array<V1StatusCause>"
},
{
"name": "group",
"baseName": "group",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "retryAfterSeconds",
"baseName": "retryAfterSeconds",
"type": "number"
},
{
"name": "uid",
"baseName": "uid",
"type": "string"
} ];
static getAttributeTypeMap() {
return V1StatusDetails.attributeTypeMap;
}
}

View File

@@ -0,0 +1,4 @@
// This is the entrypoint for the package
export * from './api/apis';
export * from './model/models';

View File

@@ -0,0 +1,43 @@
export * from './controlRouterApi';
export * from './endpointsRouterApi';
export * from './homeRouterApi';
export * from './hybridDataHomeRouterApi';
export * from './infoRouterApi';
export * from './logsRouterApi';
export * from './metricRouterApi';
export * from './registrationRouterApi';
export * from './sqlInstanceRouterApi';
export * from './sqlOperatorUpgradeRouterApi';
export * from './tokenRouterApi';
import * as fs from 'fs';
import * as http from 'http';
import { ControlRouterApi } from './controlRouterApi';
import { EndpointsRouterApi } from './endpointsRouterApi';
import { HomeRouterApi } from './homeRouterApi';
import { HybridDataHomeRouterApi } from './hybridDataHomeRouterApi';
import { InfoRouterApi } from './infoRouterApi';
import { LogsRouterApi } from './logsRouterApi';
import { MetricRouterApi } from './metricRouterApi';
import { RegistrationRouterApi } from './registrationRouterApi';
import { SqlInstanceRouterApi } from './sqlInstanceRouterApi';
import { SqlOperatorUpgradeRouterApi } from './sqlOperatorUpgradeRouterApi';
import { TokenRouterApi } from './tokenRouterApi';
export class HttpError extends Error {
constructor (public response: http.IncomingMessage, public body: any, public statusCode?: number) {
super('HTTP request failed');
this.name = 'HttpError';
}
}
export interface RequestDetailedFile {
value: Buffer;
options?: {
filename?: string;
contentType?: string;
}
}
export type RequestFile = string | Buffer | fs.ReadStream | RequestDetailedFile;
export const APIS = [ControlRouterApi, EndpointsRouterApi, HomeRouterApi, HybridDataHomeRouterApi, InfoRouterApi, LogsRouterApi, MetricRouterApi, RegistrationRouterApi, SqlInstanceRouterApi, SqlOperatorUpgradeRouterApi, TokenRouterApi];

View File

@@ -0,0 +1,396 @@
/**
* SQL Server Big Data Cluster API
* OpenAPI specification for **SQL Server Big Data Cluster**.
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import localVarRequest = require('request');
import http = require('http');
/* tslint:disable:no-unused-locals */
import { ClusterPatchModel } from '../model/clusterPatchModel';
import { Authentication, HttpBasicAuth, HttpBearerAuth, Interceptor, ObjectSerializer, VoidAuth } from '../model/models';
import { ResourceStatusModel } from '../model/resourceStatusModel';
import { ServiceStatusModel } from '../model/serviceStatusModel';
import { HttpError } from './apis';
let defaultBasePath = 'https://0.0.0.0:30080';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
export enum ControlRouterApiApiKeys {
}
export class ControlRouterApi {
protected _basePath = defaultBasePath;
protected _defaultHeaders : any = {};
protected _useQuerystring : boolean = false;
protected authentications = {
'default': <Authentication>new VoidAuth(),
'BasicAuth': new HttpBasicAuth(),
'BearerAuth': new HttpBearerAuth(),
}
protected interceptors: Interceptor[] = [];
constructor(basePath?: string);
constructor(username: string, password: string, basePath?: string);
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
if (password) {
this.username = basePathOrUsername;
this.password = password
if (basePath) {
this.basePath = basePath;
}
} else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername
}
}
}
set useQuerystring(value: boolean) {
this._useQuerystring = value;
}
set basePath(basePath: string) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders: any) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
public setDefaultAuthentication(auth: Authentication) {
this.authentications.default = auth;
}
public setApiKey(key: ControlRouterApiApiKeys, value: string) {
(this.authentications as any)[ControlRouterApiApiKeys[key]].apiKey = value;
}
set username(username: string) {
this.authentications.BasicAuth.username = username;
}
set password(password: string) {
this.authentications.BasicAuth.password = password;
}
set accessToken(accessToken: string | (() => string)) {
this.authentications.BearerAuth.accessToken = accessToken;
}
public addInterceptor(interceptor: Interceptor) {
this.interceptors.push(interceptor);
}
/**
*
* @summary Redirects to the dashboard UI of the specified instance.
* @param instanceName The name of the instance for which you want the dashboard.
* @param linkType The name of the dashboard UI you would like.
*/
public async apiV1ControlInstancesInstanceNameStatusLinkTypeUiGet (instanceName: string, linkType: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
const localVarPath = this.basePath + '/api/v1/control/instances/{instanceName}/status/{linkType}/ui'
.replace('{' + 'instanceName' + '}', encodeURIComponent(String(instanceName)))
.replace('{' + 'linkType' + '}', encodeURIComponent(String(linkType)));
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
let localVarFormParams: any = {};
// verify required parameter 'instanceName' is not null or undefined
if (instanceName === null || instanceName === undefined) {
throw new Error('Required parameter instanceName was null or undefined when calling apiV1ControlInstancesInstanceNameStatusLinkTypeUiGet.');
}
// verify required parameter 'linkType' is not null or undefined
if (linkType === null || linkType === undefined) {
throw new Error('Required parameter linkType was null or undefined when calling apiV1ControlInstancesInstanceNameStatusLinkTypeUiGet.');
}
(<any>Object).assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions: localVarRequest.Options = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BasicAuth.username && this.authentications.BasicAuth.password) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BasicAuth.applyToRequest(localVarRequestOptions));
}
if (this.authentications.BearerAuth.accessToken) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerAuth.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
(<any>localVarRequestOptions).formData = localVarFormParams;
} else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
} else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
} else {
reject(new HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
*
* @summary Upgrades the control plane.
* @param clusterPatchModel
*/
public async apiV1ControlPatch (clusterPatchModel?: ClusterPatchModel, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
const localVarPath = this.basePath + '/api/v1/control';
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
let localVarFormParams: any = {};
(<any>Object).assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions: localVarRequest.Options = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: ObjectSerializer.serialize(clusterPatchModel, "ClusterPatchModel")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BasicAuth.username && this.authentications.BasicAuth.password) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BasicAuth.applyToRequest(localVarRequestOptions));
}
if (this.authentications.BearerAuth.accessToken) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerAuth.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
(<any>localVarRequestOptions).formData = localVarFormParams;
} else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
} else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
} else {
reject(new HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
*
* @summary Gets the status of the specified resource within the control plane.
* @param resourceName The name of the resource you would like the status of.
* @param all Whether you want all instances of all resources.
*/
public async apiV1ControlResourcesResourceNameStatusGet (resourceName: string, all?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ResourceStatusModel; }> {
const localVarPath = this.basePath + '/api/v1/control/resources/{resourceName}/status'
.replace('{' + 'resourceName' + '}', encodeURIComponent(String(resourceName)));
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
const produces = ['text/plain', 'application/json', 'text/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams: any = {};
// verify required parameter 'resourceName' is not null or undefined
if (resourceName === null || resourceName === undefined) {
throw new Error('Required parameter resourceName was null or undefined when calling apiV1ControlResourcesResourceNameStatusGet.');
}
if (all !== undefined) {
localVarQueryParameters['all'] = ObjectSerializer.serialize(all, "boolean");
}
(<any>Object).assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions: localVarRequest.Options = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BasicAuth.username && this.authentications.BasicAuth.password) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BasicAuth.applyToRequest(localVarRequestOptions));
}
if (this.authentications.BearerAuth.accessToken) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerAuth.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
(<any>localVarRequestOptions).formData = localVarFormParams;
} else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise<{ response: http.IncomingMessage; body: ResourceStatusModel; }>((resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
} else {
body = ObjectSerializer.deserialize(body, "ResourceStatusModel");
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
} else {
reject(new HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
*
* @summary Gets the status of the control plane.
* @param all Whether you want all instances of all resources.
*/
public async apiV1ControlStatusGet (all?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<ServiceStatusModel>; }> {
const localVarPath = this.basePath + '/api/v1/control/status';
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
const produces = ['text/plain', 'application/json', 'text/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams: any = {};
if (all !== undefined) {
localVarQueryParameters['all'] = ObjectSerializer.serialize(all, "boolean");
}
(<any>Object).assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions: localVarRequest.Options = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BasicAuth.username && this.authentications.BasicAuth.password) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BasicAuth.applyToRequest(localVarRequestOptions));
}
if (this.authentications.BearerAuth.accessToken) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerAuth.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
(<any>localVarRequestOptions).formData = localVarFormParams;
} else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise<{ response: http.IncomingMessage; body: Array<ServiceStatusModel>; }>((resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
} else {
body = ObjectSerializer.deserialize(body, "Array<ServiceStatusModel>");
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
} else {
reject(new HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}

View File

@@ -0,0 +1,248 @@
/**
* SQL Server Big Data Cluster API
* OpenAPI specification for **SQL Server Big Data Cluster**.
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import localVarRequest = require('request');
import http = require('http');
/* tslint:disable:no-unused-locals */
import { EndpointModel } from '../model/endpointModel';
import { Authentication, HttpBasicAuth, HttpBearerAuth, Interceptor, ObjectSerializer, VoidAuth } from '../model/models';
import { HttpError } from './apis';
let defaultBasePath = 'https://0.0.0.0:30080';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
export enum EndpointsRouterApiApiKeys {
}
export class EndpointsRouterApi {
protected _basePath = defaultBasePath;
protected _defaultHeaders : any = {};
protected _useQuerystring : boolean = false;
protected authentications = {
'default': <Authentication>new VoidAuth(),
'BasicAuth': new HttpBasicAuth(),
'BearerAuth': new HttpBearerAuth(),
}
protected interceptors: Interceptor[] = [];
constructor(basePath?: string);
constructor(username: string, password: string, basePath?: string);
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
if (password) {
this.username = basePathOrUsername;
this.password = password
if (basePath) {
this.basePath = basePath;
}
} else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername
}
}
}
set useQuerystring(value: boolean) {
this._useQuerystring = value;
}
set basePath(basePath: string) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders: any) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
public setDefaultAuthentication(auth: Authentication) {
this.authentications.default = auth;
}
public setApiKey(key: EndpointsRouterApiApiKeys, value: string) {
(this.authentications as any)[EndpointsRouterApiApiKeys[key]].apiKey = value;
}
set username(username: string) {
this.authentications.BasicAuth.username = username;
}
set password(password: string) {
this.authentications.BasicAuth.password = password;
}
set accessToken(accessToken: string | (() => string)) {
this.authentications.BearerAuth.accessToken = accessToken;
}
public addInterceptor(interceptor: Interceptor) {
this.interceptors.push(interceptor);
}
/**
*
* @summary Gets the endpoint with the specified name.
* @param endpointName The name of the endpoint you want.
*/
public async apiV1BdcEndpointsEndpointNameGet (endpointName: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: EndpointModel; }> {
const localVarPath = this.basePath + '/api/v1/bdc/endpoints/{endpointName}'
.replace('{' + 'endpointName' + '}', encodeURIComponent(String(endpointName)));
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
const produces = ['text/plain', 'application/json', 'text/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams: any = {};
// verify required parameter 'endpointName' is not null or undefined
if (endpointName === null || endpointName === undefined) {
throw new Error('Required parameter endpointName was null or undefined when calling apiV1BdcEndpointsEndpointNameGet.');
}
(<any>Object).assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions: localVarRequest.Options = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BasicAuth.username && this.authentications.BasicAuth.password) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BasicAuth.applyToRequest(localVarRequestOptions));
}
if (this.authentications.BearerAuth.accessToken) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerAuth.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
(<any>localVarRequestOptions).formData = localVarFormParams;
} else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise<{ response: http.IncomingMessage; body: EndpointModel; }>((resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
} else {
body = ObjectSerializer.deserialize(body, "EndpointModel");
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
} else {
reject(new HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
*
* @summary Gets the endpoints of the cluster.
*/
public async apiV1BdcEndpointsGet (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<EndpointModel>; }> {
const localVarPath = this.basePath + '/api/v1/bdc/endpoints';
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
const produces = ['text/plain', 'application/json', 'text/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams: any = {};
(<any>Object).assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions: localVarRequest.Options = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BasicAuth.username && this.authentications.BasicAuth.password) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BasicAuth.applyToRequest(localVarRequestOptions));
}
if (this.authentications.BearerAuth.accessToken) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerAuth.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
(<any>localVarRequestOptions).formData = localVarFormParams;
} else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise<{ response: http.IncomingMessage; body: Array<EndpointModel>; }>((resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
} else {
body = ObjectSerializer.deserialize(body, "Array<EndpointModel>");
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
} else {
reject(new HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}

View File

@@ -0,0 +1,224 @@
/**
* SQL Server Big Data Cluster API
* OpenAPI specification for **SQL Server Big Data Cluster**.
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import localVarRequest = require('request');
import http = require('http');
/* tslint:disable:no-unused-locals */
import { Authentication, HttpBasicAuth, HttpBearerAuth, Interceptor, VoidAuth } from '../model/models';
import { HttpError } from './apis';
let defaultBasePath = 'https://0.0.0.0:30080';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
export enum HomeRouterApiApiKeys {
}
export class HomeRouterApi {
protected _basePath = defaultBasePath;
protected _defaultHeaders : any = {};
protected _useQuerystring : boolean = false;
protected authentications = {
'default': <Authentication>new VoidAuth(),
'BasicAuth': new HttpBasicAuth(),
'BearerAuth': new HttpBearerAuth(),
}
protected interceptors: Interceptor[] = [];
constructor(basePath?: string);
constructor(username: string, password: string, basePath?: string);
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
if (password) {
this.username = basePathOrUsername;
this.password = password
if (basePath) {
this.basePath = basePath;
}
} else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername
}
}
}
set useQuerystring(value: boolean) {
this._useQuerystring = value;
}
set basePath(basePath: string) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders: any) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
public setDefaultAuthentication(auth: Authentication) {
this.authentications.default = auth;
}
public setApiKey(key: HomeRouterApiApiKeys, value: string) {
(this.authentications as any)[HomeRouterApiApiKeys[key]].apiKey = value;
}
set username(username: string) {
this.authentications.BasicAuth.username = username;
}
set password(password: string) {
this.authentications.BasicAuth.password = password;
}
set accessToken(accessToken: string | (() => string)) {
this.authentications.BearerAuth.accessToken = accessToken;
}
public addInterceptor(interceptor: Interceptor) {
this.interceptors.push(interceptor);
}
/**
*
* @summary Retrieves home page of controller service.
*/
public async apiV1Get (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
const localVarPath = this.basePath + '/api/v1';
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
let localVarFormParams: any = {};
(<any>Object).assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions: localVarRequest.Options = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BasicAuth.username && this.authentications.BasicAuth.password) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BasicAuth.applyToRequest(localVarRequestOptions));
}
if (this.authentications.BearerAuth.accessToken) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerAuth.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
(<any>localVarRequestOptions).formData = localVarFormParams;
} else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
} else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
} else {
reject(new HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
*
* @summary Determines if the controller is available.
*/
public async apiV1PingGet (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
const localVarPath = this.basePath + '/api/v1/ping';
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
let localVarFormParams: any = {};
(<any>Object).assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions: localVarRequest.Options = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BasicAuth.username && this.authentications.BasicAuth.password) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BasicAuth.applyToRequest(localVarRequestOptions));
}
if (this.authentications.BearerAuth.accessToken) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerAuth.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
(<any>localVarRequestOptions).formData = localVarFormParams;
} else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
} else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
} else {
reject(new HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}

View File

@@ -0,0 +1,222 @@
/**
* SQL Server Big Data Cluster API
* OpenAPI specification for **SQL Server Big Data Cluster**.
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import localVarRequest = require('request');
import http = require('http');
/* tslint:disable:no-unused-locals */
import { Authentication, HttpBasicAuth, HttpBearerAuth, Interceptor, VoidAuth } from '../model/models';
import { HttpError } from './apis';
let defaultBasePath = 'https://0.0.0.0:30080';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
export enum HybridDataHomeRouterApiApiKeys {
}
export class HybridDataHomeRouterApi {
protected _basePath = defaultBasePath;
protected _defaultHeaders : any = {};
protected _useQuerystring : boolean = false;
protected authentications = {
'default': <Authentication>new VoidAuth(),
'BasicAuth': new HttpBasicAuth(),
'BearerAuth': new HttpBearerAuth(),
}
protected interceptors: Interceptor[] = [];
constructor(basePath?: string);
constructor(username: string, password: string, basePath?: string);
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
if (password) {
this.username = basePathOrUsername;
this.password = password
if (basePath) {
this.basePath = basePath;
}
} else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername
}
}
}
set useQuerystring(value: boolean) {
this._useQuerystring = value;
}
set basePath(basePath: string) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders: any) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
public setDefaultAuthentication(auth: Authentication) {
this.authentications.default = auth;
}
public setApiKey(key: HybridDataHomeRouterApiApiKeys, value: string) {
(this.authentications as any)[HybridDataHomeRouterApiApiKeys[key]].apiKey = value;
}
set username(username: string) {
this.authentications.BasicAuth.username = username;
}
set password(password: string) {
this.authentications.BasicAuth.password = password;
}
set accessToken(accessToken: string | (() => string)) {
this.authentications.BearerAuth.accessToken = accessToken;
}
public addInterceptor(interceptor: Interceptor) {
this.interceptors.push(interceptor);
}
/**
*
*/
public async apiV1HybridGet (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
const localVarPath = this.basePath + '/api/v1/hybrid';
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
let localVarFormParams: any = {};
(<any>Object).assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions: localVarRequest.Options = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BasicAuth.username && this.authentications.BasicAuth.password) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BasicAuth.applyToRequest(localVarRequestOptions));
}
if (this.authentications.BearerAuth.accessToken) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerAuth.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
(<any>localVarRequestOptions).formData = localVarFormParams;
} else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
} else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
} else {
reject(new HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
*
*/
public async apiV1HybridPingGet (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
const localVarPath = this.basePath + '/api/v1/hybrid/ping';
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
let localVarFormParams: any = {};
(<any>Object).assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions: localVarRequest.Options = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BasicAuth.username && this.authentications.BasicAuth.password) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BasicAuth.applyToRequest(localVarRequestOptions));
}
if (this.authentications.BearerAuth.accessToken) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerAuth.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
(<any>localVarRequestOptions).formData = localVarFormParams;
} else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
} else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
} else {
reject(new HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}

View File

@@ -0,0 +1,164 @@
/**
* SQL Server Big Data Cluster API
* OpenAPI specification for **SQL Server Big Data Cluster**.
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import localVarRequest = require('request');
import http = require('http');
/* tslint:disable:no-unused-locals */
import { Authentication, HttpBasicAuth, HttpBearerAuth, Interceptor, VoidAuth } from '../model/models';
import { HttpError } from './apis';
let defaultBasePath = 'https://0.0.0.0:30080';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
export enum InfoRouterApiApiKeys {
}
export class InfoRouterApi {
protected _basePath = defaultBasePath;
protected _defaultHeaders : any = {};
protected _useQuerystring : boolean = false;
protected authentications = {
'default': <Authentication>new VoidAuth(),
'BasicAuth': new HttpBasicAuth(),
'BearerAuth': new HttpBearerAuth(),
}
protected interceptors: Interceptor[] = [];
constructor(basePath?: string);
constructor(username: string, password: string, basePath?: string);
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
if (password) {
this.username = basePathOrUsername;
this.password = password
if (basePath) {
this.basePath = basePath;
}
} else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername
}
}
}
set useQuerystring(value: boolean) {
this._useQuerystring = value;
}
set basePath(basePath: string) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders: any) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
public setDefaultAuthentication(auth: Authentication) {
this.authentications.default = auth;
}
public setApiKey(key: InfoRouterApiApiKeys, value: string) {
(this.authentications as any)[InfoRouterApiApiKeys[key]].apiKey = value;
}
set username(username: string) {
this.authentications.BasicAuth.username = username;
}
set password(password: string) {
this.authentications.BasicAuth.password = password;
}
set accessToken(accessToken: string | (() => string)) {
this.authentications.BearerAuth.accessToken = accessToken;
}
public addInterceptor(interceptor: Interceptor) {
this.interceptors.push(interceptor);
}
/**
*
* @summary Get cluster info.
*/
public async apiV1InfoGet (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
const localVarPath = this.basePath + '/api/v1/info';
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
let localVarFormParams: any = {};
(<any>Object).assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions: localVarRequest.Options = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BasicAuth.username && this.authentications.BasicAuth.password) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BasicAuth.applyToRequest(localVarRequestOptions));
}
if (this.authentications.BearerAuth.accessToken) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerAuth.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
(<any>localVarRequestOptions).formData = localVarFormParams;
} else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
} else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
} else {
reject(new HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}

View File

@@ -0,0 +1,175 @@
/**
* SQL Server Big Data Cluster API
* OpenAPI specification for **SQL Server Big Data Cluster**.
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import localVarRequest = require('request');
import http = require('http');
/* tslint:disable:no-unused-locals */
import { LogsRequest } from '../model/logsRequest';
import { Authentication, HttpBasicAuth, HttpBearerAuth, Interceptor, ObjectSerializer, VoidAuth } from '../model/models';
import { HttpError } from './apis';
let defaultBasePath = 'https://0.0.0.0:30080';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
export enum LogsRouterApiApiKeys {
}
export class LogsRouterApi {
protected _basePath = defaultBasePath;
protected _defaultHeaders : any = {};
protected _useQuerystring : boolean = false;
protected authentications = {
'default': <Authentication>new VoidAuth(),
'BasicAuth': new HttpBasicAuth(),
'BearerAuth': new HttpBearerAuth(),
}
protected interceptors: Interceptor[] = [];
constructor(basePath?: string);
constructor(username: string, password: string, basePath?: string);
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
if (password) {
this.username = basePathOrUsername;
this.password = password
if (basePath) {
this.basePath = basePath;
}
} else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername
}
}
}
set useQuerystring(value: boolean) {
this._useQuerystring = value;
}
set basePath(basePath: string) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders: any) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
public setDefaultAuthentication(auth: Authentication) {
this.authentications.default = auth;
}
public setApiKey(key: LogsRouterApiApiKeys, value: string) {
(this.authentications as any)[LogsRouterApiApiKeys[key]].apiKey = value;
}
set username(username: string) {
this.authentications.BasicAuth.username = username;
}
set password(password: string) {
this.authentications.BasicAuth.password = password;
}
set accessToken(accessToken: string | (() => string)) {
this.authentications.BearerAuth.accessToken = accessToken;
}
public addInterceptor(interceptor: Interceptor) {
this.interceptors.push(interceptor);
}
/**
*
* @summary Gets logs from Elasticsearch.
* @param logsRequest
*/
public async apiV1LogsPost (logsRequest?: LogsRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: object; }> {
const localVarPath = this.basePath + '/api/v1/logs';
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
const produces = ['application/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams: any = {};
(<any>Object).assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions: localVarRequest.Options = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: ObjectSerializer.serialize(logsRequest, "LogsRequest")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BasicAuth.username && this.authentications.BasicAuth.password) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BasicAuth.applyToRequest(localVarRequestOptions));
}
if (this.authentications.BearerAuth.accessToken) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerAuth.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
(<any>localVarRequestOptions).formData = localVarFormParams;
} else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise<{ response: http.IncomingMessage; body: object; }>((resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
} else {
body = ObjectSerializer.deserialize(body, "object");
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
} else {
reject(new HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}

View File

@@ -0,0 +1,171 @@
/**
* SQL Server Big Data Cluster API
* OpenAPI specification for **SQL Server Big Data Cluster**.
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import localVarRequest = require('request');
import http = require('http');
/* tslint:disable:no-unused-locals */
import { Authentication, HttpBasicAuth, HttpBearerAuth, Interceptor, ObjectSerializer, VoidAuth } from '../model/models';
import { HttpError } from './apis';
let defaultBasePath = 'https://0.0.0.0:30080';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
export enum MetricRouterApiApiKeys {
}
export class MetricRouterApi {
protected _basePath = defaultBasePath;
protected _defaultHeaders : any = {};
protected _useQuerystring : boolean = false;
protected authentications = {
'default': <Authentication>new VoidAuth(),
'BasicAuth': new HttpBasicAuth(),
'BearerAuth': new HttpBearerAuth(),
}
protected interceptors: Interceptor[] = [];
constructor(basePath?: string);
constructor(username: string, password: string, basePath?: string);
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
if (password) {
this.username = basePathOrUsername;
this.password = password
if (basePath) {
this.basePath = basePath;
}
} else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername
}
}
}
set useQuerystring(value: boolean) {
this._useQuerystring = value;
}
set basePath(basePath: string) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders: any) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
public setDefaultAuthentication(auth: Authentication) {
this.authentications.default = auth;
}
public setApiKey(key: MetricRouterApiApiKeys, value: string) {
(this.authentications as any)[MetricRouterApiApiKeys[key]].apiKey = value;
}
set username(username: string) {
this.authentications.BasicAuth.username = username;
}
set password(password: string) {
this.authentications.BasicAuth.password = password;
}
set accessToken(accessToken: string | (() => string)) {
this.authentications.BearerAuth.accessToken = accessToken;
}
public addInterceptor(interceptor: Interceptor) {
this.interceptors.push(interceptor);
}
/**
*
*/
public async apiV1MetricsPost (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: object; }> {
const localVarPath = this.basePath + '/api/v1/metrics';
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
const produces = ['application/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams: any = {};
(<any>Object).assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions: localVarRequest.Options = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BasicAuth.username && this.authentications.BasicAuth.password) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BasicAuth.applyToRequest(localVarRequestOptions));
}
if (this.authentications.BearerAuth.accessToken) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerAuth.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
(<any>localVarRequestOptions).formData = localVarFormParams;
} else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise<{ response: http.IncomingMessage; body: object; }>((resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
} else {
body = ObjectSerializer.deserialize(body, "object");
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
} else {
reject(new HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}

View File

@@ -0,0 +1,321 @@
/**
* SQL Server Big Data Cluster API
* OpenAPI specification for **SQL Server Big Data Cluster**.
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import localVarRequest = require('request');
import http = require('http');
/* tslint:disable:no-unused-locals */
import { CreateRegistrationRequest } from '../model/createRegistrationRequest';
import { Authentication, HttpBasicAuth, HttpBearerAuth, Interceptor, ObjectSerializer, VoidAuth } from '../model/models';
import { RegistrationResponse } from '../model/registrationResponse';
import { HttpError } from './apis';
let defaultBasePath = 'https://0.0.0.0:30080';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
export enum RegistrationRouterApiApiKeys {
}
export class RegistrationRouterApi {
protected _basePath = defaultBasePath;
protected _defaultHeaders : any = {};
protected _useQuerystring : boolean = false;
protected authentications = {
'default': <Authentication>new VoidAuth(),
'BasicAuth': new HttpBasicAuth(),
'BearerAuth': new HttpBearerAuth(),
}
protected interceptors: Interceptor[] = [];
constructor(basePath?: string);
constructor(username: string, password: string, basePath?: string);
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
if (password) {
this.username = basePathOrUsername;
this.password = password
if (basePath) {
this.basePath = basePath;
}
} else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername
}
}
}
set useQuerystring(value: boolean) {
this._useQuerystring = value;
}
set basePath(basePath: string) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders: any) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
public setDefaultAuthentication(auth: Authentication) {
this.authentications.default = auth;
}
public setApiKey(key: RegistrationRouterApiApiKeys, value: string) {
(this.authentications as any)[RegistrationRouterApiApiKeys[key]].apiKey = value;
}
set username(username: string) {
this.authentications.BasicAuth.username = username;
}
set password(password: string) {
this.authentications.BasicAuth.password = password;
}
set accessToken(accessToken: string | (() => string)) {
this.authentications.BearerAuth.accessToken = accessToken;
}
public addInterceptor(interceptor: Interceptor) {
this.interceptors.push(interceptor);
}
/**
*
* @param createRegistrationRequest
*/
public async apiV1RegistrationCreatePut (createRegistrationRequest?: CreateRegistrationRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
const localVarPath = this.basePath + '/api/v1/registration/create';
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
let localVarFormParams: any = {};
(<any>Object).assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions: localVarRequest.Options = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: ObjectSerializer.serialize(createRegistrationRequest, "CreateRegistrationRequest")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BasicAuth.username && this.authentications.BasicAuth.password) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BasicAuth.applyToRequest(localVarRequestOptions));
}
if (this.authentications.BearerAuth.accessToken) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerAuth.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
(<any>localVarRequestOptions).formData = localVarFormParams;
} else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
} else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
} else {
reject(new HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
*
* @param ns
*/
public async apiV1RegistrationListResourcesNsGet (ns: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<RegistrationResponse>; }> {
const localVarPath = this.basePath + '/api/v1/registration/listResources/{ns}'
.replace('{' + 'ns' + '}', encodeURIComponent(String(ns)));
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
const produces = ['text/plain', 'application/json', 'text/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams: any = {};
// verify required parameter 'ns' is not null or undefined
if (ns === null || ns === undefined) {
throw new Error('Required parameter ns was null or undefined when calling apiV1RegistrationListResourcesNsGet.');
}
(<any>Object).assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions: localVarRequest.Options = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BasicAuth.username && this.authentications.BasicAuth.password) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BasicAuth.applyToRequest(localVarRequestOptions));
}
if (this.authentications.BearerAuth.accessToken) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerAuth.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
(<any>localVarRequestOptions).formData = localVarFormParams;
} else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise<{ response: http.IncomingMessage; body: Array<RegistrationResponse>; }>((resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
} else {
body = ObjectSerializer.deserialize(body, "Array<RegistrationResponse>");
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
} else {
reject(new HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
*
* @param ns
* @param name
* @param isDeleted
*/
public async apiV1RegistrationNsNameIsDeletedDelete (ns: string, name: string, isDeleted: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
const localVarPath = this.basePath + '/api/v1/registration/{ns}/{name}/{isDeleted}'
.replace('{' + 'ns' + '}', encodeURIComponent(String(ns)))
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'isDeleted' + '}', encodeURIComponent(String(isDeleted)));
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
let localVarFormParams: any = {};
// verify required parameter 'ns' is not null or undefined
if (ns === null || ns === undefined) {
throw new Error('Required parameter ns was null or undefined when calling apiV1RegistrationNsNameIsDeletedDelete.');
}
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling apiV1RegistrationNsNameIsDeletedDelete.');
}
// verify required parameter 'isDeleted' is not null or undefined
if (isDeleted === null || isDeleted === undefined) {
throw new Error('Required parameter isDeleted was null or undefined when calling apiV1RegistrationNsNameIsDeletedDelete.');
}
(<any>Object).assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions: localVarRequest.Options = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BasicAuth.username && this.authentications.BasicAuth.password) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BasicAuth.applyToRequest(localVarRequestOptions));
}
if (this.authentications.BearerAuth.accessToken) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerAuth.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
(<any>localVarRequestOptions).formData = localVarFormParams;
} else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
} else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
} else {
reject(new HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}

View File

@@ -0,0 +1,496 @@
/**
* SQL Server Big Data Cluster API
* OpenAPI specification for **SQL Server Big Data Cluster**.
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import localVarRequest = require('request');
import http = require('http');
/* tslint:disable:no-unused-locals */
import { CreateSqlInstanceMessage } from '../model/createSqlInstanceMessage';
import { Authentication, HttpBasicAuth, HttpBearerAuth, Interceptor, ObjectSerializer, VoidAuth } from '../model/models';
import { HttpError } from './apis';
let defaultBasePath = 'https://0.0.0.0:30080';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
export enum SqlInstanceRouterApiApiKeys {
}
export class SqlInstanceRouterApi {
protected _basePath = defaultBasePath;
protected _defaultHeaders : any = {};
protected _useQuerystring : boolean = false;
protected authentications = {
'default': <Authentication>new VoidAuth(),
'BasicAuth': new HttpBasicAuth(),
'BearerAuth': new HttpBearerAuth(),
}
protected interceptors: Interceptor[] = [];
constructor(basePath?: string);
constructor(username: string, password: string, basePath?: string);
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
if (password) {
this.username = basePathOrUsername;
this.password = password
if (basePath) {
this.basePath = basePath;
}
} else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername
}
}
}
set useQuerystring(value: boolean) {
this._useQuerystring = value;
}
set basePath(basePath: string) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders: any) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
public setDefaultAuthentication(auth: Authentication) {
this.authentications.default = auth;
}
public setApiKey(key: SqlInstanceRouterApiApiKeys, value: string) {
(this.authentications as any)[SqlInstanceRouterApiApiKeys[key]].apiKey = value;
}
set username(username: string) {
this.authentications.BasicAuth.username = username;
}
set password(password: string) {
this.authentications.BasicAuth.password = password;
}
set accessToken(accessToken: string | (() => string)) {
this.authentications.BearerAuth.accessToken = accessToken;
}
public addInterceptor(interceptor: Interceptor) {
this.interceptors.push(interceptor);
}
/**
*
* @param createSqlInstanceMessage
*/
public async apiV1HybridSqlCreatePost (createSqlInstanceMessage?: CreateSqlInstanceMessage, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
const localVarPath = this.basePath + '/api/v1/hybrid/sql/create';
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
let localVarFormParams: any = {};
(<any>Object).assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions: localVarRequest.Options = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: ObjectSerializer.serialize(createSqlInstanceMessage, "CreateSqlInstanceMessage")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BasicAuth.username && this.authentications.BasicAuth.password) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BasicAuth.applyToRequest(localVarRequestOptions));
}
if (this.authentications.BearerAuth.accessToken) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerAuth.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
(<any>localVarRequestOptions).formData = localVarFormParams;
} else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
} else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
} else {
reject(new HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
*
* @param ns
*/
public async apiV1HybridSqlNsGet (ns: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
const localVarPath = this.basePath + '/api/v1/hybrid/sql/{ns}'
.replace('{' + 'ns' + '}', encodeURIComponent(String(ns)));
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
let localVarFormParams: any = {};
// verify required parameter 'ns' is not null or undefined
if (ns === null || ns === undefined) {
throw new Error('Required parameter ns was null or undefined when calling apiV1HybridSqlNsGet.');
}
(<any>Object).assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions: localVarRequest.Options = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BasicAuth.username && this.authentications.BasicAuth.password) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BasicAuth.applyToRequest(localVarRequestOptions));
}
if (this.authentications.BearerAuth.accessToken) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerAuth.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
(<any>localVarRequestOptions).formData = localVarFormParams;
} else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
} else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
} else {
reject(new HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
*
* @param ns
* @param name
*/
public async apiV1HybridSqlNsNameDelete (ns: string, name: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
const localVarPath = this.basePath + '/api/v1/hybrid/sql/{ns}/{name}'
.replace('{' + 'ns' + '}', encodeURIComponent(String(ns)))
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
let localVarFormParams: any = {};
// verify required parameter 'ns' is not null or undefined
if (ns === null || ns === undefined) {
throw new Error('Required parameter ns was null or undefined when calling apiV1HybridSqlNsNameDelete.');
}
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling apiV1HybridSqlNsNameDelete.');
}
(<any>Object).assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions: localVarRequest.Options = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BasicAuth.username && this.authentications.BasicAuth.password) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BasicAuth.applyToRequest(localVarRequestOptions));
}
if (this.authentications.BearerAuth.accessToken) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerAuth.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
(<any>localVarRequestOptions).formData = localVarFormParams;
} else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
} else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
} else {
reject(new HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
*
* @param ns
* @param name
*/
public async apiV1HybridSqlNsNameGet (ns: string, name: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
const localVarPath = this.basePath + '/api/v1/hybrid/sql/{ns}/{name}'
.replace('{' + 'ns' + '}', encodeURIComponent(String(ns)))
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
let localVarFormParams: any = {};
// verify required parameter 'ns' is not null or undefined
if (ns === null || ns === undefined) {
throw new Error('Required parameter ns was null or undefined when calling apiV1HybridSqlNsNameGet.');
}
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling apiV1HybridSqlNsNameGet.');
}
(<any>Object).assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions: localVarRequest.Options = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BasicAuth.username && this.authentications.BasicAuth.password) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BasicAuth.applyToRequest(localVarRequestOptions));
}
if (this.authentications.BearerAuth.accessToken) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerAuth.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
(<any>localVarRequestOptions).formData = localVarFormParams;
} else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
} else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
} else {
reject(new HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
*
*/
public async apiV1HybridSqlPingpostsqlPost (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
const localVarPath = this.basePath + '/api/v1/hybrid/sql/pingpostsql';
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
let localVarFormParams: any = {};
(<any>Object).assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions: localVarRequest.Options = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BasicAuth.username && this.authentications.BasicAuth.password) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BasicAuth.applyToRequest(localVarRequestOptions));
}
if (this.authentications.BearerAuth.accessToken) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerAuth.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
(<any>localVarRequestOptions).formData = localVarFormParams;
} else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
} else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
} else {
reject(new HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
*
*/
public async apiV1HybridSqlPingsqlGet (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
const localVarPath = this.basePath + '/api/v1/hybrid/sql/pingsql';
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
let localVarFormParams: any = {};
(<any>Object).assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions: localVarRequest.Options = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BasicAuth.username && this.authentications.BasicAuth.password) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BasicAuth.applyToRequest(localVarRequestOptions));
}
if (this.authentications.BearerAuth.accessToken) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerAuth.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
(<any>localVarRequestOptions).formData = localVarFormParams;
} else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
} else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
} else {
reject(new HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}

View File

@@ -0,0 +1,166 @@
/**
* SQL Server Big Data Cluster API
* OpenAPI specification for **SQL Server Big Data Cluster**.
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import localVarRequest = require('request');
import http = require('http');
/* tslint:disable:no-unused-locals */
import { ClusterPatchModel } from '../model/clusterPatchModel';
import { Authentication, HttpBasicAuth, HttpBearerAuth, Interceptor, ObjectSerializer, VoidAuth } from '../model/models';
import { HttpError } from './apis';
let defaultBasePath = 'https://0.0.0.0:30080';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
export enum SqlOperatorUpgradeRouterApiApiKeys {
}
export class SqlOperatorUpgradeRouterApi {
protected _basePath = defaultBasePath;
protected _defaultHeaders : any = {};
protected _useQuerystring : boolean = false;
protected authentications = {
'default': <Authentication>new VoidAuth(),
'BasicAuth': new HttpBasicAuth(),
'BearerAuth': new HttpBearerAuth(),
}
protected interceptors: Interceptor[] = [];
constructor(basePath?: string);
constructor(username: string, password: string, basePath?: string);
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
if (password) {
this.username = basePathOrUsername;
this.password = password
if (basePath) {
this.basePath = basePath;
}
} else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername
}
}
}
set useQuerystring(value: boolean) {
this._useQuerystring = value;
}
set basePath(basePath: string) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders: any) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
public setDefaultAuthentication(auth: Authentication) {
this.authentications.default = auth;
}
public setApiKey(key: SqlOperatorUpgradeRouterApiApiKeys, value: string) {
(this.authentications as any)[SqlOperatorUpgradeRouterApiApiKeys[key]].apiKey = value;
}
set username(username: string) {
this.authentications.BasicAuth.username = username;
}
set password(password: string) {
this.authentications.BasicAuth.password = password;
}
set accessToken(accessToken: string | (() => string)) {
this.authentications.BearerAuth.accessToken = accessToken;
}
public addInterceptor(interceptor: Interceptor) {
this.interceptors.push(interceptor);
}
/**
*
* @param clusterPatchModel
*/
public async apiV1HybridSqlPatch (clusterPatchModel?: ClusterPatchModel, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
const localVarPath = this.basePath + '/api/v1/hybrid/sql';
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
let localVarFormParams: any = {};
(<any>Object).assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions: localVarRequest.Options = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: ObjectSerializer.serialize(clusterPatchModel, "ClusterPatchModel")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BasicAuth.username && this.authentications.BasicAuth.password) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BasicAuth.applyToRequest(localVarRequestOptions));
}
if (this.authentications.BearerAuth.accessToken) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerAuth.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
(<any>localVarRequestOptions).formData = localVarFormParams;
} else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
} else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
} else {
reject(new HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}

View File

@@ -0,0 +1,172 @@
/**
* SQL Server Big Data Cluster API
* OpenAPI specification for **SQL Server Big Data Cluster**.
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import localVarRequest = require('request');
import http = require('http');
/* tslint:disable:no-unused-locals */
import { Authentication, HttpBasicAuth, HttpBearerAuth, Interceptor, ObjectSerializer, VoidAuth } from '../model/models';
import { TokenModel } from '../model/tokenModel';
import { HttpError } from './apis';
let defaultBasePath = 'https://0.0.0.0:30080';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
export enum TokenRouterApiApiKeys {
}
export class TokenRouterApi {
protected _basePath = defaultBasePath;
protected _defaultHeaders : any = {};
protected _useQuerystring : boolean = false;
protected authentications = {
'default': <Authentication>new VoidAuth(),
'BasicAuth': new HttpBasicAuth(),
'BearerAuth': new HttpBearerAuth(),
}
protected interceptors: Interceptor[] = [];
constructor(basePath?: string);
constructor(username: string, password: string, basePath?: string);
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
if (password) {
this.username = basePathOrUsername;
this.password = password
if (basePath) {
this.basePath = basePath;
}
} else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername
}
}
}
set useQuerystring(value: boolean) {
this._useQuerystring = value;
}
set basePath(basePath: string) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders: any) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
public setDefaultAuthentication(auth: Authentication) {
this.authentications.default = auth;
}
public setApiKey(key: TokenRouterApiApiKeys, value: string) {
(this.authentications as any)[TokenRouterApiApiKeys[key]].apiKey = value;
}
set username(username: string) {
this.authentications.BasicAuth.username = username;
}
set password(password: string) {
this.authentications.BasicAuth.password = password;
}
set accessToken(accessToken: string | (() => string)) {
this.authentications.BearerAuth.accessToken = accessToken;
}
public addInterceptor(interceptor: Interceptor) {
this.interceptors.push(interceptor);
}
/**
*
*/
public async apiV1TokenPost (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: TokenModel; }> {
const localVarPath = this.basePath + '/api/v1/token';
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
const produces = ['application/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams: any = {};
(<any>Object).assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions: localVarRequest.Options = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BasicAuth.username && this.authentications.BasicAuth.password) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BasicAuth.applyToRequest(localVarRequestOptions));
}
if (this.authentications.BearerAuth.accessToken) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerAuth.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
(<any>localVarRequestOptions).formData = localVarFormParams;
} else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise<{ response: http.IncomingMessage; body: TokenModel; }>((resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
} else {
body = ObjectSerializer.deserialize(body, "TokenModel");
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
} else {
reject(new HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}

View File

@@ -0,0 +1,97 @@
/**
* SQL Server Big Data Cluster API
* OpenAPI specification for **SQL Server Big Data Cluster**.
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export class ActiveDirectory {
'useInternalDomain'?: boolean;
'ouDistinguishedName': string;
'dnsIpAddresses'?: Array<string>;
'domainControllerFullyQualifiedDns'?: Array<string>;
'realm'?: string;
'domainDnsName': string;
'clusterAdmins': Array<string>;
'clusterUsers': Array<string>;
'appOwners'?: Array<string>;
'appReaders'?: Array<string>;
'kerberosDelegationMode'?: ActiveDirectory.KerberosDelegationModeEnum;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "useInternalDomain",
"baseName": "useInternalDomain",
"type": "boolean"
},
{
"name": "ouDistinguishedName",
"baseName": "ouDistinguishedName",
"type": "string"
},
{
"name": "dnsIpAddresses",
"baseName": "dnsIpAddresses",
"type": "Array<string>"
},
{
"name": "domainControllerFullyQualifiedDns",
"baseName": "domainControllerFullyQualifiedDns",
"type": "Array<string>"
},
{
"name": "realm",
"baseName": "realm",
"type": "string"
},
{
"name": "domainDnsName",
"baseName": "domainDnsName",
"type": "string"
},
{
"name": "clusterAdmins",
"baseName": "clusterAdmins",
"type": "Array<string>"
},
{
"name": "clusterUsers",
"baseName": "clusterUsers",
"type": "Array<string>"
},
{
"name": "appOwners",
"baseName": "appOwners",
"type": "Array<string>"
},
{
"name": "appReaders",
"baseName": "appReaders",
"type": "Array<string>"
},
{
"name": "kerberosDelegationMode",
"baseName": "kerberosDelegationMode",
"type": "ActiveDirectory.KerberosDelegationModeEnum"
} ];
static getAttributeTypeMap() {
return ActiveDirectory.attributeTypeMap;
}
}
export namespace ActiveDirectory {
export enum KerberosDelegationModeEnum {
None = <any> 'None',
ConstrainedDelegation = <any> 'ConstrainedDelegation',
UnconstrainedDelegation = <any> 'UnconstrainedDelegation'
}
}

View File

@@ -0,0 +1,36 @@
/**
* SQL Server Big Data Cluster API
* OpenAPI specification for **SQL Server Big Data Cluster**.
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export class ClusterPatchModel {
'targetVersion': string;
'targetRepository'?: string;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "targetVersion",
"baseName": "targetVersion",
"type": "string"
},
{
"name": "targetRepository",
"baseName": "targetRepository",
"type": "string"
} ];
static getAttributeTypeMap() {
return ClusterPatchModel.attributeTypeMap;
}
}

View File

@@ -0,0 +1,43 @@
/**
* SQL Server Big Data Cluster API
* OpenAPI specification for **SQL Server Big Data Cluster**.
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { RegistrationSpec } from './registrationSpec';
export class CreateRegistrationRequest {
'namespace'?: string;
'name'?: string;
'spec'?: RegistrationSpec;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "namespace",
"baseName": "namespace",
"type": "string"
},
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "spec",
"baseName": "spec",
"type": "RegistrationSpec"
} ];
static getAttributeTypeMap() {
return CreateRegistrationRequest.attributeTypeMap;
}
}

View File

@@ -0,0 +1,54 @@
/**
* SQL Server Big Data Cluster API
* OpenAPI specification for **SQL Server Big Data Cluster**.
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export class CreateSqlInstanceMessage {
'namespace'?: string;
'name'?: string;
'sysAdminPassword'?: string;
'vcores'?: string;
'memory'?: string;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "namespace",
"baseName": "namespace",
"type": "string"
},
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "sysAdminPassword",
"baseName": "sys_admin_password",
"type": "string"
},
{
"name": "vcores",
"baseName": "vcores",
"type": "string"
},
{
"name": "memory",
"baseName": "memory",
"type": "string"
} ];
static getAttributeTypeMap() {
return CreateSqlInstanceMessage.attributeTypeMap;
}
}

View File

@@ -0,0 +1,42 @@
/**
* SQL Server Big Data Cluster API
* OpenAPI specification for **SQL Server Big Data Cluster**.
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export class Dashboards {
'nodeMetricsUrl'?: string;
'sqlMetricsUrl'?: string;
'logsUrl'?: string;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "nodeMetricsUrl",
"baseName": "nodeMetricsUrl",
"type": "string"
},
{
"name": "sqlMetricsUrl",
"baseName": "sqlMetricsUrl",
"type": "string"
},
{
"name": "logsUrl",
"baseName": "logsUrl",
"type": "string"
} ];
static getAttributeTypeMap() {
return Dashboards.attributeTypeMap;
}
}

View File

@@ -0,0 +1,48 @@
/**
* SQL Server Big Data Cluster API
* OpenAPI specification for **SQL Server Big Data Cluster**.
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export class Docker {
'registry': string;
'repository': string;
'imageTag': string;
'imagePullPolicy'?: string;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "registry",
"baseName": "registry",
"type": "string"
},
{
"name": "repository",
"baseName": "repository",
"type": "string"
},
{
"name": "imageTag",
"baseName": "imageTag",
"type": "string"
},
{
"name": "imagePullPolicy",
"baseName": "imagePullPolicy",
"type": "string"
} ];
static getAttributeTypeMap() {
return Docker.attributeTypeMap;
}
}

View File

@@ -0,0 +1,54 @@
/**
* SQL Server Big Data Cluster API
* OpenAPI specification for **SQL Server Big Data Cluster**.
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export class Endpoint {
'name': string;
'serviceType'?: string;
'port': number;
'dnsName'?: string;
'dynamicDnsUpdate'?: boolean;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "serviceType",
"baseName": "serviceType",
"type": "string"
},
{
"name": "port",
"baseName": "port",
"type": "number"
},
{
"name": "dnsName",
"baseName": "dnsName",
"type": "string"
},
{
"name": "dynamicDnsUpdate",
"baseName": "dynamicDnsUpdate",
"type": "boolean"
} ];
static getAttributeTypeMap() {
return Endpoint.attributeTypeMap;
}
}

View File

@@ -0,0 +1,48 @@
/**
* SQL Server Big Data Cluster API
* OpenAPI specification for **SQL Server Big Data Cluster**.
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export class EndpointModel {
'name'?: string;
'description'?: string;
'endpoint'?: string;
'protocol'?: string;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "description",
"baseName": "description",
"type": "string"
},
{
"name": "endpoint",
"baseName": "endpoint",
"type": "string"
},
{
"name": "protocol",
"baseName": "protocol",
"type": "string"
} ];
static getAttributeTypeMap() {
return EndpointModel.attributeTypeMap;
}
}

View File

@@ -0,0 +1,55 @@
/**
* SQL Server Big Data Cluster API
* OpenAPI specification for **SQL Server Big Data Cluster**.
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { Dashboards } from './dashboards';
export class InstanceStatusModel {
'instanceName'?: string;
'state'?: string;
'healthStatus'?: string;
'details'?: string;
'dashboards'?: Dashboards;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "instanceName",
"baseName": "instanceName",
"type": "string"
},
{
"name": "state",
"baseName": "state",
"type": "string"
},
{
"name": "healthStatus",
"baseName": "healthStatus",
"type": "string"
},
{
"name": "details",
"baseName": "details",
"type": "string"
},
{
"name": "dashboards",
"baseName": "dashboards",
"type": "Dashboards"
} ];
static getAttributeTypeMap() {
return InstanceStatusModel.attributeTypeMap;
}
}

View File

@@ -0,0 +1,48 @@
/**
* SQL Server Big Data Cluster API
* OpenAPI specification for **SQL Server Big Data Cluster**.
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export class LogsRequest {
'startTime': string;
'endTime': string;
'termQueries'?: { [key: string]: string; };
'regexQueries'?: { [key: string]: string; };
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "startTime",
"baseName": "startTime",
"type": "string"
},
{
"name": "endTime",
"baseName": "endTime",
"type": "string"
},
{
"name": "termQueries",
"baseName": "termQueries",
"type": "{ [key: string]: string; }"
},
{
"name": "regexQueries",
"baseName": "regexQueries",
"type": "{ [key: string]: string; }"
} ];
static getAttributeTypeMap() {
return LogsRequest.attributeTypeMap;
}
}

View File

@@ -0,0 +1,42 @@
/**
* SQL Server Big Data Cluster API
* OpenAPI specification for **SQL Server Big Data Cluster**.
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export class Metadata {
'kind': string;
'name': string;
'namespace'?: string;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "namespace",
"baseName": "namespace",
"type": "string"
} ];
static getAttributeTypeMap() {
return Metadata.attributeTypeMap;
}
}

View File

@@ -0,0 +1,265 @@
export * from './activeDirectory';
export * from './clusterPatchModel';
export * from './createRegistrationRequest';
export * from './createSqlInstanceMessage';
export * from './dashboards';
export * from './docker';
export * from './endpoint';
export * from './endpointModel';
export * from './instanceStatusModel';
export * from './logsRequest';
export * from './metadata';
export * from './registrationResponse';
export * from './registrationSpec';
export * from './resourceStatusModel';
export * from './security';
export * from './serviceStatusModel';
export * from './storage';
export * from './storageSpec';
export * from './tokenModel';
import localVarRequest = require('request');
import { ActiveDirectory } from './activeDirectory';
import { ClusterPatchModel } from './clusterPatchModel';
import { CreateRegistrationRequest } from './createRegistrationRequest';
import { CreateSqlInstanceMessage } from './createSqlInstanceMessage';
import { Dashboards } from './dashboards';
import { Docker } from './docker';
import { Endpoint } from './endpoint';
import { EndpointModel } from './endpointModel';
import { InstanceStatusModel } from './instanceStatusModel';
import { LogsRequest } from './logsRequest';
import { Metadata } from './metadata';
import { RegistrationResponse } from './registrationResponse';
import { RegistrationSpec } from './registrationSpec';
import { ResourceStatusModel } from './resourceStatusModel';
import { Security } from './security';
import { ServiceStatusModel } from './serviceStatusModel';
import { Storage } from './storage';
import { StorageSpec } from './storageSpec';
import { TokenModel } from './tokenModel';
/* tslint:disable:no-unused-variable */
let primitives = [
"string",
"boolean",
"double",
"integer",
"long",
"float",
"number",
"any"
];
let enumsMap: {[index: string]: any} = {
"ActiveDirectory.KerberosDelegationModeEnum": ActiveDirectory.KerberosDelegationModeEnum,
"Security.KerberosDelegationModeEnum": Security.KerberosDelegationModeEnum,
}
let typeMap: {[index: string]: any} = {
"ActiveDirectory": ActiveDirectory,
"ClusterPatchModel": ClusterPatchModel,
"CreateRegistrationRequest": CreateRegistrationRequest,
"CreateSqlInstanceMessage": CreateSqlInstanceMessage,
"Dashboards": Dashboards,
"Docker": Docker,
"Endpoint": Endpoint,
"EndpointModel": EndpointModel,
"InstanceStatusModel": InstanceStatusModel,
"LogsRequest": LogsRequest,
"Metadata": Metadata,
"RegistrationResponse": RegistrationResponse,
"RegistrationSpec": RegistrationSpec,
"ResourceStatusModel": ResourceStatusModel,
"Security": Security,
"ServiceStatusModel": ServiceStatusModel,
"Storage": Storage,
"StorageSpec": StorageSpec,
"TokenModel": TokenModel,
}
export class ObjectSerializer {
public static findCorrectType(data: any, expectedType: string) {
if (data == undefined) {
return expectedType;
} else if (primitives.indexOf(expectedType.toLowerCase()) !== -1) {
return expectedType;
} else if (expectedType === "Date") {
return expectedType;
} else {
if (enumsMap[expectedType]) {
return expectedType;
}
if (!typeMap[expectedType]) {
return expectedType; // w/e we don't know the type
}
// Check the discriminator
let discriminatorProperty = typeMap[expectedType].discriminator;
if (discriminatorProperty == null) {
return expectedType; // the type does not have a discriminator. use it.
} else {
if (data[discriminatorProperty]) {
var discriminatorType = data[discriminatorProperty];
if(typeMap[discriminatorType]){
return discriminatorType; // use the type given in the discriminator
} else {
return expectedType; // discriminator did not map to a type
}
} else {
return expectedType; // discriminator was not present (or an empty string)
}
}
}
}
public static serialize(data: any, type: string) {
if (data == undefined) {
return data;
} else if (primitives.indexOf(type.toLowerCase()) !== -1) {
return data;
} else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6
let subType: string = type.replace("Array<", ""); // Array<Type> => Type>
subType = subType.substring(0, subType.length - 1); // Type> => Type
let transformedData: any[] = [];
for (let index in data) {
let date = data[index];
transformedData.push(ObjectSerializer.serialize(date, subType));
}
return transformedData;
} else if (type === "Date") {
return data.toISOString();
} else {
if (enumsMap[type]) {
return data;
}
if (!typeMap[type]) { // in case we dont know the type
return data;
}
// Get the actual type of this object
type = this.findCorrectType(data, type);
// get the map for the correct type.
let attributeTypes = typeMap[type].getAttributeTypeMap();
let instance: {[index: string]: any} = {};
for (let index in attributeTypes) {
let attributeType = attributeTypes[index];
instance[attributeType.baseName] = ObjectSerializer.serialize(data[attributeType.name], attributeType.type);
}
return instance;
}
}
public static deserialize(data: any, type: string) {
// polymorphism may change the actual type.
type = ObjectSerializer.findCorrectType(data, type);
if (data == undefined) {
return data;
} else if (primitives.indexOf(type.toLowerCase()) !== -1) {
return data;
} else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6
let subType: string = type.replace("Array<", ""); // Array<Type> => Type>
subType = subType.substring(0, subType.length - 1); // Type> => Type
let transformedData: any[] = [];
for (let index in data) {
let date = data[index];
transformedData.push(ObjectSerializer.deserialize(date, subType));
}
return transformedData;
} else if (type === "Date") {
return new Date(data);
} else {
if (enumsMap[type]) {// is Enum
return data;
}
if (!typeMap[type]) { // dont know the type
return data;
}
let instance = new typeMap[type]();
let attributeTypes = typeMap[type].getAttributeTypeMap();
for (let index in attributeTypes) {
let attributeType = attributeTypes[index];
instance[attributeType.name] = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type);
}
return instance;
}
}
}
export interface Authentication {
/**
* Apply authentication settings to header and query params.
*/
applyToRequest(requestOptions: localVarRequest.Options): Promise<void> | void;
}
export class HttpBasicAuth implements Authentication {
public username: string = '';
public password: string = '';
applyToRequest(requestOptions: localVarRequest.Options): void {
requestOptions.auth = {
username: this.username, password: this.password
}
}
}
export class HttpBearerAuth implements Authentication {
public accessToken: string | (() => string) = '';
applyToRequest(requestOptions: localVarRequest.Options): void {
if (requestOptions && requestOptions.headers) {
const accessToken = typeof this.accessToken === 'function'
? this.accessToken()
: this.accessToken;
requestOptions.headers["Authorization"] = "Bearer " + accessToken;
}
}
}
export class ApiKeyAuth implements Authentication {
public apiKey: string = '';
constructor(private location: string, private paramName: string) {
}
applyToRequest(requestOptions: localVarRequest.Options): void {
if (this.location == "query") {
(<any>requestOptions.qs)[this.paramName] = this.apiKey;
} else if (this.location == "header" && requestOptions && requestOptions.headers) {
requestOptions.headers[this.paramName] = this.apiKey;
} else if (this.location == 'cookie' && requestOptions && requestOptions.headers) {
if (requestOptions.headers['Cookie']) {
requestOptions.headers['Cookie'] += '; ' + this.paramName + '=' + encodeURIComponent(this.apiKey);
}
else {
requestOptions.headers['Cookie'] = this.paramName + '=' + encodeURIComponent(this.apiKey);
}
}
}
}
export class OAuth implements Authentication {
public accessToken: string = '';
applyToRequest(requestOptions: localVarRequest.Options): void {
if (requestOptions && requestOptions.headers) {
requestOptions.headers["Authorization"] = "Bearer " + this.accessToken;
}
}
}
export class VoidAuth implements Authentication {
public username: string = '';
public password: string = '';
applyToRequest(_: localVarRequest.Options): void {
// Do nothing
}
}
export type Interceptor = (requestOptions: localVarRequest.Options) => (Promise<void> | void);

View File

@@ -0,0 +1,84 @@
/**
* SQL Server Big Data Cluster API
* OpenAPI specification for **SQL Server Big Data Cluster**.
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export class RegistrationResponse {
'customObjectName'?: string;
'instanceName'?: string;
'instanceNamespace'?: string;
'instanceType'?: string;
'location'?: string;
'resourceGroupName'?: string;
'subscriptionId'?: string;
'isDeleted'?: boolean;
'externalEndpoint'?: string;
'vCores'?: string;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "customObjectName",
"baseName": "customObjectName",
"type": "string"
},
{
"name": "instanceName",
"baseName": "instanceName",
"type": "string"
},
{
"name": "instanceNamespace",
"baseName": "instanceNamespace",
"type": "string"
},
{
"name": "instanceType",
"baseName": "instanceType",
"type": "string"
},
{
"name": "location",
"baseName": "location",
"type": "string"
},
{
"name": "resourceGroupName",
"baseName": "resourceGroupName",
"type": "string"
},
{
"name": "subscriptionId",
"baseName": "subscriptionId",
"type": "string"
},
{
"name": "isDeleted",
"baseName": "isDeleted",
"type": "boolean"
},
{
"name": "externalEndpoint",
"baseName": "externalEndpoint",
"type": "string"
},
{
"name": "vCores",
"baseName": "vCores",
"type": "string"
} ];
static getAttributeTypeMap() {
return RegistrationResponse.attributeTypeMap;
}
}

View File

@@ -0,0 +1,78 @@
/**
* SQL Server Big Data Cluster API
* OpenAPI specification for **SQL Server Big Data Cluster**.
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export class RegistrationSpec {
'instanceNamespace'?: string;
'instanceName'?: string;
'instanceType'?: string;
'serviceName'?: string;
'vcores'?: string;
'location'?: string;
'resourceGroupName'?: string;
'subscriptionId'?: string;
'isDeleted'?: boolean;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "instanceNamespace",
"baseName": "instanceNamespace",
"type": "string"
},
{
"name": "instanceName",
"baseName": "instanceName",
"type": "string"
},
{
"name": "instanceType",
"baseName": "instanceType",
"type": "string"
},
{
"name": "serviceName",
"baseName": "serviceName",
"type": "string"
},
{
"name": "vcores",
"baseName": "vcores",
"type": "string"
},
{
"name": "location",
"baseName": "location",
"type": "string"
},
{
"name": "resourceGroupName",
"baseName": "resourceGroupName",
"type": "string"
},
{
"name": "subscriptionId",
"baseName": "subscriptionId",
"type": "string"
},
{
"name": "isDeleted",
"baseName": "isDeleted",
"type": "boolean"
} ];
static getAttributeTypeMap() {
return RegistrationSpec.attributeTypeMap;
}
}

View File

@@ -0,0 +1,55 @@
/**
* SQL Server Big Data Cluster API
* OpenAPI specification for **SQL Server Big Data Cluster**.
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { InstanceStatusModel } from './instanceStatusModel';
export class ResourceStatusModel {
'resourceName'?: string;
'state'?: string;
'healthStatus'?: string;
'details'?: string;
'instances'?: Array<InstanceStatusModel>;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "resourceName",
"baseName": "resourceName",
"type": "string"
},
{
"name": "state",
"baseName": "state",
"type": "string"
},
{
"name": "healthStatus",
"baseName": "healthStatus",
"type": "string"
},
{
"name": "details",
"baseName": "details",
"type": "string"
},
{
"name": "instances",
"baseName": "instances",
"type": "Array<InstanceStatusModel>"
} ];
static getAttributeTypeMap() {
return ResourceStatusModel.attributeTypeMap;
}
}

View File

@@ -0,0 +1,110 @@
/**
* SQL Server Big Data Cluster API
* OpenAPI specification for **SQL Server Big Data Cluster**.
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { ActiveDirectory } from './activeDirectory';
export class Security {
'activeDirectory'?: ActiveDirectory;
'privileged'?: boolean;
'useInternalDomain'?: boolean;
'ouDistinguishedName'?: string;
'dnsIpAddresses'?: Array<string>;
'domainControllerFullyQualifiedDns'?: Array<string>;
'realm'?: string;
'domainDnsName'?: string;
'clusterAdmins'?: Array<string>;
'clusterUsers'?: Array<string>;
'appOwners'?: Array<string>;
'appReaders'?: Array<string>;
'kerberosDelegationMode'?: Security.KerberosDelegationModeEnum;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "activeDirectory",
"baseName": "activeDirectory",
"type": "ActiveDirectory"
},
{
"name": "privileged",
"baseName": "privileged",
"type": "boolean"
},
{
"name": "useInternalDomain",
"baseName": "useInternalDomain",
"type": "boolean"
},
{
"name": "ouDistinguishedName",
"baseName": "ouDistinguishedName",
"type": "string"
},
{
"name": "dnsIpAddresses",
"baseName": "dnsIpAddresses",
"type": "Array<string>"
},
{
"name": "domainControllerFullyQualifiedDns",
"baseName": "domainControllerFullyQualifiedDns",
"type": "Array<string>"
},
{
"name": "realm",
"baseName": "realm",
"type": "string"
},
{
"name": "domainDnsName",
"baseName": "domainDnsName",
"type": "string"
},
{
"name": "clusterAdmins",
"baseName": "clusterAdmins",
"type": "Array<string>"
},
{
"name": "clusterUsers",
"baseName": "clusterUsers",
"type": "Array<string>"
},
{
"name": "appOwners",
"baseName": "appOwners",
"type": "Array<string>"
},
{
"name": "appReaders",
"baseName": "appReaders",
"type": "Array<string>"
},
{
"name": "kerberosDelegationMode",
"baseName": "kerberosDelegationMode",
"type": "Security.KerberosDelegationModeEnum"
} ];
static getAttributeTypeMap() {
return Security.attributeTypeMap;
}
}
export namespace Security {
export enum KerberosDelegationModeEnum {
None = <any> 'None',
ConstrainedDelegation = <any> 'ConstrainedDelegation',
UnconstrainedDelegation = <any> 'UnconstrainedDelegation'
}
}

View File

@@ -0,0 +1,55 @@
/**
* SQL Server Big Data Cluster API
* OpenAPI specification for **SQL Server Big Data Cluster**.
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { ResourceStatusModel } from './resourceStatusModel';
export class ServiceStatusModel {
'serviceName'?: string;
'state'?: string;
'healthStatus'?: string;
'details'?: string;
'resources'?: Array<ResourceStatusModel>;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "serviceName",
"baseName": "serviceName",
"type": "string"
},
{
"name": "state",
"baseName": "state",
"type": "string"
},
{
"name": "healthStatus",
"baseName": "healthStatus",
"type": "string"
},
{
"name": "details",
"baseName": "details",
"type": "string"
},
{
"name": "resources",
"baseName": "resources",
"type": "Array<ResourceStatusModel>"
} ];
static getAttributeTypeMap() {
return ServiceStatusModel.attributeTypeMap;
}
}

View File

@@ -0,0 +1,55 @@
/**
* SQL Server Big Data Cluster API
* OpenAPI specification for **SQL Server Big Data Cluster**.
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { StorageSpec } from './storageSpec';
export class Storage {
'data'?: StorageSpec;
'logs'?: StorageSpec;
'className'?: string;
'accessMode'?: string;
'size'?: string;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "data",
"baseName": "data",
"type": "StorageSpec"
},
{
"name": "logs",
"baseName": "logs",
"type": "StorageSpec"
},
{
"name": "className",
"baseName": "className",
"type": "string"
},
{
"name": "accessMode",
"baseName": "accessMode",
"type": "string"
},
{
"name": "size",
"baseName": "size",
"type": "string"
} ];
static getAttributeTypeMap() {
return Storage.attributeTypeMap;
}
}

View File

@@ -0,0 +1,42 @@
/**
* SQL Server Big Data Cluster API
* OpenAPI specification for **SQL Server Big Data Cluster**.
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export class StorageSpec {
'className'?: string;
'accessMode'?: string;
'size'?: string;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "className",
"baseName": "className",
"type": "string"
},
{
"name": "accessMode",
"baseName": "accessMode",
"type": "string"
},
{
"name": "size",
"baseName": "size",
"type": "string"
} ];
static getAttributeTypeMap() {
return StorageSpec.attributeTypeMap;
}
}

View File

@@ -0,0 +1,60 @@
/**
* SQL Server Big Data Cluster API
* OpenAPI specification for **SQL Server Big Data Cluster**.
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export class TokenModel {
'tokenType'?: string;
'accessToken'?: string;
'expiresIn'?: number;
'expiresOn'?: number;
'tokenId'?: string;
'namespace'?: string;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "tokenType",
"baseName": "token_type",
"type": "string"
},
{
"name": "accessToken",
"baseName": "access_token",
"type": "string"
},
{
"name": "expiresIn",
"baseName": "expires_in",
"type": "number"
},
{
"name": "expiresOn",
"baseName": "expires_on",
"type": "number"
},
{
"name": "tokenId",
"baseName": "token_id",
"type": "string"
},
{
"name": "namespace",
"baseName": "namespace",
"type": "string"
} ];
static getAttributeTypeMap() {
return TokenModel.attributeTypeMap;
}
}