/* tslint:disable */
/* eslint-disable */
/**
 * HumanLayer Daemon REST API
 * REST API for HumanLayer daemon operations, providing session management, approval workflows, and real-time event streaming capabilities. 
 *
 * The version of the OpenAPI document: 1.0.0
 * 
 *
 * 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 ErrorDetail
 */
export interface ErrorDetail {
    /**
     * Error code (e.g., HLD-101)
     * @type {string}
     * @memberof ErrorDetail
     */
    code: string;
    /**
     * Human-readable error message
     * @type {string}
     * @memberof ErrorDetail
     */
    message: string;
    /**
     * Additional error context
     * @type {{ [key: string]: any; }}
     * @memberof ErrorDetail
     */
    details?: { [key: string]: any; };
}

/**
 * Check if a given object implements the ErrorDetail interface.
 */
export function instanceOfErrorDetail(value: object): value is ErrorDetail {
    if (!('code' in value) || value['code'] === undefined) return false;
    if (!('message' in value) || value['message'] === 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 {
        
        'code': json['code'],
        'message': json['message'],
        'details': json['details'] == null ? undefined : json['details'],
    };
}

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 {
        
        'code': value['code'],
        'message': value['message'],
        'details': value['details'],
    };
}

