{-# 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.CreateTransitGatewayVpcAttachmentRequestOptions
-- 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.CreateTransitGatewayVpcAttachmentRequestOptions 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 options for a VPC attachment.
--
-- /See:/ 'newCreateTransitGatewayVpcAttachmentRequestOptions' smart constructor.
data CreateTransitGatewayVpcAttachmentRequestOptions = CreateTransitGatewayVpcAttachmentRequestOptions'
  { -- | Enable or disable support for appliance mode. If enabled, a traffic flow
    -- between a source and destination uses the same Availability Zone for the
    -- VPC attachment for the lifetime of that flow. The default is @disable@.
    CreateTransitGatewayVpcAttachmentRequestOptions
-> Maybe ApplianceModeSupportValue
applianceModeSupport :: Prelude.Maybe ApplianceModeSupportValue,
    -- | Enable or disable DNS support. The default is @enable@.
    CreateTransitGatewayVpcAttachmentRequestOptions
-> Maybe DnsSupportValue
dnsSupport :: Prelude.Maybe DnsSupportValue,
    -- | Enable or disable IPv6 support. The default is @disable@.
    CreateTransitGatewayVpcAttachmentRequestOptions
-> Maybe Ipv6SupportValue
ipv6Support :: Prelude.Maybe Ipv6SupportValue
  }
  deriving (CreateTransitGatewayVpcAttachmentRequestOptions
-> CreateTransitGatewayVpcAttachmentRequestOptions -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateTransitGatewayVpcAttachmentRequestOptions
-> CreateTransitGatewayVpcAttachmentRequestOptions -> Bool
$c/= :: CreateTransitGatewayVpcAttachmentRequestOptions
-> CreateTransitGatewayVpcAttachmentRequestOptions -> Bool
== :: CreateTransitGatewayVpcAttachmentRequestOptions
-> CreateTransitGatewayVpcAttachmentRequestOptions -> Bool
$c== :: CreateTransitGatewayVpcAttachmentRequestOptions
-> CreateTransitGatewayVpcAttachmentRequestOptions -> Bool
Prelude.Eq, ReadPrec [CreateTransitGatewayVpcAttachmentRequestOptions]
ReadPrec CreateTransitGatewayVpcAttachmentRequestOptions
Int -> ReadS CreateTransitGatewayVpcAttachmentRequestOptions
ReadS [CreateTransitGatewayVpcAttachmentRequestOptions]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateTransitGatewayVpcAttachmentRequestOptions]
$creadListPrec :: ReadPrec [CreateTransitGatewayVpcAttachmentRequestOptions]
readPrec :: ReadPrec CreateTransitGatewayVpcAttachmentRequestOptions
$creadPrec :: ReadPrec CreateTransitGatewayVpcAttachmentRequestOptions
readList :: ReadS [CreateTransitGatewayVpcAttachmentRequestOptions]
$creadList :: ReadS [CreateTransitGatewayVpcAttachmentRequestOptions]
readsPrec :: Int -> ReadS CreateTransitGatewayVpcAttachmentRequestOptions
$creadsPrec :: Int -> ReadS CreateTransitGatewayVpcAttachmentRequestOptions
Prelude.Read, Int -> CreateTransitGatewayVpcAttachmentRequestOptions -> ShowS
[CreateTransitGatewayVpcAttachmentRequestOptions] -> ShowS
CreateTransitGatewayVpcAttachmentRequestOptions -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateTransitGatewayVpcAttachmentRequestOptions] -> ShowS
$cshowList :: [CreateTransitGatewayVpcAttachmentRequestOptions] -> ShowS
show :: CreateTransitGatewayVpcAttachmentRequestOptions -> String
$cshow :: CreateTransitGatewayVpcAttachmentRequestOptions -> String
showsPrec :: Int -> CreateTransitGatewayVpcAttachmentRequestOptions -> ShowS
$cshowsPrec :: Int -> CreateTransitGatewayVpcAttachmentRequestOptions -> ShowS
Prelude.Show, forall x.
Rep CreateTransitGatewayVpcAttachmentRequestOptions x
-> CreateTransitGatewayVpcAttachmentRequestOptions
forall x.
CreateTransitGatewayVpcAttachmentRequestOptions
-> Rep CreateTransitGatewayVpcAttachmentRequestOptions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateTransitGatewayVpcAttachmentRequestOptions x
-> CreateTransitGatewayVpcAttachmentRequestOptions
$cfrom :: forall x.
CreateTransitGatewayVpcAttachmentRequestOptions
-> Rep CreateTransitGatewayVpcAttachmentRequestOptions x
Prelude.Generic)

