Class BetaTextBlock.Builder
-
- All Implemented Interfaces:
public final class BetaTextBlock.BuilderA builder for BetaTextBlock.
-
-
Method Summary
Modifier and Type Method Description final BetaTextBlock.Buildercitations(List<BetaTextCitation> citations)Citations supporting the text block. final BetaTextBlock.Buildercitations(Optional<List<BetaTextCitation>> citations)Alias for calling Builder.citations with citations.orElse(null).final BetaTextBlock.Buildercitations(JsonField<List<BetaTextCitation>> citations)Sets Builder.citations to an arbitrary JSON value. final BetaTextBlock.BuilderaddCitation(BetaTextCitation citation)Adds a single BetaTextCitation to citations. final BetaTextBlock.BuilderaddCitation(BetaCitationCharLocation charLocation)Alias for calling addCitation with BetaTextCitation.ofCharLocation(charLocation).final BetaTextBlock.BuilderaddCitation(BetaCitationPageLocation pageLocation)Alias for calling addCitation with BetaTextCitation.ofPageLocation(pageLocation).final BetaTextBlock.BuilderaddCitation(BetaCitationContentBlockLocation contentBlockLocation)Alias for calling addCitation with BetaTextCitation.ofContentBlockLocation(contentBlockLocation).final BetaTextBlock.BuilderaddCitation(BetaCitationsWebSearchResultLocation webSearchResultLocation)Alias for calling addCitation with BetaTextCitation.ofWebSearchResultLocation(webSearchResultLocation).final BetaTextBlock.BuilderaddCitation(BetaCitationSearchResultLocation searchResultLocation)Alias for calling addCitation with BetaTextCitation.ofSearchResultLocation(searchResultLocation).final BetaTextBlock.Buildertext(String text)final BetaTextBlock.Buildertext(JsonField<String> text)Sets Builder.text to an arbitrary JSON value. final BetaTextBlock.Buildertype(JsonValue type)Sets the field to an arbitrary JSON value. final BetaTextBlock.BuilderadditionalProperties(Map<String, JsonValue> additionalProperties)final BetaTextBlock.BuilderputAdditionalProperty(String key, JsonValue value)final BetaTextBlock.BuilderputAllAdditionalProperties(Map<String, JsonValue> additionalProperties)final BetaTextBlock.BuilderremoveAdditionalProperty(String key)final BetaTextBlock.BuilderremoveAllAdditionalProperties(Set<String> keys)final BetaTextBlockbuild()Returns an immutable instance of BetaTextBlock. -
-
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).
-
addCitation
final BetaTextBlock.Builder addCitation(BetaCitationSearchResultLocation searchResultLocation)
Alias for calling addCitation with
BetaTextCitation.ofSearchResultLocation(searchResultLocation).
-
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()
-
-
-
-