/* 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 PlanDay
 */
export interface PlanDay {
    /**
     * 
     * @type {Date}
     * @memberof PlanDay
     */
    date: Date;
    /**
     * 
     * @type {Array<string>}
     * @memberof PlanDay
     */
    morning?: Array<string>;
    /**
     * 
     * @type {Array<string>}
     * @memberof PlanDay
     */
    midday?: Array<string>;
    /**
     * 
     * @type {Array<string>}
     * @memberof PlanDay
     */
    afternoon?: Array<string>;
    /**
     * 
     * @type {Array<string>}
     * @memberof PlanDay
     */
    evening?: Array<string>;
    /**
     * 
     * @type {Array<string>}
     * @memberof PlanDay
     */
    pleasant?: Array<string>;
    /**
     * 
     * @type {Array<string>}
     * @memberof PlanDay
     */
    reminders?: Array<string>;
}

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

    return isInstance;
}

export function PlanDayFromJSON(json: any): PlanDay {
    return PlanDayFromJSONTyped(json, false);
}

export function PlanDayFromJSONTyped(json: any, ignoreDiscriminator: boolean): PlanDay {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'date': (new Date(json['date'])),
        'morning': !exists(json, 'morning') ? undefined : json['morning'],
        'midday': !exists(json, 'midday') ? undefined : json['midday'],
        'afternoon': !exists(json, 'afternoon') ? undefined : json['afternoon'],
        'evening': !exists(json, 'evening') ? undefined : json['evening'],
        'pleasant': !exists(json, 'pleasant') ? undefined : json['pleasant'],
        'reminders': !exists(json, 'reminders') ? undefined : json['reminders'],
    };
}

export function PlanDayToJSON(value?: PlanDay | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'date': (value.date.toISOString().substr(0,10)),
        'morning': value.morning,
        'midday': value.midday,
        'afternoon': value.afternoon,
        'evening': value.evening,
        'pleasant': value.pleasant,
        'reminders': value.reminders,
    };
}

