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

com.spotify.docker.client.messages.AutoValue_DockerCredentialHelperAuth Maven / Gradle / Ivy

There is a newer version: 8.16.0
Show newest version

package com.spotify.docker.client.messages;

import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.Generated;
import javax.annotation.Nullable;

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

  private final String username;
  private final String secret;
  private final String serverUrl;

  AutoValue_DockerCredentialHelperAuth(
      String username,
      String secret,
      @Nullable String serverUrl) {
    if (username == null) {
      throw new NullPointerException("Null username");
    }
    this.username = username;
    if (secret == null) {
      throw new NullPointerException("Null secret");
    }
    this.secret = secret;
    this.serverUrl = serverUrl;
  }

  @JsonProperty(value = "Username")
  @Override
  public String username() {
    return username;
  }

  @JsonProperty(value = "Secret")
  @Override
  public String secret() {
    return secret;
  }

  @Nullable
  @JsonProperty(value = "ServerURL")
  @Override
  public String serverUrl() {
    return serverUrl;
  }

  @Override
  public String toString() {
    return "DockerCredentialHelperAuth{"
        + "username=" + username + ", "
        + "secret=" + secret + ", "
        + "serverUrl=" + serverUrl
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof DockerCredentialHelperAuth) {
      DockerCredentialHelperAuth that = (DockerCredentialHelperAuth) o;
      return (this.username.equals(that.username()))
           && (this.secret.equals(that.secret()))
           && ((this.serverUrl == null) ? (that.serverUrl() == null) : this.serverUrl.equals(that.serverUrl()));
    }
    return false;
  }

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy