UNPKG

@bitblit/ratchet-misc

Version:

Ratchet miscellaneous tooling that requires smallish dependant libraries

59 lines 3.14 kB
import { exists } from '../runtime.js'; import { SendSmtpEmailAttachmentInnerFromJSON, SendSmtpEmailAttachmentInnerToJSON } from './SendSmtpEmailAttachmentInner.js'; import { SendSmtpEmailBccInnerFromJSON, SendSmtpEmailBccInnerToJSON } from './SendSmtpEmailBccInner.js'; import { SendSmtpEmailCcInnerFromJSON, SendSmtpEmailCcInnerToJSON } from './SendSmtpEmailCcInner.js'; import { SendSmtpEmailReplyToFromJSON, SendSmtpEmailReplyToToJSON } from './SendSmtpEmailReplyTo.js'; import { SendSmtpEmailSenderFromJSON, SendSmtpEmailSenderToJSON } from './SendSmtpEmailSender.js'; import { SendSmtpEmailToInnerFromJSON, SendSmtpEmailToInnerToJSON } from './SendSmtpEmailToInner.js'; export function instanceOfSendSmtpEmail(value) { let isInstance = true; isInstance = isInstance && 'to' in value; return isInstance; } export function SendSmtpEmailFromJSON(json) { return SendSmtpEmailFromJSONTyped(json, false); } export function SendSmtpEmailFromJSONTyped(json, ignoreDiscriminator) { if (json === undefined || json === null) { return json; } return { sender: !exists(json, 'sender') ? undefined : SendSmtpEmailSenderFromJSON(json['sender']), to: json['to'].map(SendSmtpEmailToInnerFromJSON), bcc: !exists(json, 'bcc') ? undefined : json['bcc'].map(SendSmtpEmailBccInnerFromJSON), cc: !exists(json, 'cc') ? undefined : json['cc'].map(SendSmtpEmailCcInnerFromJSON), htmlContent: !exists(json, 'htmlContent') ? undefined : json['htmlContent'], textContent: !exists(json, 'textContent') ? undefined : json['textContent'], subject: !exists(json, 'subject') ? undefined : json['subject'], replyTo: !exists(json, 'replyTo') ? undefined : SendSmtpEmailReplyToFromJSON(json['replyTo']), attachment: !exists(json, 'attachment') ? undefined : json['attachment'].map(SendSmtpEmailAttachmentInnerFromJSON), headers: !exists(json, 'headers') ? undefined : json['headers'], templateId: !exists(json, 'templateId') ? undefined : json['templateId'], params: !exists(json, 'params') ? undefined : json['params'], tags: !exists(json, 'tags') ? undefined : json['tags'], }; } export function SendSmtpEmailToJSON(value) { if (value === undefined) { return undefined; } if (value === null) { return null; } return { sender: SendSmtpEmailSenderToJSON(value.sender), to: value.to.map(SendSmtpEmailToInnerToJSON), bcc: value.bcc === undefined ? undefined : value.bcc.map(SendSmtpEmailBccInnerToJSON), cc: value.cc === undefined ? undefined : value.cc.map(SendSmtpEmailCcInnerToJSON), htmlContent: value.htmlContent, textContent: value.textContent, subject: value.subject, replyTo: SendSmtpEmailReplyToToJSON(value.replyTo), attachment: value.attachment === undefined ? undefined : value.attachment.map(SendSmtpEmailAttachmentInnerToJSON), headers: value.headers, templateId: value.templateId, params: value.params, tags: value.tags, }; } //# sourceMappingURL=SendSmtpEmail.js.map