"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.MeteredComponentToJSON = exports.MeteredComponentFromJSONTyped = exports.MeteredComponentFromJSON = void 0;
const runtime_1 = require("../runtime");
const MeteredComponentLabelLimit_1 = require("./MeteredComponentLabelLimit");
const PriceScheme_1 = require("./PriceScheme");
function MeteredComponentFromJSON(json) {
    return MeteredComponentFromJSONTyped(json, false);
}
exports.MeteredComponentFromJSON = MeteredComponentFromJSON;
function MeteredComponentFromJSONTyped(json, ignoreDiscriminator) {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        'meterName': json['meter_name'],
        'meterDisplayName': json['meter_display_name'],
        'priceScheme': (0, PriceScheme_1.PriceSchemeFromJSON)(json['price_scheme']),
        'limit': !(0, runtime_1.exists)(json, 'limit') ? undefined : json['limit'],
        'labelLimits': (json['label_limits'].map(MeteredComponentLabelLimit_1.MeteredComponentLabelLimitFromJSON)),
        'displayName': !(0, runtime_1.exists)(json, 'display_name') ? undefined : json['display_name'],
        'externalUuid': !(0, runtime_1.exists)(json, 'external_uuid') ? undefined : json['external_uuid'],
        'minimumCharge': !(0, runtime_1.exists)(json, 'minimum_charge') ? undefined : json['minimum_charge'],
        'minimumChargeFrequency': !(0, runtime_1.exists)(json, 'minimum_charge_frequency') ? undefined : json['minimum_charge_frequency'],
        'watermark': !(0, runtime_1.exists)(json, 'watermark') ? undefined : json['watermark'],
    };
}
exports.MeteredComponentFromJSONTyped = MeteredComponentFromJSONTyped;
function MeteredComponentToJSON(value) {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        'meter_name': value.meterName,
        'meter_display_name': value.meterDisplayName,
        'price_scheme': (0, PriceScheme_1.PriceSchemeToJSON)(value.priceScheme),
        'limit': value.limit,
        'label_limits': (value.labelLimits.map(MeteredComponentLabelLimit_1.MeteredComponentLabelLimitToJSON)),
        'display_name': value.displayName,
        'external_uuid': value.externalUuid,
        'minimum_charge': value.minimumCharge,
        'minimum_charge_frequency': value.minimumChargeFrequency,
        'watermark': value.watermark,
    };
}
exports.MeteredComponentToJSON = MeteredComponentToJSON;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWV0ZXJlZENvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb2RlZ2VuL21vZGVscy9NZXRlcmVkQ29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxvQkFBb0I7QUFDcEIsb0JBQW9CO0FBQ3BCOzs7Ozs7Ozs7O0dBVUc7OztBQUVILHdDQUErQztBQUMvQyw2RUFLc0M7QUFDdEMsK0NBS3VCO0FBc0V2QixTQUFnQix3QkFBd0IsQ0FBQyxJQUFTO0lBQzlDLE9BQU8sNkJBQTZCLENBQUMsSUFBSSxFQUFFLEtBQUssQ0FBQyxDQUFDO0FBQ3RELENBQUM7QUFGRCw0REFFQztBQUVELFNBQWdCLDZCQUE2QixDQUFDLElBQVMsRUFBRSxtQkFBNEI7SUFDakYsSUFBSSxDQUFDLElBQUksS0FBSyxTQUFTLENBQUMsSUFBSSxDQUFDLElBQUksS0FBSyxJQUFJLENBQUMsRUFBRTtRQUN6QyxPQUFPLElBQUksQ0FBQztLQUNmO0lBQ0QsT0FBTztRQUVILFdBQVcsRUFBRSxJQUFJLENBQUMsWUFBWSxDQUFDO1FBQy9CLGtCQUFrQixFQUFFLElBQUksQ0FBQyxvQkFBb0IsQ0FBQztRQUM5QyxhQUFhLEVBQUUsSUFBQSxpQ0FBbUIsRUFBQyxJQUFJLENBQUMsY0FBYyxDQUFDLENBQUM7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