// Generated by delombok at Tue Dec 16 19:34:11 UTC 2025
package net.md_5.bungee.api.chat.hover.content;

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

public class Entity extends Content {
    /**
     * Namespaced entity ID.
     *
     * Will use 'minecraft:pig' if null.
     */
    private String type;
    /**
     * Entity UUID in hyphenated hexadecimal format.
     *
     * Should be valid UUID. TODO : validate?
     */
    @NonNull
    private String id;
    /**
     * Name to display as the entity.
     *
     * This is optional and will be hidden if null.
     */
    private BaseComponent name;

    @Override
    public HoverEvent.Action requiredAction() {
        return HoverEvent.Action.SHOW_ENTITY;
    }

    /**
     * Namespaced entity ID.
     *
     * Will use 'minecraft:pig' if null.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public String getType() {
        return this.type;
    }

    /**
     * Entity UUID in hyphenated hexadecimal format.
     *
     * Should be valid UUID. TODO : validate?
     */
    @NonNull
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public String getId() {
        return this.id;
    }

    /**
     * Name to display as the entity.
     *
     * This is optional and will be hidden if null.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public BaseComponent getName() {
        return this.name;
    }

    /**
     * Namespaced entity ID.
     *
     * Will use 'minecraft:pig' if null.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public void setType(final String type) {
        this.type = type;
    }

    /**
     * Entity UUID in hyphenated hexadecimal format.
     *
     * Should be valid UUID. TODO : validate?
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public void setId(@NonNull final String id) {
        if (id == null) {
            throw new java.lang.NullPointerException("id is marked non-null but is null");
        }
        this.id = id;
    }

    /**
     * Name to display as the entity.
     *
     * This is optional and will be hidden if null.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public void setName(final BaseComponent name) {
        this.name = name;
    }

    /**
     * Creates a new {@code Entity} instance.
     *
     * @param type Namespaced entity ID.
     *
     * Will use 'minecraft:pig' if null.
     * @param id Entity UUID in hyphenated hexadecimal format.
     *
     * Should be valid UUID. TODO : validate?
     * @param name Name to display as the entity.
     *
     * This is optional and will be hidden if null.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public Entity(final String type, @NonNull final String id, final BaseComponent name) {
        if (id == null) {
            throw new java.lang.NullPointerException("id is marked non-null but is null");
        }
        this.type = type;
        this.id = id;
        this.name = name;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public java.lang.String toString() {
        return "Entity(type=" + this.getType() + ", id=" + this.getId() + ", name=" + this.getName() + ")";
    }

    @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 Entity)) return false;
        final Entity other = (Entity) o;
        if (!other.canEqual((java.lang.Object) this)) return false;
        if (!super.equals(o)) return false;
        final java.lang.Object this$type = this.getType();
        final java.lang.Object other$type = other.getType();
        if (this$type == null ? other$type != null : !this$type.equals(other$type)) return false;
        final java.lang.Object this$id = this.getId();
        final java.lang.Object other$id = other.getId();
        if (this$id == null ? other$id != null : !this$id.equals(other$id)) return false;
        final java.lang.Object this$name = this.getName();
        final java.lang.Object other$name = other.getName();
        if (this$name == null ? other$name != null : !this$name.equals(other$name)) return false;
        return true;
    }

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

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public int hashCode() {
        final int PRIME = 59;
        int result = super.hashCode();
        final java.lang.Object $type = this.getType();
        result = result * PRIME + ($type == null ? 43 : $type.hashCode());
        final java.lang.Object $id = this.getId();
        result = result * PRIME + ($id == null ? 43 : $id.hashCode());
        final java.lang.Object $name = this.getName();
        result = result * PRIME + ($name == null ? 43 : $name.hashCode());
        return result;
    }
}
