{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.EC2.Types.TransitGatewayVpcAttachmentOptions
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.EC2.Types.TransitGatewayVpcAttachmentOptions where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EC2.Internal
import Amazonka.EC2.Types.ApplianceModeSupportValue
import Amazonka.EC2.Types.DnsSupportValue
import Amazonka.EC2.Types.Ipv6SupportValue
import qualified Amazonka.Prelude as Prelude

-- | Describes the VPC attachment options.
--
-- /See:/ 'newTransitGatewayVpcAttachmentOptions' smart constructor.
data TransitGatewayVpcAttachmentOptions = TransitGatewayVpcAttachmentOptions'
  { -- | Indicates whether appliance mode support is enabled.
    TransitGatewayVpcAttachmentOptions
-> Maybe ApplianceModeSupportValue
applianceModeSupport :: Prelude.Maybe ApplianceModeSupportValue,
    -- | Indicates whether DNS support is enabled.
    TransitGatewayVpcAttachmentOptions -> Maybe DnsSupportValue
dnsSupport :: Prelude.Maybe DnsSupportValue,
    -- | Indicates whether IPv6 support is disabled.
    TransitGatewayVpcAttachmentOptions -> Maybe Ipv6SupportValue
ipv6Support :: Prelude.Maybe Ipv6SupportValue
  }
  deriving (TransitGatewayVpcAttachmentOptions
-> TransitGatewayVpcAttachmentOptions -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TransitGatewayVpcAttachmentOptions
-> TransitGatewayVpcAttachmentOptions -> Bool
$c/= :: TransitGatewayVpcAttachmentOptions
-> TransitGatewayVpcAttachmentOptions -> Bool
== :: TransitGatewayVpcAttachmentOptions
-> TransitGatewayVpcAttachmentOptions -> Bool
$c== :: TransitGatewayVpcAttachmentOptions
-> TransitGatewayVpcAttachmentOptions -> Bool
Prelude.Eq, ReadPrec [TransitGatewayVpcAttachmentOptions]
ReadPrec TransitGatewayVpcAttachmentOptions
Int -> ReadS TransitGatewayVpcAttachmentOptions
ReadS [TransitGatewayVpcAttachmentOptions]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TransitGatewayVpcAttachmentOptions]
$creadListPrec :: ReadPrec [TransitGatewayVpcAttachmentOptions]
readPrec :: ReadPrec TransitGatewayVpcAttachmentOptions
$creadPrec :: ReadPrec TransitGatewayVpcAttachmentOptions
readList :: ReadS [TransitGatewayVpcAttachmentOptions]
$creadList :: ReadS [TransitGatewayVpcAttachmentOptions]
readsPrec :: Int -> ReadS TransitGatewayVpcAttachmentOptions
$creadsPrec :: Int -> ReadS TransitGatewayVpcAttachmentOptions
Prelude.Read, Int -> TransitGatewayVpcAttachmentOptions -> ShowS
[TransitGatewayVpcAttachmentOptions] -> ShowS
TransitGatewayVpcAttachmentOptions -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TransitGatewayVpcAttachmentOptions] -> ShowS
$cshowList :: [TransitGatewayVpcAttachmentOptions] -> ShowS
show :: TransitGatewayVpcAttachmentOptions -> String
$cshow :: TransitGatewayVpcAttachmentOptions -> String
showsPrec :: Int -> TransitGatewayVpcAttachmentOptions -> ShowS
$cshowsPrec :: Int -> TransitGatewayVpcAttachmentOptions -> ShowS
Prelude.Show, forall x.
Rep TransitGatewayVpcAttachmentOptions x
-> TransitGatewayVpcAttachmentOptions
forall x.
TransitGatewayVpcAttachmentOptions
-> Rep TransitGatewayVpcAttachmentOptions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep TransitGatewayVpcAttachmentOptions x
-> TransitGatewayVpcAttachmentOptions
$cfrom :: forall x.
TransitGatewayVpcAttachmentOptions
-> Rep TransitGatewayVpcAttachmentOptions x
Prelude.Generic)

