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

com.hubspot.singularity.SingularityTaskShellCommandUpdate Maven / Gradle / Ivy

The newest version!
package com.hubspot.singularity;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.base.Optional;

public class SingularityTaskShellCommandUpdate {

  public enum UpdateType {
    INVALID, ACKED, STARTED, FINISHED, FAILED;
  }

  private final SingularityTaskShellCommandRequestId shellRequestId;
  private final long timestamp;
  private final Optional message;
  private final Optional outputFilename;
  private final UpdateType updateType;

  @JsonCreator
  public SingularityTaskShellCommandUpdate(@JsonProperty("shellRequestId") SingularityTaskShellCommandRequestId shellRequestId, @JsonProperty("timestamp") long timestamp,
      @JsonProperty("message") Optional message, @JsonProperty("outputFilename") Optional outputFilename, @JsonProperty("updateType") UpdateType updateType) {
    this.shellRequestId = shellRequestId;
    this.timestamp = timestamp;
    this.message = message;
    this.outputFilename = outputFilename;
    this.updateType = updateType;
  }

  public SingularityTaskShellCommandRequestId getShellRequestId() {
    return shellRequestId;
  }

  public long getTimestamp() {
    return timestamp;
  }

  public Optional getMessage() {
    return message;
  }

  public Optional getOutputFilename() {
    return outputFilename;
  }

  public UpdateType getUpdateType() {
    return updateType;
  }

  @Override
  public String toString() {
    return "SingularityTaskShellCommandUpdate[" +
            "shellRequestId=" + shellRequestId +
            ", timestamp=" + timestamp +
            ", message=" + message +
            ", outputFilename=" + outputFilename +
            ", updateType=" + updateType +
            ']';
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy