/* 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'; import { DeliverabilityAnalyticsRunDto, DeliverabilityAnalyticsRunDtoFromJSON, DeliverabilityAnalyticsRunDtoFromJSONTyped, DeliverabilityAnalyticsRunDtoToJSON, DeliverabilityAnalyticsSeriesPointDto, DeliverabilityAnalyticsSeriesPointDtoFromJSON, DeliverabilityAnalyticsSeriesPointDtoFromJSONTyped, DeliverabilityAnalyticsSeriesPointDtoToJSON, DeliverabilityAnalyticsSummaryDto, DeliverabilityAnalyticsSummaryDtoFromJSON, DeliverabilityAnalyticsSummaryDtoFromJSONTyped, DeliverabilityAnalyticsSummaryDtoToJSON, } from './'; /** * Deliverability analytics response for time-range comparison * @export * @interface DeliverabilityAnalyticsSeriesDto */ export interface DeliverabilityAnalyticsSeriesDto { /** * * @type {Date} * @memberof DeliverabilityAnalyticsSeriesDto */ since: Date; /** * * @type {Date} * @memberof DeliverabilityAnalyticsSeriesDto */ before: Date; /** * * @type {string} * @memberof DeliverabilityAnalyticsSeriesDto */ scope?: DeliverabilityAnalyticsSeriesDtoScopeEnum; /** * * @type {string} * @memberof DeliverabilityAnalyticsSeriesDto */ bucket: DeliverabilityAnalyticsSeriesDtoBucketEnum; /** * * @type {DeliverabilityAnalyticsSummaryDto} * @memberof DeliverabilityAnalyticsSeriesDto */ summary: DeliverabilityAnalyticsSummaryDto; /** * * @type {Array} * @memberof DeliverabilityAnalyticsSeriesDto */ runs: Array; /** * * @type {Array} * @memberof DeliverabilityAnalyticsSeriesDto */ points: Array; } /** * @export * @enum {string} */ export enum DeliverabilityAnalyticsSeriesDtoScopeEnum { INBOX = 'INBOX', PHONE = 'PHONE', } /** * @export * @enum {string} */ export enum DeliverabilityAnalyticsSeriesDtoBucketEnum { HOUR = 'HOUR', DAY = 'DAY', } export function DeliverabilityAnalyticsSeriesDtoFromJSON( json: any ): DeliverabilityAnalyticsSeriesDto { return DeliverabilityAnalyticsSeriesDtoFromJSONTyped(json, false); } export function DeliverabilityAnalyticsSeriesDtoFromJSONTyped( json: any, ignoreDiscriminator: boolean ): DeliverabilityAnalyticsSeriesDto { if (json === undefined || json === null) { return json; } return { since: new Date(json['since']), before: new Date(json['before']), scope: !exists(json, 'scope') ? undefined : json['scope'], bucket: json['bucket'], summary: DeliverabilityAnalyticsSummaryDtoFromJSON(json['summary']), runs: (json['runs'] as Array).map( DeliverabilityAnalyticsRunDtoFromJSON ), points: (json['points'] as Array).map( DeliverabilityAnalyticsSeriesPointDtoFromJSON ), }; } export function DeliverabilityAnalyticsSeriesDtoToJSON( value?: DeliverabilityAnalyticsSeriesDto | null ): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { since: value.since.toISOString(), before: value.before.toISOString(), scope: value.scope, bucket: value.bucket, summary: DeliverabilityAnalyticsSummaryDtoToJSON(value.summary), runs: (value.runs as Array).map(DeliverabilityAnalyticsRunDtoToJSON), points: (value.points as Array).map( DeliverabilityAnalyticsSeriesPointDtoToJSON ), }; }