{-# 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.EC2ReplaceRouteAction where
import qualified Amazonka.Core as Core
import Amazonka.FMS.Types.ActionTarget
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data EC2ReplaceRouteAction = EC2ReplaceRouteAction'
{
EC2ReplaceRouteAction -> Maybe Text
destinationIpv6CidrBlock :: Prelude.Maybe Prelude.Text,
EC2ReplaceRouteAction -> Maybe ActionTarget
gatewayId :: Prelude.Maybe ActionTarget,
EC2ReplaceRouteAction -> Maybe Text
destinationPrefixListId :: Prelude.Maybe Prelude.Text,
EC2ReplaceRouteAction -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
EC2ReplaceRouteAction -> Maybe Text
destinationCidrBlock :: Prelude.Maybe Prelude.Text,
EC2ReplaceRouteAction -> ActionTarget
routeTableId :: ActionTarget
}
deriving (EC2ReplaceRouteAction -> EC2ReplaceRouteAction -> Bool
(EC2ReplaceRouteAction -> EC2ReplaceRouteAction -> Bool)
-> (EC2ReplaceRouteAction -> EC2ReplaceRouteAction -> Bool)
-> Eq EC2ReplaceRouteAction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EC2ReplaceRouteAction -> EC2ReplaceRouteAction -> Bool
$c/= :: EC2ReplaceRouteAction -> EC2ReplaceRouteAction -> Bool
== :: EC2ReplaceRouteAction -> EC2ReplaceRouteAction -> Bool
$c== :: EC2ReplaceRouteAction -> EC2ReplaceRouteAction -> Bool
Prelude.Eq, ReadPrec [EC2ReplaceRouteAction]
ReadPrec EC2ReplaceRouteAction
Int -> ReadS EC2ReplaceRouteAction
ReadS [EC2ReplaceRouteAction]
(Int -> ReadS EC2ReplaceRouteAction)
-> ReadS [EC2ReplaceRouteAction]
-> ReadPrec EC2ReplaceRouteAction
-> ReadPrec [EC2ReplaceRouteAction]
-> Read EC2ReplaceRouteAction
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EC2ReplaceRouteAction]
$creadListPrec :: ReadPrec [EC2ReplaceRouteAction]
readPrec :: ReadPrec EC2ReplaceRouteAction
$creadPrec :: ReadPrec EC2ReplaceRouteAction
readList :: ReadS [EC2ReplaceRouteAction]
$creadList :: ReadS [EC2ReplaceRouteAction]
readsPrec :: Int -> ReadS EC2ReplaceRouteAction
$creadsPrec :: Int -> ReadS EC2ReplaceRouteAction
Prelude.Read, Int -> EC2ReplaceRouteAction -> ShowS
[EC2ReplaceRouteAction] -> ShowS
EC2ReplaceRouteAction -> String
(Int -> EC2ReplaceRouteAction -> ShowS)
-> (EC2ReplaceRouteAction -> String)
-> ([EC2ReplaceRouteAction] -> ShowS)
-> Show EC2ReplaceRouteAction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EC2ReplaceRouteAction] -> ShowS
$cshowList :: [EC2ReplaceRouteAction] -> ShowS
show :: EC2ReplaceRouteAction -> String
$cshow :: EC2ReplaceRouteAction -> String
showsPrec :: Int -> EC2ReplaceRouteAction -> ShowS
$cshowsPrec :: Int -> EC2ReplaceRouteAction -> ShowS
Prelude.Show, (forall x. EC2ReplaceRouteAction -> Rep EC2ReplaceRouteAction x)
-> (forall x. Rep EC2ReplaceRouteAction x -> EC2ReplaceRouteAction)
-> Generic EC2ReplaceRouteAction
forall x. Rep EC2ReplaceRouteAction x -> EC2ReplaceRouteAction
forall x. EC2ReplaceRouteAction -> Rep EC2ReplaceRouteAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EC2ReplaceRouteAction x -> EC2ReplaceRouteAction
$cfrom :: forall x. EC2ReplaceRouteAction -> Rep EC2ReplaceRouteAction x
Prelude.Generic)
newEC2ReplaceRouteAction ::
ActionTarget ->
EC2ReplaceRouteAction
newEC2ReplaceRouteAction :: ActionTarget -> EC2ReplaceRouteAction
newEC2ReplaceRouteAction ActionTarget
pRouteTableId_ =
EC2ReplaceRouteAction' :: Maybe Text
-> Maybe ActionTarget
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ActionTarget
-> EC2ReplaceRouteAction
EC2ReplaceRouteAction'
{ $sel:destinationIpv6CidrBlock:EC2ReplaceRouteAction' :: Maybe Text
destinationIpv6CidrBlock =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:gatewayId:EC2ReplaceRouteAction' :: Maybe ActionTarget
gatewayId = Maybe ActionTarget
forall a. Maybe a
Prelude.Nothing,
$sel:destinationPrefixListId:EC2ReplaceRouteAction' :: Maybe Text
destinationPrefixListId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:EC2ReplaceRouteAction' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:destinationCidrBlock:EC2ReplaceRouteAction' :: Maybe Text
destinationCidrBlock = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:routeTableId:EC2ReplaceRouteAction' :: ActionTarget
routeTableId = ActionTarget
pRouteTableId_
}
eC2ReplaceRouteAction_destinationIpv6CidrBlock :: Lens.Lens' EC2ReplaceRouteAction (Prelude.Maybe Prelude.Text)
eC2ReplaceRouteAction_destinationIpv6CidrBlock :: (Maybe Text -> f (Maybe Text))
-> EC2ReplaceRouteAction -> f EC2ReplaceRouteAction
eC2ReplaceRouteAction_destinationIpv6CidrBlock = (EC2ReplaceRouteAction -> Maybe Text)
-> (EC2ReplaceRouteAction -> Maybe Text -> EC2ReplaceRouteAction)
-> Lens
EC2ReplaceRouteAction
EC2ReplaceRouteAction
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EC2ReplaceRouteAction' {Maybe Text
destinationIpv6CidrBlock :: Maybe Text
$sel:destinationIpv6CidrBlock:EC2ReplaceRouteAction' :: EC2ReplaceRouteAction -> Maybe Text
destinationIpv6CidrBlock} -> Maybe Text
destinationIpv6CidrBlock) (\s :: EC2ReplaceRouteAction
s@EC2ReplaceRouteAction' {} Maybe Text
a -> EC2ReplaceRouteAction
s {$sel:destinationIpv6CidrBlock:EC2ReplaceRouteAction' :: Maybe Text
destinationIpv6CidrBlock = Maybe Text
a} :: EC2ReplaceRouteAction)
eC2ReplaceRouteAction_gatewayId :: Lens.Lens' EC2ReplaceRouteAction (Prelude.Maybe ActionTarget)
eC2ReplaceRouteAction_gatewayId :: (Maybe ActionTarget -> f (Maybe ActionTarget))
-> EC2ReplaceRouteAction -> f EC2ReplaceRouteAction
eC2ReplaceRouteAction_gatewayId = (EC2ReplaceRouteAction -> Maybe ActionTarget)
-> (EC2ReplaceRouteAction
-> Maybe ActionTarget -> EC2ReplaceRouteAction)
-> Lens
EC2ReplaceRouteAction
EC2ReplaceRouteAction
(Maybe ActionTarget)
(Maybe ActionTarget)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EC2ReplaceRouteAction' {Maybe ActionTarget
gatewayId :: Maybe ActionTarget
$sel:gatewayId:EC2ReplaceRouteAction' :: EC2ReplaceRouteAction -> Maybe ActionTarget
gatewayId} -> Maybe ActionTarget
gatewayId) (\s :: EC2ReplaceRouteAction
s@EC2ReplaceRouteAction' {} Maybe ActionTarget
a -> EC2ReplaceRouteAction
s {$sel:gatewayId:EC2ReplaceRouteAction' :: Maybe ActionTarget
gatewayId = Maybe ActionTarget
a} :: EC2ReplaceRouteAction)
eC2ReplaceRouteAction_destinationPrefixListId :: Lens.Lens' EC2ReplaceRouteAction (Prelude.Maybe Prelude.Text)
eC2ReplaceRouteAction_destinationPrefixListId :: (Maybe Text -> f (Maybe Text))
-> EC2ReplaceRouteAction -> f EC2ReplaceRouteAction
eC2ReplaceRouteAction_destinationPrefixListId = (EC2ReplaceRouteAction -> Maybe Text)
-> (EC2ReplaceRouteAction -> Maybe Text -> EC2ReplaceRouteAction)
-> Lens
EC2ReplaceRouteAction
EC2ReplaceRouteAction
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EC2ReplaceRouteAction' {Maybe Text
destinationPrefixListId :: Maybe Text
$sel:destinationPrefixListId:EC2ReplaceRouteAction' :: EC2ReplaceRouteAction -> Maybe Text
destinationPrefixListId} -> Maybe Text
destinationPrefixListId) (\s :: EC2ReplaceRouteAction
s@EC2ReplaceRouteAction' {} Maybe Text
a -> EC2ReplaceRouteAction
s {$sel:destinationPrefixListId:EC2ReplaceRouteAction' :: Maybe Text
destinationPrefixListId = Maybe Text
a} :: EC2ReplaceRouteAction)
eC2ReplaceRouteAction_description :: Lens.Lens' EC2ReplaceRouteAction (Prelude.Maybe Prelude.Text)
eC2ReplaceRouteAction_description :: (Maybe Text -> f (Maybe Text))
-> EC2ReplaceRouteAction -> f EC2ReplaceRouteAction
eC2ReplaceRouteAction_description = (EC2ReplaceRouteAction -> Maybe Text)
-> (EC2ReplaceRouteAction -> Maybe Text -> EC2ReplaceRouteAction)
-> Lens
EC2ReplaceRouteAction
EC2ReplaceRouteAction
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EC2ReplaceRouteAction' {Maybe Text
description :: Maybe Text
$sel:description:EC2ReplaceRouteAction' :: EC2ReplaceRouteAction -> Maybe Text
description} -> Maybe Text
description) (\s :: EC2ReplaceRouteAction
s@EC2ReplaceRouteAction' {} Maybe Text
a -> EC2ReplaceRouteAction
s {$sel:description:EC2ReplaceRouteAction' :: Maybe Text
description = Maybe Text
a} :: EC2ReplaceRouteAction)
eC2ReplaceRouteAction_destinationCidrBlock :: Lens.Lens' EC2ReplaceRouteAction (Prelude.Maybe Prelude.Text)
eC2ReplaceRouteAction_destinationCidrBlock :: (Maybe Text -> f (Maybe Text))
-> EC2ReplaceRouteAction -> f EC2ReplaceRouteAction
eC2ReplaceRouteAction_destinationCidrBlock = (EC2ReplaceRouteAction -> Maybe Text)
-> (EC2ReplaceRouteAction -> Maybe Text -> EC2ReplaceRouteAction)
-> Lens
EC2ReplaceRouteAction
EC2ReplaceRouteAction
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EC2ReplaceRouteAction' {Maybe Text
destinationCidrBlock :: Maybe Text
$sel:destinationCidrBlock:EC2ReplaceRouteAction' :: EC2ReplaceRouteAction -> Maybe Text
destinationCidrBlock} -> Maybe Text
destinationCidrBlock) (\s :: EC2ReplaceRouteAction
s@EC2ReplaceRouteAction' {} Maybe Text
a -> EC2ReplaceRouteAction
s {$sel:destinationCidrBlock:EC2ReplaceRouteAction' :: Maybe Text
destinationCidrBlock = Maybe Text
a} :: EC2ReplaceRouteAction)
eC2ReplaceRouteAction_routeTableId :: Lens.Lens' EC2ReplaceRouteAction ActionTarget
eC2ReplaceRouteAction_routeTableId :: (ActionTarget -> f ActionTarget)
-> EC2ReplaceRouteAction -> f EC2ReplaceRouteAction
eC2ReplaceRouteAction_routeTableId = (EC2ReplaceRouteAction -> ActionTarget)
-> (EC2ReplaceRouteAction -> ActionTarget -> EC2ReplaceRouteAction)
-> Lens
EC2ReplaceRouteAction
EC2ReplaceRouteAction
ActionTarget
ActionTarget
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EC2ReplaceRouteAction' {ActionTarget
routeTableId :: ActionTarget
$sel:routeTableId:EC2ReplaceRouteAction' :: EC2ReplaceRouteAction -> ActionTarget
routeTableId} -> ActionTarget
routeTableId) (\s :: EC2ReplaceRouteAction
s@EC2ReplaceRouteAction' {} ActionTarget
a -> EC2ReplaceRouteAction
s {$sel:routeTableId:EC2ReplaceRouteAction' :: ActionTarget
routeTableId = ActionTarget
a} :: EC2ReplaceRouteAction)
instance Core.FromJSON EC2ReplaceRouteAction where
parseJSON :: Value -> Parser EC2ReplaceRouteAction
parseJSON =
String
-> (Object -> Parser EC2ReplaceRouteAction)
-> Value
-> Parser EC2ReplaceRouteAction
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"EC2ReplaceRouteAction"
( \Object
x ->
Maybe Text
-> Maybe ActionTarget
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ActionTarget
-> EC2ReplaceRouteAction
EC2ReplaceRouteAction'
(Maybe Text
-> Maybe ActionTarget
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ActionTarget
-> EC2ReplaceRouteAction)
-> Parser (Maybe Text)
-> Parser
(Maybe ActionTarget
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ActionTarget
-> EC2ReplaceRouteAction)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DestinationIpv6CidrBlock")
Parser
(Maybe ActionTarget
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ActionTarget
-> EC2ReplaceRouteAction)
-> Parser (Maybe ActionTarget)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> ActionTarget
-> EC2ReplaceRouteAction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ActionTarget)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"GatewayId")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> ActionTarget
-> EC2ReplaceRouteAction)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> ActionTarget -> EC2ReplaceRouteAction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DestinationPrefixListId")
Parser
(Maybe Text -> Maybe Text -> ActionTarget -> EC2ReplaceRouteAction)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> ActionTarget -> EC2ReplaceRouteAction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Description")
Parser (Maybe Text -> ActionTarget -> EC2ReplaceRouteAction)
-> Parser (Maybe Text)
-> Parser (ActionTarget -> EC2ReplaceRouteAction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DestinationCidrBlock")
Parser (ActionTarget -> EC2ReplaceRouteAction)
-> Parser ActionTarget -> Parser EC2ReplaceRouteAction
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser ActionTarget
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"RouteTableId")
)
instance Prelude.Hashable EC2ReplaceRouteAction
instance Prelude.NFData EC2ReplaceRouteAction