# 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.GoogleCloudDataplexV1Entity do
  @moduledoc """
  Represents tables and fileset metadata contained within a zone.

  ## Attributes

  *   `access` (*type:* `GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1StorageAccess.t`, *default:* `nil`) - Output only. Identifies the access mechanism to the entity. Not user settable.
  *   `asset` (*type:* `String.t`, *default:* `nil`) - Required. Immutable. The ID of the asset associated with the storage location containing the entity data. The entity must be with in the same zone with the asset.
  *   `catalogEntry` (*type:* `String.t`, *default:* `nil`) - Output only. The name of the associated Data Catalog entry.
  *   `compatibility` (*type:* `GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1EntityCompatibilityStatus.t`, *default:* `nil`) - Output only. Metadata stores that the entity is compatible with.
  *   `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time when the entity was created.
  *   `dataPath` (*type:* `String.t`, *default:* `nil`) - Required. Immutable. The storage path of the entity data. For Cloud Storage data, this is the fully-qualified path to the entity, such as gs://bucket/path/to/data. For BigQuery data, this is the name of the table resource, such as projects/project_id/datasets/dataset_id/tables/table_id.
  *   `dataPathPattern` (*type:* `String.t`, *default:* `nil`) - Optional. The set of items within the data path constituting the data in the entity, represented as a glob path. Example: gs://bucket/path/to/data/**/*.csv.
  *   `description` (*type:* `String.t`, *default:* `nil`) - Optional. User friendly longer description text. Must be shorter than or equal to 1024 characters.
  *   `displayName` (*type:* `String.t`, *default:* `nil`) - Optional. Display name must be shorter than or equal to 256 characters.
  *   `etag` (*type:* `String.t`, *default:* `nil`) - Optional. The etag associated with the entity, which can be retrieved with a GetEntity request. Required for update and delete requests.
  *   `format` (*type:* `GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1StorageFormat.t`, *default:* `nil`) - Required. Identifies the storage format of the entity data. It does not apply to entities with data stored in BigQuery.
  *   `id` (*type:* `String.t`, *default:* `nil`) - Required. A user-provided entity ID. It is mutable, and will be used as the published table name. Specifying a new ID in an update entity request will override the existing value. The ID must contain only letters (a-z, A-Z), numbers (0-9), and underscores, and consist of 256 or fewer characters.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Output only. The resource name of the entity, of the form: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{id}.
  *   `schema` (*type:* `GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1Schema.t`, *default:* `nil`) - Required. The description of the data structure and layout. The schema is not included in list responses. It is only included in SCHEMA and FULL entity views of a GetEntity response.
  *   `system` (*type:* `String.t`, *default:* `nil`) - Required. Immutable. Identifies the storage system of the entity data.
  *   `type` (*type:* `String.t`, *default:* `nil`) - Required. Immutable. The type of entity.
  *   `uid` (*type:* `String.t`, *default:* `nil`) - Output only. System generated unique ID for the Entity. This ID will be different if the Entity is deleted and re-created with the same name.
  *   `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time when the entity was last updated.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :access => GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1StorageAccess.t() | nil,
          :asset => String.t() | nil,
          :catalogEntry => String.t() | nil,
          :compatibility =>
            GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1EntityCompatibilityStatus.t() | nil,
          :createTime => DateTime.t() | nil,
          :dataPath => String.t() | nil,
          :dataPathPattern => String.t() | nil,
          :description => String.t() | nil,
          :displayName => String.t() | nil,
          :etag => String.t() | nil,
          :format => GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1StorageFormat.t() | nil,
          :id => String.t() | nil,
          :name => String.t() | nil,
          :schema => GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1Schema.t() | nil,
          :system => String.t() | nil,
          :type => String.t() | nil,
          :uid => String.t() | nil,
          :updateTime => DateTime.t() | nil
        }

  field(:access, as: GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1StorageAccess)
  field(:asset)
  field(:catalogEntry)

  field(:compatibility,
    as: GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1EntityCompatibilityStatus
  )

  field(:createTime, as: DateTime)
  field(:dataPath)
  field(:dataPathPattern)
  field(:description)
  field(:displayName)
  field(:etag)
  field(:format, as: GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1StorageFormat)
  field(:id)
  field(:name)
  field(:schema, as: GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1Schema)
  field(:system)
  field(:type)
  field(:uid)
  field(:updateTime, as: DateTime)
end

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

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