"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.SelfServeSettingsToJSON = exports.SelfServeSettingsFromJSONTyped = exports.SelfServeSettingsFromJSON = void 0;
const runtime_1 = require("../runtime");
function SelfServeSettingsFromJSON(json) {
    return SelfServeSettingsFromJSONTyped(json, false);
}
exports.SelfServeSettingsFromJSON = SelfServeSettingsFromJSON;
function SelfServeSettingsFromJSONTyped(json, ignoreDiscriminator) {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        'purchaseCredits': json['purchase_credits'],
        'creditsExpirationLength': !(0, runtime_1.exists)(json, 'credits_expiration_length') ? undefined : json['credits_expiration_length'],
        'creditsExpirationUnit': !(0, runtime_1.exists)(json, 'credits_expiration_unit') ? undefined : json['credits_expiration_unit'],
        'pricePerCreditCents': !(0, runtime_1.exists)(json, 'price_per_credit_cents') ? undefined : json['price_per_credit_cents'],
        'switchPricePlans': json['switch_price_plans'],
        'enableAddressFields': !(0, runtime_1.exists)(json, 'enable_address_fields') ? undefined : json['enable_address_fields'],
        'customization': !(0, runtime_1.exists)(json, 'customization') ? undefined : json['customization'],
    };
}
exports.SelfServeSettingsFromJSONTyped = SelfServeSettingsFromJSONTyped;
function SelfServeSettingsToJSON(value) {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        'purchase_credits': value.purchaseCredits,
        'credits_expiration_length': value.creditsExpirationLength,
        'credits_expiration_unit': value.creditsExpirationUnit,
        'price_per_credit_cents': value.pricePerCreditCents,
        'switch_price_plans': value.switchPricePlans,
        'enable_address_fields': value.enableAddressFields,
        'customization': value.customization,
    };
}
exports.SelfServeSettingsToJSON = SelfServeSettingsToJSON;
//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