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

/**
 *
 * @export
 * @interface DeviceAccessGroupRequest
 */
export interface DeviceAccessGroupRequest {
    /**
     *
     * @type {string}
     * @memberof DeviceAccessGroupRequest
     */
    name: string;
    /**
     *
     * @type {{ [key: string]: any; }}
     * @memberof DeviceAccessGroupRequest
     */
    attributes?: { [key: string]: any };
}

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

export function DeviceAccessGroupRequestFromJSON(json: any): DeviceAccessGroupRequest {
    return DeviceAccessGroupRequestFromJSONTyped(json, false);
}

export function DeviceAccessGroupRequestFromJSONTyped(
    json: any,
    ignoreDiscriminator: boolean,
): DeviceAccessGroupRequest {
    if (json == null) {
        return json;
    }
    return {
        name: json["name"],
        attributes: json["attributes"] == null ? undefined : json["attributes"],
    };
}

export function DeviceAccessGroupRequestToJSON(json: any): DeviceAccessGroupRequest {
    return DeviceAccessGroupRequestToJSONTyped(json, false);
}

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

    return {
        name: value["name"],
        attributes: value["attributes"],
    };
}
