/* 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 PlanMonth
 */
export interface PlanMonth {
    /**
     * 
     * @type {Date}
     * @memberof PlanMonth
     */
    date: Date;
    /**
     * 
     * @type {Array<string>}
     * @memberof PlanMonth
     */
    items?: Array<string>;
}

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

    return isInstance;
}

export function PlanMonthFromJSON(json: any): PlanMonth {
    return PlanMonthFromJSONTyped(json, false);
}

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

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

