Class CitationAnchor.TextMessageCitationAnchor.Builder (0.21.0)

public static final class CitationAnchor.TextMessageCitationAnchor.Builder extends GeneratedMessage.Builder<CitationAnchor.TextMessageCitationAnchor.Builder> implements CitationAnchor.TextMessageCitationAnchorOrBuilder

Citation anchor within a TextMessage.

Protobuf type google.cloud.geminidataanalytics.v1.CitationAnchor.TextMessageCitationAnchor

Static Methods

getDescriptor()

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

Methods

addAllSourceIds(Iterable<String> values)

public CitationAnchor.TextMessageCitationAnchor.Builder addAllSourceIds(Iterable<String> values)

Output only. The ids of the sources that are cited.

repeated string source_ids = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
values Iterable<String>

The sourceIds to add.

Returns
Type Description
CitationAnchor.TextMessageCitationAnchor.Builder

This builder for chaining.

addSourceIds(String value)

public CitationAnchor.TextMessageCitationAnchor.Builder addSourceIds(String value)

Output only. The ids of the sources that are cited.

repeated string source_ids = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The sourceIds to add.

Returns
Type Description
CitationAnchor.TextMessageCitationAnchor.Builder

This builder for chaining.

addSourceIdsBytes(ByteString value)

public CitationAnchor.TextMessageCitationAnchor.Builder addSourceIdsBytes(ByteString value)

Output only. The ids of the sources that are cited.

repeated string source_ids = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes of the sourceIds to add.

Returns
Type Description
CitationAnchor.TextMessageCitationAnchor.Builder

This builder for chaining.

build()

public CitationAnchor.TextMessageCitationAnchor build()
Returns
Type Description
CitationAnchor.TextMessageCitationAnchor

buildPartial()

public CitationAnchor.TextMessageCitationAnchor buildPartial()
Returns
Type Description
CitationAnchor.TextMessageCitationAnchor

clear()

public CitationAnchor.TextMessageCitationAnchor.Builder clear()
Returns
Type Description
CitationAnchor.TextMessageCitationAnchor.Builder
Overrides

clearEndOffsetBytes()

public CitationAnchor.TextMessageCitationAnchor.Builder clearEndOffsetBytes()

Output only. The offset, measured in UTF-8 bytes, within the part string where the citation ends (exclusive). Example: For the text "Hello, world" where "world" is cited, the start offset bytes (inclusive) is 7 and the end offset bytes (exclusive) is 12.

int32 end_offset_bytes = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
CitationAnchor.TextMessageCitationAnchor.Builder

This builder for chaining.

clearPartIndex()

public CitationAnchor.TextMessageCitationAnchor.Builder clearPartIndex()

Output only. The 0-based index of the part within the TextMessage.parts field.

int32 part_index = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
CitationAnchor.TextMessageCitationAnchor.Builder

This builder for chaining.

clearSourceIds()

public CitationAnchor.TextMessageCitationAnchor.Builder clearSourceIds()

Output only. The ids of the sources that are cited.

repeated string source_ids = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
CitationAnchor.TextMessageCitationAnchor.Builder

This builder for chaining.

clearStartOffsetBytes()

public CitationAnchor.TextMessageCitationAnchor.Builder clearStartOffsetBytes()

Output only. The offset, measured in UTF-8 bytes, within the part string where the citation begins (inclusive). Example: For the text "Hello, world" where "world" is cited, the start offset bytes (inclusive) is 7 and the end offset bytes (exclusive) is 12.

int32 start_offset_bytes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
CitationAnchor.TextMessageCitationAnchor.Builder

This builder for chaining.

getDefaultInstanceForType()

public CitationAnchor.TextMessageCitationAnchor getDefaultInstanceForType()
Returns
Type Description
CitationAnchor.TextMessageCitationAnchor

getDescriptorForType()

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

getEndOffsetBytes()

public int getEndOffsetBytes()

Output only. The offset, measured in UTF-8 bytes, within the part string where the citation ends (exclusive). Example: For the text "Hello, world" where "world" is cited, the start offset bytes (inclusive) is 7 and the end offset bytes (exclusive) is 12.

int32 end_offset_bytes = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The endOffsetBytes.

getPartIndex()

public int getPartIndex()

Output only. The 0-based index of the part within the TextMessage.parts field.

int32 part_index = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The partIndex.

getSourceIds(int index)

public String getSourceIds(int index)

Output only. The ids of the sources that are cited.

repeated string source_ids = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The sourceIds at the given index.

getSourceIdsBytes(int index)

public ByteString getSourceIdsBytes(int index)

Output only. The ids of the sources that are cited.

repeated string source_ids = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the sourceIds at the given index.

getSourceIdsCount()

public int getSourceIdsCount()

Output only. The ids of the sources that are cited.

repeated string source_ids = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The count of sourceIds.

getSourceIdsList()

public ProtocolStringList getSourceIdsList()

Output only. The ids of the sources that are cited.

repeated string source_ids = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ProtocolStringList

A list containing the sourceIds.

getStartOffsetBytes()

public int getStartOffsetBytes()

Output only. The offset, measured in UTF-8 bytes, within the part string where the citation begins (inclusive). Example: For the text "Hello, world" where "world" is cited, the start offset bytes (inclusive) is 7 and the end offset bytes (exclusive) is 12.

int32 start_offset_bytes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The startOffsetBytes.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CitationAnchor.TextMessageCitationAnchor other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setEndOffsetBytes(int value)

public CitationAnchor.TextMessageCitationAnchor.Builder setEndOffsetBytes(int value)

Output only. The offset, measured in UTF-8 bytes, within the part string where the citation ends (exclusive). Example: For the text "Hello, world" where "world" is cited, the start offset bytes (inclusive) is 7 and the end offset bytes (exclusive) is 12.

int32 end_offset_bytes = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value int

The endOffsetBytes to set.

Returns
Type Description
CitationAnchor.TextMessageCitationAnchor.Builder

This builder for chaining.

setPartIndex(int value)

public CitationAnchor.TextMessageCitationAnchor.Builder setPartIndex(int value)

Output only. The 0-based index of the part within the TextMessage.parts field.

int32 part_index = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value int

The partIndex to set.

Returns
Type Description
CitationAnchor.TextMessageCitationAnchor.Builder

This builder for chaining.

setSourceIds(int index, String value)

public CitationAnchor.TextMessageCitationAnchor.Builder setSourceIds(int index, String value)

Output only. The ids of the sources that are cited.

repeated string source_ids = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int

The index to set the value at.

value String

The sourceIds to set.

Returns
Type Description
CitationAnchor.TextMessageCitationAnchor.Builder

This builder for chaining.

setStartOffsetBytes(int value)

public CitationAnchor.TextMessageCitationAnchor.Builder setStartOffsetBytes(int value)

Output only. The offset, measured in UTF-8 bytes, within the part string where the citation begins (inclusive). Example: For the text "Hello, world" where "world" is cited, the start offset bytes (inclusive) is 7 and the end offset bytes (exclusive) is 12.

int32 start_offset_bytes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value int

The startOffsetBytes to set.

Returns
Type Description
CitationAnchor.TextMessageCitationAnchor.Builder

This builder for chaining.