{-# 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 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 EC2CreateRouteTableAction = EC2CreateRouteTableAction'
{
EC2CreateRouteTableAction -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
EC2CreateRouteTableAction -> ActionTarget
vpcId :: ActionTarget
}
deriving (EC2CreateRouteTableAction -> EC2CreateRouteTableAction -> Bool
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]
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
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.
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'
{ $sel:description:EC2CreateRouteTableAction' :: Maybe Text
description =
forall a. Maybe a
Prelude.Nothing,
$sel:vpcId:EC2CreateRouteTableAction' :: ActionTarget
vpcId = ActionTarget
pVpcId_
}
eC2CreateRouteTableAction_description :: Lens.Lens' EC2CreateRouteTableAction (Prelude.Maybe Prelude.Text)
eC2CreateRouteTableAction_description :: Lens' EC2CreateRouteTableAction (Maybe Text)
eC2CreateRouteTableAction_description = 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 :: Lens' EC2CreateRouteTableAction ActionTarget
eC2CreateRouteTableAction_vpcId = 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 Data.FromJSON EC2CreateRouteTableAction where
parseJSON :: Value -> Parser EC2CreateRouteTableAction
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"EC2CreateRouteTableAction"
( \Object
x ->
Maybe Text -> ActionTarget -> EC2CreateRouteTableAction
EC2CreateRouteTableAction'
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 a
Data..: Key
"VpcId")
)
instance Prelude.Hashable EC2CreateRouteTableAction where
hashWithSalt :: Int -> EC2CreateRouteTableAction -> Int
hashWithSalt Int
_salt EC2CreateRouteTableAction' {Maybe Text
ActionTarget
vpcId :: ActionTarget
description :: Maybe Text
$sel:vpcId:EC2CreateRouteTableAction' :: EC2CreateRouteTableAction -> ActionTarget
$sel:description:EC2CreateRouteTableAction' :: EC2CreateRouteTableAction -> 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` ActionTarget
vpcId
instance Prelude.NFData EC2CreateRouteTableAction where
rnf :: EC2CreateRouteTableAction -> ()
rnf EC2CreateRouteTableAction' {Maybe Text
ActionTarget
vpcId :: ActionTarget
description :: Maybe Text
$sel:vpcId:EC2CreateRouteTableAction' :: EC2CreateRouteTableAction -> ActionTarget
$sel:description:EC2CreateRouteTableAction' :: EC2CreateRouteTableAction -> 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 ActionTarget
vpcId