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

/**
 * Set token's key
 * @export
 * @interface TokenSetKeyRequest
 */
export interface TokenSetKeyRequest {
    /**
     *
     * @type {string}
     * @memberof TokenSetKeyRequest
     */
    key: string;
}

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

export function TokenSetKeyRequestFromJSON(json: any): TokenSetKeyRequest {
    return TokenSetKeyRequestFromJSONTyped(json, false);
}

export function TokenSetKeyRequestFromJSONTyped(
    json: any,
    ignoreDiscriminator: boolean,
): TokenSetKeyRequest {
    if (json == null) {
        return json;
    }
    return {
        key: json["key"],
    };
}

export function TokenSetKeyRequestToJSON(json: any): TokenSetKeyRequest {
    return TokenSetKeyRequestToJSONTyped(json, false);
}

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

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