mirror of
https://github.com/GlueOps/autoglue.git
synced 2026-02-13 04:40:05 +01:00
fix: rename sdk to match repo & introduce git subtree
This commit is contained in:
@@ -1,435 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import * as runtime from "../runtime";
|
||||
import type {
|
||||
DtoCreateTaintRequest,
|
||||
DtoTaintResponse,
|
||||
DtoUpdateTaintRequest,
|
||||
} from "../models/index";
|
||||
import {
|
||||
DtoCreateTaintRequestFromJSON,
|
||||
DtoCreateTaintRequestToJSON,
|
||||
DtoTaintResponseFromJSON,
|
||||
DtoTaintResponseToJSON,
|
||||
DtoUpdateTaintRequestFromJSON,
|
||||
DtoUpdateTaintRequestToJSON,
|
||||
} from "../models/index";
|
||||
|
||||
export interface CreateTaintRequest {
|
||||
body: DtoCreateTaintRequest;
|
||||
xOrgID?: string;
|
||||
}
|
||||
|
||||
export interface DeleteTaintRequest {
|
||||
id: string;
|
||||
xOrgID?: string;
|
||||
}
|
||||
|
||||
export interface GetTaintRequest {
|
||||
id: string;
|
||||
xOrgID?: string;
|
||||
}
|
||||
|
||||
export interface ListTaintsRequest {
|
||||
xOrgID?: string;
|
||||
key?: string;
|
||||
value?: string;
|
||||
q?: string;
|
||||
}
|
||||
|
||||
export interface UpdateTaintRequest {
|
||||
id: string;
|
||||
body: DtoUpdateTaintRequest;
|
||||
xOrgID?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class TaintsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* Creates a taint.
|
||||
* Create node taint (org scoped)
|
||||
*/
|
||||
async createTaintRaw(
|
||||
requestParameters: CreateTaintRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<DtoTaintResponse>> {
|
||||
if (requestParameters["body"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"body",
|
||||
'Required parameter "body" was null or undefined when calling createTaint().',
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters["Content-Type"] = "application/json";
|
||||
|
||||
if (requestParameters["xOrgID"] != null) {
|
||||
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-KEY"] =
|
||||
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-SECRET"] =
|
||||
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/taints`;
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "POST",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: DtoCreateTaintRequestToJSON(requestParameters["body"]),
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
DtoTaintResponseFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a taint.
|
||||
* Create node taint (org scoped)
|
||||
*/
|
||||
async createTaint(
|
||||
requestParameters: CreateTaintRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<DtoTaintResponse> {
|
||||
const response = await this.createTaintRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Permanently deletes the taint.
|
||||
* Delete taint (org scoped)
|
||||
*/
|
||||
async deleteTaintRaw(
|
||||
requestParameters: DeleteTaintRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<string>> {
|
||||
if (requestParameters["id"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
'Required parameter "id" was null or undefined when calling deleteTaint().',
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (requestParameters["xOrgID"] != null) {
|
||||
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-KEY"] =
|
||||
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-SECRET"] =
|
||||
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/taints/{id}`;
|
||||
urlPath = urlPath.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters["id"])),
|
||||
);
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "DELETE",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
if (this.isJsonMime(response.headers.get("content-type"))) {
|
||||
return new runtime.JSONApiResponse<string>(response);
|
||||
} else {
|
||||
return new runtime.TextApiResponse(response) as any;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Permanently deletes the taint.
|
||||
* Delete taint (org scoped)
|
||||
*/
|
||||
async deleteTaint(
|
||||
requestParameters: DeleteTaintRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<string> {
|
||||
const response = await this.deleteTaintRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get node taint by ID (org scoped)
|
||||
*/
|
||||
async getTaintRaw(
|
||||
requestParameters: GetTaintRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<DtoTaintResponse>> {
|
||||
if (requestParameters["id"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
'Required parameter "id" was null or undefined when calling getTaint().',
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (requestParameters["xOrgID"] != null) {
|
||||
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-KEY"] =
|
||||
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-SECRET"] =
|
||||
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/taints/{id}`;
|
||||
urlPath = urlPath.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters["id"])),
|
||||
);
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "GET",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
DtoTaintResponseFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get node taint by ID (org scoped)
|
||||
*/
|
||||
async getTaint(
|
||||
requestParameters: GetTaintRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<DtoTaintResponse> {
|
||||
const response = await this.getTaintRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns node taints for the organization in X-Org-ID. Filters: `key`, `value`, and `q` (key contains). Add `include=node_pools` to include linked node pools.
|
||||
* List node pool taints (org scoped)
|
||||
*/
|
||||
async listTaintsRaw(
|
||||
requestParameters: ListTaintsRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<Array<DtoTaintResponse>>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters["key"] != null) {
|
||||
queryParameters["key"] = requestParameters["key"];
|
||||
}
|
||||
|
||||
if (requestParameters["value"] != null) {
|
||||
queryParameters["value"] = requestParameters["value"];
|
||||
}
|
||||
|
||||
if (requestParameters["q"] != null) {
|
||||
queryParameters["q"] = requestParameters["q"];
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (requestParameters["xOrgID"] != null) {
|
||||
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-KEY"] =
|
||||
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-SECRET"] =
|
||||
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/taints`;
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "GET",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
jsonValue.map(DtoTaintResponseFromJSON),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns node taints for the organization in X-Org-ID. Filters: `key`, `value`, and `q` (key contains). Add `include=node_pools` to include linked node pools.
|
||||
* List node pool taints (org scoped)
|
||||
*/
|
||||
async listTaints(
|
||||
requestParameters: ListTaintsRequest = {},
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<Array<DtoTaintResponse>> {
|
||||
const response = await this.listTaintsRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Partially update taint fields.
|
||||
* Update node taint (org scoped)
|
||||
*/
|
||||
async updateTaintRaw(
|
||||
requestParameters: UpdateTaintRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<DtoTaintResponse>> {
|
||||
if (requestParameters["id"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
'Required parameter "id" was null or undefined when calling updateTaint().',
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters["body"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"body",
|
||||
'Required parameter "body" was null or undefined when calling updateTaint().',
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters["Content-Type"] = "application/json";
|
||||
|
||||
if (requestParameters["xOrgID"] != null) {
|
||||
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-KEY"] =
|
||||
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-SECRET"] =
|
||||
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/taints/{id}`;
|
||||
urlPath = urlPath.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters["id"])),
|
||||
);
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "PATCH",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: DtoUpdateTaintRequestToJSON(requestParameters["body"]),
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
DtoTaintResponseFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Partially update taint fields.
|
||||
* Update node taint (org scoped)
|
||||
*/
|
||||
async updateTaint(
|
||||
requestParameters: UpdateTaintRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<DtoTaintResponse> {
|
||||
const response = await this.updateTaintRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user