/* 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'; /** * Persisted retention-policy run state. Poll this after starting a run to track progress without blocking on mailbox cleanup. * @export * @interface InboxRetentionPolicyRunDto */ export interface InboxRetentionPolicyRunDto { /** * * @type {string} * @memberof InboxRetentionPolicyRunDto */ id: string; /** * * @type {string} * @memberof InboxRetentionPolicyRunDto */ status: InboxRetentionPolicyRunDtoStatusEnum; /** * * @type {string} * @memberof InboxRetentionPolicyRunDto */ source: InboxRetentionPolicyRunDtoSourceEnum; /** * * @type {number} * @memberof InboxRetentionPolicyRunDto */ matchedPolicies: number; /** * * @type {number} * @memberof InboxRetentionPolicyRunDto */ appliedPolicies: number; /** * * @type {string} * @memberof InboxRetentionPolicyRunDto */ errorMessage?: string | null; /** * * @type {Date} * @memberof InboxRetentionPolicyRunDto */ startedAt?: Date | null; /** * * @type {Date} * @memberof InboxRetentionPolicyRunDto */ completedAt?: Date | null; /** * * @type {Date} * @memberof InboxRetentionPolicyRunDto */ createdAt: Date; /** * * @type {Date} * @memberof InboxRetentionPolicyRunDto */ updatedAt: Date; } /** * @export * @enum {string} */ export enum InboxRetentionPolicyRunDtoStatusEnum { SUBMITTED = 'SUBMITTED', RUNNING = 'RUNNING', COMPLETED = 'COMPLETED', FAILED = 'FAILED', } /** * @export * @enum {string} */ export enum InboxRetentionPolicyRunDtoSourceEnum { USER_API = 'USER_API', } export function InboxRetentionPolicyRunDtoFromJSON( json: any ): InboxRetentionPolicyRunDto { return InboxRetentionPolicyRunDtoFromJSONTyped(json, false); } export function InboxRetentionPolicyRunDtoFromJSONTyped( json: any, ignoreDiscriminator: boolean ): InboxRetentionPolicyRunDto { if (json === undefined || json === null) { return json; } return { id: json['id'], status: json['status'], source: json['source'], matchedPolicies: json['matchedPolicies'], appliedPolicies: json['appliedPolicies'], errorMessage: !exists(json, 'errorMessage') ? undefined : json['errorMessage'], 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']), createdAt: new Date(json['createdAt']), updatedAt: new Date(json['updatedAt']), }; } export function InboxRetentionPolicyRunDtoToJSON( value?: InboxRetentionPolicyRunDto | null ): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { id: value.id, status: value.status, source: value.source, matchedPolicies: value.matchedPolicies, appliedPolicies: value.appliedPolicies, errorMessage: value.errorMessage, startedAt: value.startedAt === undefined ? undefined : value.startedAt === null ? null : value.startedAt.toISOString(), completedAt: value.completedAt === undefined ? undefined : value.completedAt === null ? null : value.completedAt.toISOString(), createdAt: value.createdAt.toISOString(), updatedAt: value.updatedAt.toISOString(), }; }