{-# 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.Inspector2.Types.FindingTypeAggregationResponse where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Inspector2.Types.SeverityCounts
import qualified Amazonka.Prelude as Prelude
data FindingTypeAggregationResponse = FindingTypeAggregationResponse'
{
FindingTypeAggregationResponse -> Maybe Text
accountId :: Prelude.Maybe Prelude.Text,
FindingTypeAggregationResponse -> Maybe SeverityCounts
severityCounts :: Prelude.Maybe SeverityCounts
}
deriving (FindingTypeAggregationResponse
-> FindingTypeAggregationResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FindingTypeAggregationResponse
-> FindingTypeAggregationResponse -> Bool
$c/= :: FindingTypeAggregationResponse
-> FindingTypeAggregationResponse -> Bool
== :: FindingTypeAggregationResponse
-> FindingTypeAggregationResponse -> Bool
$c== :: FindingTypeAggregationResponse
-> FindingTypeAggregationResponse -> Bool
Prelude.Eq, ReadPrec [FindingTypeAggregationResponse]
ReadPrec FindingTypeAggregationResponse
Int -> ReadS FindingTypeAggregationResponse
ReadS [FindingTypeAggregationResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FindingTypeAggregationResponse]
$creadListPrec :: ReadPrec [FindingTypeAggregationResponse]
readPrec :: ReadPrec FindingTypeAggregationResponse
$creadPrec :: ReadPrec FindingTypeAggregationResponse
readList :: ReadS [FindingTypeAggregationResponse]
$creadList :: ReadS [FindingTypeAggregationResponse]
readsPrec :: Int -> ReadS FindingTypeAggregationResponse
$creadsPrec :: Int -> ReadS FindingTypeAggregationResponse
Prelude.Read, Int -> FindingTypeAggregationResponse -> ShowS
[FindingTypeAggregationResponse] -> ShowS
FindingTypeAggregationResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FindingTypeAggregationResponse] -> ShowS
$cshowList :: [FindingTypeAggregationResponse] -> ShowS
show :: FindingTypeAggregationResponse -> String
$cshow :: FindingTypeAggregationResponse -> String
showsPrec :: Int -> FindingTypeAggregationResponse -> ShowS
$cshowsPrec :: Int -> FindingTypeAggregationResponse -> ShowS
Prelude.Show, forall x.
Rep FindingTypeAggregationResponse x
-> FindingTypeAggregationResponse
forall x.
FindingTypeAggregationResponse
-> Rep FindingTypeAggregationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep FindingTypeAggregationResponse x
-> FindingTypeAggregationResponse
$cfrom :: forall x.
FindingTypeAggregationResponse
-> Rep FindingTypeAggregationResponse x
Prelude.Generic)
newFindingTypeAggregationResponse ::
FindingTypeAggregationResponse
newFindingTypeAggregationResponse :: FindingTypeAggregationResponse
newFindingTypeAggregationResponse =
FindingTypeAggregationResponse'
{ $sel:accountId:FindingTypeAggregationResponse' :: Maybe Text
accountId =
forall a. Maybe a
Prelude.Nothing,
$sel:severityCounts:FindingTypeAggregationResponse' :: Maybe SeverityCounts
severityCounts = forall a. Maybe a
Prelude.Nothing
}
findingTypeAggregationResponse_accountId :: Lens.Lens' FindingTypeAggregationResponse (Prelude.Maybe Prelude.Text)
findingTypeAggregationResponse_accountId :: Lens' FindingTypeAggregationResponse (Maybe Text)
findingTypeAggregationResponse_accountId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FindingTypeAggregationResponse' {Maybe Text
accountId :: Maybe Text
$sel:accountId:FindingTypeAggregationResponse' :: FindingTypeAggregationResponse -> Maybe Text
accountId} -> Maybe Text
accountId) (\s :: FindingTypeAggregationResponse
s@FindingTypeAggregationResponse' {} Maybe Text
a -> FindingTypeAggregationResponse
s {$sel:accountId:FindingTypeAggregationResponse' :: Maybe Text
accountId = Maybe Text
a} :: FindingTypeAggregationResponse)
findingTypeAggregationResponse_severityCounts :: Lens.Lens' FindingTypeAggregationResponse (Prelude.Maybe SeverityCounts)
findingTypeAggregationResponse_severityCounts :: Lens' FindingTypeAggregationResponse (Maybe SeverityCounts)
findingTypeAggregationResponse_severityCounts = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FindingTypeAggregationResponse' {Maybe SeverityCounts
severityCounts :: Maybe SeverityCounts
$sel:severityCounts:FindingTypeAggregationResponse' :: FindingTypeAggregationResponse -> Maybe SeverityCounts
severityCounts} -> Maybe SeverityCounts
severityCounts) (\s :: FindingTypeAggregationResponse
s@FindingTypeAggregationResponse' {} Maybe SeverityCounts
a -> FindingTypeAggregationResponse
s {$sel:severityCounts:FindingTypeAggregationResponse' :: Maybe SeverityCounts
severityCounts = Maybe SeverityCounts
a} :: FindingTypeAggregationResponse)
instance Data.FromJSON FindingTypeAggregationResponse where
parseJSON :: Value -> Parser FindingTypeAggregationResponse
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"FindingTypeAggregationResponse"
( \Object
x ->
Maybe Text
-> Maybe SeverityCounts -> FindingTypeAggregationResponse
FindingTypeAggregationResponse'
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
"accountId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"severityCounts")
)
instance
Prelude.Hashable
FindingTypeAggregationResponse
where
hashWithSalt :: Int -> FindingTypeAggregationResponse -> Int
hashWithSalt
Int
_salt
FindingTypeAggregationResponse' {Maybe Text
Maybe SeverityCounts
severityCounts :: Maybe SeverityCounts
accountId :: Maybe Text
$sel:severityCounts:FindingTypeAggregationResponse' :: FindingTypeAggregationResponse -> Maybe SeverityCounts
$sel:accountId:FindingTypeAggregationResponse' :: FindingTypeAggregationResponse -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
accountId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SeverityCounts
severityCounts
instance
Prelude.NFData
FindingTypeAggregationResponse
where
rnf :: FindingTypeAggregationResponse -> ()
rnf FindingTypeAggregationResponse' {Maybe Text
Maybe SeverityCounts
severityCounts :: Maybe SeverityCounts
accountId :: Maybe Text
$sel:severityCounts:FindingTypeAggregationResponse' :: FindingTypeAggregationResponse -> Maybe SeverityCounts
$sel:accountId:FindingTypeAggregationResponse' :: FindingTypeAggregationResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
accountId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe SeverityCounts
severityCounts