# 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.GoogleCloudDataplexV1Lake do
  @moduledoc """
  A lake is a centralized repository for managing enterprise data across the organization distributed across many cloud projects, and stored in a variety of storage services such as Google Cloud Storage and BigQuery. The resources attached to a lake are referred to as managed resources. Data within these managed resources can be structured or unstructured. A lake provides data admins with tools to organize, secure and manage their data at scale, and provides data scientists and data engineers an integrated experience to easily search, discover, analyze and transform data and associated metadata.

  ## Attributes

  *   `assetStatus` (*type:* `GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1AssetStatus.t`, *default:* `nil`) - Output only. Aggregated status of the underlying assets of the lake.
  *   `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time when the lake was created.
  *   `description` (*type:* `String.t`, *default:* `nil`) - Optional. Description of the lake.
  *   `displayName` (*type:* `String.t`, *default:* `nil`) - Optional. User friendly display name.
  *   `labels` (*type:* `map()`, *default:* `nil`) - Optional. User-defined labels for the lake.
  *   `metastore` (*type:* `GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1LakeMetastore.t`, *default:* `nil`) - Optional. Settings to manage lake and Dataproc Metastore service instance association.
  *   `metastoreStatus` (*type:* `GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1LakeMetastoreStatus.t`, *default:* `nil`) - Output only. Metastore status of the lake.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Output only. The relative resource name of the lake, of the form: projects/{project_number}/locations/{location_id}/lakes/{lake_id}.
  *   `serviceAccount` (*type:* `String.t`, *default:* `nil`) - Output only. Service account associated with this lake. This service account must be authorized to access or operate on resources managed by the lake.
  *   `state` (*type:* `String.t`, *default:* `nil`) - Output only. Current state of the lake.
  *   `uid` (*type:* `String.t`, *default:* `nil`) - Output only. System generated globally unique ID for the lake. This ID will be different if the lake is deleted and re-created with the same name.
  *   `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time when the lake was last updated.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :assetStatus => GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1AssetStatus.t() | nil,
          :createTime => DateTime.t() | nil,
          :description => String.t() | nil,
          :displayName => String.t() | nil,
          :labels => map() | nil,
          :metastore => GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1LakeMetastore.t() | nil,
          :metastoreStatus =>
            GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1LakeMetastoreStatus.t() | nil,
          :name => String.t() | nil,
          :serviceAccount => String.t() | nil,
          :state => String.t() | nil,
          :uid => String.t() | nil,
          :updateTime => DateTime.t() | nil
        }

  field(:assetStatus, as: GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1AssetStatus)
  field(:createTime, as: DateTime)
  field(:description)
  field(:displayName)
  field(:labels, type: :map)
  field(:metastore, as: GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1LakeMetastore)

  field(:metastoreStatus, as: GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1LakeMetastoreStatus)

  field(:name)
  field(:serviceAccount)
  field(:state)
  field(:uid)
  field(:updateTime, as: DateTime)
end

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

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