-- |
-- Create a value of 'TransitGatewayVpcAttachmentOptions' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'applianceModeSupport', 'transitGatewayVpcAttachmentOptions_applianceModeSupport' - Indicates whether appliance mode support is enabled.
--
-- 'dnsSupport', 'transitGatewayVpcAttachmentOptions_dnsSupport' - Indicates whether DNS support is enabled.
--
-- 'ipv6Support', 'transitGatewayVpcAttachmentOptions_ipv6Support' - Indicates whether IPv6 support is disabled.
newTransitGatewayVpcAttachmentOptions ::
  TransitGatewayVpcAttachmentOptions
newTransitGatewayVpcAttachmentOptions :: TransitGatewayVpcAttachmentOptions
newTransitGatewayVpcAttachmentOptions =
  TransitGatewayVpcAttachmentOptions'
    { $sel:applianceModeSupport:TransitGatewayVpcAttachmentOptions' :: Maybe ApplianceModeSupportValue
applianceModeSupport =
        forall a. Maybe a
Prelude.Nothing,
      $sel:dnsSupport:TransitGatewayVpcAttachmentOptions' :: Maybe DnsSupportValue
dnsSupport = forall a. Maybe a
Prelude.Nothing,
      $sel:ipv6Support:TransitGatewayVpcAttachmentOptions' :: Maybe Ipv6SupportValue
ipv6Support = forall a. Maybe a
Prelude.Nothing
    }

-- | Indicates whether appliance mode support is enabled.
transitGatewayVpcAttachmentOptions_applianceModeSupport :: Lens.Lens' TransitGatewayVpcAttachmentOptions (Prelude.Maybe ApplianceModeSupportValue)
transitGatewayVpcAttachmentOptions_applianceModeSupport :: Lens'
  TransitGatewayVpcAttachmentOptions
  (Maybe ApplianceModeSupportValue)
transitGatewayVpcAttachmentOptions_applianceModeSupport = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TransitGatewayVpcAttachmentOptions' {Maybe ApplianceModeSupportValue
applianceModeSupport :: Maybe ApplianceModeSupportValue
$sel:applianceModeSupport:TransitGatewayVpcAttachmentOptions' :: TransitGatewayVpcAttachmentOptions
-> Maybe ApplianceModeSupportValue
applianceModeSupport} -> Maybe ApplianceModeSupportValue
applianceModeSupport) (\s :: TransitGatewayVpcAttachmentOptions
s@TransitGatewayVpcAttachmentOptions' {} Maybe ApplianceModeSupportValue
a -> TransitGatewayVpcAttachmentOptions
s {$sel:applianceModeSupport:TransitGatewayVpcAttachmentOptions' :: Maybe ApplianceModeSupportValue
applianceModeSupport = Maybe ApplianceModeSupportValue
a} :: TransitGatewayVpcAttachmentOptions)

-- | Indicates whether DNS support is enabled.
transitGatewayVpcAttachmentOptions_dnsSupport :: Lens.Lens' TransitGatewayVpcAttachmentOptions (Prelude.Maybe DnsSupportValue)
transitGatewayVpcAttachmentOptions_dnsSupport :: Lens' TransitGatewayVpcAttachmentOptions (Maybe DnsSupportValue)
transitGatewayVpcAttachmentOptions_dnsSupport = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TransitGatewayVpcAttachmentOptions' {Maybe DnsSupportValue
dnsSupport :: Maybe DnsSupportValue
$sel:dnsSupport:TransitGatewayVpcAttachmentOptions' :: TransitGatewayVpcAttachmentOptions -> Maybe DnsSupportValue
dnsSupport} -> Maybe DnsSupportValue
dnsSupport) (\s :: TransitGatewayVpcAttachmentOptions
s@TransitGatewayVpcAttachmentOptions' {} Maybe DnsSupportValue
a -> TransitGatewayVpcAttachmentOptions
s {$sel:dnsSupport:TransitGatewayVpcAttachmentOptions' :: Maybe DnsSupportValue
dnsSupport = Maybe DnsSupportValue
a} :: TransitGatewayVpcAttachmentOptions)

