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

/**
 * Serializer for totp authenticator devices
 * @export
 * @interface PatchedTOTPDeviceRequest
 */
export interface PatchedTOTPDeviceRequest {
    /**
     * The human-readable name of this device.
     * @type {string}
     * @memberof PatchedTOTPDeviceRequest
     */
    name?: string;
}

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

export function PatchedTOTPDeviceRequestFromJSON(json: any): PatchedTOTPDeviceRequest {
    return PatchedTOTPDeviceRequestFromJSONTyped(json, false);
}

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

export function PatchedTOTPDeviceRequestToJSON(json: any): PatchedTOTPDeviceRequest {
    return PatchedTOTPDeviceRequestToJSONTyped(json, false);
}

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

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