
dev.cel.common.ast.AutoValue_CelExpr_CelCreateList Maven / Gradle / Ivy
package dev.cel.common.ast;
import com.google.common.collect.ImmutableList;
import org.jspecify.nullness.Nullable;
// Generated by com.google.auto.value.processor.AutoValueProcessor
final class AutoValue_CelExpr_CelCreateList extends CelExpr.CelCreateList {
private final ImmutableList elements;
private final ImmutableList optionalIndices;
private AutoValue_CelExpr_CelCreateList(
ImmutableList elements,
ImmutableList optionalIndices) {
this.elements = elements;
this.optionalIndices = optionalIndices;
}
@Override
public ImmutableList elements() {
return elements;
}
@Override
public ImmutableList optionalIndices() {
return optionalIndices;
}
@Override
public String toString() {
return "CelCreateList{"
+ "elements=" + elements + ", "
+ "optionalIndices=" + optionalIndices
+ "}";
}
@Override
public boolean equals(@Nullable Object o) {
if (o == this) {
return true;
}
if (o instanceof CelExpr.CelCreateList) {
CelExpr.CelCreateList that = (CelExpr.CelCreateList) o;
return this.elements.equals(that.elements())
&& this.optionalIndices.equals(that.optionalIndices());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= elements.hashCode();
h$ *= 1000003;
h$ ^= optionalIndices.hashCode();
return h$;
}
@Override
CelExpr.CelCreateList.Builder autoToBuilder() {
return new Builder(this);
}
static final class Builder extends CelExpr.CelCreateList.Builder {
private @Nullable ImmutableList elements;
private ImmutableList.@Nullable Builder optionalIndicesBuilder$;
private @Nullable ImmutableList optionalIndices;
Builder() {
}
private Builder(CelExpr.CelCreateList source) {
this.elements = source.elements();
this.optionalIndices = source.optionalIndices();
}
@Override
CelExpr.CelCreateList.Builder setElements(ImmutableList elements) {
if (elements == null) {
throw new NullPointerException("Null elements");
}
this.elements = elements;
return this;
}
@Override
ImmutableList elements() {
if (this.elements == null) {
throw new IllegalStateException("Property \"elements\" has not been set");
}
return elements;
}
@Override
ImmutableList.Builder optionalIndicesBuilder() {
if (optionalIndicesBuilder$ == null) {
if (optionalIndices == null) {
optionalIndicesBuilder$ = ImmutableList.builder();
} else {
optionalIndicesBuilder$ = ImmutableList.builder();
optionalIndicesBuilder$.addAll(optionalIndices);
optionalIndices = null;
}
}
return optionalIndicesBuilder$;
}
@Override
CelExpr.CelCreateList autoBuild() {
if (optionalIndicesBuilder$ != null) {
this.optionalIndices = optionalIndicesBuilder$.build();
} else if (this.optionalIndices == null) {
this.optionalIndices = ImmutableList.of();
}
if (this.elements == null) {
String missing = " elements";
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_CelExpr_CelCreateList(
this.elements,
this.optionalIndices);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy