# 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.GoogleCloudDialogflowV2FewShotExample do
  @moduledoc """
  Providing examples in the generator (i.e. building a few-shot generator) helps convey the desired format of the LLM response.

  ## Attributes

  *   `conversationContext` (*type:* `GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2ConversationContext.t`, *default:* `nil`) - Optional. Conversation transcripts.
  *   `extraInfo` (*type:* `map()`, *default:* `nil`) - Optional. Key is the placeholder field name in input, value is the value of the placeholder. E.g. instruction contains "@price", and ingested data has <"price", "10">
  *   `output` (*type:* `GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2GeneratorSuggestion.t`, *default:* `nil`) - Required. Example output of the model.
  *   `summarizationSectionList` (*type:* `GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2SummarizationSectionList.t`, *default:* `nil`) - Summarization sections.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :conversationContext =>
            GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2ConversationContext.t() | nil,
          :extraInfo => map() | nil,
          :output =>
            GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2GeneratorSuggestion.t() | nil,
          :summarizationSectionList =>
            GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2SummarizationSectionList.t()
            | nil
        }

  field(:conversationContext,
    as: GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2ConversationContext
  )

  field(:extraInfo, type: :map)
  field(:output, as: GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2GeneratorSuggestion)

  field(:summarizationSectionList,
    as: GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2SummarizationSectionList
  )
end

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

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