"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.AccruedRevenueToJSON = exports.AccruedRevenueFromJSONTyped = exports.AccruedRevenueFromJSON = void 0;
const runtime_1 = require("../runtime");
const AccruedRevenueLineItem_1 = require("./AccruedRevenueLineItem");
function AccruedRevenueFromJSON(json) {
    return AccruedRevenueFromJSONTyped(json, false);
}
exports.AccruedRevenueFromJSON = AccruedRevenueFromJSON;
function AccruedRevenueFromJSONTyped(json, ignoreDiscriminator) {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        'startTime': !(0, runtime_1.exists)(json, 'start_time') ? undefined : (new Date(json['start_time'])),
        'totalAccruedRevenue': !(0, runtime_1.exists)(json, 'total_accrued_revenue') ? undefined : json['total_accrued_revenue'],
        'endTime': !(0, runtime_1.exists)(json, 'end_time') ? undefined : (new Date(json['end_time'])),
        'lineItems': !(0, runtime_1.exists)(json, 'line_items') ? undefined : (json['line_items'].map(AccruedRevenueLineItem_1.AccruedRevenueLineItemFromJSON)),
    };
}
exports.AccruedRevenueFromJSONTyped = AccruedRevenueFromJSONTyped;
function AccruedRevenueToJSON(value) {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        'start_time': value.startTime === undefined ? undefined : (value.startTime.toISOString()),
        'total_accrued_revenue': value.totalAccruedRevenue,
        'end_time': value.endTime === undefined ? undefined : (value.endTime.toISOString()),
        'line_items': value.lineItems === undefined ? undefined : (value.lineItems.map(AccruedRevenueLineItem_1.AccruedRevenueLineItemToJSON)),
    };
}
exports.AccruedRevenueToJSON = AccruedRevenueToJSON;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWx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