{-# 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.NetworkManager.Types.TransitGatewayRouteTableAttachment where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.NetworkManager.Types.Attachment
import qualified Amazonka.Prelude as Prelude
data TransitGatewayRouteTableAttachment = TransitGatewayRouteTableAttachment'
{ TransitGatewayRouteTableAttachment -> Maybe Attachment
attachment :: Prelude.Maybe Attachment,
TransitGatewayRouteTableAttachment -> Maybe Text
peeringId :: Prelude.Maybe Prelude.Text,
TransitGatewayRouteTableAttachment -> Maybe Text
transitGatewayRouteTableArn :: Prelude.Maybe Prelude.Text
}
deriving (TransitGatewayRouteTableAttachment
-> TransitGatewayRouteTableAttachment -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TransitGatewayRouteTableAttachment
-> TransitGatewayRouteTableAttachment -> Bool
$c/= :: TransitGatewayRouteTableAttachment
-> TransitGatewayRouteTableAttachment -> Bool
== :: TransitGatewayRouteTableAttachment
-> TransitGatewayRouteTableAttachment -> Bool
$c== :: TransitGatewayRouteTableAttachment
-> TransitGatewayRouteTableAttachment -> Bool
Prelude.Eq, ReadPrec [TransitGatewayRouteTableAttachment]
ReadPrec TransitGatewayRouteTableAttachment
Int -> ReadS TransitGatewayRouteTableAttachment
ReadS [TransitGatewayRouteTableAttachment]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TransitGatewayRouteTableAttachment]
$creadListPrec :: ReadPrec [TransitGatewayRouteTableAttachment]
readPrec :: ReadPrec TransitGatewayRouteTableAttachment
$creadPrec :: ReadPrec TransitGatewayRouteTableAttachment
readList :: ReadS [TransitGatewayRouteTableAttachment]
$creadList :: ReadS [TransitGatewayRouteTableAttachment]
readsPrec :: Int -> ReadS TransitGatewayRouteTableAttachment
$creadsPrec :: Int -> ReadS TransitGatewayRouteTableAttachment
Prelude.Read, Int -> TransitGatewayRouteTableAttachment -> ShowS
[TransitGatewayRouteTableAttachment] -> ShowS
TransitGatewayRouteTableAttachment -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TransitGatewayRouteTableAttachment] -> ShowS
$cshowList :: [TransitGatewayRouteTableAttachment] -> ShowS
show :: TransitGatewayRouteTableAttachment -> String
$cshow :: TransitGatewayRouteTableAttachment -> String
showsPrec :: Int -> TransitGatewayRouteTableAttachment -> ShowS
$cshowsPrec :: Int -> TransitGatewayRouteTableAttachment -> ShowS
Prelude.Show, forall x.
Rep TransitGatewayRouteTableAttachment x
-> TransitGatewayRouteTableAttachment
forall x.
TransitGatewayRouteTableAttachment
-> Rep TransitGatewayRouteTableAttachment x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep TransitGatewayRouteTableAttachment x
-> TransitGatewayRouteTableAttachment
$cfrom :: forall x.
TransitGatewayRouteTableAttachment
-> Rep TransitGatewayRouteTableAttachment x
Prelude.Generic)
newTransitGatewayRouteTableAttachment ::
TransitGatewayRouteTableAttachment
newTransitGatewayRouteTableAttachment :: TransitGatewayRouteTableAttachment
newTransitGatewayRouteTableAttachment =
TransitGatewayRouteTableAttachment'
{ $sel:attachment:TransitGatewayRouteTableAttachment' :: Maybe Attachment
attachment =
forall a. Maybe a
Prelude.Nothing,
$sel:peeringId:TransitGatewayRouteTableAttachment' :: Maybe Text
peeringId = forall a. Maybe a
Prelude.Nothing,
$sel:transitGatewayRouteTableArn:TransitGatewayRouteTableAttachment' :: Maybe Text
transitGatewayRouteTableArn =
forall a. Maybe a
Prelude.Nothing
}
transitGatewayRouteTableAttachment_attachment :: Lens.Lens' TransitGatewayRouteTableAttachment (Prelude.Maybe Attachment)
transitGatewayRouteTableAttachment_attachment :: Lens' TransitGatewayRouteTableAttachment (Maybe Attachment)
transitGatewayRouteTableAttachment_attachment = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TransitGatewayRouteTableAttachment' {Maybe Attachment
attachment :: Maybe Attachment
$sel:attachment:TransitGatewayRouteTableAttachment' :: TransitGatewayRouteTableAttachment -> Maybe Attachment
attachment} -> Maybe Attachment
attachment) (\s :: TransitGatewayRouteTableAttachment
s@TransitGatewayRouteTableAttachment' {} Maybe Attachment
a -> TransitGatewayRouteTableAttachment
s {$sel:attachment:TransitGatewayRouteTableAttachment' :: Maybe Attachment
attachment = Maybe Attachment
a} :: TransitGatewayRouteTableAttachment)
transitGatewayRouteTableAttachment_peeringId :: Lens.Lens' TransitGatewayRouteTableAttachment (Prelude.Maybe Prelude.Text)
transitGatewayRouteTableAttachment_peeringId :: Lens' TransitGatewayRouteTableAttachment (Maybe Text)
transitGatewayRouteTableAttachment_peeringId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TransitGatewayRouteTableAttachment' {Maybe Text
peeringId :: Maybe Text
$sel:peeringId:TransitGatewayRouteTableAttachment' :: TransitGatewayRouteTableAttachment -> Maybe Text
peeringId} -> Maybe Text
peeringId) (\s :: TransitGatewayRouteTableAttachment
s@TransitGatewayRouteTableAttachment' {} Maybe Text
a -> TransitGatewayRouteTableAttachment
s {$sel:peeringId:TransitGatewayRouteTableAttachment' :: Maybe Text
peeringId = Maybe Text
a} :: TransitGatewayRouteTableAttachment)
transitGatewayRouteTableAttachment_transitGatewayRouteTableArn :: Lens.Lens' TransitGatewayRouteTableAttachment (Prelude.Maybe Prelude.Text)
transitGatewayRouteTableAttachment_transitGatewayRouteTableArn :: Lens' TransitGatewayRouteTableAttachment (Maybe Text)
transitGatewayRouteTableAttachment_transitGatewayRouteTableArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TransitGatewayRouteTableAttachment' {Maybe Text
transitGatewayRouteTableArn :: Maybe Text
$sel:transitGatewayRouteTableArn:TransitGatewayRouteTableAttachment' :: TransitGatewayRouteTableAttachment -> Maybe Text
transitGatewayRouteTableArn} -> Maybe Text
transitGatewayRouteTableArn) (\s :: TransitGatewayRouteTableAttachment
s@TransitGatewayRouteTableAttachment' {} Maybe Text
a -> TransitGatewayRouteTableAttachment
s {$sel:transitGatewayRouteTableArn:TransitGatewayRouteTableAttachment' :: Maybe Text
transitGatewayRouteTableArn = Maybe Text
a} :: TransitGatewayRouteTableAttachment)
instance
Data.FromJSON
TransitGatewayRouteTableAttachment
where
parseJSON :: Value -> Parser TransitGatewayRouteTableAttachment
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"TransitGatewayRouteTableAttachment"
( \Object
x ->
Maybe Attachment
-> Maybe Text -> Maybe Text -> TransitGatewayRouteTableAttachment
TransitGatewayRouteTableAttachment'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Attachment")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"PeeringId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"TransitGatewayRouteTableArn")
)
instance
Prelude.Hashable
TransitGatewayRouteTableAttachment
where
hashWithSalt :: Int -> TransitGatewayRouteTableAttachment -> Int
hashWithSalt
Int
_salt
TransitGatewayRouteTableAttachment' {Maybe Text
Maybe Attachment
transitGatewayRouteTableArn :: Maybe Text
peeringId :: Maybe Text
attachment :: Maybe Attachment
$sel:transitGatewayRouteTableArn:TransitGatewayRouteTableAttachment' :: TransitGatewayRouteTableAttachment -> Maybe Text
$sel:peeringId:TransitGatewayRouteTableAttachment' :: TransitGatewayRouteTableAttachment -> Maybe Text
$sel:attachment:TransitGatewayRouteTableAttachment' :: TransitGatewayRouteTableAttachment -> Maybe Attachment
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Attachment
attachment
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
peeringId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
transitGatewayRouteTableArn
instance
Prelude.NFData
TransitGatewayRouteTableAttachment
where
rnf :: TransitGatewayRouteTableAttachment -> ()
rnf TransitGatewayRouteTableAttachment' {Maybe Text
Maybe Attachment
transitGatewayRouteTableArn :: Maybe Text
peeringId :: Maybe Text
attachment :: Maybe Attachment
$sel:transitGatewayRouteTableArn:TransitGatewayRouteTableAttachment' :: TransitGatewayRouteTableAttachment -> Maybe Text
$sel:peeringId:TransitGatewayRouteTableAttachment' :: TransitGatewayRouteTableAttachment -> Maybe Text
$sel:attachment:TransitGatewayRouteTableAttachment' :: TransitGatewayRouteTableAttachment -> Maybe Attachment
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Attachment
attachment
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
peeringId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
transitGatewayRouteTableArn