Class TextBlock
-
- All Implemented Interfaces:
public final class TextBlock
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classTextBlock.BuilderA builder for TextBlock.
-
Method Summary
Modifier and Type Method Description final TextBlockParamtoParam()final Optional<List<TextCitation>>citations()Citations supporting the text block. final Stringtext()final JsonValue_type()Expected to always return the following:
However, this method can be useful for debugging and logging (e.g.JsonValue.from("text")final JsonField<List<TextCitation>>_citations()Returns the raw JSON value of citations. final JsonField<String>_text()Returns the raw JSON value of text. final Map<String, JsonValue>_additionalProperties()final TextBlock.BuildertoBuilder()final TextBlockvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static TextBlock.Builderbuilder()Returns a mutable builder for constructing an instance of TextBlock. -
-
Method Detail
-
toParam
final TextBlockParam toParam()
-
citations
final Optional<List<TextCitation>> citations()
Citations supporting the text block.
The type of citation returned will depend on the type of document being cited. Citing a PDF results in
page_location, plain text results inchar_location, and content document results incontent_block_location.
-
_type
final JsonValue _type()
Expected to always return the following:
JsonValue.from("text")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
_citations
final JsonField<List<TextCitation>> _citations()
Returns the raw JSON value of citations.
Unlike citations, this method doesn't throw if the JSON field has an unexpected type.
-
_text
final JsonField<String> _text()
Returns the raw JSON value of text.
Unlike text, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final TextBlock.Builder toBuilder()
-
validate
final TextBlock validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
builder
final static TextBlock.Builder builder()
Returns a mutable builder for constructing an instance of TextBlock.
The following fields are required:
.citations() .text()
-
-
-
-