# 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.Dataplex.V1.Model.GoogleCloudDataplexV1MetadataJobExportJobSpecExportJobScope do
  @moduledoc """
  Scope of the export job.

  ## Attributes

  *   `aspectTypes` (*type:* `list(String.t)`, *default:* `nil`) - The aspect types that are in scope for the export job. Optional. If specified, only aspects of the specified types will be affected by the job. Must follow the format: "projects//locations//aspectTypes/"
  *   `entryGroups` (*type:* `list(String.t)`, *default:* `nil`) - The entry groups that are in scope for the export job. Optional. If specified, only entries in the specified entry groups will be exported by the job. Must be in the VPC-SC perimeter of the job. The location of the entry groups must be the same as the job. Either projects or entry_groups can be specified when organization_level_export is set to false. Must follow the format: "projects//locations//entryGroups/"
  *   `entryTypes` (*type:* `list(String.t)`, *default:* `nil`) - If specified, only entries of the specified types will be affected by the job. Must follow the format: "projects//locations//entryTypes/"
  *   `organizationLevel` (*type:* `boolean()`, *default:* `nil`) - Indicating if it is an organization level export job. - When set to true, exports all entries from entry groups and projects sharing the same organization id of the Metadata Job. Only projects and entry groups in the VPC-SC perimeter will be exported. The projects and entry groups are ignored. - When set to false, one of the projects or entry groups must be specified. - Default to false.
  *   `projects` (*type:* `list(String.t)`, *default:* `nil`) - The projects that are in the scope of the export job. Can either be project numbers or project IDs. If specified, only the entries from the specified projects will be exported. The projects must be in the same organization and in the VPC-SC perimeter. Either projects or entry_groups can be specified when organization_level_export is set to false. Must follow the format: "projects/"
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :aspectTypes => list(String.t()) | nil,
          :entryGroups => list(String.t()) | nil,
          :entryTypes => list(String.t()) | nil,
          :organizationLevel => boolean() | nil,
          :projects => list(String.t()) | nil
        }

  field(:aspectTypes, type: :list)
  field(:entryGroups, type: :list)
  field(:entryTypes, type: :list)
  field(:organizationLevel)
  field(:projects, type: :list)
end

defimpl Poison.Decoder,
  for: GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1MetadataJobExportJobSpecExportJobScope do
  def decode(value, options) do
    GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1MetadataJobExportJobSpecExportJobScope.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1MetadataJobExportJobSpecExportJobScope do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
