/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2025.10.0-rc1
 * Contact: hello@goauthentik.io
 *
 * 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';
/**
 * Serializer for rest_framework's error messages
 * @export
 * @interface ErrorDetail
 */
export interface ErrorDetail {
    /**
     * 
     * @type {string}
     * @memberof ErrorDetail
     */
    string: string;
    /**
     * 
     * @type {string}
     * @memberof ErrorDetail
     */
    code: string;
}

/**
 * Check if a given object implements the ErrorDetail interface.
 */
export function instanceOfErrorDetail(value: object): value is ErrorDetail {
    if (!('string' in value) || value['string'] === undefined) return false;
    if (!('code' in value) || value['code'] === undefined) return false;
    return true;
}

export function ErrorDetailFromJSON(json: any): ErrorDetail {
    return ErrorDetailFromJSONTyped(json, false);
}

export function ErrorDetailFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorDetail {
    if (json == null) {
        return json;
    }
    return {
        
        'string': json['string'],
        'code': json['code'],
    };
}

export function ErrorDetailToJSON(json: any): ErrorDetail {
    return ErrorDetailToJSONTyped(json, false);
}

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

    return {
        
        'string': value['string'],
        'code': value['code'],
    };
}

