hydra.ext.org.apache.atlas.AtlasConstraintDef Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hydra-ext Show documentation
Show all versions of hydra-ext Show documentation
Hydra language extensions in Java; models, coders, and utilities
// Note: this is an automatically generated file. Do not edit.
package hydra.ext.org.apache.atlas;
import java.io.Serializable;
/**
* class that captures details of a constraint.
*/
public class AtlasConstraintDef implements Serializable {
public static final hydra.core.Name TYPE_NAME = new hydra.core.Name("hydra/ext/org/apache/atlas.AtlasConstraintDef");
public static final hydra.core.Name FIELD_NAME_TYPE = new hydra.core.Name("type");
public static final hydra.core.Name FIELD_NAME_PARAMS = new hydra.core.Name("params");
public final hydra.util.Opt type;
public final java.util.Map params;
public AtlasConstraintDef (hydra.util.Opt type, java.util.Map params) {
java.util.Objects.requireNonNull((type));
java.util.Objects.requireNonNull((params));
this.type = type;
this.params = params;
}
@Override
public boolean equals(Object other) {
if (!(other instanceof AtlasConstraintDef)) {
return false;
}
AtlasConstraintDef o = (AtlasConstraintDef) (other);
return type.equals(o.type) && params.equals(o.params);
}
@Override
public int hashCode() {
return 2 * type.hashCode() + 3 * params.hashCode();
}
public AtlasConstraintDef withType(hydra.util.Opt type) {
java.util.Objects.requireNonNull((type));
return new AtlasConstraintDef(type, params);
}
public AtlasConstraintDef withParams(java.util.Map params) {
java.util.Objects.requireNonNull((params));
return new AtlasConstraintDef(type, params);
}
}