/* 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 { AgentConnector } from "./AgentConnector";
import { AgentConnectorFromJSON, AgentConnectorToJSON } from "./AgentConnector";
import type { Pagination } from "./Pagination";
import { PaginationFromJSON, PaginationToJSON } from "./Pagination";

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

/**
 * Check if a given object implements the PaginatedAgentConnectorList interface.
 */
export function instanceOfPaginatedAgentConnectorList(
    value: object,
): value is PaginatedAgentConnectorList {
    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 PaginatedAgentConnectorListFromJSON(json: any): PaginatedAgentConnectorList {
    return PaginatedAgentConnectorListFromJSONTyped(json, false);
}

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

export function PaginatedAgentConnectorListToJSON(json: any): PaginatedAgentConnectorList {
    return PaginatedAgentConnectorListToJSONTyped(json, false);
}

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

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