"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.SubscriptionAddOnItemToJSON = exports.SubscriptionAddOnItemFromJSONTyped = exports.SubscriptionAddOnItemFromJSON = void 0;
const runtime_1 = require("../runtime");
function SubscriptionAddOnItemFromJSON(json) {
    return SubscriptionAddOnItemFromJSONTyped(json, false);
}
exports.SubscriptionAddOnItemFromJSON = SubscriptionAddOnItemFromJSON;
function SubscriptionAddOnItemFromJSONTyped(json, ignoreDiscriminator) {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        'atCycleEnd': !(0, runtime_1.exists)(json, 'at_cycle_end') ? undefined : json['at_cycle_end'],
        'effectiveAt': !(0, runtime_1.exists)(json, 'effective_at') ? undefined : (new Date(json['effective_at'])),
        'quantity': !(0, runtime_1.exists)(json, 'quantity') ? undefined : json['quantity'],
        'featureName': !(0, runtime_1.exists)(json, 'feature_name') ? undefined : json['feature_name'],
        'atCycleStart': !(0, runtime_1.exists)(json, 'at_cycle_start') ? undefined : json['at_cycle_start'],
    };
}
exports.SubscriptionAddOnItemFromJSONTyped = SubscriptionAddOnItemFromJSONTyped;
function SubscriptionAddOnItemToJSON(value) {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        'at_cycle_end': value.atCycleEnd,
        'effective_at': value.effectiveAt === undefined ? undefined : (value.effectiveAt.toISOString()),
        'quantity': value.quantity,
        'feature_name': value.featureName,
        'at_cycle_start': value.atCycleStart,
    };
}
exports.SubscriptionAddOnItemToJSON = SubscriptionAddOnItemToJSON;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiU3Vic2NyaXB0aW9uQWRk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