lib/google_api/datastream/v1/model/stream_object.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.Datastream.V1.Model.StreamObject do
  @moduledoc """
  A specific stream object (e.g a specific DB table).

  ## Attributes

  *   `backfillJob` (*type:* `GoogleApi.Datastream.V1.Model.BackfillJob.t`, *default:* `nil`) - The latest backfill job that was initiated for the stream object.
  *   `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The creation time of the object.
  *   `displayName` (*type:* `String.t`, *default:* `nil`) - Required. Display name.
  *   `errors` (*type:* `list(GoogleApi.Datastream.V1.Model.Error.t)`, *default:* `nil`) - Output only. Active errors on the object.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Output only. The object resource's name.
  *   `sourceObject` (*type:* `GoogleApi.Datastream.V1.Model.SourceObjectIdentifier.t`, *default:* `nil`) - The object identifier in the data source.
  *   `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The last update time of the object.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :backfillJob => GoogleApi.Datastream.V1.Model.BackfillJob.t() | nil,
          :createTime => DateTime.t() | nil,
          :displayName => String.t() | nil,
          :errors => list(GoogleApi.Datastream.V1.Model.Error.t()) | nil,
          :name => String.t() | nil,
          :sourceObject => GoogleApi.Datastream.V1.Model.SourceObjectIdentifier.t() | nil,
          :updateTime => DateTime.t() | nil
        }

  field(:backfillJob, as: GoogleApi.Datastream.V1.Model.BackfillJob)
  field(:createTime, as: DateTime)
  field(:displayName)
  field(:errors, as: GoogleApi.Datastream.V1.Model.Error, type: :list)
  field(:name)
  field(:sourceObject, as: GoogleApi.Datastream.V1.Model.SourceObjectIdentifier)
  field(:updateTime, as: DateTime)
end

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

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