/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2026.5.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.
 */

/**
 * MicrosoftEntraProviderMapping Serializer
 * @export
 * @interface MicrosoftEntraProviderMappingRequest
 */
export interface MicrosoftEntraProviderMappingRequest {
    /**
     * 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 MicrosoftEntraProviderMappingRequest
     */
    managed?: string | null;
    /**
     *
     * @type {string}
     * @memberof MicrosoftEntraProviderMappingRequest
     */
    name: string;
    /**
     *
     * @type {string}
     * @memberof MicrosoftEntraProviderMappingRequest
     */
    expression: string;
}

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

export function MicrosoftEntraProviderMappingRequestFromJSON(
    json: any,
): MicrosoftEntraProviderMappingRequest {
    return MicrosoftEntraProviderMappingRequestFromJSONTyped(json, false);
}

export function MicrosoftEntraProviderMappingRequestFromJSONTyped(
    json: any,
    ignoreDiscriminator: boolean,
): MicrosoftEntraProviderMappingRequest {
    if (json == null) {
        return json;
    }
    return {
        managed: json["managed"] == null ? undefined : json["managed"],
        name: json["name"],
        expression: json["expression"],
    };
}

export function MicrosoftEntraProviderMappingRequestToJSON(
    json: any,
): MicrosoftEntraProviderMappingRequest {
    return MicrosoftEntraProviderMappingRequestToJSONTyped(json, false);
}

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

    return {
        managed: value["managed"],
        name: value["name"],
        expression: value["expression"],
    };
}
