// This file is auto-generated by alef — DO NOT EDIT.
// alef:hash:4e15143f4af1ae8bafbdb1506ef057da924484c66a19483966333558ad437e75
// To regenerate: alef generate
// To verify freshness: alef verify --exit-code
// Issues & docs: https://github.com/kreuzberg-dev/alef
package dev.kreuzberg;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

/**
 * Semantic kind of a relationship between document elements.
 */
public enum RelationshipKind {
    /** Footnote marker -&gt; footnote definition. */
    FootnoteReference("footnote_reference"),
    /** Citation marker -&gt; bibliography entry. */
    CitationReference("citation_reference"),
    /** Internal anchor link ({@code #id}) -&gt; target heading/element. */
    InternalLink("internal_link"),
    /** Caption paragraph -&gt; figure/table it describes. */
    Caption("caption"),
    /**
     * Label -&gt; labeled element (HTML {@code &lt;label for&gt;}, LaTeX {@code \label{}}).
     */
    Label("label"),
    /** TOC entry -&gt; target section. */
    TocEntry("toc_entry"),
    /** Cross-reference (LaTeX {@code \ref{}}, DOCX cross-reference field). */
    CrossReference("cross_reference");

    /** The string value. */
    private final String value;

    RelationshipKind(final String value) {
        this.value = value;
    }

    /** Returns the string value. */
    @JsonValue
    public String getValue() {
        return value;
    }

    /** Creates an instance from a string value. */
    @JsonCreator
    public static RelationshipKind fromValue(final String value) {
        for (RelationshipKind e : values()) {
            if (e.value.equalsIgnoreCase(value)) {
                return e;
            }
        }
        throw new IllegalArgumentException("Unknown value: " + value);
    }

    /** Returns the wire-format string value (matches JSON serialization). */
    @Override
    public String toString() {
        return value;
    }
}
