{-# 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.RouteTableAssociation 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.RouteTableAssociationState
import qualified Amazonka.Prelude as Prelude
data RouteTableAssociation = RouteTableAssociation'
{
RouteTableAssociation -> Maybe RouteTableAssociationState
associationState :: Prelude.Maybe RouteTableAssociationState,
RouteTableAssociation -> Maybe Text
gatewayId :: Prelude.Maybe Prelude.Text,
RouteTableAssociation -> Maybe Bool
main :: Prelude.Maybe Prelude.Bool,
RouteTableAssociation -> Maybe Text
routeTableAssociationId :: Prelude.Maybe Prelude.Text,
RouteTableAssociation -> Maybe Text
routeTableId :: Prelude.Maybe Prelude.Text,
RouteTableAssociation -> Maybe Text
subnetId :: Prelude.Maybe Prelude.Text
}
deriving (RouteTableAssociation -> RouteTableAssociation -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RouteTableAssociation -> RouteTableAssociation -> Bool
$c/= :: RouteTableAssociation -> RouteTableAssociation -> Bool
== :: RouteTableAssociation -> RouteTableAssociation -> Bool
$c== :: RouteTableAssociation -> RouteTableAssociation -> Bool
Prelude.Eq, ReadPrec [RouteTableAssociation]
ReadPrec RouteTableAssociation
Int -> ReadS RouteTableAssociation
ReadS [RouteTableAssociation]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RouteTableAssociation]
$creadListPrec :: ReadPrec [RouteTableAssociation]
readPrec :: ReadPrec RouteTableAssociation
$creadPrec :: ReadPrec RouteTableAssociation
readList :: ReadS [RouteTableAssociation]
$creadList :: ReadS [RouteTableAssociation]
readsPrec :: Int -> ReadS RouteTableAssociation
$creadsPrec :: Int -> ReadS RouteTableAssociation
Prelude.Read, Int -> RouteTableAssociation -> ShowS
[RouteTableAssociation] -> ShowS
RouteTableAssociation -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RouteTableAssociation] -> ShowS
$cshowList :: [RouteTableAssociation] -> ShowS
show :: RouteTableAssociation -> String
$cshow :: RouteTableAssociation -> String
showsPrec :: Int -> RouteTableAssociation -> ShowS
$cshowsPrec :: Int -> RouteTableAssociation -> ShowS
Prelude.Show, forall x. Rep RouteTableAssociation x -> RouteTableAssociation
forall x. RouteTableAssociation -> Rep RouteTableAssociation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RouteTableAssociation x -> RouteTableAssociation
$cfrom :: forall x. RouteTableAssociation -> Rep RouteTableAssociation x
Prelude.Generic)
newRouteTableAssociation ::
RouteTableAssociation
newRouteTableAssociation :: RouteTableAssociation
newRouteTableAssociation =
RouteTableAssociation'
{ $sel:associationState:RouteTableAssociation' :: Maybe RouteTableAssociationState
associationState =
forall a. Maybe a
Prelude.Nothing,
$sel:gatewayId:RouteTableAssociation' :: Maybe Text
gatewayId = forall a. Maybe a
Prelude.Nothing,
$sel:main:RouteTableAssociation' :: Maybe Bool
main = forall a. Maybe a
Prelude.Nothing,
$sel:routeTableAssociationId:RouteTableAssociation' :: Maybe Text
routeTableAssociationId = forall a. Maybe a
Prelude.Nothing,
$sel:routeTableId:RouteTableAssociation' :: Maybe Text
routeTableId = forall a. Maybe a
Prelude.Nothing,
$sel:subnetId:RouteTableAssociation' :: Maybe Text
subnetId = forall a. Maybe a
Prelude.Nothing
}
routeTableAssociation_associationState :: Lens.Lens' RouteTableAssociation (Prelude.Maybe RouteTableAssociationState)
routeTableAssociation_associationState :: Lens' RouteTableAssociation (Maybe RouteTableAssociationState)
routeTableAssociation_associationState = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RouteTableAssociation' {Maybe RouteTableAssociationState
associationState :: Maybe RouteTableAssociationState
$sel:associationState:RouteTableAssociation' :: RouteTableAssociation -> Maybe RouteTableAssociationState
associationState} -> Maybe RouteTableAssociationState
associationState) (\s :: RouteTableAssociation
s@RouteTableAssociation' {} Maybe RouteTableAssociationState
a -> RouteTableAssociation
s {$sel:associationState:RouteTableAssociation' :: Maybe RouteTableAssociationState
associationState = Maybe RouteTableAssociationState
a} :: RouteTableAssociation)
routeTableAssociation_gatewayId :: Lens.Lens' RouteTableAssociation (Prelude.Maybe Prelude.Text)
routeTableAssociation_gatewayId :: Lens' RouteTableAssociation (Maybe Text)
routeTableAssociation_gatewayId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RouteTableAssociation' {Maybe Text
gatewayId :: Maybe Text
$sel:gatewayId:RouteTableAssociation' :: RouteTableAssociation -> Maybe Text
gatewayId} -> Maybe Text
gatewayId) (\s :: RouteTableAssociation
s@RouteTableAssociation' {} Maybe Text
a -> RouteTableAssociation
s {$sel:gatewayId:RouteTableAssociation' :: Maybe Text
gatewayId = Maybe Text
a} :: RouteTableAssociation)
routeTableAssociation_main :: Lens.Lens' RouteTableAssociation (Prelude.Maybe Prelude.Bool)
routeTableAssociation_main :: Lens' RouteTableAssociation (Maybe Bool)
routeTableAssociation_main = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RouteTableAssociation' {Maybe Bool
main :: Maybe Bool
$sel:main:RouteTableAssociation' :: RouteTableAssociation -> Maybe Bool
main} -> Maybe Bool
main) (\s :: RouteTableAssociation
s@RouteTableAssociation' {} Maybe Bool
a -> RouteTableAssociation
s {$sel:main:RouteTableAssociation' :: Maybe Bool
main = Maybe Bool
a} :: RouteTableAssociation)
routeTableAssociation_routeTableAssociationId :: Lens.Lens' RouteTableAssociation (Prelude.Maybe Prelude.Text)
routeTableAssociation_routeTableAssociationId :: Lens' RouteTableAssociation (Maybe Text)
routeTableAssociation_routeTableAssociationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RouteTableAssociation' {Maybe Text
routeTableAssociationId :: Maybe Text
$sel:routeTableAssociationId:RouteTableAssociation' :: RouteTableAssociation -> Maybe Text
routeTableAssociationId} -> Maybe Text
routeTableAssociationId) (\s :: RouteTableAssociation
s@RouteTableAssociation' {} Maybe Text
a -> RouteTableAssociation
s {$sel:routeTableAssociationId:RouteTableAssociation' :: Maybe Text
routeTableAssociationId = Maybe Text
a} :: RouteTableAssociation)
routeTableAssociation_routeTableId :: Lens.Lens' RouteTableAssociation (Prelude.Maybe Prelude.Text)
routeTableAssociation_routeTableId :: Lens' RouteTableAssociation (Maybe Text)
routeTableAssociation_routeTableId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RouteTableAssociation' {Maybe Text
routeTableId :: Maybe Text
$sel:routeTableId:RouteTableAssociation' :: RouteTableAssociation -> Maybe Text
routeTableId} -> Maybe Text
routeTableId) (\s :: RouteTableAssociation
s@RouteTableAssociation' {} Maybe Text
a -> RouteTableAssociation
s {$sel:routeTableId:RouteTableAssociation' :: Maybe Text
routeTableId = Maybe Text
a} :: RouteTableAssociation)
routeTableAssociation_subnetId :: Lens.Lens' RouteTableAssociation (Prelude.Maybe Prelude.Text)
routeTableAssociation_subnetId :: Lens' RouteTableAssociation (Maybe Text)
routeTableAssociation_subnetId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RouteTableAssociation' {Maybe Text
subnetId :: Maybe Text
$sel:subnetId:RouteTableAssociation' :: RouteTableAssociation -> Maybe Text
subnetId} -> Maybe Text
subnetId) (\s :: RouteTableAssociation
s@RouteTableAssociation' {} Maybe Text
a -> RouteTableAssociation
s {$sel:subnetId:RouteTableAssociation' :: Maybe Text
subnetId = Maybe Text
a} :: RouteTableAssociation)
instance Data.FromXML RouteTableAssociation where
parseXML :: [Node] -> Either String RouteTableAssociation
parseXML [Node]
x =
Maybe RouteTableAssociationState
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RouteTableAssociation
RouteTableAssociation'
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
"associationState")
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
"gatewayId")
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
"main")
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
"routeTableAssociationId")
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
"routeTableId")
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
"subnetId")
instance Prelude.Hashable RouteTableAssociation where
hashWithSalt :: Int -> RouteTableAssociation -> Int
hashWithSalt Int
_salt RouteTableAssociation' {Maybe Bool
Maybe Text
Maybe RouteTableAssociationState
subnetId :: Maybe Text
routeTableId :: Maybe Text
routeTableAssociationId :: Maybe Text
main :: Maybe Bool
gatewayId :: Maybe Text
associationState :: Maybe RouteTableAssociationState
$sel:subnetId:RouteTableAssociation' :: RouteTableAssociation -> Maybe Text
$sel:routeTableId:RouteTableAssociation' :: RouteTableAssociation -> Maybe Text
$sel:routeTableAssociationId:RouteTableAssociation' :: RouteTableAssociation -> Maybe Text
$sel:main:RouteTableAssociation' :: RouteTableAssociation -> Maybe Bool
$sel:gatewayId:RouteTableAssociation' :: RouteTableAssociation -> Maybe Text
$sel:associationState:RouteTableAssociation' :: RouteTableAssociation -> Maybe RouteTableAssociationState
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RouteTableAssociationState
associationState
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
gatewayId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
main
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
routeTableAssociationId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
routeTableId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
subnetId
instance Prelude.NFData RouteTableAssociation where
rnf :: RouteTableAssociation -> ()
rnf RouteTableAssociation' {Maybe Bool
Maybe Text
Maybe RouteTableAssociationState
subnetId :: Maybe Text
routeTableId :: Maybe Text
routeTableAssociationId :: Maybe Text
main :: Maybe Bool
gatewayId :: Maybe Text
associationState :: Maybe RouteTableAssociationState
$sel:subnetId:RouteTableAssociation' :: RouteTableAssociation -> Maybe Text
$sel:routeTableId:RouteTableAssociation' :: RouteTableAssociation -> Maybe Text
$sel:routeTableAssociationId:RouteTableAssociation' :: RouteTableAssociation -> Maybe Text
$sel:main:RouteTableAssociation' :: RouteTableAssociation -> Maybe Bool
$sel:gatewayId:RouteTableAssociation' :: RouteTableAssociation -> Maybe Text
$sel:associationState:RouteTableAssociation' :: RouteTableAssociation -> Maybe RouteTableAssociationState
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe RouteTableAssociationState
associationState
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
gatewayId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
main
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
routeTableAssociationId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
routeTableId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
subnetId