"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.CustomerPortalAccruedRevenueToJSON = exports.CustomerPortalAccruedRevenueFromJSONTyped = exports.CustomerPortalAccruedRevenueFromJSON = void 0;
const runtime_1 = require("../runtime");
const CustomerPortalAccruedRevenueLineItem_1 = require("./CustomerPortalAccruedRevenueLineItem");
function CustomerPortalAccruedRevenueFromJSON(json) {
    return CustomerPortalAccruedRevenueFromJSONTyped(json, false);
}
exports.CustomerPortalAccruedRevenueFromJSON = CustomerPortalAccruedRevenueFromJSON;
function CustomerPortalAccruedRevenueFromJSONTyped(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(CustomerPortalAccruedRevenueLineItem_1.CustomerPortalAccruedRevenueLineItemFromJSON)),
    };
}
exports.CustomerPortalAccruedRevenueFromJSONTyped = CustomerPortalAccruedRevenueFromJSONTyped;
function CustomerPortalAccruedRevenueToJSON(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(CustomerPortalAccruedRevenueLineItem_1.CustomerPortalAccruedRevenueLineItemToJSON)),
    };
}
exports.CustomerPortalAccruedRevenueToJSON = CustomerPortalAccruedRevenueToJSON;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ3VzdG9tZXJQb3J0YWxBY2NydWVkUmV2ZW51ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb2RlZ2VuL21vZGVscy9DdXN0b21lclBvcnRhbEFjY3J1ZWRSZXZlbnVlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxvQkFBb0I7QUFDcEIsb0JBQW9CO0FBQ3BCOzs7Ozs7Ozs7O0dBVUc7OztBQUVILHdDQUErQztBQUMvQyxpR0FLZ0Q7QUFrQ2hELFNBQWdCLG9DQUFvQyxDQUFDLElBQVM7SUFDMUQsT0FBTyx5Q0FBeUMsQ0FBQyxJQUFJLEVBQUUsS0FBSyxDQUFDLENBQUM7QUFDbEUsQ0FBQztBQUZELG9GQUVDO0FBRUQsU0FBZ0IseUNBQXlDLENBQUMsSUFBUyxFQUFFLG1CQUE0QjtJQUM3RixJQUFJLENBQUMsSUFBSSxLQUFLLFNBQVMsQ0FBQyxJQUFJLENBQUMsSUFBSSxLQUFLLElBQUksQ0FBQyxFQUFFO1FBQ3pDLE9BQU8sSUFBSSxDQUFDO0tBQ2Y7SUFDRCxPQUFPO1FBRUgsV0FBVyxFQUFFLENBQUMsSUFBQSxnQkFBTSxFQUFDLElBQUksRUFBRSxZQUFZLENBQUMsQ0FBQyxDQUFDLENBQUMsU0FBUyxDQUFDLENBQUMsQ0FBQyxDQUFDLElBQUksSUFBSSxDQUFDLElBQUksQ0FBQyxZQUFZLENBQUMsQ0FBQyxDQUFDO1FBQ3JGLHFCQUFxQixFQUFFLENBQUMsSUFBQSxnQkFBTSxFQUFDLElBQUksRUFBRSx1QkFBdUIsQ0FBQyxDQUFDLENB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