lib/google_api/dialogflow/v3/model/google_cloud_dialogflow_cx_v3_match_intent_response.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.V3.Model.GoogleCloudDialogflowCxV3MatchIntentResponse do
  @moduledoc """
  Response of MatchIntent.

  ## Attributes

  *   `currentPage` (*type:* `GoogleApi.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3Page.t`, *default:* `nil`) - The current Page. Some, not all fields are filled in this message, including but not limited to `name` and `display_name`.
  *   `matches` (*type:* `list(GoogleApi.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3Match.t)`, *default:* `nil`) - Match results, if more than one, ordered descendingly by the confidence we have that the particular intent matches the query.
  *   `text` (*type:* `String.t`, *default:* `nil`) - If natural language text was provided as input, this field will contain a copy of the text.
  *   `transcript` (*type:* `String.t`, *default:* `nil`) - If natural language speech audio was provided as input, this field will contain the transcript for the audio.
  *   `triggerEvent` (*type:* `String.t`, *default:* `nil`) - If an event was provided as input, this field will contain a copy of the event name.
  *   `triggerIntent` (*type:* `String.t`, *default:* `nil`) - If an intent was provided as input, this field will contain a copy of the intent identifier. Format: `projects//locations//agents//intents/`.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :currentPage => GoogleApi.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3Page.t() | nil,
          :matches =>
            list(GoogleApi.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3Match.t()) | nil,
          :text => String.t() | nil,
          :transcript => String.t() | nil,
          :triggerEvent => String.t() | nil,
          :triggerIntent => String.t() | nil
        }

  field(:currentPage, as: GoogleApi.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3Page)
  field(:matches, as: GoogleApi.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3Match, type: :list)
  field(:text)
  field(:transcript)
  field(:triggerEvent)
  field(:triggerIntent)
end

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

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