lib/google_api/dialogflow/v2/model/google_cloud_dialogflow_v2_agent.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.GoogleCloudDialogflowV2Agent do
  @moduledoc """
  A Dialogflow agent is a virtual agent that handles conversations with your end-users. It is a natural language understanding module that understands the nuances of human language. Dialogflow translates end-user text or audio during a conversation to structured data that your apps and services can understand. You design and build a Dialogflow agent to handle the types of conversations required for your system. For more information about agents, see the [Agent guide](https://cloud.google.com/dialogflow/docs/agents-overview). 

  ## Attributes

  *   `apiVersion` (*type:* `String.t`, *default:* `nil`) - Optional. API version displayed in Dialogflow console. If not specified, V2 API is assumed. Clients are free to query different service endpoints for different API versions. However, bots connectors and webhook calls will follow the specified API version.
  *   `avatarUri` (*type:* `String.t`, *default:* `nil`) - Optional. The URI of the agent's avatar. Avatars are used throughout the Dialogflow console and in the self-hosted [Web Demo](https://cloud.google.com/dialogflow/docs/integrations/web-demo) integration.
  *   `classificationThreshold` (*type:* `number()`, *default:* `nil`) - Optional. To filter out false positive results and still get variety in matched natural language inputs for your agent, you can tune the machine learning classification threshold. If the returned score value is less than the threshold value, then a fallback intent will be triggered or, if there are no fallback intents defined, no intent will be triggered. The score values range from 0.0 (completely uncertain) to 1.0 (completely certain). If set to 0.0, the default of 0.3 is used.
  *   `defaultLanguageCode` (*type:* `String.t`, *default:* `nil`) - Required. The default language of the agent as a language tag. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes. This field cannot be set by the `Update` method.
  *   `description` (*type:* `String.t`, *default:* `nil`) - Optional. The description of this agent. The maximum length is 500 characters. If exceeded, the request is rejected.
  *   `displayName` (*type:* `String.t`, *default:* `nil`) - Required. The name of this agent.
  *   `enableLogging` (*type:* `boolean()`, *default:* `nil`) - Optional. Determines whether this agent should log conversation queries.
  *   `matchMode` (*type:* `String.t`, *default:* `nil`) - Optional. Determines how intents are detected from user queries.
  *   `parent` (*type:* `String.t`, *default:* `nil`) - Required. The project of this agent. Format: `projects/`.
  *   `supportedLanguageCodes` (*type:* `list(String.t)`, *default:* `nil`) - Optional. The list of all languages supported by this agent (except for the `default_language_code`).
  *   `tier` (*type:* `String.t`, *default:* `nil`) - Optional. The agent tier. If not specified, TIER_STANDARD is assumed.
  *   `timeZone` (*type:* `String.t`, *default:* `nil`) - Required. The time zone of this agent from the [time zone database](https://www.iana.org/time-zones), e.g., America/New_York, Europe/Paris.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :apiVersion => String.t() | nil,
          :avatarUri => String.t() | nil,
          :classificationThreshold => number() | nil,
          :defaultLanguageCode => String.t() | nil,
          :description => String.t() | nil,
          :displayName => String.t() | nil,
          :enableLogging => boolean() | nil,
          :matchMode => String.t() | nil,
          :parent => String.t() | nil,
          :supportedLanguageCodes => list(String.t()) | nil,
          :tier => String.t() | nil,
          :timeZone => String.t() | nil
        }

  field(:apiVersion)
  field(:avatarUri)
  field(:classificationThreshold)
  field(:defaultLanguageCode)
  field(:description)
  field(:displayName)
  field(:enableLogging)
  field(:matchMode)
  field(:parent)
  field(:supportedLanguageCodes, type: :list)
  field(:tier)
  field(:timeZone)
end

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

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