/* 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'; /** * * @export * @interface DevicePreviewEmailSubmissionDto */ export interface DevicePreviewEmailSubmissionDto { /** * * @type {string} * @memberof DevicePreviewEmailSubmissionDto */ id: string; /** * * @type {string} * @memberof DevicePreviewEmailSubmissionDto */ userId: string; /** * * @type {string} * @memberof DevicePreviewEmailSubmissionDto */ ingestDomainId?: string | null; /** * * @type {string} * @memberof DevicePreviewEmailSubmissionDto */ profileId?: string | null; /** * * @type {string} * @memberof DevicePreviewEmailSubmissionDto */ runId?: string | null; /** * * @type {string} * @memberof DevicePreviewEmailSubmissionDto */ recipientEmailAddress: string; /** * * @type {string} * @memberof DevicePreviewEmailSubmissionDto */ recipientLocalPart: string; /** * * @type {boolean} * @memberof DevicePreviewEmailSubmissionDto */ matchedProfile: boolean; /** * * @type {string} * @memberof DevicePreviewEmailSubmissionDto */ status: DevicePreviewEmailSubmissionDtoStatusEnum; /** * * @type {string} * @memberof DevicePreviewEmailSubmissionDto */ sourceExternalId?: string | null; /** * * @type {string} * @memberof DevicePreviewEmailSubmissionDto */ sourceFrom?: string | null; /** * * @type {Array} * @memberof DevicePreviewEmailSubmissionDto */ sourceTo?: Array | null; /** * * @type {string} * @memberof DevicePreviewEmailSubmissionDto */ sourceSubject?: string | null; /** * * @type {string} * @memberof DevicePreviewEmailSubmissionDto */ sourceMessageId?: string | null; /** * * @type {number} * @memberof DevicePreviewEmailSubmissionDto */ sourceSizeBytes?: number | null; /** * * @type {string} * @memberof DevicePreviewEmailSubmissionDto */ failureStage?: string | null; /** * * @type {string} * @memberof DevicePreviewEmailSubmissionDto */ latestError?: string | null; /** * * @type {Date} * @memberof DevicePreviewEmailSubmissionDto */ receivedAt: Date; /** * * @type {Date} * @memberof DevicePreviewEmailSubmissionDto */ processingStartedAt?: Date | null; /** * * @type {Date} * @memberof DevicePreviewEmailSubmissionDto */ completedAt?: Date | null; /** * * @type {Date} * @memberof DevicePreviewEmailSubmissionDto */ createdAt: Date; /** * * @type {Date} * @memberof DevicePreviewEmailSubmissionDto */ updatedAt: Date; } /** * @export * @enum {string} */ export enum DevicePreviewEmailSubmissionDtoStatusEnum { RECEIVED = 'RECEIVED', PROCESSING = 'PROCESSING', RUN_CREATED = 'RUN_CREATED', FAILED = 'FAILED', } export function DevicePreviewEmailSubmissionDtoFromJSON( json: any ): DevicePreviewEmailSubmissionDto { return DevicePreviewEmailSubmissionDtoFromJSONTyped(json, false); } export function DevicePreviewEmailSubmissionDtoFromJSONTyped( json: any, ignoreDiscriminator: boolean ): DevicePreviewEmailSubmissionDto { if (json === undefined || json === null) { return json; } return { id: json['id'], userId: json['userId'], ingestDomainId: !exists(json, 'ingestDomainId') ? undefined : json['ingestDomainId'], profileId: !exists(json, 'profileId') ? undefined : json['profileId'], runId: !exists(json, 'runId') ? undefined : json['runId'], recipientEmailAddress: json['recipientEmailAddress'], recipientLocalPart: json['recipientLocalPart'], matchedProfile: json['matchedProfile'], status: json['status'], sourceExternalId: !exists(json, 'sourceExternalId') ? undefined : json['sourceExternalId'], sourceFrom: !exists(json, 'sourceFrom') ? undefined : json['sourceFrom'], sourceTo: !exists(json, 'sourceTo') ? undefined : json['sourceTo'], sourceSubject: !exists(json, 'sourceSubject') ? undefined : json['sourceSubject'], sourceMessageId: !exists(json, 'sourceMessageId') ? undefined : json['sourceMessageId'], sourceSizeBytes: !exists(json, 'sourceSizeBytes') ? undefined : json['sourceSizeBytes'], failureStage: !exists(json, 'failureStage') ? undefined : json['failureStage'], latestError: !exists(json, 'latestError') ? undefined : json['latestError'], receivedAt: new Date(json['receivedAt']), processingStartedAt: !exists(json, 'processingStartedAt') ? undefined : json['processingStartedAt'] === null ? null : new Date(json['processingStartedAt']), completedAt: !exists(json, 'completedAt') ? undefined : json['completedAt'] === null ? null : new Date(json['completedAt']), createdAt: new Date(json['createdAt']), updatedAt: new Date(json['updatedAt']), }; } export function DevicePreviewEmailSubmissionDtoToJSON( value?: DevicePreviewEmailSubmissionDto | null ): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { id: value.id, userId: value.userId, ingestDomainId: value.ingestDomainId, profileId: value.profileId, runId: value.runId, recipientEmailAddress: value.recipientEmailAddress, recipientLocalPart: value.recipientLocalPart, matchedProfile: value.matchedProfile, status: value.status, sourceExternalId: value.sourceExternalId, sourceFrom: value.sourceFrom, sourceTo: value.sourceTo, sourceSubject: value.sourceSubject, sourceMessageId: value.sourceMessageId, sourceSizeBytes: value.sourceSizeBytes, failureStage: value.failureStage, latestError: value.latestError, receivedAt: value.receivedAt.toISOString(), processingStartedAt: value.processingStartedAt === undefined ? undefined : value.processingStartedAt === null ? null : value.processingStartedAt.toISOString(), completedAt: value.completedAt === undefined ? undefined : value.completedAt === null ? null : value.completedAt.toISOString(), createdAt: value.createdAt.toISOString(), updatedAt: value.updatedAt.toISOString(), }; }