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

/**
 * Base serializer class which doesn't implement create/update methods
 * @export
 * @interface EnrollRequest
 */
export interface EnrollRequest {
    /**
     *
     * @type {string}
     * @memberof EnrollRequest
     */
    deviceSerial: string;
    /**
     *
     * @type {string}
     * @memberof EnrollRequest
     */
    deviceName: string;
}

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

export function EnrollRequestFromJSON(json: any): EnrollRequest {
    return EnrollRequestFromJSONTyped(json, false);
}

export function EnrollRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnrollRequest {
    if (json == null) {
        return json;
    }
    return {
        deviceSerial: json["device_serial"],
        deviceName: json["device_name"],
    };
}

export function EnrollRequestToJSON(json: any): EnrollRequest {
    return EnrollRequestToJSONTyped(json, false);
}

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

    return {
        device_serial: value["deviceSerial"],
        device_name: value["deviceName"],
    };
}
