/* 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 { InboxPlacementAnalyticsGroupSeriesDto, InboxPlacementAnalyticsGroupSeriesDtoFromJSON, InboxPlacementAnalyticsGroupSeriesDtoFromJSONTyped, InboxPlacementAnalyticsGroupSeriesDtoToJSON, InboxPlacementAnalyticsRunDto, InboxPlacementAnalyticsRunDtoFromJSON, InboxPlacementAnalyticsRunDtoFromJSONTyped, InboxPlacementAnalyticsRunDtoToJSON, InboxPlacementAnalyticsSeriesPointDto, InboxPlacementAnalyticsSeriesPointDtoFromJSON, InboxPlacementAnalyticsSeriesPointDtoFromJSONTyped, InboxPlacementAnalyticsSeriesPointDtoToJSON, InboxPlacementAnalyticsSummaryDto, InboxPlacementAnalyticsSummaryDtoFromJSON, InboxPlacementAnalyticsSummaryDtoFromJSONTyped, InboxPlacementAnalyticsSummaryDtoToJSON, } from './'; /** * Inbox placement analytics response for charting over time * @export * @interface InboxPlacementAnalyticsSeriesDto */ export interface InboxPlacementAnalyticsSeriesDto { /** * * @type {Date} * @memberof InboxPlacementAnalyticsSeriesDto */ since: Date; /** * * @type {Date} * @memberof InboxPlacementAnalyticsSeriesDto */ before: Date; /** * * @type {string} * @memberof InboxPlacementAnalyticsSeriesDto */ bucket: InboxPlacementAnalyticsSeriesDtoBucketEnum; /** * * @type {string} * @memberof InboxPlacementAnalyticsSeriesDto */ groupBy: InboxPlacementAnalyticsSeriesDtoGroupByEnum; /** * * @type {string} * @memberof InboxPlacementAnalyticsSeriesDto */ senderDomain?: string | null; /** * * @type {string} * @memberof InboxPlacementAnalyticsSeriesDto */ fromEmail?: string | null; /** * * @type {InboxPlacementAnalyticsSummaryDto} * @memberof InboxPlacementAnalyticsSeriesDto */ summary: InboxPlacementAnalyticsSummaryDto; /** * * @type {Array} * @memberof InboxPlacementAnalyticsSeriesDto */ runs: Array; /** * * @type {Array} * @memberof InboxPlacementAnalyticsSeriesDto */ points: Array; /** * * @type {Array} * @memberof InboxPlacementAnalyticsSeriesDto */ groups: Array; } /** * @export * @enum {string} */ export enum InboxPlacementAnalyticsSeriesDtoBucketEnum { HOUR = 'HOUR', DAY = 'DAY', } /** * @export * @enum {string} */ export enum InboxPlacementAnalyticsSeriesDtoGroupByEnum { NONE = 'NONE', SENDER_DOMAIN = 'SENDER_DOMAIN', FROM_EMAIL = 'FROM_EMAIL', } export function InboxPlacementAnalyticsSeriesDtoFromJSON( json: any ): InboxPlacementAnalyticsSeriesDto { return InboxPlacementAnalyticsSeriesDtoFromJSONTyped(json, false); } export function InboxPlacementAnalyticsSeriesDtoFromJSONTyped( json: any, ignoreDiscriminator: boolean ): InboxPlacementAnalyticsSeriesDto { if (json === undefined || json === null) { return json; } return { since: new Date(json['since']), before: new Date(json['before']), bucket: json['bucket'], groupBy: json['groupBy'], senderDomain: !exists(json, 'senderDomain') ? undefined : json['senderDomain'], fromEmail: !exists(json, 'fromEmail') ? undefined : json['fromEmail'], summary: InboxPlacementAnalyticsSummaryDtoFromJSON(json['summary']), runs: (json['runs'] as Array).map( InboxPlacementAnalyticsRunDtoFromJSON ), points: (json['points'] as Array).map( InboxPlacementAnalyticsSeriesPointDtoFromJSON ), groups: (json['groups'] as Array).map( InboxPlacementAnalyticsGroupSeriesDtoFromJSON ), }; } export function InboxPlacementAnalyticsSeriesDtoToJSON( value?: InboxPlacementAnalyticsSeriesDto | null ): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { since: value.since.toISOString(), before: value.before.toISOString(), bucket: value.bucket, groupBy: value.groupBy, senderDomain: value.senderDomain, fromEmail: value.fromEmail, summary: InboxPlacementAnalyticsSummaryDtoToJSON(value.summary), runs: (value.runs as Array).map(InboxPlacementAnalyticsRunDtoToJSON), points: (value.points as Array).map( InboxPlacementAnalyticsSeriesPointDtoToJSON ), groups: (value.groups as Array).map( InboxPlacementAnalyticsGroupSeriesDtoToJSON ), }; }