hydra.langs.graphql.syntax.Field Maven / Gradle / Ivy
package hydra.langs.graphql.syntax;
import java.io.Serializable;
public class Field implements Serializable {
public static final hydra.core.Name NAME = new hydra.core.Name("hydra/langs/graphql/syntax.Field");
public final java.util.Optional alias;
public final hydra.langs.graphql.syntax.Name name;
public final java.util.Optional arguments;
public final java.util.Optional directives;
public final java.util.Optional selectionSet;
public Field (java.util.Optional alias, hydra.langs.graphql.syntax.Name name, java.util.Optional arguments, java.util.Optional directives, java.util.Optional selectionSet) {
this.alias = alias;
this.name = name;
this.arguments = arguments;
this.directives = directives;
this.selectionSet = selectionSet;
}
@Override
public boolean equals(Object other) {
if (!(other instanceof Field)) {
return false;
}
Field o = (Field) (other);
return alias.equals(o.alias) && name.equals(o.name) && arguments.equals(o.arguments) && directives.equals(o.directives) && selectionSet.equals(o.selectionSet);
}
@Override
public int hashCode() {
return 2 * alias.hashCode() + 3 * name.hashCode() + 5 * arguments.hashCode() + 7 * directives.hashCode() + 11 * selectionSet.hashCode();
}
public Field withAlias(java.util.Optional alias) {
return new Field(alias, name, arguments, directives, selectionSet);
}
public Field withName(hydra.langs.graphql.syntax.Name name) {
return new Field(alias, name, arguments, directives, selectionSet);
}
public Field withArguments(java.util.Optional arguments) {
return new Field(alias, name, arguments, directives, selectionSet);
}
public Field withDirectives(java.util.Optional directives) {
return new Field(alias, name, arguments, directives, selectionSet);
}
public Field withSelectionSet(java.util.Optional selectionSet) {
return new Field(alias, name, arguments, directives, selectionSet);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy