/* 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 DtoQueueInfo
 */
export interface DtoQueueInfo {
  /**
   *
   * @type {number}
   * @memberof DtoQueueInfo
   */
  failed?: number;
  /**
   *
   * @type {string}
   * @memberof DtoQueueInfo
   */
  name?: string;
  /**
   *
   * @type {number}
   * @memberof DtoQueueInfo
   */
  pending?: number;
  /**
   *
   * @type {number}
   * @memberof DtoQueueInfo
   */
  running?: number;
  /**
   *
   * @type {number}
   * @memberof DtoQueueInfo
   */
  scheduled?: number;
}

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

export function DtoQueueInfoFromJSON(json: any): DtoQueueInfo {
  return DtoQueueInfoFromJSONTyped(json, false);
}

export function DtoQueueInfoFromJSONTyped(
  json: any,
  ignoreDiscriminator: boolean,
): DtoQueueInfo {
  if (json == null) {
    return json;
  }
  return {
    failed: json["failed"] == null ? undefined : json["failed"],
    name: json["name"] == null ? undefined : json["name"],
    pending: json["pending"] == null ? undefined : json["pending"],
    running: json["running"] == null ? undefined : json["running"],
    scheduled: json["scheduled"] == null ? undefined : json["scheduled"],
  };
}

export function DtoQueueInfoToJSON(json: any): DtoQueueInfo {
  return DtoQueueInfoToJSONTyped(json, false);
}

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

  return {
    failed: value["failed"],
    name: value["name"],
    pending: value["pending"],
    running: value["running"],
    scheduled: value["scheduled"],
  };
}
