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
The newest version!
package dev.cel.common.ast;
import com.google.common.collect.ImmutableList;
// 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(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 AutoValue_CelExpr_CelStruct.Builder(this);
}
static final class Builder extends CelExpr.CelStruct.Builder {
private String messageName;
private ImmutableList entries;
Builder() {
}
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);
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy