/* 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 {
    TimeSeriesProfile,
    TimeSeriesProfileFromJSON,
    TimeSeriesProfileFromJSONTyped,
    TimeSeriesProfileToJSON,
} from './TimeSeriesProfile';

/**
 * 
 * @export
 * @interface TimeSeriesProfileList
 */
export interface TimeSeriesProfileList {
    /**
     * The cursor to the next page of data; null if there is no more data
     * @type {string}
     * @memberof TimeSeriesProfileList
     */
    readonly nextPage?: string;
    /**
     * The cursor to the current page of data
     * @type {string}
     * @memberof TimeSeriesProfileList
     */
    readonly page?: string;
    /**
     * The number of records fetched per-page; this may be larger than the number of records actually retrieved
     * @type {number}
     * @memberof TimeSeriesProfileList
     */
    readonly pageSize?: number;
    /**
     * 
     * @type {Array<TimeSeriesProfile>}
     * @memberof TimeSeriesProfileList
     */
    profileList?: Array<TimeSeriesProfile>;
    /**
     * The total number of records retrieved; null or not present if not supported or unknown
     * @type {number}
     * @memberof TimeSeriesProfileList
     */
    readonly total?: number;
}

export function TimeSeriesProfileListFromJSON(json: any): TimeSeriesProfileList {
    return TimeSeriesProfileListFromJSONTyped(json, false);
}

export function TimeSeriesProfileListFromJSONTyped(json: any, ignoreDiscriminator: boolean): TimeSeriesProfileList {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'nextPage': !exists(json, 'next-page') ? undefined : json['next-page'],
        'page': !exists(json, 'page') ? undefined : json['page'],
        'pageSize': !exists(json, 'page-size') ? undefined : json['page-size'],
        'profileList': !exists(json, 'profile-list') ? undefined : ((json['profile-list'] as Array<any>).map(TimeSeriesProfileFromJSON)),
        'total': !exists(json, 'total') ? undefined : json['total'],
    };
}

export function TimeSeriesProfileListToJSON(value?: TimeSeriesProfileList | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'profile-list': value.profileList === undefined ? undefined : ((value.profileList as Array<any>).map(TimeSeriesProfileToJSON)),
    };
}

