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