/* 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 { PhoneLabel } from './PhoneLabel';
import {
    PhoneLabelFromJSON,
    PhoneLabelFromJSONTyped,
    PhoneLabelToJSON,
    PhoneLabelToJSONTyped,
} from './PhoneLabel';

/**
 * 
 * @export
 * @interface PhoneSchema
 */
export interface PhoneSchema {
    /**
     * 
     * @type {PhoneLabel}
     * @memberof PhoneSchema
     */
    label: PhoneLabel;
    /**
     * 
     * @type {string}
     * @memberof PhoneSchema
     */
    number: string;
    /**
     * 
     * @type {string}
     * @memberof PhoneSchema
     */
    extension?: string | null;
}



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

export function PhoneSchemaFromJSON(json: any): PhoneSchema {
    return PhoneSchemaFromJSONTyped(json, false);
}

export function PhoneSchemaFromJSONTyped(json: any, ignoreDiscriminator: boolean): PhoneSchema {
    if (json == null) {
        return json;
    }
    return {
        
        'label': PhoneLabelFromJSON(json['label']),
        'number': json['number'],
        'extension': json['extension'] == null ? undefined : json['extension'],
    };
}

export function PhoneSchemaToJSON(json: any): PhoneSchema {
    return PhoneSchemaToJSONTyped(json, false);
}

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

    return {
        
        'label': PhoneLabelToJSON(value['label']),
        'number': value['number'],
        'extension': value['extension'],
    };
}

