# 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.Connectors.V1.Model.EventingConfig do
  @moduledoc """
  Eventing Configuration of a connection

  ## Attributes

  *   `additionalVariables` (*type:* `list(GoogleApi.Connectors.V1.Model.ConfigVariable.t)`, *default:* `nil`) - Optional. Additional eventing related field values
  *   `authConfig` (*type:* `GoogleApi.Connectors.V1.Model.AuthConfig.t`, *default:* `nil`) - Optional. Auth details for the webhook adapter.
  *   `deadLetterConfig` (*type:* `GoogleApi.Connectors.V1.Model.DeadLetterConfig.t`, *default:* `nil`) - Optional. Dead letter configuration for eventing of a connection.
  *   `enrichmentConfig` (*type:* `GoogleApi.Connectors.V1.Model.EnrichmentConfig.t`, *default:* `nil`) - Optional. Data enrichment configuration.
  *   `enrichmentEnabled` (*type:* `boolean()`, *default:* `nil`) - Optional. Enrichment Enabled.
  *   `eventsListenerIngressEndpoint` (*type:* `String.t`, *default:* `nil`) - Optional. Ingress endpoint of the event listener. This is used only when private connectivity is enabled.
  *   `listenerAuthConfig` (*type:* `GoogleApi.Connectors.V1.Model.AuthConfig.t`, *default:* `nil`) - Optional. Auth details for the event listener.
  *   `privateConnectivityEnabled` (*type:* `boolean()`, *default:* `nil`) - Optional. Private Connectivity Enabled.
  *   `proxyDestinationConfig` (*type:* `GoogleApi.Connectors.V1.Model.DestinationConfig.t`, *default:* `nil`) - Optional. Proxy for Eventing auto-registration.
  *   `registrationDestinationConfig` (*type:* `GoogleApi.Connectors.V1.Model.DestinationConfig.t`, *default:* `nil`) - Optional. Registration endpoint for auto registration.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :additionalVariables => list(GoogleApi.Connectors.V1.Model.ConfigVariable.t()) | nil,
          :authConfig => GoogleApi.Connectors.V1.Model.AuthConfig.t() | nil,
          :deadLetterConfig => GoogleApi.Connectors.V1.Model.DeadLetterConfig.t() | nil,
          :enrichmentConfig => GoogleApi.Connectors.V1.Model.EnrichmentConfig.t() | nil,
          :enrichmentEnabled => boolean() | nil,
          :eventsListenerIngressEndpoint => String.t() | nil,
          :listenerAuthConfig => GoogleApi.Connectors.V1.Model.AuthConfig.t() | nil,
          :privateConnectivityEnabled => boolean() | nil,
          :proxyDestinationConfig => GoogleApi.Connectors.V1.Model.DestinationConfig.t() | nil,
          :registrationDestinationConfig =>
            GoogleApi.Connectors.V1.Model.DestinationConfig.t() | nil
        }

  field(:additionalVariables, as: GoogleApi.Connectors.V1.Model.ConfigVariable, type: :list)
  field(:authConfig, as: GoogleApi.Connectors.V1.Model.AuthConfig)
  field(:deadLetterConfig, as: GoogleApi.Connectors.V1.Model.DeadLetterConfig)
  field(:enrichmentConfig, as: GoogleApi.Connectors.V1.Model.EnrichmentConfig)
  field(:enrichmentEnabled)
  field(:eventsListenerIngressEndpoint)
  field(:listenerAuthConfig, as: GoogleApi.Connectors.V1.Model.AuthConfig)
  field(:privateConnectivityEnabled)
  field(:proxyDestinationConfig, as: GoogleApi.Connectors.V1.Model.DestinationConfig)
  field(:registrationDestinationConfig, as: GoogleApi.Connectors.V1.Model.DestinationConfig)
end

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

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