{-# 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.EC2CreateRouteTableAction 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 EC2CreateRouteTableAction = EC2CreateRouteTableAction'
{
EC2CreateRouteTableAction -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
EC2CreateRouteTableAction -> ActionTarget
vpcId :: ActionTarget
}
deriving (EC2CreateRouteTableAction -> EC2CreateRouteTableAction -> Bool
(EC2CreateRouteTableAction -> EC2CreateRouteTableAction -> Bool)
-> (EC2CreateRouteTableAction -> EC2CreateRouteTableAction -> Bool)
-> Eq EC2CreateRouteTableAction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EC2CreateRouteTableAction -> EC2CreateRouteTableAction -> Bool
$c/= :: EC2CreateRouteTableAction -> EC2CreateRouteTableAction -> Bool
== :: EC2CreateRouteTableAction -> EC2CreateRouteTableAction -> Bool
$c== :: EC2CreateRouteTableAction -> EC2CreateRouteTableAction -> Bool
Prelude.Eq, ReadPrec [EC2CreateRouteTableAction]
ReadPrec EC2CreateRouteTableAction
Int -> ReadS EC2CreateRouteTableAction
ReadS [EC2CreateRouteTableAction]
(Int -> ReadS EC2CreateRouteTableAction)
-> ReadS [EC2CreateRouteTableAction]
-> ReadPrec EC2CreateRouteTableAction
-> ReadPrec [EC2CreateRouteTableAction]
-> Read EC2CreateRouteTableAction
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EC2CreateRouteTableAction]
$creadListPrec :: ReadPrec [EC2CreateRouteTableAction]
readPrec :: ReadPrec EC2CreateRouteTableAction
$creadPrec :: ReadPrec EC2CreateRouteTableAction
readList :: ReadS [EC2CreateRouteTableAction]
$creadList :: ReadS [EC2CreateRouteTableAction]
readsPrec :: Int -> ReadS EC2CreateRouteTableAction
$creadsPrec :: Int -> ReadS EC2CreateRouteTableAction
Prelude.Read, Int -> EC2CreateRouteTableAction -> ShowS
[EC2CreateRouteTableAction] -> ShowS
EC2CreateRouteTableAction -> String
(Int -> EC2CreateRouteTableAction -> ShowS)
-> (EC2CreateRouteTableAction -> String)
-> ([EC2CreateRouteTableAction] -> ShowS)
-> Show EC2CreateRouteTableAction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EC2CreateRouteTableAction] -> ShowS
$cshowList :: [EC2CreateRouteTableAction] -> ShowS
show :: EC2CreateRouteTableAction -> String
$cshow :: EC2CreateRouteTableAction -> String
showsPrec :: Int -> EC2CreateRouteTableAction -> ShowS
$cshowsPrec :: Int -> EC2CreateRouteTableAction -> ShowS
Prelude.Show, (forall x.
EC2CreateRouteTableAction -> Rep EC2CreateRouteTableAction x)
-> (forall x.
Rep EC2CreateRouteTableAction x -> EC2CreateRouteTableAction)
-> Generic EC2CreateRouteTableAction
forall x.
Rep EC2CreateRouteTableAction x -> EC2CreateRouteTableAction
forall x.
EC2CreateRouteTableAction -> Rep EC2CreateRouteTableAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep EC2CreateRouteTableAction x -> EC2CreateRouteTableAction
$cfrom :: forall x.
EC2CreateRouteTableAction -> Rep EC2CreateRouteTableAction x
Prelude.Generic)
newEC2CreateRouteTableAction ::
ActionTarget ->
EC2CreateRouteTableAction
newEC2CreateRouteTableAction :: ActionTarget -> EC2CreateRouteTableAction
newEC2CreateRouteTableAction ActionTarget
pVpcId_ =
EC2CreateRouteTableAction' :: Maybe Text -> ActionTarget -> EC2CreateRouteTableAction
EC2CreateRouteTableAction'
{ $sel:description:EC2CreateRouteTableAction' :: Maybe Text
description =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:vpcId:EC2CreateRouteTableAction' :: ActionTarget
vpcId = ActionTarget
pVpcId_
}
eC2CreateRouteTableAction_description :: Lens.Lens' EC2CreateRouteTableAction (Prelude.Maybe Prelude.Text)
eC2CreateRouteTableAction_description :: (Maybe Text -> f (Maybe Text))
-> EC2CreateRouteTableAction -> f EC2CreateRouteTableAction
eC2CreateRouteTableAction_description = (EC2CreateRouteTableAction -> Maybe Text)
-> (EC2CreateRouteTableAction
-> Maybe Text -> EC2CreateRouteTableAction)
-> Lens
EC2CreateRouteTableAction
EC2CreateRouteTableAction
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EC2CreateRouteTableAction' {Maybe Text
description :: Maybe Text
$sel:description:EC2CreateRouteTableAction' :: EC2CreateRouteTableAction -> Maybe Text
description} -> Maybe Text
description) (\s :: EC2CreateRouteTableAction
s@EC2CreateRouteTableAction' {} Maybe Text
a -> EC2CreateRouteTableAction
s {$sel:description:EC2CreateRouteTableAction' :: Maybe Text
description = Maybe Text
a} :: EC2CreateRouteTableAction)
eC2CreateRouteTableAction_vpcId :: Lens.Lens' EC2CreateRouteTableAction ActionTarget
eC2CreateRouteTableAction_vpcId :: (ActionTarget -> f ActionTarget)
-> EC2CreateRouteTableAction -> f EC2CreateRouteTableAction
eC2CreateRouteTableAction_vpcId = (EC2CreateRouteTableAction -> ActionTarget)
-> (EC2CreateRouteTableAction
-> ActionTarget -> EC2CreateRouteTableAction)
-> Lens
EC2CreateRouteTableAction
EC2CreateRouteTableAction
ActionTarget
ActionTarget
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EC2CreateRouteTableAction' {ActionTarget
vpcId :: ActionTarget
$sel:vpcId:EC2CreateRouteTableAction' :: EC2CreateRouteTableAction -> ActionTarget
vpcId} -> ActionTarget
vpcId) (\s :: EC2CreateRouteTableAction
s@EC2CreateRouteTableAction' {} ActionTarget
a -> EC2CreateRouteTableAction
s {$sel:vpcId:EC2CreateRouteTableAction' :: ActionTarget
vpcId = ActionTarget
a} :: EC2CreateRouteTableAction)
instance Core.FromJSON EC2CreateRouteTableAction where
parseJSON :: Value -> Parser EC2CreateRouteTableAction
parseJSON =
String
-> (Object -> Parser EC2CreateRouteTableAction)
-> Value
-> Parser EC2CreateRouteTableAction
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"EC2CreateRouteTableAction"
( \Object
x ->
Maybe Text -> ActionTarget -> EC2CreateRouteTableAction
EC2CreateRouteTableAction'
(Maybe Text -> ActionTarget -> EC2CreateRouteTableAction)
-> Parser (Maybe Text)
-> Parser (ActionTarget -> EC2CreateRouteTableAction)
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
"Description")
Parser (ActionTarget -> EC2CreateRouteTableAction)
-> Parser ActionTarget -> Parser EC2CreateRouteTableAction
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
"VpcId")
)
instance Prelude.Hashable EC2CreateRouteTableAction
instance Prelude.NFData EC2CreateRouteTableAction