# 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.GoogleCloudDataplexV1EntrySource do
  @moduledoc """
  Information related to the source system of the data resource that is represented by the entry.

  ## Attributes

  *   `ancestors` (*type:* `list(GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1EntrySourceAncestor.t)`, *default:* `nil`) - Immutable. The entries representing the ancestors of the data resource in the source system.
  *   `createTime` (*type:* `DateTime.t`, *default:* `nil`) - The time when the resource was created in the source system.
  *   `description` (*type:* `String.t`, *default:* `nil`) - A description of the data resource. Maximum length is 2,000 characters.
  *   `displayName` (*type:* `String.t`, *default:* `nil`) - A user-friendly display name. Maximum length is 500 characters.
  *   `labels` (*type:* `map()`, *default:* `nil`) - User-defined labels. The maximum size of keys and values is 128 characters each.
  *   `location` (*type:* `String.t`, *default:* `nil`) - Output only. Location of the resource in the source system. You can search the entry by this location. By default, this should match the location of the entry group containing this entry. A different value allows capturing the source location for data external to Google Cloud.
  *   `platform` (*type:* `String.t`, *default:* `nil`) - The platform containing the source system. Maximum length is 64 characters.
  *   `resource` (*type:* `String.t`, *default:* `nil`) - The name of the resource in the source system. Maximum length is 4,000 characters.
  *   `system` (*type:* `String.t`, *default:* `nil`) - The name of the source system. Maximum length is 64 characters.
  *   `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - The time when the resource was last updated in the source system. If the entry exists in the system and its EntrySource has update_time populated, further updates to the EntrySource of the entry must provide incremental updates to its update_time.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :ancestors =>
            list(GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1EntrySourceAncestor.t()) | nil,
          :createTime => DateTime.t() | nil,
          :description => String.t() | nil,
          :displayName => String.t() | nil,
          :labels => map() | nil,
          :location => String.t() | nil,
          :platform => String.t() | nil,
          :resource => String.t() | nil,
          :system => String.t() | nil,
          :updateTime => DateTime.t() | nil
        }

  field(:ancestors,
    as: GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1EntrySourceAncestor,
    type: :list
  )

  field(:createTime, as: DateTime)
  field(:description)
  field(:displayName)
  field(:labels, type: :map)
  field(:location)
  field(:platform)
  field(:resource)
  field(:system)
  field(:updateTime, as: DateTime)
end

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

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