/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2025.10.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 { mapValues } from '../runtime';
import type { CompatibilityModeEnum } from './CompatibilityModeEnum';
import {
    CompatibilityModeEnumFromJSON,
    CompatibilityModeEnumFromJSONTyped,
    CompatibilityModeEnumToJSON,
    CompatibilityModeEnumToJSONTyped,
} from './CompatibilityModeEnum';

/**
 * SCIMProvider Serializer
 * @export
 * @interface SCIMProviderRequest
 */
export interface SCIMProviderRequest {
    /**
     * 
     * @type {string}
     * @memberof SCIMProviderRequest
     */
    name: string;
    /**
     * 
     * @type {Array<string>}
     * @memberof SCIMProviderRequest
     */
    propertyMappings?: Array<string>;
    /**
     * Property mappings used for group creation/updating.
     * @type {Array<string>}
     * @memberof SCIMProviderRequest
     */
    propertyMappingsGroup?: Array<string>;
    /**
     * Base URL to SCIM requests, usually ends in /v2
     * @type {string}
     * @memberof SCIMProviderRequest
     */
    url: string;
    /**
     * 
     * @type {boolean}
     * @memberof SCIMProviderRequest
     */
    verifyCertificates?: boolean;
    /**
     * Authentication token
     * @type {string}
     * @memberof SCIMProviderRequest
     */
    token: string;
    /**
     * Alter authentik behavior for vendor-specific SCIM implementations.
     * @type {CompatibilityModeEnum}
     * @memberof SCIMProviderRequest
     */
    compatibilityMode?: CompatibilityModeEnum;
    /**
     * 
     * @type {boolean}
     * @memberof SCIMProviderRequest
     */
    excludeUsersServiceAccount?: boolean;
    /**
     * 
     * @type {string}
     * @memberof SCIMProviderRequest
     */
    filterGroup?: string | null;
    /**
     * When enabled, provider will not modify or create objects in the remote system.
     * @type {boolean}
     * @memberof SCIMProviderRequest
     */
    dryRun?: boolean;
}



/**
 * Check if a given object implements the SCIMProviderRequest interface.
 */
export function instanceOfSCIMProviderRequest(value: object): value is SCIMProviderRequest {
    if (!('name' in value) || value['name'] === undefined) return false;
    if (!('url' in value) || value['url'] === undefined) return false;
    if (!('token' in value) || value['token'] === undefined) return false;
    return true;
}

export function SCIMProviderRequestFromJSON(json: any): SCIMProviderRequest {
    return SCIMProviderRequestFromJSONTyped(json, false);
}

export function SCIMProviderRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SCIMProviderRequest {
    if (json == null) {
        return json;
    }
    return {
        
        'name': json['name'],
        'propertyMappings': json['property_mappings'] == null ? undefined : json['property_mappings'],
        'propertyMappingsGroup': json['property_mappings_group'] == null ? undefined : json['property_mappings_group'],
        'url': json['url'],
        'verifyCertificates': json['verify_certificates'] == null ? undefined : json['verify_certificates'],
        'token': json['token'],
        'compatibilityMode': json['compatibility_mode'] == null ? undefined : CompatibilityModeEnumFromJSON(json['compatibility_mode']),
        'excludeUsersServiceAccount': json['exclude_users_service_account'] == null ? undefined : json['exclude_users_service_account'],
        'filterGroup': json['filter_group'] == null ? undefined : json['filter_group'],
        'dryRun': json['dry_run'] == null ? undefined : json['dry_run'],
    };
}

export function SCIMProviderRequestToJSON(json: any): SCIMProviderRequest {
    return SCIMProviderRequestToJSONTyped(json, false);
}

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

    return {
        
        'name': value['name'],
        'property_mappings': value['propertyMappings'],
        'property_mappings_group': value['propertyMappingsGroup'],
        'url': value['url'],
        'verify_certificates': value['verifyCertificates'],
        'token': value['token'],
        'compatibility_mode': CompatibilityModeEnumToJSON(value['compatibilityMode']),
        'exclude_users_service_account': value['excludeUsersServiceAccount'],
        'filter_group': value['filterGroup'],
        'dry_run': value['dryRun'],
    };
}

