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

hydra.ext.dev.osv.schema.PackageVersions Maven / Gradle / Ivy

There is a newer version: 0.8.1
Show newest version
// Note: this is an automatically generated file. Do not edit.

package hydra.ext.dev.osv.schema;

import java.io.Serializable;

public class PackageVersions implements Serializable {
  public static final hydra.core.Name TYPE_NAME = new hydra.core.Name("hydra/ext/dev/osv/schema.PackageVersions");
  
  public static final hydra.core.Name FIELD_NAME_PACKAGE = new hydra.core.Name("package");
  
  public static final hydra.core.Name FIELD_NAME_RANGES = new hydra.core.Name("ranges");
  
  public static final hydra.core.Name FIELD_NAME_VERSIONS = new hydra.core.Name("versions");
  
  public final hydra.ext.dev.osv.schema.Package_ package_;
  
  public final hydra.util.Opt> ranges;
  
  public final hydra.util.Opt> versions;
  
  public PackageVersions (hydra.ext.dev.osv.schema.Package_ package_, hydra.util.Opt> ranges, hydra.util.Opt> versions) {
    java.util.Objects.requireNonNull((package_));
    java.util.Objects.requireNonNull((ranges));
    java.util.Objects.requireNonNull((versions));
    this.package_ = package_;
    this.ranges = ranges;
    this.versions = versions;
  }
  
  @Override
  public boolean equals(Object other) {
    if (!(other instanceof PackageVersions)) {
      return false;
    }
    PackageVersions o = (PackageVersions) (other);
    return package_.equals(o.package_) && ranges.equals(o.ranges) && versions.equals(o.versions);
  }
  
  @Override
  public int hashCode() {
    return 2 * package_.hashCode() + 3 * ranges.hashCode() + 5 * versions.hashCode();
  }
  
  public PackageVersions withPackage(hydra.ext.dev.osv.schema.Package_ package_) {
    java.util.Objects.requireNonNull((package_));
    return new PackageVersions(package_, ranges, versions);
  }
  
  public PackageVersions withRanges(hydra.util.Opt> ranges) {
    java.util.Objects.requireNonNull((ranges));
    return new PackageVersions(package_, ranges, versions);
  }
  
  public PackageVersions withVersions(hydra.util.Opt> versions) {
    java.util.Objects.requireNonNull((versions));
    return new PackageVersions(package_, ranges, versions);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy