# 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.GoogleCloudContactcenterinsightsV1BulkDownloadFeedbackLabelsRequest do
  @moduledoc """
  Request for the BulkDownloadFeedbackLabel endpoint.

  ## Attributes

  *   `conversationFilter` (*type:* `String.t`, *default:* `nil`) - Optional. Filter parent conversations to download feedback labels for. When specified, the feedback labels will be downloaded for the conversations that match the filter. If `template_qa_scorecard_id` is set, all the conversations that match the filter will be paired with the questions under the scorecard for labeling.
  *   `feedbackLabelType` (*type:* `String.t`, *default:* `nil`) - Optional. The type of feedback labels that will be downloaded.
  *   `filter` (*type:* `String.t`, *default:* `nil`) - Optional. A filter to reduce results to a specific subset. Supports disjunctions (OR) and conjunctions (AND). Supported fields: * `issue_model_id` * `qa_question_id` * `qa_scorecard_id` * `min_create_time` * `max_create_time` * `min_update_time` * `max_update_time` * `feedback_label_type`: QUALITY_AI, TOPIC_MODELING
  *   `gcsDestination` (*type:* `GoogleApi.ContactCenterInsights.V1.Model.GoogleCloudContactcenterinsightsV1BulkDownloadFeedbackLabelsRequestGcsDestination.t`, *default:* `nil`) - A cloud storage bucket destination.
  *   `maxDownloadCount` (*type:* `integer()`, *default:* `nil`) - Optional. Limits the maximum number of feedback labels that will be downloaded. The first `N` feedback labels will be downloaded.
  *   `parent` (*type:* `String.t`, *default:* `nil`) - Required. The parent resource for new feedback labels.
  *   `templateQaScorecardId` (*type:* `list(String.t)`, *default:* `nil`) - Optional. If set, a template for labeling conversations and scorecard questions will be created from the conversation_filter and the questions under the scorecard(s). The feedback label `filter` will be ignored.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :conversationFilter => String.t() | nil,
          :feedbackLabelType => String.t() | nil,
          :filter => String.t() | nil,
          :gcsDestination =>
            GoogleApi.ContactCenterInsights.V1.Model.GoogleCloudContactcenterinsightsV1BulkDownloadFeedbackLabelsRequestGcsDestination.t()
            | nil,
          :maxDownloadCount => integer() | nil,
          :parent => String.t() | nil,
          :templateQaScorecardId => list(String.t()) | nil
        }

  field(:conversationFilter)
  field(:feedbackLabelType)
  field(:filter)

  field(:gcsDestination,
    as:
      GoogleApi.ContactCenterInsights.V1.Model.GoogleCloudContactcenterinsightsV1BulkDownloadFeedbackLabelsRequestGcsDestination
  )

  field(:maxDownloadCount)
  field(:parent)
  field(:templateQaScorecardId, type: :list)
end

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

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