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

150 lines
3.5 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";
/**
*
* @export
* @interface DtoUpdateServerRequest
*/
export interface DtoUpdateServerRequest {
/**
*
* @type {string}
* @memberof DtoUpdateServerRequest
*/
hostname?: string;
/**
*
* @type {string}
* @memberof DtoUpdateServerRequest
*/
private_ip_address?: string;
/**
*
* @type {string}
* @memberof DtoUpdateServerRequest
*/
public_ip_address?: string;
/**
*
* @type {string}
* @memberof DtoUpdateServerRequest
*/
role?: DtoUpdateServerRequestRoleEnum;
/**
*
* @type {string}
* @memberof DtoUpdateServerRequest
*/
ssh_key_id?: string;
/**
*
* @type {string}
* @memberof DtoUpdateServerRequest
*/
ssh_user?: string;
/**
*
* @type {string}
* @memberof DtoUpdateServerRequest
*/
status?: DtoUpdateServerRequestStatusEnum;
}
/**
* @export
*/
export const DtoUpdateServerRequestRoleEnum = {
master: "master",
worker: "worker",
bastion: "bastion",
} as const;
export type DtoUpdateServerRequestRoleEnum =
(typeof DtoUpdateServerRequestRoleEnum)[keyof typeof DtoUpdateServerRequestRoleEnum];
/**
* @export
*/
export const DtoUpdateServerRequestStatusEnum = {
pending: "pending",
provisioning: "provisioning",
ready: "ready",
failed: "failed",
} as const;
export type DtoUpdateServerRequestStatusEnum =
(typeof DtoUpdateServerRequestStatusEnum)[keyof typeof DtoUpdateServerRequestStatusEnum];
/**
* Check if a given object implements the DtoUpdateServerRequest interface.
*/
export function instanceOfDtoUpdateServerRequest(
value: object,
): value is DtoUpdateServerRequest {
return true;
}
export function DtoUpdateServerRequestFromJSON(
json: any,
): DtoUpdateServerRequest {
return DtoUpdateServerRequestFromJSONTyped(json, false);
}
export function DtoUpdateServerRequestFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): DtoUpdateServerRequest {
if (json == null) {
return json;
}
return {
hostname: json["hostname"] == null ? undefined : json["hostname"],
private_ip_address:
json["private_ip_address"] == null
? undefined
: json["private_ip_address"],
public_ip_address:
json["public_ip_address"] == null ? undefined : json["public_ip_address"],
role: json["role"] == null ? undefined : json["role"],
ssh_key_id: json["ssh_key_id"] == null ? undefined : json["ssh_key_id"],
ssh_user: json["ssh_user"] == null ? undefined : json["ssh_user"],
status: json["status"] == null ? undefined : json["status"],
};
}
export function DtoUpdateServerRequestToJSON(
json: any,
): DtoUpdateServerRequest {
return DtoUpdateServerRequestToJSONTyped(json, false);
}
export function DtoUpdateServerRequestToJSONTyped(
value?: DtoUpdateServerRequest | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
hostname: value["hostname"],
private_ip_address: value["private_ip_address"],
public_ip_address: value["public_ip_address"],
role: value["role"],
ssh_key_id: value["ssh_key_id"],
ssh_user: value["ssh_user"],
status: value["status"],
};
}