/* 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 RateInputTimeSeries
 */
export interface RateInputTimeSeries {
    /**
     * The units of the output values
     * @type {string}
     * @memberof RateInputTimeSeries
     */
    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 RateInputTimeSeries
     */
    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 RateInputTimeSeries
     */
    round?: boolean;
    /**
     * 
     * @type {Array<string>}
     * @memberof RateInputTimeSeries
     */
    timeSeriesIds: Array<string>;
    /**
     * The start of the time window to rate.Represents milliseconds since 1970-01-01 (Unix Epoch), always UTC.
     * @type {number}
     * @memberof RateInputTimeSeries
     */
    startTime: number;
    /**
     * The end of the time window to rate.Represents milliseconds since 1970-01-01 (Unix Epoch), always UTC.
     * @type {number}
     * @memberof RateInputTimeSeries
     */
    endTime: number;
    /**
     * Specifies the version date of the retrieve time series. Represents milliseconds since 1970-01-01 (Unix Epoch), always UTC.
     * @type {number}
     * @memberof RateInputTimeSeries
     */
    versionDate?: number;
    /**
     * Specifies whether to trim missing values from the ends of the retrieved time series. Defaults to false.
     * @type {boolean}
     * @memberof RateInputTimeSeries
     */
    trim?: boolean;
    /**
     * Specifies whether the time window starts on or after the specified time. Defaults to true.
     * @type {boolean}
     * @memberof RateInputTimeSeries
     */
    startInclusive?: boolean;
    /**
     * Specifies whether the time window ends on or before the specified time. Defaults to true;
     * @type {boolean}
     * @memberof RateInputTimeSeries
     */
    endInclusive?: boolean;
    /**
     * Specifies whether to retrieve the latest value before the start of the time window. Defaults to false.
     * @type {boolean}
     * @memberof RateInputTimeSeries
     */
    previous?: boolean;
    /**
     * Specifies whether to retrieve the earliest value after the end of the time window. Defaults to false.
     * @type {boolean}
     * @memberof RateInputTimeSeries
     */
    next?: boolean;
}

export function RateInputTimeSeriesFromJSON(json: any): RateInputTimeSeries {
    return RateInputTimeSeriesFromJSONTyped(json, false);
}

export function RateInputTimeSeriesFromJSONTyped(json: any, ignoreDiscriminator: boolean): RateInputTimeSeries {
    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'],
        'timeSeriesIds': json['time-series-ids'],
        'startTime': json['start-time'],
        'endTime': json['end-time'],
        'versionDate': !exists(json, 'version-date') ? undefined : json['version-date'],
        'trim': !exists(json, 'trim') ? undefined : json['trim'],
        'startInclusive': !exists(json, 'start-inclusive') ? undefined : json['start-inclusive'],
        'endInclusive': !exists(json, 'end-inclusive') ? undefined : json['end-inclusive'],
        'previous': !exists(json, 'previous') ? undefined : json['previous'],
        'next': !exists(json, 'next') ? undefined : json['next'],
    };
}

export function RateInputTimeSeriesToJSON(value?: RateInputTimeSeries | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'output-unit': value.outputUnit,
        'rating-time': value.ratingTime,
        'round': value.round,
        'time-series-ids': value.timeSeriesIds,
        'start-time': value.startTime,
        'end-time': value.endTime,
        'version-date': value.versionDate,
        'trim': value.trim,
        'start-inclusive': value.startInclusive,
        'end-inclusive': value.endInclusive,
        'previous': value.previous,
        'next': value.next,
    };
}

