# 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.GooglePrivacyDlpV2PrimitiveTransformation do
  @moduledoc """
  A rule for transforming a value.

  ## Attributes

  *   `bucketingConfig` (*type:* `GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2BucketingConfig.t`, *default:* `nil`) - Bucketing
  *   `characterMaskConfig` (*type:* `GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2CharacterMaskConfig.t`, *default:* `nil`) - Mask
  *   `cryptoDeterministicConfig` (*type:* `GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2CryptoDeterministicConfig.t`, *default:* `nil`) - Deterministic Crypto
  *   `cryptoHashConfig` (*type:* `GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2CryptoHashConfig.t`, *default:* `nil`) - Crypto
  *   `cryptoReplaceFfxFpeConfig` (*type:* `GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2CryptoReplaceFfxFpeConfig.t`, *default:* `nil`) - Ffx-Fpe. Strongly discouraged, consider using CryptoDeterministicConfig instead. Fpe is computationally expensive incurring latency costs.
  *   `dateShiftConfig` (*type:* `GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2DateShiftConfig.t`, *default:* `nil`) - Date Shift
  *   `fixedSizeBucketingConfig` (*type:* `GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2FixedSizeBucketingConfig.t`, *default:* `nil`) - Fixed size bucketing
  *   `redactConfig` (*type:* `GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2RedactConfig.t`, *default:* `nil`) - Redact
  *   `replaceConfig` (*type:* `GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2ReplaceValueConfig.t`, *default:* `nil`) - Replace with a specified value.
  *   `replaceDictionaryConfig` (*type:* `GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2ReplaceDictionaryConfig.t`, *default:* `nil`) - Replace with a value randomly drawn (with replacement) from a dictionary.
  *   `replaceWithInfoTypeConfig` (*type:* `GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2ReplaceWithInfoTypeConfig.t`, *default:* `nil`) - Replace with infotype
  *   `timePartConfig` (*type:* `GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2TimePartConfig.t`, *default:* `nil`) - Time extraction
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :bucketingConfig => GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2BucketingConfig.t() | nil,
          :characterMaskConfig =>
            GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2CharacterMaskConfig.t() | nil,
          :cryptoDeterministicConfig =>
            GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2CryptoDeterministicConfig.t() | nil,
          :cryptoHashConfig =>
            GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2CryptoHashConfig.t() | nil,
          :cryptoReplaceFfxFpeConfig =>
            GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2CryptoReplaceFfxFpeConfig.t() | nil,
          :dateShiftConfig => GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2DateShiftConfig.t() | nil,
          :fixedSizeBucketingConfig =>
            GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2FixedSizeBucketingConfig.t() | nil,
          :redactConfig => GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2RedactConfig.t() | nil,
          :replaceConfig => GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2ReplaceValueConfig.t() | nil,
          :replaceDictionaryConfig =>
            GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2ReplaceDictionaryConfig.t() | nil,
          :replaceWithInfoTypeConfig =>
            GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2ReplaceWithInfoTypeConfig.t() | nil,
          :timePartConfig => GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2TimePartConfig.t() | nil
        }

  field(:bucketingConfig, as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2BucketingConfig)
  field(:characterMaskConfig, as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2CharacterMaskConfig)

  field(:cryptoDeterministicConfig,
    as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2CryptoDeterministicConfig
  )

  field(:cryptoHashConfig, as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2CryptoHashConfig)

  field(:cryptoReplaceFfxFpeConfig,
    as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2CryptoReplaceFfxFpeConfig
  )

  field(:dateShiftConfig, as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2DateShiftConfig)

  field(:fixedSizeBucketingConfig,
    as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2FixedSizeBucketingConfig
  )

  field(:redactConfig, as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2RedactConfig)
  field(:replaceConfig, as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2ReplaceValueConfig)

  field(:replaceDictionaryConfig,
    as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2ReplaceDictionaryConfig
  )

  field(:replaceWithInfoTypeConfig,
    as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2ReplaceWithInfoTypeConfig
  )

  field(:timePartConfig, as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2TimePartConfig)
end

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

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