-- |
-- Create a value of 'CreateTransitGatewayVpcAttachmentRequestOptions' 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', 'createTransitGatewayVpcAttachmentRequestOptions_applianceModeSupport' - Enable or disable support for appliance mode. If enabled, a traffic flow
-- between a source and destination uses the same Availability Zone for the
-- VPC attachment for the lifetime of that flow. The default is @disable@.
--
-- 'dnsSupport', 'createTransitGatewayVpcAttachmentRequestOptions_dnsSupport' - Enable or disable DNS support. The default is @enable@.
--
-- 'ipv6Support', 'createTransitGatewayVpcAttachmentRequestOptions_ipv6Support' - Enable or disable IPv6 support. The default is @disable@.
newCreateTransitGatewayVpcAttachmentRequestOptions ::
  CreateTransitGatewayVpcAttachmentRequestOptions
newCreateTransitGatewayVpcAttachmentRequestOptions :: CreateTransitGatewayVpcAttachmentRequestOptions
newCreateTransitGatewayVpcAttachmentRequestOptions =
  CreateTransitGatewayVpcAttachmentRequestOptions'
    { $sel:applianceModeSupport:CreateTransitGatewayVpcAttachmentRequestOptions' :: Maybe ApplianceModeSupportValue
applianceModeSupport =
        forall a. Maybe a
Prelude.Nothing,
      $sel:dnsSupport:CreateTransitGatewayVpcAttachmentRequestOptions' :: Maybe DnsSupportValue
dnsSupport =
        forall a. Maybe a
Prelude.Nothing,
      $sel:ipv6Support:CreateTransitGatewayVpcAttachmentRequestOptions' :: Maybe Ipv6SupportValue
ipv6Support =
        forall a. Maybe a
Prelude.Nothing
    }

-- | Enable or disable support for appliance mode. If enabled, a traffic flow
-- between a source and destination uses the same Availability Zone for the
-- VPC attachment for the lifetime of that flow. The default is @disable@.
createTransitGatewayVpcAttachmentRequestOptions_applianceModeSupport :: Lens.Lens' CreateTransitGatewayVpcAttachmentRequestOptions (Prelude.Maybe ApplianceModeSupportValue)
createTransitGatewayVpcAttachmentRequestOptions_applianceModeSupport :: Lens'
  CreateTransitGatewayVpcAttachmentRequestOptions
  (Maybe ApplianceModeSupportValue)
createTransitGatewayVpcAttachmentRequestOptions_applianceModeSupport = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTransitGatewayVpcAttachmentRequestOptions' {Maybe ApplianceModeSupportValue
applianceModeSupport :: Maybe ApplianceModeSupportValue
$sel:applianceModeSupport:CreateTransitGatewayVpcAttachmentRequestOptions' :: CreateTransitGatewayVpcAttachmentRequestOptions
-> Maybe ApplianceModeSupportValue
applianceModeSupport} -> Maybe ApplianceModeSupportValue
applianceModeSupport) (\s :: CreateTransitGatewayVpcAttachmentRequestOptions
s@CreateTransitGatewayVpcAttachmentRequestOptions' {} Maybe ApplianceModeSupportValue
a -> CreateTransitGatewayVpcAttachmentRequestOptions
s {$sel:applianceModeSupport:CreateTransitGatewayVpcAttachmentRequestOptions' :: Maybe ApplianceModeSupportValue
applianceModeSupport = Maybe ApplianceModeSupportValue
a} :: CreateTransitGatewayVpcAttachmentRequestOptions)

-- | Enable or disable DNS support. The default is @enable@.
createTransitGatewayVpcAttachmentRequestOptions_dnsSupport :: Lens.Lens' CreateTransitGatewayVpcAttachmentRequestOptions (Prelude.Maybe DnsSupportValue)
createTransitGatewayVpcAttachmentRequestOptions_dnsSupport :: Lens'
  CreateTransitGatewayVpcAttachmentRequestOptions
  (Maybe DnsSupportValue)
createTransitGatewayVpcAttachmentRequestOptions_dnsSupport = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTransitGatewayVpcAttachmentRequestOptions' {Maybe DnsSupportValue
dnsSupport :: Maybe DnsSupportValue
$sel:dnsSupport:CreateTransitGatewayVpcAttachmentRequestOptions' :: CreateTransitGatewayVpcAttachmentRequestOptions
-> Maybe DnsSupportValue
dnsSupport} -> Maybe DnsSupportValue
dnsSupport) (\s :: CreateTransitGatewayVpcAttachmentRequestOptions
s@CreateTransitGatewayVpcAttachmentRequestOptions' {} Maybe DnsSupportValue
a -> CreateTransitGatewayVpcAttachmentRequestOptions
s {$sel:dnsSupport:CreateTransitGatewayVpcAttachmentRequestOptions' :: Maybe DnsSupportValue
dnsSupport = Maybe DnsSupportValue
a} :: CreateTransitGatewayVpcAttachmentRequestOptions)

-- | Enable or disable IPv6 support. The default is @disable@.
createTransitGatewayVpcAttachmentRequestOptions_ipv6Support :: Lens.Lens' CreateTransitGatewayVpcAttachmentRequestOptions (Prelude.Maybe Ipv6SupportValue)
createTransitGatewayVpcAttachmentRequestOptions_ipv6Support :: Lens'
  CreateTransitGatewayVpcAttachmentRequestOptions
  (Maybe Ipv6SupportValue)
