# 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.GooglePrivacyDlpV2HybridFindingDetails do
  @moduledoc """
  Populate to associate additional data with each finding.

  ## Attributes

  *   `containerDetails` (*type:* `GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2Container.t`, *default:* `nil`) - Details about the container where the content being inspected is from.
  *   `fileOffset` (*type:* `String.t`, *default:* `nil`) - Offset in bytes of the line, from the beginning of the file, where the finding is located. Populate if the item being scanned is only part of a bigger item, such as a shard of a file and you want to track the absolute position of the finding.
  *   `labels` (*type:* `map()`, *default:* `nil`) - Labels to represent user provided metadata about the data being inspected. If configured by the job, some key values may be required. The labels associated with `Finding`'s produced by hybrid inspection. Label keys must be between 1 and 63 characters long and must conform to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. Label values must be between 0 and 63 characters long and must conform to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. No more than 10 labels can be associated with a given finding. Examples: * `"environment" : "production"` * `"pipeline" : "etl"`
  *   `rowOffset` (*type:* `String.t`, *default:* `nil`) - Offset of the row for tables. Populate if the row(s) being scanned are part of a bigger dataset and you want to keep track of their absolute position.
  *   `tableOptions` (*type:* `GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2TableOptions.t`, *default:* `nil`) - If the container is a table, additional information to make findings meaningful such as the columns that are primary keys. If not known ahead of time, can also be set within each inspect hybrid call and the two will be merged. Note that identifying_fields will only be stored to BigQuery, and only if the BigQuery action has been included.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :containerDetails => GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2Container.t() | nil,
          :fileOffset => String.t() | nil,
          :labels => map() | nil,
          :rowOffset => String.t() | nil,
          :tableOptions => GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2TableOptions.t() | nil
        }

  field(:containerDetails, as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2Container)
  field(:fileOffset)
  field(:labels, type: :map)
  field(:rowOffset)
  field(:tableOptions, as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2TableOptions)
end

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

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