"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.CreditPlanToJSON = exports.CreditPlanFromJSONTyped = exports.CreditPlanFromJSON = void 0;
const runtime_1 = require("../runtime");
function CreditPlanFromJSON(json) {
    return CreditPlanFromJSONTyped(json, false);
}
exports.CreditPlanFromJSON = CreditPlanFromJSON;
function CreditPlanFromJSONTyped(json, ignoreDiscriminator) {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        'uuid': !(0, runtime_1.exists)(json, 'uuid') ? undefined : json['uuid'],
        'amount': json['amount'],
        'price': json['price'],
        'description': !(0, runtime_1.exists)(json, 'description') ? undefined : json['description'],
        'grantExpirationLength': !(0, runtime_1.exists)(json, 'grant_expiration_length') ? undefined : json['grant_expiration_length'],
        'grantExpirationUnit': !(0, runtime_1.exists)(json, 'grant_expiration_unit') ? undefined : json['grant_expiration_unit'],
        'intervalBetweenGrants': !(0, runtime_1.exists)(json, 'interval_between_grants') ? undefined : json['interval_between_grants'],
        'intervalBetweenPayments': !(0, runtime_1.exists)(json, 'interval_between_payments') ? undefined : json['interval_between_payments'],
        'paymentsPerGrant': json['payments_per_grant'],
    };
}
exports.CreditPlanFromJSONTyped = CreditPlanFromJSONTyped;
function CreditPlanToJSON(value) {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        'uuid': value.uuid,
        'amount': value.amount,
        'price': value.price,
        'description': value.description,
        'grant_expiration_length': value.grantExpirationLength,
        'grant_expiration_unit': value.grantExpirationUnit,
        'interval_between_grants': value.intervalBetweenGrants,
        'interval_between_payments': value.intervalBetweenPayments,
        'payments_per_grant': value.paymentsPerGrant,
    };
}
exports.CreditPlanToJSON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