"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2025.12.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.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.instanceOfUserRequest = instanceOfUserRequest;
exports.UserRequestFromJSON = UserRequestFromJSON;
exports.UserRequestFromJSONTyped = UserRequestFromJSONTyped;
exports.UserRequestToJSON = UserRequestToJSON;
exports.UserRequestToJSONTyped = UserRequestToJSONTyped;
const UserTypeEnum_1 = require("./UserTypeEnum");
/**
 * Check if a given object implements the UserRequest interface.
 */
function instanceOfUserRequest(value) {
    if (!('username' in value) || value['username'] === undefined)
        return false;
    if (!('name' in value) || value['name'] === undefined)
        return false;
    return true;
}
function UserRequestFromJSON(json) {
    return UserRequestFromJSONTyped(json, false);
}
function UserRequestFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'username': json['username'],
        'name': json['name'],
        'isActive': json['is_active'] == null ? undefined : json['is_active'],
        'lastLogin': json['last_login'] == null ? undefined : (new Date(json['last_login'])),
        'groups': json['groups'] == null ? undefined : json['groups'],
        'email': json['email'] == null ? undefined : json['email'],
        'attributes': json['attributes'] == null ? undefined : json['attributes'],
        'path': json['path'] == null ? undefined : json['path'],
        'type': json['type'] == null ? undefined : (0, UserTypeEnum_1.UserTypeEnumFromJSON)(json['type']),
    };
}
function UserRequestToJSON(json) {
    return UserRequestToJSONTyped(json, false);
}
function UserRequestToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'username': value['username'],
        'name': value['name'],
        'is_active': value['isActive'],
        'last_login': value['lastLogin'] == null ? value['lastLogin'] : value['lastLogin'].toISOString(),
        'groups': value['groups'],
        'email': value['email'],
        'attributes': value['attributes'],
        'path': value['path'],
        'type': (0, UserTypeEnum_1.UserTypeEnumToJSON)(value['type']),
    };
}
//# sourceMappingURL=UserRequest.js.map