Class GroundingMetadata.Builder (3.40.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
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.cloud.aiplatform.v1.GroundingAttribution>
Returns
TypeDescription
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
NameDescription
valuesIterable<String>

The webSearchQueries to add.

Returns
TypeDescription
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
NameDescription
valueGroundingAttribution
Returns
TypeDescription
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
NameDescription
builderForValueGroundingAttribution.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueGroundingAttribution
Returns
TypeDescription
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
NameDescription
indexint
builderForValueGroundingAttribution.Builder
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
GroundingAttribution.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public GroundingMetadata.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The webSearchQueries to add.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes of the webSearchQueries to add.

Returns
TypeDescription
GroundingMetadata.Builder

This builder for chaining.

build()

public GroundingMetadata build()
Returns
TypeDescription
GroundingMetadata

buildPartial()

public GroundingMetadata buildPartial()
Returns
TypeDescription
GroundingMetadata

clear()

public GroundingMetadata.Builder clear()
Returns
TypeDescription
GroundingMetadata.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public GroundingMetadata.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
GroundingMetadata.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public GroundingMetadata.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
GroundingMetadata.Builder

This builder for chaining.

clone()

public GroundingMetadata.Builder clone()
Returns
TypeDescription
GroundingMetadata.Builder
Overrides

getDefaultInstanceForType()

public GroundingMetadata getDefaultInstanceForType()
Returns
TypeDescription
GroundingMetadata

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ProtocolStringList

A list containing the webSearchQueries.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(GroundingMetadata other)

public GroundingMetadata.Builder mergeFrom(GroundingMetadata other)
Parameter
NameDescription
otherGroundingMetadata
Returns
TypeDescription
GroundingMetadata.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public GroundingMetadata.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
GroundingMetadata.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public GroundingMetadata.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
GroundingMetadata.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final GroundingMetadata.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
GroundingMetadata.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public GroundingMetadata.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
indexint
valueGroundingAttribution
Returns
TypeDescription
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
NameDescription
indexint
builderForValueGroundingAttribution.Builder
Returns
TypeDescription
GroundingMetadata.Builder

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

public GroundingMetadata.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
GroundingMetadata.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final GroundingMetadata.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
indexint

The index to set the value at.

valueString

The webSearchQueries to set.

Returns
TypeDescription
GroundingMetadata.Builder

This builder for chaining.