"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2026.2.0-rc5
 * 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.instanceOfPatchedUserRequest = instanceOfPatchedUserRequest;
exports.PatchedUserRequestFromJSON = PatchedUserRequestFromJSON;
exports.PatchedUserRequestFromJSONTyped = PatchedUserRequestFromJSONTyped;
exports.PatchedUserRequestToJSON = PatchedUserRequestToJSON;
exports.PatchedUserRequestToJSONTyped = PatchedUserRequestToJSONTyped;
const UserTypeEnum_1 = require("./UserTypeEnum");
/**
 * Check if a given object implements the PatchedUserRequest interface.
 */
function instanceOfPatchedUserRequest(value) {
    return true;
}
function PatchedUserRequestFromJSON(json) {
    return PatchedUserRequestFromJSONTyped(json, false);
}
function PatchedUserRequestFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'username': json['username'] == null ? undefined : json['username'],
        'name': json['name'] == null ? undefined : 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'],
        'roles': json['roles'] == null ? undefined : json['roles'],
        '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 PatchedUserRequestToJSON(json) {
    return PatchedUserRequestToJSONTyped(json, false);
}
function PatchedUserRequestToJSONTyped(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'],
        'roles': value['roles'],
        'email': value['email'],
        'attributes': value['attributes'],
        'path': value['path'],
        'type': (0, UserTypeEnum_1.UserTypeEnumToJSON)(value['type']),
    };
}
//# sourceMappingURL=PatchedUserRequest.js.map