"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2026.2.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 RelatedGroup_1 = require("./RelatedGroup");
/**
 * 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 (!('parentsObj' in value) || value['parentsObj'] === undefined)
        return false;
    if (!('usersObj' in value) || value['usersObj'] === undefined)
        return false;
    if (!('rolesObj' in value) || value['rolesObj'] === undefined)
        return false;
    if (!('inheritedRolesObj' in value) || value['inheritedRolesObj'] === undefined)
        return false;
    if (!('children' in value) || value['children'] === 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'],
        'parents': json['parents'] == null ? undefined : json['parents'],
        'parentsObj': (json['parents_obj'] == null ? null : json['parents_obj'].map(RelatedGroup_1.RelatedGroupFromJSON)),
        '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)),
        'inheritedRolesObj': (json['inherited_roles_obj'] == null ? null : json['inherited_roles_obj'].map(Role_1.RoleFromJSON)),
        'children': json['children'],
        'childrenObj': (json['children_obj'] == null ? null : json['children_obj'].map(RelatedGroup_1.RelatedGroupFromJSON)),
    };
}
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'],
        'parents': value['parents'],
        'users': value['users'],
        'attributes': value['attributes'],
        'roles': value['roles'],
    };
}
//# sourceMappingURL=Group.js.map