/* 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 {
    ConstantLocationLevel,
    ConstantLocationLevelFromJSON,
    ConstantLocationLevelFromJSONTyped,
    ConstantLocationLevelToJSON,
} from './ConstantLocationLevel';
import {
    SeasonalLocationLevel,
    SeasonalLocationLevelFromJSON,
    SeasonalLocationLevelFromJSONTyped,
    SeasonalLocationLevelToJSON,
} from './SeasonalLocationLevel';
import {
    TimeSeriesLocationLevel,
    TimeSeriesLocationLevelFromJSON,
    TimeSeriesLocationLevelFromJSONTyped,
    TimeSeriesLocationLevelToJSON,
} from './TimeSeriesLocationLevel';
import {
    VirtualLocationLevel,
    VirtualLocationLevelFromJSON,
    VirtualLocationLevelFromJSONTyped,
    VirtualLocationLevelToJSON,
} from './VirtualLocationLevel';

/**
 * @type LocationLevel
 * 
 * @export
 */
export type LocationLevel = ConstantLocationLevel | SeasonalLocationLevel | TimeSeriesLocationLevel | VirtualLocationLevel;

export function LocationLevelFromJSON(json: any): LocationLevel {
    return LocationLevelFromJSONTyped(json, false);
}

export function LocationLevelFromJSONTyped(json: any, ignoreDiscriminator: boolean): LocationLevel {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return { ...ConstantLocationLevelFromJSONTyped(json, true), ...SeasonalLocationLevelFromJSONTyped(json, true), ...TimeSeriesLocationLevelFromJSONTyped(json, true), ...VirtualLocationLevelFromJSONTyped(json, true) } as LocationLevel;
}

export function LocationLevelToJSON(value?: LocationLevel | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return { ...ConstantLocationLevelToJSON(value as any), ...SeasonalLocationLevelToJSON(value as any), ...TimeSeriesLocationLevelToJSON(value as any), ...VirtualLocationLevelToJSON(value as any) };
}

