/* 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 DeviceUser
 */
export interface DeviceUser {
    /**
     *
     * @type {string}
     * @memberof DeviceUser
     */
    id: string;
    /**
     *
     * @type {string}
     * @memberof DeviceUser
     */
    username?: string;
    /**
     *
     * @type {string}
     * @memberof DeviceUser
     */
    name?: string;
    /**
     *
     * @type {string}
     * @memberof DeviceUser
     */
    home?: string;
}

/**
 * Check if a given object implements the DeviceUser interface.
 */
export function instanceOfDeviceUser(value: object): value is DeviceUser {
    if (!("id" in value) || value["id"] === undefined) return false;
    return true;
}

export function DeviceUserFromJSON(json: any): DeviceUser {
    return DeviceUserFromJSONTyped(json, false);
}

export function DeviceUserFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeviceUser {
    if (json == null) {
        return json;
    }
    return {
        id: json["id"],
        username: json["username"] == null ? undefined : json["username"],
        name: json["name"] == null ? undefined : json["name"],
        home: json["home"] == null ? undefined : json["home"],
    };
}

export function DeviceUserToJSON(json: any): DeviceUser {
    return DeviceUserToJSONTyped(json, false);
}

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

    return {
        id: value["id"],
        username: value["username"],
        name: value["name"],
        home: value["home"],
    };
}
