# 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.GooglePrivacyDlpV2DeidentifyConfig do
  @moduledoc """
  The configuration that controls how the data will change.

  ## Attributes

  *   `imageTransformations` (*type:* `GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2ImageTransformations.t`, *default:* `nil`) - Treat the dataset as an image and redact.
  *   `infoTypeTransformations` (*type:* `GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2InfoTypeTransformations.t`, *default:* `nil`) - Treat the dataset as free-form text and apply the same free text transformation everywhere.
  *   `recordTransformations` (*type:* `GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2RecordTransformations.t`, *default:* `nil`) - Treat the dataset as structured. Transformations can be applied to specific locations within structured datasets, such as transforming a column within a table.
  *   `transformationErrorHandling` (*type:* `GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2TransformationErrorHandling.t`, *default:* `nil`) - Mode for handling transformation errors. If left unspecified, the default mode is `TransformationErrorHandling.ThrowError`.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :imageTransformations =>
            GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2ImageTransformations.t() | nil,
          :infoTypeTransformations =>
            GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2InfoTypeTransformations.t() | nil,
          :recordTransformations =>
            GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2RecordTransformations.t() | nil,
          :transformationErrorHandling =>
            GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2TransformationErrorHandling.t() | nil
        }

  field(:imageTransformations, as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2ImageTransformations)

  field(:infoTypeTransformations,
    as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2InfoTypeTransformations
  )

  field(:recordTransformations, as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2RecordTransformations)

  field(:transformationErrorHandling,
    as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2TransformationErrorHandling
  )
end

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

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