Class GroundingMetadata.Builder (1.13.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.vertexai.v1.GroundingMetadata

Static Methods

getDescriptor()

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

Methods

addAllGroundingChunks(Iterable<? extends GroundingChunk> values)

public GroundingMetadata.Builder addAllGroundingChunks(Iterable<? extends GroundingChunk> values)

List of supporting references retrieved from specified grounding source.

repeated .google.cloud.vertexai.v1.GroundingChunk grounding_chunks = 5;

Parameter
Name Description
values Iterable<? extends com.google.cloud.vertexai.api.GroundingChunk>
Returns
Type Description
GroundingMetadata.Builder

addAllGroundingSupports(Iterable<? extends GroundingSupport> values)

public GroundingMetadata.Builder addAllGroundingSupports(Iterable<? extends GroundingSupport> values)

Optional. List of grounding support.

repeated .google.cloud.vertexai.v1.GroundingSupport grounding_supports = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<? extends com.google.cloud.vertexai.api.GroundingSupport>
Returns
Type Description
GroundingMetadata.Builder

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.

addGroundingChunks(GroundingChunk value)

public GroundingMetadata.Builder addGroundingChunks(GroundingChunk value)

List of supporting references retrieved from specified grounding source.

repeated .google.cloud.vertexai.v1.GroundingChunk grounding_chunks = 5;

Parameter
Name Description
value GroundingChunk
Returns
Type Description
GroundingMetadata.Builder

addGroundingChunks(GroundingChunk.Builder builderForValue)

public GroundingMetadata.Builder addGroundingChunks(GroundingChunk.Builder builderForValue)

List of supporting references retrieved from specified grounding source.

repeated .google.cloud.vertexai.v1.GroundingChunk grounding_chunks = 5;

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

addGroundingChunks(int index, GroundingChunk value)

public GroundingMetadata.Builder addGroundingChunks(int index, GroundingChunk value)

List of supporting references retrieved from specified grounding source.

repeated .google.cloud.vertexai.v1.GroundingChunk grounding_chunks = 5;

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

addGroundingChunks(int index, GroundingChunk.Builder builderForValue)

public GroundingMetadata.Builder addGroundingChunks(int index, GroundingChunk.Builder builderForValue)

List of supporting references retrieved from specified grounding source.

repeated .google.cloud.vertexai.v1.GroundingChunk grounding_chunks = 5;

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

addGroundingChunksBuilder()

public GroundingChunk.Builder addGroundingChunksBuilder()

List of supporting references retrieved from specified grounding source.

repeated .google.cloud.vertexai.v1.GroundingChunk grounding_chunks = 5;

Returns
Type Description
GroundingChunk.Builder

addGroundingChunksBuilder(int index)

public GroundingChunk.Builder addGroundingChunksBuilder(int index)

List of supporting references retrieved from specified grounding source.

repeated .google.cloud.vertexai.v1.GroundingChunk grounding_chunks = 5;

Parameter
Name Description
index int
Returns
Type Description
GroundingChunk.Builder

addGroundingSupports(GroundingSupport value)

public GroundingMetadata.Builder addGroundingSupports(GroundingSupport value)

Optional. List of grounding support.

repeated .google.cloud.vertexai.v1.GroundingSupport grounding_supports = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value GroundingSupport
Returns
Type Description
GroundingMetadata.Builder

addGroundingSupports(GroundingSupport.Builder builderForValue)

public GroundingMetadata.Builder addGroundingSupports(GroundingSupport.Builder builderForValue)

Optional. List of grounding support.

repeated .google.cloud.vertexai.v1.GroundingSupport grounding_supports = 6 [(.google.api.field_behavior) = OPTIONAL];

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

addGroundingSupports(int index, GroundingSupport value)

public GroundingMetadata.Builder addGroundingSupports(int index, GroundingSupport value)

Optional. List of grounding support.

repeated .google.cloud.vertexai.v1.GroundingSupport grounding_supports = 6 [(.google.api.field_behavior) = OPTIONAL];

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

addGroundingSupports(int index, GroundingSupport.Builder builderForValue)

public GroundingMetadata.Builder addGroundingSupports(int index, GroundingSupport.Builder builderForValue)

Optional. List of grounding support.

repeated .google.cloud.vertexai.v1.GroundingSupport grounding_supports = 6 [(.google.api.field_behavior) = OPTIONAL];

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

addGroundingSupportsBuilder()

public GroundingSupport.Builder addGroundingSupportsBuilder()

Optional. List of grounding support.

repeated .google.cloud.vertexai.v1.GroundingSupport grounding_supports = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
GroundingSupport.Builder

addGroundingSupportsBuilder(int index)

public GroundingSupport.Builder addGroundingSupportsBuilder(int index)

Optional. List of grounding support.

repeated .google.cloud.vertexai.v1.GroundingSupport grounding_supports = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
GroundingSupport.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

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

clearGroundingChunks()

public GroundingMetadata.Builder clearGroundingChunks()

List of supporting references retrieved from specified grounding source.

repeated .google.cloud.vertexai.v1.GroundingChunk grounding_chunks = 5;

Returns
Type Description
GroundingMetadata.Builder

clearGroundingSupports()

public GroundingMetadata.Builder clearGroundingSupports()

Optional. List of grounding support.

repeated .google.cloud.vertexai.v1.GroundingSupport grounding_supports = 6 [(.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

clearSearchEntryPoint()

public GroundingMetadata.Builder clearSearchEntryPoint()

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

optional .google.cloud.vertexai.v1.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

getGroundingChunks(int index)

public GroundingChunk getGroundingChunks(int index)

List of supporting references retrieved from specified grounding source.

repeated .google.cloud.vertexai.v1.GroundingChunk grounding_chunks = 5;

Parameter
Name Description
index int
Returns
Type Description
GroundingChunk

getGroundingChunksBuilder(int index)

public GroundingChunk.Builder getGroundingChunksBuilder(int index)

List of supporting references retrieved from specified grounding source.

repeated .google.cloud.vertexai.v1.GroundingChunk grounding_chunks = 5;

Parameter
Name Description
index int
Returns
Type Description
GroundingChunk.Builder

getGroundingChunksBuilderList()

public List<GroundingChunk.Builder> getGroundingChunksBuilderList()

List of supporting references retrieved from specified grounding source.

repeated .google.cloud.vertexai.v1.GroundingChunk grounding_chunks = 5;

Returns
Type Description
List<Builder>

getGroundingChunksCount()

public int getGroundingChunksCount()

List of supporting references retrieved from specified grounding source.

repeated .google.cloud.vertexai.v1.GroundingChunk grounding_chunks = 5;

Returns
Type Description
int

getGroundingChunksList()

public List<GroundingChunk> getGroundingChunksList()

List of supporting references retrieved from specified grounding source.

repeated .google.cloud.vertexai.v1.GroundingChunk grounding_chunks = 5;

Returns
Type Description
List<GroundingChunk>

getGroundingChunksOrBuilder(int index)

public GroundingChunkOrBuilder getGroundingChunksOrBuilder(int index)

List of supporting references retrieved from specified grounding source.

repeated .google.cloud.vertexai.v1.GroundingChunk grounding_chunks = 5;

Parameter
Name Description
index int
Returns
Type Description
GroundingChunkOrBuilder

getGroundingChunksOrBuilderList()

public List<? extends GroundingChunkOrBuilder> getGroundingChunksOrBuilderList()

List of supporting references retrieved from specified grounding source.

repeated .google.cloud.vertexai.v1.GroundingChunk grounding_chunks = 5;

Returns
Type Description
List<? extends com.google.cloud.vertexai.api.GroundingChunkOrBuilder>

getGroundingSupports(int index)

public GroundingSupport getGroundingSupports(int index)

Optional. List of grounding support.

repeated .google.cloud.vertexai.v1.GroundingSupport grounding_supports = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
GroundingSupport

getGroundingSupportsBuilder(int index)

public GroundingSupport.Builder getGroundingSupportsBuilder(int index)

Optional. List of grounding support.

repeated .google.cloud.vertexai.v1.GroundingSupport grounding_supports = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
GroundingSupport.Builder

getGroundingSupportsBuilderList()

public List<GroundingSupport.Builder> getGroundingSupportsBuilderList()

Optional. List of grounding support.

repeated .google.cloud.vertexai.v1.GroundingSupport grounding_supports = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Builder>

getGroundingSupportsCount()

public int getGroundingSupportsCount()

Optional. List of grounding support.

repeated .google.cloud.vertexai.v1.GroundingSupport grounding_supports = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getGroundingSupportsList()

public List<GroundingSupport> getGroundingSupportsList()

Optional. List of grounding support.

repeated .google.cloud.vertexai.v1.GroundingSupport grounding_supports = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<GroundingSupport>

getGroundingSupportsOrBuilder(int index)

public GroundingSupportOrBuilder getGroundingSupportsOrBuilder(int index)

Optional. List of grounding support.

repeated .google.cloud.vertexai.v1.GroundingSupport grounding_supports = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
GroundingSupportOrBuilder

getGroundingSupportsOrBuilderList()

public List<? extends GroundingSupportOrBuilder> getGroundingSupportsOrBuilderList()

Optional. List of grounding support.

repeated .google.cloud.vertexai.v1.GroundingSupport grounding_supports = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<? extends com.google.cloud.vertexai.api.GroundingSupportOrBuilder>

getSearchEntryPoint()

public SearchEntryPoint getSearchEntryPoint()

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

optional .google.cloud.vertexai.v1.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.vertexai.v1.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.vertexai.v1.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.vertexai.v1.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.vertexai.v1.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

removeGroundingChunks(int index)

public GroundingMetadata.Builder removeGroundingChunks(int index)

List of supporting references retrieved from specified grounding source.

repeated .google.cloud.vertexai.v1.GroundingChunk grounding_chunks = 5;

Parameter
Name Description
index int
Returns
Type Description
GroundingMetadata.Builder

removeGroundingSupports(int index)

public GroundingMetadata.Builder removeGroundingSupports(int index)

Optional. List of grounding support.

repeated .google.cloud.vertexai.v1.GroundingSupport grounding_supports = 6 [(.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

setGroundingChunks(int index, GroundingChunk value)

public GroundingMetadata.Builder setGroundingChunks(int index, GroundingChunk value)

List of supporting references retrieved from specified grounding source.

repeated .google.cloud.vertexai.v1.GroundingChunk grounding_chunks = 5;

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

setGroundingChunks(int index, GroundingChunk.Builder builderForValue)

public GroundingMetadata.Builder setGroundingChunks(int index, GroundingChunk.Builder builderForValue)

List of supporting references retrieved from specified grounding source.

repeated .google.cloud.vertexai.v1.GroundingChunk grounding_chunks = 5;

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

setGroundingSupports(int index, GroundingSupport value)

public GroundingMetadata.Builder setGroundingSupports(int index, GroundingSupport value)

Optional. List of grounding support.

repeated .google.cloud.vertexai.v1.GroundingSupport grounding_supports = 6 [(.google.api.field_behavior) = OPTIONAL];

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

setGroundingSupports(int index, GroundingSupport.Builder builderForValue)

public GroundingMetadata.Builder setGroundingSupports(int index, GroundingSupport.Builder builderForValue)

Optional. List of grounding support.

repeated .google.cloud.vertexai.v1.GroundingSupport grounding_supports = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue GroundingSupport.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

setSearchEntryPoint(SearchEntryPoint value)

public GroundingMetadata.Builder setSearchEntryPoint(SearchEntryPoint value)

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

optional .google.cloud.vertexai.v1.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.vertexai.v1.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.