"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.instanceOfUserSelf = instanceOfUserSelf;
exports.UserSelfFromJSON = UserSelfFromJSON;
exports.UserSelfFromJSONTyped = UserSelfFromJSONTyped;
exports.UserSelfToJSON = UserSelfToJSON;
exports.UserSelfToJSONTyped = UserSelfToJSONTyped;
const UserSelfGroups_1 = require("./UserSelfGroups");
const UserTypeEnum_1 = require("./UserTypeEnum");
/**
 * Check if a given object implements the UserSelf interface.
 */
function instanceOfUserSelf(value) {
    if (!('pk' in value) || value['pk'] === undefined)
        return false;
    if (!('username' in value) || value['username'] === undefined)
        return false;
    if (!('name' in value) || value['name'] === undefined)
        return false;
    if (!('isActive' in value) || value['isActive'] === undefined)
        return false;
    if (!('isSuperuser' in value) || value['isSuperuser'] === undefined)
        return false;
    if (!('groups' in value) || value['groups'] === undefined)
        return false;
    if (!('avatar' in value) || value['avatar'] === undefined)
        return false;
    if (!('uid' in value) || value['uid'] === undefined)
        return false;
    if (!('settings' in value) || value['settings'] === undefined)
        return false;
    if (!('systemPermissions' in value) || value['systemPermissions'] === undefined)
        return false;
    return true;
}
function UserSelfFromJSON(json) {
    return UserSelfFromJSONTyped(json, false);
}
function UserSelfFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'pk': json['pk'],
        'username': json['username'],
        'name': json['name'],
        'isActive': json['is_active'],
        'isSuperuser': json['is_superuser'],
        'groups': (json['groups'].map(UserSelfGroups_1.UserSelfGroupsFromJSON)),
        'email': json['email'] == null ? undefined : json['email'],
        'avatar': json['avatar'],
        'uid': json['uid'],
        'settings': json['settings'],
        'type': json['type'] == null ? undefined : (0, UserTypeEnum_1.UserTypeEnumFromJSON)(json['type']),
        'systemPermissions': json['system_permissions'],
    };
}
function UserSelfToJSON(json) {
    return UserSelfToJSONTyped(json, false);
}
function UserSelfToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'username': value['username'],
        'name': value['name'],
        'email': value['email'],
        'type': (0, UserTypeEnum_1.UserTypeEnumToJSON)(value['type']),
    };
}
//# sourceMappingURL=UserSelf.js.map