# 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.EventingRuntimeData do
  @moduledoc """
  Eventing runtime data has the details related to eventing managed by the system.

  ## Attributes

  *   `eventsListenerEndpoint` (*type:* `String.t`, *default:* `nil`) - Output only. Events listener endpoint. The value will populated after provisioning the events listener.
  *   `eventsListenerPscSa` (*type:* `String.t`, *default:* `nil`) - Output only. Events listener PSC Service attachment. The value will be populated after provisioning the events listener with private connectivity enabled.
  *   `status` (*type:* `GoogleApi.Connectors.V1.Model.EventingStatus.t`, *default:* `nil`) - Output only. Current status of eventing.
  *   `webhookData` (*type:* `GoogleApi.Connectors.V1.Model.WebhookData.t`, *default:* `nil`) - Output only. Webhook data.
  *   `webhookSubscriptions` (*type:* `GoogleApi.Connectors.V1.Model.WebhookSubscriptions.t`, *default:* `nil`) - Output only. Webhook subscriptions.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :eventsListenerEndpoint => String.t() | nil,
          :eventsListenerPscSa => String.t() | nil,
          :status => GoogleApi.Connectors.V1.Model.EventingStatus.t() | nil,
          :webhookData => GoogleApi.Connectors.V1.Model.WebhookData.t() | nil,
          :webhookSubscriptions => GoogleApi.Connectors.V1.Model.WebhookSubscriptions.t() | nil
        }

  field(:eventsListenerEndpoint)
  field(:eventsListenerPscSa)
  field(:status, as: GoogleApi.Connectors.V1.Model.EventingStatus)
  field(:webhookData, as: GoogleApi.Connectors.V1.Model.WebhookData)
  field(:webhookSubscriptions, as: GoogleApi.Connectors.V1.Model.WebhookSubscriptions)
end

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

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