001/*
002 * Copyright 2026 Revetware LLC.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016
017package com.revetsec.totp;
018
019import javax.annotation.concurrent.Immutable;
020
021/** Fixed operational reasons without account or secret data.
022 * @since 1.0.0 */
023@Immutable
024public enum TotpUnavailableReason {
025    /** A store, clock, random source or other dependency was unavailable. */
026    DEPENDENCY_UNAVAILABLE,
027    /** Recovery admission was closed or could not be confirmed. */
028    ADMISSION_CLOSED,
029    /** The authority, admission, clock generation or recovery epoch was no longer authoritative. */
030    FENCED,
031    /** The backend refused capacity without changing state. */
032    CAPACITY_REFUSED,
033    /** An opaque record could not be authenticated or validated. */
034    INVALID_STORED_STATE,
035    /** A required durable-record sealing key was unavailable. */
036    SEALING_KEY_UNAVAILABLE,
037    /** The activated namespace record was missing or initialization was incomplete. */
038    NAMESPACE_NOT_INITIALIZED,
039    /** The original operation budget was exhausted. */
040    DEADLINE_EXCEEDED,
041    /** Repeated confirmed conflicts exhausted the bounded retry policy. */
042    CONFLICT_LIMIT_REACHED,
043    /** A charge reservation is confirmed, but verification or settlement is definitely incomplete.
044     * No proof is released and the charge is not refunded or reserved again automatically. */
045    ATTEMPT_INCOMPLETE,
046    /** Healthy admitted authority time is unavailable or precedes a required minimum or entity floor.
047     * No worker-time fallback is permitted. */
048    TIME_AUTHORITY_UNAVAILABLE,
049    /** The complete worker offset interval, elapsed continuity or release-rate bound could not establish health. */
050    CLOCK_HEALTH_UNCONFIRMED
051}