/* 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';
/**
 * ScopeMapping Serializer
 * @export
 * @interface ScopeMappingRequest
 */
export interface ScopeMappingRequest {
    /**
     * 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 ScopeMappingRequest
     */
    managed?: string | null;
    /**
     * 
     * @type {string}
     * @memberof ScopeMappingRequest
     */
    name: string;
    /**
     * 
     * @type {string}
     * @memberof ScopeMappingRequest
     */
    expression: string;
    /**
     * Scope name requested by the client
     * @type {string}
     * @memberof ScopeMappingRequest
     */
    scopeName: string;
    /**
     * Description shown to the user when consenting. If left empty, the user won't be informed.
     * @type {string}
     * @memberof ScopeMappingRequest
     */
    description?: string;
}

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

export function ScopeMappingRequestFromJSON(json: any): ScopeMappingRequest {
    return ScopeMappingRequestFromJSONTyped(json, false);
}

export function ScopeMappingRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScopeMappingRequest {
    if (json == null) {
        return json;
    }
    return {
        
        'managed': json['managed'] == null ? undefined : json['managed'],
        'name': json['name'],
        'expression': json['expression'],
        'scopeName': json['scope_name'],
        'description': json['description'] == null ? undefined : json['description'],
    };
}

export function ScopeMappingRequestToJSON(json: any): ScopeMappingRequest {
    return ScopeMappingRequestToJSONTyped(json, false);
}

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

    return {
        
        'managed': value['managed'],
        'name': value['name'],
        'expression': value['expression'],
        'scope_name': value['scopeName'],
        'description': value['description'],
    };
}