-- | Indicates whether IPv6 support is disabled.
transitGatewayVpcAttachmentOptions_ipv6Support :: Lens.Lens' TransitGatewayVpcAttachmentOptions (Prelude.Maybe Ipv6SupportValue)
transitGatewayVpcAttachmentOptions_ipv6Support :: Lens' TransitGatewayVpcAttachmentOptions (Maybe Ipv6SupportValue)
transitGatewayVpcAttachmentOptions_ipv6Support = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TransitGatewayVpcAttachmentOptions' {Maybe Ipv6SupportValue
ipv6Support :: Maybe Ipv6SupportValue
$sel:ipv6Support:TransitGatewayVpcAttachmentOptions' :: TransitGatewayVpcAttachmentOptions -> Maybe Ipv6SupportValue
ipv6Support} -> Maybe Ipv6SupportValue
ipv6Support) (\s :: TransitGatewayVpcAttachmentOptions
s@TransitGatewayVpcAttachmentOptions' {} Maybe Ipv6SupportValue
a -> TransitGatewayVpcAttachmentOptions
s {$sel:ipv6Support:TransitGatewayVpcAttachmentOptions' :: Maybe Ipv6SupportValue
ipv6Support = Maybe Ipv6SupportValue
a} :: TransitGatewayVpcAttachmentOptions)

instance
  Data.FromXML
    TransitGatewayVpcAttachmentOptions
  where
  parseXML :: [Node] -> Either String TransitGatewayVpcAttachmentOptions
parseXML [Node]
x =
    Maybe ApplianceModeSupportValue
-> Maybe DnsSupportValue
-> Maybe Ipv6SupportValue
-> TransitGatewayVpcAttachmentOptions
TransitGatewayVpcAttachmentOptions'
      forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"applianceModeSupport")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"dnsSupport")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"ipv6Support")

instance
  Prelude.Hashable
    TransitGatewayVpcAttachmentOptions
  where
  hashWithSalt :: Int -> TransitGatewayVpcAttachmentOptions -> Int
hashWithSalt
    Int
_salt
    TransitGatewayVpcAttachmentOptions' {Maybe ApplianceModeSupportValue
Maybe DnsSupportValue
Maybe Ipv6SupportValue
ipv6Support :: Maybe Ipv6SupportValue
dnsSupport :: Maybe DnsSupportValue
applianceModeSupport :: Maybe ApplianceModeSupportValue
$sel:ipv6Support:TransitGatewayVpcAttachmentOptions' :: TransitGatewayVpcAttachmentOptions -> Maybe Ipv6SupportValue
$sel:dnsSupport:TransitGatewayVpcAttachmentOptions' :: TransitGatewayVpcAttachmentOptions -> Maybe DnsSupportValue
$sel:applianceModeSupport:TransitGatewayVpcAttachmentOptions' :: TransitGatewayVpcAttachmentOptions
-> Maybe ApplianceModeSupportValue
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ApplianceModeSupportValue
applianceModeSupport
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DnsSupportValue
dnsSupport
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Ipv6SupportValue
ipv6Support

instance
  Prelude.NFData
    TransitGatewayVpcAttachmentOptions
  where
  rnf :: TransitGatewayVpcAttachmentOptions -> ()
rnf TransitGatewayVpcAttachmentOptions' {Maybe ApplianceModeSupportValue
Maybe DnsSupportValue
Maybe Ipv6SupportValue
ipv6Support :: Maybe Ipv6SupportValue
dnsSupport :: Maybe DnsSupportValue
applianceModeSupport :: Maybe ApplianceModeSupportValue
$sel:ipv6Support:TransitGatewayVpcAttachmentOptions' :: TransitGatewayVpcAttachmentOptions -> Maybe Ipv6SupportValue
$sel:dnsSupport:TransitGatewayVpcAttachmentOptions' :: TransitGatewayVpcAttachmentOptions -> Maybe DnsSupportValue
$sel:applianceModeSupport:TransitGatewayVpcAttachmentOptions' :: TransitGatewayVpcAttachmentOptions
-> Maybe ApplianceModeSupportValue
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe ApplianceModeSupportValue
applianceModeSupport
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DnsSupportValue
dnsSupport
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Ipv6SupportValue
ipv6Support