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.
159 lines (154 loc) • 4.24 kB
text/typescript
/* 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';
/**
* DMARC aggregate report metadata and policy information
* @export
* @interface DmarcReportMetadata
*/
export interface DmarcReportMetadata {
/**
*
* @type {string}
* @memberof DmarcReportMetadata
*/
orgName?: string | null;
/**
*
* @type {string}
* @memberof DmarcReportMetadata
*/
email?: string | null;
/**
*
* @type {string}
* @memberof DmarcReportMetadata
*/
reportId?: string | null;
/**
*
* @type {string}
* @memberof DmarcReportMetadata
*/
domain?: string | null;
/**
*
* @type {string}
* @memberof DmarcReportMetadata
*/
adkim?: string | null;
/**
*
* @type {string}
* @memberof DmarcReportMetadata
*/
aspf?: string | null;
/**
*
* @type {string}
* @memberof DmarcReportMetadata
*/
policy?: string | null;
/**
*
* @type {string}
* @memberof DmarcReportMetadata
*/
subdomainPolicy?: string | null;
/**
*
* @type {number}
* @memberof DmarcReportMetadata
*/
percentage?: number | null;
/**
*
* @type {Date}
* @memberof DmarcReportMetadata
*/
dateRangeBegin?: Date | null;
/**
*
* @type {Date}
* @memberof DmarcReportMetadata
*/
dateRangeEnd?: Date | null;
}
export function DmarcReportMetadataFromJSON(json: any): DmarcReportMetadata {
return DmarcReportMetadataFromJSONTyped(json, false);
}
export function DmarcReportMetadataFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): DmarcReportMetadata {
if (json === undefined || json === null) {
return json;
}
return {
orgName: !exists(json, 'orgName') ? undefined : json['orgName'],
email: !exists(json, 'email') ? undefined : json['email'],
reportId: !exists(json, 'reportId') ? undefined : json['reportId'],
domain: !exists(json, 'domain') ? undefined : json['domain'],
adkim: !exists(json, 'adkim') ? undefined : json['adkim'],
aspf: !exists(json, 'aspf') ? undefined : json['aspf'],
policy: !exists(json, 'policy') ? undefined : json['policy'],
subdomainPolicy: !exists(json, 'subdomainPolicy')
? undefined
: json['subdomainPolicy'],
percentage: !exists(json, 'percentage') ? undefined : json['percentage'],
dateRangeBegin: !exists(json, 'dateRangeBegin')
? undefined
: json['dateRangeBegin'] === null
? null
: new Date(json['dateRangeBegin']),
dateRangeEnd: !exists(json, 'dateRangeEnd')
? undefined
: json['dateRangeEnd'] === null
? null
: new Date(json['dateRangeEnd']),
};
}
export function DmarcReportMetadataToJSON(
value?: DmarcReportMetadata | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
orgName: value.orgName,
email: value.email,
reportId: value.reportId,
domain: value.domain,
adkim: value.adkim,
aspf: value.aspf,
policy: value.policy,
subdomainPolicy: value.subdomainPolicy,
percentage: value.percentage,
dateRangeBegin:
value.dateRangeBegin === undefined
? undefined
: value.dateRangeBegin === null
? null
: value.dateRangeBegin.toISOString(),
dateRangeEnd:
value.dateRangeEnd === undefined
? undefined
: value.dateRangeEnd === null
? null
: value.dateRangeEnd.toISOString(),
};
}