# 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.GoogleCloudDatacatalogLineageV1Origin do
  @moduledoc """
  Origin of a process.

  ## Attributes

  *   `name` (*type:* `String.t`, *default:* `nil`) - If the source_type isn't CUSTOM, the value of this field should be a Google Cloud resource name of the system, which reports lineage. The project and location parts of the resource name must match the project and location of the lineage resource being created. Examples: - `{source_type: COMPOSER, name: "projects/foo/locations/us/environments/bar"}` - `{source_type: BIGQUERY, name: "projects/foo/locations/eu"}` - `{source_type: CUSTOM, name: "myCustomIntegration"}`
  *   `sourceType` (*type:* `String.t`, *default:* `nil`) - Type of the source. Use of a source_type other than `CUSTOM` for process creation or updating is highly discouraged. It might be restricted in the future without notice. There will be increase in cost if you use any of the source types other than `CUSTOM`.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :name => String.t() | nil,
          :sourceType => String.t() | nil
        }

  field(:name)
  field(:sourceType)
end

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

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