/* tslint:disable */ /* eslint-disable */ /** * authentik * Making authentication simple. * * The version of the OpenAPI document: 2025.6.3 * 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'; /** * Simplified Group Serializer for user's groups * @export * @interface UserGroup */ export interface UserGroup { /** * * @type {string} * @memberof UserGroup */ readonly pk: string; /** * Get a numerical, int32 ID for the group * @type {number} * @memberof UserGroup */ readonly numPk: number; /** * * @type {string} * @memberof UserGroup */ name: string; /** * Users added to this group will be superusers. * @type {boolean} * @memberof UserGroup */ isSuperuser?: boolean; /** * * @type {string} * @memberof UserGroup */ parent?: string | null; /** * * @type {string} * @memberof UserGroup */ readonly parentName: string | null; /** * * @type {{ [key: string]: any; }} * @memberof UserGroup */ attributes?: { [key: string]: any; }; } /** * Check if a given object implements the UserGroup interface. */ export function instanceOfUserGroup(value: object): value is UserGroup { 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; return true; } export function UserGroupFromJSON(json: any): UserGroup { return UserGroupFromJSONTyped(json, false); } export function UserGroupFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserGroup { 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'], 'attributes': json['attributes'] == null ? undefined : json['attributes'], }; } export function UserGroupToJSON(json: any): UserGroup { return UserGroupToJSONTyped(json, false); } export function UserGroupToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'name': value['name'], 'is_superuser': value['isSuperuser'], 'parent': value['parent'], 'attributes': value['attributes'], }; }