hydra.ext.com.microsoft.kusto.kql.Columns 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
The newest version!
// Note: this is an automatically generated file. Do not edit.
package hydra.ext.com.microsoft.kusto.kql;
import java.io.Serializable;
public abstract class Columns implements Serializable {
public static final hydra.core.Name TYPE_NAME = new hydra.core.Name("hydra/ext/com/microsoft/kusto/kql.Columns");
public static final hydra.core.Name FIELD_NAME_ALL = new hydra.core.Name("all");
public static final hydra.core.Name FIELD_NAME_SINGLE = new hydra.core.Name("single");
private Columns () {
}
public abstract R accept(Visitor visitor) ;
public interface Visitor {
R visit(All instance) ;
R visit(Single instance) ;
}
public interface PartialVisitor extends Visitor {
default R otherwise(Columns instance) {
throw new IllegalStateException("Non-exhaustive patterns when matching: " + (instance));
}
default R visit(All instance) {
return otherwise((instance));
}
default R visit(Single instance) {
return otherwise((instance));
}
}
public static final class All extends hydra.ext.com.microsoft.kusto.kql.Columns implements Serializable {
public All () {
}
@Override
public boolean equals(Object other) {
if (!(other instanceof All)) {
return false;
}
All o = (All) (other);
return true;
}
@Override
public int hashCode() {
return 0;
}
@Override
public R accept(Visitor visitor) {
return visitor.visit(this);
}
}
public static final class Single extends hydra.ext.com.microsoft.kusto.kql.Columns implements Serializable {
public final hydra.ext.com.microsoft.kusto.kql.ColumnName value;
public Single (hydra.ext.com.microsoft.kusto.kql.ColumnName value) {
java.util.Objects.requireNonNull((value));
this.value = value;
}
@Override
public boolean equals(Object other) {
if (!(other instanceof Single)) {
return false;
}
Single o = (Single) (other);
return value.equals(o.value);
}
@Override
public int hashCode() {
return 2 * value.hashCode();
}
@Override
public R accept(Visitor visitor) {
return visitor.visit(this);
}
}
}