# 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.GooglePrivacyDlpV2DiscoveryVertexDatasetFilter do
  @moduledoc """
  Determines what datasets will have profiles generated within an organization or project. Includes the ability to filter by regular expression patterns on project ID or dataset regex.

  ## Attributes

  *   `collection` (*type:* `GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2VertexDatasetCollection.t`, *default:* `nil`) - A specific set of Vertex AI datasets for this filter to apply to.
  *   `others` (*type:* `GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2AllOtherResources.t`, *default:* `nil`) - Catch-all. This should always be the last target in the list because anything above it will apply first. Should only appear once in a configuration. If none is specified, a default one will be added automatically.
  *   `vertexDatasetResourceReference` (*type:* `GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2VertexDatasetResourceReference.t`, *default:* `nil`) - The dataset resource to scan. Targets including this can only include one target (the target with this dataset resource reference).
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :collection =>
            GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2VertexDatasetCollection.t() | nil,
          :others => GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2AllOtherResources.t() | nil,
          :vertexDatasetResourceReference =>
            GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2VertexDatasetResourceReference.t() | nil
        }

  field(:collection, as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2VertexDatasetCollection)
  field(:others, as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2AllOtherResources)

  field(:vertexDatasetResourceReference,
    as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2VertexDatasetResourceReference
  )
end

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

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