Class: Google::Apis::DialogflowV2beta1::GoogleCloudDialogflowV2beta1SearchKnowledgeAnswer

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

Overview

Represents a SearchKnowledge answer.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDialogflowV2beta1SearchKnowledgeAnswer

Returns a new instance of GoogleCloudDialogflowV2beta1SearchKnowledgeAnswer.



16946
16947
16948
# File 'lib/google/apis/dialogflow_v2beta1/classes.rb', line 16946

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)


16929
16930
16931
# File 'lib/google/apis/dialogflow_v2beta1/classes.rb', line 16929

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)


16934
16935
16936
# File 'lib/google/apis/dialogflow_v2beta1/classes.rb', line 16934

def answer_record
  @answer_record
end

#answer_sourcesArray<Google::Apis::DialogflowV2beta1::GoogleCloudDialogflowV2beta1SearchKnowledgeAnswerAnswerSource>

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



16939
16940
16941
# File 'lib/google/apis/dialogflow_v2beta1/classes.rb', line 16939

def answer_sources
  @answer_sources
end

#answer_typeString

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

Returns:

  • (String)


16944
16945
16946
# File 'lib/google/apis/dialogflow_v2beta1/classes.rb', line 16944

def answer_type
  @answer_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



16951
16952
16953
16954
16955
16956
# File 'lib/google/apis/dialogflow_v2beta1/classes.rb', line 16951

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