/* 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 { StatusFromJSON, StatusToJSON, } from './Status';
import { InvestmentAccountSchemaFromJSON, InvestmentAccountSchemaToJSON, } from './InvestmentAccountSchema';
import { ErrorResponseFromJSON, ErrorResponseToJSON, } from './ErrorResponse';
/**
 * Check if a given object implements the InvestmentSourceResultSchema interface.
 */
export function instanceOfInvestmentSourceResultSchema(value) {
    if (!('status' in value) || value['status'] === undefined)
        return false;
    if (!('sourceKey' in value) || value['sourceKey'] === undefined)
        return false;
    return true;
}
export function InvestmentSourceResultSchemaFromJSON(json) {
    return InvestmentSourceResultSchemaFromJSONTyped(json, false);
}
export function InvestmentSourceResultSchemaFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'status': StatusFromJSON(json['status']),
        'sourceKey': json['sourceKey'],
        'errorResponse': json['errorResponse'] == null ? undefined : ErrorResponseFromJSON(json['errorResponse']),
        'investmentResults': json['investmentResults'] == null ? undefined : (json['investmentResults'].map(InvestmentAccountSchemaFromJSON)),
    };
}
export function InvestmentSourceResultSchemaToJSON(json) {
    return InvestmentSourceResultSchemaToJSONTyped(json, false);
}
export function InvestmentSourceResultSchemaToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'status': StatusToJSON(value['status']),
        'sourceKey': value['sourceKey'],
        'errorResponse': ErrorResponseToJSON(value['errorResponse']),
        'investmentResults': value['investmentResults'] == null ? undefined : (value['investmentResults'].map(InvestmentAccountSchemaToJSON)),
    };
}
