/* tslint:disable */
/* eslint-disable */
/**
 * UCX Proxy
 * A single use API for the UCX Proxy.
 *
 * The version of the OpenAPI document: 0.0.12
 * Contact: customersuccess@equisoft.com
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

import { mapValues } from '../runtime';
import type { EmailLabel } from './EmailLabel';
import {
    EmailLabelFromJSON,
    EmailLabelFromJSONTyped,
    EmailLabelToJSON,
    EmailLabelToJSONTyped,
} from './EmailLabel';

/**
 * 
 * @export
 * @interface EmailSchema
 */
export interface EmailSchema {
    /**
     * 
     * @type {EmailLabel}
     * @memberof EmailSchema
     */
    label: EmailLabel;
    /**
     * 
     * @type {string}
     * @memberof EmailSchema
     */
    address: string;
    /**
     * 
     * @type {boolean}
     * @memberof EmailSchema
     */
    main: boolean;
}



/**
 * Check if a given object implements the EmailSchema interface.
 */
export function instanceOfEmailSchema(value: object): value is EmailSchema {
    if (!('label' in value) || value['label'] === undefined) return false;
    if (!('address' in value) || value['address'] === undefined) return false;
    if (!('main' in value) || value['main'] === undefined) return false;
    return true;
}

export function EmailSchemaFromJSON(json: any): EmailSchema {
    return EmailSchemaFromJSONTyped(json, false);
}

export function EmailSchemaFromJSONTyped(json: any, ignoreDiscriminator: boolean): EmailSchema {
    if (json == null) {
        return json;
    }
    return {
        
        'label': EmailLabelFromJSON(json['label']),
        'address': json['address'],
        'main': json['main'],
    };
}

export function EmailSchemaToJSON(json: any): EmailSchema {
    return EmailSchemaToJSONTyped(json, false);
}

export function EmailSchemaToJSONTyped(value?: EmailSchema | null, ignoreDiscriminator: boolean = false): any {
    if (value == null) {
        return value;
    }

    return {
        
        'label': EmailLabelToJSON(value['label']),
        'address': value['address'],
        'main': value['main'],
    };
}

