# 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.GooglePrivacyDlpV2ColumnDataProfile do
  @moduledoc """
  The profile for a scanned column within a table.

  ## Attributes

  *   `column` (*type:* `String.t`, *default:* `nil`) - The name of the column.
  *   `columnInfoType` (*type:* `GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2InfoTypeSummary.t`, *default:* `nil`) - If it's been determined this column can be identified as a single type, this will be set. Otherwise the column either has unidentifiable content or mixed types.
  *   `columnType` (*type:* `String.t`, *default:* `nil`) - The data type of a given column.
  *   `dataRiskLevel` (*type:* `GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2DataRiskLevel.t`, *default:* `nil`) - The data risk level for this column.
  *   `datasetId` (*type:* `String.t`, *default:* `nil`) - The BigQuery dataset ID, if the resource profiled is a BigQuery table.
  *   `datasetLocation` (*type:* `String.t`, *default:* `nil`) - If supported, the location where the dataset's data is stored. See https://cloud.google.com/bigquery/docs/locations for supported BigQuery locations.
  *   `datasetProjectId` (*type:* `String.t`, *default:* `nil`) - The Google Cloud project ID that owns the profiled resource.
  *   `estimatedNullPercentage` (*type:* `String.t`, *default:* `nil`) - Approximate percentage of entries being null in the column.
  *   `estimatedUniquenessScore` (*type:* `String.t`, *default:* `nil`) - Approximate uniqueness of the column.
  *   `freeTextScore` (*type:* `float()`, *default:* `nil`) - The likelihood that this column contains free-form text. A value close to 1 may indicate the column is likely to contain free-form or natural language text. Range in 0-1.
  *   `name` (*type:* `String.t`, *default:* `nil`) - The name of the profile.
  *   `otherMatches` (*type:* `list(GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2OtherInfoTypeSummary.t)`, *default:* `nil`) - Other types found within this column. List will be unordered.
  *   `policyState` (*type:* `String.t`, *default:* `nil`) - Indicates if a policy tag has been applied to the column.
  *   `profileLastGenerated` (*type:* `DateTime.t`, *default:* `nil`) - The last time the profile was generated.
  *   `profileStatus` (*type:* `GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2ProfileStatus.t`, *default:* `nil`) - Success or error status from the most recent profile generation attempt. May be empty if the profile is still being generated.
  *   `sensitivityScore` (*type:* `GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2SensitivityScore.t`, *default:* `nil`) - The sensitivity of this column.
  *   `state` (*type:* `String.t`, *default:* `nil`) - State of a profile.
  *   `tableDataProfile` (*type:* `String.t`, *default:* `nil`) - The resource name of the table data profile.
  *   `tableFullResource` (*type:* `String.t`, *default:* `nil`) - The resource name of the resource this column is within.
  *   `tableId` (*type:* `String.t`, *default:* `nil`) - The table ID.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :column => String.t() | nil,
          :columnInfoType => GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2InfoTypeSummary.t() | nil,
          :columnType => String.t() | nil,
          :dataRiskLevel => GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2DataRiskLevel.t() | nil,
          :datasetId => String.t() | nil,
          :datasetLocation => String.t() | nil,
          :datasetProjectId => String.t() | nil,
          :estimatedNullPercentage => String.t() | nil,
          :estimatedUniquenessScore => String.t() | nil,
          :freeTextScore => float() | nil,
          :name => String.t() | nil,
          :otherMatches =>
            list(GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2OtherInfoTypeSummary.t()) | nil,
          :policyState => String.t() | nil,
          :profileLastGenerated => DateTime.t() | nil,
          :profileStatus => GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2ProfileStatus.t() | nil,
          :sensitivityScore =>
            GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2SensitivityScore.t() | nil,
          :state => String.t() | nil,
          :tableDataProfile => String.t() | nil,
          :tableFullResource => String.t() | nil,
          :tableId => String.t() | nil
        }

  field(:column)
  field(:columnInfoType, as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2InfoTypeSummary)
  field(:columnType)
  field(:dataRiskLevel, as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2DataRiskLevel)
  field(:datasetId)
  field(:datasetLocation)
  field(:datasetProjectId)
  field(:estimatedNullPercentage)
  field(:estimatedUniquenessScore)
  field(:freeTextScore)
  field(:name)

  field(:otherMatches,
    as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2OtherInfoTypeSummary,
    type: :list
  )

  field(:policyState)
  field(:profileLastGenerated, as: DateTime)
  field(:profileStatus, as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2ProfileStatus)
  field(:sensitivityScore, as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2SensitivityScore)
  field(:state)
  field(:tableDataProfile)
  field(:tableFullResource)
  field(:tableId)
end

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

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