"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.MeterToJSON = exports.MeterFromJSONTyped = exports.MeterFromJSON = void 0;
const runtime_1 = require("../runtime");
function MeterFromJSON(json) {
    return MeterFromJSONTyped(json, false);
}
exports.MeterFromJSON = MeterFromJSON;
function MeterFromJSONTyped(json, ignoreDiscriminator) {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        'name': json['name'],
        'displayName': !(0, runtime_1.exists)(json, 'display_name') ? undefined : json['display_name'],
        'description': !(0, runtime_1.exists)(json, 'description') ? undefined : json['description'],
        'eventName': json['event_name'],
        'meterType': json['meter_type'],
        'dataType': json['data_type'],
        'aggregation': json['aggregation'],
        'unitName': !(0, runtime_1.exists)(json, 'unit_name') ? undefined : json['unit_name'],
        'isIncremental': json['is_incremental'],
        'reportingMethod': json['reporting_method'],
        'expectedLabels': !(0, runtime_1.exists)(json, 'expected_labels') ? undefined : json['expected_labels'],
        'primaryLabels': !(0, runtime_1.exists)(json, 'primary_labels') ? undefined : json['primary_labels'],
    };
}
exports.MeterFromJSONTyped = MeterFromJSONTyped;
function MeterToJSON(value) {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        'display_name': value.displayName,
        'description': value.description,
        'event_name': value.eventName,
        'meter_type': value.meterType,
        'data_type': value.dataType,
        'aggregation': value.aggregation,
        'unit_name': value.unitName,
        'is_incremental': value.isIncremental,
        'reporting_method': value.reportingMethod,
        'expected_labels': value.expectedLabels,
        'primary_labels': value.primaryLabels,
    };
}
exports.MeterToJSON = MeterToJSON;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWV0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