This commit is contained in:
89
packages/java/dev/kreuzberg/DjotLink.java
generated
Normal file
89
packages/java/dev/kreuzberg/DjotLink.java
generated
Normal file
@@ -0,0 +1,89 @@
|
||||
// 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;
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Link element in Djot.
|
||||
*/
|
||||
@JsonInclude(JsonInclude.Include.NON_ABSENT)
|
||||
@JsonDeserialize(builder = DjotLink.Builder.class)
|
||||
public record DjotLink(
|
||||
/**
|
||||
* Link URL
|
||||
*/
|
||||
@JsonProperty("url") String url,
|
||||
/**
|
||||
* Link text content
|
||||
*/
|
||||
@JsonProperty("text") String text,
|
||||
/**
|
||||
* Optional title
|
||||
*/
|
||||
@Nullable @JsonProperty("title") String title,
|
||||
/**
|
||||
* Element attributes
|
||||
*/
|
||||
@Nullable @JsonProperty("attributes") String attributes
|
||||
) {
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
// CPD-OFF
|
||||
@JsonPOJOBuilder(withPrefix = "with", buildMethodName = "build")
|
||||
public static final class Builder {
|
||||
|
||||
private String url = "";
|
||||
private String text = "";
|
||||
private String title = null;
|
||||
private String attributes = null;
|
||||
|
||||
/** Sets the url field. */
|
||||
@JsonProperty("url")
|
||||
public Builder withUrl(final String value) {
|
||||
this.url = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
/** Sets the text field. */
|
||||
@JsonProperty("text")
|
||||
public Builder withText(final String value) {
|
||||
this.text = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
/** Sets the title field. */
|
||||
@JsonProperty("title")
|
||||
public Builder withTitle(final @Nullable String value) {
|
||||
this.title = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
/** Sets the attributes field. */
|
||||
@JsonProperty("attributes")
|
||||
public Builder withAttributes(final @Nullable String value) {
|
||||
this.attributes = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
/** Builds the DjotLink instance. */
|
||||
public DjotLink build() {
|
||||
return new DjotLink(
|
||||
url,
|
||||
text,
|
||||
title,
|
||||
attributes
|
||||
);
|
||||
}
|
||||
}
|
||||
// CPD-ON
|
||||
}
|
||||
Reference in New Issue
Block a user