io.weaviate.client.v1.graphql.query.argument.GroupArgument Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of client Show documentation
Show all versions of client Show documentation
A java client for Weaviate Vector Search Engine
// Generated by delombok at Tue Aug 22 16:14:12 UTC 2023
package io.weaviate.client.v1.graphql.query.argument;
import java.util.LinkedHashSet;
import java.util.Set;
public class GroupArgument implements Argument {
private final GroupType type;
private final Float force;
@Override
public String build() {
Set arg = new LinkedHashSet<>();
if (type != null) {
arg.add(String.format("type:%s", type));
}
if (force != null) {
arg.add(String.format("force:%s", force));
}
return String.format("group:{%s}", String.join(" ", arg));
}
@java.lang.SuppressWarnings("all")
GroupArgument(final GroupType type, final Float force) {
this.type = type;
this.force = force;
}
@java.lang.SuppressWarnings("all")
public static class GroupArgumentBuilder {
@java.lang.SuppressWarnings("all")
private GroupType type;
@java.lang.SuppressWarnings("all")
private Float force;
@java.lang.SuppressWarnings("all")
GroupArgumentBuilder() {
}
/**
* @return {@code this}.
*/
@java.lang.SuppressWarnings("all")
public GroupArgument.GroupArgumentBuilder type(final GroupType type) {
this.type = type;
return this;
}
/**
* @return {@code this}.
*/
@java.lang.SuppressWarnings("all")
public GroupArgument.GroupArgumentBuilder force(final Float force) {
this.force = force;
return this;
}
@java.lang.SuppressWarnings("all")
public GroupArgument build() {
return new GroupArgument(this.type, this.force);
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
public java.lang.String toString() {
return "GroupArgument.GroupArgumentBuilder(type=" + this.type + ", force=" + this.force + ")";
}
}
@java.lang.SuppressWarnings("all")
public static GroupArgument.GroupArgumentBuilder builder() {
return new GroupArgument.GroupArgumentBuilder();
}
@java.lang.SuppressWarnings("all")
public GroupType getType() {
return this.type;
}
@java.lang.SuppressWarnings("all")
public Float getForce() {
return this.force;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
public java.lang.String toString() {
return "GroupArgument(type=" + this.getType() + ", force=" + this.getForce() + ")";
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof GroupArgument)) return false;
final GroupArgument other = (GroupArgument) o;
if (!other.canEqual((java.lang.Object) this)) return false;
final java.lang.Object this$force = this.getForce();
final java.lang.Object other$force = other.getForce();
if (this$force == null ? other$force != null : !this$force.equals(other$force)) return false;
final java.lang.Object this$type = this.getType();
final java.lang.Object other$type = other.getType();
if (this$type == null ? other$type != null : !this$type.equals(other$type)) return false;
return true;
}
@java.lang.SuppressWarnings("all")
protected boolean canEqual(final java.lang.Object other) {
return other instanceof GroupArgument;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $force = this.getForce();
result = result * PRIME + ($force == null ? 43 : $force.hashCode());
final java.lang.Object $type = this.getType();
result = result * PRIME + ($type == null ? 43 : $type.hashCode());
return result;
}
}