Class Answer.AnswerCitation (0.3.0)

public static final class Answer.AnswerCitation extends GeneratedMessage implements Answer.AnswerCitationOrBuilder

Citation info for a segment.

Protobuf type google.developers.knowledge.v1.Answer.AnswerCitation

Inheritance

Object > com.google.protobuf.AbstractMessageLite > com.google.protobuf.AbstractMessage > com.google.protobuf.GeneratedMessage > Answer.AnswerCitation

Static Fields

END_INDEX_FIELD_NUMBER

public static final int END_INDEX_FIELD_NUMBER
Field Value
Type Description
int

SOURCES_FIELD_NUMBER

public static final int SOURCES_FIELD_NUMBER
Field Value
Type Description
int

START_INDEX_FIELD_NUMBER

public static final int START_INDEX_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Answer.AnswerCitation getDefaultInstance()
Returns
Type Description
Answer.AnswerCitation

getDescriptor()

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

newBuilder()

public static Answer.AnswerCitation.Builder newBuilder()
Returns
Type Description
Answer.AnswerCitation.Builder

newBuilder(Answer.AnswerCitation prototype)

public static Answer.AnswerCitation.Builder newBuilder(Answer.AnswerCitation prototype)
Parameter
Name Description
prototype Answer.AnswerCitation
Returns
Type Description
Answer.AnswerCitation.Builder

parseDelimitedFrom(InputStream input)

public static Answer.AnswerCitation parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Answer.AnswerCitation
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Answer.AnswerCitation parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry com.google.protobuf.ExtensionRegistryLite
Returns
Type Description
Answer.AnswerCitation
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Answer.AnswerCitation parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Answer.AnswerCitation
Exceptions
Type Description
com.google.protobuf.InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Answer.AnswerCitation parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry com.google.protobuf.ExtensionRegistryLite
Returns
Type Description
Answer.AnswerCitation
Exceptions
Type Description
com.google.protobuf.InvalidProtocolBufferException

parseFrom(ByteString data)

public static Answer.AnswerCitation parseFrom(ByteString data)
Parameter
Name Description
data com.google.protobuf.ByteString
Returns
Type Description
Answer.AnswerCitation
Exceptions
Type Description
com.google.protobuf.InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Answer.AnswerCitation parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data com.google.protobuf.ByteString
extensionRegistry com.google.protobuf.ExtensionRegistryLite
Returns
Type Description
Answer.AnswerCitation
Exceptions
Type Description
com.google.protobuf.InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Answer.AnswerCitation parseFrom(CodedInputStream input)
Parameter
Name Description
input com.google.protobuf.CodedInputStream
Returns
Type Description
Answer.AnswerCitation
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Answer.AnswerCitation parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input com.google.protobuf.CodedInputStream
extensionRegistry com.google.protobuf.ExtensionRegistryLite
Returns
Type Description
Answer.AnswerCitation
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Answer.AnswerCitation parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Answer.AnswerCitation
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Answer.AnswerCitation parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry com.google.protobuf.ExtensionRegistryLite
Returns
Type Description
Answer.AnswerCitation
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Answer.AnswerCitation parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Answer.AnswerCitation
Exceptions
Type Description
com.google.protobuf.InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Answer.AnswerCitation parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry com.google.protobuf.ExtensionRegistryLite
Returns
Type Description
Answer.AnswerCitation
Exceptions
Type Description
com.google.protobuf.InvalidProtocolBufferException

parser()

public static Parser<Answer.AnswerCitation> parser()
Returns
Type Description
com.google.protobuf.Parser<AnswerCitation>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides
com.google.protobuf.AbstractMessage.equals(java.lang.Object)

getDefaultInstanceForType()

public Answer.AnswerCitation getDefaultInstanceForType()
Returns
Type Description
Answer.AnswerCitation

getEndIndex()

public int getEndIndex()

Output only. Indicates the end of the segment, measured in bytes (UTF-8 unicode), exclusive. If there are multi-byte characters, such as non-ASCII characters, the index measurement is longer than the string length.

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

Returns
Type Description
int

The endIndex.

getParserForType()

public Parser<Answer.AnswerCitation> getParserForType()
Returns
Type Description
com.google.protobuf.Parser<AnswerCitation>
Overrides
com.google.protobuf.GeneratedMessage.getParserForType()

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides
com.google.protobuf.GeneratedMessage.getSerializedSize()

getSources(int index)

public Answer.CitationSource getSources(int index)

Output only. Contains citation sources for the attributed segment.

repeated .google.developers.knowledge.v1.Answer.CitationSource sources = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
Answer.CitationSource

getSourcesCount()

public int getSourcesCount()

Output only. Contains citation sources for the attributed segment.

repeated .google.developers.knowledge.v1.Answer.CitationSource sources = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

getSourcesList()

public List<Answer.CitationSource> getSourcesList()

Output only. Contains citation sources for the attributed segment.

repeated .google.developers.knowledge.v1.Answer.CitationSource sources = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<CitationSource>

getSourcesOrBuilder(int index)

public Answer.CitationSourceOrBuilder getSourcesOrBuilder(int index)

Output only. Contains citation sources for the attributed segment.

repeated .google.developers.knowledge.v1.Answer.CitationSource sources = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
Answer.CitationSourceOrBuilder

getSourcesOrBuilderList()

public List<? extends Answer.CitationSourceOrBuilder> getSourcesOrBuilderList()

Output only. Contains citation sources for the attributed segment.

repeated .google.developers.knowledge.v1.Answer.CitationSource sources = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<? extends com.google.developers.knowledge.v1.Answer.CitationSourceOrBuilder>

getStartIndex()

public int getStartIndex()

Output only. Indicates the start of the segment, measured in bytes (UTF-8 unicode), inclusive. If there are multi-byte characters, such as non-ASCII characters, the index measurement is longer than the string length.

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

Returns
Type Description
int

The startIndex.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides
com.google.protobuf.AbstractMessage.hashCode()

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
com.google.protobuf.GeneratedMessage.FieldAccessorTable
Overrides
com.google.protobuf.GeneratedMessage.internalGetFieldAccessorTable()

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides
com.google.protobuf.GeneratedMessage.isInitialized()

newBuilderForType()

public Answer.AnswerCitation.Builder newBuilderForType()
Returns
Type Description
Answer.AnswerCitation.Builder

newBuilderForType(AbstractMessage.BuilderParent parent)

protected Answer.AnswerCitation.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Parameter
Name Description
parent com.google.protobuf.AbstractMessage.BuilderParent
Returns
Type Description
Answer.AnswerCitation.Builder
Overrides
com.google.protobuf.AbstractMessage.newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent)

toBuilder()

public Answer.AnswerCitation.Builder toBuilder()
Returns
Type Description
Answer.AnswerCitation.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output com.google.protobuf.CodedOutputStream
Overrides
com.google.protobuf.GeneratedMessage.writeTo(com.google.protobuf.CodedOutputStream)
Exceptions
Type Description
IOException