lib/google_api/compute/v1/model/router_status_bgp_peer_status.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.Compute.V1.Model.RouterStatusBgpPeerStatus do
  @moduledoc """


  ## Attributes

  *   `advertisedRoutes` (*type:* `list(GoogleApi.Compute.V1.Model.Route.t)`, *default:* `nil`) - Routes that were advertised to the remote BGP peer
  *   `ipAddress` (*type:* `String.t`, *default:* `nil`) - IP address of the local BGP interface.
  *   `linkedVpnTunnel` (*type:* `String.t`, *default:* `nil`) - URL of the VPN tunnel that this BGP peer controls.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Name of this BGP peer. Unique within the Routers resource.
  *   `numLearnedRoutes` (*type:* `integer()`, *default:* `nil`) - Number of routes learned from the remote BGP Peer.
  *   `peerIpAddress` (*type:* `String.t`, *default:* `nil`) - IP address of the remote BGP interface.
  *   `routerApplianceInstance` (*type:* `String.t`, *default:* `nil`) - [Output only] URI of the VM instance that is used as third-party router appliances such as Next Gen Firewalls, Virtual Routers, or Router Appliances. The VM instance is the peer side of the BGP session.
  *   `state` (*type:* `String.t`, *default:* `nil`) - BGP state as specified in RFC1771.
  *   `status` (*type:* `String.t`, *default:* `nil`) - Status of the BGP peer: {UP, DOWN}
  *   `uptime` (*type:* `String.t`, *default:* `nil`) - Time this session has been up. Format: 14 years, 51 weeks, 6 days, 23 hours, 59 minutes, 59 seconds
  *   `uptimeSeconds` (*type:* `String.t`, *default:* `nil`) - Time this session has been up, in seconds. Format: 145
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :advertisedRoutes => list(GoogleApi.Compute.V1.Model.Route.t()) | nil,
          :ipAddress => String.t() | nil,
          :linkedVpnTunnel => String.t() | nil,
          :name => String.t() | nil,
          :numLearnedRoutes => integer() | nil,
          :peerIpAddress => String.t() | nil,
          :routerApplianceInstance => String.t() | nil,
          :state => String.t() | nil,
          :status => String.t() | nil,
          :uptime => String.t() | nil,
          :uptimeSeconds => String.t() | nil
        }

  field(:advertisedRoutes, as: GoogleApi.Compute.V1.Model.Route, type: :list)
  field(:ipAddress)
  field(:linkedVpnTunnel)
  field(:name)
  field(:numLearnedRoutes)
  field(:peerIpAddress)
  field(:routerApplianceInstance)
  field(:state)
  field(:status)
  field(:uptime)
  field(:uptimeSeconds)
end

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

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