{-# 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.FMS.Types.EC2CreateRouteAction where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.FMS.Types.ActionTarget
import qualified Amazonka.Prelude as Prelude
data EC2CreateRouteAction = EC2CreateRouteAction'
{
EC2CreateRouteAction -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
EC2CreateRouteAction -> Maybe Text
destinationCidrBlock :: Prelude.Maybe Prelude.Text,
EC2CreateRouteAction -> Maybe Text
destinationIpv6CidrBlock :: Prelude.Maybe Prelude.Text,
EC2CreateRouteAction -> Maybe Text
destinationPrefixListId :: Prelude.Maybe Prelude.Text,
EC2CreateRouteAction -> Maybe ActionTarget
gatewayId :: Prelude.Maybe ActionTarget,
EC2CreateRouteAction -> Maybe ActionTarget
vpcEndpointId :: Prelude.Maybe ActionTarget,
EC2CreateRouteAction -> ActionTarget
routeTableId :: ActionTarget
}
deriving (EC2CreateRouteAction -> EC2CreateRouteAction -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EC2CreateRouteAction -> EC2CreateRouteAction -> Bool
$c/= :: EC2CreateRouteAction -> EC2CreateRouteAction -> Bool
== :: EC2CreateRouteAction -> EC2CreateRouteAction -> Bool
$c== :: EC2CreateRouteAction -> EC2CreateRouteAction -> Bool
Prelude.Eq, ReadPrec [EC2CreateRouteAction]
ReadPrec EC2CreateRouteAction
Int -> ReadS EC2CreateRouteAction
ReadS [EC2CreateRouteAction]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EC2CreateRouteAction]
$creadListPrec :: ReadPrec [EC2CreateRouteAction]
readPrec :: ReadPrec EC2CreateRouteAction
$creadPrec :: ReadPrec EC2CreateRouteAction
readList :: ReadS [EC2CreateRouteAction]
$creadList :: ReadS [EC2CreateRouteAction]
readsPrec :: Int -> ReadS EC2CreateRouteAction
$creadsPrec :: Int -> ReadS EC2CreateRouteAction
Prelude.Read, Int -> EC2CreateRouteAction -> ShowS
[EC2CreateRouteAction] -> ShowS
EC2CreateRouteAction -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EC2CreateRouteAction] -> ShowS
$cshowList :: [EC2CreateRouteAction] -> ShowS
show :: EC2CreateRouteAction -> String
$cshow :: EC2CreateRouteAction -> String
showsPrec :: Int -> EC2CreateRouteAction -> ShowS
$cshowsPrec :: Int -> EC2CreateRouteAction -> ShowS
Prelude.Show, forall x. Rep EC2CreateRouteAction x -> EC2CreateRouteAction
forall x. EC2CreateRouteAction -> Rep EC2CreateRouteAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EC2CreateRouteAction x -> EC2CreateRouteAction
$cfrom :: forall x. EC2CreateRouteAction -> Rep EC2CreateRouteAction x
Prelude.Generic)
newEC2CreateRouteAction ::
ActionTarget ->
EC2CreateRouteAction
newEC2CreateRouteAction :: ActionTarget -> EC2CreateRouteAction
newEC2CreateRouteAction ActionTarget
pRouteTableId_ =
EC2CreateRouteAction'
{ $sel:description:EC2CreateRouteAction' :: Maybe Text
description =
forall a. Maybe a
Prelude.Nothing,
$sel:destinationCidrBlock:EC2CreateRouteAction' :: Maybe Text
destinationCidrBlock = forall a. Maybe a
Prelude.Nothing,
$sel:destinationIpv6CidrBlock:EC2CreateRouteAction' :: Maybe Text
destinationIpv6CidrBlock = forall a. Maybe a
Prelude.Nothing,
$sel:destinationPrefixListId:EC2CreateRouteAction' :: Maybe Text
destinationPrefixListId = forall a. Maybe a
Prelude.Nothing,
$sel:gatewayId:EC2CreateRouteAction' :: Maybe ActionTarget
gatewayId = forall a. Maybe a
Prelude.Nothing,
$sel:vpcEndpointId:EC2CreateRouteAction' :: Maybe ActionTarget
vpcEndpointId = forall a. Maybe a
Prelude.Nothing,
$sel:routeTableId:EC2CreateRouteAction' :: ActionTarget
routeTableId = ActionTarget
pRouteTableId_
}
eC2CreateRouteAction_description :: Lens.Lens' EC2CreateRouteAction (Prelude.Maybe Prelude.Text)
eC2CreateRouteAction_description :: Lens' EC2CreateRouteAction (Maybe Text)
eC2CreateRouteAction_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EC2CreateRouteAction' {Maybe Text
description :: Maybe Text
$sel:description:EC2CreateRouteAction' :: EC2CreateRouteAction -> Maybe Text
description} -> Maybe Text
description) (\s :: EC2CreateRouteAction
s@EC2CreateRouteAction' {} Maybe Text
a -> EC2CreateRouteAction
s {$sel:description:EC2CreateRouteAction' :: Maybe Text
description = Maybe Text
a} :: EC2CreateRouteAction)
eC2CreateRouteAction_destinationCidrBlock :: Lens.Lens' EC2CreateRouteAction (Prelude.Maybe Prelude.Text)
eC2CreateRouteAction_destinationCidrBlock :: Lens' EC2CreateRouteAction (Maybe Text)
eC2CreateRouteAction_destinationCidrBlock = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EC2CreateRouteAction' {Maybe Text
destinationCidrBlock :: Maybe Text
$sel:destinationCidrBlock:EC2CreateRouteAction' :: EC2CreateRouteAction -> Maybe Text
destinationCidrBlock} -> Maybe Text
destinationCidrBlock) (\s :: EC2CreateRouteAction
s@EC2CreateRouteAction' {} Maybe Text
a -> EC2CreateRouteAction
s {$sel:destinationCidrBlock:EC2CreateRouteAction' :: Maybe Text
destinationCidrBlock = Maybe Text
a} :: EC2CreateRouteAction)
eC2CreateRouteAction_destinationIpv6CidrBlock :: Lens.Lens' EC2CreateRouteAction (Prelude.Maybe Prelude.Text)
eC2CreateRouteAction_destinationIpv6CidrBlock :: Lens' EC2CreateRouteAction (Maybe Text)
eC2CreateRouteAction_destinationIpv6CidrBlock = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EC2CreateRouteAction' {Maybe Text
destinationIpv6CidrBlock :: Maybe Text
$sel:destinationIpv6CidrBlock:EC2CreateRouteAction' :: EC2CreateRouteAction -> Maybe Text
destinationIpv6CidrBlock} -> Maybe Text
destinationIpv6CidrBlock) (\s :: EC2CreateRouteAction
s@EC2CreateRouteAction' {} Maybe Text
a -> EC2CreateRouteAction
s {$sel:destinationIpv6CidrBlock:EC2CreateRouteAction' :: Maybe Text
destinationIpv6CidrBlock = Maybe Text
a} :: EC2CreateRouteAction)
eC2CreateRouteAction_destinationPrefixListId :: Lens.Lens' EC2CreateRouteAction (Prelude.Maybe Prelude.Text)
eC2CreateRouteAction_destinationPrefixListId :: Lens' EC2CreateRouteAction (Maybe Text)
eC2CreateRouteAction_destinationPrefixListId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EC2CreateRouteAction' {Maybe Text
destinationPrefixListId :: Maybe Text
$sel:destinationPrefixListId:EC2CreateRouteAction' :: EC2CreateRouteAction -> Maybe Text
destinationPrefixListId} -> Maybe Text
destinationPrefixListId) (\s :: EC2CreateRouteAction
s@EC2CreateRouteAction' {} Maybe Text
a -> EC2CreateRouteAction
s {$sel:destinationPrefixListId:EC2CreateRouteAction' :: Maybe Text
destinationPrefixListId = Maybe Text
a} :: EC2CreateRouteAction)
eC2CreateRouteAction_gatewayId :: Lens.Lens' EC2CreateRouteAction (Prelude.Maybe ActionTarget)
eC2CreateRouteAction_gatewayId :: Lens' EC2CreateRouteAction (Maybe ActionTarget)
eC2CreateRouteAction_gatewayId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EC2CreateRouteAction' {Maybe ActionTarget
gatewayId :: Maybe ActionTarget
$sel:gatewayId:EC2CreateRouteAction' :: EC2CreateRouteAction -> Maybe ActionTarget
gatewayId} -> Maybe ActionTarget
gatewayId) (\s :: EC2CreateRouteAction
s@EC2CreateRouteAction' {} Maybe ActionTarget
a -> EC2CreateRouteAction
s {$sel:gatewayId:EC2CreateRouteAction' :: Maybe ActionTarget
gatewayId = Maybe ActionTarget
a} :: EC2CreateRouteAction)
eC2CreateRouteAction_vpcEndpointId :: Lens.Lens' EC2CreateRouteAction (Prelude.Maybe ActionTarget)
eC2CreateRouteAction_vpcEndpointId :: Lens' EC2CreateRouteAction (Maybe ActionTarget)
eC2CreateRouteAction_vpcEndpointId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EC2CreateRouteAction' {Maybe ActionTarget
vpcEndpointId :: Maybe ActionTarget
$sel:vpcEndpointId:EC2CreateRouteAction' :: EC2CreateRouteAction -> Maybe ActionTarget
vpcEndpointId} -> Maybe ActionTarget
vpcEndpointId) (\s :: EC2CreateRouteAction
s@EC2CreateRouteAction' {} Maybe ActionTarget
a -> EC2CreateRouteAction
s {$sel:vpcEndpointId:EC2CreateRouteAction' :: Maybe ActionTarget
vpcEndpointId = Maybe ActionTarget
a} :: EC2CreateRouteAction)
eC2CreateRouteAction_routeTableId :: Lens.Lens' EC2CreateRouteAction ActionTarget
eC2CreateRouteAction_routeTableId :: Lens' EC2CreateRouteAction ActionTarget
eC2CreateRouteAction_routeTableId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EC2CreateRouteAction' {ActionTarget
routeTableId :: ActionTarget
$sel:routeTableId:EC2CreateRouteAction' :: EC2CreateRouteAction -> ActionTarget
routeTableId} -> ActionTarget
routeTableId) (\s :: EC2CreateRouteAction
s@EC2CreateRouteAction' {} ActionTarget
a -> EC2CreateRouteAction
s {$sel:routeTableId:EC2CreateRouteAction' :: ActionTarget
routeTableId = ActionTarget
a} :: EC2CreateRouteAction)
instance Data.FromJSON EC2CreateRouteAction where
parseJSON :: Value -> Parser EC2CreateRouteAction
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"EC2CreateRouteAction"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ActionTarget
-> Maybe ActionTarget
-> ActionTarget
-> EC2CreateRouteAction
EC2CreateRouteAction'
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
"Description")
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
"DestinationCidrBlock")
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
"DestinationIpv6CidrBlock")
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
"DestinationPrefixListId")
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
"GatewayId")
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
"VpcEndpointId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"RouteTableId")
)
instance Prelude.Hashable EC2CreateRouteAction where
hashWithSalt :: Int -> EC2CreateRouteAction -> Int
hashWithSalt Int
_salt EC2CreateRouteAction' {Maybe Text
Maybe ActionTarget
ActionTarget
routeTableId :: ActionTarget
vpcEndpointId :: Maybe ActionTarget
gatewayId :: Maybe ActionTarget
destinationPrefixListId :: Maybe Text
destinationIpv6CidrBlock :: Maybe Text
destinationCidrBlock :: Maybe Text
description :: Maybe Text
$sel:routeTableId:EC2CreateRouteAction' :: EC2CreateRouteAction -> ActionTarget
$sel:vpcEndpointId:EC2CreateRouteAction' :: EC2CreateRouteAction -> Maybe ActionTarget
$sel:gatewayId:EC2CreateRouteAction' :: EC2CreateRouteAction -> Maybe ActionTarget
$sel:destinationPrefixListId:EC2CreateRouteAction' :: EC2CreateRouteAction -> Maybe Text
$sel:destinationIpv6CidrBlock:EC2CreateRouteAction' :: EC2CreateRouteAction -> Maybe Text
$sel:destinationCidrBlock:EC2CreateRouteAction' :: EC2CreateRouteAction -> Maybe Text
$sel:description:EC2CreateRouteAction' :: EC2CreateRouteAction -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
destinationCidrBlock
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
destinationIpv6CidrBlock
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
destinationPrefixListId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ActionTarget
gatewayId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ActionTarget
vpcEndpointId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ActionTarget
routeTableId
instance Prelude.NFData EC2CreateRouteAction where
rnf :: EC2CreateRouteAction -> ()
rnf EC2CreateRouteAction' {Maybe Text
Maybe ActionTarget
ActionTarget
routeTableId :: ActionTarget
vpcEndpointId :: Maybe ActionTarget
gatewayId :: Maybe ActionTarget
destinationPrefixListId :: Maybe Text
destinationIpv6CidrBlock :: Maybe Text
destinationCidrBlock :: Maybe Text
description :: Maybe Text
$sel:routeTableId:EC2CreateRouteAction' :: EC2CreateRouteAction -> ActionTarget
$sel:vpcEndpointId:EC2CreateRouteAction' :: EC2CreateRouteAction -> Maybe ActionTarget
$sel:gatewayId:EC2CreateRouteAction' :: EC2CreateRouteAction -> Maybe ActionTarget
$sel:destinationPrefixListId:EC2CreateRouteAction' :: EC2CreateRouteAction -> Maybe Text
$sel:destinationIpv6CidrBlock:EC2CreateRouteAction' :: EC2CreateRouteAction -> Maybe Text
$sel:destinationCidrBlock:EC2CreateRouteAction' :: EC2CreateRouteAction -> Maybe Text
$sel:description:EC2CreateRouteAction' :: EC2CreateRouteAction -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
destinationCidrBlock
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
destinationIpv6CidrBlock
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
destinationPrefixListId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ActionTarget
gatewayId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ActionTarget
vpcEndpointId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ActionTarget
routeTableId