/* 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'; /** * ConnectorEventProjection * @export * @interface ConnectorEventProjection */ export interface ConnectorEventProjection { /** * * @type {string} * @memberof ConnectorEventProjection */ message?: string; /** * * @type {string} * @memberof ConnectorEventProjection */ id?: string; /** * * @type {number} * @memberof ConnectorEventProjection */ size: number; /** * * @type {string} * @memberof ConnectorEventProjection */ status: ConnectorEventProjectionStatusEnum; /** * * @type {string} * @memberof ConnectorEventProjection */ eventType: ConnectorEventProjectionEventTypeEnum; /** * * @type {Date} * @memberof ConnectorEventProjection */ createdAt: Date; /** * * @type {string} * @memberof ConnectorEventProjection */ connectorId: string; /** * * @type {boolean} * @memberof ConnectorEventProjection */ seen?: boolean; } /** * @export * @enum {string} */ export enum ConnectorEventProjectionStatusEnum { SUCCESS = 'SUCCESS', INTERNAL_ERROR = 'INTERNAL_ERROR', SUBSCRIPTION_ERROR = 'SUBSCRIPTION_ERROR', CONNECTION_ERROR = 'CONNECTION_ERROR', NOT_FOUND = 'NOT_FOUND', } /** * @export * @enum {string} */ export enum ConnectorEventProjectionEventTypeEnum { SEND = 'SEND', SYNC = 'SYNC', } export function ConnectorEventProjectionFromJSON( json: any ): ConnectorEventProjection { return ConnectorEventProjectionFromJSONTyped(json, false); } export function ConnectorEventProjectionFromJSONTyped( json: any, ignoreDiscriminator: boolean ): ConnectorEventProjection { if (json === undefined || json === null) { return json; } return { message: !exists(json, 'message') ? undefined : json['message'], id: !exists(json, 'id') ? undefined : json['id'], size: json['size'], status: json['status'], eventType: json['eventType'], createdAt: new Date(json['createdAt']), connectorId: json['connectorId'], seen: !exists(json, 'seen') ? undefined : json['seen'], }; } export function ConnectorEventProjectionToJSON( value?: ConnectorEventProjection | null ): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { message: value.message, id: value.id, size: value.size, status: value.status, eventType: value.eventType, createdAt: value.createdAt.toISOString(), connectorId: value.connectorId, seen: value.seen, }; }