/* tslint:disable */ /* eslint-disable */ /** * authentik * Making authentication simple. * * The version of the OpenAPI document: 2026.2.3-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. */ import { mapValues } from '../runtime'; import type { PartialUser } from './PartialUser'; import { PartialUserFromJSON, PartialUserFromJSONTyped, PartialUserToJSON, PartialUserToJSONTyped, } from './PartialUser'; import type { Role } from './Role'; import { RoleFromJSON, RoleFromJSONTyped, RoleToJSON, RoleToJSONTyped, } from './Role'; import type { RelatedGroup } from './RelatedGroup'; import { RelatedGroupFromJSON, RelatedGroupFromJSONTyped, RelatedGroupToJSON, RelatedGroupToJSONTyped, } from './RelatedGroup'; /** * Group Serializer * @export * @interface Group */ export interface Group { /** * * @type {string} * @memberof Group */ readonly pk: string; /** * * @type {number} * @memberof Group */ readonly numPk: number; /** * * @type {string} * @memberof Group */ name: string; /** * Users added to this group will be superusers. * @type {boolean} * @memberof Group */ isSuperuser?: boolean; /** * * @type {Array} * @memberof Group */ parents?: Array; /** * * @type {Array} * @memberof Group */ readonly parentsObj: Array | null; /** * * @type {Array} * @memberof Group */ users?: Array; /** * * @type {Array} * @memberof Group */ readonly usersObj: Array | null; /** * * @type {{ [key: string]: any; }} * @memberof Group */ attributes?: { [key: string]: any; }; /** * * @type {Array} * @memberof Group */ roles?: Array; /** * * @type {Array} * @memberof Group */ readonly rolesObj: Array; /** * * @type {Array} * @memberof Group */ readonly inheritedRolesObj: Array | null; /** * * @type {Array} * @memberof Group */ readonly children: Array; /** * * @type {Array} * @memberof Group */ readonly childrenObj: Array | null; } /** * Check if a given object implements the Group interface. */ export function instanceOfGroup(value: object): value is Group { 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; } export function GroupFromJSON(json: any): Group { return GroupFromJSONTyped(json, false); } export function GroupFromJSONTyped(json: any, ignoreDiscriminator: boolean): Group { 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'] as Array).map(RelatedGroupFromJSON)), 'users': json['users'] == null ? undefined : json['users'], 'usersObj': (json['users_obj'] == null ? null : (json['users_obj'] as Array).map(PartialUserFromJSON)), 'attributes': json['attributes'] == null ? undefined : json['attributes'], 'roles': json['roles'] == null ? undefined : json['roles'], 'rolesObj': ((json['roles_obj'] as Array).map(RoleFromJSON)), 'inheritedRolesObj': (json['inherited_roles_obj'] == null ? null : (json['inherited_roles_obj'] as Array).map(RoleFromJSON)), 'children': json['children'], 'childrenObj': (json['children_obj'] == null ? null : (json['children_obj'] as Array).map(RelatedGroupFromJSON)), }; } export function GroupToJSON(json: any): Group { return GroupToJSONTyped(json, false); } export function GroupToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { 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'], }; }