/* 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';
import {
    CwmsId,
    CwmsIdFromJSON,
    CwmsIdFromJSONTyped,
    CwmsIdToJSON,
} from './CwmsId';

/**
 * 
 * @export
 * @interface TimeSeriesProfile
 */
export interface TimeSeriesProfile {
    /**
     * 
     * @type {CwmsId}
     * @memberof TimeSeriesProfile
     */
    locationId?: CwmsId;
    /**
     * Description
     * @type {string}
     * @memberof TimeSeriesProfile
     */
    description?: string;
    /**
     * Dependent Parameters
     * @type {Array<string>}
     * @memberof TimeSeriesProfile
     */
    parameterList?: Array<string>;
    /**
     * Independent Parameter
     * @type {string}
     * @memberof TimeSeriesProfile
     */
    keyParameter?: string;
    /**
     * 
     * @type {CwmsId}
     * @memberof TimeSeriesProfile
     */
    referenceTsId?: CwmsId;
}

export function TimeSeriesProfileFromJSON(json: any): TimeSeriesProfile {
    return TimeSeriesProfileFromJSONTyped(json, false);
}

export function TimeSeriesProfileFromJSONTyped(json: any, ignoreDiscriminator: boolean): TimeSeriesProfile {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'locationId': !exists(json, 'location-id') ? undefined : CwmsIdFromJSON(json['location-id']),
        'description': !exists(json, 'description') ? undefined : json['description'],
        'parameterList': !exists(json, 'parameter-list') ? undefined : json['parameter-list'],
        'keyParameter': !exists(json, 'key-parameter') ? undefined : json['key-parameter'],
        'referenceTsId': !exists(json, 'reference-ts-id') ? undefined : CwmsIdFromJSON(json['reference-ts-id']),
    };
}

export function TimeSeriesProfileToJSON(value?: TimeSeriesProfile | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'location-id': CwmsIdToJSON(value.locationId),
        'description': value.description,
        'parameter-list': value.parameterList,
        'key-parameter': value.keyParameter,
        'reference-ts-id': CwmsIdToJSON(value.referenceTsId),
    };
}

