/* tslint:disable */ /* eslint-disable */ /** * MailSlurp API * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It\'s designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository * * The version of the OpenAPI document: 6.5.2 * Contact: contact@mailslurp.dev * * 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'; import { TemplateVariable, TemplateVariableFromJSON, TemplateVariableFromJSONTyped, TemplateVariableToJSON, } from './'; /** * * @export * @interface TemplateDto */ export interface TemplateDto { /** * * @type {string} * @memberof TemplateDto */ id: string; /** * * @type {string} * @memberof TemplateDto */ name: string; /** * * @type {Array} * @memberof TemplateDto */ variables: Array; /** * * @type {string} * @memberof TemplateDto */ content: string; /** * * @type {Date} * @memberof TemplateDto */ createdAt: Date; } export function TemplateDtoFromJSON(json: any): TemplateDto { return TemplateDtoFromJSONTyped(json, false); } export function TemplateDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): TemplateDto { if ((json === undefined) || (json === null)) { return json; } return { 'id': json['id'], 'name': json['name'], 'variables': ((json['variables'] as Array).map(TemplateVariableFromJSON)), 'content': json['content'], 'createdAt': (new Date(json['createdAt'])), }; } export function TemplateDtoToJSON(value?: TemplateDto | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'id': value.id, 'name': value.name, 'variables': ((value.variables as Array).map(TemplateVariableToJSON)), 'content': value.content, 'createdAt': (value.createdAt.toISOString()), }; }