Files
fil/packages/java/dev/kreuzberg/ErrorMetadata.java

58 lines
1.7 KiB
Java
Raw Normal View History

2026-06-01 23:40:55 +02:00
// This file is auto-generated by alef — DO NOT EDIT.
// alef:hash:4e15143f4af1ae8bafbdb1506ef057da924484c66a19483966333558ad437e75
// To regenerate: alef generate
// To verify freshness: alef verify --exit-code
// Issues & docs: https://github.com/kreuzberg-dev/alef
package dev.kreuzberg;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder;
/**
* Error metadata (for batch operations).
*/
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = ErrorMetadata.Builder.class)
public record ErrorMetadata(
@JsonProperty("error_type") String errorType,
@JsonProperty("message") String message
) {
public static Builder builder() {
return new Builder();
}
// CPD-OFF
@JsonPOJOBuilder(withPrefix = "with", buildMethodName = "build")
public static final class Builder {
@JsonProperty("error_type")
private String errorType = "";
private String message = "";
/** Sets the errorType field. */
@JsonProperty("error_type")
public Builder withErrorType(final String value) {
this.errorType = value;
return this;
}
/** Sets the message field. */
@JsonProperty("message")
public Builder withMessage(final String value) {
this.message = value;
return this;
}
/** Builds the ErrorMetadata instance. */
public ErrorMetadata build() {
return new ErrorMetadata(
errorType,
message
);
}
}
// CPD-ON
}