# 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.GooglePrivacyDlpV2PrivacyMetric do
  @moduledoc """
  Privacy metric to compute for reidentification risk analysis.

  ## Attributes

  *   `categoricalStatsConfig` (*type:* `GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2CategoricalStatsConfig.t`, *default:* `nil`) - Categorical stats
  *   `deltaPresenceEstimationConfig` (*type:* `GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2DeltaPresenceEstimationConfig.t`, *default:* `nil`) - delta-presence
  *   `kAnonymityConfig` (*type:* `GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2KAnonymityConfig.t`, *default:* `nil`) - K-anonymity
  *   `kMapEstimationConfig` (*type:* `GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2KMapEstimationConfig.t`, *default:* `nil`) - k-map
  *   `lDiversityConfig` (*type:* `GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2LDiversityConfig.t`, *default:* `nil`) - l-diversity
  *   `numericalStatsConfig` (*type:* `GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2NumericalStatsConfig.t`, *default:* `nil`) - Numerical stats
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :categoricalStatsConfig =>
            GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2CategoricalStatsConfig.t() | nil,
          :deltaPresenceEstimationConfig =>
            GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2DeltaPresenceEstimationConfig.t() | nil,
          :kAnonymityConfig =>
            GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2KAnonymityConfig.t() | nil,
          :kMapEstimationConfig =>
            GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2KMapEstimationConfig.t() | nil,
          :lDiversityConfig =>
            GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2LDiversityConfig.t() | nil,
          :numericalStatsConfig =>
            GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2NumericalStatsConfig.t() | nil
        }

  field(:categoricalStatsConfig,
    as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2CategoricalStatsConfig
  )

  field(:deltaPresenceEstimationConfig,
    as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2DeltaPresenceEstimationConfig
  )

  field(:kAnonymityConfig, as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2KAnonymityConfig)
  field(:kMapEstimationConfig, as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2KMapEstimationConfig)
  field(:lDiversityConfig, as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2LDiversityConfig)
  field(:numericalStatsConfig, as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2NumericalStatsConfig)
end

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

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