"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.UpdateSubscriptionInPlaceArgsToJSON = exports.UpdateSubscriptionInPlaceArgsFromJSONTyped = exports.UpdateSubscriptionInPlaceArgsFromJSON = void 0;
const runtime_1 = require("../runtime");
const DiscountInputArgs_1 = require("./DiscountInputArgs");
const SubscriptionAddOnInput_1 = require("./SubscriptionAddOnInput");
function UpdateSubscriptionInPlaceArgsFromJSON(json) {
    return UpdateSubscriptionInPlaceArgsFromJSONTyped(json, false);
}
exports.UpdateSubscriptionInPlaceArgsFromJSON = UpdateSubscriptionInPlaceArgsFromJSON;
function UpdateSubscriptionInPlaceArgsFromJSONTyped(json, ignoreDiscriminator) {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        'discountOverride': !(0, runtime_1.exists)(json, 'discount_override') ? undefined : (0, DiscountInputArgs_1.DiscountInputArgsFromJSON)(json['discount_override']),
        'addOns': !(0, runtime_1.exists)(json, 'add_ons') ? undefined : (json['add_ons'] === null ? null : json['add_ons'].map(SubscriptionAddOnInput_1.SubscriptionAddOnInputFromJSON)),
        'discounts': !(0, runtime_1.exists)(json, 'discounts') ? undefined : (json['discounts'].map(DiscountInputArgs_1.DiscountInputArgsFromJSON)),
        'couponOverrideName': !(0, runtime_1.exists)(json, 'coupon_override_name') ? undefined : json['coupon_override_name'],
    };
}
exports.UpdateSubscriptionInPlaceArgsFromJSONTyped = UpdateSubscriptionInPlaceArgsFromJSONTyped;
function UpdateSubscriptionInPlaceArgsToJSON(value) {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        'discount_override': (0, DiscountInputArgs_1.DiscountInputArgsToJSON)(value.discountOverride),
        'add_ons': value.addOns === undefined ? undefined : (value.addOns === null ? null : value.addOns.map(SubscriptionAddOnInput_1.SubscriptionAddOnInputToJSON)),
        'discounts': value.discounts === undefined ? undefined : (value.discounts.map(DiscountInputArgs_1.DiscountInputArgsToJSON)),
        'coupon_override_name': value.couponOverrideName,
    };
}
exports.UpdateSubscriptionInPlaceArgsToJSON = UpdateSubscriptionInPlaceArgsToJSON;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVXBkYXRlU3Vic2NyaXB0aW9uSW5QbGFjZUFyZ3MuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvY29kZWdlbi9tb2RlbHMvVXBkYXRlU3Vic2NyaXB0aW9uSW5QbGFjZUFyZ3MudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLG9CQUFvQjtBQUNwQixvQkFBb0I7QUFDcEI7Ozs7Ozs7Ozs7R0FVRzs7O0FBRUgsd0NBQStDO0FBQy9DLDJEQUs2QjtBQUM3QixxRUFLa0M7QUFrQ2xDLFNBQWdCLHFDQUFxQyxDQUFDLElBQVM7SUFDM0QsT0FBTywwQ0FBMEMsQ0FBQyxJQUFJLEVBQUUsS0FBSyxDQUFDLENBQUM7QUFDbkUsQ0FBQztBQUZELHNGQUVDO0FBRUQsU0FBZ0IsMENBQTBDLENBQUMsSUFBUyxFQUFFLG1CQUE0QjtJQUM5RixJQUFJLENBQUMsSUFBSSxLQUFLLFNBQVMsQ0FBQyxJQUFJLENBQUMsSUFBSSxLQUFLLElBQUksQ0FBQyxFQUFFO1FBQ3pDLE9BQU8sSUFBSSxDQUFDO0tBQ2Y7SUFDRCxPQUFPO1FBRUgsa0JBQWtCLEVBQUUsQ0FBQyxJQUFBLGdCQUFNLEVBQUMsSUFBSSxFQUFFLG1CQUFtQixDQUFDLENBQUMsQ0FBQyxDQUFDLFNBQVMsQ0FBQyxDQUFDLENBQUMsSU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