// Generated by delombok at Tue Dec 16 19:34:32 UTC 2025
package net.md_5.bungee.api.dialog.action;

import lombok.NonNull;

/**
 * Executes a command. If the command requires a permission higher than 0, a
 * confirmation dialog will be shown by the client.
 */
public class RunCommandAction implements Action {
    /**
     * The template to be applied, where variables of the form
     * <code>$(key)</code> will be replaced by their
     * {@link net.md_5.bungee.api.dialog.input.DialogInput#key} value.
     */
    @NonNull
    private String template;

    /**
     * Creates a new {@code RunCommandAction} instance.
     *
     * @param template The template to be applied, where variables of the form
     * <code>$(key)</code> will be replaced by their
     * {@link net.md_5.bungee.api.dialog.input.DialogInput#key} value.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public RunCommandAction(@NonNull final String template) {
        if (template == null) {
            throw new java.lang.NullPointerException("template is marked non-null but is null");
        }
        this.template = template;
    }

    /**
     * The template to be applied, where variables of the form
     * <code>$(key)</code> will be replaced by their
     * {@link net.md_5.bungee.api.dialog.input.DialogInput#key} value.
     */
    @NonNull
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public String template() {
        return this.template;
    }

    /**
     * The template to be applied, where variables of the form
     * <code>$(key)</code> will be replaced by their
     * {@link net.md_5.bungee.api.dialog.input.DialogInput#key} value.
     * @return {@code this}.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public RunCommandAction template(@NonNull final String template) {
        if (template == null) {
            throw new java.lang.NullPointerException("template is marked non-null but is null");
        }
        this.template = template;
        return this;
    }

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

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

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

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public java.lang.String toString() {
        return "RunCommandAction(super=" + super.toString() + ", template=" + this.template() + ")";
    }
}
