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

com.hubspot.deploy.ExternalArtifact Maven / Gradle / Ivy

The newest version!
package com.hubspot.deploy;

import java.util.Objects;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.base.Optional;

public class ExternalArtifact extends RemoteArtifact {

  private final String url;

  @JsonCreator
  public ExternalArtifact(@JsonProperty("name") String name, @JsonProperty("filename") String filename, @JsonProperty("md5sum") Optional md5sum,
      @JsonProperty("url") String url, @JsonProperty("filesize") Optional filesize, @JsonProperty("targetFolderRelativeToTask") Optional targetFolderRelativeToTask) {
    super(name, filename, md5sum, filesize, targetFolderRelativeToTask);
    this.url = url;
  }

  public String getUrl() {
    return url;
  }

  @Override
  public int hashCode() {
    return Objects.hash(super.hashCode(), url);
  }

  @Override
  public boolean equals(Object other) {
    if (this == other) {
      return true;
    }
    if (other == null || other.getClass() != this.getClass()) {
      return false;
    }
    if (!super.equals(other)) {
      return false;
    }

    ExternalArtifact that = (ExternalArtifact) other;
    return Objects.equals(this.url, that.url);
  }

  @Override
  public String toString() {
    return "ExternalArtifact [url=" + url + ", parent=" + super.toString() + "]";
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy