/* tslint:disable */
/* eslint-disable */
/**
 * HumanLayer Daemon REST API
 * REST API for HumanLayer daemon operations, providing session management, approval workflows, and real-time event streaming capabilities. 
 *
 * The version of the OpenAPI document: 1.0.0
 * 
 *
 * 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';
/**
 * 
 * @export
 * @interface UserSettings
 */
export interface UserSettings {
    /**
     * Enable advanced provider options like OpenRouter
     * @type {boolean}
     * @memberof UserSettings
     */
    advancedProviders: boolean;
    /**
     * Opt-in for performance and error reporting
     * @type {boolean}
     * @memberof UserSettings
     */
    optInTelemetry?: boolean;
    /**
     * 
     * @type {Date}
     * @memberof UserSettings
     */
    createdAt: Date;
    /**
     * 
     * @type {Date}
     * @memberof UserSettings
     */
    updatedAt: Date;
}

/**
 * Check if a given object implements the UserSettings interface.
 */
export function instanceOfUserSettings(value: object): value is UserSettings {
    if (!('advancedProviders' in value) || value['advancedProviders'] === undefined) return false;
    if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
    if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
    return true;
}

export function UserSettingsFromJSON(json: any): UserSettings {
    return UserSettingsFromJSONTyped(json, false);
}

export function UserSettingsFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserSettings {
    if (json == null) {
        return json;
    }
    return {
        
        'advancedProviders': json['advanced_providers'],
        'optInTelemetry': json['opt_in_telemetry'] == null ? undefined : json['opt_in_telemetry'],
        'createdAt': (new Date(json['created_at'])),
        'updatedAt': (new Date(json['updated_at'])),
    };
}

export function UserSettingsToJSON(json: any): UserSettings {
    return UserSettingsToJSONTyped(json, false);
}

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

    return {
        
        'advanced_providers': value['advancedProviders'],
        'opt_in_telemetry': value['optInTelemetry'],
        'created_at': ((value['createdAt']).toISOString()),
        'updated_at': ((value['updatedAt']).toISOString()),
    };
}

