@bitblit/ratchet-misc
Version:
Ratchet miscellaneous tooling that requires smallish dependant libraries
65 lines • 2.46 kB
JavaScript
import { exists } from '../runtime.js';
import { GetSmtpTemplateOverviewSenderFromJSON, GetSmtpTemplateOverviewSenderToJSON } from './GetSmtpTemplateOverviewSender.js';
export function instanceOfGetSmtpTemplateOverview(value) {
let isInstance = true;
isInstance = isInstance && 'id' in value;
isInstance = isInstance && 'name' in value;
isInstance = isInstance && 'subject' in value;
isInstance = isInstance && 'isActive' in value;
isInstance = isInstance && 'testSent' in value;
isInstance = isInstance && 'sender' in value;
isInstance = isInstance && 'replyTo' in value;
isInstance = isInstance && 'toField' in value;
isInstance = isInstance && 'tag' in value;
isInstance = isInstance && 'htmlContent' in value;
isInstance = isInstance && 'createdAt' in value;
isInstance = isInstance && 'modifiedAt' in value;
return isInstance;
}
export function GetSmtpTemplateOverviewFromJSON(json) {
return GetSmtpTemplateOverviewFromJSONTyped(json, false);
}
export function GetSmtpTemplateOverviewFromJSONTyped(json, ignoreDiscriminator) {
if (json === undefined || json === null) {
return json;
}
return {
id: json['id'],
name: json['name'],
subject: json['subject'],
isActive: json['isActive'],
testSent: json['testSent'],
sender: GetSmtpTemplateOverviewSenderFromJSON(json['sender']),
replyTo: json['replyTo'],
toField: json['toField'],
tag: json['tag'],
htmlContent: json['htmlContent'],
createdAt: new Date(json['createdAt']),
modifiedAt: new Date(json['modifiedAt']),
doiTemplate: !exists(json, 'doiTemplate') ? undefined : json['doiTemplate'],
};
}
export function GetSmtpTemplateOverviewToJSON(value) {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
id: value.id,
name: value.name,
subject: value.subject,
isActive: value.isActive,
testSent: value.testSent,
sender: GetSmtpTemplateOverviewSenderToJSON(value.sender),
replyTo: value.replyTo,
toField: value.toField,
tag: value.tag,
htmlContent: value.htmlContent,
createdAt: value.createdAt.toISOString(),
modifiedAt: value.modifiedAt.toISOString(),
doiTemplate: value.doiTemplate,
};
}
//# sourceMappingURL=GetSmtpTemplateOverview.js.map