// Generated by delombok at Tue Dec 16 19:35:15 UTC 2025
package net.md_5.bungee.protocol.packet;

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

public class CookieRequest extends DefinedPacket {
    private String cookie;

    @Override
    public void read(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion) {
        cookie = readString(buf);
    }

    @Override
    public void write(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion) {
        writeString(cookie, buf);
    }

    @Override
    public void handle(AbstractPacketHandler handler) throws Exception {
        handler.handle(this);
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public String getCookie() {
        return this.cookie;
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public void setCookie(final String cookie) {
        this.cookie = cookie;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public java.lang.String toString() {
        return "CookieRequest(cookie=" + this.getCookie() + ")";
    }

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

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public CookieRequest(final String cookie) {
        this.cookie = cookie;
    }

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

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

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