# 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.GoogleCloudDatacatalogLineageV1SearchLinksRequest do
  @moduledoc """
  Request message for SearchLinks.

  ## Attributes

  *   `pageSize` (*type:* `integer()`, *default:* `nil`) - Optional. The maximum number of links to return in a single page of the response. A page may contain fewer links than this value. If unspecified, at most 10 links are returned. Maximum value is 100; values greater than 100 are reduced to 100.
  *   `pageToken` (*type:* `String.t`, *default:* `nil`) - Optional. The page token received from a previous `SearchLinksRequest` call. Use it to get the next page. When requesting subsequent pages of a response, remember that all parameters must match the values you provided in the original request.
  *   `source` (*type:* `GoogleApi.DataLineage.V1.Model.GoogleCloudDatacatalogLineageV1EntityReference.t`, *default:* `nil`) - Optional. Send asset information in the **source** field to retrieve all links that lead from the specified asset to downstream assets.
  *   `target` (*type:* `GoogleApi.DataLineage.V1.Model.GoogleCloudDatacatalogLineageV1EntityReference.t`, *default:* `nil`) - Optional. Send asset information in the **target** field to retrieve all links that lead from upstream assets to the specified asset.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :pageSize => integer() | nil,
          :pageToken => String.t() | nil,
          :source =>
            GoogleApi.DataLineage.V1.Model.GoogleCloudDatacatalogLineageV1EntityReference.t()
            | nil,
          :target =>
            GoogleApi.DataLineage.V1.Model.GoogleCloudDatacatalogLineageV1EntityReference.t()
            | nil
        }

  field(:pageSize)
  field(:pageToken)

  field(:source, as: GoogleApi.DataLineage.V1.Model.GoogleCloudDatacatalogLineageV1EntityReference)

  field(:target, as: GoogleApi.DataLineage.V1.Model.GoogleCloudDatacatalogLineageV1EntityReference)
end

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

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