/* tslint:disable */
/* eslint-disable */
/**
 * Dash API
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 0.1
 * 
 *
 * 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 TrackingItem
 */
export interface TrackingItem {
    /**
     * 
     * @type {Date}
     * @memberof TrackingItem
     */
    date: Date;
    /**
     * 
     * @type {string}
     * @memberof TrackingItem
     */
    type: string;
    /**
     * 
     * @type {string}
     * @memberof TrackingItem
     */
    value: string;
}

/**
 * Check if a given object implements the TrackingItem interface.
 */
export function instanceOfTrackingItem(value: object): boolean {
    let isInstance = true;
    isInstance = isInstance && "date" in value;
    isInstance = isInstance && "type" in value;
    isInstance = isInstance && "value" in value;

    return isInstance;
}

export function TrackingItemFromJSON(json: any): TrackingItem {
    return TrackingItemFromJSONTyped(json, false);
}

export function TrackingItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrackingItem {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'date': (new Date(json['date'])),
        'type': json['type'],
        'value': json['value'],
    };
}

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

