/* tslint:disable */ /* eslint-disable */ /** * MailSlurp API * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. 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://www.mailslurp.com/docs/) - [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 CreateContactOptions */ export interface CreateContactOptions { /** * * @type {string} * @memberof CreateContactOptions */ firstName?: string; /** * * @type {string} * @memberof CreateContactOptions */ lastName?: string; /** * * @type {string} * @memberof CreateContactOptions */ company?: string; /** * Set of email addresses belonging to the contact * @type {Array} * @memberof CreateContactOptions */ emailAddresses?: Array; /** * Tags that can be used to search and group contacts * @type {Array} * @memberof CreateContactOptions */ tags?: Array; /** * * @type {object} * @memberof CreateContactOptions */ metaData?: object; /** * Has the user explicitly or implicitly opted out of being contacted? If so MailSlurp will ignore them in all actions. * @type {boolean} * @memberof CreateContactOptions */ optOut?: boolean; /** * Group IDs that contact belongs to * @type {string} * @memberof CreateContactOptions */ groupId?: string; } export function CreateContactOptionsFromJSON(json: any): CreateContactOptions { return CreateContactOptionsFromJSONTyped(json, false); } export function CreateContactOptionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateContactOptions { if ((json === undefined) || (json === null)) { return json; } return { 'firstName': !exists(json, 'firstName') ? undefined : json['firstName'], 'lastName': !exists(json, 'lastName') ? undefined : json['lastName'], 'company': !exists(json, 'company') ? undefined : json['company'], 'emailAddresses': !exists(json, 'emailAddresses') ? undefined : json['emailAddresses'], 'tags': !exists(json, 'tags') ? undefined : json['tags'], 'metaData': !exists(json, 'metaData') ? undefined : json['metaData'], 'optOut': !exists(json, 'optOut') ? undefined : json['optOut'], 'groupId': !exists(json, 'groupId') ? undefined : json['groupId'], }; } export function CreateContactOptionsToJSON(value?: CreateContactOptions | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'firstName': value.firstName, 'lastName': value.lastName, 'company': value.company, 'emailAddresses': value.emailAddresses, 'tags': value.tags, 'metaData': value.metaData, 'optOut': value.optOut, 'groupId': value.groupId, }; }