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

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

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

export function DtoUpdateNodePoolRequestFromJSON(
  json: any,
): DtoUpdateNodePoolRequest {
  return DtoUpdateNodePoolRequestFromJSONTyped(json, false);
}

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

export function DtoUpdateNodePoolRequestToJSON(
  json: any,
): DtoUpdateNodePoolRequest {
  return DtoUpdateNodePoolRequestToJSONTyped(json, false);
}

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

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