/* 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 GenerateSpfRecordOptions */ export interface GenerateSpfRecordOptions { /** * Domain the SPF record applies to * @type {string} * @memberof GenerateSpfRecordOptions */ domain: string; /** * Optional include domains * @type {Array} * @memberof GenerateSpfRecordOptions */ includeDomains?: Array | null; /** * Optional IPv4 CIDRs or hosts * @type {Array} * @memberof GenerateSpfRecordOptions */ ip4?: Array | null; /** * Optional IPv6 CIDRs or hosts * @type {Array} * @memberof GenerateSpfRecordOptions */ ip6?: Array | null; /** * Whether to include the MX mechanism * @type {boolean} * @memberof GenerateSpfRecordOptions */ mx: boolean; /** * Whether to include the A mechanism * @type {boolean} * @memberof GenerateSpfRecordOptions */ a: boolean; /** * * @type {string} * @memberof GenerateSpfRecordOptions */ allPolicy: GenerateSpfRecordOptionsAllPolicyEnum; } /** * @export * @enum {string} */ export enum GenerateSpfRecordOptionsAllPolicyEnum { FAIL = 'FAIL', SOFTFAIL = 'SOFTFAIL', NEUTRAL = 'NEUTRAL', } export function GenerateSpfRecordOptionsFromJSON( json: any ): GenerateSpfRecordOptions { return GenerateSpfRecordOptionsFromJSONTyped(json, false); } export function GenerateSpfRecordOptionsFromJSONTyped( json: any, ignoreDiscriminator: boolean ): GenerateSpfRecordOptions { if (json === undefined || json === null) { return json; } return { domain: json['domain'], includeDomains: !exists(json, 'includeDomains') ? undefined : json['includeDomains'], ip4: !exists(json, 'ip4') ? undefined : json['ip4'], ip6: !exists(json, 'ip6') ? undefined : json['ip6'], mx: json['mx'], a: json['a'], allPolicy: json['allPolicy'], }; } export function GenerateSpfRecordOptionsToJSON( value?: GenerateSpfRecordOptions | null ): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { domain: value.domain, includeDomains: value.includeDomains, ip4: value.ip4, ip6: value.ip6, mx: value.mx, a: value.a, allPolicy: value.allPolicy, }; }