/* 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';
/**
 * SAMLPropertyMapping Serializer
 * @export
 * @interface SAMLPropertyMapping
 */
export interface SAMLPropertyMapping {
    /**
     * 
     * @type {string}
     * @memberof SAMLPropertyMapping
     */
    readonly pk: string;
    /**
     * Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update.
     * @type {string}
     * @memberof SAMLPropertyMapping
     */
    managed?: string | null;
    /**
     * 
     * @type {string}
     * @memberof SAMLPropertyMapping
     */
    name: string;
    /**
     * 
     * @type {string}
     * @memberof SAMLPropertyMapping
     */
    expression: string;
    /**
     * Get object's component so that we know how to edit the object
     * @type {string}
     * @memberof SAMLPropertyMapping
     */
    readonly component: string;
    /**
     * Return object's verbose_name
     * @type {string}
     * @memberof SAMLPropertyMapping
     */
    readonly verboseName: string;
    /**
     * Return object's plural verbose_name
     * @type {string}
     * @memberof SAMLPropertyMapping
     */
    readonly verboseNamePlural: string;
    /**
     * Return internal model name
     * @type {string}
     * @memberof SAMLPropertyMapping
     */
    readonly metaModelName: string;
    /**
     * 
     * @type {string}
     * @memberof SAMLPropertyMapping
     */
    samlName: string;
    /**
     * 
     * @type {string}
     * @memberof SAMLPropertyMapping
     */
    friendlyName?: string | null;
}

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

export function SAMLPropertyMappingFromJSON(json: any): SAMLPropertyMapping {
    return SAMLPropertyMappingFromJSONTyped(json, false);
}

export function SAMLPropertyMappingFromJSONTyped(json: any, ignoreDiscriminator: boolean): SAMLPropertyMapping {
    if (json == null) {
        return json;
    }
    return {
        
        'pk': json['pk'],
        'managed': json['managed'] == null ? undefined : json['managed'],
        'name': json['name'],
        'expression': json['expression'],
        'component': json['component'],
        'verboseName': json['verbose_name'],
        'verboseNamePlural': json['verbose_name_plural'],
        'metaModelName': json['meta_model_name'],
        'samlName': json['saml_name'],
        'friendlyName': json['friendly_name'] == null ? undefined : json['friendly_name'],
    };
}

export function SAMLPropertyMappingToJSON(json: any): SAMLPropertyMapping {
    return SAMLPropertyMappingToJSONTyped(json, false);
}

export function SAMLPropertyMappingToJSONTyped(value?: Omit<SAMLPropertyMapping, 'pk'|'component'|'verbose_name'|'verbose_name_plural'|'meta_model_name'> | null, ignoreDiscriminator: boolean = false): any {
    if (value == null) {
        return value;
    }

    return {
        
        'managed': value['managed'],
        'name': value['name'],
        'expression': value['expression'],
        'saml_name': value['samlName'],
        'friendly_name': value['friendlyName'],
    };
}

