lib/google_api/big_query/v2/model/row_access_policy.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.RowAccessPolicy do
  @moduledoc """
  Represents access on a subset of rows on the specified table, defined by its filter predicate. Access to the subset of rows is controlled by its IAM policy.

  ## Attributes

  *   `creationTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time when this row access policy was created, in milliseconds since the epoch.
  *   `etag` (*type:* `String.t`, *default:* `nil`) - Output only. A hash of this resource.
  *   `filterPredicate` (*type:* `String.t`, *default:* `nil`) - Required. A SQL boolean expression that represents the rows defined by this row access policy, similar to the boolean expression in a WHERE clause of a SELECT query on a table. References to other tables, routines, and temporary functions are not supported. Examples: region="EU" date_field = CAST('2019-9-27' as DATE) nullable_field is not NULL numeric_field BETWEEN 1.0 AND 5.0
  *   `lastModifiedTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time when this row access policy was last modified, in milliseconds since the epoch.
  *   `rowAccessPolicyReference` (*type:* `GoogleApi.BigQuery.V2.Model.RowAccessPolicyReference.t`, *default:* `nil`) - Required. Reference describing the ID of this row access policy.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :creationTime => DateTime.t() | nil,
          :etag => String.t() | nil,
          :filterPredicate => String.t() | nil,
          :lastModifiedTime => DateTime.t() | nil,
          :rowAccessPolicyReference =>
            GoogleApi.BigQuery.V2.Model.RowAccessPolicyReference.t() | nil
        }

  field(:creationTime, as: DateTime)
  field(:etag)
  field(:filterPredicate)
  field(:lastModifiedTime, as: DateTime)
  field(:rowAccessPolicyReference, as: GoogleApi.BigQuery.V2.Model.RowAccessPolicyReference)
end

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

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