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

/**
 *
 * @export
 * @interface PatchedSettingsRequestFlags
 */
export interface PatchedSettingsRequestFlags {
    /**
     * Configure if applications without any policy/group/user bindings should be accessible to any user.
     * @type {boolean}
     * @memberof PatchedSettingsRequestFlags
     */
    coreDefaultAppAccess: boolean;
    /**
     * Include additional information in audit logs, may incur a performance penalty.
     * @type {boolean}
     * @memberof PatchedSettingsRequestFlags
     */
    enterpriseAuditIncludeExpandedDiff: boolean;
    /**
     * Upon successful authentication, re-start authentication in other open tabs.
     * @type {boolean}
     * @memberof PatchedSettingsRequestFlags
     */
    flowsContinuousLogin: boolean;
    /**
     * Refresh other tabs after successful authentication.
     * @type {boolean}
     * @memberof PatchedSettingsRequestFlags
     */
    flowsRefreshOthers: boolean;
}

/**
 * Check if a given object implements the PatchedSettingsRequestFlags interface.
 */
export function instanceOfPatchedSettingsRequestFlags(
    value: object,
): value is PatchedSettingsRequestFlags {
    if (!("coreDefaultAppAccess" in value) || value["coreDefaultAppAccess"] === undefined)
        return false;
    if (
        !("enterpriseAuditIncludeExpandedDiff" in value) ||
        value["enterpriseAuditIncludeExpandedDiff"] === undefined
    )
        return false;
    if (!("flowsContinuousLogin" in value) || value["flowsContinuousLogin"] === undefined)
        return false;
    if (!("flowsRefreshOthers" in value) || value["flowsRefreshOthers"] === undefined) return false;
    return true;
}

export function PatchedSettingsRequestFlagsFromJSON(json: any): PatchedSettingsRequestFlags {
    return PatchedSettingsRequestFlagsFromJSONTyped(json, false);
}

export function PatchedSettingsRequestFlagsFromJSONTyped(
    json: any,
    ignoreDiscriminator: boolean,
): PatchedSettingsRequestFlags {
    if (json == null) {
        return json;
    }
    return {
        coreDefaultAppAccess: json["core_default_app_access"],
        enterpriseAuditIncludeExpandedDiff: json["enterprise_audit_include_expanded_diff"],
        flowsContinuousLogin: json["flows_continuous_login"],
        flowsRefreshOthers: json["flows_refresh_others"],
    };
}

export function PatchedSettingsRequestFlagsToJSON(json: any): PatchedSettingsRequestFlags {
    return PatchedSettingsRequestFlagsToJSONTyped(json, false);
}

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

    return {
        core_default_app_access: value["coreDefaultAppAccess"],
        enterprise_audit_include_expanded_diff: value["enterpriseAuditIncludeExpandedDiff"],
        flows_continuous_login: value["flowsContinuousLogin"],
        flows_refresh_others: value["flowsRefreshOthers"],
    };
}
