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

/**
 * SCIMSourceUser Serializer
 * @export
 * @interface SCIMSourceUserRequest
 */
export interface SCIMSourceUserRequest {
    /**
     *
     * @type {string}
     * @memberof SCIMSourceUserRequest
     */
    id?: string;
    /**
     *
     * @type {string}
     * @memberof SCIMSourceUserRequest
     */
    externalId: string;
    /**
     *
     * @type {number}
     * @memberof SCIMSourceUserRequest
     */
    user: number;
    /**
     *
     * @type {string}
     * @memberof SCIMSourceUserRequest
     */
    source: string;
    /**
     *
     * @type {{ [key: string]: any; }}
     * @memberof SCIMSourceUserRequest
     */
    attributes?: { [key: string]: any };
}

/**
 * Check if a given object implements the SCIMSourceUserRequest interface.
 */
export function instanceOfSCIMSourceUserRequest(value: object): value is SCIMSourceUserRequest {
    if (!("externalId" in value) || value["externalId"] === undefined) return false;
    if (!("user" in value) || value["user"] === undefined) return false;
    if (!("source" in value) || value["source"] === undefined) return false;
    return true;
}

export function SCIMSourceUserRequestFromJSON(json: any): SCIMSourceUserRequest {
    return SCIMSourceUserRequestFromJSONTyped(json, false);
}

export function SCIMSourceUserRequestFromJSONTyped(
    json: any,
    ignoreDiscriminator: boolean,
): SCIMSourceUserRequest {
    if (json == null) {
        return json;
    }
    return {
        id: json["id"] == null ? undefined : json["id"],
        externalId: json["external_id"],
        user: json["user"],
        source: json["source"],
        attributes: json["attributes"] == null ? undefined : json["attributes"],
    };
}

export function SCIMSourceUserRequestToJSON(json: any): SCIMSourceUserRequest {
    return SCIMSourceUserRequestToJSONTyped(json, false);
}

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

    return {
        id: value["id"],
        external_id: value["externalId"],
        user: value["user"],
        source: value["source"],
        attributes: value["attributes"],
    };
}
