Files
autoglue/sdk/ts/src/models/DtoClusterResponse.ts
2025-12-08 17:04:10 +00:00

285 lines
7.4 KiB
TypeScript

/* tslint:disable */
/* eslint-disable */
/**
* AutoGlue API
* API for managing K3s clusters across cloud providers
*
* The version of the OpenAPI document: dev
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from "../runtime";
import type { DtoDomainResponse } from "./DtoDomainResponse";
import {
DtoDomainResponseFromJSON,
DtoDomainResponseFromJSONTyped,
DtoDomainResponseToJSON,
DtoDomainResponseToJSONTyped,
} from "./DtoDomainResponse";
import type { DtoLoadBalancerResponse } from "./DtoLoadBalancerResponse";
import {
DtoLoadBalancerResponseFromJSON,
DtoLoadBalancerResponseFromJSONTyped,
DtoLoadBalancerResponseToJSON,
DtoLoadBalancerResponseToJSONTyped,
} from "./DtoLoadBalancerResponse";
import type { DtoNodePoolResponse } from "./DtoNodePoolResponse";
import {
DtoNodePoolResponseFromJSON,
DtoNodePoolResponseFromJSONTyped,
DtoNodePoolResponseToJSON,
DtoNodePoolResponseToJSONTyped,
} from "./DtoNodePoolResponse";
import type { DtoServerResponse } from "./DtoServerResponse";
import {
DtoServerResponseFromJSON,
DtoServerResponseFromJSONTyped,
DtoServerResponseToJSON,
DtoServerResponseToJSONTyped,
} from "./DtoServerResponse";
import type { DtoRecordSetResponse } from "./DtoRecordSetResponse";
import {
DtoRecordSetResponseFromJSON,
DtoRecordSetResponseFromJSONTyped,
DtoRecordSetResponseToJSON,
DtoRecordSetResponseToJSONTyped,
} from "./DtoRecordSetResponse";
/**
*
* @export
* @interface DtoClusterResponse
*/
export interface DtoClusterResponse {
/**
*
* @type {DtoLoadBalancerResponse}
* @memberof DtoClusterResponse
*/
apps_load_balancer?: DtoLoadBalancerResponse;
/**
*
* @type {DtoServerResponse}
* @memberof DtoClusterResponse
*/
bastion_server?: DtoServerResponse;
/**
*
* @type {DtoDomainResponse}
* @memberof DtoClusterResponse
*/
captain_domain?: DtoDomainResponse;
/**
*
* @type {string}
* @memberof DtoClusterResponse
*/
certificate_key?: string;
/**
*
* @type {string}
* @memberof DtoClusterResponse
*/
cluster_provider?: string;
/**
*
* @type {string}
* @memberof DtoClusterResponse
*/
control_plane_fqdn?: string;
/**
*
* @type {DtoRecordSetResponse}
* @memberof DtoClusterResponse
*/
control_plane_record_set?: DtoRecordSetResponse;
/**
*
* @type {string}
* @memberof DtoClusterResponse
*/
created_at?: string;
/**
*
* @type {string}
* @memberof DtoClusterResponse
*/
docker_image?: string;
/**
*
* @type {string}
* @memberof DtoClusterResponse
*/
docker_tag?: string;
/**
*
* @type {DtoLoadBalancerResponse}
* @memberof DtoClusterResponse
*/
glueops_load_balancer?: DtoLoadBalancerResponse;
/**
*
* @type {string}
* @memberof DtoClusterResponse
*/
id?: string;
/**
*
* @type {string}
* @memberof DtoClusterResponse
*/
last_error?: string;
/**
*
* @type {string}
* @memberof DtoClusterResponse
*/
name?: string;
/**
*
* @type {Array<DtoNodePoolResponse>}
* @memberof DtoClusterResponse
*/
node_pools?: Array<DtoNodePoolResponse>;
/**
*
* @type {string}
* @memberof DtoClusterResponse
*/
random_token?: string;
/**
*
* @type {string}
* @memberof DtoClusterResponse
*/
region?: string;
/**
*
* @type {string}
* @memberof DtoClusterResponse
*/
status?: string;
/**
*
* @type {string}
* @memberof DtoClusterResponse
*/
updated_at?: string;
}
/**
* Check if a given object implements the DtoClusterResponse interface.
*/
export function instanceOfDtoClusterResponse(
value: object,
): value is DtoClusterResponse {
return true;
}
export function DtoClusterResponseFromJSON(json: any): DtoClusterResponse {
return DtoClusterResponseFromJSONTyped(json, false);
}
export function DtoClusterResponseFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): DtoClusterResponse {
if (json == null) {
return json;
}
return {
apps_load_balancer:
json["apps_load_balancer"] == null
? undefined
: DtoLoadBalancerResponseFromJSON(json["apps_load_balancer"]),
bastion_server:
json["bastion_server"] == null
? undefined
: DtoServerResponseFromJSON(json["bastion_server"]),
captain_domain:
json["captain_domain"] == null
? undefined
: DtoDomainResponseFromJSON(json["captain_domain"]),
certificate_key:
json["certificate_key"] == null ? undefined : json["certificate_key"],
cluster_provider:
json["cluster_provider"] == null ? undefined : json["cluster_provider"],
control_plane_fqdn:
json["control_plane_fqdn"] == null
? undefined
: json["control_plane_fqdn"],
control_plane_record_set:
json["control_plane_record_set"] == null
? undefined
: DtoRecordSetResponseFromJSON(json["control_plane_record_set"]),
created_at: json["created_at"] == null ? undefined : json["created_at"],
docker_image:
json["docker_image"] == null ? undefined : json["docker_image"],
docker_tag: json["docker_tag"] == null ? undefined : json["docker_tag"],
glueops_load_balancer:
json["glueops_load_balancer"] == null
? undefined
: DtoLoadBalancerResponseFromJSON(json["glueops_load_balancer"]),
id: json["id"] == null ? undefined : json["id"],
last_error: json["last_error"] == null ? undefined : json["last_error"],
name: json["name"] == null ? undefined : json["name"],
node_pools:
json["node_pools"] == null
? undefined
: (json["node_pools"] as Array<any>).map(DtoNodePoolResponseFromJSON),
random_token:
json["random_token"] == null ? undefined : json["random_token"],
region: json["region"] == null ? undefined : json["region"],
status: json["status"] == null ? undefined : json["status"],
updated_at: json["updated_at"] == null ? undefined : json["updated_at"],
};
}
export function DtoClusterResponseToJSON(json: any): DtoClusterResponse {
return DtoClusterResponseToJSONTyped(json, false);
}
export function DtoClusterResponseToJSONTyped(
value?: DtoClusterResponse | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
apps_load_balancer: DtoLoadBalancerResponseToJSON(
value["apps_load_balancer"],
),
bastion_server: DtoServerResponseToJSON(value["bastion_server"]),
captain_domain: DtoDomainResponseToJSON(value["captain_domain"]),
certificate_key: value["certificate_key"],
cluster_provider: value["cluster_provider"],
control_plane_fqdn: value["control_plane_fqdn"],
control_plane_record_set: DtoRecordSetResponseToJSON(
value["control_plane_record_set"],
),
created_at: value["created_at"],
docker_image: value["docker_image"],
docker_tag: value["docker_tag"],
glueops_load_balancer: DtoLoadBalancerResponseToJSON(
value["glueops_load_balancer"],
),
id: value["id"],
last_error: value["last_error"],
name: value["name"],
node_pools:
value["node_pools"] == null
? undefined
: (value["node_pools"] as Array<any>).map(DtoNodePoolResponseToJSON),
random_token: value["random_token"],
region: value["region"],
status: value["status"],
updated_at: value["updated_at"],
};
}