"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.CustomerPortalUsageToJSON = exports.CustomerPortalUsageFromJSONTyped = exports.CustomerPortalUsageFromJSON = void 0;
const runtime_1 = require("../runtime");
const CycleUsage_1 = require("./CycleUsage");
function CustomerPortalUsageFromJSON(json) {
    return CustomerPortalUsageFromJSONTyped(json, false);
}
exports.CustomerPortalUsageFromJSON = CustomerPortalUsageFromJSON;
function CustomerPortalUsageFromJSONTyped(json, ignoreDiscriminator) {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        'meterType': !(0, runtime_1.exists)(json, 'meter_type') ? undefined : json['meter_type'],
        'meterDisplayName': !(0, runtime_1.exists)(json, 'meter_display_name') ? undefined : json['meter_display_name'],
        'currentCycleUsage': !(0, runtime_1.exists)(json, 'current_cycle_usage') ? undefined : (0, CycleUsage_1.CycleUsageFromJSON)(json['current_cycle_usage']),
        'unitName': !(0, runtime_1.exists)(json, 'unit_name') ? undefined : json['unit_name'],
        'meterName': !(0, runtime_1.exists)(json, 'meter_name') ? undefined : json['meter_name'],
        'previousCycleUsage': !(0, runtime_1.exists)(json, 'previous_cycle_usage') ? undefined : (0, CycleUsage_1.CycleUsageFromJSON)(json['previous_cycle_usage']),
    };
}
exports.CustomerPortalUsageFromJSONTyped = CustomerPortalUsageFromJSONTyped;
function CustomerPortalUsageToJSON(value) {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        'meter_type': value.meterType,
        'meter_display_name': value.meterDisplayName,
        'current_cycle_usage': (0, CycleUsage_1.CycleUsageToJSON)(value.currentCycleUsage),
        'unit_name': value.unitName,
        'meter_name': value.meterName,
        'previous_cycle_usage': (0, CycleUsage_1.CycleUsageToJSON)(value.previousCycleUsage),
    };
}
exports.CustomerPortalUsageToJSON = CustomerPortalUsageToJSON;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ3VzdG9tZXJQb3J0YWxVc2FnZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb2RlZ2VuL21vZGVscy9DdXN0b21lclBvcnRhbFVzYWdlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxvQkFBb0I7QUFDcEIsb0JBQW9CO0FBQ3BCOzs7Ozs7Ozs7O0dBVUc7OztBQUVILHdDQUErQztBQUMvQyw2Q0FLc0I7QUE4Q3RCLFNBQWdCLDJCQUEyQixDQUFDLElBQVM7SUFDakQsT0FBTyxnQ0FBZ0MsQ0FBQyxJQUFJLEVBQUUsS0FBSyxDQUFDLENBQUM7QUFDekQsQ0FBQztBQUZELGtFQUVDO0FBRUQsU0FBZ0IsZ0NBQWdDLENBQUMsSUFBUyxFQUFFLG1CQUE0QjtJQUNwRixJQUFJLENBQUMsSUFBSSxLQUFLLFNBQVMsQ0FBQyxJQUFJLENBQUMsSUFBSSxLQUFLLElBQUksQ0FBQyxFQUFFO1FBQ3pDLE9BQU8sSUFBSSxDQUFDO0tBQ2Y7SUFDRCxPQUFPO1FBRUgsV0FBVyxFQUFFLENBQUMsSUFBQSxnQkFBTSxFQUFDLElBQUksRUFBRSxZQUFZLENBQUMsQ0FBQyxDQUFDLENBQUMsU0FBUyxDQUFDLENBQUMsQ0FBQyxJQUFJLENBQUMsWUFBWSxDQUFDO1FBQ3pFLGtCQUFrQixFQUFFLENBQUMsSUFBQSxnQkFBTSxFQUFDLElBQUksRUFBRSxvQkFBb0IsQ0FBQyxDQUFDLENBQUMsQ0FBQyxTQUFTLENBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQyxvQkFBb0IsQ0FBQztRQUNoRy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