Class GroundingMetadata.Builder (3.44.0)

public static final class GroundingMetadata.Builder extends GeneratedMessageV3.Builder<GroundingMetadata.Builder> implements GroundingMetadataOrBuilder

Metadata returned to client when grounding is enabled.

Protobuf type google.cloud.aiplatform.v1beta1.GroundingMetadata

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllGroundingAttributions(Iterable<? extends GroundingAttribution> values)

public GroundingMetadata.Builder addAllGroundingAttributions(Iterable<? extends GroundingAttribution> values)

Optional. List of grounding attributions.

repeated .google.cloud.aiplatform.v1beta1.GroundingAttribution grounding_attributions = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<? extends com.google.cloud.aiplatform.v1beta1.GroundingAttribution>
Returns
Type Description
GroundingMetadata.Builder

addAllRetrievalQueries(Iterable<String> values)

public GroundingMetadata.Builder addAllRetrievalQueries(Iterable<String> values)

Optional. Queries executed by the retrieval tools.

repeated string retrieval_queries = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<String>

The retrievalQueries to add.

Returns
Type Description
GroundingMetadata.Builder

This builder for chaining.

addAllWebSearchQueries(Iterable<String> values)

public GroundingMetadata.Builder addAllWebSearchQueries(Iterable<String> values)

Optional. Web search queries for the following-up web search.

repeated string web_search_queries = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<String>

The webSearchQueries to add.

Returns
Type Description
GroundingMetadata.Builder

This builder for chaining.

addGroundingAttributions(GroundingAttribution value)

public GroundingMetadata.Builder addGroundingAttributions(GroundingAttribution value)

Optional. List of grounding attributions.

repeated .google.cloud.aiplatform.v1beta1.GroundingAttribution grounding_attributions = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value GroundingAttribution
Returns
Type Description
GroundingMetadata.Builder

addGroundingAttributions(GroundingAttribution.Builder builderForValue)

public GroundingMetadata.Builder addGroundingAttributions(GroundingAttribution.Builder builderForValue)

Optional. List of grounding attributions.

repeated .google.cloud.aiplatform.v1beta1.GroundingAttribution grounding_attributions = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue GroundingAttribution.Builder
Returns
Type Description
GroundingMetadata.Builder

addGroundingAttributions(int index, GroundingAttribution value)

public GroundingMetadata.Builder addGroundingAttributions(int index, GroundingAttribution value)

Optional. List of grounding attributions.

repeated .google.cloud.aiplatform.v1beta1.GroundingAttribution grounding_attributions = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value GroundingAttribution
Returns
Type Description
GroundingMetadata.Builder

addGroundingAttributions(int index, GroundingAttribution.Builder builderForValue)

public GroundingMetadata.Builder addGroundingAttributions(int index, GroundingAttribution.Builder builderForValue)

Optional. List of grounding attributions.

repeated .google.cloud.aiplatform.v1beta1.GroundingAttribution grounding_attributions = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue GroundingAttribution.Builder
Returns
Type Description
GroundingMetadata.Builder

addGroundingAttributionsBuilder()

public GroundingAttribution.Builder addGroundingAttributionsBuilder()

Optional. List of grounding attributions.

repeated .google.cloud.aiplatform.v1beta1.GroundingAttribution grounding_attributions = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
GroundingAttribution.Builder

addGroundingAttributionsBuilder(int index)

public GroundingAttribution.Builder addGroundingAttributionsBuilder(int index)

Optional. List of grounding attributions.

repeated .google.cloud.aiplatform.v1beta1.GroundingAttribution grounding_attributions = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
GroundingAttribution.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public GroundingMetadata.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
GroundingMetadata.Builder
Overrides

addRetrievalQueries(String value)

public GroundingMetadata.Builder addRetrievalQueries(String value)

Optional. Queries executed by the retrieval tools.

repeated string retrieval_queries = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The retrievalQueries to add.

Returns
Type Description
GroundingMetadata.Builder

This builder for chaining.

addRetrievalQueriesBytes(ByteString value)

public GroundingMetadata.Builder addRetrievalQueriesBytes(ByteString value)

Optional. Queries executed by the retrieval tools.

repeated string retrieval_queries = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes of the retrievalQueries to add.

Returns
Type Description
GroundingMetadata.Builder

This builder for chaining.

addWebSearchQueries(String value)

public GroundingMetadata.Builder addWebSearchQueries(String value)

Optional. Web search queries for the following-up web search.

repeated string web_search_queries = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The webSearchQueries to add.

Returns
Type Description
GroundingMetadata.Builder

This builder for chaining.

addWebSearchQueriesBytes(ByteString value)

public GroundingMetadata.Builder addWebSearchQueriesBytes(ByteString value)

Optional. Web search queries for the following-up web search.

repeated string web_search_queries = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes of the webSearchQueries to add.

Returns
Type Description
GroundingMetadata.Builder

This builder for chaining.

build()

