/* 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 SCIMProvider
 */
export interface SCIMProvider {
    /**
     * 
     * @type {number}
     * @memberof SCIMProvider
     */
    readonly pk: number;
    /**
     * 
     * @type {string}
     * @memberof SCIMProvider
     */
    name: string;
    /**
     * 
     * @type {Array<string>}
     * @memberof SCIMProvider
     */
    propertyMappings?: Array<string>;
    /**
     * Property mappings used for group creation/updating.
     * @type {Array<string>}
     * @memberof SCIMProvider
     */
    propertyMappingsGroup?: Array<string>;
    /**
     * Get object component so that we know how to edit the object
     * @type {string}
     * @memberof SCIMProvider
     */
    readonly component: string;
    /**
     * Internal application name, used in URLs.
     * @type {string}
     * @memberof SCIMProvider
     */
    readonly assignedBackchannelApplicationSlug: string;
    /**
     * Application's display Name.
     * @type {string}
     * @memberof SCIMProvider
     */
    readonly assignedBackchannelApplicationName: string;
    /**
     * Return object's verbose_name
     * @type {string}
     * @memberof SCIMProvider
     */
    readonly verboseName: string;
    /**
     * Return object's plural verbose_name
     * @type {string}
     * @memberof SCIMProvider
     */
    readonly verboseNamePlural: string;
    /**
     * Return internal model name
     * @type {string}
     * @memberof SCIMProvider
     */
    readonly metaModelName: string;
    /**
     * Base URL to SCIM requests, usually ends in /v2
     * @type {string}
     * @memberof SCIMProvider
     */
    url: string;
    /**
     * 
     * @type {boolean}
     * @memberof SCIMProvider
     */
    verifyCertificates?: boolean;
    /**
     * Authentication token
     * @type {string}
     * @memberof SCIMProvider
     */
    token: string;
    /**
     * Alter authentik behavior for vendor-specific SCIM implementations.
     * @type {CompatibilityModeEnum}
     * @memberof SCIMProvider
     */
    compatibilityMode?: CompatibilityModeEnum;
    /**
     * 
     * @type {boolean}
     * @memberof SCIMProvider
     */
    excludeUsersServiceAccount?: boolean;
    /**
     * 
     * @type {string}
     * @memberof SCIMProvider
     */
    filterGroup?: string | null;
    /**
     * When enabled, provider will not modify or create objects in the remote system.
     * @type {boolean}
     * @memberof SCIMProvider
     */
    dryRun?: boolean;
}



/**
 * Check if a given object implements the SCIMProvider interface.
 */
export function instanceOfSCIMProvider(value: object): value is SCIMProvider {
    if (!('pk' in value) || value['pk'] === undefined) return false;
    if (!('name' in value) || value['name'] === undefined) return false;
    if (!('component' in value) || value['component'] === undefined) return false;
    if (!('assignedBackchannelApplicationSlug' in value) || value['assignedBackchannelApplicationSlug'] === undefined) return false;
    if (!('assignedBackchannelApplicationName' in value) || value['assignedBackchannelApplicationName'] === 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;
    if (!('token' in value) || value['token'] === undefined) return false;
    return true;
}

export function SCIMProviderFromJSON(json: any): SCIMProvider {
    return SCIMProviderFromJSONTyped(json, false);
}

export function SCIMProviderFromJSONTyped(json: any, ignoreDiscriminator: boolean): SCIMProvider {
    if (json == null) {
        return json;
    }
    return {
        
        'pk': json['pk'],
        'name': json['name'],
        'propertyMappings': json['property_mappings'] == null ? undefined : json['property_mappings'],
        'propertyMappingsGroup': json['property_mappings_group'] == null ? undefined : json['property_mappings_group'],
        'component': json['component'],
        'assignedBackchannelApplicationSlug': json['assigned_backchannel_application_slug'],
        'assignedBackchannelApplicationName': json['assigned_backchannel_application_name'],
        'verboseName': json['verbose_name'],
        'verboseNamePlural': json['verbose_name_plural'],
        'metaModelName': json['meta_model_name'],
        '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 SCIMProviderToJSON(json: any): SCIMProvider {
    return SCIMProviderToJSONTyped(json, false);
}

export function SCIMProviderToJSONTyped(value?: Omit<SCIMProvider, 'pk'|'component'|'assigned_backchannel_application_slug'|'assigned_backchannel_application_name'|'verbose_name'|'verbose_name_plural'|'meta_model_name'> | 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'],
    };
}

