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

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
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 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
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

public static Answer parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Answer
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

public static Answer parseFrom(CodedInputStream input)
Parameter
Name Description
input 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 CodedInputStream
extensionRegistry 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 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
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

public static Parser<Answer> parser()
Returns
Type Description
Parser<Answer>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

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
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
Parser<Answer>
Overrides

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

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

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 BuilderParent
Returns
Type Description
Answer.Builder
Overrides

toBuilder()

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

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException