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

/**
 * AuthenticatorStaticStage Serializer
 * @export
 * @interface PatchedAuthenticatorStaticStageRequest
 */
export interface PatchedAuthenticatorStaticStageRequest {
    /**
     *
     * @type {string}
     * @memberof PatchedAuthenticatorStaticStageRequest
     */
    name?: string;
    /**
     * Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage.
     * @type {string}
     * @memberof PatchedAuthenticatorStaticStageRequest
     */
    configureFlow?: string | null;
    /**
     *
     * @type {string}
     * @memberof PatchedAuthenticatorStaticStageRequest
     */
    friendlyName?: string;
    /**
     *
     * @type {number}
     * @memberof PatchedAuthenticatorStaticStageRequest
     */
    tokenCount?: number;
    /**
     *
     * @type {number}
     * @memberof PatchedAuthenticatorStaticStageRequest
     */
    tokenLength?: number;
}

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

export function PatchedAuthenticatorStaticStageRequestFromJSON(
    json: any,
): PatchedAuthenticatorStaticStageRequest {
    return PatchedAuthenticatorStaticStageRequestFromJSONTyped(json, false);
}

export function PatchedAuthenticatorStaticStageRequestFromJSONTyped(
    json: any,
    ignoreDiscriminator: boolean,
): PatchedAuthenticatorStaticStageRequest {
    if (json == null) {
        return json;
    }
    return {
        name: json["name"] == null ? undefined : json["name"],
        configureFlow: json["configure_flow"] == null ? undefined : json["configure_flow"],
        friendlyName: json["friendly_name"] == null ? undefined : json["friendly_name"],
        tokenCount: json["token_count"] == null ? undefined : json["token_count"],
        tokenLength: json["token_length"] == null ? undefined : json["token_length"],
    };
}

export function PatchedAuthenticatorStaticStageRequestToJSON(
    json: any,
): PatchedAuthenticatorStaticStageRequest {
    return PatchedAuthenticatorStaticStageRequestToJSONTyped(json, false);
}

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

    return {
        name: value["name"],
        configure_flow: value["configureFlow"],
        friendly_name: value["friendlyName"],
        token_count: value["tokenCount"],
        token_length: value["tokenLength"],
    };
}
