Class TextBlock.Builder
-
- All Implemented Interfaces:
public final class TextBlock.BuilderA builder for TextBlock.
-
-
Method Summary
Modifier and Type Method Description final TextBlock.Buildercitations(List<TextCitation> citations)Citations supporting the text block. final TextBlock.Buildercitations(Optional<List<TextCitation>> citations)Alias for calling Builder.citations with citations.orElse(null).final TextBlock.Buildercitations(JsonField<List<TextCitation>> citations)Sets Builder.citations to an arbitrary JSON value. final TextBlock.BuilderaddCitation(TextCitation citation)Adds a single TextCitation to citations. final TextBlock.BuilderaddCitation(CitationCharLocation charLocation)Alias for calling addCitation with TextCitation.ofCharLocation(charLocation).final TextBlock.BuilderaddCitation(CitationPageLocation pageLocation)Alias for calling addCitation with TextCitation.ofPageLocation(pageLocation).final TextBlock.BuilderaddCitation(CitationContentBlockLocation contentBlockLocation)Alias for calling addCitation with TextCitation.ofContentBlockLocation(contentBlockLocation).final TextBlock.BuilderaddCitation(CitationsWebSearchResultLocation webSearchResultLocation)Alias for calling addCitation with TextCitation.ofWebSearchResultLocation(webSearchResultLocation).final TextBlock.Buildertext(String text)final TextBlock.Buildertext(JsonField<String> text)Sets Builder.text to an arbitrary JSON value. final TextBlock.Buildertype(JsonValue type)Sets the field to an arbitrary JSON value. final TextBlock.BuilderadditionalProperties(Map<String, JsonValue> additionalProperties)final TextBlock.BuilderputAdditionalProperty(String key, JsonValue value)final TextBlock.BuilderputAllAdditionalProperties(Map<String, JsonValue> additionalProperties)final TextBlock.BuilderremoveAdditionalProperty(String key)final TextBlock.BuilderremoveAllAdditionalProperties(Set<String> keys)final TextBlockbuild()Returns an immutable instance of TextBlock. -
-
Method Detail
-
citations
final TextBlock.Builder citations(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.
-
citations
final TextBlock.Builder citations(Optional<List<TextCitation>> citations)
Alias for calling Builder.citations with
citations.orElse(null).
-
citations
final TextBlock.Builder citations(JsonField<List<TextCitation>> citations)
Sets Builder.citations to an arbitrary JSON value.
You should usually call Builder.citations with a well-typed
List<TextCitation>value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addCitation
final TextBlock.Builder addCitation(TextCitation citation)
Adds a single TextCitation to citations.
-
addCitation
final TextBlock.Builder addCitation(CitationCharLocation charLocation)
Alias for calling addCitation with
TextCitation.ofCharLocation(charLocation).
-
addCitation
final TextBlock.Builder addCitation(CitationPageLocation pageLocation)
Alias for calling addCitation with
TextCitation.ofPageLocation(pageLocation).
-
addCitation
final TextBlock.Builder addCitation(CitationContentBlockLocation contentBlockLocation)
Alias for calling addCitation with
TextCitation.ofContentBlockLocation(contentBlockLocation).
-
addCitation
final TextBlock.Builder addCitation(CitationsWebSearchResultLocation webSearchResultLocation)
Alias for calling addCitation with
TextCitation.ofWebSearchResultLocation(webSearchResultLocation).
-
text
final TextBlock.Builder text(String text)
-
text
final TextBlock.Builder text(JsonField<String> text)
Sets Builder.text to an arbitrary JSON value.
You should usually call Builder.text with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
type
final TextBlock.Builder type(JsonValue type)
Sets the field to an arbitrary JSON value.
It is usually unnecessary to call this method because the field defaults to the following:
JsonValue.from("text")This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final TextBlock.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final TextBlock.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final TextBlock.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final TextBlock.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final TextBlock.Builder removeAllAdditionalProperties(Set<String> keys)
-
-
-
-