/* tslint:disable */ /* eslint-disable */ /** * MailSlurp API * MailSlurp is an API for sending and receiving emails and SMS from dynamically allocated email addresses and phone numbers. 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://docs.mailslurp.com/) - [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'; /** * Options for importing a raw RFC822/MIME email into a specific inbox. V1 supports MIME-family formats such as `.eml`, `message/rfc822`, and raw MIME bytes. Outlook `.msg`, `mbox`, and `maildir` are not supported in V1. * @export * @interface ImportEmailOptions */ export interface ImportEmailOptions { /** * Base64 encoded RFC822/MIME email contents. This should be the full raw email including headers and body, such as the bytes from an `.eml` file. * @type {string} * @memberof ImportEmailOptions */ rawEmailBase64: string; /** * Optional external identifier for the imported email source. Useful for correlating imports back to another system. * @type {string} * @memberof ImportEmailOptions */ externalId?: string | null; /** * When true the normal inbound receive pipeline runs after persistence, including automations, webhooks, transformers, forwarders, repliers, and related fanout. When false the email is stored only. * @type {boolean} * @memberof ImportEmailOptions */ runPipeline?: boolean | null; /** * When true MailSlurp rewrites the MIME `Message-ID` header before storing and parsing the email so imported messages do not collide with existing message identities. * @type {boolean} * @memberof ImportEmailOptions */ overrideMessageId?: boolean | null; } export function ImportEmailOptionsFromJSON(json: any): ImportEmailOptions { return ImportEmailOptionsFromJSONTyped(json, false); } export function ImportEmailOptionsFromJSONTyped( json: any, ignoreDiscriminator: boolean ): ImportEmailOptions { if (json === undefined || json === null) { return json; } return { rawEmailBase64: json['rawEmailBase64'], externalId: !exists(json, 'externalId') ? undefined : json['externalId'], runPipeline: !exists(json, 'runPipeline') ? undefined : json['runPipeline'], overrideMessageId: !exists(json, 'overrideMessageId') ? undefined : json['overrideMessageId'], }; } export function ImportEmailOptionsToJSON( value?: ImportEmailOptions | null ): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { rawEmailBase64: value.rawEmailBase64, externalId: value.externalId, runPipeline: value.runPipeline, overrideMessageId: value.overrideMessageId, }; }