Class GroundingMetadata.Builder (3.42.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.v1.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.v1.GroundingAttribution grounding_attributions = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<? extends com.google.cloud.aiplatform.v1.GroundingAttribution>
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.

addGroundingAttributions(GroundingAttribution value)

public GroundingMetadata.Builder addGroundingAttributions(GroundingAttribution value)

Optional. List of grounding attributions.

repeated .google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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

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.v1.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

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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.GroundingAttribution grounding_attributions = 2 [(.google.api.field_behavior) = OPTIONAL];

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

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.

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

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.v1.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.v1.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.v1.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

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.