/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2025.6.4
 * 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.
 */

import { mapValues } from '../runtime';
/**
 * Settings Serializer
 * @export
 * @interface PatchedSettingsRequest
 */
export interface PatchedSettingsRequest {
    /**
     * Configure how authentik should show avatars for users.
     * @type {string}
     * @memberof PatchedSettingsRequest
     */
    avatars?: string;
    /**
     * Enable the ability for users to change their name.
     * @type {boolean}
     * @memberof PatchedSettingsRequest
     */
    defaultUserChangeName?: boolean;
    /**
     * Enable the ability for users to change their email address.
     * @type {boolean}
     * @memberof PatchedSettingsRequest
     */
    defaultUserChangeEmail?: boolean;
    /**
     * Enable the ability for users to change their username.
     * @type {boolean}
     * @memberof PatchedSettingsRequest
     */
    defaultUserChangeUsername?: boolean;
    /**
     * Events will be deleted after this duration.(Format: weeks=3;days=2;hours=3,seconds=2).
     * @type {string}
     * @memberof PatchedSettingsRequest
     */
    eventRetention?: string;
    /**
     * Reputation cannot decrease lower than this value. Zero or negative.
     * @type {number}
     * @memberof PatchedSettingsRequest
     */
    reputationLowerLimit?: number;
    /**
     * Reputation cannot increase higher than this value. Zero or positive.
     * @type {number}
     * @memberof PatchedSettingsRequest
     */
    reputationUpperLimit?: number;
    /**
     * 
     * @type {any}
     * @memberof PatchedSettingsRequest
     */
    footerLinks?: any | null;
    /**
     * When enabled, all the events caused by a user will be deleted upon the user's deletion.
     * @type {boolean}
     * @memberof PatchedSettingsRequest
     */
    gdprCompliance?: boolean;
    /**
     * Globally enable/disable impersonation.
     * @type {boolean}
     * @memberof PatchedSettingsRequest
     */
    impersonation?: boolean;
    /**
     * Require administrators to provide a reason for impersonating a user.
     * @type {boolean}
     * @memberof PatchedSettingsRequest
     */
    impersonationRequireReason?: boolean;
    /**
     * Default token duration
     * @type {string}
     * @memberof PatchedSettingsRequest
     */
    defaultTokenDuration?: string;
    /**
     * Default token length
     * @type {number}
     * @memberof PatchedSettingsRequest
     */
    defaultTokenLength?: number;
}

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

export function PatchedSettingsRequestFromJSON(json: any): PatchedSettingsRequest {
    return PatchedSettingsRequestFromJSONTyped(json, false);
}

export function PatchedSettingsRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedSettingsRequest {
    if (json == null) {
        return json;
    }
    return {
        
        'avatars': json['avatars'] == null ? undefined : json['avatars'],
        'defaultUserChangeName': json['default_user_change_name'] == null ? undefined : json['default_user_change_name'],
        'defaultUserChangeEmail': json['default_user_change_email'] == null ? undefined : json['default_user_change_email'],
        'defaultUserChangeUsername': json['default_user_change_username'] == null ? undefined : json['default_user_change_username'],
        'eventRetention': json['event_retention'] == null ? undefined : json['event_retention'],
        'reputationLowerLimit': json['reputation_lower_limit'] == null ? undefined : json['reputation_lower_limit'],
        'reputationUpperLimit': json['reputation_upper_limit'] == null ? undefined : json['reputation_upper_limit'],
        'footerLinks': json['footer_links'] == null ? undefined : json['footer_links'],
        'gdprCompliance': json['gdpr_compliance'] == null ? undefined : json['gdpr_compliance'],
        'impersonation': json['impersonation'] == null ? undefined : json['impersonation'],
        'impersonationRequireReason': json['impersonation_require_reason'] == null ? undefined : json['impersonation_require_reason'],
        'defaultTokenDuration': json['default_token_duration'] == null ? undefined : json['default_token_duration'],
        'defaultTokenLength': json['default_token_length'] == null ? undefined : json['default_token_length'],
    };
}

export function PatchedSettingsRequestToJSON(json: any): PatchedSettingsRequest {
    return PatchedSettingsRequestToJSONTyped(json, false);
}

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

    return {
        
        'avatars': value['avatars'],
        'default_user_change_name': value['defaultUserChangeName'],
        'default_user_change_email': value['defaultUserChangeEmail'],
        'default_user_change_username': value['defaultUserChangeUsername'],
        'event_retention': value['eventRetention'],
        'reputation_lower_limit': value['reputationLowerLimit'],
        'reputation_upper_limit': value['reputationUpperLimit'],
        'footer_links': value['footerLinks'],
        'gdpr_compliance': value['gdprCompliance'],
        'impersonation': value['impersonation'],
        'impersonation_require_reason': value['impersonationRequireReason'],
        'default_token_duration': value['defaultTokenDuration'],
        'default_token_length': value['defaultTokenLength'],
    };
}

