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

/**
 * SCIMSource Serializer
 * @export
 * @interface SCIMSourceRequest
 */
export interface SCIMSourceRequest {
    /**
     * Source's display Name.
     * @type {string}
     * @memberof SCIMSourceRequest
     */
    name: string;
    /**
     * Internal source name, used in URLs.
     * @type {string}
     * @memberof SCIMSourceRequest
     */
    slug: string;
    /**
     *
     * @type {boolean}
     * @memberof SCIMSourceRequest
     */
    enabled?: boolean;
    /**
     *
     * @type {Array<string>}
     * @memberof SCIMSourceRequest
     */
    userPropertyMappings?: Array<string>;
    /**
     *
     * @type {Array<string>}
     * @memberof SCIMSourceRequest
     */
    groupPropertyMappings?: Array<string>;
    /**
     *
     * @type {string}
     * @memberof SCIMSourceRequest
     */
    userPathTemplate?: string;
}

/**
 * Check if a given object implements the SCIMSourceRequest interface.
 */
export function instanceOfSCIMSourceRequest(value: object): value is SCIMSourceRequest {
    if (!("name" in value) || value["name"] === undefined) return false;
    if (!("slug" in value) || value["slug"] === undefined) return false;
    return true;
}

export function SCIMSourceRequestFromJSON(json: any): SCIMSourceRequest {
    return SCIMSourceRequestFromJSONTyped(json, false);
}

export function SCIMSourceRequestFromJSONTyped(
    json: any,
    ignoreDiscriminator: boolean,
): SCIMSourceRequest {
    if (json == null) {
        return json;
    }
    return {
        name: json["name"],
        slug: json["slug"],
        enabled: json["enabled"] == null ? undefined : json["enabled"],
        userPropertyMappings:
            json["user_property_mappings"] == null ? undefined : json["user_property_mappings"],
        groupPropertyMappings:
            json["group_property_mappings"] == null ? undefined : json["group_property_mappings"],
        userPathTemplate:
            json["user_path_template"] == null ? undefined : json["user_path_template"],
    };
}

export function SCIMSourceRequestToJSON(json: any): SCIMSourceRequest {
    return SCIMSourceRequestToJSONTyped(json, false);
}

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

    return {
        name: value["name"],
        slug: value["slug"],
        enabled: value["enabled"],
        user_property_mappings: value["userPropertyMappings"],
        group_property_mappings: value["groupPropertyMappings"],
        user_path_template: value["userPathTemplate"],
    };
}
