/* 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 InvitationStageRequest
 */
export interface InvitationStageRequest {
    /**
     *
     * @type {string}
     * @memberof InvitationStageRequest
     */
    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 InvitationStageRequest
     */
    continueFlowWithoutInvitation?: boolean;
}

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

export function InvitationStageRequestFromJSON(json: any): InvitationStageRequest {
    return InvitationStageRequestFromJSONTyped(json, false);
}

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

export function InvitationStageRequestToJSON(json: any): InvitationStageRequest {
    return InvitationStageRequestToJSONTyped(json, false);
}

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

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