Class BetaTextBlock.Builder
-
- All Implemented Interfaces:
public final class BetaTextBlock.BuilderA builder for BetaTextBlock.
-
-
Method Summary
-
-
Method Detail
-
citations
final BetaTextBlock.Builder citations(List<BetaTextCitation> 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 BetaTextBlock.Builder citations(Optional<List<BetaTextCitation>> citations)
Alias for calling Builder.citations with
citations.orElse(null).
-
citations
final BetaTextBlock.Builder citations(JsonField<List<BetaTextCitation>> citations)
Sets Builder.citations to an arbitrary JSON value.
You should usually call Builder.citations with a well-typed
List<BetaTextCitation>value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addCitation
final BetaTextBlock.Builder addCitation(BetaTextCitation citation)
Adds a single BetaTextCitation to citations.
-
addCitation
final BetaTextBlock.Builder addCitation(BetaCitationCharLocation charLocation)
Alias for calling addCitation with
BetaTextCitation.ofCharLocation(charLocation).
-
addCitation
final BetaTextBlock.Builder addCitation(BetaCitationPageLocation pageLocation)
Alias for calling addCitation with
BetaTextCitation.ofPageLocation(pageLocation).
-
addCitation
final BetaTextBlock.Builder addCitation(BetaCitationContentBlockLocation contentBlockLocation)
Alias for calling addCitation with
BetaTextCitation.ofContentBlockLocation(contentBlockLocation).
-
addCitation
final BetaTextBlock.Builder addCitation(BetaCitationsWebSearchResultLocation webSearchResultLocation)
Alias for calling addCitation with
BetaTextCitation.ofWebSearchResultLocation(webSearchResultLocation).
-
text
final BetaTextBlock.Builder text(String text)
-
text
final BetaTextBlock.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 BetaTextBlock.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 BetaTextBlock.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final BetaTextBlock.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final BetaTextBlock.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final BetaTextBlock.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final BetaTextBlock.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final BetaTextBlock build()
Returns an immutable instance of BetaTextBlock.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.citations() .text()
-
-
-
-