/* 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 DtoCreateNodePoolRequest
 */
export interface DtoCreateNodePoolRequest {
  /**
   *
   * @type {string}
   * @memberof DtoCreateNodePoolRequest
   */
  name?: string;
  /**
   *
   * @type {string}
   * @memberof DtoCreateNodePoolRequest
   */
  role?: DtoCreateNodePoolRequestRoleEnum;
}

/**
 * @export
 */
export const DtoCreateNodePoolRequestRoleEnum = {
  master: "master",
  worker: "worker",
} as const;
export type DtoCreateNodePoolRequestRoleEnum =
  (typeof DtoCreateNodePoolRequestRoleEnum)[keyof typeof DtoCreateNodePoolRequestRoleEnum];

/**
 * Check if a given object implements the DtoCreateNodePoolRequest interface.
 */
export function instanceOfDtoCreateNodePoolRequest(
  value: object,
): value is DtoCreateNodePoolRequest {
  return true;
}

export function DtoCreateNodePoolRequestFromJSON(
  json: any,
): DtoCreateNodePoolRequest {
  return DtoCreateNodePoolRequestFromJSONTyped(json, false);
}

export function DtoCreateNodePoolRequestFromJSONTyped(
  json: any,
  ignoreDiscriminator: boolean,
): DtoCreateNodePoolRequest {
  if (json == null) {
    return json;
  }
  return {
    name: json["name"] == null ? undefined : json["name"],
    role: json["role"] == null ? undefined : json["role"],
  };
}

export function DtoCreateNodePoolRequestToJSON(
  json: any,
): DtoCreateNodePoolRequest {
  return DtoCreateNodePoolRequestToJSONTyped(json, false);
}

export function DtoCreateNodePoolRequestToJSONTyped(
  value?: DtoCreateNodePoolRequest | null,
  ignoreDiscriminator: boolean = false,
): any {
  if (value == null) {
    return value;
  }

  return {
    name: value["name"],
    role: value["role"],
  };
}
