# 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.GooglePrivacyDlpV2FileClusterSummary do
  @moduledoc """
  The file cluster summary.

  ## Attributes

  *   `dataRiskLevel` (*type:* `GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2DataRiskLevel.t`, *default:* `nil`) - The data risk level of this cluster. RISK_LOW if nothing has been scanned.
  *   `errors` (*type:* `list(GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2Error.t)`, *default:* `nil`) - A list of errors detected while scanning this cluster. The list is truncated to 10 per cluster.
  *   `fileClusterType` (*type:* `GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2FileClusterType.t`, *default:* `nil`) - The file cluster type.
  *   `fileExtensionsScanned` (*type:* `list(GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2FileExtensionInfo.t)`, *default:* `nil`) - A sample of file types scanned in this cluster. Empty if no files were scanned. File extensions can be derived from the file name or the file content.
  *   `fileExtensionsSeen` (*type:* `list(GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2FileExtensionInfo.t)`, *default:* `nil`) - A sample of file types seen in this cluster. Empty if no files were seen. File extensions can be derived from the file name or the file content.
  *   `fileStoreInfoTypeSummaries` (*type:* `list(GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2FileStoreInfoTypeSummary.t)`, *default:* `nil`) - InfoTypes detected in this cluster.
  *   `noFilesExist` (*type:* `boolean()`, *default:* `nil`) - True if no files exist in this cluster. If the file store had more files than could be listed, this will be false even if no files for this cluster were seen and file_extensions_seen is empty.
  *   `sensitivityScore` (*type:* `GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2SensitivityScore.t`, *default:* `nil`) - The sensitivity score of this cluster. The score will be SENSITIVITY_LOW if nothing has been scanned.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :dataRiskLevel => GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2DataRiskLevel.t() | nil,
          :errors => list(GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2Error.t()) | nil,
          :fileClusterType => GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2FileClusterType.t() | nil,
          :fileExtensionsScanned =>
            list(GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2FileExtensionInfo.t()) | nil,
          :fileExtensionsSeen =>
            list(GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2FileExtensionInfo.t()) | nil,
          :fileStoreInfoTypeSummaries =>
            list(GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2FileStoreInfoTypeSummary.t()) | nil,
          :noFilesExist => boolean() | nil,
          :sensitivityScore => GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2SensitivityScore.t() | nil
        }

  field(:dataRiskLevel, as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2DataRiskLevel)
  field(:errors, as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2Error, type: :list)
  field(:fileClusterType, as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2FileClusterType)

  field(:fileExtensionsScanned,
    as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2FileExtensionInfo,
    type: :list
  )

  field(:fileExtensionsSeen,
    as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2FileExtensionInfo,
    type: :list
  )

  field(:fileStoreInfoTypeSummaries,
    as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2FileStoreInfoTypeSummary,
    type: :list
  )

  field(:noFilesExist)
  field(:sensitivityScore, as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2SensitivityScore)
end

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

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