// Generated by delombok at Fri Nov 21 22:29:51 UTC 2025
package net.md_5.bungee.api.chat.objects;

import java.util.UUID;
import lombok.NonNull;
import net.md_5.bungee.api.chat.player.Profile;
import net.md_5.bungee.api.chat.player.Property;

public final class PlayerObject implements ChatObject {
    /**
     * The profile of the player.
     */
    @NonNull
    private Profile profile;
    /**
     * If true, a hat layer will be rendered on the head. (default: true)
     */
    private Boolean hat;

    public PlayerObject(@NonNull String name) {
        if (name == null) {
            throw new java.lang.NullPointerException("name is marked non-null but is null");
        }
        this.profile = new Profile(name);
    }

    public PlayerObject(@NonNull UUID uuid) {
        if (uuid == null) {
            throw new java.lang.NullPointerException("uuid is marked non-null but is null");
        }
        this.profile = new Profile(uuid);
    }

    public PlayerObject(@NonNull Property[] properties) {
        if (properties == null) {
            throw new java.lang.NullPointerException("properties is marked non-null but is null");
        }
        this.profile = new Profile(properties);
    }

    /**
     * The profile of the player.
     */
    @NonNull
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public Profile getProfile() {
        return this.profile;
    }

    /**
     * If true, a hat layer will be rendered on the head. (default: true)
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public Boolean getHat() {
        return this.hat;
    }

    /**
     * The profile of the player.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public void setProfile(@NonNull final Profile profile) {
        if (profile == null) {
            throw new java.lang.NullPointerException("profile is marked non-null but is null");
        }
        this.profile = profile;
    }

    /**
     * If true, a hat layer will be rendered on the head. (default: true)
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public void setHat(final Boolean hat) {
        this.hat = hat;
    }

    @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 PlayerObject)) return false;
        final PlayerObject other = (PlayerObject) o;
        final java.lang.Object this$hat = this.getHat();
        final java.lang.Object other$hat = other.getHat();
        if (this$hat == null ? other$hat != null : !this$hat.equals(other$hat)) return false;
        final java.lang.Object this$profile = this.getProfile();
        final java.lang.Object other$profile = other.getProfile();
        if (this$profile == null ? other$profile != null : !this$profile.equals(other$profile)) return false;
        return true;
    }

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

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public java.lang.String toString() {
        return "PlayerObject(profile=" + this.getProfile() + ", hat=" + this.getHat() + ")";
    }

    /**
     * Creates a new {@code PlayerObject} instance.
     *
     * @param profile The profile of the player.
     * @param hat If true, a hat layer will be rendered on the head. (default: true)
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public PlayerObject(@NonNull final Profile profile, final Boolean hat) {
        if (profile == null) {
            throw new java.lang.NullPointerException("profile is marked non-null but is null");
        }
        this.profile = profile;
        this.hat = hat;
    }
}
