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

com.spotify.docker.client.messages.swarm.AutoValue_Placement Maven / Gradle / Ivy

There is a newer version: 8.16.0
Show newest version

package com.spotify.docker.client.messages.swarm;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.collect.ImmutableList;
import javax.annotation.Generated;
import javax.annotation.Nullable;

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

  private final ImmutableList constraints;
  private final ImmutableList preferences;

  AutoValue_Placement(
      @Nullable ImmutableList constraints,
      @Nullable ImmutableList preferences) {
    this.constraints = constraints;
    this.preferences = preferences;
  }

  @Nullable
  @JsonProperty(value = "Constraints")
  @Override
  public ImmutableList constraints() {
    return constraints;
  }

  @Nullable
  @JsonProperty(value = "Preferences")
  @Override
  public ImmutableList preferences() {
    return preferences;
  }

  @Override
  public String toString() {
    return "Placement{"
        + "constraints=" + constraints + ", "
        + "preferences=" + preferences
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof Placement) {
      Placement that = (Placement) o;
      return ((this.constraints == null) ? (that.constraints() == null) : this.constraints.equals(that.constraints()))
           && ((this.preferences == null) ? (that.preferences() == null) : this.preferences.equals(that.preferences()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h = 1;
    h *= 1000003;
    h ^= (constraints == null) ? 0 : this.constraints.hashCode();
    h *= 1000003;
    h ^= (preferences == null) ? 0 : this.preferences.hashCode();
    return h;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy