Class: Google::Apis::DeveloperknowledgeV1alpha::Answer

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/developerknowledge_v1alpha/classes.rb,
lib/google/apis/developerknowledge_v1alpha/representations.rb,
lib/google/apis/developerknowledge_v1alpha/representations.rb

Overview

An answer to a query.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Answer

Returns a new instance of Answer.



44
45
46
# File 'lib/google/apis/developerknowledge_v1alpha/classes.rb', line 44

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#answer_textString

Contains the text of the answer. Corresponds to the JSON property answerText

Returns:

  • (String)


32
33
34
# File 'lib/google/apis/developerknowledge_v1alpha/classes.rb', line 32

def answer_text
  @answer_text
end

#citationsArray<Google::Apis::DeveloperknowledgeV1alpha::AnswerCitation>

Output only. Contains citations for the answer. Corresponds to the JSON property citations



37
38
39
# File 'lib/google/apis/developerknowledge_v1alpha/classes.rb', line 37

def citations
  @citations
end

#referencesArray<Google::Apis::DeveloperknowledgeV1alpha::AnswerReference>

Output only. Contains references for the answer. Corresponds to the JSON property references



42
43
44
# File 'lib/google/apis/developerknowledge_v1alpha/classes.rb', line 42

def references
  @references
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



49
50
51
52
53
# File 'lib/google/apis/developerknowledge_v1alpha/classes.rb', line 49

def update!(**args)
  @answer_text = args[:answer_text] if args.key?(:answer_text)
  @citations = args[:citations] if args.key?(:citations)
  @references = args[:references] if args.key?(:references)
end