/* 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 UtilsErrorResponse
 */
export interface UtilsErrorResponse {
  /**
   * A machine-readable error code, e.g. "validation_error"
   * example: validation_error
   * @type {string}
   * @memberof UtilsErrorResponse
   */
  code?: string;
  /**
   * Human-readable message
   * example: slug is required
   * @type {string}
   * @memberof UtilsErrorResponse
   */
  message?: string;
}

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

export function UtilsErrorResponseFromJSON(json: any): UtilsErrorResponse {
  return UtilsErrorResponseFromJSONTyped(json, false);
}

export function UtilsErrorResponseFromJSONTyped(
  json: any,
  ignoreDiscriminator: boolean,
): UtilsErrorResponse {
  if (json == null) {
    return json;
  }
  return {
    code: json["code"] == null ? undefined : json["code"],
    message: json["message"] == null ? undefined : json["message"],
  };
}

export function UtilsErrorResponseToJSON(json: any): UtilsErrorResponse {
  return UtilsErrorResponseToJSONTyped(json, false);
}

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

  return {
    code: value["code"],
    message: value["message"],
  };
}
