# 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.NetworkConnectivity.V1.Model.LinkedRouterApplianceInstances do
  @moduledoc """
  A collection of router appliance instances. If you configure multiple router appliance instances to receive data from the same set of sites outside of Google Cloud, we recommend that you associate those instances with the same spoke.

  ## Attributes

  *   `includeImportRanges` (*type:* `list(String.t)`, *default:* `nil`) - Optional. IP ranges allowed to be included during import from hub (does not control transit connectivity). The only allowed value for now is "ALL_IPV4_RANGES".
  *   `instances` (*type:* `list(GoogleApi.NetworkConnectivity.V1.Model.RouterApplianceInstance.t)`, *default:* `nil`) - The list of router appliance instances.
  *   `siteToSiteDataTransfer` (*type:* `boolean()`, *default:* `nil`) - A value that controls whether site-to-site data transfer is enabled for these resources. Data transfer is available only in [supported locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
  *   `vpcNetwork` (*type:* `String.t`, *default:* `nil`) - Output only. The VPC network where these router appliance instances are located.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :includeImportRanges => list(String.t()) | nil,
          :instances =>
            list(GoogleApi.NetworkConnectivity.V1.Model.RouterApplianceInstance.t()) | nil,
          :siteToSiteDataTransfer => boolean() | nil,
          :vpcNetwork => String.t() | nil
        }

  field(:includeImportRanges, type: :list)

  field(:instances,
    as: GoogleApi.NetworkConnectivity.V1.Model.RouterApplianceInstance,
    type: :list
  )

  field(:siteToSiteDataTransfer)
  field(:vpcNetwork)
end

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

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