lib/google_api/dialogflow/v2/model/google_cloud_dialogflow_v2_answer_record.ex

# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2AnswerRecord do
  @moduledoc """
  Answer records are records to manage answer history and feedbacks for Dialogflow. Currently, answer record includes: - human agent assistant article suggestion - human agent assistant faq article It doesn't include: - `DetectIntent` intent matching - `DetectIntent` knowledge Answer records are not related to the conversation history in the Dialogflow Console. A Record is generated even when the end-user disables conversation history in the console. Records are created when there's a human agent assistant suggestion generated. A typical workflow for customers provide feedback to an answer is: 1. For human agent assistant, customers get suggestion via ListSuggestions API. Together with the answers, AnswerRecord.name are returned to the customers. 2. The customer uses the AnswerRecord.name to call the UpdateAnswerRecord method to send feedback about a specific answer that they believe is wrong.

  ## Attributes

  *   `agentAssistantRecord` (*type:* `GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2AgentAssistantRecord.t`, *default:* `nil`) - Output only. The record for human agent assistant.
  *   `answerFeedback` (*type:* `GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2AnswerFeedback.t`, *default:* `nil`) - Required. The AnswerFeedback for this record. You can set this with AnswerRecords.UpdateAnswerRecord in order to give us feedback about this answer.
  *   `name` (*type:* `String.t`, *default:* `nil`) - The unique identifier of this answer record. Format: `projects//locations//answerRecords/`.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :agentAssistantRecord =>
            GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2AgentAssistantRecord.t() | nil,
          :answerFeedback =>
            GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2AnswerFeedback.t() | nil,
          :name => String.t() | nil
        }

  field(:agentAssistantRecord,
    as: GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2AgentAssistantRecord
  )

  field(:answerFeedback, as: GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2AnswerFeedback)
  field(:name)
end

defimpl Poison.Decoder, for: GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2AnswerRecord do
  def decode(value, options) do
    GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2AnswerRecord.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2AnswerRecord do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end