{-# 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.SSMIncidents.Types.DeleteRegionAction where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DeleteRegionAction = DeleteRegionAction'
{
DeleteRegionAction -> Text
regionName :: Prelude.Text
}
deriving (DeleteRegionAction -> DeleteRegionAction -> Bool
(DeleteRegionAction -> DeleteRegionAction -> Bool)
-> (DeleteRegionAction -> DeleteRegionAction -> Bool)
-> Eq DeleteRegionAction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteRegionAction -> DeleteRegionAction -> Bool
$c/= :: DeleteRegionAction -> DeleteRegionAction -> Bool
== :: DeleteRegionAction -> DeleteRegionAction -> Bool
$c== :: DeleteRegionAction -> DeleteRegionAction -> Bool
Prelude.Eq, ReadPrec [DeleteRegionAction]
ReadPrec DeleteRegionAction
Int -> ReadS DeleteRegionAction
ReadS [DeleteRegionAction]
(Int -> ReadS DeleteRegionAction)
-> ReadS [DeleteRegionAction]
-> ReadPrec DeleteRegionAction
-> ReadPrec [DeleteRegionAction]
-> Read DeleteRegionAction
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteRegionAction]
$creadListPrec :: ReadPrec [DeleteRegionAction]
readPrec :: ReadPrec DeleteRegionAction
$creadPrec :: ReadPrec DeleteRegionAction
readList :: ReadS [DeleteRegionAction]
$creadList :: ReadS [DeleteRegionAction]
readsPrec :: Int -> ReadS DeleteRegionAction
$creadsPrec :: Int -> ReadS DeleteRegionAction
Prelude.Read, Int -> DeleteRegionAction -> ShowS
[DeleteRegionAction] -> ShowS
DeleteRegionAction -> String
(Int -> DeleteRegionAction -> ShowS)
-> (DeleteRegionAction -> String)
-> ([DeleteRegionAction] -> ShowS)
-> Show DeleteRegionAction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteRegionAction] -> ShowS
$cshowList :: [DeleteRegionAction] -> ShowS
show :: DeleteRegionAction -> String
$cshow :: DeleteRegionAction -> String
showsPrec :: Int -> DeleteRegionAction -> ShowS
$cshowsPrec :: Int -> DeleteRegionAction -> ShowS
Prelude.Show, (forall x. DeleteRegionAction -> Rep DeleteRegionAction x)
-> (forall x. Rep DeleteRegionAction x -> DeleteRegionAction)
-> Generic DeleteRegionAction
forall x. Rep DeleteRegionAction x -> DeleteRegionAction
forall x. DeleteRegionAction -> Rep DeleteRegionAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteRegionAction x -> DeleteRegionAction
$cfrom :: forall x. DeleteRegionAction -> Rep DeleteRegionAction x
Prelude.Generic)
newDeleteRegionAction ::
Prelude.Text ->
DeleteRegionAction
newDeleteRegionAction :: Text -> DeleteRegionAction
newDeleteRegionAction Text
pRegionName_ =
DeleteRegionAction' :: Text -> DeleteRegionAction
DeleteRegionAction' {$sel:regionName:DeleteRegionAction' :: Text
regionName = Text
pRegionName_}
deleteRegionAction_regionName :: Lens.Lens' DeleteRegionAction Prelude.Text
deleteRegionAction_regionName :: (Text -> f Text) -> DeleteRegionAction -> f DeleteRegionAction
deleteRegionAction_regionName = (DeleteRegionAction -> Text)
-> (DeleteRegionAction -> Text -> DeleteRegionAction)
-> Lens DeleteRegionAction DeleteRegionAction Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteRegionAction' {Text
regionName :: Text
$sel:regionName:DeleteRegionAction' :: DeleteRegionAction -> Text
regionName} -> Text
regionName) (\s :: DeleteRegionAction
s@DeleteRegionAction' {} Text
a -> DeleteRegionAction
s {$sel:regionName:DeleteRegionAction' :: Text
regionName = Text
a} :: DeleteRegionAction)
instance Prelude.Hashable DeleteRegionAction
instance Prelude.NFData DeleteRegionAction
instance Core.ToJSON DeleteRegionAction where
toJSON :: DeleteRegionAction -> Value
toJSON DeleteRegionAction' {Text
regionName :: Text
$sel:regionName:DeleteRegionAction' :: DeleteRegionAction -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"regionName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
regionName)]
)