UNPKG

mailslurp-client

Version:

Official client for MailSlurp Email and SMS API. Create email addresses and phone numbers in Javascript without a mail server. Send and receive real emails in applications or tests.

109 lines (104 loc) 2.92 kB
/* tslint:disable */ /* eslint-disable */ /** * MailSlurp API * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. 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'; /** * Email attachment data * @export * @interface AttachmentProjection */ export interface AttachmentProjection { /** * * @type {string} * @memberof AttachmentProjection */ name?: string | null; /** * Content length of attachment in bytes * @type {number} * @memberof AttachmentProjection */ contentLength?: number | null; /** * * @type {string} * @memberof AttachmentProjection */ userId: string; /** * Attachment ID * @type {string} * @memberof AttachmentProjection */ attachmentId: string; /** * * @type {Date} * @memberof AttachmentProjection */ createdAt: Date; /** * * @type {Date} * @memberof AttachmentProjection */ updatedAt: Date; /** * Content type of attachment. * @type {string} * @memberof AttachmentProjection */ contentType?: string | null; } export function AttachmentProjectionFromJSON(json: any): AttachmentProjection { return AttachmentProjectionFromJSONTyped(json, false); } export function AttachmentProjectionFromJSONTyped( json: any, ignoreDiscriminator: boolean ): AttachmentProjection { if (json === undefined || json === null) { return json; } return { name: !exists(json, 'name') ? undefined : json['name'], contentLength: !exists(json, 'contentLength') ? undefined : json['contentLength'], userId: json['userId'], attachmentId: json['attachmentId'], createdAt: new Date(json['createdAt']), updatedAt: new Date(json['updatedAt']), contentType: !exists(json, 'contentType') ? undefined : json['contentType'], }; } export function AttachmentProjectionToJSON( value?: AttachmentProjection | null ): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { name: value.name, contentLength: value.contentLength, userId: value.userId, attachmentId: value.attachmentId, createdAt: value.createdAt.toISOString(), updatedAt: value.updatedAt.toISOString(), contentType: value.contentType, }; }