mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-14 18:46:34 -05:00
Azure Arc extension (#10400)
Adds an extension for Azure Arc with some initial Postgres pages
This commit is contained in:
25
extensions/arc/src/common/promise.ts
Normal file
25
extensions/arc/src/common/promise.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Deferred promise
|
||||
*/
|
||||
export class Deferred<T> {
|
||||
promise: Promise<T>;
|
||||
resolve!: (value?: T | PromiseLike<T>) => void;
|
||||
reject!: (reason?: any) => void;
|
||||
constructor() {
|
||||
this.promise = new Promise<T>((resolve, reject) => {
|
||||
this.resolve = resolve;
|
||||
this.reject = reject;
|
||||
});
|
||||
}
|
||||
|
||||
then<TResult>(onfulfilled?: (value: T) => TResult | Thenable<TResult>, onrejected?: (reason: any) => TResult | Thenable<TResult>): Thenable<TResult>;
|
||||
then<TResult>(onfulfilled?: (value: T) => TResult | Thenable<TResult>, onrejected?: (reason: any) => void): Thenable<TResult>;
|
||||
then<TResult>(onfulfilled?: (value: T) => TResult | Thenable<TResult>, onrejected?: (reason: any) => TResult | Thenable<TResult>): Thenable<TResult> {
|
||||
return this.promise.then(onfulfilled, onrejected);
|
||||
}
|
||||
}
|
||||
97
extensions/arc/src/constants.ts
Normal file
97
extensions/arc/src/constants.ts
Normal file
@@ -0,0 +1,97 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as vscode from 'vscode';
|
||||
|
||||
export interface IconPath {
|
||||
dark: string;
|
||||
light: string;
|
||||
}
|
||||
|
||||
export class IconPathHelper {
|
||||
private static context: vscode.ExtensionContext;
|
||||
|
||||
public static add: IconPath;
|
||||
public static edit: IconPath;
|
||||
public static delete: IconPath;
|
||||
public static openInTab: IconPath;
|
||||
public static heart: IconPath;
|
||||
public static copy: IconPath;
|
||||
public static collapseUp: IconPath;
|
||||
public static collapseDown: IconPath;
|
||||
public static postgres: IconPath;
|
||||
public static computeStorage: IconPath;
|
||||
public static connection: IconPath;
|
||||
public static backup: IconPath;
|
||||
public static properties: IconPath;
|
||||
public static networking: IconPath;
|
||||
|
||||
public static setExtensionContext(context: vscode.ExtensionContext) {
|
||||
IconPathHelper.context = context;
|
||||
IconPathHelper.add = {
|
||||
light: IconPathHelper.context.asAbsolutePath('images/add.svg'),
|
||||
dark: IconPathHelper.context.asAbsolutePath('images/add.svg')
|
||||
};
|
||||
IconPathHelper.edit = {
|
||||
light: IconPathHelper.context.asAbsolutePath('images/edit.svg'),
|
||||
dark: IconPathHelper.context.asAbsolutePath('images/edit.svg')
|
||||
};
|
||||
IconPathHelper.delete = {
|
||||
light: IconPathHelper.context.asAbsolutePath('images/delete.svg'),
|
||||
dark: IconPathHelper.context.asAbsolutePath('images/delete.svg')
|
||||
};
|
||||
IconPathHelper.openInTab = {
|
||||
light: IconPathHelper.context.asAbsolutePath('images/open-in-tab.svg'),
|
||||
dark: IconPathHelper.context.asAbsolutePath('images/open-in-tab.svg')
|
||||
};
|
||||
IconPathHelper.heart = {
|
||||
light: IconPathHelper.context.asAbsolutePath('images/heart.svg'),
|
||||
dark: IconPathHelper.context.asAbsolutePath('images/heart.svg')
|
||||
};
|
||||
IconPathHelper.copy = {
|
||||
light: IconPathHelper.context.asAbsolutePath('images/copy.svg'),
|
||||
dark: IconPathHelper.context.asAbsolutePath('images/copy.svg')
|
||||
};
|
||||
IconPathHelper.collapseUp = {
|
||||
light: IconPathHelper.context.asAbsolutePath('images/collapse-up.svg'),
|
||||
dark: IconPathHelper.context.asAbsolutePath('images/collapse-up-inverse.svg')
|
||||
};
|
||||
IconPathHelper.collapseDown = {
|
||||
light: IconPathHelper.context.asAbsolutePath('images/collapse-down.svg'),
|
||||
dark: IconPathHelper.context.asAbsolutePath('images/collapse-down-inverse.svg')
|
||||
};
|
||||
IconPathHelper.postgres = {
|
||||
light: IconPathHelper.context.asAbsolutePath('images/postgres.svg'),
|
||||
dark: IconPathHelper.context.asAbsolutePath('images/postgres.svg')
|
||||
};
|
||||
IconPathHelper.computeStorage = {
|
||||
light: context.asAbsolutePath('images/billing.svg'),
|
||||
dark: context.asAbsolutePath('images/billing.svg')
|
||||
};
|
||||
IconPathHelper.connection = {
|
||||
light: context.asAbsolutePath('images/connections.svg'),
|
||||
dark: context.asAbsolutePath('images/connections.svg')
|
||||
};
|
||||
IconPathHelper.backup = {
|
||||
light: context.asAbsolutePath('images/migrate.svg'),
|
||||
dark: context.asAbsolutePath('images/migrate.svg')
|
||||
};
|
||||
IconPathHelper.properties = {
|
||||
light: context.asAbsolutePath('images/properties.svg'),
|
||||
dark: context.asAbsolutePath('images/properties.svg')
|
||||
};
|
||||
IconPathHelper.networking = {
|
||||
light: context.asAbsolutePath('images/security.svg'),
|
||||
dark: context.asAbsolutePath('images/security.svg')
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export namespace cssStyles {
|
||||
export const text = { 'user-select': 'text', 'cursor': 'text' };
|
||||
export const title = { ...text, 'font-weight': 'bold', 'font-size': '14px' };
|
||||
export const tableHeader = { ...text, 'text-align': 'left', 'border': 'none' };
|
||||
export const tableRow = { ...text, 'border-top': 'solid 1px #ccc', 'border-bottom': 'solid 1px #ccc', 'border-left': 'none', 'border-right': 'none' };
|
||||
}
|
||||
20
extensions/arc/src/controller/README.md
Normal file
20
extensions/arc/src/controller/README.md
Normal 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.
|
||||
77
extensions/arc/src/controller/auth.ts
Normal file
77
extensions/arc/src/controller/auth.ts
Normal 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;
|
||||
}
|
||||
3
extensions/arc/src/controller/generated/dusky/api.ts
Normal file
3
extensions/arc/src/controller/generated/dusky/api.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
// This is the entrypoint for the package
|
||||
export * from './api/apis';
|
||||
export * from './model/models';
|
||||
31
extensions/arc/src/controller/generated/dusky/api/apis.ts
Normal file
31
extensions/arc/src/controller/generated/dusky/api/apis.ts
Normal 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
@@ -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));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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'
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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'
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
329
extensions/arc/src/controller/generated/dusky/model/models.ts
Normal file
329
extensions/arc/src/controller/generated/dusky/model/models.ts
Normal 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);
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
4
extensions/arc/src/controller/generated/v1/api.ts
Normal file
4
extensions/arc/src/controller/generated/v1/api.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
// This is the entrypoint for the package
|
||||
export * from './api/apis';
|
||||
export * from './model/models';
|
||||
|
||||
43
extensions/arc/src/controller/generated/v1/api/apis.ts
Normal file
43
extensions/arc/src/controller/generated/v1/api/apis.ts
Normal 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];
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
224
extensions/arc/src/controller/generated/v1/api/homeRouterApi.ts
Normal file
224
extensions/arc/src/controller/generated/v1/api/homeRouterApi.ts
Normal 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));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
164
extensions/arc/src/controller/generated/v1/api/infoRouterApi.ts
Normal file
164
extensions/arc/src/controller/generated/v1/api/infoRouterApi.ts
Normal 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));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
175
extensions/arc/src/controller/generated/v1/api/logsRouterApi.ts
Normal file
175
extensions/arc/src/controller/generated/v1/api/logsRouterApi.ts
Normal 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));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
172
extensions/arc/src/controller/generated/v1/api/tokenRouterApi.ts
Normal file
172
extensions/arc/src/controller/generated/v1/api/tokenRouterApi.ts
Normal 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));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -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'
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
48
extensions/arc/src/controller/generated/v1/model/docker.ts
Normal file
48
extensions/arc/src/controller/generated/v1/model/docker.ts
Normal 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;
|
||||
}
|
||||
}
|
||||
|
||||
54
extensions/arc/src/controller/generated/v1/model/endpoint.ts
Normal file
54
extensions/arc/src/controller/generated/v1/model/endpoint.ts
Normal 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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
42
extensions/arc/src/controller/generated/v1/model/metadata.ts
Normal file
42
extensions/arc/src/controller/generated/v1/model/metadata.ts
Normal 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;
|
||||
}
|
||||
}
|
||||
|
||||
265
extensions/arc/src/controller/generated/v1/model/models.ts
Normal file
265
extensions/arc/src/controller/generated/v1/model/models.ts
Normal 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);
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
110
extensions/arc/src/controller/generated/v1/model/security.ts
Normal file
110
extensions/arc/src/controller/generated/v1/model/security.ts
Normal 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'
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
55
extensions/arc/src/controller/generated/v1/model/storage.ts
Normal file
55
extensions/arc/src/controller/generated/v1/model/storage.ts
Normal 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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
34
extensions/arc/src/extension.ts
Normal file
34
extensions/arc/src/extension.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as vscode from 'vscode';
|
||||
import * as loc from './localizedConstants';
|
||||
import { IconPathHelper } from './constants';
|
||||
import { BasicAuth } from './controller/auth';
|
||||
import { PostgresDashboard } from './ui/dashboards/postgres/postgresDashboard';
|
||||
import { ControllerModel } from './models/controllerModel';
|
||||
import { PostgresModel } from './models/postgresModel';
|
||||
|
||||
export async function activate(context: vscode.ExtensionContext): Promise<void> {
|
||||
IconPathHelper.setExtensionContext(context);
|
||||
|
||||
vscode.commands.registerCommand('arc.managePostgres', async () => {
|
||||
// Controller information
|
||||
const controllerUrl = '';
|
||||
const auth = new BasicAuth('', '');
|
||||
|
||||
// Postgres information
|
||||
const dbNamespace = '';
|
||||
const dbName = '';
|
||||
|
||||
const controllerModel = new ControllerModel(controllerUrl, auth);
|
||||
const databaseModel = new PostgresModel(controllerUrl, auth, dbNamespace, dbName);
|
||||
const postgresDashboard = new PostgresDashboard(loc.postgresDashboard, controllerModel, databaseModel);
|
||||
await postgresDashboard.showDashboard();
|
||||
});
|
||||
}
|
||||
|
||||
export function deactivate(): void {
|
||||
}
|
||||
79
extensions/arc/src/localizedConstants.ts
Normal file
79
extensions/arc/src/localizedConstants.ts
Normal file
@@ -0,0 +1,79 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as nls from 'vscode-nls';
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
export const miaaDashboard = localize('arc.miaaDashboard', "Managed Instance Dashboard (Preview)");
|
||||
export const postgresDashboard = localize('arc.postgresDashboard', "Postgres Dashboard (Preview)");
|
||||
|
||||
export const overview = localize('arc.overview', "Overview");
|
||||
export const connectionStrings = localize('arc.connectionStrings', "Connection Strings");
|
||||
export const networking = localize('arc.networking', "Networking");
|
||||
export const properties = localize('arc.properties', "Properties");
|
||||
export const settings = localize('arc.settings', "Settings");
|
||||
export const security = localize('arc.security', "Security");
|
||||
export const computeAndStorage = localize('arc.computeAndStorage', 'Compute + Storage');
|
||||
export const backup = localize('arc.backup', "Backup");
|
||||
|
||||
export const createNew = localize('arc.createNew', "Create New");
|
||||
export const deleteText = localize('arc.delete', "Delete");
|
||||
export const resetPassword = localize('arc.resetPassword', "Reset Password");
|
||||
export const openInAzurePortal = localize('arc.openInAzurePortal', "Open in Azure Portal");
|
||||
export const resourceGroup = localize('arc.resourceGroup', "Resource Group");
|
||||
export const region = localize('arc.region', "Region");
|
||||
export const subscription = localize('arc.subscription', "Subscription");
|
||||
export const subscriptionId = localize('arc.subscriptionId', "Subscription ID");
|
||||
export const state = localize('arc.state', "State");
|
||||
export const adminUsername = localize('arc.adminUsername', "Data controller admin username");
|
||||
export const host = localize('arc.host', "Host");
|
||||
export const name = localize('arc.name', "Name");
|
||||
export const type = localize('arc.type', "Type");
|
||||
export const status = localize('arc.status', "Status");
|
||||
export const dataController = localize('arc.dataController', 'Data controller');
|
||||
export const kibanaDashboard = localize('arc.kibanaDashboard', 'Kibana Dashboard');
|
||||
export const grafanaDashboard = localize('arc.grafanaDashboard', 'Grafana Dashboard');
|
||||
export const kibanaDashboardDescription = localize('arc.kibanaDashboardDescription', 'Dashboard for viewing logs');
|
||||
export const grafanaDashboardDescription = localize('arc.grafanaDashboardDescription', 'Dashboard for viewing metrics');
|
||||
export const serviceEndpoints = localize('arc.serviceEndpoints', 'Service endpoints');
|
||||
export const endpoint = localize('arc.endpoint', 'Endpoint');
|
||||
export const description = localize('arc.description', 'Description');
|
||||
export const yes = localize('arc.yes', 'Yes');
|
||||
export const no = localize('arc.no', 'No');
|
||||
export const feedback = localize('arc.feedback', 'Feedback');
|
||||
export const selectConnectionString = localize('arc.selectConnectionString', 'Select from available client connection strings below');
|
||||
export const vCores = localize('arc.vCores', 'vCores');
|
||||
export const ram = localize('arc.ram', 'RAM');
|
||||
|
||||
// Postgres constants
|
||||
export const coordinatorEndpoint = localize('arc.coordinatorEndpoint', 'Coordinator endpoint');
|
||||
export const postgresAdminUsername = localize('arc.postgresAdminUsername', 'Admin username');
|
||||
export const nodeConfiguration = localize('arc.nodeConfiguration', 'Node configuration');
|
||||
export const postgresVersion = localize('arc.postgresVersion', 'PostgreSQL version');
|
||||
export const serverGroupType = localize('arc.serverGroupType', 'Server group type');
|
||||
export const serverGroupNodes = localize('arc.serverGroupNodes', 'Server group nodes');
|
||||
export const fullyQualifiedDomain = localize('arc.fullyQualifiedDomain', 'Fully qualified domain');
|
||||
export const postgresArcProductName = localize('arc.postgresArcProductName', 'Azure Database for PostgreSQL - Azure Arc');
|
||||
export const coordinator = localize('arc.coordinator', 'Coordinator');
|
||||
export const worker = localize('arc.worker', 'Worker');
|
||||
export const newDatabase = localize('arc.newDatabase', 'New Database');
|
||||
export const databaseName = localize('arc.databaseName', 'Database name');
|
||||
export const newPassword = localize('arc.newPassword', 'New password');
|
||||
export const learnAboutPostgresClients = localize('arc.learnAboutPostgresClients', 'Learn more about Azure PostgreSQL Hyperscale client interfaces');
|
||||
export const node = localize('arc.node', 'node');
|
||||
export const nodes = localize('arc.nodes', 'nodes');
|
||||
export const storagePerNode = localize('arc.storagePerNode', 'storage per node');
|
||||
|
||||
export function databaseCreated(name: string): string { return localize('arc.databaseCreated', "Database '{0}' created", name); }
|
||||
export function databaseCreationFailed(name: string, error: any): string { return localize('arc.databaseCreationFailed', "Failed to create database '{0}'. {1}", name, (error instanceof Error ? error.message : error)); }
|
||||
export function passwordReset(name: string): string { return localize('arc.passwordReset', "Password reset for service '{0}'", name); }
|
||||
export function passwordResetFailed(name: string, error: any): string { return localize('arc.passwordResetFailed', "Failed to reset password for service '{0}'. {1}", name, (error instanceof Error ? error.message : error)); }
|
||||
export function deleteServicePrompt(name: string): string { return localize('arc.deleteServicePrompt', "Delete service '{0}'?", name); }
|
||||
export function serviceDeleted(name: string): string { return localize('arc.serviceDeleted', "Service '{0}' deleted", name); }
|
||||
export function serviceDeletionFailed(name: string, error: any): string { return localize('arc.serviceDeletionFailed', "Failed to delete service '{0}'. {1}", name, (error instanceof Error ? error.message : error)); }
|
||||
export function couldNotFindAzureResource(name: string): string { return localize('arc.couldNotFindAzureResource', "Could not find Azure resource for '{0}'", name); }
|
||||
export function copiedToClipboard(name: string): string { return localize('arc.copiedToClipboard', '{0} copied to clipboard', name); }
|
||||
|
||||
export const arcResources = localize('arc.arcResources', "Azure Arc Resources");
|
||||
71
extensions/arc/src/models/controllerModel.ts
Normal file
71
extensions/arc/src/models/controllerModel.ts
Normal file
@@ -0,0 +1,71 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Authentication } from '../controller/auth';
|
||||
import { EndpointsRouterApi, EndpointModel, RegistrationRouterApi, RegistrationResponse, TokenRouterApi } from '../controller/generated/v1/api';
|
||||
|
||||
export class ControllerModel {
|
||||
private _endpointsRouter: EndpointsRouterApi;
|
||||
private _tokenRouter: TokenRouterApi;
|
||||
private _registrationRouter: RegistrationRouterApi;
|
||||
private _endpoints!: EndpointModel[];
|
||||
private _namespace!: string;
|
||||
private _registrations!: RegistrationResponse[];
|
||||
|
||||
constructor(controllerUrl: string, auth: Authentication) {
|
||||
this._endpointsRouter = new EndpointsRouterApi(controllerUrl);
|
||||
this._endpointsRouter.setDefaultAuthentication(auth);
|
||||
|
||||
this._tokenRouter = new TokenRouterApi(controllerUrl);
|
||||
this._tokenRouter.setDefaultAuthentication(auth);
|
||||
|
||||
this._registrationRouter = new RegistrationRouterApi(controllerUrl);
|
||||
this._registrationRouter.setDefaultAuthentication(auth);
|
||||
}
|
||||
|
||||
public async refresh(): Promise<void> {
|
||||
await Promise.all([
|
||||
this._endpointsRouter.apiV1BdcEndpointsGet().then(response => {
|
||||
this._endpoints = response.body;
|
||||
}),
|
||||
this._tokenRouter.apiV1TokenPost().then(async response => {
|
||||
this._namespace = response.body.namespace!;
|
||||
})
|
||||
]).then(async _ => {
|
||||
this._registrations = (await this._registrationRouter.apiV1RegistrationListResourcesNsGet(this._namespace)).body;
|
||||
});
|
||||
}
|
||||
|
||||
public endpoints(): EndpointModel[] {
|
||||
return this._endpoints;
|
||||
}
|
||||
|
||||
public endpoint(name: string): EndpointModel | undefined {
|
||||
return this._endpoints.find(e => e.name === name);
|
||||
}
|
||||
|
||||
public namespace(): string {
|
||||
return this._namespace;
|
||||
}
|
||||
|
||||
public registrations(): RegistrationResponse[] {
|
||||
return this._registrations;
|
||||
}
|
||||
|
||||
public registration(type: string, namespace: string, name: string): RegistrationResponse | undefined {
|
||||
return this._registrations.find(r => {
|
||||
// Resources deployed outside the controller's namespace are named in the format 'namespace_name'
|
||||
let instanceName = r.instanceName!;
|
||||
const parts: string[] = instanceName.split('_');
|
||||
if (parts.length === 2) {
|
||||
instanceName = parts[1];
|
||||
}
|
||||
else if (parts.length > 2) {
|
||||
throw new Error(`Cannot parse resource '${instanceName}'. Acceptable formats are 'namespace_name' or 'name'.`);
|
||||
}
|
||||
return r.instanceType === type && r.instanceNamespace === namespace && instanceName === name;
|
||||
});
|
||||
}
|
||||
}
|
||||
152
extensions/arc/src/models/postgresModel.ts
Normal file
152
extensions/arc/src/models/postgresModel.ts
Normal file
@@ -0,0 +1,152 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as loc from '../localizedConstants';
|
||||
import { DuskyObjectModelsDatabaseService, DatabaseRouterApi, DuskyObjectModelsDatabase, V1Status } from '../controller/generated/dusky/api';
|
||||
import { Authentication } from '../controller/auth';
|
||||
|
||||
export class PostgresModel {
|
||||
private _databaseRouter: DatabaseRouterApi;
|
||||
private _service!: DuskyObjectModelsDatabaseService;
|
||||
private _password!: string;
|
||||
|
||||
constructor(controllerUrl: string, auth: Authentication, private _namespace: string, private _name: string) {
|
||||
this._databaseRouter = new DatabaseRouterApi(controllerUrl);
|
||||
this._databaseRouter.setDefaultAuthentication(auth);
|
||||
}
|
||||
|
||||
/** Returns the service's Kubernetes namespace */
|
||||
public namespace(): string {
|
||||
return this._namespace;
|
||||
}
|
||||
|
||||
/** Returns the service's name */
|
||||
public name(): string {
|
||||
return this._name;
|
||||
}
|
||||
|
||||
/** Returns the service's fully qualified name in the format namespace.name */
|
||||
public fullName(): string {
|
||||
return `${this._namespace}.${this._name}`;
|
||||
}
|
||||
|
||||
/** Returns the service's spec */
|
||||
public service(): DuskyObjectModelsDatabaseService {
|
||||
return this._service;
|
||||
}
|
||||
|
||||
/** Returns the service's password */
|
||||
public password(): string {
|
||||
return this._password;
|
||||
}
|
||||
|
||||
/** Refreshes the service's model */
|
||||
public async refresh() {
|
||||
await Promise.all([
|
||||
this._databaseRouter.getDuskyDatabaseService(this._namespace, this._name).then(response => {
|
||||
this._service = response.body;
|
||||
}),
|
||||
this._databaseRouter.getDuskyPassword(this._namespace, this._name).then(async response => {
|
||||
this._password = response.body;
|
||||
})
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the service
|
||||
* @param func A function of modifications to apply to the service
|
||||
*/
|
||||
public async update(func: (service: DuskyObjectModelsDatabaseService) => void): Promise<DuskyObjectModelsDatabaseService> {
|
||||
// Get the latest spec of the service in case it has changed
|
||||
const service = (await this._databaseRouter.getDuskyDatabaseService(this._namespace, this._name)).body;
|
||||
service.status = undefined; // can't update the status
|
||||
func(service);
|
||||
|
||||
return await this._databaseRouter.updateDuskyDatabaseService(this.namespace(), this.name(), service).then(r => {
|
||||
this._service = r.body;
|
||||
return this._service;
|
||||
});
|
||||
}
|
||||
|
||||
/** Deletes the service */
|
||||
public async delete(): Promise<V1Status> {
|
||||
return (await this._databaseRouter.deleteDuskyDatabaseService(this._namespace, this._name)).body;
|
||||
}
|
||||
|
||||
/** Creates a SQL database in the service */
|
||||
public async createDatabase(db: DuskyObjectModelsDatabase): Promise<DuskyObjectModelsDatabase> {
|
||||
return await (await this._databaseRouter.createDuskyDatabase(this.namespace(), this.name(), db)).body;
|
||||
}
|
||||
|
||||
/** Returns the number of nodes in the service */
|
||||
public numNodes(): number {
|
||||
let nodes = this._service.spec.scale?.shards ?? 1;
|
||||
if (nodes > 1) { nodes++; } // for multiple shards there is an additional node for the coordinator
|
||||
return nodes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the IP address and port of the service, preferring external IP over
|
||||
* internal IP. If either field is not available it will be set to undefined.
|
||||
*/
|
||||
public endpoint(): { ip?: string, port?: number } {
|
||||
const externalIp = this._service.status?.externalIP;
|
||||
const internalIp = this._service.status?.internalIP;
|
||||
const externalPort = this._service.status?.externalPort;
|
||||
const internalPort = this._service.status?.internalPort;
|
||||
|
||||
return externalIp ? { ip: externalIp, port: externalPort ?? undefined }
|
||||
: internalIp ? { ip: internalIp, port: internalPort ?? undefined }
|
||||
: { ip: undefined, port: undefined };
|
||||
}
|
||||
|
||||
/** Returns the service's configuration e.g. '3 nodes, 1.5 vCores, 1GiB RAM, 2GiB storage per node' */
|
||||
public configuration(): string {
|
||||
const nodes = this.numNodes();
|
||||
const cpuLimit = this._service.spec.scheduling?.resources?.limits?.['cpu'];
|
||||
const ramLimit = this._service.spec.scheduling?.resources?.limits?.['memory'];
|
||||
const cpuRequest = this._service.spec.scheduling?.resources?.requests?.['cpu'];
|
||||
const ramRequest = this._service.spec.scheduling?.resources?.requests?.['memory'];
|
||||
const storage = this._service.spec.storage.volumeSize;
|
||||
|
||||
// Prefer limits if they're provided, otherwise use requests if they're provided
|
||||
let nodeConfiguration = `${nodes} ${nodes > 1 ? loc.nodes : loc.node}`;
|
||||
if (cpuLimit) {
|
||||
nodeConfiguration += `, ${this.formatCores(cpuLimit)} ${loc.vCores}`;
|
||||
} else if (cpuRequest) {
|
||||
nodeConfiguration += `, ${this.formatCores(cpuRequest)} ${loc.vCores}`;
|
||||
}
|
||||
if (ramLimit) {
|
||||
nodeConfiguration += `, ${this.formatMemory(ramLimit)} ${loc.ram}`;
|
||||
} else if (ramRequest) {
|
||||
nodeConfiguration += `, ${this.formatMemory(ramRequest)} ${loc.ram}`;
|
||||
}
|
||||
if (storage) { nodeConfiguration += `, ${storage} ${loc.storagePerNode}`; }
|
||||
return nodeConfiguration;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts millicores to cores (600m -> 0.6 cores)
|
||||
* https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#meaning-of-cpu
|
||||
* @param cores The millicores to format e.g. 600m
|
||||
*/
|
||||
private formatCores(cores: string): number {
|
||||
return cores?.endsWith('m') ? +cores.slice(0, -1) / 1000 : +cores;
|
||||
}
|
||||
|
||||
/**
|
||||
* Formats the memory to end with 'B' e.g:
|
||||
* 1 -> 1B
|
||||
* 1K -> 1KB, 1Ki -> 1KiB
|
||||
* 1M -> 1MB, 1Mi -> 1MiB
|
||||
* 1G -> 1GB, 1Gi -> 1GiB
|
||||
* 1T -> 1TB, 1Ti -> 1TiB
|
||||
* https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#meaning-of-memory
|
||||
* @param memory The amount + unit of memory to format e.g. 1K
|
||||
*/
|
||||
private formatMemory(memory: string): string {
|
||||
return memory && !memory.endsWith('B') ? `${memory}B` : memory;
|
||||
}
|
||||
}
|
||||
8
extensions/arc/src/typings/refs.d.ts
vendored
Normal file
8
extensions/arc/src/typings/refs.d.ts
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
/// <reference path='../../../../src/sql/azdata.d.ts'/>
|
||||
/// <reference path='../../../../src/sql/azdata.proposed.d.ts'/>
|
||||
/// <reference path='../../../../src/vs/vscode.d.ts'/>
|
||||
28
extensions/arc/src/ui/components/dashboard.ts
Normal file
28
extensions/arc/src/ui/components/dashboard.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as azdata from 'azdata';
|
||||
|
||||
export abstract class Dashboard {
|
||||
|
||||
private dashboard!: azdata.window.ModelViewDashboard;
|
||||
|
||||
constructor(protected title: string) { }
|
||||
|
||||
public async showDashboard(): Promise<void> {
|
||||
this.dashboard = this.createDashboard();
|
||||
await this.dashboard.open();
|
||||
}
|
||||
|
||||
protected createDashboard(): azdata.window.ModelViewDashboard {
|
||||
const dashboard = azdata.window.createModelViewDashboard(this.title);
|
||||
dashboard.registerTabs(async modelView => {
|
||||
return await this.registerTabs(modelView);
|
||||
});
|
||||
return dashboard;
|
||||
}
|
||||
|
||||
protected abstract async registerTabs(modelView: azdata.ModelView): Promise<(azdata.DashboardTab | azdata.DashboardTabGroup)[]>;
|
||||
}
|
||||
32
extensions/arc/src/ui/components/dashboardPage.ts
Normal file
32
extensions/arc/src/ui/components/dashboardPage.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as azdata from 'azdata';
|
||||
import { InitializingComponent } from './initializingComponent';
|
||||
|
||||
export abstract class DashboardPage extends InitializingComponent {
|
||||
|
||||
constructor(protected modelView: azdata.ModelView) {
|
||||
super();
|
||||
}
|
||||
|
||||
public get tab(): azdata.DashboardTab {
|
||||
return {
|
||||
title: this.title,
|
||||
id: this.id,
|
||||
icon: this.icon,
|
||||
content: this.container,
|
||||
toolbar: this.toolbarContainer
|
||||
};
|
||||
}
|
||||
|
||||
protected abstract get title(): string;
|
||||
protected abstract get id(): string;
|
||||
protected abstract get icon(): { dark: string; light: string; };
|
||||
protected abstract get container(): azdata.Component;
|
||||
protected abstract get toolbarContainer(): azdata.ToolbarContainer;
|
||||
|
||||
}
|
||||
|
||||
40
extensions/arc/src/ui/components/initializingComponent.ts
Normal file
40
extensions/arc/src/ui/components/initializingComponent.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Deferred } from '../../common/promise';
|
||||
|
||||
export abstract class InitializingComponent {
|
||||
|
||||
private _initialized: boolean = false;
|
||||
|
||||
private onInitializedPromise: Deferred<void> = new Deferred();
|
||||
|
||||
constructor() { }
|
||||
|
||||
protected get initialized(): boolean {
|
||||
return this._initialized;
|
||||
}
|
||||
|
||||
protected set initialized(value: boolean) {
|
||||
if (!this._initialized && value) {
|
||||
this._initialized = true;
|
||||
this.onInitializedPromise.resolve();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs the specified action when the component is initialized. If already initialized just runs
|
||||
* the action immediately.
|
||||
* @param action The action to be ran when the page is initialized
|
||||
*/
|
||||
protected eventuallyRunOnInitialized(action: () => void): void {
|
||||
if (!this._initialized) {
|
||||
this.onInitializedPromise.promise.then(() => action()).catch(error => console.error(`Unexpected error running onInitialized action: ${error}`));
|
||||
} else {
|
||||
action();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
96
extensions/arc/src/ui/components/keyValueContainer.ts
Normal file
96
extensions/arc/src/ui/components/keyValueContainer.ts
Normal file
@@ -0,0 +1,96 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as vscode from 'vscode';
|
||||
import * as azdata from 'azdata';
|
||||
import * as loc from '../../localizedConstants';
|
||||
import { IconPathHelper, cssStyles } from '../../constants';
|
||||
|
||||
/** A container with a single vertical column of KeyValue pairs */
|
||||
export class KeyValueContainer {
|
||||
public container: azdata.DivContainer;
|
||||
|
||||
constructor(private modelBuilder: azdata.ModelBuilder, pairs: KeyValue[]) {
|
||||
this.container = modelBuilder.divContainer().component();
|
||||
this.refresh(pairs);
|
||||
}
|
||||
|
||||
public refresh(pairs: KeyValue[]) {
|
||||
this.container.clearItems();
|
||||
this.container.addItems(
|
||||
pairs.map(p => p.getComponent(this.modelBuilder)),
|
||||
{ CSSStyles: { 'margin-bottom': '15px', 'min-height': '30px' } }
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/** A key value pair in the KeyValueContainer */
|
||||
export abstract class KeyValue {
|
||||
constructor(protected key: string, protected value: string) { }
|
||||
|
||||
/** Returns a component representing the entire KeyValue pair */
|
||||
public getComponent(modelBuilder: azdata.ModelBuilder) {
|
||||
const container = modelBuilder.flexContainer().withLayout({ flexWrap: 'wrap', alignItems: 'center' }).component();
|
||||
const key = modelBuilder.text().withProperties<azdata.TextComponentProperties>({
|
||||
value: this.key,
|
||||
CSSStyles: { ...cssStyles.text, 'font-weight': 'bold', 'margin-block-start': '0px', 'margin-block-end': '0px' }
|
||||
}).component();
|
||||
|
||||
container.addItem(key, { flex: `0 0 200px` });
|
||||
container.addItem(this.getValueComponent(modelBuilder), { flex: '1 1 250px' });
|
||||
return container;
|
||||
}
|
||||
|
||||
/** Returns a component representing the value of the KeyValue pair */
|
||||
protected abstract getValueComponent(modelBuilder: azdata.ModelBuilder): azdata.Component;
|
||||
}
|
||||
|
||||
/** Implementation of KeyValue where the value is text */
|
||||
export class TextKeyValue extends KeyValue {
|
||||
getValueComponent(modelBuilder: azdata.ModelBuilder): azdata.Component {
|
||||
return modelBuilder.text().withProperties<azdata.TextComponentProperties>({
|
||||
value: this.value,
|
||||
CSSStyles: { ...cssStyles.text, 'margin-block-start': '0px', 'margin-block-end': '0px' }
|
||||
}).component();
|
||||
}
|
||||
}
|
||||
|
||||
/** Implementation of KeyValue where the value is a readonly copyable input field */
|
||||
export class InputKeyValue extends KeyValue {
|
||||
getValueComponent(modelBuilder: azdata.ModelBuilder): azdata.Component {
|
||||
const container = modelBuilder.flexContainer().withLayout({ alignItems: 'center' }).component();
|
||||
container.addItem(modelBuilder.inputBox().withProperties<azdata.InputBoxProperties>({
|
||||
value: this.value // TODO: Add a readOnly property to input boxes
|
||||
}).component());
|
||||
|
||||
const copy = modelBuilder.button().withProperties<azdata.ButtonProperties>({
|
||||
iconPath: IconPathHelper.copy, width: '17px', height: '17px'
|
||||
}).component();
|
||||
|
||||
copy.onDidClick(async () => {
|
||||
vscode.env.clipboard.writeText(this.value);
|
||||
vscode.window.showInformationMessage(loc.copiedToClipboard(this.key));
|
||||
});
|
||||
|
||||
container.addItem(copy, { CSSStyles: { 'margin-left': '10px' } });
|
||||
return container;
|
||||
}
|
||||
}
|
||||
|
||||
/** Implementation of KeyValue where the value is a clickable link */
|
||||
export class LinkKeyValue extends KeyValue {
|
||||
constructor(key: string, value: string, private onClick: (e: any) => any) {
|
||||
super(key, value);
|
||||
}
|
||||
|
||||
getValueComponent(modelBuilder: azdata.ModelBuilder): azdata.Component {
|
||||
const link = modelBuilder.hyperlink().withProperties<azdata.HyperlinkComponentProperties>({
|
||||
label: this.value, url: ''
|
||||
}).component();
|
||||
|
||||
link.onDidClick(this.onClick);
|
||||
return link;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as azdata from 'azdata';
|
||||
import * as loc from '../../../localizedConstants';
|
||||
import { IconPathHelper } from '../../../constants';
|
||||
import { PostgresDashboardPage } from './postgresDashboardPage';
|
||||
|
||||
export class PostgresBackupPage extends PostgresDashboardPage {
|
||||
protected get title(): string {
|
||||
return loc.backup;
|
||||
}
|
||||
|
||||
protected get id(): string {
|
||||
return 'postgres-backup';
|
||||
}
|
||||
|
||||
protected get icon(): { dark: string; light: string; } {
|
||||
return IconPathHelper.backup;
|
||||
}
|
||||
|
||||
protected get container(): azdata.Component {
|
||||
return this.modelView.modelBuilder.text().withProperties<azdata.TextComponentProperties>({ value: loc.backup }).component();
|
||||
}
|
||||
|
||||
protected get toolbarContainer(): azdata.ToolbarContainer {
|
||||
return this.modelView.modelBuilder.toolbarContainer().component();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as azdata from 'azdata';
|
||||
import * as loc from '../../../localizedConstants';
|
||||
import { IconPathHelper } from '../../../constants';
|
||||
import { PostgresDashboardPage } from './postgresDashboardPage';
|
||||
|
||||
export class PostgresComputeStoragePage extends PostgresDashboardPage {
|
||||
protected get title(): string {
|
||||
return loc.computeAndStorage;
|
||||
}
|
||||
|
||||
protected get id(): string {
|
||||
return 'postgres-compute-storage';
|
||||
}
|
||||
|
||||
protected get icon(): { dark: string; light: string; } {
|
||||
return IconPathHelper.computeStorage;
|
||||
}
|
||||
|
||||
protected get container(): azdata.Component {
|
||||
return this.modelView.modelBuilder.text().withProperties<azdata.TextComponentProperties>({ value: loc.computeAndStorage }).component();
|
||||
}
|
||||
|
||||
protected get toolbarContainer(): azdata.ToolbarContainer {
|
||||
return this.modelView.modelBuilder.toolbarContainer().component();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as azdata from 'azdata';
|
||||
import * as loc from '../../../localizedConstants';
|
||||
import { IconPathHelper, cssStyles } from '../../../constants';
|
||||
import { PostgresDashboardPage } from './postgresDashboardPage';
|
||||
import { KeyValueContainer, KeyValue, InputKeyValue } from '../../components/keyValueContainer';
|
||||
|
||||
export class PostgresConnectionStringsPage extends PostgresDashboardPage {
|
||||
protected get title(): string {
|
||||
return loc.connectionStrings;
|
||||
}
|
||||
|
||||
protected get id(): string {
|
||||
return 'postgres-connection-strings';
|
||||
}
|
||||
|
||||
protected get icon(): { dark: string; light: string; } {
|
||||
return IconPathHelper.connection;
|
||||
}
|
||||
|
||||
protected get container(): azdata.Component {
|
||||
const root = this.modelView.modelBuilder.divContainer().component();
|
||||
const content = this.modelView.modelBuilder.divContainer().component();
|
||||
root.addItem(content, { CSSStyles: { 'margin': '20px' } });
|
||||
|
||||
content.addItem(this.modelView.modelBuilder.text().withProperties<azdata.TextComponentProperties>({
|
||||
value: loc.connectionStrings,
|
||||
CSSStyles: { ...cssStyles.title }
|
||||
}).component());
|
||||
|
||||
const info = this.modelView.modelBuilder.text().withProperties<azdata.TextComponentProperties>({
|
||||
value: `${loc.selectConnectionString}. `,
|
||||
CSSStyles: { ...cssStyles.text, 'margin-block-start': '0px', 'margin-block-end': '0px' }
|
||||
}).component();
|
||||
|
||||
const link = this.modelView.modelBuilder.hyperlink().withProperties<azdata.HyperlinkComponentProperties>({
|
||||
label: loc.learnAboutPostgresClients,
|
||||
url: 'http://example.com', // TODO link to documentation
|
||||
}).component();
|
||||
|
||||
content.addItem(
|
||||
this.modelView.modelBuilder.flexContainer().withItems([info, link]).withLayout({ flexWrap: 'wrap' }).component(),
|
||||
{ CSSStyles: { display: 'inline-flex', 'margin-bottom': '25px' } });
|
||||
|
||||
const endpoint: { ip?: string, port?: number } = this.databaseModel.endpoint();
|
||||
const password = this.databaseModel.password();
|
||||
|
||||
const pairs: KeyValue[] = [
|
||||
new InputKeyValue('ADO.NET', `Server=${endpoint.ip};Database=postgres;Port=${endpoint.port};User Id=postgres;Password=${password};Ssl Mode=Require;`),
|
||||
new InputKeyValue('C++ (libpq)', `host=${endpoint.ip} port=${endpoint.port} dbname=postgres user=postgres password=${password} sslmode=require`),
|
||||
new InputKeyValue('JDBC', `jdbc:postgresql://${endpoint.ip}:${endpoint.port}/postgres?user=postgres&password=${password}&sslmode=require`),
|
||||
new InputKeyValue('Node.js', `host=${endpoint.ip} port=${endpoint.port} dbname=postgres user=postgres password=${password} sslmode=require`),
|
||||
new InputKeyValue('PHP', `host=${endpoint.ip} port=${endpoint.port} dbname=postgres user=postgres password=${password} sslmode=require`),
|
||||
new InputKeyValue('psql', `psql "host=${endpoint.ip} port=${endpoint.port} dbname=postgres user=postgres password=${password} sslmode=require`),
|
||||
new InputKeyValue('Python', `dbname='postgres' user='postgres' host='${endpoint.ip}' password='${password}' port='${endpoint.port}' sslmode='true'`),
|
||||
new InputKeyValue('Ruby', `host=${endpoint.ip}; dbname=postgres user=postgres password=${password} port=${endpoint.port} sslmode=require`),
|
||||
new InputKeyValue('Web App', `Database=postgres; Data Source=${endpoint.ip}; User Id=postgres; Password=${password}`)
|
||||
];
|
||||
|
||||
const keyValueContainer = new KeyValueContainer(this.modelView.modelBuilder, pairs);
|
||||
content.addItem(keyValueContainer.container);
|
||||
return root;
|
||||
}
|
||||
|
||||
protected get toolbarContainer(): azdata.ToolbarContainer {
|
||||
return this.modelView.modelBuilder.toolbarContainer().component();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as azdata from 'azdata';
|
||||
import * as loc from '../../../localizedConstants';
|
||||
import { ControllerModel } from '../../../models/controllerModel';
|
||||
import { PostgresModel } from '../../../models/postgresModel';
|
||||
import { PostgresOverviewPage } from './postgresOverviewPage';
|
||||
import { PostgresComputeStoragePage } from './postgresComputeStoragePage';
|
||||
import { PostgresConnectionStringsPage } from './postgresConnectionStringsPage';
|
||||
import { PostgresBackupPage } from './postgresBackupPage';
|
||||
import { PostgresPropertiesPage } from './postgresPropertiesPage';
|
||||
import { PostgresNetworkingPage } from './postgresNetworkingPage';
|
||||
import { Dashboard } from '../../components/dashboard';
|
||||
|
||||
export class PostgresDashboard extends Dashboard {
|
||||
constructor(title: string, private _controllerModel: ControllerModel, private _databaseModel: PostgresModel) {
|
||||
super(title);
|
||||
}
|
||||
|
||||
protected async registerTabs(modelView: azdata.ModelView): Promise<(azdata.DashboardTab | azdata.DashboardTabGroup)[]> {
|
||||
await Promise.all([this._controllerModel.refresh(), this._databaseModel.refresh()]);
|
||||
|
||||
const overviewPage = new PostgresOverviewPage(modelView, this._controllerModel, this._databaseModel);
|
||||
const computeStoragePage = new PostgresComputeStoragePage(modelView, this._controllerModel, this._databaseModel);
|
||||
const connectionStringsPage = new PostgresConnectionStringsPage(modelView, this._controllerModel, this._databaseModel);
|
||||
const backupPage = new PostgresBackupPage(modelView, this._controllerModel, this._databaseModel);
|
||||
const propertiesPage = new PostgresPropertiesPage(modelView, this._controllerModel, this._databaseModel);
|
||||
const networkingPage = new PostgresNetworkingPage(modelView, this._controllerModel, this._databaseModel);
|
||||
|
||||
return [
|
||||
overviewPage.tab,
|
||||
{
|
||||
title: loc.settings,
|
||||
tabs: [
|
||||
computeStoragePage.tab,
|
||||
connectionStringsPage.tab,
|
||||
backupPage.tab,
|
||||
propertiesPage.tab
|
||||
]
|
||||
}, {
|
||||
title: loc.security,
|
||||
tabs: [
|
||||
networkingPage.tab
|
||||
]
|
||||
}
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as azdata from 'azdata';
|
||||
import { ControllerModel } from '../../../models/controllerModel';
|
||||
import { PostgresModel } from '../../../models/postgresModel';
|
||||
import { DashboardPage } from '../../components/dashboardPage';
|
||||
|
||||
export abstract class PostgresDashboardPage extends DashboardPage {
|
||||
constructor(protected modelView: azdata.ModelView, protected controllerModel: ControllerModel, protected databaseModel: PostgresModel) {
|
||||
super(modelView);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as azdata from 'azdata';
|
||||
import * as loc from '../../../localizedConstants';
|
||||
import { IconPathHelper } from '../../../constants';
|
||||
import { PostgresDashboardPage } from './postgresDashboardPage';
|
||||
|
||||
export class PostgresNetworkingPage extends PostgresDashboardPage {
|
||||
protected get title(): string {
|
||||
return loc.networking;
|
||||
}
|
||||
|
||||
protected get id(): string {
|
||||
return 'postgres-networking';
|
||||
}
|
||||
|
||||
protected get icon(): { dark: string; light: string; } {
|
||||
return IconPathHelper.networking;
|
||||
}
|
||||
|
||||
protected get container(): azdata.Component {
|
||||
return this.modelView.modelBuilder.text().withProperties<azdata.TextComponentProperties>({ value: loc.networking }).component();
|
||||
}
|
||||
|
||||
protected get toolbarContainer(): azdata.ToolbarContainer {
|
||||
return this.modelView.modelBuilder.toolbarContainer().component();
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user