"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * Octane API
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.0
 *
 *
 * 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.CreditLedgerToJSON = exports.CreditLedgerFromJSONTyped = exports.CreditLedgerFromJSON = void 0;
const runtime_1 = require("../runtime");
function CreditLedgerFromJSON(json) {
    return CreditLedgerFromJSONTyped(json, false);
}
exports.CreditLedgerFromJSON = CreditLedgerFromJSON;
function CreditLedgerFromJSONTyped(json, ignoreDiscriminator) {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        'amount': !(0, runtime_1.exists)(json, 'amount') ? undefined : json['amount'],
        'timestamp': !(0, runtime_1.exists)(json, 'timestamp') ? undefined : (new Date(json['timestamp'])),
        'pending': !(0, runtime_1.exists)(json, 'pending') ? undefined : json['pending'],
        'balance': !(0, runtime_1.exists)(json, 'balance') ? undefined : json['balance'],
    };
}
exports.CreditLedgerFromJSONTyped = CreditLedgerFromJSONTyped;
function CreditLedgerToJSON(value) {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        'amount': value.amount,
        'timestamp': value.timestamp === undefined ? undefined : (value.timestamp.toISOString()),
        'pending': value.pending,
        'balance': value.balance,
    };
}
exports.CreditLedgerToJSON = CreditLedgerToJSON;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ3JlZGl0TGVkZ2VyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2NvZGVnZW4vbW9kZWxzL0NyZWRpdExlZGdlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsb0JBQW9CO0FBQ3BCLG9CQUFvQjtBQUNwQjs7Ozs7Ozs7O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