Google Developer Knowledge V1 Client - Class Answer (0.2.1)

Reference documentation and code samples for the Google Developer Knowledge V1 Client class Answer.

An answer to a query.

Generated from protobuf message google.developers.knowledge.v1.Answer

Namespace

Google \ Developers \ DeveloperKnowledge \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ answer_text string

Contains the text of the answer.

↳ citations array<Answer\AnswerCitation>

Output only. Contains citations for the answer.

↳ references array<Answer\AnswerReference>

Output only. Contains references for the answer.

getAnswerText

Contains the text of the answer.

Returns
Type Description
string

setAnswerText

Contains the text of the answer.

Parameter
Name Description
var string
Returns
Type Description
$this

getCitations

Output only. Contains citations for the answer.

Returns
Type Description
Google\Protobuf\RepeatedField<Answer\AnswerCitation>

setCitations

Output only. Contains citations for the answer.

Parameter
Name Description
var array<Answer\AnswerCitation>
Returns
Type Description
$this

getReferences

Output only. Contains references for the answer.

Returns
Type Description
Google\Protobuf\RepeatedField<Answer\AnswerReference>

setReferences

Output only. Contains references for the answer.

Parameter
Name Description
var array<Answer\AnswerReference>
Returns
Type Description
$this