# 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.Compute.V1.Model.VpnGatewayStatusVpnConnection do
@moduledoc """
A VPN connection contains all VPN tunnels connected from this VpnGateway to the same peer gateway. The peer gateway could either be an external VPN gateway or a Google Cloud VPN gateway.
## Attributes
* `peerExternalGateway` (*type:* `String.t`, *default:* `nil`) - URL reference to the peer external VPN gateways to which the VPN tunnels in this VPN connection are connected. This field is mutually exclusive with peer_gcp_gateway.
* `peerGcpGateway` (*type:* `String.t`, *default:* `nil`) - URL reference to the peer side VPN gateways to which the VPN tunnels in this VPN connection are connected. This field is mutually exclusive with peer_gcp_gateway.
* `state` (*type:* `GoogleApi.Compute.V1.Model.VpnGatewayStatusHighAvailabilityRequirementState.t`, *default:* `nil`) - HighAvailabilityRequirementState for the VPN connection.
* `tunnels` (*type:* `list(GoogleApi.Compute.V1.Model.VpnGatewayStatusTunnel.t)`, *default:* `nil`) - List of VPN tunnels that are in this VPN connection.
"""
use GoogleApi.Gax.ModelBase
@type t :: %__MODULE__{
:peerExternalGateway => String.t() | nil,
:peerGcpGateway => String.t() | nil,
:state =>
GoogleApi.Compute.V1.Model.VpnGatewayStatusHighAvailabilityRequirementState.t() | nil,
:tunnels => list(GoogleApi.Compute.V1.Model.VpnGatewayStatusTunnel.t()) | nil
}
field(:peerExternalGateway)
field(:peerGcpGateway)
field(:state, as: GoogleApi.Compute.V1.Model.VpnGatewayStatusHighAvailabilityRequirementState)
field(:tunnels, as: GoogleApi.Compute.V1.Model.VpnGatewayStatusTunnel, type: :list)
end
defimpl Poison.Decoder, for: GoogleApi.Compute.V1.Model.VpnGatewayStatusVpnConnection do
def decode(value, options) do
GoogleApi.Compute.V1.Model.VpnGatewayStatusVpnConnection.decode(value, options)
end
end
defimpl Poison.Encoder, for: GoogleApi.Compute.V1.Model.VpnGatewayStatusVpnConnection do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end