"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2026.2.2-rc1
 * 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.instanceOfSyncStatus = instanceOfSyncStatus;
exports.SyncStatusFromJSON = SyncStatusFromJSON;
exports.SyncStatusFromJSONTyped = SyncStatusFromJSONTyped;
exports.SyncStatusToJSON = SyncStatusToJSON;
exports.SyncStatusToJSONTyped = SyncStatusToJSONTyped;
const TaskAggregatedStatusEnum_1 = require("./TaskAggregatedStatusEnum");
/**
 * Check if a given object implements the SyncStatus interface.
 */
function instanceOfSyncStatus(value) {
    if (!('isRunning' in value) || value['isRunning'] === undefined)
        return false;
    return true;
}
function SyncStatusFromJSON(json) {
    return SyncStatusFromJSONTyped(json, false);
}
function SyncStatusFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'isRunning': json['is_running'],
        'lastSuccessfulSync': json['last_successful_sync'] == null ? undefined : (new Date(json['last_successful_sync'])),
        'lastSyncStatus': json['last_sync_status'] == null ? undefined : (0, TaskAggregatedStatusEnum_1.TaskAggregatedStatusEnumFromJSON)(json['last_sync_status']),
    };
}
function SyncStatusToJSON(json) {
    return SyncStatusToJSONTyped(json, false);
}
function SyncStatusToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'is_running': value['isRunning'],
        'last_successful_sync': value['lastSuccessfulSync'] == null ? value['lastSuccessfulSync'] : value['lastSuccessfulSync'].toISOString(),
        'last_sync_status': (0, TaskAggregatedStatusEnum_1.TaskAggregatedStatusEnumToJSON)(value['lastSyncStatus']),
    };
}
//# sourceMappingURL=SyncStatus.js.map