Skip to content

Latest commit

 

History

History
40 lines (29 loc) · 1.66 KB

annotations.md

File metadata and controls

40 lines (29 loc) · 1.66 KB

Annotations

Styling annotations applied to the text.

This model accepts additional fields of type Object.

Structure

Annotations

Fields

Name Type Tags Description Getter Setter
Bold Boolean Optional Whether the text is bold. Boolean getBold() setBold(Boolean bold)
Italic Boolean Optional Whether the text is italic. Boolean getItalic() setItalic(Boolean italic)
Strikethrough Boolean Optional Whether the text has a strikethrough. Boolean getStrikethrough() setStrikethrough(Boolean strikethrough)
Underline Boolean Optional Whether the text is underlined. Boolean getUnderline() setUnderline(Boolean underline)
Code Boolean Optional Whether the text is formatted as inline code. Boolean getCode() setCode(Boolean code)
Color String Optional The color of the text. Possible values include default, gray, brown, orange, yellow, green, blue, purple, pink, red, and their background variants (e.g., gray_background). String getColor() setColor(String color)
AdditionalProperties Map<String, Object> Optional - Object getAdditionalProperty(String key) additionalProperty(String key, Object value)

Example

import com.notion.api.ApiHelper;
import com.notion.api.models.Annotations;
import java.io.IOException;

Annotations annotations = new Annotations.Builder()
    .bold(false)
    .italic(false)
    .strikethrough(false)
    .underline(false)
    .code(false)
.additionalProperty("exampleAdditionalProperty", ApiHelper.deserialize("{\"key1\":\"val1\",\"key2\":\"val2\"}"))
    .build();