/* 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 { Status } from './Status';
import {
    StatusFromJSON,
    StatusFromJSONTyped,
    StatusToJSON,
    StatusToJSONTyped,
} from './Status';
import type { SourceResultSchema } from './SourceResultSchema';
import {
    SourceResultSchemaFromJSON,
    SourceResultSchemaFromJSONTyped,
    SourceResultSchemaToJSON,
    SourceResultSchemaToJSONTyped,
} from './SourceResultSchema';
import type { ErrorResponse } from './ErrorResponse';
import {
    ErrorResponseFromJSON,
    ErrorResponseFromJSONTyped,
    ErrorResponseToJSON,
    ErrorResponseToJSONTyped,
} from './ErrorResponse';

/**
 * 
 * @export
 * @interface ContactResultSchema
 */
export interface ContactResultSchema {
    /**
     * 
     * @type {Status}
     * @memberof ContactResultSchema
     */
    status: Status;
    /**
     * 
     * @type {ErrorResponse}
     * @memberof ContactResultSchema
     */
    errorResponse?: ErrorResponse | null;
    /**
     * 
     * @type {Array<SourceResultSchema>}
     * @memberof ContactResultSchema
     */
    results?: Array<SourceResultSchema> | null;
}



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

export function ContactResultSchemaFromJSON(json: any): ContactResultSchema {
    return ContactResultSchemaFromJSONTyped(json, false);
}

export function ContactResultSchemaFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContactResultSchema {
    if (json == null) {
        return json;
    }
    return {
        
        'status': StatusFromJSON(json['status']),
        'errorResponse': json['errorResponse'] == null ? undefined : ErrorResponseFromJSON(json['errorResponse']),
        'results': json['results'] == null ? undefined : ((json['results'] as Array<any>).map(SourceResultSchemaFromJSON)),
    };
}

export function ContactResultSchemaToJSON(json: any): ContactResultSchema {
    return ContactResultSchemaToJSONTyped(json, false);
}

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

    return {
        
        'status': StatusToJSON(value['status']),
        'errorResponse': ErrorResponseToJSON(value['errorResponse']),
        'results': value['results'] == null ? undefined : ((value['results'] as Array<any>).map(SourceResultSchemaToJSON)),
    };
}

