# 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.GoogleCloudDialogflowV2AnswerFeedback do
  @moduledoc """
  Represents feedback the customer has about the quality & correctness of a certain answer in a conversation.

  ## Attributes

  *   `agentAssistantDetailFeedback` (*type:* `GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2AgentAssistantFeedback.t`, *default:* `nil`) - Detail feedback of agent assist suggestions.
  *   `clickTime` (*type:* `DateTime.t`, *default:* `nil`) - Time when the answer/item was clicked.
  *   `clicked` (*type:* `boolean()`, *default:* `nil`) - Indicates whether the answer/item was clicked by the human agent or not. Default to false. For knowledge search and knowledge assist, the answer record is considered to be clicked if the answer was copied or any URI was clicked.
  *   `correctnessLevel` (*type:* `String.t`, *default:* `nil`) - The correctness level of the specific answer.
  *   `displayTime` (*type:* `DateTime.t`, *default:* `nil`) - Time when the answer/item was displayed.
  *   `displayed` (*type:* `boolean()`, *default:* `nil`) - Indicates whether the answer/item was displayed to the human agent in the agent desktop UI. Default to false.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :agentAssistantDetailFeedback =>
            GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2AgentAssistantFeedback.t() | nil,
          :clickTime => DateTime.t() | nil,
          :clicked => boolean() | nil,
          :correctnessLevel => String.t() | nil,
          :displayTime => DateTime.t() | nil,
          :displayed => boolean() | nil
        }

  field(:agentAssistantDetailFeedback,
    as: GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2AgentAssistantFeedback
  )

  field(:clickTime, as: DateTime)
  field(:clicked)
  field(:correctnessLevel)
  field(:displayTime, as: DateTime)
  field(:displayed)
end

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

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