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

import { mapValues } from '../runtime';
/**
 * Serializer for User settings for stages and sources
 * @export
 * @interface UserSetting
 */
export interface UserSetting {
    /**
     * 
     * @type {string}
     * @memberof UserSetting
     */
    objectUid: string;
    /**
     * 
     * @type {string}
     * @memberof UserSetting
     */
    component: string;
    /**
     * 
     * @type {string}
     * @memberof UserSetting
     */
    title: string;
    /**
     * 
     * @type {string}
     * @memberof UserSetting
     */
    configureUrl?: string;
    /**
     * 
     * @type {string}
     * @memberof UserSetting
     */
    iconUrl?: string;
}

/**
 * Check if a given object implements the UserSetting interface.
 */
export function instanceOfUserSetting(value: object): value is UserSetting {
    if (!('objectUid' in value) || value['objectUid'] === undefined) return false;
    if (!('component' in value) || value['component'] === undefined) return false;
    if (!('title' in value) || value['title'] === undefined) return false;
    return true;
}

export function UserSettingFromJSON(json: any): UserSetting {
    return UserSettingFromJSONTyped(json, false);
}

export function UserSettingFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserSetting {
    if (json == null) {
        return json;
    }
    return {
        
        'objectUid': json['object_uid'],
        'component': json['component'],
        'title': json['title'],
        'configureUrl': json['configure_url'] == null ? undefined : json['configure_url'],
        'iconUrl': json['icon_url'] == null ? undefined : json['icon_url'],
    };
}

export function UserSettingToJSON(json: any): UserSetting {
    return UserSettingToJSONTyped(json, false);
}

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

    return {
        
        'object_uid': value['objectUid'],
        'component': value['component'],
        'title': value['title'],
        'configure_url': value['configureUrl'],
        'icon_url': value['iconUrl'],
    };
}

