lib/google_api/cloud_asset/v1/model/temporal_asset.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.CloudAsset.V1.Model.TemporalAsset do
  @moduledoc """
  An asset in Google Cloud and its temporal metadata, including the time window when it was observed and its status during that window.

  ## Attributes

  *   `asset` (*type:* `GoogleApi.CloudAsset.V1.Model.Asset.t`, *default:* `nil`) - An asset in Google Cloud.
  *   `deleted` (*type:* `boolean()`, *default:* `nil`) - Whether the asset has been deleted or not.
  *   `priorAsset` (*type:* `GoogleApi.CloudAsset.V1.Model.Asset.t`, *default:* `nil`) - Prior copy of the asset. Populated if prior_asset_state is PRESENT. Currently this is only set for responses in Real-Time Feed.
  *   `priorAssetState` (*type:* `String.t`, *default:* `nil`) - State of prior_asset.
  *   `window` (*type:* `GoogleApi.CloudAsset.V1.Model.TimeWindow.t`, *default:* `nil`) - The time window when the asset data and state was observed.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :asset => GoogleApi.CloudAsset.V1.Model.Asset.t() | nil,
          :deleted => boolean() | nil,
          :priorAsset => GoogleApi.CloudAsset.V1.Model.Asset.t() | nil,
          :priorAssetState => String.t() | nil,
          :window => GoogleApi.CloudAsset.V1.Model.TimeWindow.t() | nil
        }

  field(:asset, as: GoogleApi.CloudAsset.V1.Model.Asset)
  field(:deleted)
  field(:priorAsset, as: GoogleApi.CloudAsset.V1.Model.Asset)
  field(:priorAssetState)
  field(:window, as: GoogleApi.CloudAsset.V1.Model.TimeWindow)
end

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

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