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

/**
 * Config for error reporting
 * @export
 * @interface ErrorReportingConfig
 */
export interface ErrorReportingConfig {
    /**
     *
     * @type {boolean}
     * @memberof ErrorReportingConfig
     */
    readonly enabled: boolean;
    /**
     *
     * @type {string}
     * @memberof ErrorReportingConfig
     */
    readonly sentryDsn: string;
    /**
     *
     * @type {string}
     * @memberof ErrorReportingConfig
     */
    readonly environment: string;
    /**
     *
     * @type {boolean}
     * @memberof ErrorReportingConfig
     */
    readonly sendPii: boolean;
    /**
     *
     * @type {number}
     * @memberof ErrorReportingConfig
     */
    readonly tracesSampleRate: number;
}

/**
 * Check if a given object implements the ErrorReportingConfig interface.
 */
export function instanceOfErrorReportingConfig(value: object): value is ErrorReportingConfig {
    if (!("enabled" in value) || value["enabled"] === undefined) return false;
    if (!("sentryDsn" in value) || value["sentryDsn"] === undefined) return false;
    if (!("environment" in value) || value["environment"] === undefined) return false;
    if (!("sendPii" in value) || value["sendPii"] === undefined) return false;
    if (!("tracesSampleRate" in value) || value["tracesSampleRate"] === undefined) return false;
    return true;
}

export function ErrorReportingConfigFromJSON(json: any): ErrorReportingConfig {
    return ErrorReportingConfigFromJSONTyped(json, false);
}

export function ErrorReportingConfigFromJSONTyped(
    json: any,
    ignoreDiscriminator: boolean,
): ErrorReportingConfig {
    if (json == null) {
        return json;
    }
    return {
        enabled: json["enabled"],
        sentryDsn: json["sentry_dsn"],
        environment: json["environment"],
        sendPii: json["send_pii"],
        tracesSampleRate: json["traces_sample_rate"],
    };
}

export function ErrorReportingConfigToJSON(json: any): ErrorReportingConfig {
    return ErrorReportingConfigToJSONTyped(json, false);
}

export function ErrorReportingConfigToJSONTyped(
    value?: Omit<
        ErrorReportingConfig,
        "enabled" | "sentry_dsn" | "environment" | "send_pii" | "traces_sample_rate"
    > | null,
    ignoreDiscriminator: boolean = false,
): any {
    if (value == null) {
        return value;
    }

    return {};
}
