Class Answer (0.3.0)

public final class Answer extends GeneratedMessage implements AnswerOrBuilder

An answer to a query.

Protobuf type google.developers.knowledge.v1.Answer

Inheritance

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

Implements

AnswerOrBuilder

Static Fields

ANSWER_TEXT_FIELD_NUMBER

public static final int ANSWER_TEXT_FIELD_NUMBER
Field Value
Type Description
int

CITATIONS_FIELD_NUMBER

public static final int CITATIONS_FIELD_NUMBER
Field Value
Type Description
int

REFERENCES_FIELD_NUMBER

public static final int REFERENCES_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Answer getDefaultInstance()
Returns
Type Description
Answer

getDescriptor()

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

newBuilder()

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

newBuilder(Answer prototype)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

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)

getAnswerText()

public String getAnswerText()

Contains the text of the answer.

string answer_text = 1;

Returns
Type Description
String

The answerText.

getAnswerTextBytes()

public ByteString getAnswerTextBytes()

Contains the text of the answer.

string answer_text = 1;

Returns
Type Description
com.google.protobuf.ByteString

The bytes for answerText.

getCitations(int index)

public Answer.AnswerCitation getCitations(int index)

Output only. Contains citations for the answer.

repeated .google.developers.knowledge.v1.Answer.AnswerCitation citations = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
Answer.AnswerCitation

getCitationsCount()

public int getCitationsCount()

Output only. Contains citations for the answer.

repeated .google.developers.knowledge.v1.Answer.AnswerCitation citations = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

getCitationsList()

public List<Answer.AnswerCitation> getCitationsList()

Output only. Contains citations for the answer.

repeated .google.developers.knowledge.v1.Answer.AnswerCitation citations = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<AnswerCitation>

getCitationsOrBuilder(int index)

public Answer.AnswerCitationOrBuilder getCitationsOrBuilder(int index)

Output only. Contains citations for the answer.

repeated .google.developers.knowledge.v1.Answer.AnswerCitation citations = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
Answer.AnswerCitationOrBuilder

getCitationsOrBuilderList()

public List<? extends Answer.AnswerCitationOrBuilder> getCitationsOrBuilderList()

Output only. Contains citations for the answer.

repeated .google.developers.knowledge.v1.Answer.AnswerCitation citations = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

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

getDefaultInstanceForType()

public Answer getDefaultInstanceForType()
Returns
Type Description
Answer

getParserForType()

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

getReferences(int index)

public Answer.AnswerReference getReferences(int index)

Output only. Contains references for the answer.

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

Parameter
Name Description
index int
Returns
Type Description
Answer.AnswerReference

getReferencesCount()

public int getReferencesCount()

Output only. Contains references for the answer.

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

Returns
Type Description
int

getReferencesList()

public List<Answer.AnswerReference> getReferencesList()

Output only. Contains references for the answer.

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

Returns
Type Description
List<AnswerReference>

getReferencesOrBuilder(int index)

public Answer.AnswerReferenceOrBuilder getReferencesOrBuilder(int index)

Output only. Contains references for the answer.

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

Parameter
Name Description
index int
Returns
Type Description
Answer.AnswerReferenceOrBuilder

getReferencesOrBuilderList()

public List<? extends Answer.AnswerReferenceOrBuilder> getReferencesOrBuilderList()

Output only. Contains references for the answer.

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

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

getSerializedSize()

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

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.Builder newBuilderForType()
Returns
Type Description
Answer.Builder

newBuilderForType(AbstractMessage.BuilderParent parent)

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

toBuilder()

public Answer.Builder toBuilder()
Returns
Type Description
Answer.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