/* 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.
 */

import type { Pagination } from "./Pagination";
import { PaginationFromJSON, PaginationToJSON } from "./Pagination";
import type { UserLoginStage } from "./UserLoginStage";
import { UserLoginStageFromJSON, UserLoginStageToJSON } from "./UserLoginStage";

/**
 *
 * @export
 * @interface PaginatedUserLoginStageList
 */
export interface PaginatedUserLoginStageList {
    /**
     *
     * @type {Pagination}
     * @memberof PaginatedUserLoginStageList
     */
    pagination: Pagination;
    /**
     *
     * @type {Array<UserLoginStage>}
     * @memberof PaginatedUserLoginStageList
     */
    results: Array<UserLoginStage>;
    /**
     *
     * @type {{ [key: string]: any; }}
     * @memberof PaginatedUserLoginStageList
     */
    autocomplete: { [key: string]: any };
}

/**
 * Check if a given object implements the PaginatedUserLoginStageList interface.
 */
export function instanceOfPaginatedUserLoginStageList(
    value: object,
): value is PaginatedUserLoginStageList {
    if (!("pagination" in value) || value["pagination"] === undefined) return false;
    if (!("results" in value) || value["results"] === undefined) return false;
    if (!("autocomplete" in value) || value["autocomplete"] === undefined) return false;
    return true;
}

export function PaginatedUserLoginStageListFromJSON(json: any): PaginatedUserLoginStageList {
    return PaginatedUserLoginStageListFromJSONTyped(json, false);
}

export function PaginatedUserLoginStageListFromJSONTyped(
    json: any,
    ignoreDiscriminator: boolean,
): PaginatedUserLoginStageList {
    if (json == null) {
        return json;
    }
    return {
        pagination: PaginationFromJSON(json["pagination"]),
        results: (json["results"] as Array<any>).map(UserLoginStageFromJSON),
        autocomplete: json["autocomplete"],
    };
}

export function PaginatedUserLoginStageListToJSON(json: any): PaginatedUserLoginStageList {
    return PaginatedUserLoginStageListToJSONTyped(json, false);
}

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

    return {
        pagination: PaginationToJSON(value["pagination"]),
        results: (value["results"] as Array<any>).map(UserLoginStageToJSON),
        autocomplete: value["autocomplete"],
    };
}
