# 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.GoogleCloudContactcenterinsightsV1IngestConversationsRequest do
  @moduledoc """
  The request to ingest conversations.

  ## Attributes

  *   `conversationConfig` (*type:* `GoogleApi.ContactCenterInsights.V1.Model.GoogleCloudContactcenterinsightsV1IngestConversationsRequestConversationConfig.t`, *default:* `nil`) - Configuration that applies to all conversations.
  *   `gcsSource` (*type:* `GoogleApi.ContactCenterInsights.V1.Model.GoogleCloudContactcenterinsightsV1IngestConversationsRequestGcsSource.t`, *default:* `nil`) - A cloud storage bucket source. Note that any previously ingested objects from the source will be skipped to avoid duplication.
  *   `parent` (*type:* `String.t`, *default:* `nil`) - Required. The parent resource for new conversations.
  *   `redactionConfig` (*type:* `GoogleApi.ContactCenterInsights.V1.Model.GoogleCloudContactcenterinsightsV1RedactionConfig.t`, *default:* `nil`) - Optional. DLP settings for transcript redaction. Optional, will default to the config specified in Settings.
  *   `sampleSize` (*type:* `integer()`, *default:* `nil`) - Optional. If set, this fields indicates the number of objects to ingest from the Cloud Storage bucket. If empty, the entire bucket will be ingested. Unless they are first deleted, conversations produced through sampling won't be ingested by subsequent ingest requests.
  *   `speechConfig` (*type:* `GoogleApi.ContactCenterInsights.V1.Model.GoogleCloudContactcenterinsightsV1SpeechConfig.t`, *default:* `nil`) - Optional. Default Speech-to-Text configuration. Optional, will default to the config specified in Settings.
  *   `transcriptObjectConfig` (*type:* `GoogleApi.ContactCenterInsights.V1.Model.GoogleCloudContactcenterinsightsV1IngestConversationsRequestTranscriptObjectConfig.t`, *default:* `nil`) - Configuration for when `source` contains conversation transcripts.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :conversationConfig =>
            GoogleApi.ContactCenterInsights.V1.Model.GoogleCloudContactcenterinsightsV1IngestConversationsRequestConversationConfig.t()
            | nil,
          :gcsSource =>
            GoogleApi.ContactCenterInsights.V1.Model.GoogleCloudContactcenterinsightsV1IngestConversationsRequestGcsSource.t()
            | nil,
          :parent => String.t() | nil,
          :redactionConfig =>
            GoogleApi.ContactCenterInsights.V1.Model.GoogleCloudContactcenterinsightsV1RedactionConfig.t()
            | nil,
          :sampleSize => integer() | nil,
          :speechConfig =>
            GoogleApi.ContactCenterInsights.V1.Model.GoogleCloudContactcenterinsightsV1SpeechConfig.t()
            | nil,
          :transcriptObjectConfig =>
            GoogleApi.ContactCenterInsights.V1.Model.GoogleCloudContactcenterinsightsV1IngestConversationsRequestTranscriptObjectConfig.t()
            | nil
        }

  field(:conversationConfig,
    as:
      GoogleApi.ContactCenterInsights.V1.Model.GoogleCloudContactcenterinsightsV1IngestConversationsRequestConversationConfig
  )

  field(:gcsSource,
    as:
      GoogleApi.ContactCenterInsights.V1.Model.GoogleCloudContactcenterinsightsV1IngestConversationsRequestGcsSource
  )

  field(:parent)

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

  field(:sampleSize)

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

  field(:transcriptObjectConfig,
    as:
      GoogleApi.ContactCenterInsights.V1.Model.GoogleCloudContactcenterinsightsV1IngestConversationsRequestTranscriptObjectConfig
  )
end

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

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