# 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.NetworkManagement.V1beta1.Model.LoadBalancerInfo do
  @moduledoc """
  For display only. Metadata associated with a load balancer.

  ## Attributes

  *   `backendType` (*type:* `String.t`, *default:* `nil`) - Type of load balancer's backend configuration.
  *   `backendUri` (*type:* `String.t`, *default:* `nil`) - Backend configuration URI.
  *   `backends` (*type:* `list(GoogleApi.NetworkManagement.V1beta1.Model.LoadBalancerBackend.t)`, *default:* `nil`) - Information for the loadbalancer backends.
  *   `healthCheckUri` (*type:* `String.t`, *default:* `nil`) - URI of the health check for the load balancer. Deprecated and no longer populated as different load balancer backends might have different health checks.
  *   `loadBalancerType` (*type:* `String.t`, *default:* `nil`) - Type of the load balancer.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :backendType => String.t() | nil,
          :backendUri => String.t() | nil,
          :backends =>
            list(GoogleApi.NetworkManagement.V1beta1.Model.LoadBalancerBackend.t()) | nil,
          :healthCheckUri => String.t() | nil,
          :loadBalancerType => String.t() | nil
        }

  field(:backendType)
  field(:backendUri)
  field(:backends, as: GoogleApi.NetworkManagement.V1beta1.Model.LoadBalancerBackend, type: :list)
  field(:healthCheckUri)
  field(:loadBalancerType)
end

defimpl Poison.Decoder, for: GoogleApi.NetworkManagement.V1beta1.Model.LoadBalancerInfo do
  def decode(value, options) do
    GoogleApi.NetworkManagement.V1beta1.Model.LoadBalancerInfo.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.NetworkManagement.V1beta1.Model.LoadBalancerInfo do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
