"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2026.2.0-rc5
 * Contact: hello@goauthentik.io
 *
 * 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.instanceOfLicenseSummary = instanceOfLicenseSummary;
exports.LicenseSummaryFromJSON = LicenseSummaryFromJSON;
exports.LicenseSummaryFromJSONTyped = LicenseSummaryFromJSONTyped;
exports.LicenseSummaryToJSON = LicenseSummaryToJSON;
exports.LicenseSummaryToJSONTyped = LicenseSummaryToJSONTyped;
const LicenseSummaryStatusEnum_1 = require("./LicenseSummaryStatusEnum");
const LicenseFlagsEnum_1 = require("./LicenseFlagsEnum");
/**
 * Check if a given object implements the LicenseSummary interface.
 */
function instanceOfLicenseSummary(value) {
    if (!('internalUsers' in value) || value['internalUsers'] === undefined)
        return false;
    if (!('externalUsers' in value) || value['externalUsers'] === undefined)
        return false;
    if (!('status' in value) || value['status'] === undefined)
        return false;
    if (!('latestValid' in value) || value['latestValid'] === undefined)
        return false;
    if (!('licenseFlags' in value) || value['licenseFlags'] === undefined)
        return false;
    return true;
}
function LicenseSummaryFromJSON(json) {
    return LicenseSummaryFromJSONTyped(json, false);
}
function LicenseSummaryFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'internalUsers': json['internal_users'],
        'externalUsers': json['external_users'],
        'status': (0, LicenseSummaryStatusEnum_1.LicenseSummaryStatusEnumFromJSON)(json['status']),
        'latestValid': (new Date(json['latest_valid'])),
        'licenseFlags': (json['license_flags'].map(LicenseFlagsEnum_1.LicenseFlagsEnumFromJSON)),
    };
}
function LicenseSummaryToJSON(json) {
    return LicenseSummaryToJSONTyped(json, false);
}
function LicenseSummaryToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'internal_users': value['internalUsers'],
        'external_users': value['externalUsers'],
        'status': (0, LicenseSummaryStatusEnum_1.LicenseSummaryStatusEnumToJSON)(value['status']),
        'latest_valid': value['latestValid'].toISOString(),
        'license_flags': (value['licenseFlags'].map(LicenseFlagsEnum_1.LicenseFlagsEnumToJSON)),
    };
}
//# sourceMappingURL=LicenseSummary.js.map