{-# 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.FindingAggregator where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data FindingAggregator = FindingAggregator'
{
FindingAggregator -> Maybe Text
findingAggregatorArn :: Prelude.Maybe Prelude.Text
}
deriving (FindingAggregator -> FindingAggregator -> Bool
(FindingAggregator -> FindingAggregator -> Bool)
-> (FindingAggregator -> FindingAggregator -> Bool)
-> Eq FindingAggregator
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FindingAggregator -> FindingAggregator -> Bool
$c/= :: FindingAggregator -> FindingAggregator -> Bool
== :: FindingAggregator -> FindingAggregator -> Bool
$c== :: FindingAggregator -> FindingAggregator -> Bool
Prelude.Eq, ReadPrec [FindingAggregator]
ReadPrec FindingAggregator
Int -> ReadS FindingAggregator
ReadS [FindingAggregator]
(Int -> ReadS FindingAggregator)
-> ReadS [FindingAggregator]
-> ReadPrec FindingAggregator
-> ReadPrec [FindingAggregator]
-> Read FindingAggregator
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FindingAggregator]
$creadListPrec :: ReadPrec [FindingAggregator]
readPrec :: ReadPrec FindingAggregator
$creadPrec :: ReadPrec FindingAggregator
readList :: ReadS [FindingAggregator]
$creadList :: ReadS [FindingAggregator]
readsPrec :: Int -> ReadS FindingAggregator
$creadsPrec :: Int -> ReadS FindingAggregator
Prelude.Read, Int -> FindingAggregator -> ShowS
[FindingAggregator] -> ShowS
FindingAggregator -> String
(Int -> FindingAggregator -> ShowS)
-> (FindingAggregator -> String)
-> ([FindingAggregator] -> ShowS)
-> Show FindingAggregator
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FindingAggregator] -> ShowS
$cshowList :: [FindingAggregator] -> ShowS
show :: FindingAggregator -> String
$cshow :: FindingAggregator -> String
showsPrec :: Int -> FindingAggregator -> ShowS
$cshowsPrec :: Int -> FindingAggregator -> ShowS
Prelude.Show, (forall x. FindingAggregator -> Rep FindingAggregator x)
-> (forall x. Rep FindingAggregator x -> FindingAggregator)
-> Generic FindingAggregator
forall x. Rep FindingAggregator x -> FindingAggregator
forall x. FindingAggregator -> Rep FindingAggregator x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep FindingAggregator x -> FindingAggregator
$cfrom :: forall x. FindingAggregator -> Rep FindingAggregator x
Prelude.Generic)
newFindingAggregator ::
FindingAggregator
newFindingAggregator :: FindingAggregator
newFindingAggregator =
FindingAggregator' :: Maybe Text -> FindingAggregator
FindingAggregator'
{ $sel:findingAggregatorArn:FindingAggregator' :: Maybe Text
findingAggregatorArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing
}
findingAggregator_findingAggregatorArn :: Lens.Lens' FindingAggregator (Prelude.Maybe Prelude.Text)
findingAggregator_findingAggregatorArn :: (Maybe Text -> f (Maybe Text))
-> FindingAggregator -> f FindingAggregator
findingAggregator_findingAggregatorArn = (FindingAggregator -> Maybe Text)
-> (FindingAggregator -> Maybe Text -> FindingAggregator)
-> Lens
FindingAggregator FindingAggregator (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FindingAggregator' {Maybe Text
findingAggregatorArn :: Maybe Text
$sel:findingAggregatorArn:FindingAggregator' :: FindingAggregator -> Maybe Text
findingAggregatorArn} -> Maybe Text
findingAggregatorArn) (\s :: FindingAggregator
s@FindingAggregator' {} Maybe Text
a -> FindingAggregator
s {$sel:findingAggregatorArn:FindingAggregator' :: Maybe Text
findingAggregatorArn = Maybe Text
a} :: FindingAggregator)
instance Core.FromJSON FindingAggregator where
parseJSON :: Value -> Parser FindingAggregator
parseJSON =
String
-> (Object -> Parser FindingAggregator)
-> Value
-> Parser FindingAggregator
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"FindingAggregator"
( \Object
x ->
Maybe Text -> FindingAggregator
FindingAggregator'
(Maybe Text -> FindingAggregator)
-> Parser (Maybe Text) -> Parser FindingAggregator
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
"FindingAggregatorArn")
)
instance Prelude.Hashable FindingAggregator
instance Prelude.NFData FindingAggregator