diff --git a/build/gulpfile.hygiene.js b/build/gulpfile.hygiene.js
index 1f9aab7df5..2dde039a25 100644
--- a/build/gulpfile.hygiene.js
+++ b/build/gulpfile.hygiene.js
@@ -103,6 +103,7 @@ const indentationFilter = [
'!extensions/resource-deployment/notebooks/**',
'!extensions/mssql/notebooks/**',
'!extensions/integration-tests/testData/**',
+ '!extensions/arc/src/controller/generated/**',
'!extensions/sql-database-projects/resources/templates/*.xml',
'!extensions/sql-database-projects/src/test/baselines/*.xml',
'!extensions/sql-database-projects/src/test/baselines/*.json',
diff --git a/build/lib/extensions.js b/build/lib/extensions.js
index 19a38340ac..770876a169 100644
--- a/build/lib/extensions.js
+++ b/build/lib/extensions.js
@@ -198,6 +198,7 @@ const externalExtensions = [
// Any extension not included here will be installed by default.
'admin-tool-ext-win',
'agent',
+ 'arc',
'import',
'profiler',
'admin-pack',
diff --git a/build/lib/extensions.ts b/build/lib/extensions.ts
index 624be94601..0d78b7ad2c 100644
--- a/build/lib/extensions.ts
+++ b/build/lib/extensions.ts
@@ -233,6 +233,7 @@ const externalExtensions = [
// Any extension not included here will be installed by default.
'admin-tool-ext-win',
'agent',
+ 'arc',
'import',
'profiler',
'admin-pack',
diff --git a/extensions/arc/.gitignore b/extensions/arc/.gitignore
new file mode 100644
index 0000000000..dfacd4d5b4
--- /dev/null
+++ b/extensions/arc/.gitignore
@@ -0,0 +1 @@
+*.vsix
\ No newline at end of file
diff --git a/extensions/arc/.vscodeignore b/extensions/arc/.vscodeignore
new file mode 100644
index 0000000000..602ebf11c0
--- /dev/null
+++ b/extensions/arc/.vscodeignore
@@ -0,0 +1,6 @@
+.gitignore
+src/**
+out/**
+extension.webpack.config.js
+tsconfig.json
+yarn.lock
diff --git a/extensions/arc/README.md b/extensions/arc/README.md
new file mode 100644
index 0000000000..0b6b81335e
--- /dev/null
+++ b/extensions/arc/README.md
@@ -0,0 +1,17 @@
+# Microsoft Azure Arc Extension for Azure Data Studio
+
+Welcome to Microsoft Azure Arc Extension for Azure Data Studio!
+
+## Code of Conduct
+
+This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
+
+## Privacy Statement
+
+The [Microsoft Enterprise and Developer Privacy Statement](https://privacy.microsoft.com/en-us/privacystatement) describes the privacy statement of this software.
+
+## License
+
+Copyright (c) Microsoft Corporation. All rights reserved.
+
+Licensed under the [Source EULA](https://raw.githubusercontent.com/Microsoft/azuredatastudio/master/LICENSE.txt).
diff --git a/extensions/arc/extension.webpack.config.js b/extensions/arc/extension.webpack.config.js
new file mode 100644
index 0000000000..35b95ccffc
--- /dev/null
+++ b/extensions/arc/extension.webpack.config.js
@@ -0,0 +1,17 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the Source EULA. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+
+//@ts-check
+
+'use strict';
+
+const withDefaults = require('../shared.webpack.config');
+
+module.exports = withDefaults({
+ context: __dirname,
+ entry: {
+ extension: './src/extension.ts'
+ }
+});
diff --git a/extensions/arc/images/add.svg b/extensions/arc/images/add.svg
new file mode 100644
index 0000000000..bc5c48438c
--- /dev/null
+++ b/extensions/arc/images/add.svg
@@ -0,0 +1,3 @@
+
diff --git a/extensions/arc/images/billing.svg b/extensions/arc/images/billing.svg
new file mode 100644
index 0000000000..8298ab03b3
--- /dev/null
+++ b/extensions/arc/images/billing.svg
@@ -0,0 +1,17 @@
+
diff --git a/extensions/arc/images/collapse-down-inverse.svg b/extensions/arc/images/collapse-down-inverse.svg
new file mode 100644
index 0000000000..81848c6598
--- /dev/null
+++ b/extensions/arc/images/collapse-down-inverse.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/extensions/arc/images/collapse-down.svg b/extensions/arc/images/collapse-down.svg
new file mode 100644
index 0000000000..122ab8abfb
--- /dev/null
+++ b/extensions/arc/images/collapse-down.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/extensions/arc/images/collapse-up-inverse.svg b/extensions/arc/images/collapse-up-inverse.svg
new file mode 100644
index 0000000000..a207d0f145
--- /dev/null
+++ b/extensions/arc/images/collapse-up-inverse.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/extensions/arc/images/collapse-up.svg b/extensions/arc/images/collapse-up.svg
new file mode 100644
index 0000000000..4c7c97e181
--- /dev/null
+++ b/extensions/arc/images/collapse-up.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/extensions/arc/images/connections.svg b/extensions/arc/images/connections.svg
new file mode 100644
index 0000000000..d4bf35a19b
--- /dev/null
+++ b/extensions/arc/images/connections.svg
@@ -0,0 +1,4 @@
+
diff --git a/extensions/arc/images/copy.svg b/extensions/arc/images/copy.svg
new file mode 100644
index 0000000000..330289da52
--- /dev/null
+++ b/extensions/arc/images/copy.svg
@@ -0,0 +1,3 @@
+
diff --git a/extensions/arc/images/delete.svg b/extensions/arc/images/delete.svg
new file mode 100644
index 0000000000..130e71d5f2
--- /dev/null
+++ b/extensions/arc/images/delete.svg
@@ -0,0 +1,3 @@
+
diff --git a/extensions/arc/images/edit.svg b/extensions/arc/images/edit.svg
new file mode 100644
index 0000000000..345362da0a
--- /dev/null
+++ b/extensions/arc/images/edit.svg
@@ -0,0 +1,3 @@
+
diff --git a/extensions/arc/images/extension.png b/extensions/arc/images/extension.png
new file mode 100644
index 0000000000..c86d6d1e00
Binary files /dev/null and b/extensions/arc/images/extension.png differ
diff --git a/extensions/arc/images/heart.svg b/extensions/arc/images/heart.svg
new file mode 100644
index 0000000000..3c60b8d751
--- /dev/null
+++ b/extensions/arc/images/heart.svg
@@ -0,0 +1,3 @@
+
diff --git a/extensions/arc/images/migrate.svg b/extensions/arc/images/migrate.svg
new file mode 100644
index 0000000000..27b10d55af
--- /dev/null
+++ b/extensions/arc/images/migrate.svg
@@ -0,0 +1,23 @@
+
diff --git a/extensions/arc/images/open-in-tab.svg b/extensions/arc/images/open-in-tab.svg
new file mode 100644
index 0000000000..a71a305037
--- /dev/null
+++ b/extensions/arc/images/open-in-tab.svg
@@ -0,0 +1,3 @@
+
diff --git a/extensions/arc/images/postgres.svg b/extensions/arc/images/postgres.svg
new file mode 100644
index 0000000000..e247e4e717
--- /dev/null
+++ b/extensions/arc/images/postgres.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/extensions/arc/images/properties.svg b/extensions/arc/images/properties.svg
new file mode 100644
index 0000000000..0e40fc87f0
--- /dev/null
+++ b/extensions/arc/images/properties.svg
@@ -0,0 +1,20 @@
+
diff --git a/extensions/arc/images/security.svg b/extensions/arc/images/security.svg
new file mode 100644
index 0000000000..065df840f6
--- /dev/null
+++ b/extensions/arc/images/security.svg
@@ -0,0 +1,17 @@
+
diff --git a/extensions/arc/package.json b/extensions/arc/package.json
new file mode 100644
index 0000000000..0bd74bc0e4
--- /dev/null
+++ b/extensions/arc/package.json
@@ -0,0 +1,65 @@
+{
+ "name": "arc",
+ "displayName": "%arc.displayName%",
+ "description": "%arc.description%",
+ "version": "0.1.0",
+ "publisher": "Microsoft",
+ "preview": true,
+ "license": "https://raw.githubusercontent.com/Microsoft/azuredatastudio/master/LICENSE.txt",
+ "icon": "images/extension.png",
+ "engines": {
+ "vscode": "*",
+ "azdata": ">=1.18.0"
+ },
+ "activationEvents": [
+ "onCommand:arc.manageMiaa",
+ "onCommand:arc.managePostgres"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/Microsoft/azuredatastudio.git"
+ },
+ "main": "./out/extension",
+ "contributes": {
+ "commands": [
+ {
+ "command": "arc.manageMiaa",
+ "title": "%arc.manageMiaa%"
+ },
+ {
+ "command": "arc.managePostgres",
+ "title": "%arc.managePostgres%"
+ }
+ ],
+ "menus": {
+ "commandPalette": [
+ {
+ "command": "arc.manageMiaa",
+ "when": "false"
+ },
+ {
+ "command": "arc.managePostgres",
+ "when": "false"
+ }
+ ]
+ },
+ "configuration": {
+ "type": "object",
+ "title": "%arc.configuration.title%",
+ "properties": {
+ "arc.ignoreSslVerification": {
+ "type": "boolean",
+ "default": true,
+ "description": "%arc.ignoreSslVerification.desc%"
+ }
+ }
+ }
+ },
+ "dependencies": {
+ "request": "^2.88.0",
+ "vscode-nls": "^4.1.2"
+ },
+ "devDependencies": {
+ "@types/request": "^2.48.3"
+ }
+}
diff --git a/extensions/arc/package.nls.json b/extensions/arc/package.nls.json
new file mode 100644
index 0000000000..46d81a7d25
--- /dev/null
+++ b/extensions/arc/package.nls.json
@@ -0,0 +1,8 @@
+{
+ "arc.displayName": "Azure Arc",
+ "arc.description": "Support for Azure Arc",
+ "arc.configuration.title": "Azure Arc",
+ "arc.ignoreSslVerification.desc" : "Ignore SSL verification errors against the controller endpoint if true",
+ "arc.manageMiaa": "Manage MIAA",
+ "arc.managePostgres": "Manage Postgres"
+}
diff --git a/extensions/arc/src/common/promise.ts b/extensions/arc/src/common/promise.ts
new file mode 100644
index 0000000000..53f62a287b
--- /dev/null
+++ b/extensions/arc/src/common/promise.ts
@@ -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 {
+ promise: Promise;
+ resolve!: (value?: T | PromiseLike) => void;
+ reject!: (reason?: any) => void;
+ constructor() {
+ this.promise = new Promise((resolve, reject) => {
+ this.resolve = resolve;
+ this.reject = reject;
+ });
+ }
+
+ then(onfulfilled?: (value: T) => TResult | Thenable, onrejected?: (reason: any) => TResult | Thenable): Thenable;
+ then(onfulfilled?: (value: T) => TResult | Thenable, onrejected?: (reason: any) => void): Thenable;
+ then(onfulfilled?: (value: T) => TResult | Thenable, onrejected?: (reason: any) => TResult | Thenable): Thenable {
+ return this.promise.then(onfulfilled, onrejected);
+ }
+}
diff --git a/extensions/arc/src/constants.ts b/extensions/arc/src/constants.ts
new file mode 100644
index 0000000000..28d14c3123
--- /dev/null
+++ b/extensions/arc/src/constants.ts
@@ -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' };
+}
diff --git a/extensions/arc/src/controller/README.md b/extensions/arc/src/controller/README.md
new file mode 100644
index 0000000000..81b8ddec26
--- /dev/null
+++ b/extensions/arc/src/controller/README.md
@@ -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://:30080/api//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/.
+
+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.
diff --git a/extensions/arc/src/controller/auth.ts b/extensions/arc/src/controller/auth.ts
new file mode 100644
index 0000000000..eb2f3994cb
--- /dev/null
+++ b/extensions/arc/src/controller/auth.ts
@@ -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;
+}
+
+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(ignoreSslConfigName, true);
+ } catch (error) {
+ console.error(`Unexpected error retrieving ${arcConfigSectionName}.${ignoreSslConfigName} setting : ${error}`);
+ }
+ return true;
+}
diff --git a/extensions/arc/src/controller/generated/dusky/api.ts b/extensions/arc/src/controller/generated/dusky/api.ts
new file mode 100644
index 0000000000..b1119f15c4
--- /dev/null
+++ b/extensions/arc/src/controller/generated/dusky/api.ts
@@ -0,0 +1,3 @@
+// This is the entrypoint for the package
+export * from './api/apis';
+export * from './model/models';
diff --git a/extensions/arc/src/controller/generated/dusky/api/apis.ts b/extensions/arc/src/controller/generated/dusky/api/apis.ts
new file mode 100644
index 0000000000..3c4a5b3311
--- /dev/null
+++ b/extensions/arc/src/controller/generated/dusky/api/apis.ts
@@ -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];
diff --git a/extensions/arc/src/controller/generated/dusky/api/databaseRouterApi.ts b/extensions/arc/src/controller/generated/dusky/api/databaseRouterApi.ts
new file mode 100644
index 0000000000..c5e0760dcb
--- /dev/null
+++ b/extensions/arc/src/controller/generated/dusky/api/databaseRouterApi.ts
@@ -0,0 +1,2647 @@
+/**
+ * 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 { DuskyObjectModelsBackup } from '../model/duskyObjectModelsBackup';
+import { DuskyObjectModelsBackupRetention } from '../model/duskyObjectModelsBackupRetention';
+import { DuskyObjectModelsDatabase } from '../model/duskyObjectModelsDatabase';
+import { DuskyObjectModelsDatabaseService } from '../model/duskyObjectModelsDatabaseService';
+import { DuskyObjectModelsDatabaseServiceList } from '../model/duskyObjectModelsDatabaseServiceList';
+import { DuskyObjectModelsDatabaseServiceVolumeStatus } from '../model/duskyObjectModelsDatabaseServiceVolumeStatus';
+import { DuskyObjectModelsRestoreStatus } from '../model/duskyObjectModelsRestoreStatus';
+import { DuskyObjectModelsRole } from '../model/duskyObjectModelsRole';
+import { DuskyObjectModelsUser } from '../model/duskyObjectModelsUser';
+import { Authentication, HttpBasicAuth, HttpBearerAuth, Interceptor, ObjectSerializer, VoidAuth } from '../model/models';
+import { V1Status } from '../model/v1Status';
+import { HttpError } from './apis';
+
+
+
+let defaultBasePath = 'https://10.135.16.138:30080';
+
+// ===============================================
+// This file is autogenerated - Please do not edit
+// ===============================================
+
+export enum DatabaseRouterApiApiKeys {
+}
+
+export class DatabaseRouterApi {
+ protected _basePath = defaultBasePath;
+ protected _defaultHeaders : any = {};
+ protected _useQuerystring : boolean = false;
+
+ protected authentications = {
+ 'default': 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: DatabaseRouterApiApiKeys, value: string) {
+ (this.authentications as any)[DatabaseRouterApiApiKeys[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 Creates a database in a Dusky database service.
+ * @param ns The namespace of the database service.
+ * @param serviceName The name of the database service.
+ * @param duskyObjectModelsDatabase
+ */
+ public async createDuskyDatabase (ns: string, serviceName: string, duskyObjectModelsDatabase?: DuskyObjectModelsDatabase, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: DuskyObjectModelsDatabase; }> {
+ const localVarPath = this.basePath + '/dusky/databases/{ns}/{serviceName}/databases'
+ .replace('{' + 'ns' + '}', encodeURIComponent(String(ns)))
+ .replace('{' + 'serviceName' + '}', encodeURIComponent(String(serviceName)));
+ let localVarQueryParameters: any = {};
+ let localVarHeaderParams: 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 createDuskyDatabase.');
+ }
+
+ // verify required parameter 'serviceName' is not null or undefined
+ if (serviceName === null || serviceName === undefined) {
+ throw new Error('Required parameter serviceName was null or undefined when calling createDuskyDatabase.');
+ }
+
+ (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(duskyObjectModelsDatabase, "DuskyObjectModelsDatabase")
+ };
+
+ 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) {
+ (localVarRequestOptions).formData = localVarFormParams;
+ } else {
+ localVarRequestOptions.form = localVarFormParams;
+ }
+ }
+ return new Promise<{ response: http.IncomingMessage; body: DuskyObjectModelsDatabase; }>((resolve, reject) => {
+ localVarRequest(localVarRequestOptions, (error, response, body) => {
+ if (error) {
+ reject(error);
+ } else {
+ body = ObjectSerializer.deserialize(body, "DuskyObjectModelsDatabase");
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
+ resolve({ response: response, body: body });
+ } else {
+ reject(new HttpError(response, body, response.statusCode));
+ }
+ }
+ });
+ });
+ });
+ }
+ /**
+ *
+ * @summary Creates a Dusky database service.
+ * @param duskyObjectModelsDatabaseService
+ */
+ public async createDuskyDatabaseService (duskyObjectModelsDatabaseService?: DuskyObjectModelsDatabaseService, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: DuskyObjectModelsDatabaseService; }> {
+ const localVarPath = this.basePath + '/dusky/databases';
+ let localVarQueryParameters: any = {};
+ let localVarHeaderParams: 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 = {};
+
+ (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) {
+ (localVarRequestOptions).formData = localVarFormParams;
+ } else {
+ localVarRequestOptions.form = localVarFormParams;
+ }
+ }
+ return new Promise<{ response: http.IncomingMessage; body: DuskyObjectModelsDatabaseService; }>((resolve, reject) => {
+ localVarRequest(localVarRequestOptions, (error, response, body) => {
+ if (error) {
+ reject(error);
+ } else {
+ body = ObjectSerializer.deserialize(body, "DuskyObjectModelsDatabaseService");
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
+ resolve({ response: response, body: body });
+ } else {
+ reject(new HttpError(response, body, response.statusCode));
+ }
+ }
+ });
+ });
+ });
+ }
+ /**
+ *
+ * @summary Creates a role in a Dusky database service.
+ * @param ns The namespace of the database service.
+ * @param dbName The name of the database service.
+ * @param roleName The name of the role to create.
+ */
+ public async createDuskyRole (ns: string, dbName: string, roleName: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: DuskyObjectModelsRole; }> {
+ const localVarPath = this.basePath + '/dusky/databases/{ns}/{dbName}/roles/{roleName}'
+ .replace('{' + 'ns' + '}', encodeURIComponent(String(ns)))
+ .replace('{' + 'dbName' + '}', encodeURIComponent(String(dbName)))
+ .replace('{' + 'roleName' + '}', encodeURIComponent(String(roleName)));
+ let localVarQueryParameters: any = {};
+ let localVarHeaderParams: 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 createDuskyRole.');
+ }
+
+ // verify required parameter 'dbName' is not null or undefined
+ if (dbName === null || dbName === undefined) {
+ throw new Error('Required parameter dbName was null or undefined when calling createDuskyRole.');
+ }
+
+ // verify required parameter 'roleName' is not null or undefined
+ if (roleName === null || roleName === undefined) {
+ throw new Error('Required parameter roleName was null or undefined when calling createDuskyRole.');
+ }
+
+ (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) {
+ (localVarRequestOptions).formData = localVarFormParams;
+ } else {
+ localVarRequestOptions.form = localVarFormParams;
+ }
+ }
+ return new Promise<{ response: http.IncomingMessage; body: DuskyObjectModelsRole; }>((resolve, reject) => {
+ localVarRequest(localVarRequestOptions, (error, response, body) => {
+ if (error) {
+ reject(error);
+ } else {
+ body = ObjectSerializer.deserialize(body, "DuskyObjectModelsRole");
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
+ resolve({ response: response, body: body });
+ } else {
+ reject(new HttpError(response, body, response.statusCode));
+ }
+ }
+ });
+ });
+ });
+ }
+ /**
+ *
+ * @summary Creates a user in a Dusky database service.
+ * @param ns The namespace of the database service.
+ * @param serviceName The name of the database service.
+ * @param duskyObjectModelsUser
+ */
+ public async createDuskyUser (ns: string, serviceName: string, duskyObjectModelsUser?: DuskyObjectModelsUser, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: DuskyObjectModelsUser; }> {
+ const localVarPath = this.basePath + '/dusky/databases/{ns}/{serviceName}/users'
+ .replace('{' + 'ns' + '}', encodeURIComponent(String(ns)))
+ .replace('{' + 'serviceName' + '}', encodeURIComponent(String(serviceName)));
+ let localVarQueryParameters: any = {};
+ let localVarHeaderParams: 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 createDuskyUser.');
+ }
+
+ // verify required parameter 'serviceName' is not null or undefined
+ if (serviceName === null || serviceName === undefined) {
+ throw new Error('Required parameter serviceName was null or undefined when calling createDuskyUser.');
+ }
+
+ (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(duskyObjectModelsUser, "DuskyObjectModelsUser")
+ };
+
+ 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) {
+ (localVarRequestOptions).formData = localVarFormParams;
+ } else {
+ localVarRequestOptions.form = localVarFormParams;
+ }
+ }
+ return new Promise<{ response: http.IncomingMessage; body: DuskyObjectModelsUser; }>((resolve, reject) => {
+ localVarRequest(localVarRequestOptions, (error, response, body) => {
+ if (error) {
+ reject(error);
+ } else {
+ body = ObjectSerializer.deserialize(body, "DuskyObjectModelsUser");
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
+ resolve({ response: response, body: body });
+ } else {
+ reject(new HttpError(response, body, response.statusCode));
+ }
+ }
+ });
+ });
+ });
+ }
+ /**
+ *
+ * @summary Deletes a Dusky database backup.
+ * @param ns The namespace of the database service.
+ * @param dbName The name of the database service.
+ * @param backupId The id of the backup to delete.
+ * @param tier The tier to delete the backup from. If omitted the backup will be deleted from all tiers.
+ */
+ public async deleteDuskyBackup (ns: string, dbName: string, backupId: string, tier?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: DuskyObjectModelsBackup; }> {
+ const localVarPath = this.basePath + '/dusky/databases/{ns}/{dbName}/backups/{backupId}'
+ .replace('{' + 'ns' + '}', encodeURIComponent(String(ns)))
+ .replace('{' + 'dbName' + '}', encodeURIComponent(String(dbName)))
+ .replace('{' + 'backupId' + '}', encodeURIComponent(String(backupId)));
+ let localVarQueryParameters: any = {};
+ let localVarHeaderParams: 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 deleteDuskyBackup.');
+ }
+
+ // verify required parameter 'dbName' is not null or undefined
+ if (dbName === null || dbName === undefined) {
+ throw new Error('Required parameter dbName was null or undefined when calling deleteDuskyBackup.');
+ }
+
+ // verify required parameter 'backupId' is not null or undefined
+ if (backupId === null || backupId === undefined) {
+ throw new Error('Required parameter backupId was null or undefined when calling deleteDuskyBackup.');
+ }
+
+ if (tier !== undefined) {
+ localVarQueryParameters['tier'] = ObjectSerializer.serialize(tier, "number");
+ }
+
+ (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) {
+ (localVarRequestOptions).formData = localVarFormParams;
+ } else {
+ localVarRequestOptions.form = localVarFormParams;
+ }
+ }
+ return new Promise<{ response: http.IncomingMessage; body: DuskyObjectModelsBackup; }>((resolve, reject) => {
+ localVarRequest(localVarRequestOptions, (error, response, body) => {
+ if (error) {
+ reject(error);
+ } else {
+ body = ObjectSerializer.deserialize(body, "DuskyObjectModelsBackup");
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
+ resolve({ response: response, body: body });
+ } else {
+ reject(new HttpError(response, body, response.statusCode));
+ }
+ }
+ });
+ });
+ });
+ }
+ /**
+ *
+ * @summary Deletes a database from a Dusky database service
+ * @param ns The namespace of the database service.
+ * @param serviceName The name of the database service.
+ * @param dbName The name of the database to delete.
+ */
+ public async deleteDuskyDatabase (ns: string, serviceName: string, dbName: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: DuskyObjectModelsDatabase; }> {
+ const localVarPath = this.basePath + '/dusky/databases/{ns}/{serviceName}/databases/{dbName}'
+ .replace('{' + 'ns' + '}', encodeURIComponent(String(ns)))
+ .replace('{' + 'serviceName' + '}', encodeURIComponent(String(serviceName)))
+ .replace('{' + 'dbName' + '}', encodeURIComponent(String(dbName)));
+ let localVarQueryParameters: any = {};
+ let localVarHeaderParams: 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 deleteDuskyDatabase.');
+ }
+
+ // verify required parameter 'serviceName' is not null or undefined
+ if (serviceName === null || serviceName === undefined) {
+ throw new Error('Required parameter serviceName was null or undefined when calling deleteDuskyDatabase.');
+ }
+
+ // verify required parameter 'dbName' is not null or undefined
+ if (dbName === null || dbName === undefined) {
+ throw new Error('Required parameter dbName was null or undefined when calling deleteDuskyDatabase.');
+ }
+
+ (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) {
+ (localVarRequestOptions).formData = localVarFormParams;
+ } else {
+ localVarRequestOptions.form = localVarFormParams;
+ }
+ }
+ return new Promise<{ response: http.IncomingMessage; body: DuskyObjectModelsDatabase; }>((resolve, reject) => {
+ localVarRequest(localVarRequestOptions, (error, response, body) => {
+ if (error) {
+ reject(error);
+ } else {
+ body = ObjectSerializer.deserialize(body, "DuskyObjectModelsDatabase");
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
+ resolve({ response: response, body: body });
+ } else {
+ reject(new HttpError(response, body, response.statusCode));
+ }
+ }
+ });
+ });
+ });
+ }
+ /**
+ *
+ * @summary Deletes a Dusky database service.
+ * @param ns The namespace of the database service.
+ * @param name The name of the database service to delete.
+ */
+ public async deleteDuskyDatabaseService (ns: string, name: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: V1Status; }> {
+ const localVarPath = this.basePath + '/dusky/databases/{ns}/{name}'
+ .replace('{' + 'ns' + '}', encodeURIComponent(String(ns)))
+ .replace('{' + 'name' + '}', encodeURIComponent(String(name)));
+ let localVarQueryParameters: any = {};
+ let localVarHeaderParams: 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 deleteDuskyDatabaseService.');
+ }
+
+ // 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 deleteDuskyDatabaseService.');
+ }
+
+ (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) {
+ (localVarRequestOptions).formData = localVarFormParams;
+ } else {
+ localVarRequestOptions.form = localVarFormParams;
+ }
+ }
+ return new Promise<{ response: http.IncomingMessage; body: V1Status; }>((resolve, reject) => {
+ localVarRequest(localVarRequestOptions, (error, response, body) => {
+ if (error) {
+ reject(error);
+ } else {
+ body = ObjectSerializer.deserialize(body, "V1Status");
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
+ resolve({ response: response, body: body });
+ } else {
+ reject(new HttpError(response, body, response.statusCode));
+ }
+ }
+ });
+ });
+ });
+ }
+ /**
+ *
+ * @summary Deletes a role from a Dusky database.
+ * @param ns The namespace of the database service.
+ * @param dbName The name of the database service.
+ * @param roleName The name of the role to delete.
+ */
+ public async deleteDuskyRole (ns: string, dbName: string, roleName: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: DuskyObjectModelsRole; }> {
+ const localVarPath = this.basePath + '/dusky/databases/{ns}/{dbName}/roles/{roleName}'
+ .replace('{' + 'ns' + '}', encodeURIComponent(String(ns)))
+ .replace('{' + 'dbName' + '}', encodeURIComponent(String(dbName)))
+ .replace('{' + 'roleName' + '}', encodeURIComponent(String(roleName)));
+ let localVarQueryParameters: any = {};
+ let localVarHeaderParams: 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 deleteDuskyRole.');
+ }
+
+ // verify required parameter 'dbName' is not null or undefined
+ if (dbName === null || dbName === undefined) {
+ throw new Error('Required parameter dbName was null or undefined when calling deleteDuskyRole.');
+ }
+
+ // verify required parameter 'roleName' is not null or undefined
+ if (roleName === null || roleName === undefined) {
+ throw new Error('Required parameter roleName was null or undefined when calling deleteDuskyRole.');
+ }
+
+ (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) {
+ (localVarRequestOptions).formData = localVarFormParams;
+ } else {
+ localVarRequestOptions.form = localVarFormParams;
+ }
+ }
+ return new Promise<{ response: http.IncomingMessage; body: DuskyObjectModelsRole; }>((resolve, reject) => {
+ localVarRequest(localVarRequestOptions, (error, response, body) => {
+ if (error) {
+ reject(error);
+ } else {
+ body = ObjectSerializer.deserialize(body, "DuskyObjectModelsRole");
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
+ resolve({ response: response, body: body });
+ } else {
+ reject(new HttpError(response, body, response.statusCode));
+ }
+ }
+ });
+ });
+ });
+ }
+ /**
+ *
+ * @summary Deletes a user from a Dusky database.
+ * @param ns The namespace of the database service.
+ * @param serviceName The name of the database service.
+ * @param userName The name of the user to delete.
+ */
+ public async deleteDuskyUser (ns: string, serviceName: string, userName: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: DuskyObjectModelsUser; }> {
+ const localVarPath = this.basePath + '/dusky/databases/{ns}/{serviceName}/users/{userName}'
+ .replace('{' + 'ns' + '}', encodeURIComponent(String(ns)))
+ .replace('{' + 'serviceName' + '}', encodeURIComponent(String(serviceName)))
+ .replace('{' + 'userName' + '}', encodeURIComponent(String(userName)));
+ let localVarQueryParameters: any = {};
+ let localVarHeaderParams: 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 deleteDuskyUser.');
+ }
+
+ // verify required parameter 'serviceName' is not null or undefined
+ if (serviceName === null || serviceName === undefined) {
+ throw new Error('Required parameter serviceName was null or undefined when calling deleteDuskyUser.');
+ }
+
+ // verify required parameter 'userName' is not null or undefined
+ if (userName === null || userName === undefined) {
+ throw new Error('Required parameter userName was null or undefined when calling deleteDuskyUser.');
+ }
+
+ (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) {
+ (localVarRequestOptions).formData = localVarFormParams;
+ } else {
+ localVarRequestOptions.form = localVarFormParams;
+ }
+ }
+ return new Promise<{ response: http.IncomingMessage; body: DuskyObjectModelsUser; }>((resolve, reject) => {
+ localVarRequest(localVarRequestOptions, (error, response, body) => {
+ if (error) {
+ reject(error);
+ } else {
+ body = ObjectSerializer.deserialize(body, "DuskyObjectModelsUser");
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
+ resolve({ response: response, body: body });
+ } else {
+ reject(new HttpError(response, body, response.statusCode));
+ }
+ }
+ });
+ });
+ });
+ }
+ /**
+ *
+ * @summary Deletes volumes used by database services.
+ * @param ns The namespace of the database services. If omitted, all namespaces are considered.
+ * @param dbId The id of the database service. If omitted, all database services in the namespace are considered.
+ */
+ public async deleteDuskyVolumes (ns?: string, dbId?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
+ const localVarPath = this.basePath + '/dusky/databases/volumes';
+ let localVarQueryParameters: any = {};
+ let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders);
+ let localVarFormParams: any = {};
+
+ if (ns !== undefined) {
+ localVarQueryParameters['ns'] = ObjectSerializer.serialize(ns, "string");
+ }
+
+ if (dbId !== undefined) {
+ localVarQueryParameters['dbId'] = ObjectSerializer.serialize(dbId, "string");
+ }
+
+ (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) {
+ (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 a Dusky database backup.
+ * @param ns The namespace of the database service.
+ * @param dbName The name of the database service that will process the request.
+ * @param backupId The id of the backup to get.
+ * @param from The ID of a different database service to get the backup from, or omitted to get it from this service.
+ * @param tier The tier to get the backup from. If omitted all tiers will be searched.
+ */
+ public async getDuskyBackup (ns: string, dbName: string, backupId: string, from?: string, tier?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: DuskyObjectModelsBackup; }> {
+ const localVarPath = this.basePath + '/dusky/databases/{ns}/{dbName}/backups/{backupId}'
+ .replace('{' + 'ns' + '}', encodeURIComponent(String(ns)))
+ .replace('{' + 'dbName' + '}', encodeURIComponent(String(dbName)))
+ .replace('{' + 'backupId' + '}', encodeURIComponent(String(backupId)));
+ let localVarQueryParameters: any = {};
+ let localVarHeaderParams: 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 getDuskyBackup.');
+ }
+
+ // verify required parameter 'dbName' is not null or undefined
+ if (dbName === null || dbName === undefined) {
+ throw new Error('Required parameter dbName was null or undefined when calling getDuskyBackup.');
+ }
+
+ // verify required parameter 'backupId' is not null or undefined
+ if (backupId === null || backupId === undefined) {
+ throw new Error('Required parameter backupId was null or undefined when calling getDuskyBackup.');
+ }
+
+ if (from !== undefined) {
+ localVarQueryParameters['from'] = ObjectSerializer.serialize(from, "string");
+ }
+
+ if (tier !== undefined) {
+ localVarQueryParameters['tier'] = ObjectSerializer.serialize(tier, "number");
+ }
+
+ (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) {
+ (localVarRequestOptions).formData = localVarFormParams;
+ } else {
+ localVarRequestOptions.form = localVarFormParams;
+ }
+ }
+ return new Promise<{ response: http.IncomingMessage; body: DuskyObjectModelsBackup; }>((resolve, reject) => {
+ localVarRequest(localVarRequestOptions, (error, response, body) => {
+ if (error) {
+ reject(error);
+ } else {
+ body = ObjectSerializer.deserialize(body, "DuskyObjectModelsBackup");
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
+ resolve({ response: response, body: body });
+ } else {
+ reject(new HttpError(response, body, response.statusCode));
+ }
+ }
+ });
+ });
+ });
+ }
+ /**
+ *
+ * @summary Lists the backups for a Dusky database service.
+ * @param ns The namespace of the database service.
+ * @param name The name of the database service that will process the request.
+ * @param from The ID of a different database service to list backups from, or omitted to list them from this service.
+ * @param tier The tier to list the backup from. If omitted backups will be listed from all tiers.
+ */
+ public async getDuskyBackups (ns: string, name: string, from?: string, tier?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> {
+ const localVarPath = this.basePath + '/dusky/databases/{ns}/{name}/backups'
+ .replace('{' + 'ns' + '}', encodeURIComponent(String(ns)))
+ .replace('{' + 'name' + '}', encodeURIComponent(String(name)));
+ let localVarQueryParameters: any = {};
+ let localVarHeaderParams: 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 getDuskyBackups.');
+ }
+
+ // 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 getDuskyBackups.');
+ }
+
+ if (from !== undefined) {
+ localVarQueryParameters['from'] = ObjectSerializer.serialize(from, "string");
+ }
+
+ if (tier !== undefined) {
+ localVarQueryParameters['tier'] = ObjectSerializer.serialize(tier, "number");
+ }
+
+ (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) {
+ (localVarRequestOptions).formData = localVarFormParams;
+ } else {
+ localVarRequestOptions.form = localVarFormParams;
+ }
+ }
+ return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => {
+ localVarRequest(localVarRequestOptions, (error, response, body) => {
+ if (error) {
+ reject(error);
+ } else {
+ body = ObjectSerializer.deserialize(body, "Array");
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
+ resolve({ response: response, body: body });
+ } else {
+ reject(new HttpError(response, body, response.statusCode));
+ }
+ }
+ });
+ });
+ });
+ }
+ /**
+ *
+ * @summary Gets a database in a Dusky database service.
+ * @param ns The namespace of the database service.
+ * @param serviceName The name of the database service.
+ * @param dbName The name of the database to get.
+ */
+ public async getDuskyDatabase (ns: string, serviceName: string, dbName: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: DuskyObjectModelsDatabase; }> {
+ const localVarPath = this.basePath + '/dusky/databases/{ns}/{serviceName}/databases/{dbName}'
+ .replace('{' + 'ns' + '}', encodeURIComponent(String(ns)))
+ .replace('{' + 'serviceName' + '}', encodeURIComponent(String(serviceName)))
+ .replace('{' + 'dbName' + '}', encodeURIComponent(String(dbName)));
+ let localVarQueryParameters: any = {};
+ let localVarHeaderParams: 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 getDuskyDatabase.');
+ }
+
+ // verify required parameter 'serviceName' is not null or undefined
+ if (serviceName === null || serviceName === undefined) {
+ throw new Error('Required parameter serviceName was null or undefined when calling getDuskyDatabase.');
+ }
+
+ // verify required parameter 'dbName' is not null or undefined
+ if (dbName === null || dbName === undefined) {
+ throw new Error('Required parameter dbName was null or undefined when calling getDuskyDatabase.');
+ }
+
+ (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) {
+ (localVarRequestOptions).formData = localVarFormParams;
+ } else {
+ localVarRequestOptions.form = localVarFormParams;
+ }
+ }
+ return new Promise<{ response: http.IncomingMessage; body: DuskyObjectModelsDatabase; }>((resolve, reject) => {
+ localVarRequest(localVarRequestOptions, (error, response, body) => {
+ if (error) {
+ reject(error);
+ } else {
+ body = ObjectSerializer.deserialize(body, "DuskyObjectModelsDatabase");
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
+ resolve({ response: response, body: body });
+ } else {
+ reject(new HttpError(response, body, response.statusCode));
+ }
+ }
+ });
+ });
+ });
+ }
+ /**
+ *
+ * @summary Fetches logs from given database service in namespace and downloads them on local machine.
+ * @param ns The namespace of the database service.
+ * @param serviceName The name of the database service.
+ */
+ public async getDuskyDatabaseLogs (ns: string, serviceName: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
+ const localVarPath = this.basePath + '/dusky/databases/{ns}/{serviceName}/logs'
+ .replace('{' + 'ns' + '}', encodeURIComponent(String(ns)))
+ .replace('{' + 'serviceName' + '}', encodeURIComponent(String(serviceName)));
+ let localVarQueryParameters: any = {};
+ let localVarHeaderParams: 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 getDuskyDatabaseLogs.');
+ }
+
+ // verify required parameter 'serviceName' is not null or undefined
+ if (serviceName === null || serviceName === undefined) {
+ throw new Error('Required parameter serviceName was null or undefined when calling getDuskyDatabaseLogs.');
+ }
+
+ (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) {
+ (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 most recent restore operation.
+ * @param ns The namespace of the database service.
+ * @param dbName The name of the database service.
+ */
+ public async getDuskyDatabaseRestoreStatus (ns: string, dbName: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: DuskyObjectModelsRestoreStatus; }> {
+ const localVarPath = this.basePath + '/dusky/databases/{ns}/{dbName}/backups/restore'
+ .replace('{' + 'ns' + '}', encodeURIComponent(String(ns)))
+ .replace('{' + 'dbName' + '}', encodeURIComponent(String(dbName)));
+ let localVarQueryParameters: any = {};
+ let localVarHeaderParams: 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 getDuskyDatabaseRestoreStatus.');
+ }
+
+ // verify required parameter 'dbName' is not null or undefined
+ if (dbName === null || dbName === undefined) {
+ throw new Error('Required parameter dbName was null or undefined when calling getDuskyDatabaseRestoreStatus.');
+ }
+
+ (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) {
+ (localVarRequestOptions).formData = localVarFormParams;
+ } else {
+ localVarRequestOptions.form = localVarFormParams;
+ }
+ }
+ return new Promise<{ response: http.IncomingMessage; body: DuskyObjectModelsRestoreStatus; }>((resolve, reject) => {
+ localVarRequest(localVarRequestOptions, (error, response, body) => {
+ if (error) {
+ reject(error);
+ } else {
+ body = ObjectSerializer.deserialize(body, "DuskyObjectModelsRestoreStatus");
+ 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 configuration of a Dusky database service.
+ * @param ns The namespace of the database service.
+ * @param name The name of the database service.
+ */
+ public async getDuskyDatabaseService (ns: string, name: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: DuskyObjectModelsDatabaseService; }> {
+ const localVarPath = this.basePath + '/dusky/databases/{ns}/{name}'
+ .replace('{' + 'ns' + '}', encodeURIComponent(String(ns)))
+ .replace('{' + 'name' + '}', encodeURIComponent(String(name)));
+ let localVarQueryParameters: any = {};
+ let localVarHeaderParams: 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 getDuskyDatabaseService.');
+ }
+
+ // 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 getDuskyDatabaseService.');
+ }
+
+ (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) {
+ (localVarRequestOptions).formData = localVarFormParams;
+ } else {
+ localVarRequestOptions.form = localVarFormParams;
+ }
+ }
+ return new Promise<{ response: http.IncomingMessage; body: DuskyObjectModelsDatabaseService; }>((resolve, reject) => {
+ localVarRequest(localVarRequestOptions, (error, response, body) => {
+ if (error) {
+ reject(error);
+ } else {
+ body = ObjectSerializer.deserialize(body, "DuskyObjectModelsDatabaseService");
+ 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 password for a Dusky database service.
+ * @param ns The namespace of the database service.
+ * @param name The name of the database service.
+ */
+ public async getDuskyPassword (ns: string, name: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
+ const localVarPath = this.basePath + '/dusky/databases/{ns}/{name}/password'
+ .replace('{' + 'ns' + '}', encodeURIComponent(String(ns)))
+ .replace('{' + 'name' + '}', encodeURIComponent(String(name)));
+ let localVarQueryParameters: any = {};
+ let localVarHeaderParams: 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 getDuskyPassword.');
+ }
+
+ // 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 getDuskyPassword.');
+ }
+
+ (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) {
+ (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 a user in a Dusky database service.
+ * @param ns
+ * @param serviceName
+ * @param userName
+ */
+ public async getDuskyUser (ns: string, serviceName: string, userName: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: DuskyObjectModelsUser; }> {
+ const localVarPath = this.basePath + '/dusky/databases/{ns}/{serviceName}/users/{userName}'
+ .replace('{' + 'ns' + '}', encodeURIComponent(String(ns)))
+ .replace('{' + 'serviceName' + '}', encodeURIComponent(String(serviceName)))
+ .replace('{' + 'userName' + '}', encodeURIComponent(String(userName)));
+ let localVarQueryParameters: any = {};
+ let localVarHeaderParams: 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 getDuskyUser.');
+ }
+
+ // verify required parameter 'serviceName' is not null or undefined
+ if (serviceName === null || serviceName === undefined) {
+ throw new Error('Required parameter serviceName was null or undefined when calling getDuskyUser.');
+ }
+
+ // verify required parameter 'userName' is not null or undefined
+ if (userName === null || userName === undefined) {
+ throw new Error('Required parameter userName was null or undefined when calling getDuskyUser.');
+ }
+
+ (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) {
+ (localVarRequestOptions).formData = localVarFormParams;
+ } else {
+ localVarRequestOptions.form = localVarFormParams;
+ }
+ }
+ return new Promise<{ response: http.IncomingMessage; body: DuskyObjectModelsUser; }>((resolve, reject) => {
+ localVarRequest(localVarRequestOptions, (error, response, body) => {
+ if (error) {
+ reject(error);
+ } else {
+ body = ObjectSerializer.deserialize(body, "DuskyObjectModelsUser");
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
+ resolve({ response: response, body: body });
+ } else {
+ reject(new HttpError(response, body, response.statusCode));
+ }
+ }
+ });
+ });
+ });
+ }
+ /**
+ *
+ * @summary Lists Dusky databases services.
+ * @param ns The namespace of the database services.
+ */
+ public async listDuskyDatabaseServices (ns: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: DuskyObjectModelsDatabaseServiceList; }> {
+ const localVarPath = this.basePath + '/dusky/databases/{ns}'
+ .replace('{' + 'ns' + '}', encodeURIComponent(String(ns)));
+ let localVarQueryParameters: any = {};
+ let localVarHeaderParams: 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 listDuskyDatabaseServices.');
+ }
+
+ (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) {
+ (localVarRequestOptions).formData = localVarFormParams;
+ } else {
+ localVarRequestOptions.form = localVarFormParams;
+ }
+ }
+ return new Promise<{ response: http.IncomingMessage; body: DuskyObjectModelsDatabaseServiceList; }>((resolve, reject) => {
+ localVarRequest(localVarRequestOptions, (error, response, body) => {
+ if (error) {
+ reject(error);
+ } else {
+ body = ObjectSerializer.deserialize(body, "DuskyObjectModelsDatabaseServiceList");
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
+ resolve({ response: response, body: body });
+ } else {
+ reject(new HttpError(response, body, response.statusCode));
+ }
+ }
+ });
+ });
+ });
+ }
+ /**
+ *
+ * @summary Lists databases in a Dusky database service.
+ * @param ns The namespace of the database service.
+ * @param name The name of the database service.
+ */
+ public async listDuskyDatabases (ns: string, name: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> {
+ const localVarPath = this.basePath + '/dusky/databases/{ns}/{name}/databases'
+ .replace('{' + 'ns' + '}', encodeURIComponent(String(ns)))
+ .replace('{' + 'name' + '}', encodeURIComponent(String(name)));
+ let localVarQueryParameters: any = {};
+ let localVarHeaderParams: 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 listDuskyDatabases.');
+ }
+
+ // 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 listDuskyDatabases.');
+ }
+
+ (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) {
+ (localVarRequestOptions).formData = localVarFormParams;
+ } else {
+ localVarRequestOptions.form = localVarFormParams;
+ }
+ }
+ return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => {
+ localVarRequest(localVarRequestOptions, (error, response, body) => {
+ if (error) {
+ reject(error);
+ } else {
+ body = ObjectSerializer.deserialize(body, "Array");
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
+ resolve({ response: response, body: body });
+ } else {
+ reject(new HttpError(response, body, response.statusCode));
+ }
+ }
+ });
+ });
+ });
+ }
+ /**
+ *
+ * @summary List the roles in a Dusky database service.
+ * @param ns The namespace of the database service.
+ * @param dbName The name of the database service.
+ */
+ public async listDuskyRoles (ns: string, dbName: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> {
+ const localVarPath = this.basePath + '/dusky/databases/{ns}/{dbName}/roles'
+ .replace('{' + 'ns' + '}', encodeURIComponent(String(ns)))
+ .replace('{' + 'dbName' + '}', encodeURIComponent(String(dbName)));
+ let localVarQueryParameters: any = {};
+ let localVarHeaderParams: 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 listDuskyRoles.');
+ }
+
+ // verify required parameter 'dbName' is not null or undefined
+ if (dbName === null || dbName === undefined) {
+ throw new Error('Required parameter dbName was null or undefined when calling listDuskyRoles.');
+ }
+
+ (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) {
+ (localVarRequestOptions).formData = localVarFormParams;
+ } else {
+ localVarRequestOptions.form = localVarFormParams;
+ }
+ }
+ return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => {
+ localVarRequest(localVarRequestOptions, (error, response, body) => {
+ if (error) {
+ reject(error);
+ } else {
+ body = ObjectSerializer.deserialize(body, "Array");
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
+ resolve({ response: response, body: body });
+ } else {
+ reject(new HttpError(response, body, response.statusCode));
+ }
+ }
+ });
+ });
+ });
+ }
+ /**
+ *
+ * @summary Lists the users in a Dusky database service.
+ * @param ns The namespace of the database service.
+ * @param name The name of the database service.
+ */
+ public async listDuskyUsers (ns: string, name: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> {
+ const localVarPath = this.basePath + '/dusky/databases/{ns}/{name}/users'
+ .replace('{' + 'ns' + '}', encodeURIComponent(String(ns)))
+ .replace('{' + 'name' + '}', encodeURIComponent(String(name)));
+ let localVarQueryParameters: any = {};
+ let localVarHeaderParams: 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 listDuskyUsers.');
+ }
+
+ // 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 listDuskyUsers.');
+ }
+
+ (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) {
+ (localVarRequestOptions).formData = localVarFormParams;
+ } else {
+ localVarRequestOptions.form = localVarFormParams;
+ }
+ }
+ return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => {
+ localVarRequest(localVarRequestOptions, (error, response, body) => {
+ if (error) {
+ reject(error);
+ } else {
+ body = ObjectSerializer.deserialize(body, "Array");
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
+ resolve({ response: response, body: body });
+ } else {
+ reject(new HttpError(response, body, response.statusCode));
+ }
+ }
+ });
+ });
+ });
+ }
+ /**
+ *
+ * @summary Lists volumes used by database services.
+ * @param ns The namespace of the database services. If omitted, all namespaces are considered.
+ */
+ public async listDuskyVolumes (ns?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> {
+ const localVarPath = this.basePath + '/dusky/databases/volumes';
+ let localVarQueryParameters: any = {};
+ let localVarHeaderParams: 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 = {};
+
+ if (ns !== undefined) {
+ localVarQueryParameters['ns'] = ObjectSerializer.serialize(ns, "string");
+ }
+
+ (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) {
+ (localVarRequestOptions).formData = localVarFormParams;
+ } else {
+ localVarRequestOptions.form = localVarFormParams;
+ }
+ }
+ return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => {
+ localVarRequest(localVarRequestOptions, (error, response, body) => {
+ if (error) {
+ reject(error);
+ } else {
+ body = ObjectSerializer.deserialize(body, "Array");
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
+ resolve({ response: response, body: body });
+ } else {
+ reject(new HttpError(response, body, response.statusCode));
+ }
+ }
+ });
+ });
+ });
+ }
+ /**
+ *
+ * @summary Restarts a Dusky database service.
+ * @param ns The namespace of the database service.
+ * @param name The name of the database service.
+ */
+ public async restartDuskyDatabaseService (ns: string, name: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
+ const localVarPath = this.basePath + '/dusky/databases/{ns}/{name}/restart'
+ .replace('{' + 'ns' + '}', encodeURIComponent(String(ns)))
+ .replace('{' + 'name' + '}', encodeURIComponent(String(name)));
+ let localVarQueryParameters: any = {};
+ let localVarHeaderParams: 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 restartDuskyDatabaseService.');
+ }
+
+ // 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 restartDuskyDatabaseService.');
+ }
+
+ (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) {
+ (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 Restores a Dusky database backup.
+ * @param ns The namespace of the database service.
+ * @param dbName The name of the database service that will process the request.
+ * @param id The id of the backup to restore.
+ * @param from The ID of a different database service to restore from, or omitted to restore from this service.
+ * @param time The timestamp or relative time (e.g. 1.5h) to restore the backup to.
+ * @param tier The tier to restore the backup from. If omitted the backup will be restored from the first available tier.
+ */
+ public async restoreDuskyBackup (ns: string, dbName: string, id?: string, from?: string, time?: string, tier?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: DuskyObjectModelsRestoreStatus; }> {
+ const localVarPath = this.basePath + '/dusky/databases/{ns}/{dbName}/backups/restore'
+ .replace('{' + 'ns' + '}', encodeURIComponent(String(ns)))
+ .replace('{' + 'dbName' + '}', encodeURIComponent(String(dbName)));
+ let localVarQueryParameters: any = {};
+ let localVarHeaderParams: 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 restoreDuskyBackup.');
+ }
+
+ // verify required parameter 'dbName' is not null or undefined
+ if (dbName === null || dbName === undefined) {
+ throw new Error('Required parameter dbName was null or undefined when calling restoreDuskyBackup.');
+ }
+
+ if (id !== undefined) {
+ localVarQueryParameters['id'] = ObjectSerializer.serialize(id, "string");
+ }
+
+ if (from !== undefined) {
+ localVarQueryParameters['from'] = ObjectSerializer.serialize(from, "string");
+ }
+
+ if (time !== undefined) {
+ localVarQueryParameters['time'] = ObjectSerializer.serialize(time, "string");
+ }
+
+ if (tier !== undefined) {
+ localVarQueryParameters['tier'] = ObjectSerializer.serialize(tier, "number");
+ }
+
+ (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) {
+ (localVarRequestOptions).formData = localVarFormParams;
+ } else {
+ localVarRequestOptions.form = localVarFormParams;
+ }
+ }
+ return new Promise<{ response: http.IncomingMessage; body: DuskyObjectModelsRestoreStatus; }>((resolve, reject) => {
+ localVarRequest(localVarRequestOptions, (error, response, body) => {
+ if (error) {
+ reject(error);
+ } else {
+ body = ObjectSerializer.deserialize(body, "DuskyObjectModelsRestoreStatus");
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
+ resolve({ response: response, body: body });
+ } else {
+ reject(new HttpError(response, body, response.statusCode));
+ }
+ }
+ });
+ });
+ });
+ }
+ /**
+ *
+ * @summary Takes a backup of a Dusky database service.
+ * @param ns The namespace of the database service.
+ * @param name The name of the database service to backup.
+ * @param backupName The name of the backup.
+ * @param throttle Whether to throttle the backup to reduce load.
+ */
+ public async takeDuskyBackup (ns: string, name: string, backupName?: string, throttle?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: DuskyObjectModelsBackup; }> {
+ const localVarPath = this.basePath + '/dusky/databases/{ns}/{name}/backups'
+ .replace('{' + 'ns' + '}', encodeURIComponent(String(ns)))
+ .replace('{' + 'name' + '}', encodeURIComponent(String(name)));
+ let localVarQueryParameters: any = {};
+ let localVarHeaderParams: 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 takeDuskyBackup.');
+ }
+
+ // 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 takeDuskyBackup.');
+ }
+
+ if (backupName !== undefined) {
+ localVarQueryParameters['backupName'] = ObjectSerializer.serialize(backupName, "string");
+ }
+
+ if (throttle !== undefined) {
+ localVarQueryParameters['throttle'] = ObjectSerializer.serialize(throttle, "boolean");
+ }
+
+ (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) {
+ (localVarRequestOptions).formData = localVarFormParams;
+ } else {
+ localVarRequestOptions.form = localVarFormParams;
+ }
+ }
+ return new Promise<{ response: http.IncomingMessage; body: DuskyObjectModelsBackup; }>((resolve, reject) => {
+ localVarRequest(localVarRequestOptions, (error, response, body) => {
+ if (error) {
+ reject(error);
+ } else {
+ body = ObjectSerializer.deserialize(body, "DuskyObjectModelsBackup");
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
+ resolve({ response: response, body: body });
+ } else {
+ reject(new HttpError(response, body, response.statusCode));
+ }
+ }
+ });
+ });
+ });
+ }
+ /**
+ *
+ * @summary Deletes old backups for a Dusky database service.
+ * @param ns The namespace of the database service.
+ * @param name The name of the database service.
+ * @param duskyObjectModelsBackupRetention
+ */
+ public async trimDuskyBackups (ns: string, name: string, duskyObjectModelsBackupRetention?: Array, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> {
+ const localVarPath = this.basePath + '/dusky/databases/{ns}/{name}/backups/trim'
+ .replace('{' + 'ns' + '}', encodeURIComponent(String(ns)))
+ .replace('{' + 'name' + '}', encodeURIComponent(String(name)));
+ let localVarQueryParameters: any = {};
+ let localVarHeaderParams: 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 trimDuskyBackups.');
+ }
+
+ // 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 trimDuskyBackups.');
+ }
+
+ (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(duskyObjectModelsBackupRetention, "Array")
+ };
+
+ 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) {
+ (localVarRequestOptions).formData = localVarFormParams;
+ } else {
+ localVarRequestOptions.form = localVarFormParams;
+ }
+ }
+ return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => {
+ localVarRequest(localVarRequestOptions, (error, response, body) => {
+ if (error) {
+ reject(error);
+ } else {
+ body = ObjectSerializer.deserialize(body, "Array");
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
+ resolve({ response: response, body: body });
+ } else {
+ reject(new HttpError(response, body, response.statusCode));
+ }
+ }
+ });
+ });
+ });
+ }
+ /**
+ *
+ * @summary Updates a database in a Dusky database service.
+ * @param ns The namespace of the database service.
+ * @param serviceName The name of the database service.
+ * @param dbName The name of the database to update.
+ * @param duskyObjectModelsDatabase
+ */
+ public async updateDuskyDatabase (ns: string, serviceName: string, dbName: string, duskyObjectModelsDatabase?: DuskyObjectModelsDatabase, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: DuskyObjectModelsDatabase; }> {
+ const localVarPath = this.basePath + '/dusky/databases/{ns}/{serviceName}/databases/{dbName}'
+ .replace('{' + 'ns' + '}', encodeURIComponent(String(ns)))
+ .replace('{' + 'serviceName' + '}', encodeURIComponent(String(serviceName)))
+ .replace('{' + 'dbName' + '}', encodeURIComponent(String(dbName)));
+ let localVarQueryParameters: any = {};
+ let localVarHeaderParams: 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 updateDuskyDatabase.');
+ }
+
+ // verify required parameter 'serviceName' is not null or undefined
+ if (serviceName === null || serviceName === undefined) {
+ throw new Error('Required parameter serviceName was null or undefined when calling updateDuskyDatabase.');
+ }
+
+ // verify required parameter 'dbName' is not null or undefined
+ if (dbName === null || dbName === undefined) {
+ throw new Error('Required parameter dbName was null or undefined when calling updateDuskyDatabase.');
+ }
+
+ (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(duskyObjectModelsDatabase, "DuskyObjectModelsDatabase")
+ };
+
+ 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) {
+ (localVarRequestOptions).formData = localVarFormParams;
+ } else {
+ localVarRequestOptions.form = localVarFormParams;
+ }
+ }
+ return new Promise<{ response: http.IncomingMessage; body: DuskyObjectModelsDatabase; }>((resolve, reject) => {
+ localVarRequest(localVarRequestOptions, (error, response, body) => {
+ if (error) {
+ reject(error);
+ } else {
+ body = ObjectSerializer.deserialize(body, "DuskyObjectModelsDatabase");
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
+ resolve({ response: response, body: body });
+ } else {
+ reject(new HttpError(response, body, response.statusCode));
+ }
+ }
+ });
+ });
+ });
+ }
+ /**
+ *
+ * @summary Updates a Dusky database service.
+ * @param ns The namespace of the database service.
+ * @param name The name of the database service to update.
+ * @param duskyObjectModelsDatabaseService
+ */
+ public async updateDuskyDatabaseService (ns: string, name: string, duskyObjectModelsDatabaseService?: DuskyObjectModelsDatabaseService, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: DuskyObjectModelsDatabaseService; }> {
+ const localVarPath = this.basePath + '/dusky/databases/{ns}/{name}'
+ .replace('{' + 'ns' + '}', encodeURIComponent(String(ns)))
+ .replace('{' + 'name' + '}', encodeURIComponent(String(name)));
+ let localVarQueryParameters: any = {};
+ let localVarHeaderParams: 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 updateDuskyDatabaseService.');
+ }
+
+ // 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 updateDuskyDatabaseService.');
+ }
+
+ (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(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) {
+ (localVarRequestOptions).formData = localVarFormParams;
+ } else {
+ localVarRequestOptions.form = localVarFormParams;
+ }
+ }
+ return new Promise<{ response: http.IncomingMessage; body: DuskyObjectModelsDatabaseService; }>((resolve, reject) => {
+ localVarRequest(localVarRequestOptions, (error, response, body) => {
+ if (error) {
+ reject(error);
+ } else {
+ body = ObjectSerializer.deserialize(body, "DuskyObjectModelsDatabaseService");
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
+ resolve({ response: response, body: body });
+ } else {
+ reject(new HttpError(response, body, response.statusCode));
+ }
+ }
+ });
+ });
+ });
+ }
+ /**
+ *
+ * @summary Updates a user in a Dusky database service.
+ * @param ns The namespace of the database service.
+ * @param serviceName The name of the database service.
+ * @param userName The name of the user to update
+ * @param duskyObjectModelsUser
+ */
+ public async updateDuskyUser (ns: string, serviceName: string, userName: string, duskyObjectModelsUser?: DuskyObjectModelsUser, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: DuskyObjectModelsUser; }> {
+ const localVarPath = this.basePath + '/dusky/databases/{ns}/{serviceName}/users/{userName}'
+ .replace('{' + 'ns' + '}', encodeURIComponent(String(ns)))
+ .replace('{' + 'serviceName' + '}', encodeURIComponent(String(serviceName)))
+ .replace('{' + 'userName' + '}', encodeURIComponent(String(userName)));
+ let localVarQueryParameters: any = {};
+ let localVarHeaderParams: 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 updateDuskyUser.');
+ }
+
+ // verify required parameter 'serviceName' is not null or undefined
+ if (serviceName === null || serviceName === undefined) {
+ throw new Error('Required parameter serviceName was null or undefined when calling updateDuskyUser.');
+ }
+
+ // verify required parameter 'userName' is not null or undefined
+ if (userName === null || userName === undefined) {
+ throw new Error('Required parameter userName was null or undefined when calling updateDuskyUser.');
+ }
+
+ (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(duskyObjectModelsUser, "DuskyObjectModelsUser")
+ };
+
+ 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) {
+ (localVarRequestOptions).formData = localVarFormParams;
+ } else {
+ localVarRequestOptions.form = localVarFormParams;
+ }
+ }
+ return new Promise<{ response: http.IncomingMessage; body: DuskyObjectModelsUser; }>((resolve, reject) => {
+ localVarRequest(localVarRequestOptions, (error, response, body) => {
+ if (error) {
+ reject(error);
+ } else {
+ body = ObjectSerializer.deserialize(body, "DuskyObjectModelsUser");
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
+ resolve({ response: response, body: body });
+ } else {
+ reject(new HttpError(response, body, response.statusCode));
+ }
+ }
+ });
+ });
+ });
+ }
+}
diff --git a/extensions/arc/src/controller/generated/dusky/api/databaseValidateRouterApi.ts b/extensions/arc/src/controller/generated/dusky/api/databaseValidateRouterApi.ts
new file mode 100644
index 0000000000..96709e5e73
--- /dev/null
+++ b/extensions/arc/src/controller/generated/dusky/api/databaseValidateRouterApi.ts
@@ -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': 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 = (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 = {};
+
+ (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) {
+ (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 = (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.');
+ }
+
+ (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) {
+ (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));
+ }
+ }
+ });
+ });
+ });
+ }
+}
diff --git a/extensions/arc/src/controller/generated/dusky/api/logsRouterApi.ts b/extensions/arc/src/controller/generated/dusky/api/logsRouterApi.ts
new file mode 100644
index 0000000000..c8d999b2a9
--- /dev/null
+++ b/extensions/arc/src/controller/generated/dusky/api/logsRouterApi.ts
@@ -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': 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 = (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 = {};
+
+ (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) {
+ (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));
+ }
+ }
+ });
+ });
+ });
+ }
+}
diff --git a/extensions/arc/src/controller/generated/dusky/api/metricRouterApi.ts b/extensions/arc/src/controller/generated/dusky/api/metricRouterApi.ts
new file mode 100644
index 0000000000..d17d1c9ffe
--- /dev/null
+++ b/extensions/arc/src/controller/generated/dusky/api/metricRouterApi.ts
@@ -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': 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 = (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 = {};
+
+ (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) {
+ (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));
+ }
+ }
+ });
+ });
+ });
+ }
+}
diff --git a/extensions/arc/src/controller/generated/dusky/api/operatorRouterApi.ts b/extensions/arc/src/controller/generated/dusky/api/operatorRouterApi.ts
new file mode 100644
index 0000000000..3a8381555b
--- /dev/null
+++ b/extensions/arc/src/controller/generated/dusky/api/operatorRouterApi.ts
@@ -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': 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 = (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 = {};
+
+ (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) {
+ (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 = (Object).assign({}, this._defaultHeaders);
+ let localVarFormParams: 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) {
+ (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));
+ }
+ }
+ });
+ });
+ });
+ }
+}
diff --git a/extensions/arc/src/controller/generated/dusky/model/clusterPatchModel.ts b/extensions/arc/src/controller/generated/dusky/model/clusterPatchModel.ts
new file mode 100644
index 0000000000..67a4fbbb7b
--- /dev/null
+++ b/extensions/arc/src/controller/generated/dusky/model/clusterPatchModel.ts
@@ -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;
+ }
+}
+
diff --git a/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsBackup.ts b/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsBackup.ts
new file mode 100644
index 0000000000..86aa592ff2
--- /dev/null
+++ b/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsBackup.ts
@@ -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;
+ }
+}
+
diff --git a/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsBackupCopySchedule.ts b/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsBackupCopySchedule.ts
new file mode 100644
index 0000000000..b09c856ddd
--- /dev/null
+++ b/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsBackupCopySchedule.ts
@@ -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;
+ }
+}
+
diff --git a/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsBackupRetention.ts b/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsBackupRetention.ts
new file mode 100644
index 0000000000..cc2b266c02
--- /dev/null
+++ b/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsBackupRetention.ts
@@ -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;
+ 'minimums'?: Array;
+
+ static discriminator: string | undefined = undefined;
+
+ static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
+ {
+ "name": "maximums",
+ "baseName": "maximums",
+ "type": "Array"
+ },
+ {
+ "name": "minimums",
+ "baseName": "minimums",
+ "type": "Array"
+ } ];
+
+ static getAttributeTypeMap() {
+ return DuskyObjectModelsBackupRetention.attributeTypeMap;
+ }
+}
+
diff --git a/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsBackupSpec.ts b/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsBackupSpec.ts
new file mode 100644
index 0000000000..4cabc23e03
--- /dev/null
+++ b/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsBackupSpec.ts
@@ -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;
+
+ 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"
+ } ];
+
+ static getAttributeTypeMap() {
+ return DuskyObjectModelsBackupSpec.attributeTypeMap;
+ }
+}
+
diff --git a/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsBackupTier.ts b/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsBackupTier.ts
new file mode 100644
index 0000000000..72480b5c20
--- /dev/null
+++ b/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsBackupTier.ts
@@ -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;
+ }
+}
+
diff --git a/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsDatabase.ts b/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsDatabase.ts
new file mode 100644
index 0000000000..13b542df4a
--- /dev/null
+++ b/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsDatabase.ts
@@ -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;
+ }
+}
+
diff --git a/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsDatabaseService.ts b/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsDatabaseService.ts
new file mode 100644
index 0000000000..435e02d50f
--- /dev/null
+++ b/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsDatabaseService.ts
@@ -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;
+ }
+}
+
diff --git a/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsDatabaseServiceArcPayload.ts b/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsDatabaseServiceArcPayload.ts
new file mode 100644
index 0000000000..8d1007e232
--- /dev/null
+++ b/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsDatabaseServiceArcPayload.ts
@@ -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;
+ }
+}
+
diff --git a/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsDatabaseServiceCondition.ts b/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsDatabaseServiceCondition.ts
new file mode 100644
index 0000000000..b76e717d65
--- /dev/null
+++ b/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsDatabaseServiceCondition.ts
@@ -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 = 'Unknown',
+ False = 'False',
+ True = 'True'
+ }
+}
diff --git a/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsDatabaseServiceList.ts b/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsDatabaseServiceList.ts
new file mode 100644
index 0000000000..fa6b671783
--- /dev/null
+++ b/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsDatabaseServiceList.ts
@@ -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;
+
+ 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"
+ } ];
+
+ static getAttributeTypeMap() {
+ return DuskyObjectModelsDatabaseServiceList.attributeTypeMap;
+ }
+}
+
diff --git a/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsDatabaseServiceSpec.ts b/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsDatabaseServiceSpec.ts
new file mode 100644
index 0000000000..7f57d3b274
--- /dev/null
+++ b/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsDatabaseServiceSpec.ts
@@ -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;
+ }
+}
+
diff --git a/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsDatabaseServiceStatus.ts b/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsDatabaseServiceStatus.ts
new file mode 100644
index 0000000000..d6e7c84b7b
--- /dev/null
+++ b/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsDatabaseServiceStatus.ts
@@ -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;
+ '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"
+ },
+ {
+ "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;
+ }
+}
+
diff --git a/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsDatabaseServiceVolumeStatus.ts b/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsDatabaseServiceVolumeStatus.ts
new file mode 100644
index 0000000000..a9a988faee
--- /dev/null
+++ b/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsDatabaseServiceVolumeStatus.ts
@@ -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;
+ }
+}
+
diff --git a/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsDockerSpec.ts b/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsDockerSpec.ts
new file mode 100644
index 0000000000..64134d0a73
--- /dev/null
+++ b/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsDockerSpec.ts
@@ -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;
+ }
+}
+
diff --git a/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsDuskyValidationMessage.ts b/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsDuskyValidationMessage.ts
new file mode 100644
index 0000000000..9298431ea0
--- /dev/null
+++ b/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsDuskyValidationMessage.ts
@@ -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 = 'Info',
+ Warning = 'Warning',
+ Fail = 'Fail'
+ }
+ export enum CodeEnum {
+ InvalidInput = 'InvalidInput',
+ ResourceExists = 'ResourceExists',
+ ResourceNotFound = 'ResourceNotFound',
+ ResourceNotRunning = 'ResourceNotRunning',
+ AvailableResources = 'AvailableResources',
+ InsufficientResources = 'InsufficientResources'
+ }
+}
diff --git a/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsDuskyValidationResult.ts b/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsDuskyValidationResult.ts
new file mode 100644
index 0000000000..1c624ddd20
--- /dev/null
+++ b/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsDuskyValidationResult.ts
@@ -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;
+
+ static discriminator: string | undefined = undefined;
+
+ static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
+ {
+ "name": "messages",
+ "baseName": "messages",
+ "type": "Array"
+ } ];
+
+ static getAttributeTypeMap() {
+ return DuskyObjectModelsDuskyValidationResult.attributeTypeMap;
+ }
+}
+
diff --git a/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsEngineSpec.ts b/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsEngineSpec.ts
new file mode 100644
index 0000000000..6b1d81380a
--- /dev/null
+++ b/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsEngineSpec.ts
@@ -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;
+
+ 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"
+ } ];
+
+ static getAttributeTypeMap() {
+ return DuskyObjectModelsEngineSpec.attributeTypeMap;
+ }
+}
+
diff --git a/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsError.ts b/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsError.ts
new file mode 100644
index 0000000000..98693a0f23
--- /dev/null
+++ b/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsError.ts
@@ -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;
+ }
+}
+
diff --git a/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsErrorDetails.ts b/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsErrorDetails.ts
new file mode 100644
index 0000000000..b5b961fb1d
--- /dev/null
+++ b/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsErrorDetails.ts
@@ -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;
+ }
+}
+
diff --git a/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsMonitoringSpec.ts b/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsMonitoringSpec.ts
new file mode 100644
index 0000000000..74c8792b95
--- /dev/null
+++ b/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsMonitoringSpec.ts
@@ -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;
+ }
+}
+
diff --git a/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsObjectMeta.ts b/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsObjectMeta.ts
new file mode 100644
index 0000000000..cab484a9ab
--- /dev/null
+++ b/extensions/arc/src/controller/generated/dusky/model/duskyObjectModelsObjectMeta.ts
@@ -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