/* 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'; /** * Public spam test run state exposed by the unauthenticated tools API. * @export * @interface PublicSpamTestRunDto */ export interface PublicSpamTestRunDto { /** * * @type {string} * @memberof PublicSpamTestRunDto */ id: string; /** * * @type {string} * @memberof PublicSpamTestRunDto */ source: string; /** * * @type {string} * @memberof PublicSpamTestRunDto */ status?: string | null; /** * * @type {string} * @memberof PublicSpamTestRunDto */ reportStatus?: string | null; /** * * @type {string} * @memberof PublicSpamTestRunDto */ requestedSegment?: string | null; /** * * @type {string} * @memberof PublicSpamTestRunDto */ seedlistProfile?: string | null; /** * * @type {string} * @memberof PublicSpamTestRunDto */ senderDomain?: string | null; /** * * @type {string} * @memberof PublicSpamTestRunDto */ fromEmail?: string | null; /** * * @type {string} * @memberof PublicSpamTestRunDto */ trackingToken?: string | null; /** * * @type {Array} * @memberof PublicSpamTestRunDto */ seedAddresses: Array; /** * * @type {{ [key: string]: string; }} * @memberof PublicSpamTestRunDto */ seedAddressFormats: { [key: string]: string }; /** * * @type {number} * @memberof PublicSpamTestRunDto */ totalTargets: number; /** * * @type {number} * @memberof PublicSpamTestRunDto */ matchedTargets: number; /** * * @type {number} * @memberof PublicSpamTestRunDto */ inboxTargets: number; /** * * @type {number} * @memberof PublicSpamTestRunDto */ spamTargets: number; /** * * @type {number} * @memberof PublicSpamTestRunDto */ notReceivedTargets: number; /** * * @type {Date} * @memberof PublicSpamTestRunDto */ submittedAt?: Date | null; /** * * @type {Date} * @memberof PublicSpamTestRunDto */ startedAt?: Date | null; /** * * @type {Date} * @memberof PublicSpamTestRunDto */ firstMatchAt?: Date | null; /** * * @type {Date} * @memberof PublicSpamTestRunDto */ completedAt?: Date | null; /** * * @type {Date} * @memberof PublicSpamTestRunDto */ expiresAt?: Date | null; /** * * @type {Date} * @memberof PublicSpamTestRunDto */ lastEventAt?: Date | null; /** * * @type {Date} * @memberof PublicSpamTestRunDto */ lastSyncedAt?: Date | null; /** * * @type {boolean} * @memberof PublicSpamTestRunDto */ freeLimitReached: boolean; /** * * @type {string} * @memberof PublicSpamTestRunDto */ errorCode?: PublicSpamTestRunDtoErrorCodeEnum; /** * * @type {Date} * @memberof PublicSpamTestRunDto */ createdAt: Date; /** * * @type {Date} * @memberof PublicSpamTestRunDto */ updatedAt: Date; } /** * @export * @enum {string} */ export enum PublicSpamTestRunDtoErrorCodeEnum { I_001_UPGRADE_REQUIRED = 'I_001_UPGRADE_REQUIRED', W_404_ENTITY_NOT_FOUND = 'W_404_ENTITY_NOT_FOUND', W_404_USER_NOT_FOUND_FOR_ACCESS_LINK = 'W_404_USER_NOT_FOUND_FOR_ACCESS_LINK', W_404_USER_NOT_FOUND_FOR_PASSWORD = 'W_404_USER_NOT_FOUND_FOR_PASSWORD', W_409_USER_ALREADY_EXISTS = 'W_409_USER_ALREADY_EXISTS', W_404_USER_NOT_FOUND_FOR_PASSWORD_RESET = 'W_404_USER_NOT_FOUND_FOR_PASSWORD_RESET', W_400_BAD_REQUEST = 'W_400_BAD_REQUEST', W_400_OPT_IN_REQUIRED = 'W_400_OPT_IN_REQUIRED', W_401_UNAUTHORIZED = 'W_401_UNAUTHORIZED', W_401_CHALLENGE_INVALID = 'W_401_CHALLENGE_INVALID', W_401_REQUIRES_VERIFICATION = 'W_401_REQUIRES_VERIFICATION', W_401_MULTIPLE_ACCOUNTS = 'W_401_MULTIPLE_ACCOUNTS', W_403_FORBIDDEN = 'W_403_FORBIDDEN', W_403_FORBIDDEN_PHONE_NUMBER = 'W_403_FORBIDDEN_PHONE_NUMBER', W_403_SAML_IP_ADDRESS_NOT_ALLOWED = 'W_403_SAML_IP_ADDRESS_NOT_ALLOWED', W_409_CONFLICT = 'W_409_CONFLICT', W_409_ORGANIZATION_EMAIL_LOGIN_DISABLED = 'W_409_ORGANIZATION_EMAIL_LOGIN_DISABLED', W_409_LINK_ACCESS_BLOCKED = 'W_409_LINK_ACCESS_BLOCKED', W_429_RATE_LIMITED = 'W_429_RATE_LIMITED', W_429_SEND_DESTINATION_THROTTLED = 'W_429_SEND_DESTINATION_THROTTLED', W_429_SEND_BLOCK = 'W_429_SEND_BLOCK', W_429_SEND_BLOCK_TRIAL = 'W_429_SEND_BLOCK_TRIAL', W_429_SEND_BLOCK_ADMIN_PAUSED = 'W_429_SEND_BLOCK_ADMIN_PAUSED', W_429_SEND_BLOCK_PAYMENT_VALIDATION = 'W_429_SEND_BLOCK_PAYMENT_VALIDATION', W_429_SEND_BLOCK_ACCOUNT_VALIDATION = 'W_429_SEND_BLOCK_ACCOUNT_VALIDATION', W_429_SENDING_AGREEMENT_REQUIRED = 'W_429_SENDING_AGREEMENT_REQUIRED', W_429_ACCOUNT_FROZEN = 'W_429_ACCOUNT_FROZEN', E_001_UNEXPECTED_ERROR = 'E_001_UNEXPECTED_ERROR', E_400_BAD_REQUEST = 'E_400_BAD_REQUEST', E_500_INTERNAL_ERROR = 'E_500_INTERNAL_ERROR', W_429_SUBSCRIPTION_ADDON_REQUIRED_VALIDATION = 'W_429_SUBSCRIPTION_ADDON_REQUIRED_VALIDATION', W_429_SUBSCRIPTION_ADDON_REQUIRED_CONNECTOR = 'W_429_SUBSCRIPTION_ADDON_REQUIRED_CONNECTOR', W_429_SUBSCRIPTION_ADDON_REQUIRED_DOMAIN_MONITOR = 'W_429_SUBSCRIPTION_ADDON_REQUIRED_DOMAIN_MONITOR', W_429_SUBSCRIPTION_ADDON_REQUIRED_INBOX_PLACEMENT_TEST = 'W_429_SUBSCRIPTION_ADDON_REQUIRED_INBOX_PLACEMENT_TEST', W_429_SUBSCRIPTION_ADDON_REQUIRED_AI = 'W_429_SUBSCRIPTION_ADDON_REQUIRED_AI', W_429_SUBSCRIPTION_ADDON_REQUIRED_DEVICE_PREVIEW = 'W_429_SUBSCRIPTION_ADDON_REQUIRED_DEVICE_PREVIEW', W_429_SUBSCRIPTION_LIMIT_REACHED = 'W_429_SUBSCRIPTION_LIMIT_REACHED', W_429_SUBSCRIPTION_PAYMENT_FAILURES = 'W_429_SUBSCRIPTION_PAYMENT_FAILURES', W_429_SUBSCRIPTION_TRIAL_LIMIT = 'W_429_SUBSCRIPTION_TRIAL_LIMIT', W_429_SUBSCRIPTION_REQUIRED = 'W_429_SUBSCRIPTION_REQUIRED', W_429_SUBSCRIPTION_OUT_OF_DATE = 'W_429_SUBSCRIPTION_OUT_OF_DATE', W_429_SUBSCRIPTION_FREE_LIMIT = 'W_429_SUBSCRIPTION_FREE_LIMIT', W_429_PUBLIC_DEVICE_RENDER_ACCOUNT_REQUIRED = 'W_429_PUBLIC_DEVICE_RENDER_ACCOUNT_REQUIRED', W_429_FREE_ACCOUNT_EXPIRED = 'W_429_FREE_ACCOUNT_EXPIRED', } export function PublicSpamTestRunDtoFromJSON(json: any): PublicSpamTestRunDto { return PublicSpamTestRunDtoFromJSONTyped(json, false); } export function PublicSpamTestRunDtoFromJSONTyped( json: any, ignoreDiscriminator: boolean ): PublicSpamTestRunDto { if (json === undefined || json === null) { return json; } return { id: json['id'], source: json['source'], status: !exists(json, 'status') ? undefined : json['status'], reportStatus: !exists(json, 'reportStatus') ? undefined : json['reportStatus'], requestedSegment: !exists(json, 'requestedSegment') ? undefined : json['requestedSegment'], seedlistProfile: !exists(json, 'seedlistProfile') ? undefined : json['seedlistProfile'], senderDomain: !exists(json, 'senderDomain') ? undefined : json['senderDomain'], fromEmail: !exists(json, 'fromEmail') ? undefined : json['fromEmail'], trackingToken: !exists(json, 'trackingToken') ? undefined : json['trackingToken'], seedAddresses: json['seedAddresses'], seedAddressFormats: json['seedAddressFormats'], totalTargets: json['totalTargets'], matchedTargets: json['matchedTargets'], inboxTargets: json['inboxTargets'], spamTargets: json['spamTargets'], notReceivedTargets: json['notReceivedTargets'], submittedAt: !exists(json, 'submittedAt') ? undefined : json['submittedAt'] === null ? null : new Date(json['submittedAt']), startedAt: !exists(json, 'startedAt') ? undefined : json['startedAt'] === null ? null : new Date(json['startedAt']), firstMatchAt: !exists(json, 'firstMatchAt') ? undefined : json['firstMatchAt'] === null ? null : new Date(json['firstMatchAt']), completedAt: !exists(json, 'completedAt') ? undefined : json['completedAt'] === null ? null : new Date(json['completedAt']), expiresAt: !exists(json, 'expiresAt') ? undefined : json['expiresAt'] === null ? null : new Date(json['expiresAt']), lastEventAt: !exists(json, 'lastEventAt') ? undefined : json['lastEventAt'] === null ? null : new Date(json['lastEventAt']), lastSyncedAt: !exists(json, 'lastSyncedAt') ? undefined : json['lastSyncedAt'] === null ? null : new Date(json['lastSyncedAt']), freeLimitReached: json['freeLimitReached'], errorCode: !exists(json, 'errorCode') ? undefined : json['errorCode'], createdAt: new Date(json['createdAt']), updatedAt: new Date(json['updatedAt']), }; } export function PublicSpamTestRunDtoToJSON( value?: PublicSpamTestRunDto | null ): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { id: value.id, source: value.source, status: value.status, reportStatus: value.reportStatus, requestedSegment: value.requestedSegment, seedlistProfile: value.seedlistProfile, senderDomain: value.senderDomain, fromEmail: value.fromEmail, trackingToken: value.trackingToken, seedAddresses: value.seedAddresses, seedAddressFormats: value.seedAddressFormats, totalTargets: value.totalTargets, matchedTargets: value.matchedTargets, inboxTargets: value.inboxTargets, spamTargets: value.spamTargets, notReceivedTargets: value.notReceivedTargets, submittedAt: value.submittedAt === undefined ? undefined : value.submittedAt === null ? null : value.submittedAt.toISOString(), startedAt: value.startedAt === undefined ? undefined : value.startedAt === null ? null : value.startedAt.toISOString(), firstMatchAt: value.firstMatchAt === undefined ? undefined : value.firstMatchAt === null ? null : value.firstMatchAt.toISOString(), completedAt: value.completedAt === undefined ? undefined : value.completedAt === null ? null : value.completedAt.toISOString(), expiresAt: value.expiresAt === undefined ? undefined : value.expiresAt === null ? null : value.expiresAt.toISOString(), lastEventAt: value.lastEventAt === undefined ? undefined : value.lastEventAt === null ? null : value.lastEventAt.toISOString(), lastSyncedAt: value.lastSyncedAt === undefined ? undefined : value.lastSyncedAt === null ? null : value.lastSyncedAt.toISOString(), freeLimitReached: value.freeLimitReached, errorCode: value.errorCode, createdAt: value.createdAt.toISOString(), updatedAt: value.updatedAt.toISOString(), }; }