// Generated by delombok at Tue Dec 16 19:35:27 UTC 2025
package net.md_5.bungee.api.event;

import net.md_5.bungee.api.Callback;
import net.md_5.bungee.api.ServerPing;
import net.md_5.bungee.api.connection.PendingConnection;

/**
 * Called when the proxy is queried for status from the server list.
 */
public class ProxyPingEvent extends AsyncEvent<ProxyPingEvent> {
    /**
     * The connection asking for a ping response.
     */
    private final PendingConnection connection;
    /**
     * The data to respond with.
     */
    private ServerPing response;

    public ProxyPingEvent(PendingConnection connection, ServerPing response, Callback<ProxyPingEvent> done) {
        super(done);
        this.connection = connection;
        this.response = response;
    }

    /**
     * The connection asking for a ping response.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public PendingConnection getConnection() {
        return this.connection;
    }

    /**
     * The data to respond with.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public ServerPing getResponse() {
        return this.response;
    }

    /**
     * The data to respond with.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public void setResponse(final ServerPing response) {
        this.response = response;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public java.lang.String toString() {
        return "ProxyPingEvent(connection=" + this.getConnection() + ", response=" + this.getResponse() + ")";
    }

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

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

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