# 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.DataLineage.V1.Model.GoogleCloudDatacatalogLineageV1ProcessLinks do
  @moduledoc """
  Links associated with a specific process.

  ## Attributes

  *   `links` (*type:* `list(GoogleApi.DataLineage.V1.Model.GoogleCloudDatacatalogLineageV1ProcessLinkInfo.t)`, *default:* `nil`) - An array containing link details objects of the links provided in the original request. A single process can result in creating multiple links. If any of the links you provide in the request are created by the same process, they all are included in this array.
  *   `process` (*type:* `String.t`, *default:* `nil`) - The process name in the format of `projects/{project}/locations/{location}/processes/{process}`.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :links =>
            list(
              GoogleApi.DataLineage.V1.Model.GoogleCloudDatacatalogLineageV1ProcessLinkInfo.t()
            )
            | nil,
          :process => String.t() | nil
        }

  field(:links,
    as: GoogleApi.DataLineage.V1.Model.GoogleCloudDatacatalogLineageV1ProcessLinkInfo,
    type: :list
  )

  field(:process)
end

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

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