dev.cel.common.ast.AutoValue_CelExpr_CelCreateStruct Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of validators Show documentation
Show all versions of validators Show documentation
Common Expression Language Validators for Java
The newest version!
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_CelCreateStruct extends CelExpr.CelCreateStruct {
private final String messageName;
private final ImmutableList entries;
private AutoValue_CelExpr_CelCreateStruct(
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 "CelCreateStruct{"
+ "messageName=" + messageName + ", "
+ "entries=" + entries
+ "}";
}
@Override
public boolean equals(@Nullable Object o) {
if (o == this) {
return true;
}
if (o instanceof CelExpr.CelCreateStruct) {
CelExpr.CelCreateStruct that = (CelExpr.CelCreateStruct) 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.CelCreateStruct.Builder autoToBuilder() {
return new Builder(this);
}
static final class Builder extends CelExpr.CelCreateStruct.Builder {
private @Nullable String messageName;
private @Nullable ImmutableList entries;
Builder() {
}
private Builder(CelExpr.CelCreateStruct source) {
this.messageName = source.messageName();
this.entries = source.entries();
}
@Override
public CelExpr.CelCreateStruct.Builder setMessageName(String messageName) {
if (messageName == null) {
throw new NullPointerException("Null messageName");
}
this.messageName = messageName;
return this;
}
@Override
CelExpr.CelCreateStruct.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.CelCreateStruct 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_CelCreateStruct(
this.messageName,
this.entries);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy