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

io.deepsense.neptune.clientlibrary.parsers.jobargumentsparser.OnlineJobArguments Maven / Gradle / Ivy

There is a newer version: 1.6.1
Show newest version
/**
 * Copyright (c) 2016, CodiLime Inc.
 */

package io.deepsense.neptune.clientlibrary.parsers.jobargumentsparser;

import com.google.common.base.Preconditions;

import java.net.URI;
import java.util.Objects;
import java.util.UUID;

public class OnlineJobArguments extends JobArguments {

    private final URI restApiUrl;

    private final URI websocketApiUrl;

    public OnlineJobArguments(URI restApiUrl, URI websocketApiUrl, UUID jobId, boolean debug) {
        super(jobId, debug, false);
        this.restApiUrl = Preconditions.checkNotNull(restApiUrl);
        this.websocketApiUrl = Preconditions.checkNotNull(websocketApiUrl);
    }

    public URI getRestApiUrl() {
        return restApiUrl;
    }

    public URI getWebsocketApiUrl() {
        return websocketApiUrl;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        OnlineJobArguments that = (OnlineJobArguments) o;
        return Objects.equals(restApiUrl, that.restApiUrl)
                && Objects.equals(websocketApiUrl, that.websocketApiUrl)
                && Objects.equals(getJobId(), that.getJobId())
                && isDebug() == that.isDebug()
                && isOffline() == that.isOffline();
    }

    @Override
    public int hashCode() {
        return Objects.hash(restApiUrl, websocketApiUrl, getJobId(), isDebug(), isOffline());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy