{-# 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.SecurityHub.Types.ActionTarget where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ActionTarget = ActionTarget'
{
ActionTarget -> Text
actionTargetArn :: Prelude.Text,
ActionTarget -> Text
name :: Prelude.Text,
ActionTarget -> Text
description :: Prelude.Text
}
deriving (ActionTarget -> ActionTarget -> Bool
(ActionTarget -> ActionTarget -> Bool)
-> (ActionTarget -> ActionTarget -> Bool) -> Eq ActionTarget
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ActionTarget -> ActionTarget -> Bool
$c/= :: ActionTarget -> ActionTarget -> Bool
== :: ActionTarget -> ActionTarget -> Bool
$c== :: ActionTarget -> ActionTarget -> Bool
Prelude.Eq, ReadPrec [ActionTarget]
ReadPrec ActionTarget
Int -> ReadS ActionTarget
ReadS [ActionTarget]
(Int -> ReadS ActionTarget)
-> ReadS [ActionTarget]
-> ReadPrec ActionTarget
-> ReadPrec [ActionTarget]
-> Read ActionTarget
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ActionTarget]
$creadListPrec :: ReadPrec [ActionTarget]
readPrec :: ReadPrec ActionTarget
$creadPrec :: ReadPrec ActionTarget
readList :: ReadS [ActionTarget]
$creadList :: ReadS [ActionTarget]
readsPrec :: Int -> ReadS ActionTarget
$creadsPrec :: Int -> ReadS ActionTarget
Prelude.Read, Int -> ActionTarget -> ShowS
[ActionTarget] -> ShowS
ActionTarget -> String
(Int -> ActionTarget -> ShowS)
-> (ActionTarget -> String)
-> ([ActionTarget] -> ShowS)
-> Show ActionTarget
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ActionTarget] -> ShowS
$cshowList :: [ActionTarget] -> ShowS
show :: ActionTarget -> String
$cshow :: ActionTarget -> String
showsPrec :: Int -> ActionTarget -> ShowS
$cshowsPrec :: Int -> ActionTarget -> ShowS
Prelude.Show, (forall x. ActionTarget -> Rep ActionTarget x)
-> (forall x. Rep ActionTarget x -> ActionTarget)
-> Generic ActionTarget
forall x. Rep ActionTarget x -> ActionTarget
forall x. ActionTarget -> Rep ActionTarget x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ActionTarget x -> ActionTarget
$cfrom :: forall x. ActionTarget -> Rep ActionTarget x
Prelude.Generic)
newActionTarget ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
ActionTarget
newActionTarget :: Text -> Text -> Text -> ActionTarget
newActionTarget
Text
pActionTargetArn_
Text
pName_
Text
pDescription_ =
ActionTarget' :: Text -> Text -> Text -> ActionTarget
ActionTarget'
{ $sel:actionTargetArn:ActionTarget' :: Text
actionTargetArn = Text
pActionTargetArn_,
$sel:name:ActionTarget' :: Text
name = Text
pName_,
$sel:description:ActionTarget' :: Text
description = Text
pDescription_
}
actionTarget_actionTargetArn :: Lens.Lens' ActionTarget Prelude.Text
actionTarget_actionTargetArn :: (Text -> f Text) -> ActionTarget -> f ActionTarget
actionTarget_actionTargetArn = (ActionTarget -> Text)
-> (ActionTarget -> Text -> ActionTarget)
-> Lens ActionTarget ActionTarget Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionTarget' {Text
actionTargetArn :: Text
$sel:actionTargetArn:ActionTarget' :: ActionTarget -> Text
actionTargetArn} -> Text
actionTargetArn) (\s :: ActionTarget
s@ActionTarget' {} Text
a -> ActionTarget
s {$sel:actionTargetArn:ActionTarget' :: Text
actionTargetArn = Text
a} :: ActionTarget)
actionTarget_name :: Lens.Lens' ActionTarget Prelude.Text
actionTarget_name :: (Text -> f Text) -> ActionTarget -> f ActionTarget
actionTarget_name = (ActionTarget -> Text)
-> (ActionTarget -> Text -> ActionTarget)
-> Lens ActionTarget ActionTarget Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionTarget' {Text
name :: Text
$sel:name:ActionTarget' :: ActionTarget -> Text
name} -> Text
name) (\s :: ActionTarget
s@ActionTarget' {} Text
a -> ActionTarget
s {$sel:name:ActionTarget' :: Text
name = Text
a} :: ActionTarget)
actionTarget_description :: Lens.Lens' ActionTarget Prelude.Text
actionTarget_description :: (Text -> f Text) -> ActionTarget -> f ActionTarget
actionTarget_description = (ActionTarget -> Text)
-> (ActionTarget -> Text -> ActionTarget)
-> Lens ActionTarget ActionTarget Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionTarget' {Text
description :: Text
$sel:description:ActionTarget' :: ActionTarget -> Text
description} -> Text
description) (\s :: ActionTarget
s@ActionTarget' {} Text
a -> ActionTarget
s {$sel:description:ActionTarget' :: Text
description = Text
a} :: ActionTarget)
instance Core.FromJSON ActionTarget where
parseJSON :: Value -> Parser ActionTarget
parseJSON =
String
-> (Object -> Parser ActionTarget) -> Value -> Parser ActionTarget
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ActionTarget"
( \Object
x ->
Text -> Text -> Text -> ActionTarget
ActionTarget'
(Text -> Text -> Text -> ActionTarget)
-> Parser Text -> Parser (Text -> Text -> ActionTarget)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ActionTargetArn")
Parser (Text -> Text -> ActionTarget)
-> Parser Text -> Parser (Text -> ActionTarget)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Name")
Parser (Text -> ActionTarget) -> Parser Text -> Parser ActionTarget
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Description")
)
instance Prelude.Hashable ActionTarget
instance Prelude.NFData ActionTarget