/* 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.
 */

import { mapValues } from '../runtime';
/**
 * Stripped down group serializer to show relevant children for groups
 * @export
 * @interface GroupChild
 */
export interface GroupChild {
    /**
     * 
     * @type {string}
     * @memberof GroupChild
     */
    readonly pk: string;
    /**
     * 
     * @type {string}
     * @memberof GroupChild
     */
    name: string;
    /**
     * Users added to this group will be superusers.
     * @type {boolean}
     * @memberof GroupChild
     */
    isSuperuser?: boolean;
    /**
     * 
     * @type {{ [key: string]: any; }}
     * @memberof GroupChild
     */
    attributes?: { [key: string]: any; };
    /**
     * 
     * @type {string}
     * @memberof GroupChild
     */
    readonly groupUuid: string;
}

/**
 * Check if a given object implements the GroupChild interface.
 */
export function instanceOfGroupChild(value: object): value is GroupChild {
    if (!('pk' in value) || value['pk'] === undefined) return false;
    if (!('name' in value) || value['name'] === undefined) return false;
    if (!('groupUuid' in value) || value['groupUuid'] === undefined) return false;
    return true;
}

export function GroupChildFromJSON(json: any): GroupChild {
    return GroupChildFromJSONTyped(json, false);
}

export function GroupChildFromJSONTyped(json: any, ignoreDiscriminator: boolean): GroupChild {
    if (json == null) {
        return json;
    }
    return {
        
        'pk': json['pk'],
        'name': json['name'],
        'isSuperuser': json['is_superuser'] == null ? undefined : json['is_superuser'],
        'attributes': json['attributes'] == null ? undefined : json['attributes'],
        'groupUuid': json['group_uuid'],
    };
}

export function GroupChildToJSON(json: any): GroupChild {
    return GroupChildToJSONTyped(json, false);
}

export function GroupChildToJSONTyped(value?: Omit<GroupChild, 'pk'|'group_uuid'> | null, ignoreDiscriminator: boolean = false): any {
    if (value == null) {
        return value;
    }

    return {
        
        'name': value['name'],
        'is_superuser': value['isSuperuser'],
        'attributes': value['attributes'],
    };
}

