# 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.DLP.V2.Model.GooglePrivacyDlpV2ImageTransformation do
  @moduledoc """
  Configuration for determining how redaction of images should occur.

  ## Attributes

  *   `allInfoTypes` (*type:* `GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2AllInfoTypes.t`, *default:* `nil`) - Apply transformation to all findings not specified in other ImageTransformation's selected_info_types. Only one instance is allowed within the ImageTransformations message.
  *   `allText` (*type:* `GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2AllText.t`, *default:* `nil`) - Apply transformation to all text that doesn't match an infoType. Only one instance is allowed within the ImageTransformations message.
  *   `redactionColor` (*type:* `GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2Color.t`, *default:* `nil`) - The color to use when redacting content from an image. If not specified, the default is black.
  *   `selectedInfoTypes` (*type:* `GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2SelectedInfoTypes.t`, *default:* `nil`) - Apply transformation to the selected info_types.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :allInfoTypes => GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2AllInfoTypes.t() | nil,
          :allText => GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2AllText.t() | nil,
          :redactionColor => GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2Color.t() | nil,
          :selectedInfoTypes =>
            GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2SelectedInfoTypes.t() | nil
        }

  field(:allInfoTypes, as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2AllInfoTypes)
  field(:allText, as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2AllText)
  field(:redactionColor, as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2Color)
  field(:selectedInfoTypes, as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2SelectedInfoTypes)
end

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

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