Class GroundingMetadata.Builder
- Enclosing class:
- GroundingMetadata
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract GroundingMetadatabuild()Clears the value of googleMapsWidgetContextToken field.Clears the value of groundingChunks field.Clears the value of groundingSupports field.Clears the value of imageSearchQueries field.Clears the value of retrievalMetadata field.Clears the value of retrievalQueries field.Clears the value of searchEntryPoint field.Clears the value of sourceFlaggingUris field.Clears the value of webSearchQueries field.abstract GroundingMetadata.BuildergoogleMapsWidgetContextToken(String googleMapsWidgetContextToken) Setter for googleMapsWidgetContextToken.groundingChunks(GroundingChunk... groundingChunks) Setter for groundingChunks.groundingChunks(GroundingChunk.Builder... groundingChunksBuilders) Setter for groundingChunks builder.abstract GroundingMetadata.BuildergroundingChunks(List<GroundingChunk> groundingChunks) Setter for groundingChunks.groundingSupports(GroundingSupport... groundingSupports) Setter for groundingSupports.groundingSupports(GroundingSupport.Builder... groundingSupportsBuilders) Setter for groundingSupports builder.abstract GroundingMetadata.BuildergroundingSupports(List<GroundingSupport> groundingSupports) Setter for groundingSupports.imageSearchQueries(String... imageSearchQueries) Setter for imageSearchQueries.abstract GroundingMetadata.BuilderimageSearchQueries(List<String> imageSearchQueries) Setter for imageSearchQueries.abstract GroundingMetadata.BuilderretrievalMetadata(RetrievalMetadata retrievalMetadata) Setter for retrievalMetadata.retrievalMetadata(RetrievalMetadata.Builder retrievalMetadataBuilder) Setter for retrievalMetadata builder.retrievalQueries(String... retrievalQueries) Setter for retrievalQueries.abstract GroundingMetadata.BuilderretrievalQueries(List<String> retrievalQueries) Setter for retrievalQueries.abstract GroundingMetadata.BuildersearchEntryPoint(SearchEntryPoint searchEntryPoint) Setter for searchEntryPoint.searchEntryPoint(SearchEntryPoint.Builder searchEntryPointBuilder) Setter for searchEntryPoint builder.sourceFlaggingUris(GroundingMetadataSourceFlaggingUri... sourceFlaggingUris) Setter for sourceFlaggingUris.sourceFlaggingUris(GroundingMetadataSourceFlaggingUri.Builder... sourceFlaggingUrisBuilders) Setter for sourceFlaggingUris builder.abstract GroundingMetadata.BuildersourceFlaggingUris(List<GroundingMetadataSourceFlaggingUri> sourceFlaggingUris) Setter for sourceFlaggingUris.webSearchQueries(String... webSearchQueries) Setter for webSearchQueries.abstract GroundingMetadata.BuilderwebSearchQueries(List<String> webSearchQueries) Setter for webSearchQueries.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
imageSearchQueries
Setter for imageSearchQueries.imageSearchQueries: Optional. The image search queries that were used to generate the content. This field is populated only when the grounding source is Google Search with the Image Search search_type enabled.
-
imageSearchQueries
@CanIgnoreReturnValue public GroundingMetadata.Builder imageSearchQueries(String... imageSearchQueries) Setter for imageSearchQueries.imageSearchQueries: Optional. The image search queries that were used to generate the content. This field is populated only when the grounding source is Google Search with the Image Search search_type enabled.
-
clearImageSearchQueries
Clears the value of imageSearchQueries field. -
groundingChunks
Setter for groundingChunks.groundingChunks: A list of supporting references retrieved from the grounding source. This field is populated when the grounding source is Google Search, Vertex AI Search, or Google Maps.
-
groundingChunks
@CanIgnoreReturnValue public GroundingMetadata.Builder groundingChunks(GroundingChunk... groundingChunks) Setter for groundingChunks.groundingChunks: A list of supporting references retrieved from the grounding source. This field is populated when the grounding source is Google Search, Vertex AI Search, or Google Maps.
-
groundingChunks
@CanIgnoreReturnValue public GroundingMetadata.Builder groundingChunks(GroundingChunk.Builder... groundingChunksBuilders) Setter for groundingChunks builder.groundingChunks: A list of supporting references retrieved from the grounding source. This field is populated when the grounding source is Google Search, Vertex AI Search, or Google Maps.
-
clearGroundingChunks
Clears the value of groundingChunks field. -
groundingSupports
public abstract GroundingMetadata.Builder groundingSupports(List<GroundingSupport> groundingSupports) Setter for groundingSupports.groundingSupports: List of grounding support.
-
groundingSupports
@CanIgnoreReturnValue public GroundingMetadata.Builder groundingSupports(GroundingSupport... groundingSupports) Setter for groundingSupports.groundingSupports: List of grounding support.
-
groundingSupports
@CanIgnoreReturnValue public GroundingMetadata.Builder groundingSupports(GroundingSupport.Builder... groundingSupportsBuilders) Setter for groundingSupports builder.groundingSupports: List of grounding support.
-
clearGroundingSupports
Clears the value of groundingSupports field. -
retrievalMetadata
Setter for retrievalMetadata.retrievalMetadata: Metadata related to retrieval in the grounding flow.
-
retrievalMetadata
@CanIgnoreReturnValue public GroundingMetadata.Builder retrievalMetadata(RetrievalMetadata.Builder retrievalMetadataBuilder) Setter for retrievalMetadata builder.retrievalMetadata: Metadata related to retrieval in the grounding flow.
-
clearRetrievalMetadata
Clears the value of retrievalMetadata field. -
searchEntryPoint
Setter for searchEntryPoint.searchEntryPoint: Optional. Google search entry for the following-up web searches.
-
searchEntryPoint
@CanIgnoreReturnValue public GroundingMetadata.Builder searchEntryPoint(SearchEntryPoint.Builder searchEntryPointBuilder) Setter for searchEntryPoint builder.searchEntryPoint: Optional. Google search entry for the following-up web searches.
-
clearSearchEntryPoint
Clears the value of searchEntryPoint field. -
webSearchQueries
Setter for webSearchQueries.webSearchQueries: Web search queries for the following-up web search.
-
webSearchQueries
Setter for webSearchQueries.webSearchQueries: Web search queries for the following-up web search.
-
clearWebSearchQueries
Clears the value of webSearchQueries field. -
googleMapsWidgetContextToken
public abstract GroundingMetadata.Builder googleMapsWidgetContextToken(String googleMapsWidgetContextToken) Setter for googleMapsWidgetContextToken.googleMapsWidgetContextToken: Optional. Output only. A token that can be used to render a Google Maps widget with the contextual data. This field is populated only when the grounding source is Google Maps. This field is not supported in Gemini API.
-
clearGoogleMapsWidgetContextToken
Clears the value of googleMapsWidgetContextToken field. -
retrievalQueries
Setter for retrievalQueries.retrievalQueries: Optional. The queries that were executed by the retrieval tools. This field is populated only when the grounding source is a retrieval tool, such as Vertex AI Search. This field is not supported in Gemini API.
-
retrievalQueries
Setter for retrievalQueries.retrievalQueries: Optional. The queries that were executed by the retrieval tools. This field is populated only when the grounding source is a retrieval tool, such as Vertex AI Search. This field is not supported in Gemini API.
-
clearRetrievalQueries
Clears the value of retrievalQueries field. -
sourceFlaggingUris
public abstract GroundingMetadata.Builder sourceFlaggingUris(List<GroundingMetadataSourceFlaggingUri> sourceFlaggingUris) Setter for sourceFlaggingUris.sourceFlaggingUris: Optional. Output only. A list of URIs that can be used to flag a place or review for inappropriate content. This field is populated only when the grounding source is Google Maps. This field is not supported in Gemini API.
-
sourceFlaggingUris
@CanIgnoreReturnValue public GroundingMetadata.Builder sourceFlaggingUris(GroundingMetadataSourceFlaggingUri... sourceFlaggingUris) Setter for sourceFlaggingUris.sourceFlaggingUris: Optional. Output only. A list of URIs that can be used to flag a place or review for inappropriate content. This field is populated only when the grounding source is Google Maps. This field is not supported in Gemini API.
-
sourceFlaggingUris
@CanIgnoreReturnValue public GroundingMetadata.Builder sourceFlaggingUris(GroundingMetadataSourceFlaggingUri.Builder... sourceFlaggingUrisBuilders) Setter for sourceFlaggingUris builder.sourceFlaggingUris: Optional. Output only. A list of URIs that can be used to flag a place or review for inappropriate content. This field is populated only when the grounding source is Google Maps. This field is not supported in Gemini API.
-
clearSourceFlaggingUris
Clears the value of sourceFlaggingUris field. -
build
-