"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.AddOnInputArgsToJSON = exports.AddOnInputArgsFromJSONTyped = exports.AddOnInputArgsFromJSON = exports.AddOnInputArgsPriceSchemeTypeEnum = void 0;
const runtime_1 = require("../runtime");
const FeatureInputArgs_1 = require("./FeatureInputArgs");
const PriceInputArgs_1 = require("./PriceInputArgs");
/**
* @export
* @enum {string}
*/
var AddOnInputArgsPriceSchemeTypeEnum;
(function (AddOnInputArgsPriceSchemeTypeEnum) {
    AddOnInputArgsPriceSchemeTypeEnum["Flat"] = "FLAT";
    AddOnInputArgsPriceSchemeTypeEnum["Tiered"] = "TIERED";
})(AddOnInputArgsPriceSchemeTypeEnum = exports.AddOnInputArgsPriceSchemeTypeEnum || (exports.AddOnInputArgsPriceSchemeTypeEnum = {}));
function AddOnInputArgsFromJSON(json) {
    return AddOnInputArgsFromJSONTyped(json, false);
}
exports.AddOnInputArgsFromJSON = AddOnInputArgsFromJSON;
function AddOnInputArgsFromJSONTyped(json, ignoreDiscriminator) {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        'immediatelyCharge': !(0, runtime_1.exists)(json, 'immediately_charge') ? undefined : json['immediately_charge'],
        'price': !(0, runtime_1.exists)(json, 'price') ? undefined : json['price'],
        'prices': !(0, runtime_1.exists)(json, 'prices') ? undefined : (json['prices'].map(PriceInputArgs_1.PriceInputArgsFromJSON)),
        'chargeFrequency': !(0, runtime_1.exists)(json, 'charge_frequency') ? undefined : json['charge_frequency'],
        'limit': !(0, runtime_1.exists)(json, 'limit') ? undefined : json['limit'],
        'singleUse': !(0, runtime_1.exists)(json, 'single_use') ? undefined : json['single_use'],
        'feature': (0, FeatureInputArgs_1.FeatureInputArgsFromJSON)(json['feature']),
        'quantityEnabled': !(0, runtime_1.exists)(json, 'quantity_enabled') ? undefined : json['quantity_enabled'],
        'priceFrequency': !(0, runtime_1.exists)(json, 'price_frequency') ? undefined : json['price_frequency'],
        'priceSchemeType': !(0, runtime_1.exists)(json, 'price_scheme_type') ? undefined : json['price_scheme_type'],
    };
}
exports.AddOnInputArgsFromJSONTyped = AddOnInputArgsFromJSONTyped;
function AddOnInputArgsToJSON(value) {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        'immediately_charge': value.immediatelyCharge,
        'price': value.price,
        'prices': value.prices === undefined ? undefined : (value.prices.map(PriceInputArgs_1.PriceInputArgsToJSON)),
        'charge_frequency': value.chargeFrequency,
        'limit': value.limit,
        'single_use': value.singleUse,
        'feature': (0, FeatureInputArgs_1.FeatureInputArgsToJSON)(value.feature),
        'quantity_enabled': value.quantityEnabled,
        'price_frequency': value.priceFrequency,
        'price_scheme_type': value.priceSchemeType,
    };
}
exports.AddOnInputArgsToJSON = AddOnInputArgsToJSON;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQWRkT25JbnB1dEFyZ3MuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvY29kZWdlbi9tb2RlbHMvQWRkT25JbnB1dEFyZ3MudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLG9CQUFvQjtBQUNwQixvQkFBb0I7QUFDcEI7Ozs7Ozs7Ozs7R0FVRzs7O0FBRUgsd0NBQStDO0FBQy9DLHlEQUs0QjtBQUM1QixxREFLMEI7QUFzRTFCOzs7RUFHRTtBQUNGLElBQVksaUNBR1g7QUFIRCxXQUFZLGlDQUFpQztJQUN6QyxrREFBYSxDQUFBO0lBQ2Isc0RBQWlCLENBQUE7QUFDckIsQ0FBQyxFQUhXLGlDQUFpQyxHQUFqQyx5Q0FBa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