"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.CustomerPortalMeterToJSON = exports.CustomerPortalMeterFromJSONTyped = exports.CustomerPortalMeterFromJSON = void 0;
const runtime_1 = require("../runtime");
const CustomerPortalMeterLabels_1 = require("./CustomerPortalMeterLabels");
const CustomerPortalMeterLabelsWithDisplayName_1 = require("./CustomerPortalMeterLabelsWithDisplayName");
function CustomerPortalMeterFromJSON(json) {
    return CustomerPortalMeterFromJSONTyped(json, false);
}
exports.CustomerPortalMeterFromJSON = CustomerPortalMeterFromJSON;
function CustomerPortalMeterFromJSONTyped(json, ignoreDiscriminator) {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        'meterType': !(0, runtime_1.exists)(json, 'meter_type') ? undefined : json['meter_type'],
        'aggregation': !(0, runtime_1.exists)(json, 'aggregation') ? undefined : json['aggregation'],
        'meterDisplayName': !(0, runtime_1.exists)(json, 'meter_display_name') ? undefined : json['meter_display_name'],
        'dataType': !(0, runtime_1.exists)(json, 'data_type') ? undefined : json['data_type'],
        'labelsWithDisplayNames': !(0, runtime_1.exists)(json, 'labels_with_display_names') ? undefined : (json['labels_with_display_names'].map(CustomerPortalMeterLabelsWithDisplayName_1.CustomerPortalMeterLabelsWithDisplayNameFromJSON)),
        'unitName': !(0, runtime_1.exists)(json, 'unit_name') ? undefined : json['unit_name'],
        'meterName': !(0, runtime_1.exists)(json, 'meter_name') ? undefined : json['meter_name'],
        'labels': !(0, runtime_1.exists)(json, 'labels') ? undefined : (json['labels'].map(CustomerPortalMeterLabels_1.CustomerPortalMeterLabelsFromJSON)),
    };
}
exports.CustomerPortalMeterFromJSONTyped = CustomerPortalMeterFromJSONTyped;
function CustomerPortalMeterToJSON(value) {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        'meter_type': value.meterType,
        'aggregation': value.aggregation,
        'meter_display_name': value.meterDisplayName,
        'data_type': value.dataType,
        'labels_with_display_names': value.labelsWithDisplayNames === undefined ? undefined : (value.labelsWithDisplayNames.map(CustomerPortalMeterLabelsWithDisplayName_1.CustomerPortalMeterLabelsWithDisplayNameToJSON)),
        'unit_name': value.unitName,
        'meter_name': value.meterName,
        'labels': value.labels === undefined ? undefined : (value.labels.map(CustomerPortalMeterLabels_1.CustomerPortalMeterLabelsToJSON)),
    };
}
exports.CustomerPortalMeterToJSON = CustomerPortalMeterToJSON;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ3VzdG9tZXJQb3J0YWxNZXRlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb2RlZ2VuL21vZGVscy9DdXN0b21lclBvcnRhbE1ldGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxvQkFBb0I7QUFDcEIsb0JBQW9CO0FBQ3BCOzs7Ozs7Ozs7O0dBVUc7OztBQUVILHdDQUErQztBQUMvQywyRUFLcUM7QUFDckMseUdBS29EO0FBMERwRCxTQUFnQiwyQkFBMkIsQ0FBQyxJQUFTO0lBQ2pELE9BQU8sZ0NBQWdDLENBQUMsSUFBSSxFQUFFLEtBQUssQ0FBQyxDQUFDO0FBQ3pELENBQUM7QUFGRCxrRUFFQztBQUVELFNBQWdCLGdDQUFnQyxDQUFDLElBQVMsRUFBRSxtQkFBNEI7SUFDcEYsSUFBSSxDQUFDLElBQUksS0FBSyxTQUFTLENBQUMsSUFBSSxDQUFDLElBQUksS0FBSyxJQUFJLENBQUMsRUFBRTtRQUN6QyxPQUFPLElBQUksQ0FBQztLQUNmO0lBQ0QsT0FBTztRQUVILFdBQVcsRUFBRSxDQ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