/* 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 PatchedFleetConnectorRequest
 */
export interface PatchedFleetConnectorRequest {
    /**
     *
     * @type {string}
     * @memberof PatchedFleetConnectorRequest
     */
    connectorUuid?: string;
    /**
     *
     * @type {string}
     * @memberof PatchedFleetConnectorRequest
     */
    name?: string;
    /**
     *
     * @type {boolean}
     * @memberof PatchedFleetConnectorRequest
     */
    enabled?: boolean;
    /**
     *
     * @type {string}
     * @memberof PatchedFleetConnectorRequest
     */
    url?: string;
    /**
     *
     * @type {string}
     * @memberof PatchedFleetConnectorRequest
     */
    token?: string;
    /**
     * Configure additional headers to be sent. Mapping should return a dictionary of key-value pairs
     * @type {string}
     * @memberof PatchedFleetConnectorRequest
     */
    headersMapping?: string | null;
    /**
     *
     * @type {boolean}
     * @memberof PatchedFleetConnectorRequest
     */
    mapUsers?: boolean;
    /**
     *
     * @type {boolean}
     * @memberof PatchedFleetConnectorRequest
     */
    mapTeamsAccessGroup?: boolean;
}

/**
 * Check if a given object implements the PatchedFleetConnectorRequest interface.
 */
export function instanceOfPatchedFleetConnectorRequest(
    value: object,
): value is PatchedFleetConnectorRequest {
    return true;
}

export function PatchedFleetConnectorRequestFromJSON(json: any): PatchedFleetConnectorRequest {
    return PatchedFleetConnectorRequestFromJSONTyped(json, false);
}

export function PatchedFleetConnectorRequestFromJSONTyped(
    json: any,
    ignoreDiscriminator: boolean,
): PatchedFleetConnectorRequest {
    if (json == null) {
        return json;
    }
    return {
        connectorUuid: json["connector_uuid"] == null ? undefined : json["connector_uuid"],
        name: json["name"] == null ? undefined : json["name"],
        enabled: json["enabled"] == null ? undefined : json["enabled"],
        url: json["url"] == null ? undefined : json["url"],
        token: json["token"] == null ? undefined : json["token"],
        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 PatchedFleetConnectorRequestToJSON(json: any): PatchedFleetConnectorRequest {
    return PatchedFleetConnectorRequestToJSONTyped(json, false);
}

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

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