public GroundingMetadata build()
Returns
Type Description
GroundingMetadata

buildPartial()

public GroundingMetadata buildPartial()
Returns
Type Description
GroundingMetadata

clear()

public GroundingMetadata.Builder clear()
Returns
Type Description
GroundingMetadata.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public GroundingMetadata.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
GroundingMetadata.Builder
Overrides

clearGroundingAttributions()

public GroundingMetadata.Builder clearGroundingAttributions()

Optional. List of grounding attributions.

repeated .google.cloud.aiplatform.v1beta1.GroundingAttribution grounding_attributions = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
GroundingMetadata.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public GroundingMetadata.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
GroundingMetadata.Builder
Overrides

clearRetrievalQueries()

public GroundingMetadata.Builder clearRetrievalQueries()

Optional. Queries executed by the retrieval tools.

repeated string retrieval_queries = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
GroundingMetadata.Builder

This builder for chaining.

clearSearchEntryPoint()

public GroundingMetadata.Builder clearSearchEntryPoint()

Optional. Google search entry for the following-up web searches.

optional .google.cloud.aiplatform.v1beta1.SearchEntryPoint search_entry_point = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
GroundingMetadata.Builder

clearWebSearchQueries()

public GroundingMetadata.Builder clearWebSearchQueries()

Optional. Web search queries for the following-up web search.

repeated string web_search_queries = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
GroundingMetadata.Builder

This builder for chaining.

clone()

public GroundingMetadata.Builder clone()
Returns
Type Description
GroundingMetadata.Builder
Overrides

getDefaultInstanceForType()

public GroundingMetadata getDefaultInstanceForType()
Returns
Type Description
GroundingMetadata

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getGroundingAttributions(int index)

public GroundingAttribution getGroundingAttributions(int index)

Optional. List of grounding attributions.

repeated .google.cloud.aiplatform.v1beta1.GroundingAttribution grounding_attributions = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
GroundingAttribution

getGroundingAttributionsBuilder(int index)

public GroundingAttribution.Builder getGroundingAttributionsBuilder(int index)

Optional. List of grounding attributions.

repeated .google.cloud.aiplatform.v1beta1.GroundingAttribution grounding_attributions = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
GroundingAttribution.Builder

getGroundingAttributionsBuilderList()

public List<GroundingAttribution.Builder> getGroundingAttributionsBuilderList()

Optional. List of grounding attributions.

repeated .google.cloud.aiplatform.v1beta1.GroundingAttribution grounding_attributions = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Builder>

getGroundingAttributionsCount()

public int getGroundingAttributionsCount()

Optional. List of grounding attributions.

repeated .google.cloud.aiplatform.v1beta1.GroundingAttribution grounding_attributions = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getGroundingAttributionsList()

public List<GroundingAttribution> getGroundingAttributionsList()

Optional. List of grounding attributions.

repeated .google.cloud.aiplatform.v1beta1.GroundingAttribution grounding_attributions = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<GroundingAttribution>

getGroundingAttributionsOrBuilder(int index)

public GroundingAttributionOrBuilder getGroundingAttributionsOrBuilder(int index)

Optional. List of grounding attributions.

repeated .google.cloud.aiplatform.v1beta1.GroundingAttribution grounding_attributions = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
GroundingAttributionOrBuilder

getGroundingAttributionsOrBuilderList()

public List<? extends GroundingAttributionOrBuilder> getGroundingAttributionsOrBuilderList()

Optional. List of grounding attributions.

repeated .google.cloud.aiplatform.v1beta1.GroundingAttribution grounding_attributions = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<? extends com.google.cloud.aiplatform.v1beta1.GroundingAttributionOrBuilder>

getRetrievalQueries(int index)

public String getRetrievalQueries(int index)

Optional. Queries executed by the retrieval tools.

repeated string retrieval_queries = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The retrievalQueries at the given index.

getRetrievalQueriesBytes(int index)

public ByteString getRetrievalQueriesBytes(int index)

Optional. Queries executed by the retrieval tools.

repeated string retrieval_queries = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the retrievalQueries at the given index.

getRetrievalQueriesCount()

public int getRetrievalQueriesCount()

Optional. Queries executed by the retrieval tools.

repeated string retrieval_queries = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of retrievalQueries.

getRetrievalQueriesList()

public ProtocolStringList getRetrievalQueriesList()

Optional. Queries executed by the retrieval tools.

repeated string retrieval_queries = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProtocolStringList

A list containing the retrievalQueries.

getSearchEntryPoint()

public SearchEntryPoint getSearchEntryPoint()

Optional. Google search entry for the following-up web searches.

optional .google.cloud.aiplatform.v1beta1.SearchEntryPoint search_entry_point = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
SearchEntryPoint

The searchEntryPoint.

getSearchEntryPointBuilder()

public SearchEntryPoint.Builder getSearchEntryPointBuilder()

Optional. Google search entry for the following-up web searches.

