lib/google_api/dialogflow/v2/model/google_cloud_dialogflow_cx_v3beta1_test_case.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.GoogleCloudDialogflowCxV3beta1TestCase do
  @moduledoc """
  Represents a test case.

  ## Attributes

  *   `creationTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. When the test was created.
  *   `displayName` (*type:* `String.t`, *default:* `nil`) - Required. The human-readable name of the test case, unique within the agent. Limit of 200 characters.
  *   `lastTestResult` (*type:* `GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowCxV3beta1TestCaseResult.t`, *default:* `nil`) - The latest test result.
  *   `name` (*type:* `String.t`, *default:* `nil`) - The unique identifier of the test case. TestCases.CreateTestCase will populate the name automatically. Otherwise use format: `projects//locations//agents/ /testCases/`.
  *   `notes` (*type:* `String.t`, *default:* `nil`) - Additional freeform notes about the test case. Limit of 400 characters.
  *   `tags` (*type:* `list(String.t)`, *default:* `nil`) - Tags are short descriptions that users may apply to test cases for organizational and filtering purposes. Each tag should start with "#" and has a limit of 30 characters.
  *   `testCaseConversationTurns` (*type:* `list(GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowCxV3beta1ConversationTurn.t)`, *default:* `nil`) - The conversation turns uttered when the test case was created, in chronological order. These include the canonical set of agent utterances that should occur when the agent is working properly.
  *   `testConfig` (*type:* `GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowCxV3beta1TestConfig.t`, *default:* `nil`) - Config for the test case.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :creationTime => DateTime.t() | nil,
          :displayName => String.t() | nil,
          :lastTestResult =>
            GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowCxV3beta1TestCaseResult.t() | nil,
          :name => String.t() | nil,
          :notes => String.t() | nil,
          :tags => list(String.t()) | nil,
          :testCaseConversationTurns =>
            list(GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowCxV3beta1ConversationTurn.t())
            | nil,
          :testConfig =>
            GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowCxV3beta1TestConfig.t() | nil
        }

  field(:creationTime, as: DateTime)
  field(:displayName)

  field(:lastTestResult,
    as: GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowCxV3beta1TestCaseResult
  )

  field(:name)
  field(:notes)
  field(:tags, type: :list)

  field(:testCaseConversationTurns,
    as: GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowCxV3beta1ConversationTurn,
    type: :list
  )

  field(:testConfig, as: GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowCxV3beta1TestConfig)
end

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

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