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

com.spotify.styx.state.AutoValue_RunState Maven / Gradle / Ivy

There is a newer version: 2.0.24
Show newest version

package com.spotify.styx.state;

import com.spotify.styx.model.ExecutionDescription;
import com.spotify.styx.model.WorkflowInstance;
import com.spotify.styx.util.Time;
import java.util.Optional;
import javax.annotation.Generated;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_RunState extends RunState {

  private final WorkflowInstance workflowInstance;
  private final RunState.State state;
  private final long timestamp;
  private final int tries;
  private final double retryCost;
  private final long retryDelayMillis;
  private final int lastExit;
  private final Optional executionId;
  private final Optional executionDescription;
  private final Time time;
  private final OutputHandler outputHandler;

  AutoValue_RunState(
      WorkflowInstance workflowInstance,
      RunState.State state,
      long timestamp,
      int tries,
      double retryCost,
      long retryDelayMillis,
      int lastExit,
      Optional executionId,
      Optional executionDescription,
      Time time,
      OutputHandler outputHandler) {
    if (workflowInstance == null) {
      throw new NullPointerException("Null workflowInstance");
    }
    this.workflowInstance = workflowInstance;
    if (state == null) {
      throw new NullPointerException("Null state");
    }
    this.state = state;
    this.timestamp = timestamp;
    this.tries = tries;
    this.retryCost = retryCost;
    this.retryDelayMillis = retryDelayMillis;
    this.lastExit = lastExit;
    if (executionId == null) {
      throw new NullPointerException("Null executionId");
    }
    this.executionId = executionId;
    if (executionDescription == null) {
      throw new NullPointerException("Null executionDescription");
    }
    this.executionDescription = executionDescription;
    if (time == null) {
      throw new NullPointerException("Null time");
    }
    this.time = time;
    if (outputHandler == null) {
      throw new NullPointerException("Null outputHandler");
    }
    this.outputHandler = outputHandler;
  }

  @Override
  public WorkflowInstance workflowInstance() {
    return workflowInstance;
  }

  @Override
  public RunState.State state() {
    return state;
  }

  @Override
  public long timestamp() {
    return timestamp;
  }

  @Override
  public int tries() {
    return tries;
  }

  @Override
  public double retryCost() {
    return retryCost;
  }

  @Override
  public long retryDelayMillis() {
    return retryDelayMillis;
  }

  @Override
  public int lastExit() {
    return lastExit;
  }

  @Override
  public Optional executionId() {
    return executionId;
  }

  @Override
  public Optional executionDescription() {
    return executionDescription;
  }

  @Override
  Time time() {
    return time;
  }

  @Override
  OutputHandler outputHandler() {
    return outputHandler;
  }

  @Override
  public String toString() {
    return "RunState{"
        + "workflowInstance=" + workflowInstance + ", "
        + "state=" + state + ", "
        + "timestamp=" + timestamp + ", "
        + "tries=" + tries + ", "
        + "retryCost=" + retryCost + ", "
        + "retryDelayMillis=" + retryDelayMillis + ", "
        + "lastExit=" + lastExit + ", "
        + "executionId=" + executionId + ", "
        + "executionDescription=" + executionDescription + ", "
        + "time=" + time + ", "
        + "outputHandler=" + outputHandler
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof RunState) {
      RunState that = (RunState) o;
      return (this.workflowInstance.equals(that.workflowInstance()))
           && (this.state.equals(that.state()))
           && (this.timestamp == that.timestamp())
           && (this.tries == that.tries())
           && (Double.doubleToLongBits(this.retryCost) == Double.doubleToLongBits(that.retryCost()))
           && (this.retryDelayMillis == that.retryDelayMillis())
           && (this.lastExit == that.lastExit())
           && (this.executionId.equals(that.executionId()))
           && (this.executionDescription.equals(that.executionDescription()))
           && (this.time.equals(that.time()))
           && (this.outputHandler.equals(that.outputHandler()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h = 1;
    h *= 1000003;
    h ^= workflowInstance.hashCode();
    h *= 1000003;
    h ^= state.hashCode();
    h *= 1000003;
    h ^= (timestamp >>> 32) ^ timestamp;
    h *= 1000003;
    h ^= tries;
    h *= 1000003;
    h ^= (Double.doubleToLongBits(retryCost) >>> 32) ^ Double.doubleToLongBits(retryCost);
    h *= 1000003;
    h ^= (retryDelayMillis >>> 32) ^ retryDelayMillis;
    h *= 1000003;
    h ^= lastExit;
    h *= 1000003;
    h ^= executionId.hashCode();
    h *= 1000003;
    h ^= executionDescription.hashCode();
    h *= 1000003;
    h ^= time.hashCode();
    h *= 1000003;
    h ^= outputHandler.hashCode();
    return h;
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy