/* 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.
 */

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

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

export function PatchedOAuthSourcePropertyMappingRequestFromJSON(
    json: any,
): PatchedOAuthSourcePropertyMappingRequest {
    return PatchedOAuthSourcePropertyMappingRequestFromJSONTyped(json, false);
}

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

export function PatchedOAuthSourcePropertyMappingRequestToJSON(
    json: any,
): PatchedOAuthSourcePropertyMappingRequest {
    return PatchedOAuthSourcePropertyMappingRequestToJSONTyped(json, false);
}

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

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