All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.split.qos.server.integrations.slack.commandintegration.SlackCommand Maven / Gradle / Ivy

There is a newer version: 22.4.3
Show newest version
package io.split.qos.server.integrations.slack.commandintegration;

import com.google.common.base.Preconditions;

import java.util.List;
import java.util.Optional;

/**
 * Represents a command directed to the slack bot.
 */
public class SlackCommand {

    private final String command;
    private final List arguments;
    private final Optional server;

    /**
     * Default Constructor. User the static get.
     *
     * @param command Command issued.
     * @param arguments Arguments of the command.
     */
    SlackCommand(Optional server, String command, List arguments) {
        this.server = Preconditions.checkNotNull(server);
        this.command = Preconditions.checkNotNull(command);
        this.arguments = Preconditions.checkNotNull(arguments);
    }

    public Optional server() {
        return server;
    }

    public String command() {
        return command;
    }

    public List arguments() {
        return arguments;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy