/* 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 RateInputValues
 */
export interface RateInputValues {
    /**
     * The units of the output values
     * @type {string}
     * @memberof RateInputValues
     */
    outputUnit: string;
    /**
     * A specific date/time to use as the "current time" of the rating.  No ratings with a create date later than this will be used. Useful for performing historical ratings. If not specified or NULL, the current time is use.
     * @type {number}
     * @memberof RateInputValues
     */
    ratingTime?: number;
    /**
     * A flag specifying whether to round the rated values according to the rounding spec contained in the rating specification. Defaults to false.
     * @type {boolean}
     * @memberof RateInputValues
     */
    round?: boolean;
    /**
     * 
     * @type {Array<Array<number>>}
     * @memberof RateInputValues
     */
    values: Array<Array<number>>;
    /**
     * 
     * @type {Array<number>}
     * @memberof RateInputValues
     */
    valueTimes?: Array<number>;
    /**
     * 
     * @type {Array<string>}
     * @memberof RateInputValues
     */
    inputUnits: Array<string>;
}

export function RateInputValuesFromJSON(json: any): RateInputValues {
    return RateInputValuesFromJSONTyped(json, false);
}

export function RateInputValuesFromJSONTyped(json: any, ignoreDiscriminator: boolean): RateInputValues {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'outputUnit': json['output-unit'],
        'ratingTime': !exists(json, 'rating-time') ? undefined : json['rating-time'],
        'round': !exists(json, 'round') ? undefined : json['round'],
        'values': json['values'],
        'valueTimes': !exists(json, 'value-times') ? undefined : json['value-times'],
        'inputUnits': json['input-units'],
    };
}

export function RateInputValuesToJSON(value?: RateInputValues | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'output-unit': value.outputUnit,
        'rating-time': value.ratingTime,
        'round': value.round,
        'values': value.values,
        'value-times': value.valueTimes,
        'input-units': value.inputUnits,
    };
}

