/* tslint:disable */
/* eslint-disable */
/**
 * Indexea OpenAPI
 * OpenAPI of Indexea
 *
 * The version of the OpenAPI document: 1.0.0
 * Contact: indexea.com@gmail.com
 *
 * 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 SearchsDailyStat
 */
export interface SearchsDailyStat {
    /**
     * 日期
     * @type {Date}
     * @memberof SearchsDailyStat
     */
    date?: Date;
    /**
     * 次数
     * @type {number}
     * @memberof SearchsDailyStat
     */
    count?: number;
}

/**
 * Check if a given object implements the SearchsDailyStat interface.
 */
export function instanceOfSearchsDailyStat(value: object): boolean {
    let isInstance = true;

    return isInstance;
}

export function SearchsDailyStatFromJSON(json: any): SearchsDailyStat {
    return SearchsDailyStatFromJSONTyped(json, false);
}

export function SearchsDailyStatFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchsDailyStat {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'date': !exists(json, 'date') ? undefined : (new Date(json['date'])),
        'count': !exists(json, 'count') ? undefined : json['count'],
    };
}

export function SearchsDailyStatToJSON(value?: SearchsDailyStat | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'date': value.date === undefined ? undefined : (value.date.toISOString().substr(0,10)),
        'count': value.count,
    };
}

