{-# 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 #-}
module Amazonka.EC2.Types.TransitGatewayAttachmentPropagation 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.TransitGatewayPropagationState
import qualified Amazonka.Prelude as Prelude
data TransitGatewayAttachmentPropagation = TransitGatewayAttachmentPropagation'
{
TransitGatewayAttachmentPropagation
-> Maybe TransitGatewayPropagationState
state :: Prelude.Maybe TransitGatewayPropagationState,
TransitGatewayAttachmentPropagation -> Maybe Text
transitGatewayRouteTableId :: Prelude.Maybe Prelude.Text
}
deriving (TransitGatewayAttachmentPropagation
-> TransitGatewayAttachmentPropagation -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TransitGatewayAttachmentPropagation
-> TransitGatewayAttachmentPropagation -> Bool
$c/= :: TransitGatewayAttachmentPropagation
-> TransitGatewayAttachmentPropagation -> Bool
== :: TransitGatewayAttachmentPropagation
-> TransitGatewayAttachmentPropagation -> Bool
$c== :: TransitGatewayAttachmentPropagation
-> TransitGatewayAttachmentPropagation -> Bool
Prelude.Eq, ReadPrec [TransitGatewayAttachmentPropagation]
ReadPrec TransitGatewayAttachmentPropagation
Int -> ReadS TransitGatewayAttachmentPropagation
ReadS [TransitGatewayAttachmentPropagation]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TransitGatewayAttachmentPropagation]
$creadListPrec :: ReadPrec [TransitGatewayAttachmentPropagation]
readPrec :: ReadPrec TransitGatewayAttachmentPropagation
$creadPrec :: ReadPrec TransitGatewayAttachmentPropagation
readList :: ReadS [TransitGatewayAttachmentPropagation]
$creadList :: ReadS [TransitGatewayAttachmentPropagation]
readsPrec :: Int -> ReadS TransitGatewayAttachmentPropagation
$creadsPrec :: Int -> ReadS TransitGatewayAttachmentPropagation
Prelude.Read, Int -> TransitGatewayAttachmentPropagation -> ShowS
[TransitGatewayAttachmentPropagation] -> ShowS
TransitGatewayAttachmentPropagation -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TransitGatewayAttachmentPropagation] -> ShowS
$cshowList :: [TransitGatewayAttachmentPropagation] -> ShowS
show :: TransitGatewayAttachmentPropagation -> String
$cshow :: TransitGatewayAttachmentPropagation -> String
showsPrec :: Int -> TransitGatewayAttachmentPropagation -> ShowS
$cshowsPrec :: Int -> TransitGatewayAttachmentPropagation -> ShowS
Prelude.Show, forall x.
Rep TransitGatewayAttachmentPropagation x
-> TransitGatewayAttachmentPropagation
forall x.
TransitGatewayAttachmentPropagation
-> Rep TransitGatewayAttachmentPropagation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep TransitGatewayAttachmentPropagation x
-> TransitGatewayAttachmentPropagation
$cfrom :: forall x.
TransitGatewayAttachmentPropagation
-> Rep TransitGatewayAttachmentPropagation x
Prelude.Generic)
newTransitGatewayAttachmentPropagation ::
TransitGatewayAttachmentPropagation
newTransitGatewayAttachmentPropagation :: TransitGatewayAttachmentPropagation
newTransitGatewayAttachmentPropagation =
TransitGatewayAttachmentPropagation'
{ $sel:state:TransitGatewayAttachmentPropagation' :: Maybe TransitGatewayPropagationState
state =
forall a. Maybe a
Prelude.Nothing,
$sel:transitGatewayRouteTableId:TransitGatewayAttachmentPropagation' :: Maybe Text
transitGatewayRouteTableId =
forall a. Maybe a
Prelude.Nothing
}
transitGatewayAttachmentPropagation_state :: Lens.Lens' TransitGatewayAttachmentPropagation (Prelude.Maybe TransitGatewayPropagationState)
transitGatewayAttachmentPropagation_state :: Lens'
TransitGatewayAttachmentPropagation
(Maybe TransitGatewayPropagationState)
transitGatewayAttachmentPropagation_state = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TransitGatewayAttachmentPropagation' {Maybe TransitGatewayPropagationState
state :: Maybe TransitGatewayPropagationState
$sel:state:TransitGatewayAttachmentPropagation' :: TransitGatewayAttachmentPropagation
-> Maybe TransitGatewayPropagationState
state} -> Maybe TransitGatewayPropagationState
state) (\s :: TransitGatewayAttachmentPropagation
s@TransitGatewayAttachmentPropagation' {} Maybe TransitGatewayPropagationState
a -> TransitGatewayAttachmentPropagation
s {$sel:state:TransitGatewayAttachmentPropagation' :: Maybe TransitGatewayPropagationState
state = Maybe TransitGatewayPropagationState
a} :: TransitGatewayAttachmentPropagation)
transitGatewayAttachmentPropagation_transitGatewayRouteTableId :: Lens.Lens' TransitGatewayAttachmentPropagation (Prelude.Maybe Prelude.Text)
transitGatewayAttachmentPropagation_transitGatewayRouteTableId :: Lens' TransitGatewayAttachmentPropagation (Maybe Text)
transitGatewayAttachmentPropagation_transitGatewayRouteTableId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TransitGatewayAttachmentPropagation' {Maybe Text
transitGatewayRouteTableId :: Maybe Text
$sel:transitGatewayRouteTableId:TransitGatewayAttachmentPropagation' :: TransitGatewayAttachmentPropagation -> Maybe Text
transitGatewayRouteTableId} -> Maybe Text
transitGatewayRouteTableId) (\s :: TransitGatewayAttachmentPropagation
s@TransitGatewayAttachmentPropagation' {} Maybe Text
a -> TransitGatewayAttachmentPropagation
s {$sel:transitGatewayRouteTableId:TransitGatewayAttachmentPropagation' :: Maybe Text
transitGatewayRouteTableId = Maybe Text
a} :: TransitGatewayAttachmentPropagation)
instance
Data.FromXML
TransitGatewayAttachmentPropagation
where
parseXML :: [Node] -> Either String TransitGatewayAttachmentPropagation
parseXML [Node]
x =
Maybe TransitGatewayPropagationState
-> Maybe Text -> TransitGatewayAttachmentPropagation
TransitGatewayAttachmentPropagation'
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
"state")
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
"transitGatewayRouteTableId")
instance
Prelude.Hashable
TransitGatewayAttachmentPropagation
where
hashWithSalt :: Int -> TransitGatewayAttachmentPropagation -> Int
hashWithSalt
Int
_salt
TransitGatewayAttachmentPropagation' {Maybe Text
Maybe TransitGatewayPropagationState
transitGatewayRouteTableId :: Maybe Text
state :: Maybe TransitGatewayPropagationState
$sel:transitGatewayRouteTableId:TransitGatewayAttachmentPropagation' :: TransitGatewayAttachmentPropagation -> Maybe Text
$sel:state:TransitGatewayAttachmentPropagation' :: TransitGatewayAttachmentPropagation
-> Maybe TransitGatewayPropagationState
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TransitGatewayPropagationState
state
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
transitGatewayRouteTableId
instance
Prelude.NFData
TransitGatewayAttachmentPropagation
where
rnf :: TransitGatewayAttachmentPropagation -> ()
rnf TransitGatewayAttachmentPropagation' {Maybe Text
Maybe TransitGatewayPropagationState
transitGatewayRouteTableId :: Maybe Text
state :: Maybe TransitGatewayPropagationState
$sel:transitGatewayRouteTableId:TransitGatewayAttachmentPropagation' :: TransitGatewayAttachmentPropagation -> Maybe Text
$sel:state:TransitGatewayAttachmentPropagation' :: TransitGatewayAttachmentPropagation
-> Maybe TransitGatewayPropagationState
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe TransitGatewayPropagationState
state
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
transitGatewayRouteTableId