/* 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 { SymbolsSchemaFromJSON, SymbolsSchemaToJSON, } from './SymbolsSchema';
import { HoldingExchangeFromJSON, HoldingExchangeToJSON, } from './HoldingExchange';
import { HoldingTypeFromJSON, HoldingTypeToJSON, } from './HoldingType';
/**
 * Check if a given object implements the HoldingSchema interface.
 */
export function instanceOfHoldingSchema(value) {
    if (!('symbols' in value) || value['symbols'] === undefined)
        return false;
    if (!('sourceMetadata' in value) || value['sourceMetadata'] === undefined)
        return false;
    return true;
}
export function HoldingSchemaFromJSON(json) {
    return HoldingSchemaFromJSONTyped(json, false);
}
export function HoldingSchemaFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'symbols': SymbolsSchemaFromJSON(json['symbols']),
        'description': json['description'] == null ? undefined : json['description'],
        'type': json['type'] == null ? undefined : HoldingTypeFromJSON(json['type']),
        'exchange': json['exchange'] == null ? undefined : HoldingExchangeFromJSON(json['exchange']),
        'quantity': json['quantity'] == null ? undefined : json['quantity'],
        'currency': json['currency'] == null ? undefined : json['currency'],
        'marketValue': json['marketValue'] == null ? undefined : json['marketValue'],
        'sourceMetadata': json['sourceMetadata'],
    };
}
export function HoldingSchemaToJSON(json) {
    return HoldingSchemaToJSONTyped(json, false);
}
export function HoldingSchemaToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'symbols': SymbolsSchemaToJSON(value['symbols']),
        'description': value['description'],
        'type': HoldingTypeToJSON(value['type']),
        'exchange': HoldingExchangeToJSON(value['exchange']),
        'quantity': value['quantity'],
        'currency': value['currency'],
        'marketValue': value['marketValue'],
        'sourceMetadata': value['sourceMetadata'],
    };
}
