dev.cel.common.ast.AutoValue_CelExpr_CelStruct Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of runtime Show documentation
Show all versions of runtime Show documentation
Common Expression Language Runtime for Java
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_CelStruct extends CelExpr.CelStruct {
private final String messageName;
private final ImmutableList entries;
private AutoValue_CelExpr_CelStruct(
String messageName,
ImmutableList entries) {
this.messageName = messageName;
this.entries = entries;
}
@Override
public String messageName() {
return messageName;
}
@Override
public ImmutableList entries() {
return entries;
}
@Override
public String toString() {
return "CelStruct{"
+ "messageName=" + messageName + ", "
+ "entries=" + entries
+ "}";
}
@Override
public boolean equals(@Nullable Object o) {
if (o == this) {
return true;
}
if (o instanceof CelExpr.CelStruct) {
CelExpr.CelStruct that = (CelExpr.CelStruct) o;
return this.messageName.equals(that.messageName())
&& this.entries.equals(that.entries());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= messageName.hashCode();
h$ *= 1000003;
h$ ^= entries.hashCode();
return h$;
}
@Override
CelExpr.CelStruct.Builder autoToBuilder() {
return new Builder(this);
}
static final class Builder extends CelExpr.CelStruct.Builder {
private @Nullable String messageName;
private @Nullable ImmutableList entries;
Builder() {
}
private Builder(CelExpr.CelStruct source) {
this.messageName = source.messageName();
this.entries = source.entries();
}
@Override
public CelExpr.CelStruct.Builder setMessageName(String messageName) {
if (messageName == null) {
throw new NullPointerException("Null messageName");
}
this.messageName = messageName;
return this;
}
@Override
CelExpr.CelStruct.Builder setEntries(ImmutableList entries) {
if (entries == null) {
throw new NullPointerException("Null entries");
}
this.entries = entries;
return this;
}
@Override
ImmutableList entries() {
if (this.entries == null) {
throw new IllegalStateException("Property \"entries\" has not been set");
}
return entries;
}
@Override
CelExpr.CelStruct autoBuild() {
if (this.messageName == null
|| this.entries == null) {
StringBuilder missing = new StringBuilder();
if (this.messageName == null) {
missing.append(" messageName");
}
if (this.entries == null) {
missing.append(" entries");
}
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_CelExpr_CelStruct(
this.messageName,
this.entries);
}
}
}