createTransitGatewayVpcAttachmentRequestOptions_ipv6Support = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTransitGatewayVpcAttachmentRequestOptions' {Maybe Ipv6SupportValue
ipv6Support :: Maybe Ipv6SupportValue
$sel:ipv6Support:CreateTransitGatewayVpcAttachmentRequestOptions' :: CreateTransitGatewayVpcAttachmentRequestOptions
-> Maybe Ipv6SupportValue
ipv6Support} -> Maybe Ipv6SupportValue
ipv6Support) (\s :: CreateTransitGatewayVpcAttachmentRequestOptions
s@CreateTransitGatewayVpcAttachmentRequestOptions' {} Maybe Ipv6SupportValue
a -> CreateTransitGatewayVpcAttachmentRequestOptions
s {$sel:ipv6Support:CreateTransitGatewayVpcAttachmentRequestOptions' :: Maybe Ipv6SupportValue
ipv6Support = Maybe Ipv6SupportValue
a} :: CreateTransitGatewayVpcAttachmentRequestOptions)

instance
  Prelude.Hashable
    CreateTransitGatewayVpcAttachmentRequestOptions
  where
  hashWithSalt :: Int -> CreateTransitGatewayVpcAttachmentRequestOptions -> Int
hashWithSalt
    Int
_salt
    CreateTransitGatewayVpcAttachmentRequestOptions' {Maybe ApplianceModeSupportValue
Maybe DnsSupportValue
Maybe Ipv6SupportValue
ipv6Support :: Maybe Ipv6SupportValue
dnsSupport :: Maybe DnsSupportValue
applianceModeSupport :: Maybe ApplianceModeSupportValue
$sel:ipv6Support:CreateTransitGatewayVpcAttachmentRequestOptions' :: CreateTransitGatewayVpcAttachmentRequestOptions
-> Maybe Ipv6SupportValue
$sel:dnsSupport:CreateTransitGatewayVpcAttachmentRequestOptions' :: CreateTransitGatewayVpcAttachmentRequestOptions
-> Maybe DnsSupportValue
$sel:applianceModeSupport:CreateTransitGatewayVpcAttachmentRequestOptions' :: CreateTransitGatewayVpcAttachmentRequestOptions
-> 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
    CreateTransitGatewayVpcAttachmentRequestOptions
  where
  rnf :: CreateTransitGatewayVpcAttachmentRequestOptions -> ()
rnf
    CreateTransitGatewayVpcAttachmentRequestOptions' {Maybe ApplianceModeSupportValue
Maybe DnsSupportValue
Maybe Ipv6SupportValue
ipv6Support :: Maybe Ipv6SupportValue
dnsSupport :: Maybe DnsSupportValue
applianceModeSupport :: Maybe ApplianceModeSupportValue
$sel:ipv6Support:CreateTransitGatewayVpcAttachmentRequestOptions' :: CreateTransitGatewayVpcAttachmentRequestOptions
-> Maybe Ipv6SupportValue
$sel:dnsSupport:CreateTransitGatewayVpcAttachmentRequestOptions' :: CreateTransitGatewayVpcAttachmentRequestOptions
-> Maybe DnsSupportValue
$sel:applianceModeSupport:CreateTransitGatewayVpcAttachmentRequestOptions' :: CreateTransitGatewayVpcAttachmentRequestOptions
-> 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

instance
  Data.ToQuery
    CreateTransitGatewayVpcAttachmentRequestOptions
  where
  toQuery :: CreateTransitGatewayVpcAttachmentRequestOptions -> QueryString
toQuery
    CreateTransitGatewayVpcAttachmentRequestOptions' {Maybe ApplianceModeSupportValue
Maybe DnsSupportValue
Maybe Ipv6SupportValue
ipv6Support :: Maybe Ipv6SupportValue
dnsSupport :: Maybe DnsSupportValue
applianceModeSupport :: Maybe ApplianceModeSupportValue
$sel:ipv6Support:CreateTransitGatewayVpcAttachmentRequestOptions' :: CreateTransitGatewayVpcAttachmentRequestOptions
-> Maybe Ipv6SupportValue
$sel:dnsSupport:CreateTransitGatewayVpcAttachmentRequestOptions' :: CreateTransitGatewayVpcAttachmentRequestOptions
-> Maybe DnsSupportValue
$sel:applianceModeSupport:CreateTransitGatewayVpcAttachmentRequestOptions' :: CreateTransitGatewayVpcAttachmentRequestOptions
-> Maybe ApplianceModeSupportValue
..} =
      forall a. Monoid a => [a] -> a
Prelude.mconcat
        [ ByteString
"ApplianceModeSupport" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe ApplianceModeSupportValue
applianceModeSupport,
          ByteString
"DnsSupport" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe DnsSupportValue
dnsSupport,
          ByteString
"Ipv6Support" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Ipv6SupportValue
ipv6Support
        ]