/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2025.10.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';
/**
 * Group Serializer
 * @export
 * @interface GroupRequest
 */
export interface GroupRequest {
    /**
     * 
     * @type {string}
     * @memberof GroupRequest
     */
    name: string;
    /**
     * Users added to this group will be superusers.
     * @type {boolean}
     * @memberof GroupRequest
     */
    isSuperuser?: boolean;
    /**
     * 
     * @type {string}
     * @memberof GroupRequest
     */
    parent?: string | null;
    /**
     * 
     * @type {Array<number>}
     * @memberof GroupRequest
     */
    users?: Array<number>;
    /**
     * 
     * @type {{ [key: string]: any; }}
     * @memberof GroupRequest
     */
    attributes?: { [key: string]: any; };
    /**
     * 
     * @type {Array<string>}
     * @memberof GroupRequest
     */
    roles?: Array<string>;
    /**
     * 
     * @type {Array<string>}
     * @memberof GroupRequest
     */
    children?: Array<string>;
}

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

export function GroupRequestFromJSON(json: any): GroupRequest {
    return GroupRequestFromJSONTyped(json, false);
}

export function GroupRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): GroupRequest {
    if (json == null) {
        return json;
    }
    return {
        
        'name': json['name'],
        'isSuperuser': json['is_superuser'] == null ? undefined : json['is_superuser'],
        'parent': json['parent'] == null ? undefined : json['parent'],
        'users': json['users'] == null ? undefined : json['users'],
        'attributes': json['attributes'] == null ? undefined : json['attributes'],
        'roles': json['roles'] == null ? undefined : json['roles'],
        'children': json['children'] == null ? undefined : json['children'],
    };
}

export function GroupRequestToJSON(json: any): GroupRequest {
    return GroupRequestToJSONTyped(json, false);
}

export function GroupRequestToJSONTyped(value?: GroupRequest | null, ignoreDiscriminator: boolean = false): any {
    if (value == null) {
        return value;
    }

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

