/* tslint:disable */
/* eslint-disable */
/**
 * Indexea OpenAPI
 * 这是 Indexea 搜索服务平台的 OpenAPI，用于描述平台的所有接口信息，你可以通过这个页面来了解和在线验证平台的所有接口信息。  ### Errors  本 API 使用标准的 HTTP 状态码来指示操作成功或者失败，如果失败将会在 body 中以 JSON 格式提供详细的错误信息，如下所示：  ``` {   \"error\": 404,   \"message\": \"page not found\" } ``` 
 *
 * 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 StatIndexBean
 */
export interface StatIndexBean {
    /**
     * 
     * @type {number}
     * @memberof StatIndexBean
     */
    app?: number;
    /**
     * 
     * @type {number}
     * @memberof StatIndexBean
     */
    index?: number;
    /**
     * 
     * @type {Date}
     * @memberof StatIndexBean
     */
    date?: Date;
    /**
     * 
     * @type {number}
     * @memberof StatIndexBean
     */
    storage?: number;
    /**
     * 
     * @type {number}
     * @memberof StatIndexBean
     */
    searchs?: number;
    /**
     * 
     * @type {number}
     * @memberof StatIndexBean
     */
    errors?: number;
    /**
     * 
     * @type {number}
     * @memberof StatIndexBean
     */
    records?: number;
    /**
     * 
     * @type {string}
     * @memberof StatIndexBean
     */
    avgTime?: string;
}

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

    return isInstance;
}

export function StatIndexBeanFromJSON(json: any): StatIndexBean {
    return StatIndexBeanFromJSONTyped(json, false);
}

export function StatIndexBeanFromJSONTyped(json: any, ignoreDiscriminator: boolean): StatIndexBean {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'app': !exists(json, 'app') ? undefined : json['app'],
        'index': !exists(json, 'index') ? undefined : json['index'],
        'date': !exists(json, 'date') ? undefined : (new Date(json['date'])),
        'storage': !exists(json, 'storage') ? undefined : json['storage'],
        'searchs': !exists(json, 'searchs') ? undefined : json['searchs'],
        'errors': !exists(json, 'errors') ? undefined : json['errors'],
        'records': !exists(json, 'records') ? undefined : json['records'],
        'avgTime': !exists(json, 'avg_time') ? undefined : json['avg_time'],
    };
}

export function StatIndexBeanToJSON(value?: StatIndexBean | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'app': value.app,
        'index': value.index,
        'date': value.date === undefined ? undefined : (value.date.toISOString().substr(0,10)),
        'storage': value.storage,
        'searchs': value.searchs,
        'errors': value.errors,
        'records': value.records,
        'avg_time': value.avgTime,
    };
}

