/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2026.5.0-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.
 */

/**
 * Summary of registered devices
 * @export
 * @interface DeviceSummary
 */
export interface DeviceSummary {
    /**
     *
     * @type {number}
     * @memberof DeviceSummary
     */
    totalCount: number;
    /**
     *
     * @type {number}
     * @memberof DeviceSummary
     */
    unreachableCount: number;
    /**
     *
     * @type {number}
     * @memberof DeviceSummary
     */
    outdatedAgentCount: number;
}

/**
 * Check if a given object implements the DeviceSummary interface.
 */
export function instanceOfDeviceSummary(value: object): value is DeviceSummary {
    if (!("totalCount" in value) || value["totalCount"] === undefined) return false;
    if (!("unreachableCount" in value) || value["unreachableCount"] === undefined) return false;
    if (!("outdatedAgentCount" in value) || value["outdatedAgentCount"] === undefined) return false;
    return true;
}

export function DeviceSummaryFromJSON(json: any): DeviceSummary {
    return DeviceSummaryFromJSONTyped(json, false);
}

export function DeviceSummaryFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeviceSummary {
    if (json == null) {
        return json;
    }
    return {
        totalCount: json["total_count"],
        unreachableCount: json["unreachable_count"],
        outdatedAgentCount: json["outdated_agent_count"],
    };
}

export function DeviceSummaryToJSON(json: any): DeviceSummary {
    return DeviceSummaryToJSONTyped(json, false);
}

export function DeviceSummaryToJSONTyped(
    value?: DeviceSummary | null,
    ignoreDiscriminator: boolean = false,
): any {
    if (value == null) {
        return value;
    }

    return {
        total_count: value["totalCount"],
        unreachable_count: value["unreachableCount"],
        outdated_agent_count: value["outdatedAgentCount"],
    };
}
