"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * Montelo
 * Documentation for the Montelo API.
 *
 * The version of the OpenAPI document: 1.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.CostHistoryToJSON = exports.CostHistoryFromJSONTyped = exports.CostHistoryFromJSON = exports.instanceOfCostHistory = void 0;
/**
 * Check if a given object implements the CostHistory interface.
 */
function instanceOfCostHistory(value) {
    let isInstance = true;
    isInstance = isInstance && "intervalStart" in value;
    isInstance = isInstance && "totalCost" in value;
    return isInstance;
}
exports.instanceOfCostHistory = instanceOfCostHistory;
function CostHistoryFromJSON(json) {
    return CostHistoryFromJSONTyped(json, false);
}
exports.CostHistoryFromJSON = CostHistoryFromJSON;
function CostHistoryFromJSONTyped(json, ignoreDiscriminator) {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        'intervalStart': json['intervalStart'],
        'totalCost': json['totalCost'],
    };
}
exports.CostHistoryFromJSONTyped = CostHistoryFromJSONTyped;
function CostHistoryToJSON(value) {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        'intervalStart': value.intervalStart,
        'totalCost': value.totalCost,
    };
}
exports.CostHistoryToJSON = CostHistoryToJSON;
