dev.cel.common.ast.AutoValue_CelExpr_CelCreateStruct_Entry 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 org.jspecify.nullness.Nullable;
// Generated by com.google.auto.value.processor.AutoValueProcessor
final class AutoValue_CelExpr_CelCreateStruct_Entry extends CelExpr.CelCreateStruct.Entry {
private final long id;
private final String fieldKey;
private final CelExpr value;
private final boolean optionalEntry;
private AutoValue_CelExpr_CelCreateStruct_Entry(
long id,
String fieldKey,
CelExpr value,
boolean optionalEntry) {
this.id = id;
this.fieldKey = fieldKey;
this.value = value;
this.optionalEntry = optionalEntry;
}
@Override
public long id() {
return id;
}
@Override
public String fieldKey() {
return fieldKey;
}
@Override
public CelExpr value() {
return value;
}
@Override
public boolean optionalEntry() {
return optionalEntry;
}
@Override
public String toString() {
return "Entry{"
+ "id=" + id + ", "
+ "fieldKey=" + fieldKey + ", "
+ "value=" + value + ", "
+ "optionalEntry=" + optionalEntry
+ "}";
}
@Override
public boolean equals(@Nullable Object o) {
if (o == this) {
return true;
}
if (o instanceof CelExpr.CelCreateStruct.Entry) {
CelExpr.CelCreateStruct.Entry that = (CelExpr.CelCreateStruct.Entry) o;
return this.id == that.id()
&& this.fieldKey.equals(that.fieldKey())
&& this.value.equals(that.value())
&& this.optionalEntry == that.optionalEntry();
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= (int) ((id >>> 32) ^ id);
h$ *= 1000003;
h$ ^= fieldKey.hashCode();
h$ *= 1000003;
h$ ^= value.hashCode();
h$ *= 1000003;
h$ ^= optionalEntry ? 1231 : 1237;
return h$;
}
@Override
public CelExpr.CelCreateStruct.Entry.Builder toBuilder() {
return new Builder(this);
}
static final class Builder extends CelExpr.CelCreateStruct.Entry.Builder {
private long id;
private @Nullable String fieldKey;
private @Nullable CelExpr value;
private boolean optionalEntry;
private byte set$0;
Builder() {
}
private Builder(CelExpr.CelCreateStruct.Entry source) {
this.id = source.id();
this.fieldKey = source.fieldKey();
this.value = source.value();
this.optionalEntry = source.optionalEntry();
set$0 = (byte) 3;
}
@Override
public CelExpr.CelCreateStruct.Entry.Builder setId(long id) {
this.id = id;
set$0 |= (byte) 1;
return this;
}
@Override
public long id() {
if ((set$0 & 1) == 0) {
throw new IllegalStateException("Property \"id\" has not been set");
}
return id;
}
@Override
public CelExpr.CelCreateStruct.Entry.Builder setFieldKey(String fieldKey) {
if (fieldKey == null) {
throw new NullPointerException("Null fieldKey");
}
this.fieldKey = fieldKey;
return this;
}
@Override
public CelExpr.CelCreateStruct.Entry.Builder setValue(CelExpr value) {
if (value == null) {
throw new NullPointerException("Null value");
}
this.value = value;
return this;
}
@Override
public CelExpr value() {
if (this.value == null) {
throw new IllegalStateException("Property \"value\" has not been set");
}
return value;
}
@Override
public CelExpr.CelCreateStruct.Entry.Builder setOptionalEntry(boolean optionalEntry) {
this.optionalEntry = optionalEntry;
set$0 |= (byte) 2;
return this;
}
@Override
public CelExpr.CelCreateStruct.Entry build() {
if (set$0 != 3
|| this.fieldKey == null
|| this.value == null) {
StringBuilder missing = new StringBuilder();
if ((set$0 & 1) == 0) {
missing.append(" id");
}
if (this.fieldKey == null) {
missing.append(" fieldKey");
}
if (this.value == null) {
missing.append(" value");
}
if ((set$0 & 2) == 0) {
missing.append(" optionalEntry");
}
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_CelExpr_CelCreateStruct_Entry(
this.id,
this.fieldKey,
this.value,
this.optionalEntry);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy