lib/google_api/dialogflow/v3/model/google_cloud_dialogflow_cx_v3_match.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.GoogleCloudDialogflowCxV3Match do
  @moduledoc """
  Represents one match result of MatchIntent.

  ## Attributes

  *   `confidence` (*type:* `number()`, *default:* `nil`) - The confidence of this match. Values range from 0.0 (completely uncertain) to 1.0 (completely certain). This value is for informational purpose only and is only used to help match the best intent within the classification threshold. This value may change for the same end-user expression at any time due to a model retraining or change in implementation.
  *   `event` (*type:* `String.t`, *default:* `nil`) - The event that matched the query. Filled for `EVENT`, `NO_MATCH` and `NO_INPUT` match types.
  *   `intent` (*type:* `GoogleApi.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3Intent.t`, *default:* `nil`) - The Intent that matched the query. Some, not all fields are filled in this message, including but not limited to: `name` and `display_name`. Only filled for `INTENT` match type.
  *   `matchType` (*type:* `String.t`, *default:* `nil`) - Type of this Match.
  *   `parameters` (*type:* `map()`, *default:* `nil`) - The collection of parameters extracted from the query. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: - MapKey type: string - MapKey value: parameter name - MapValue type: - If parameter's entity type is a composite entity: map - Else: depending on parameter value type, could be one of string, number, boolean, null, list or map - MapValue value: - If parameter's entity type is a composite entity: map from composite entity property names to property values - Else: parameter value
  *   `resolvedInput` (*type:* `String.t`, *default:* `nil`) - Final text input which was matched during MatchIntent. This value can be different from original input sent in request because of spelling correction or other processing.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :confidence => number() | nil,
          :event => String.t() | nil,
          :intent => GoogleApi.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3Intent.t() | nil,
          :matchType => String.t() | nil,
          :parameters => map() | nil,
          :resolvedInput => String.t() | nil
        }

  field(:confidence)
  field(:event)
  field(:intent, as: GoogleApi.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3Intent)
  field(:matchType)
  field(:parameters, type: :map)
  field(:resolvedInput)
end

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

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