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

/**
 * Tenant recovery key creation request serializer
 * @export
 * @interface TenantRecoveryKeyRequestRequest
 */
export interface TenantRecoveryKeyRequestRequest {
    /**
     *
     * @type {string}
     * @memberof TenantRecoveryKeyRequestRequest
     */
    user: string;
    /**
     *
     * @type {number}
     * @memberof TenantRecoveryKeyRequestRequest
     */
    durationDays: number;
}

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

export function TenantRecoveryKeyRequestRequestFromJSON(
    json: any,
): TenantRecoveryKeyRequestRequest {
    return TenantRecoveryKeyRequestRequestFromJSONTyped(json, false);
}

export function TenantRecoveryKeyRequestRequestFromJSONTyped(
    json: any,
    ignoreDiscriminator: boolean,
): TenantRecoveryKeyRequestRequest {
    if (json == null) {
        return json;
    }
    return {
        user: json["user"],
        durationDays: json["duration_days"],
    };
}

export function TenantRecoveryKeyRequestRequestToJSON(json: any): TenantRecoveryKeyRequestRequest {
    return TenantRecoveryKeyRequestRequestToJSONTyped(json, false);
}

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

    return {
        user: value["user"],
        duration_days: value["durationDays"],
    };
}
