This commit is contained in:
68
packages/java/dev/kreuzberg/FictionBookMetadata.java
generated
Normal file
68
packages/java/dev/kreuzberg/FictionBookMetadata.java
generated
Normal file
@@ -0,0 +1,68 @@
|
||||
// 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 java.util.List;
|
||||
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;
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* FictionBook (FB2) metadata.
|
||||
*/
|
||||
@JsonInclude(JsonInclude.Include.NON_ABSENT)
|
||||
@JsonDeserialize(builder = FictionBookMetadata.Builder.class)
|
||||
public record FictionBookMetadata(
|
||||
@Nullable @JsonProperty("genres") List<String> genres,
|
||||
@Nullable @JsonProperty("sequences") List<String> sequences,
|
||||
@Nullable @JsonProperty("annotation") String annotation
|
||||
) {
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
// CPD-OFF
|
||||
@JsonPOJOBuilder(withPrefix = "with", buildMethodName = "build")
|
||||
public static final class Builder {
|
||||
|
||||
private List<String> genres = null;
|
||||
private List<String> sequences = null;
|
||||
private String annotation = null;
|
||||
|
||||
/** Sets the genres field. */
|
||||
@JsonProperty("genres")
|
||||
public Builder withGenres(final @Nullable List<String> value) {
|
||||
this.genres = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
/** Sets the sequences field. */
|
||||
@JsonProperty("sequences")
|
||||
public Builder withSequences(final @Nullable List<String> value) {
|
||||
this.sequences = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
/** Sets the annotation field. */
|
||||
@JsonProperty("annotation")
|
||||
public Builder withAnnotation(final @Nullable String value) {
|
||||
this.annotation = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
/** Builds the FictionBookMetadata instance. */
|
||||
public FictionBookMetadata build() {
|
||||
return new FictionBookMetadata(
|
||||
genres,
|
||||
sequences,
|
||||
annotation
|
||||
);
|
||||
}
|
||||
}
|
||||
// CPD-ON
|
||||
}
|
||||
Reference in New Issue
Block a user