// Generated by delombok at Sat Oct 04 04:46:56 UTC 2025
package net.md_5.bungee.protocol.data;

import io.netty.buffer.ByteBuf;
import java.util.BitSet;
import net.md_5.bungee.protocol.AbstractPacketHandler;
import net.md_5.bungee.protocol.DefinedPacket;
import net.md_5.bungee.protocol.ProtocolConstants;

public class SeenMessages extends DefinedPacket {
    private int offset;
    private BitSet acknowledged;

    @Override
    public void read(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion) {
        offset = DefinedPacket.readVarInt(buf);
        acknowledged = DefinedPacket.readFixedBitSet(20, buf);
    }

    @Override
    public void write(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion) {
        DefinedPacket.writeVarInt(offset, buf);
        DefinedPacket.writeFixedBitSet(acknowledged, 20, buf);
    }

    @Override
    public void handle(AbstractPacketHandler handler) throws Exception {
        throw new UnsupportedOperationException("Not supported.");
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public int getOffset() {
        return this.offset;
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public BitSet getAcknowledged() {
        return this.acknowledged;
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public void setOffset(final int offset) {
        this.offset = offset;
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public void setAcknowledged(final BitSet acknowledged) {
        this.acknowledged = acknowledged;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public java.lang.String toString() {
        return "SeenMessages(offset=" + this.getOffset() + ", acknowledged=" + this.getAcknowledged() + ")";
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public SeenMessages() {
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public SeenMessages(final int offset, final BitSet acknowledged) {
        this.offset = offset;
        this.acknowledged = acknowledged;
    }

    @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 SeenMessages)) return false;
        final SeenMessages other = (SeenMessages) o;
        if (!other.canEqual((java.lang.Object) this)) return false;
        if (this.getOffset() != other.getOffset()) return false;
        final java.lang.Object this$acknowledged = this.getAcknowledged();
        final java.lang.Object other$acknowledged = other.getAcknowledged();
        if (this$acknowledged == null ? other$acknowledged != null : !this$acknowledged.equals(other$acknowledged)) return false;
        return true;
    }

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

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