lib/google_api/big_query/v2/model/table.ex

# 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.BigQuery.V2.Model.Table do
  @moduledoc """


  ## Attributes

  *   `clustering` (*type:* `GoogleApi.BigQuery.V2.Model.Clustering.t`, *default:* `nil`) - [Beta] Clustering specification for the table. Must be specified with partitioning, data in the table will be first partitioned and subsequently clustered.
  *   `creationTime` (*type:* `String.t`, *default:* `nil`) - [Output-only] The time when this table was created, in milliseconds since the epoch.
  *   `defaultCollation` (*type:* `String.t`, *default:* `nil`) - [Output-only] The default collation of the table.
  *   `description` (*type:* `String.t`, *default:* `nil`) - [Optional] A user-friendly description of this table.
  *   `encryptionConfiguration` (*type:* `GoogleApi.BigQuery.V2.Model.EncryptionConfiguration.t`, *default:* `nil`) - Custom encryption configuration (e.g., Cloud KMS keys).
  *   `etag` (*type:* `String.t`, *default:* `nil`) - [Output-only] A hash of the table metadata. Used to ensure there were no concurrent modifications to the resource when attempting an update. Not guaranteed to change when the table contents or the fields numRows, numBytes, numLongTermBytes or lastModifiedTime change.
  *   `expirationTime` (*type:* `String.t`, *default:* `nil`) - [Optional] The time when this table expires, in milliseconds since the epoch. If not present, the table will persist indefinitely. Expired tables will be deleted and their storage reclaimed. The defaultTableExpirationMs property of the encapsulating dataset can be used to set a default expirationTime on newly created tables.
  *   `externalDataConfiguration` (*type:* `GoogleApi.BigQuery.V2.Model.ExternalDataConfiguration.t`, *default:* `nil`) - [Optional] Describes the data format, location, and other properties of a table stored outside of BigQuery. By defining these properties, the data source can then be queried as if it were a standard BigQuery table.
  *   `friendlyName` (*type:* `String.t`, *default:* `nil`) - [Optional] A descriptive name for this table.
  *   `id` (*type:* `String.t`, *default:* `nil`) - [Output-only] An opaque ID uniquely identifying the table.
  *   `kind` (*type:* `String.t`, *default:* `bigquery#table`) - [Output-only] The type of the resource.
  *   `labels` (*type:* `map()`, *default:* `nil`) - The labels associated with this table. You can use these to organize and group your tables. Label keys and values can be no longer than 63 characters, can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter and each label in the list must have a different key.
  *   `lastModifiedTime` (*type:* `String.t`, *default:* `nil`) - [Output-only] The time when this table was last modified, in milliseconds since the epoch.
  *   `location` (*type:* `String.t`, *default:* `nil`) - [Output-only] The geographic location where the table resides. This value is inherited from the dataset.
  *   `materializedView` (*type:* `GoogleApi.BigQuery.V2.Model.MaterializedViewDefinition.t`, *default:* `nil`) - [Optional] Materialized view definition.
  *   `model` (*type:* `GoogleApi.BigQuery.V2.Model.ModelDefinition.t`, *default:* `nil`) - [Output-only, Beta] Present iff this table represents a ML model. Describes the training information for the model, and it is required to run 'PREDICT' queries.
  *   `numBytes` (*type:* `String.t`, *default:* `nil`) - [Output-only] The size of this table in bytes, excluding any data in the streaming buffer.
  *   `numLongTermBytes` (*type:* `String.t`, *default:* `nil`) - [Output-only] The number of bytes in the table that are considered "long-term storage".
  *   `numPhysicalBytes` (*type:* `String.t`, *default:* `nil`) - [Output-only] [TrustedTester] The physical size of this table in bytes, excluding any data in the streaming buffer. This includes compression and storage used for time travel.
  *   `numRows` (*type:* `String.t`, *default:* `nil`) - [Output-only] The number of rows of data in this table, excluding any data in the streaming buffer.
  *   `rangePartitioning` (*type:* `GoogleApi.BigQuery.V2.Model.RangePartitioning.t`, *default:* `nil`) - [TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified.
  *   `requirePartitionFilter` (*type:* `boolean()`, *default:* `false`) - [Optional] If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified.
  *   `schema` (*type:* `GoogleApi.BigQuery.V2.Model.TableSchema.t`, *default:* `nil`) - [Optional] Describes the schema of this table.
  *   `selfLink` (*type:* `String.t`, *default:* `nil`) - [Output-only] A URL that can be used to access this resource again.
  *   `snapshotDefinition` (*type:* `GoogleApi.BigQuery.V2.Model.SnapshotDefinition.t`, *default:* `nil`) - [Output-only] Snapshot definition.
  *   `streamingBuffer` (*type:* `GoogleApi.BigQuery.V2.Model.Streamingbuffer.t`, *default:* `nil`) - [Output-only] Contains information regarding this table's streaming buffer, if one is present. This field will be absent if the table is not being streamed to or if there is no data in the streaming buffer.
  *   `tableReference` (*type:* `GoogleApi.BigQuery.V2.Model.TableReference.t`, *default:* `nil`) - [Required] Reference describing the ID of this table.
  *   `timePartitioning` (*type:* `GoogleApi.BigQuery.V2.Model.TimePartitioning.t`, *default:* `nil`) - Time-based partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified.
  *   `type` (*type:* `String.t`, *default:* `nil`) - [Output-only] Describes the table type. The following values are supported: TABLE: A normal BigQuery table. VIEW: A virtual table defined by a SQL query. SNAPSHOT: An immutable, read-only table that is a copy of another table. [TrustedTester] MATERIALIZED_VIEW: SQL query whose result is persisted. EXTERNAL: A table that references data stored in an external storage system, such as Google Cloud Storage. The default value is TABLE.
  *   `view` (*type:* `GoogleApi.BigQuery.V2.Model.ViewDefinition.t`, *default:* `nil`) - [Optional] The view definition.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :clustering => GoogleApi.BigQuery.V2.Model.Clustering.t() | nil,
          :creationTime => String.t() | nil,
          :defaultCollation => String.t() | nil,
          :description => String.t() | nil,
          :encryptionConfiguration =>
            GoogleApi.BigQuery.V2.Model.EncryptionConfiguration.t() | nil,
          :etag => String.t() | nil,
          :expirationTime => String.t() | nil,
          :externalDataConfiguration =>
            GoogleApi.BigQuery.V2.Model.ExternalDataConfiguration.t() | nil,
          :friendlyName => String.t() | nil,
          :id => String.t() | nil,
          :kind => String.t() | nil,
          :labels => map() | nil,
          :lastModifiedTime => String.t() | nil,
          :location => String.t() | nil,
          :materializedView => GoogleApi.BigQuery.V2.Model.MaterializedViewDefinition.t() | nil,
          :model => GoogleApi.BigQuery.V2.Model.ModelDefinition.t() | nil,
          :numBytes => String.t() | nil,
          :numLongTermBytes => String.t() | nil,
          :numPhysicalBytes => String.t() | nil,
          :numRows => String.t() | nil,
          :rangePartitioning => GoogleApi.BigQuery.V2.Model.RangePartitioning.t() | nil,
          :requirePartitionFilter => boolean() | nil,
          :schema => GoogleApi.BigQuery.V2.Model.TableSchema.t() | nil,
          :selfLink => String.t() | nil,
          :snapshotDefinition => GoogleApi.BigQuery.V2.Model.SnapshotDefinition.t() | nil,
          :streamingBuffer => GoogleApi.BigQuery.V2.Model.Streamingbuffer.t() | nil,
          :tableReference => GoogleApi.BigQuery.V2.Model.TableReference.t() | nil,
          :timePartitioning => GoogleApi.BigQuery.V2.Model.TimePartitioning.t() | nil,
          :type => String.t() | nil,
          :view => GoogleApi.BigQuery.V2.Model.ViewDefinition.t() | nil
        }

  field(:clustering, as: GoogleApi.BigQuery.V2.Model.Clustering)
  field(:creationTime)
  field(:defaultCollation)
  field(:description)
  field(:encryptionConfiguration, as: GoogleApi.BigQuery.V2.Model.EncryptionConfiguration)
  field(:etag)
  field(:expirationTime)
  field(:externalDataConfiguration, as: GoogleApi.BigQuery.V2.Model.ExternalDataConfiguration)
  field(:friendlyName)
  field(:id)
  field(:kind)
  field(:labels, type: :map)
  field(:lastModifiedTime)
  field(:location)
  field(:materializedView, as: GoogleApi.BigQuery.V2.Model.MaterializedViewDefinition)
  field(:model, as: GoogleApi.BigQuery.V2.Model.ModelDefinition)
  field(:numBytes)
  field(:numLongTermBytes)
  field(:numPhysicalBytes)
  field(:numRows)
  field(:rangePartitioning, as: GoogleApi.BigQuery.V2.Model.RangePartitioning)
  field(:requirePartitionFilter)
  field(:schema, as: GoogleApi.BigQuery.V2.Model.TableSchema)
  field(:selfLink)
  field(:snapshotDefinition, as: GoogleApi.BigQuery.V2.Model.SnapshotDefinition)
  field(:streamingBuffer, as: GoogleApi.BigQuery.V2.Model.Streamingbuffer)
  field(:tableReference, as: GoogleApi.BigQuery.V2.Model.TableReference)
  field(:timePartitioning, as: GoogleApi.BigQuery.V2.Model.TimePartitioning)
  field(:type)
  field(:view, as: GoogleApi.BigQuery.V2.Model.ViewDefinition)
end

defimpl Poison.Decoder, for: GoogleApi.BigQuery.V2.Model.Table do
  def decode(value, options) do
    GoogleApi.BigQuery.V2.Model.Table.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.BigQuery.V2.Model.Table do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end