/* 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'; import { InboxAutomationMatchOptions, InboxAutomationMatchOptionsFromJSON, InboxAutomationMatchOptionsFromJSONTyped, InboxAutomationMatchOptionsToJSON, } from './'; /** * Options for creating an inbox forwarder * @export * @interface CreateInboxForwarderOptions */ export interface CreateInboxForwarderOptions { /** * Field to match against to trigger inbox forwarding for inbound email * @type {string} * @memberof CreateInboxForwarderOptions */ field?: CreateInboxForwarderOptionsFieldEnum; /** * String or wildcard style match for field specified when evaluating forwarding rules * @type {string} * @memberof CreateInboxForwarderOptions */ match?: string | null; /** * Email addresses to forward an email to if it matches the field and match criteria of the forwarder * @type {Array} * @memberof CreateInboxForwarderOptions */ forwardToRecipients: Array; /** * Comparison mode for inbox automation matching. * @type {string} * @memberof CreateInboxForwarderOptions */ should?: CreateInboxForwarderOptionsShouldEnum; /** * * @type {InboxAutomationMatchOptions} * @memberof CreateInboxForwarderOptions */ matchOptions?: InboxAutomationMatchOptions | null; /** * Method for extracting text from attachments. * @type {string} * @memberof CreateInboxForwarderOptions */ attachmentTextExtractionMethod?: CreateInboxForwarderOptionsAttachmentTextExtractionMethodEnum; } /** * @export * @enum {string} */ export enum CreateInboxForwarderOptionsFieldEnum { RECIPIENTS = 'RECIPIENTS', SENDER = 'SENDER', SUBJECT = 'SUBJECT', ATTACHMENTS = 'ATTACHMENTS', ATTACHMENT_FILENAME = 'ATTACHMENT_FILENAME', ATTACHMENT_TEXT = 'ATTACHMENT_TEXT', } /** * @export * @enum {string} */ export enum CreateInboxForwarderOptionsShouldEnum { WILDCARD = 'WILDCARD', MATCH = 'MATCH', CONTAIN = 'CONTAIN', EQUAL = 'EQUAL', } /** * @export * @enum {string} */ export enum CreateInboxForwarderOptionsAttachmentTextExtractionMethodEnum { AUTO = 'AUTO', NATIVE = 'NATIVE', OCR = 'OCR', LLM = 'LLM', OCR_THEN_LLM = 'OCR_THEN_LLM', } export function CreateInboxForwarderOptionsFromJSON( json: any ): CreateInboxForwarderOptions { return CreateInboxForwarderOptionsFromJSONTyped(json, false); } export function CreateInboxForwarderOptionsFromJSONTyped( json: any, ignoreDiscriminator: boolean ): CreateInboxForwarderOptions { if (json === undefined || json === null) { return json; } return { field: !exists(json, 'field') ? undefined : json['field'], match: !exists(json, 'match') ? undefined : json['match'], forwardToRecipients: json['forwardToRecipients'], should: !exists(json, 'should') ? undefined : json['should'], matchOptions: !exists(json, 'matchOptions') ? undefined : InboxAutomationMatchOptionsFromJSON(json['matchOptions']), attachmentTextExtractionMethod: !exists( json, 'attachmentTextExtractionMethod' ) ? undefined : json['attachmentTextExtractionMethod'], }; } export function CreateInboxForwarderOptionsToJSON( value?: CreateInboxForwarderOptions | null ): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { field: value.field, match: value.match, forwardToRecipients: value.forwardToRecipients, should: value.should, matchOptions: InboxAutomationMatchOptionsToJSON(value.matchOptions), attachmentTextExtractionMethod: value.attachmentTextExtractionMethod, }; }