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

com.spotify.styx.api.cli.AutoValue_ActiveStatesPayload_ActiveState Maven / Gradle / Ivy

There is a newer version: 2.0.24
Show newest version

package com.spotify.styx.api.cli;

import com.spotify.styx.model.EventSerializer.PersistentEvent;
import com.spotify.styx.model.WorkflowInstance;
import java.util.Optional;
import javax.annotation.Generated;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_ActiveStatesPayload_ActiveState extends ActiveStatesPayload.ActiveState {

  private final WorkflowInstance workflowInstance;
  private final String state;
  private final String lastExecutionId;
  private final Optional previousExecutionLastEvent;

  AutoValue_ActiveStatesPayload_ActiveState(
      WorkflowInstance workflowInstance,
      String state,
      String lastExecutionId,
      Optional previousExecutionLastEvent) {
    if (workflowInstance == null) {
      throw new NullPointerException("Null workflowInstance");
    }
    this.workflowInstance = workflowInstance;
    if (state == null) {
      throw new NullPointerException("Null state");
    }
    this.state = state;
    if (lastExecutionId == null) {
      throw new NullPointerException("Null lastExecutionId");
    }
    this.lastExecutionId = lastExecutionId;
    if (previousExecutionLastEvent == null) {
      throw new NullPointerException("Null previousExecutionLastEvent");
    }
    this.previousExecutionLastEvent = previousExecutionLastEvent;
  }

  @com.fasterxml.jackson.annotation.JsonProperty
  @Override
  public WorkflowInstance workflowInstance() {
    return workflowInstance;
  }

  @com.fasterxml.jackson.annotation.JsonProperty
  @Override
  public String state() {
    return state;
  }

  @com.fasterxml.jackson.annotation.JsonProperty
  @Override
  public String lastExecutionId() {
    return lastExecutionId;
  }

  @com.fasterxml.jackson.annotation.JsonProperty
  @Override
  public Optional previousExecutionLastEvent() {
    return previousExecutionLastEvent;
  }

  @Override
  public String toString() {
    return "ActiveState{"
        + "workflowInstance=" + workflowInstance + ", "
        + "state=" + state + ", "
        + "lastExecutionId=" + lastExecutionId + ", "
        + "previousExecutionLastEvent=" + previousExecutionLastEvent
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof ActiveStatesPayload.ActiveState) {
      ActiveStatesPayload.ActiveState that = (ActiveStatesPayload.ActiveState) o;
      return (this.workflowInstance.equals(that.workflowInstance()))
           && (this.state.equals(that.state()))
           && (this.lastExecutionId.equals(that.lastExecutionId()))
           && (this.previousExecutionLastEvent.equals(that.previousExecutionLastEvent()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h = 1;
    h *= 1000003;
    h ^= workflowInstance.hashCode();
    h *= 1000003;
    h ^= state.hashCode();
    h *= 1000003;
    h ^= lastExecutionId.hashCode();
    h *= 1000003;
    h ^= previousExecutionLastEvent.hashCode();
    return h;
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy