# 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.ContactCenterInsights.V1.Model.GoogleCloudContactcenterinsightsV1UploadConversationRequest do
  @moduledoc """
  Request to upload a conversation.

  ## Attributes

  *   `conversation` (*type:* `GoogleApi.ContactCenterInsights.V1.Model.GoogleCloudContactcenterinsightsV1Conversation.t`, *default:* `nil`) - Required. The conversation resource to create.
  *   `conversationId` (*type:* `String.t`, *default:* `nil`) - Optional. A unique ID for the new conversation. This ID will become the final component of the conversation's resource name. If no ID is specified, a server-generated ID will be used. This value should be 4-64 characters and must match the regular expression `^[a-z0-9-]{4,64}$`. Valid characters are `a-z-`
  *   `parent` (*type:* `String.t`, *default:* `nil`) - Required. The parent resource of the conversation.
  *   `redactionConfig` (*type:* `GoogleApi.ContactCenterInsights.V1.Model.GoogleCloudContactcenterinsightsV1RedactionConfig.t`, *default:* `nil`) - Optional. DLP settings for transcript redaction. Will default to the config specified in Settings.
  *   `speechConfig` (*type:* `GoogleApi.ContactCenterInsights.V1.Model.GoogleCloudContactcenterinsightsV1SpeechConfig.t`, *default:* `nil`) - Optional. Speech-to-Text configuration. Will default to the config specified in Settings.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :conversation =>
            GoogleApi.ContactCenterInsights.V1.Model.GoogleCloudContactcenterinsightsV1Conversation.t()
            | nil,
          :conversationId => String.t() | nil,
          :parent => String.t() | nil,
          :redactionConfig =>
            GoogleApi.ContactCenterInsights.V1.Model.GoogleCloudContactcenterinsightsV1RedactionConfig.t()
            | nil,
          :speechConfig =>
            GoogleApi.ContactCenterInsights.V1.Model.GoogleCloudContactcenterinsightsV1SpeechConfig.t()
            | nil
        }

  field(:conversation,
    as: GoogleApi.ContactCenterInsights.V1.Model.GoogleCloudContactcenterinsightsV1Conversation
  )

  field(:conversationId)
  field(:parent)

  field(:redactionConfig,
    as: GoogleApi.ContactCenterInsights.V1.Model.GoogleCloudContactcenterinsightsV1RedactionConfig
  )

  field(:speechConfig,
    as: GoogleApi.ContactCenterInsights.V1.Model.GoogleCloudContactcenterinsightsV1SpeechConfig
  )
end

defimpl Poison.Decoder,
  for:
    GoogleApi.ContactCenterInsights.V1.Model.GoogleCloudContactcenterinsightsV1UploadConversationRequest do
  def decode(value, options) do
    GoogleApi.ContactCenterInsights.V1.Model.GoogleCloudContactcenterinsightsV1UploadConversationRequest.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for:
    GoogleApi.ContactCenterInsights.V1.Model.GoogleCloudContactcenterinsightsV1UploadConversationRequest do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
