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

/**
 * FleetConnector Serializer
 * @export
 * @interface FleetConnector
 */
export interface FleetConnector {
    /**
     *
     * @type {string}
     * @memberof FleetConnector
     */
    connectorUuid?: string;
    /**
     *
     * @type {string}
     * @memberof FleetConnector
     */
    name: string;
    /**
     *
     * @type {boolean}
     * @memberof FleetConnector
     */
    enabled?: boolean;
    /**
     * Get object component so that we know how to edit the object
     * @type {string}
     * @memberof FleetConnector
     */
    readonly component: string;
    /**
     * Return object's verbose_name
     * @type {string}
     * @memberof FleetConnector
     */
    readonly verboseName: string;
    /**
     * Return object's plural verbose_name
     * @type {string}
     * @memberof FleetConnector
     */
    readonly verboseNamePlural: string;
    /**
     * Return internal model name
     * @type {string}
     * @memberof FleetConnector
     */
    readonly metaModelName: string;
    /**
     *
     * @type {string}
     * @memberof FleetConnector
     */
    url: string;
    /**
     * Configure additional headers to be sent. Mapping should return a dictionary of key-value pairs
     * @type {string}
     * @memberof FleetConnector
     */
    headersMapping?: string | null;
    /**
     *
     * @type {boolean}
     * @memberof FleetConnector
     */
    mapUsers?: boolean;
    /**
     *
     * @type {boolean}
     * @memberof FleetConnector
     */
    mapTeamsAccessGroup?: boolean;
}

/**
 * Check if a given object implements the FleetConnector interface.
 */
export function instanceOfFleetConnector(value: object): value is FleetConnector {
    if (!("name" in value) || value["name"] === undefined) return false;
    if (!("component" in value) || value["component"] === undefined) return false;
    if (!("verboseName" in value) || value["verboseName"] === undefined) return false;
    if (!("verboseNamePlural" in value) || value["verboseNamePlural"] === undefined) return false;
    if (!("metaModelName" in value) || value["metaModelName"] === undefined) return false;
    if (!("url" in value) || value["url"] === undefined) return false;
    return true;
}

export function FleetConnectorFromJSON(json: any): FleetConnector {
    return FleetConnectorFromJSONTyped(json, false);
}

export function FleetConnectorFromJSONTyped(
    json: any,
    ignoreDiscriminator: boolean,
): FleetConnector {
    if (json == null) {
        return json;
    }
    return {
        connectorUuid: json["connector_uuid"] == null ? undefined : json["connector_uuid"],
        name: json["name"],
        enabled: json["enabled"] == null ? undefined : json["enabled"],
        component: json["component"],
        verboseName: json["verbose_name"],
        verboseNamePlural: json["verbose_name_plural"],
        metaModelName: json["meta_model_name"],
        url: json["url"],
        headersMapping: json["headers_mapping"] == null ? undefined : json["headers_mapping"],
        mapUsers: json["map_users"] == null ? undefined : json["map_users"],
        mapTeamsAccessGroup:
            json["map_teams_access_group"] == null ? undefined : json["map_teams_access_group"],
    };
}

export function FleetConnectorToJSON(json: any): FleetConnector {
    return FleetConnectorToJSONTyped(json, false);
}

export function FleetConnectorToJSONTyped(
    value?: Omit<
        FleetConnector,
        "component" | "verbose_name" | "verbose_name_plural" | "meta_model_name"
    > | null,
    ignoreDiscriminator: boolean = false,
): any {
    if (value == null) {
        return value;
    }

    return {
        connector_uuid: value["connectorUuid"],
        name: value["name"],
        enabled: value["enabled"],
        url: value["url"],
        headers_mapping: value["headersMapping"],
        map_users: value["mapUsers"],
        map_teams_access_group: value["mapTeamsAccessGroup"],
    };
}
