UNPKG

@bitblit/ratchet-misc

Version:

Ratchet miscellaneous tooling that requires smallish dependant libraries

46 lines 1.85 kB
import { exists } from '../runtime.js'; import { SendEmailAttachmentInnerFromJSON, SendEmailAttachmentInnerToJSON } from './SendEmailAttachmentInner.js'; export function instanceOfSendEmail(value) { let isInstance = true; isInstance = isInstance && 'emailTo' in value; return isInstance; } export function SendEmailFromJSON(json) { return SendEmailFromJSONTyped(json, false); } export function SendEmailFromJSONTyped(json, ignoreDiscriminator) { if (json === undefined || json === null) { return json; } return { emailTo: json['emailTo'], emailBcc: !exists(json, 'emailBcc') ? undefined : json['emailBcc'], emailCc: !exists(json, 'emailCc') ? undefined : json['emailCc'], replyTo: !exists(json, 'replyTo') ? undefined : json['replyTo'], attachmentUrl: !exists(json, 'attachmentUrl') ? undefined : json['attachmentUrl'], attachment: !exists(json, 'attachment') ? undefined : json['attachment'].map(SendEmailAttachmentInnerFromJSON), headers: !exists(json, 'headers') ? undefined : json['headers'], attributes: !exists(json, 'attributes') ? undefined : json['attributes'], tags: !exists(json, 'tags') ? undefined : json['tags'], }; } export function SendEmailToJSON(value) { if (value === undefined) { return undefined; } if (value === null) { return null; } return { emailTo: value.emailTo, emailBcc: value.emailBcc, emailCc: value.emailCc, replyTo: value.replyTo, attachmentUrl: value.attachmentUrl, attachment: value.attachment === undefined ? undefined : value.attachment.map(SendEmailAttachmentInnerToJSON), headers: value.headers, attributes: value.attributes, tags: value.tags, }; } //# sourceMappingURL=SendEmail.js.map