// Generated by delombok at Tue Dec 16 19:34:32 UTC 2025
package net.md_5.bungee.api.dialog.input;

import lombok.NonNull;
import net.md_5.bungee.api.chat.BaseComponent;

/**
 * Represents an option choice which may form part of a
 * {@link SingleOptionInput}.
 */
public class InputOption {
    /**
     * The string value associated with this option, to be submitted when
     * selected.
     */
    @NonNull
    private String id;
    /**
     * The text to display for this option.
     */
    private BaseComponent display;
    /**
     * Whether this option is the one initially selected. Only one option may
     * have this value as true (default: first option).
     */
    private Boolean initial;

    public InputOption(@NonNull String id) {
        this(id, null, null);
        if (id == null) {
            throw new java.lang.NullPointerException("id is marked non-null but is null");
        }
    }

    /**
     * The string value associated with this option, to be submitted when
     * selected.
     */
    @NonNull
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public String id() {
        return this.id;
    }

    /**
     * The text to display for this option.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public BaseComponent display() {
        return this.display;
    }

    /**
     * Whether this option is the one initially selected. Only one option may
     * have this value as true (default: first option).
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public Boolean initial() {
        return this.initial;
    }

    /**
     * The string value associated with this option, to be submitted when
     * selected.
     * @return {@code this}.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public InputOption id(@NonNull final String id) {
        if (id == null) {
            throw new java.lang.NullPointerException("id is marked non-null but is null");
        }
        this.id = id;
        return this;
    }

    /**
     * The text to display for this option.
     * @return {@code this}.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public InputOption display(final BaseComponent display) {
        this.display = display;
        return this;
    }

    /**
     * Whether this option is the one initially selected. Only one option may
     * have this value as true (default: first option).
     * @return {@code this}.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public InputOption initial(final Boolean initial) {
        this.initial = initial;
        return this;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public boolean equals(final java.lang.Object o) {
        if (o == this) return true;
        if (!(o instanceof InputOption)) return false;
        final InputOption other = (InputOption) o;
        if (!other.canEqual((java.lang.Object) this)) return false;
        final java.lang.Object this$initial = this.initial();
        final java.lang.Object other$initial = other.initial();
        if (this$initial == null ? other$initial != null : !this$initial.equals(other$initial)) return false;
        final java.lang.Object this$id = this.id();
        final java.lang.Object other$id = other.id();
        if (this$id == null ? other$id != null : !this$id.equals(other$id)) return false;
        final java.lang.Object this$display = this.display();
        final java.lang.Object other$display = other.display();
        if (this$display == null ? other$display != null : !this$display.equals(other$display)) return false;
        return true;
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    protected boolean canEqual(final java.lang.Object other) {
        return other instanceof InputOption;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final java.lang.Object $initial = this.initial();
        result = result * PRIME + ($initial == null ? 43 : $initial.hashCode());
        final java.lang.Object $id = this.id();
        result = result * PRIME + ($id == null ? 43 : $id.hashCode());
        final java.lang.Object $display = this.display();
        result = result * PRIME + ($display == null ? 43 : $display.hashCode());
        return result;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public java.lang.String toString() {
        return "InputOption(id=" + this.id() + ", display=" + this.display() + ", initial=" + this.initial() + ")";
    }

    /**
     * Creates a new {@code InputOption} instance.
     *
     * @param id The string value associated with this option, to be submitted when
     * selected.
     * @param display The text to display for this option.
     * @param initial Whether this option is the one initially selected. Only one option may
     * have this value as true (default: first option).
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public InputOption(@NonNull final String id, final BaseComponent display, final Boolean initial) {
        if (id == null) {
            throw new java.lang.NullPointerException("id is marked non-null but is null");
        }
        this.id = id;
        this.display = display;
        this.initial = initial;
    }
}
