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

/**
 * InvitationStage Serializer
 * @export
 * @interface PatchedInvitationStageRequest
 */
export interface PatchedInvitationStageRequest {
    /**
     *
     * @type {string}
     * @memberof PatchedInvitationStageRequest
     */
    name?: string;
    /**
     * If this flag is set, this Stage will jump to the next Stage when no Invitation is given. By default this Stage will cancel the Flow when no invitation is given.
     * @type {boolean}
     * @memberof PatchedInvitationStageRequest
     */
    continueFlowWithoutInvitation?: boolean;
}

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

export function PatchedInvitationStageRequestFromJSON(json: any): PatchedInvitationStageRequest {
    return PatchedInvitationStageRequestFromJSONTyped(json, false);
}

export function PatchedInvitationStageRequestFromJSONTyped(
    json: any,
    ignoreDiscriminator: boolean,
): PatchedInvitationStageRequest {
    if (json == null) {
        return json;
    }
    return {
        name: json["name"] == null ? undefined : json["name"],
        continueFlowWithoutInvitation:
            json["continue_flow_without_invitation"] == null
                ? undefined
                : json["continue_flow_without_invitation"],
    };
}

export function PatchedInvitationStageRequestToJSON(json: any): PatchedInvitationStageRequest {
    return PatchedInvitationStageRequestToJSONTyped(json, false);
}

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

    return {
        name: value["name"],
        continue_flow_without_invitation: value["continueFlowWithoutInvitation"],
    };
}
