/* tslint:disable */
/* eslint-disable */
/**
 * Tuix Services
 * Tuix Services API
 *
 * The version of the OpenAPI document: 1.0.0
 * 
 *
 * 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 EmailTemplates
 */
export interface EmailTemplates {
    /**
     * 
     * @type {string}
     * @memberof EmailTemplates
     */
    id: string;
    /**
     * 
     * @type {Date}
     * @memberof EmailTemplates
     */
    createdAt: Date;
    /**
     * 
     * @type {Date}
     * @memberof EmailTemplates
     */
    updatedAt: Date;
    /**
     * 
     * @type {string}
     * @memberof EmailTemplates
     */
    name: string;
}

/**
 * Check if a given object implements the EmailTemplates interface.
 */
export function instanceOfEmailTemplates(value: object): boolean {
    let isInstance = true;
    isInstance = isInstance && "id" in value;
    isInstance = isInstance && "createdAt" in value;
    isInstance = isInstance && "updatedAt" in value;
    isInstance = isInstance && "name" in value;

    return isInstance;
}

export function EmailTemplatesFromJSON(json: any): EmailTemplates {
    return EmailTemplatesFromJSONTyped(json, false);
}

export function EmailTemplatesFromJSONTyped(json: any, ignoreDiscriminator: boolean): EmailTemplates {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'id': json['id'],
        'createdAt': (new Date(json['createdAt'])),
        'updatedAt': (new Date(json['updatedAt'])),
        'name': json['name'],
    };
}

export function EmailTemplatesToJSON(value?: EmailTemplates | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'id': value.id,
        'createdAt': (value.createdAt.toISOString()),
        'updatedAt': (value.updatedAt.toISOString()),
        'name': value.name,
    };
}

