"use strict";
/* 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.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.instanceOfSourceResultSchema = instanceOfSourceResultSchema;
exports.SourceResultSchemaFromJSON = SourceResultSchemaFromJSON;
exports.SourceResultSchemaFromJSONTyped = SourceResultSchemaFromJSONTyped;
exports.SourceResultSchemaToJSON = SourceResultSchemaToJSON;
exports.SourceResultSchemaToJSONTyped = SourceResultSchemaToJSONTyped;
const Status_1 = require("./Status");
const ContactSchema_1 = require("./ContactSchema");
const ErrorResponse_1 = require("./ErrorResponse");
/**
 * Check if a given object implements the SourceResultSchema interface.
 */
function instanceOfSourceResultSchema(value) {
    if (!('status' in value) || value['status'] === undefined)
        return false;
    if (!('sourceKey' in value) || value['sourceKey'] === undefined)
        return false;
    return true;
}
function SourceResultSchemaFromJSON(json) {
    return SourceResultSchemaFromJSONTyped(json, false);
}
function SourceResultSchemaFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'status': (0, Status_1.StatusFromJSON)(json['status']),
        'sourceKey': json['sourceKey'],
        'errorResponse': json['errorResponse'] == null ? undefined : (0, ErrorResponse_1.ErrorResponseFromJSON)(json['errorResponse']),
        'sourceResults': json['sourceResults'] == null ? undefined : (json['sourceResults'].map(ContactSchema_1.ContactSchemaFromJSON)),
        'totalCount': json['totalCount'] == null ? undefined : json['totalCount'],
    };
}
function SourceResultSchemaToJSON(json) {
    return SourceResultSchemaToJSONTyped(json, false);
}
function SourceResultSchemaToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'status': (0, Status_1.StatusToJSON)(value['status']),
        'sourceKey': value['sourceKey'],
        'errorResponse': (0, ErrorResponse_1.ErrorResponseToJSON)(value['errorResponse']),
        'sourceResults': value['sourceResults'] == null ? undefined : (value['sourceResults'].map(ContactSchema_1.ContactSchemaToJSON)),
        'totalCount': value['totalCount'],
    };
}
