/* 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 DeviceGroup
 */
export interface DeviceGroup {
    /**
     *
     * @type {string}
     * @memberof DeviceGroup
     */
    id: string;
    /**
     *
     * @type {string}
     * @memberof DeviceGroup
     */
    name?: string;
}

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

export function DeviceGroupFromJSON(json: any): DeviceGroup {
    return DeviceGroupFromJSONTyped(json, false);
}

export function DeviceGroupFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeviceGroup {
    if (json == null) {
        return json;
    }
    return {
        id: json["id"],
        name: json["name"] == null ? undefined : json["name"],
    };
}

export function DeviceGroupToJSON(json: any): DeviceGroup {
    return DeviceGroupToJSONTyped(json, false);
}

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

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