optional .google.cloud.aiplatform.v1beta1.SearchEntryPoint search_entry_point = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
SearchEntryPoint.Builder

getSearchEntryPointOrBuilder()

public SearchEntryPointOrBuilder getSearchEntryPointOrBuilder()

Optional. Google search entry for the following-up web searches.

optional .google.cloud.aiplatform.v1beta1.SearchEntryPoint search_entry_point = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
SearchEntryPointOrBuilder

getWebSearchQueries(int index)

public String getWebSearchQueries(int index)

Optional. Web search queries for the following-up web search.

repeated string web_search_queries = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The webSearchQueries at the given index.

getWebSearchQueriesBytes(int index)

public ByteString getWebSearchQueriesBytes(int index)

Optional. Web search queries for the following-up web search.

repeated string web_search_queries = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the webSearchQueries at the given index.

getWebSearchQueriesCount()

public int getWebSearchQueriesCount()

Optional. Web search queries for the following-up web search.

repeated string web_search_queries = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of webSearchQueries.

getWebSearchQueriesList()

public ProtocolStringList getWebSearchQueriesList()

Optional. Web search queries for the following-up web search.

repeated string web_search_queries = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProtocolStringList

A list containing the webSearchQueries.

hasSearchEntryPoint()

public boolean hasSearchEntryPoint()

Optional. Google search entry for the following-up web searches.

optional .google.cloud.aiplatform.v1beta1.SearchEntryPoint search_entry_point = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the searchEntryPoint field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(GroundingMetadata other)

public GroundingMetadata.Builder mergeFrom(GroundingMetadata other)
Parameter
Name Description
other GroundingMetadata
Returns
Type Description
GroundingMetadata.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public GroundingMetadata.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
GroundingMetadata.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public GroundingMetadata.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
GroundingMetadata.Builder
Overrides

mergeSearchEntryPoint(SearchEntryPoint value)

public GroundingMetadata.Builder mergeSearchEntryPoint(SearchEntryPoint value)

Optional. Google search entry for the following-up web searches.

optional .google.cloud.aiplatform.v1beta1.SearchEntryPoint search_entry_point = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value SearchEntryPoint
Returns
Type Description
GroundingMetadata.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final GroundingMetadata.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
GroundingMetadata.Builder
Overrides

removeGroundingAttributions(int index)

public GroundingMetadata.Builder removeGroundingAttributions(int index)

Optional. List of grounding attributions.

repeated .google.cloud.aiplatform.v1beta1.GroundingAttribution grounding_attributions = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
GroundingMetadata.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public GroundingMetadata.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
GroundingMetadata.Builder
Overrides

setGroundingAttributions(int index, GroundingAttribution value)

public GroundingMetadata.Builder setGroundingAttributions(int index, GroundingAttribution value)

Optional. List of grounding attributions.

repeated .google.cloud.aiplatform.v1beta1.GroundingAttribution grounding_attributions = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value GroundingAttribution
Returns
Type Description
GroundingMetadata.Builder

setGroundingAttributions(int index, GroundingAttribution.Builder builderForValue)

public GroundingMetadata.Builder setGroundingAttributions(int index, GroundingAttribution.Builder builderForValue)

Optional. List of grounding attributions.

repeated .google.cloud.aiplatform.v1beta1.GroundingAttribution grounding_attributions = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue GroundingAttribution.Builder
Returns
Type Description
GroundingMetadata.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public GroundingMetadata.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
GroundingMetadata.Builder
Overrides

setRetrievalQueries(int index, String value)

public GroundingMetadata.Builder setRetrievalQueries(int index, String value)

Optional. Queries executed by the retrieval tools.

repeated string retrieval_queries = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int

The index to set the value at.

value String

The retrievalQueries to set.

Returns
Type Description
GroundingMetadata.Builder

This builder for chaining.

setSearchEntryPoint(SearchEntryPoint value)

public GroundingMetadata.Builder setSearchEntryPoint(SearchEntryPoint value)

Optional. Google search entry for the following-up web searches.

optional .google.cloud.aiplatform.v1beta1.SearchEntryPoint search_entry_point = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value SearchEntryPoint
Returns
Type Description
GroundingMetadata.Builder

setSearchEntryPoint(SearchEntryPoint.Builder builderForValue)

public GroundingMetadata.Builder setSearchEntryPoint(SearchEntryPoint.Builder builderForValue)

Optional. Google search entry for the following-up web searches.

optional .google.cloud.aiplatform.v1beta1.SearchEntryPoint search_entry_point = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue SearchEntryPoint.Builder
Returns
Type Description
GroundingMetadata.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final GroundingMetadata.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
GroundingMetadata.Builder
Overrides

setWebSearchQueries(int index, String value)

public GroundingMetadata.Builder setWebSearchQueries(int index, String value)

Optional. Web search queries for the following-up web search.

repeated string web_search_queries = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int

The index to set the value at.

value String

The webSearchQueries to set.

Returns
Type Description
GroundingMetadata.Builder

This builder for chaining.