// 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 Transfer extends DefinedPacket {
    private String host;
    private int port;

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

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

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

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

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

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

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

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public java.lang.String toString() {
        return "Transfer(host=" + this.getHost() + ", port=" + this.getPort() + ")";
    }

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

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public Transfer(final String host, final int port) {
        this.host = host;
        this.port = port;
    }

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

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

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