Class AssistantGroundedContent.TextGroundingMetadata.VisualSegment.Builder (0.90.0)

public static final class AssistantGroundedContent.TextGroundingMetadata.VisualSegment.Builder extends GeneratedMessage.Builder<AssistantGroundedContent.TextGroundingMetadata.VisualSegment.Builder> implements AssistantGroundedContent.TextGroundingMetadata.VisualSegmentOrBuilder

Grounding information for a visual segment.

Protobuf type google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.VisualSegment

Inheritance

java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > AssistantGroundedContent.TextGroundingMetadata.VisualSegment.Builder

Static Methods

getDescriptor()

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

Methods

addAllReferenceIndices(Iterable<? extends Integer> values)

public AssistantGroundedContent.TextGroundingMetadata.VisualSegment.Builder addAllReferenceIndices(Iterable<? extends Integer> values)

References for the visual segment.

repeated int32 reference_indices = 1;

Parameter
Name Description
values Iterable<? extends java.lang.Integer>

The referenceIndices to add.

Returns
Type Description
AssistantGroundedContent.TextGroundingMetadata.VisualSegment.Builder

This builder for chaining.

addReferenceIndices(int value)

public AssistantGroundedContent.TextGroundingMetadata.VisualSegment.Builder addReferenceIndices(int value)

References for the visual segment.

repeated int32 reference_indices = 1;

Parameter
Name Description
value int

The referenceIndices to add.

Returns
Type Description
AssistantGroundedContent.TextGroundingMetadata.VisualSegment.Builder

This builder for chaining.

build()

public AssistantGroundedContent.TextGroundingMetadata.VisualSegment build()
Returns
Type Description
AssistantGroundedContent.TextGroundingMetadata.VisualSegment

buildPartial()

public AssistantGroundedContent.TextGroundingMetadata.VisualSegment buildPartial()
Returns
Type Description
AssistantGroundedContent.TextGroundingMetadata.VisualSegment

clear()

public AssistantGroundedContent.TextGroundingMetadata.VisualSegment.Builder clear()
Returns
Type Description
AssistantGroundedContent.TextGroundingMetadata.VisualSegment.Builder
Overrides

clearContentId()

public AssistantGroundedContent.TextGroundingMetadata.VisualSegment.Builder clearContentId()

The content id of the visual segment. In order to display the citation of the visual element, this content_id needs to match with the grounded_content.content_metadata.content_id field.

string content_id = 2;

Returns
Type Description
AssistantGroundedContent.TextGroundingMetadata.VisualSegment.Builder

This builder for chaining.

clearReferenceIndices()

public AssistantGroundedContent.TextGroundingMetadata.VisualSegment.Builder clearReferenceIndices()

References for the visual segment.

repeated int32 reference_indices = 1;

Returns
Type Description
AssistantGroundedContent.TextGroundingMetadata.VisualSegment.Builder

This builder for chaining.

getContentId()

public String getContentId()

The content id of the visual segment. In order to display the citation of the visual element, this content_id needs to match with the grounded_content.content_metadata.content_id field.

string content_id = 2;

Returns
Type Description
String

The contentId.

getContentIdBytes()

public ByteString getContentIdBytes()

The content id of the visual segment. In order to display the citation of the visual element, this content_id needs to match with the grounded_content.content_metadata.content_id field.

string content_id = 2;

Returns
Type Description
ByteString

The bytes for contentId.

getDefaultInstanceForType()

public AssistantGroundedContent.TextGroundingMetadata.VisualSegment getDefaultInstanceForType()
Returns
Type Description
AssistantGroundedContent.TextGroundingMetadata.VisualSegment

getDescriptorForType()

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

getReferenceIndices(int index)

public int getReferenceIndices(int index)

References for the visual segment.

repeated int32 reference_indices = 1;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
int

The referenceIndices at the given index.

getReferenceIndicesCount()

public int getReferenceIndicesCount()

References for the visual segment.

repeated int32 reference_indices = 1;

Returns
Type Description
int

The count of referenceIndices.

getReferenceIndicesList()

public List<Integer> getReferenceIndicesList()

References for the visual segment.

repeated int32 reference_indices = 1;

Returns
Type Description
List<Integer>

A list containing the referenceIndices.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(AssistantGroundedContent.TextGroundingMetadata.VisualSegment other)

public AssistantGroundedContent.TextGroundingMetadata.VisualSegment.Builder mergeFrom(AssistantGroundedContent.TextGroundingMetadata.VisualSegment other)
Parameter
Name Description
other AssistantGroundedContent.TextGroundingMetadata.VisualSegment
Returns
Type Description
AssistantGroundedContent.TextGroundingMetadata.VisualSegment.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public AssistantGroundedContent.TextGroundingMetadata.VisualSegment.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
AssistantGroundedContent.TextGroundingMetadata.VisualSegment.Builder
Overrides

setContentId(String value)

public AssistantGroundedContent.TextGroundingMetadata.VisualSegment.Builder setContentId(String value)

The content id of the visual segment. In order to display the citation of the visual element, this content_id needs to match with the grounded_content.content_metadata.content_id field.

string content_id = 2;

Parameter
Name Description
value String

The contentId to set.

Returns
Type Description
AssistantGroundedContent.TextGroundingMetadata.VisualSegment.Builder

This builder for chaining.

setContentIdBytes(ByteString value)

public AssistantGroundedContent.TextGroundingMetadata.VisualSegment.Builder setContentIdBytes(ByteString value)

The content id of the visual segment. In order to display the citation of the visual element, this content_id needs to match with the grounded_content.content_metadata.content_id field.

string content_id = 2;

Parameter
Name Description
value ByteString

The bytes for contentId to set.

Returns
Type Description
AssistantGroundedContent.TextGroundingMetadata.VisualSegment.Builder

This builder for chaining.

setReferenceIndices(int index, int value)

public AssistantGroundedContent.TextGroundingMetadata.VisualSegment.Builder setReferenceIndices(int index, int value)

References for the visual segment.

repeated int32 reference_indices = 1;

Parameters
Name Description
index int

The index to set the value at.

value int

The referenceIndices to set.

Returns
Type Description
AssistantGroundedContent.TextGroundingMetadata.VisualSegment.Builder

This builder for chaining.