/* tslint:disable */
/* eslint-disable */
/**
 * CWMS Data API
 * CWMS REST API for Data Retrieval
 *
 * The version of the OpenAPI document: 2.4.0-2026.3.16
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

import { exists, mapValues } from '../runtime';
/**
 * 
 * @export
 * @interface CdaError
 */
export interface CdaError {
    /**
     * 
     * @type {string}
     * @memberof CdaError
     */
    message?: string;
    /**
     * A randomly generated UUID to help identify your request in the logs for analysis..
     * @type {string}
     * @memberof CdaError
     */
    incidentIdentifier?: string;
    /**
     * 
     * @type {string}
     * @memberof CdaError
     */
    source?: string;
    /**
     * 
     * @type {{ [key: string]: object; }}
     * @memberof CdaError
     */
    details?: { [key: string]: object; };
}

export function CdaErrorFromJSON(json: any): CdaError {
    return CdaErrorFromJSONTyped(json, false);
}

export function CdaErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): CdaError {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'message': !exists(json, 'message') ? undefined : json['message'],
        'incidentIdentifier': !exists(json, 'incidentIdentifier') ? undefined : json['incidentIdentifier'],
        'source': !exists(json, 'source') ? undefined : json['source'],
        'details': !exists(json, 'details') ? undefined : json['details'],
    };
}

export function CdaErrorToJSON(value?: CdaError | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'message': value.message,
        'incidentIdentifier': value.incidentIdentifier,
        'source': value.source,
        'details': value.details,
    };
}

