/* 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 { DeliverabilitySimulationJobConfigDto, DeliverabilitySimulationJobConfigDtoFromJSON, DeliverabilitySimulationJobConfigDtoFromJSONTyped, DeliverabilitySimulationJobConfigDtoToJSON, DeliverabilitySimulationJobErrorSummaryDto, DeliverabilitySimulationJobErrorSummaryDtoFromJSON, DeliverabilitySimulationJobErrorSummaryDtoFromJSONTyped, DeliverabilitySimulationJobErrorSummaryDtoToJSON, } from './'; /** * Deliverability simulation job status * @export * @interface DeliverabilitySimulationJobDto */ export interface DeliverabilitySimulationJobDto { /** * * @type {string} * @memberof DeliverabilitySimulationJobDto */ id: string; /** * * @type {string} * @memberof DeliverabilitySimulationJobDto */ testId: string; /** * * @type {string} * @memberof DeliverabilitySimulationJobDto */ scope: DeliverabilitySimulationJobDtoScopeEnum; /** * * @type {string} * @memberof DeliverabilitySimulationJobDto */ status: DeliverabilitySimulationJobDtoStatusEnum; /** * * @type {Date} * @memberof DeliverabilitySimulationJobDto */ createdAt: Date; /** * * @type {Date} * @memberof DeliverabilitySimulationJobDto */ updatedAt: Date; /** * * @type {Date} * @memberof DeliverabilitySimulationJobDto */ startedAt?: Date | null; /** * * @type {Date} * @memberof DeliverabilitySimulationJobDto */ completedAt?: Date | null; /** * * @type {number} * @memberof DeliverabilitySimulationJobDto */ totalTargets: number; /** * * @type {number} * @memberof DeliverabilitySimulationJobDto */ totalPlannedSends: number; /** * * @type {number} * @memberof DeliverabilitySimulationJobDto */ nextSendIndex: number; /** * * @type {number} * @memberof DeliverabilitySimulationJobDto */ sentCount: number; /** * * @type {number} * @memberof DeliverabilitySimulationJobDto */ successCount: number; /** * * @type {number} * @memberof DeliverabilitySimulationJobDto */ failureCount: number; /** * * @type {number} * @memberof DeliverabilitySimulationJobDto */ progressPercent: number; /** * * @type {string} * @memberof DeliverabilitySimulationJobDto */ activeTargetLabel?: string | null; /** * * @type {number} * @memberof DeliverabilitySimulationJobDto */ estimatedRemainingMs?: number | null; /** * * @type {DeliverabilitySimulationJobConfigDto} * @memberof DeliverabilitySimulationJobDto */ configSnapshot: DeliverabilitySimulationJobConfigDto; /** * * @type {DeliverabilitySimulationJobErrorSummaryDto} * @memberof DeliverabilitySimulationJobDto */ errorSummary: DeliverabilitySimulationJobErrorSummaryDto; } /** * @export * @enum {string} */ export enum DeliverabilitySimulationJobDtoScopeEnum { INBOX = 'INBOX', PHONE = 'PHONE', } /** * @export * @enum {string} */ export enum DeliverabilitySimulationJobDtoStatusEnum { RUNNING = 'RUNNING', PAUSED = 'PAUSED', CANCELLED = 'CANCELLED', COMPLETED = 'COMPLETED', FAILED = 'FAILED', } export function DeliverabilitySimulationJobDtoFromJSON( json: any ): DeliverabilitySimulationJobDto { return DeliverabilitySimulationJobDtoFromJSONTyped(json, false); } export function DeliverabilitySimulationJobDtoFromJSONTyped( json: any, ignoreDiscriminator: boolean ): DeliverabilitySimulationJobDto { if (json === undefined || json === null) { return json; } return { id: json['id'], testId: json['testId'], scope: json['scope'], status: json['status'], createdAt: new Date(json['createdAt']), updatedAt: new Date(json['updatedAt']), startedAt: !exists(json, 'startedAt') ? undefined : json['startedAt'] === null ? null : new Date(json['startedAt']), completedAt: !exists(json, 'completedAt') ? undefined : json['completedAt'] === null ? null : new Date(json['completedAt']), totalTargets: json['totalTargets'], totalPlannedSends: json['totalPlannedSends'], nextSendIndex: json['nextSendIndex'], sentCount: json['sentCount'], successCount: json['successCount'], failureCount: json['failureCount'], progressPercent: json['progressPercent'], activeTargetLabel: !exists(json, 'activeTargetLabel') ? undefined : json['activeTargetLabel'], estimatedRemainingMs: !exists(json, 'estimatedRemainingMs') ? undefined : json['estimatedRemainingMs'], configSnapshot: DeliverabilitySimulationJobConfigDtoFromJSON( json['configSnapshot'] ), errorSummary: DeliverabilitySimulationJobErrorSummaryDtoFromJSON( json['errorSummary'] ), }; } export function DeliverabilitySimulationJobDtoToJSON( value?: DeliverabilitySimulationJobDto | null ): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { id: value.id, testId: value.testId, scope: value.scope, status: value.status, createdAt: value.createdAt.toISOString(), updatedAt: value.updatedAt.toISOString(), startedAt: value.startedAt === undefined ? undefined : value.startedAt === null ? null : value.startedAt.toISOString(), completedAt: value.completedAt === undefined ? undefined : value.completedAt === null ? null : value.completedAt.toISOString(), totalTargets: value.totalTargets, totalPlannedSends: value.totalPlannedSends, nextSendIndex: value.nextSendIndex, sentCount: value.sentCount, successCount: value.successCount, failureCount: value.failureCount, progressPercent: value.progressPercent, activeTargetLabel: value.activeTargetLabel, estimatedRemainingMs: value.estimatedRemainingMs, configSnapshot: DeliverabilitySimulationJobConfigDtoToJSON( value.configSnapshot ), errorSummary: DeliverabilitySimulationJobErrorSummaryDtoToJSON( value.errorSummary ), }; }