/* 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'; /** * * @export * @interface DomainMonitorDto */ export interface DomainMonitorDto { /** * * @type {string} * @memberof DomainMonitorDto */ id: string; /** * * @type {string} * @memberof DomainMonitorDto */ userId: string; /** * * @type {string} * @memberof DomainMonitorDto */ domain: string; /** * * @type {string} * @memberof DomainMonitorDto */ name?: string; /** * * @type {number} * @memberof DomainMonitorDto */ intervalSeconds?: number; /** * * @type {boolean} * @memberof DomainMonitorDto */ enabled: boolean; /** * * @type {boolean} * @memberof DomainMonitorDto */ schedulingEnabled: boolean; /** * * @type {string} * @memberof DomainMonitorDto */ lastStatus?: DomainMonitorDtoLastStatusEnum; /** * * @type {number} * @memberof DomainMonitorDto */ healthScore?: number; /** * * @type {Date} * @memberof DomainMonitorDto */ lastRunAt?: Date; /** * * @type {Date} * @memberof DomainMonitorDto */ nextRunAt?: Date; /** * * @type {Date} * @memberof DomainMonitorDto */ createdAt: Date; /** * * @type {Date} * @memberof DomainMonitorDto */ updatedAt: Date; } /** * @export * @enum {string} */ export enum DomainMonitorDtoLastStatusEnum { HEALTHY = 'HEALTHY', DEGRADED = 'DEGRADED', CRITICAL = 'CRITICAL', FAILED = 'FAILED', } export function DomainMonitorDtoFromJSON(json: any): DomainMonitorDto { return DomainMonitorDtoFromJSONTyped(json, false); } export function DomainMonitorDtoFromJSONTyped( json: any, ignoreDiscriminator: boolean ): DomainMonitorDto { if (json === undefined || json === null) { return json; } return { id: json['id'], userId: json['userId'], domain: json['domain'], name: !exists(json, 'name') ? undefined : json['name'], intervalSeconds: !exists(json, 'intervalSeconds') ? undefined : json['intervalSeconds'], enabled: json['enabled'], schedulingEnabled: json['schedulingEnabled'], lastStatus: !exists(json, 'lastStatus') ? undefined : json['lastStatus'], healthScore: !exists(json, 'healthScore') ? undefined : json['healthScore'], lastRunAt: !exists(json, 'lastRunAt') ? undefined : new Date(json['lastRunAt']), nextRunAt: !exists(json, 'nextRunAt') ? undefined : new Date(json['nextRunAt']), createdAt: new Date(json['createdAt']), updatedAt: new Date(json['updatedAt']), }; } export function DomainMonitorDtoToJSON(value?: DomainMonitorDto | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { id: value.id, userId: value.userId, domain: value.domain, name: value.name, intervalSeconds: value.intervalSeconds, enabled: value.enabled, schedulingEnabled: value.schedulingEnabled, lastStatus: value.lastStatus, healthScore: value.healthScore, lastRunAt: value.lastRunAt === undefined ? undefined : value.lastRunAt.toISOString(), nextRunAt: value.nextRunAt === undefined ? undefined : value.nextRunAt.toISOString(), createdAt: value.createdAt.toISOString(), updatedAt: value.updatedAt.toISOString(), }; }