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

com.spotify.styx.model.data.AutoValue_Trigger Maven / Gradle / Ivy

There is a newer version: 2.1.179
Show newest version

package com.spotify.styx.model.data;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.spotify.styx.model.TriggerParameters;
import java.time.Instant;
import java.util.List;
import javax.annotation.processing.Generated;

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

  private final String triggerId;
  private final Instant timestamp;
  private final TriggerParameters parameters;
  private final boolean complete;
  private final List executions;

  AutoValue_Trigger(
      String triggerId,
      Instant timestamp,
      TriggerParameters parameters,
      boolean complete,
      List executions) {
    if (triggerId == null) {
      throw new NullPointerException("Null triggerId");
    }
    this.triggerId = triggerId;
    if (timestamp == null) {
      throw new NullPointerException("Null timestamp");
    }
    this.timestamp = timestamp;
    if (parameters == null) {
      throw new NullPointerException("Null parameters");
    }
    this.parameters = parameters;
    this.complete = complete;
    if (executions == null) {
      throw new NullPointerException("Null executions");
    }
    this.executions = executions;
  }

  @JsonProperty
  @Override
  public String triggerId() {
    return triggerId;
  }

  @JsonProperty
  @Override
  public Instant timestamp() {
    return timestamp;
  }

  @JsonProperty
  @Override
  public TriggerParameters parameters() {
    return parameters;
  }

  @JsonProperty
  @Override
  public boolean complete() {
    return complete;
  }

  @JsonProperty
  @Override
  public List executions() {
    return executions;
  }

  @Override
  public String toString() {
    return "Trigger{"
         + "triggerId=" + triggerId + ", "
         + "timestamp=" + timestamp + ", "
         + "parameters=" + parameters + ", "
         + "complete=" + complete + ", "
         + "executions=" + executions
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof Trigger) {
      Trigger that = (Trigger) o;
      return (this.triggerId.equals(that.triggerId()))
           && (this.timestamp.equals(that.timestamp()))
           && (this.parameters.equals(that.parameters()))
           && (this.complete == that.complete())
           && (this.executions.equals(that.executions()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h = 1;
    h *= 1000003;
    h ^= this.triggerId.hashCode();
    h *= 1000003;
    h ^= this.timestamp.hashCode();
    h *= 1000003;
    h ^= this.parameters.hashCode();
    h *= 1000003;
    h ^= this.complete ? 1231 : 1237;
    h *= 1000003;
    h ^= this.executions.hashCode();
    return h;
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy