lib/google_api/dataflow/v1b3/model/pubsub_location.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.Dataflow.V1b3.Model.PubsubLocation do
  @moduledoc """
  Identifies a pubsub location to use for transferring data into or out of a streaming Dataflow job.

  ## Attributes

  *   `dropLateData` (*type:* `boolean()`, *default:* `nil`) - Indicates whether the pipeline allows late-arriving data.
  *   `dynamicDestinations` (*type:* `boolean()`, *default:* `nil`) - If true, then this location represents dynamic topics.
  *   `idLabel` (*type:* `String.t`, *default:* `nil`) - If set, contains a pubsub label from which to extract record ids. If left empty, record deduplication will be strictly best effort.
  *   `subscription` (*type:* `String.t`, *default:* `nil`) - A pubsub subscription, in the form of "pubsub.googleapis.com/subscriptions//"
  *   `timestampLabel` (*type:* `String.t`, *default:* `nil`) - If set, contains a pubsub label from which to extract record timestamps. If left empty, record timestamps will be generated upon arrival.
  *   `topic` (*type:* `String.t`, *default:* `nil`) - A pubsub topic, in the form of "pubsub.googleapis.com/topics//"
  *   `trackingSubscription` (*type:* `String.t`, *default:* `nil`) - If set, specifies the pubsub subscription that will be used for tracking custom time timestamps for watermark estimation.
  *   `withAttributes` (*type:* `boolean()`, *default:* `nil`) - If true, then the client has requested to get pubsub attributes.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :dropLateData => boolean() | nil,
          :dynamicDestinations => boolean() | nil,
          :idLabel => String.t() | nil,
          :subscription => String.t() | nil,
          :timestampLabel => String.t() | nil,
          :topic => String.t() | nil,
          :trackingSubscription => String.t() | nil,
          :withAttributes => boolean() | nil
        }

  field(:dropLateData)
  field(:dynamicDestinations)
  field(:idLabel)
  field(:subscription)
  field(:timestampLabel)
  field(:topic)
  field(:trackingSubscription)
  field(:withAttributes)
end

defimpl Poison.Decoder, for: GoogleApi.Dataflow.V1b3.Model.PubsubLocation do
  def decode(value, options) do
    GoogleApi.Dataflow.V1b3.Model.PubsubLocation.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Dataflow.V1b3.Model.PubsubLocation do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end