/* 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';
/**
 * Simplified Group Serializer for user's groups
 * @export
 * @interface UserGroupRequest
 */
export interface UserGroupRequest {
    /**
     * 
     * @type {string}
     * @memberof UserGroupRequest
     */
    name: string;
    /**
     * Users added to this group will be superusers.
     * @type {boolean}
     * @memberof UserGroupRequest
     */
    isSuperuser?: boolean;
    /**
     * 
     * @type {string}
     * @memberof UserGroupRequest
     */
    parent?: string | null;
    /**
     * 
     * @type {{ [key: string]: any; }}
     * @memberof UserGroupRequest
     */
    attributes?: { [key: string]: any; };
}

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

export function UserGroupRequestFromJSON(json: any): UserGroupRequest {
    return UserGroupRequestFromJSONTyped(json, false);
}

export function UserGroupRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserGroupRequest {
    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'],
        'attributes': json['attributes'] == null ? undefined : json['attributes'],
    };
}

export function UserGroupRequestToJSON(json: any): UserGroupRequest {
    return UserGroupRequestToJSONTyped(json, false);
}

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

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

