/* 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';
/**
 * Partial Group Serializer, does not include child relations.
 * @export
 * @interface PartialGroup
 */
export interface PartialGroup {
    /**
     * 
     * @type {string}
     * @memberof PartialGroup
     */
    readonly pk: string;
    /**
     * Get a numerical, int32 ID for the group
     * @type {number}
     * @memberof PartialGroup
     */
    readonly numPk: number;
    /**
     * 
     * @type {string}
     * @memberof PartialGroup
     */
    name: string;
    /**
     * Users added to this group will be superusers.
     * @type {boolean}
     * @memberof PartialGroup
     */
    isSuperuser?: boolean;
    /**
     * 
     * @type {string}
     * @memberof PartialGroup
     */
    parent?: string | null;
    /**
     * 
     * @type {string}
     * @memberof PartialGroup
     */
    readonly parentName: string | null;
    /**
     * 
     * @type {{ [key: string]: any; }}
     * @memberof PartialGroup
     */
    attributes?: { [key: string]: any; };
}

/**
 * Check if a given object implements the PartialGroup interface.
 */
export function instanceOfPartialGroup(value: object): value is PartialGroup {
    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 PartialGroupFromJSON(json: any): PartialGroup {
    return PartialGroupFromJSONTyped(json, false);
}

export function PartialGroupFromJSONTyped(json: any, ignoreDiscriminator: boolean): PartialGroup {
    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 PartialGroupToJSON(json: any): PartialGroup {
    return PartialGroupToJSONTyped(json, false);
}

export function PartialGroupToJSONTyped(value?: Omit<PartialGroup, 'pk'|'num_pk'|'parent_name'> | null, ignoreDiscriminator: boolean = false): any {
    if (value == null) {
        return value;
    }

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

