/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2025.12.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';
import type { SCIMAuthenticationModeEnum } from './SCIMAuthenticationModeEnum';
import {
    SCIMAuthenticationModeEnumFromJSON,
    SCIMAuthenticationModeEnumFromJSONTyped,
    SCIMAuthenticationModeEnumToJSON,
    SCIMAuthenticationModeEnumToJSONTyped,
} from './SCIMAuthenticationModeEnum';

/**
 * SCIMProvider Serializer
 * @export
 * @interface PatchedSCIMProviderRequest
 */
export interface PatchedSCIMProviderRequest {
    /**
     * 
     * @type {string}
     * @memberof PatchedSCIMProviderRequest
     */
    name?: string;
    /**
     * 
     * @type {Array<string>}
     * @memberof PatchedSCIMProviderRequest
     */
    propertyMappings?: Array<string>;
    /**
     * Property mappings used for group creation/updating.
     * @type {Array<string>}
     * @memberof PatchedSCIMProviderRequest
     */
    propertyMappingsGroup?: Array<string>;
    /**
     * Base URL to SCIM requests, usually ends in /v2
     * @type {string}
     * @memberof PatchedSCIMProviderRequest
     */
    url?: string;
    /**
     * 
     * @type {boolean}
     * @memberof PatchedSCIMProviderRequest
     */
    verifyCertificates?: boolean;
    /**
     * Authentication token
     * @type {string}
     * @memberof PatchedSCIMProviderRequest
     */
    token?: string;
    /**
     * 
     * @type {SCIMAuthenticationModeEnum}
     * @memberof PatchedSCIMProviderRequest
     */
    authMode?: SCIMAuthenticationModeEnum;
    /**
     * OAuth Source used for authentication
     * @type {string}
     * @memberof PatchedSCIMProviderRequest
     */
    authOauth?: string | null;
    /**
     * Additional OAuth parameters, such as grant_type
     * @type {{ [key: string]: any; }}
     * @memberof PatchedSCIMProviderRequest
     */
    authOauthParams?: { [key: string]: any; };
    /**
     * Alter authentik behavior for vendor-specific SCIM implementations.
     * @type {CompatibilityModeEnum}
     * @memberof PatchedSCIMProviderRequest
     */
    compatibilityMode?: CompatibilityModeEnum;
    /**
     * 
     * @type {boolean}
     * @memberof PatchedSCIMProviderRequest
     */
    excludeUsersServiceAccount?: boolean;
    /**
     * 
     * @type {string}
     * @memberof PatchedSCIMProviderRequest
     */
    filterGroup?: string | null;
    /**
     * When enabled, provider will not modify or create objects in the remote system.
     * @type {boolean}
     * @memberof PatchedSCIMProviderRequest
     */
    dryRun?: boolean;
}



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

export function PatchedSCIMProviderRequestFromJSON(json: any): PatchedSCIMProviderRequest {
    return PatchedSCIMProviderRequestFromJSONTyped(json, false);
}

export function PatchedSCIMProviderRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedSCIMProviderRequest {
    if (json == null) {
        return json;
    }
    return {
        
        'name': json['name'] == null ? undefined : 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'] == null ? undefined : json['url'],
        'verifyCertificates': json['verify_certificates'] == null ? undefined : json['verify_certificates'],
        'token': json['token'] == null ? undefined : json['token'],
        'authMode': json['auth_mode'] == null ? undefined : SCIMAuthenticationModeEnumFromJSON(json['auth_mode']),
        'authOauth': json['auth_oauth'] == null ? undefined : json['auth_oauth'],
        'authOauthParams': json['auth_oauth_params'] == null ? undefined : json['auth_oauth_params'],
        '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 PatchedSCIMProviderRequestToJSON(json: any): PatchedSCIMProviderRequest {
    return PatchedSCIMProviderRequestToJSONTyped(json, false);
}

export function PatchedSCIMProviderRequestToJSONTyped(value?: PatchedSCIMProviderRequest | 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'],
        'auth_mode': SCIMAuthenticationModeEnumToJSON(value['authMode']),
        'auth_oauth': value['authOauth'],
        'auth_oauth_params': value['authOauthParams'],
        'compatibility_mode': CompatibilityModeEnumToJSON(value['compatibilityMode']),
        'exclude_users_service_account': value['excludeUsersServiceAccount'],
        'filter_group': value['filterGroup'],
        'dry_run': value['dryRun'],
    };
}

