/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2026.5.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.
 */

/**
 * Group Serializer
 * @export
 * @interface PatchedGroupRequest
 */
export interface PatchedGroupRequest {
    /**
     *
     * @type {string}
     * @memberof PatchedGroupRequest
     */
    name?: string;
    /**
     * Users added to this group will be superusers.
     * @type {boolean}
     * @memberof PatchedGroupRequest
     */
    isSuperuser?: boolean;
    /**
     *
     * @type {Array<string>}
     * @memberof PatchedGroupRequest
     */
    parents?: Array<string>;
    /**
     *
     * @type {Array<number>}
     * @memberof PatchedGroupRequest
     */
    users?: Array<number>;
    /**
     *
     * @type {{ [key: string]: any; }}
     * @memberof PatchedGroupRequest
     */
    attributes?: { [key: string]: any };
    /**
     *
     * @type {Array<string>}
     * @memberof PatchedGroupRequest
     */
    roles?: Array<string>;
}

/**
 * Check if a given object implements the PatchedGroupRequest interface.
 */
export function instanceOfPatchedGroupRequest(value: object): value is PatchedGroupRequest {
    return true;
}

export function PatchedGroupRequestFromJSON(json: any): PatchedGroupRequest {
    return PatchedGroupRequestFromJSONTyped(json, false);
}

export function PatchedGroupRequestFromJSONTyped(
    json: any,
    ignoreDiscriminator: boolean,
): PatchedGroupRequest {
    if (json == null) {
        return json;
    }
    return {
        name: json["name"] == null ? undefined : json["name"],
        isSuperuser: json["is_superuser"] == null ? undefined : json["is_superuser"],
        parents: json["parents"] == null ? undefined : json["parents"],
        users: json["users"] == null ? undefined : json["users"],
        attributes: json["attributes"] == null ? undefined : json["attributes"],
        roles: json["roles"] == null ? undefined : json["roles"],
    };
}

export function PatchedGroupRequestToJSON(json: any): PatchedGroupRequest {
    return PatchedGroupRequestToJSONTyped(json, false);
}

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

    return {
        name: value["name"],
        is_superuser: value["isSuperuser"],
        parents: value["parents"],
        users: value["users"],
        attributes: value["attributes"],
        roles: value["roles"],
    };
}
