Class: Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SearchKnowledgeAnswer

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

Overview

Represents a SearchKnowledge answer.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDialogflowV2SearchKnowledgeAnswer

Returns a new instance of GoogleCloudDialogflowV2SearchKnowledgeAnswer.



13802
13803
13804
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 13802

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

Instance Attribute Details

#answerString

The piece of text from the knowledge base documents that answers the search query Corresponds to the JSON property answer

Returns:

  • (String)


13785
13786
13787
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 13785

def answer
  @answer
end

#answer_recordString

The name of the answer record. Format: projects//locations//answer Records/ Corresponds to the JSON property answerRecord

Returns:

  • (String)


13790
13791
13792
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 13790

def answer_record
  @answer_record
end

#answer_sourcesArray<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SearchKnowledgeAnswerAnswerSource>

All sources used to generate the answer. Corresponds to the JSON property answerSources



13795
13796
13797
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 13795

def answer_sources
  @answer_sources
end

#answer_typeString

The type of the answer. Corresponds to the JSON property answerType

Returns:

  • (String)


13800
13801
13802
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 13800

def answer_type
  @answer_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



13807
13808
13809
13810
13811
13812
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 13807

def update!(**args)
  @answer = args[:answer] if args.key?(:answer)
  @answer_record = args[:answer_record] if args.key?(:answer_record)
  @answer_sources = args[:answer_sources] if args.key?(:answer_sources)
  @answer_type = args[:answer_type] if args.key?(:answer_type)
end