"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.instanceOfGroup = instanceOfGroup;
exports.GroupFromJSON = GroupFromJSON;
exports.GroupFromJSONTyped = GroupFromJSONTyped;
exports.GroupToJSON = GroupToJSON;
exports.GroupToJSONTyped = GroupToJSONTyped;
const PartialUser_1 = require("./PartialUser");
const Role_1 = require("./Role");
const GroupChild_1 = require("./GroupChild");
/**
 * Check if a given object implements the Group interface.
 */
function instanceOfGroup(value) {
    if (!('pk' in value) || value['pk'] === undefined)
        return false;
    if (!('numPk' in value) || value['numPk'] === undefined)
        return false;
    if (!('name' in value) || value['name'] === undefined)
        return false;
    if (!('parentName' in value) || value['parentName'] === undefined)
        return false;
    if (!('usersObj' in value) || value['usersObj'] === undefined)
        return false;
    if (!('rolesObj' in value) || value['rolesObj'] === undefined)
        return false;
    if (!('childrenObj' in value) || value['childrenObj'] === undefined)
        return false;
    return true;
}
function GroupFromJSON(json) {
    return GroupFromJSONTyped(json, false);
}
function GroupFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'pk': json['pk'],
        'numPk': json['num_pk'],
        'name': json['name'],
        'isSuperuser': json['is_superuser'] == null ? undefined : json['is_superuser'],
        'parent': json['parent'] == null ? undefined : json['parent'],
        'parentName': json['parent_name'],
        'users': json['users'] == null ? undefined : json['users'],
        'usersObj': (json['users_obj'] == null ? null : json['users_obj'].map(PartialUser_1.PartialUserFromJSON)),
        'attributes': json['attributes'] == null ? undefined : json['attributes'],
        'roles': json['roles'] == null ? undefined : json['roles'],
        'rolesObj': (json['roles_obj'].map(Role_1.RoleFromJSON)),
        'children': json['children'] == null ? undefined : json['children'],
        'childrenObj': (json['children_obj'] == null ? null : json['children_obj'].map(GroupChild_1.GroupChildFromJSON)),
    };
}
function GroupToJSON(json) {
    return GroupToJSONTyped(json, false);
}
function GroupToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'name': value['name'],
        'is_superuser': value['isSuperuser'],
        'parent': value['parent'],
        'users': value['users'],
        'attributes': value['attributes'],
        'roles': value['roles'],
        'children': value['children'],
    };
}
//# sourceMappingURL=Group.js.map