{-# 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.AccountAggregationResponse 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 AccountAggregationResponse = AccountAggregationResponse'
{
AccountAggregationResponse -> Maybe Text
accountId :: Prelude.Maybe Prelude.Text,
AccountAggregationResponse -> Maybe SeverityCounts
severityCounts :: Prelude.Maybe SeverityCounts
}
deriving (AccountAggregationResponse -> AccountAggregationResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AccountAggregationResponse -> AccountAggregationResponse -> Bool
$c/= :: AccountAggregationResponse -> AccountAggregationResponse -> Bool
== :: AccountAggregationResponse -> AccountAggregationResponse -> Bool
$c== :: AccountAggregationResponse -> AccountAggregationResponse -> Bool
Prelude.Eq, ReadPrec [AccountAggregationResponse]
ReadPrec AccountAggregationResponse
Int -> ReadS AccountAggregationResponse
ReadS [AccountAggregationResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AccountAggregationResponse]
$creadListPrec :: ReadPrec [AccountAggregationResponse]
readPrec :: ReadPrec AccountAggregationResponse
$creadPrec :: ReadPrec AccountAggregationResponse
readList :: ReadS [AccountAggregationResponse]
$creadList :: ReadS [AccountAggregationResponse]
readsPrec :: Int -> ReadS AccountAggregationResponse
$creadsPrec :: Int -> ReadS AccountAggregationResponse
Prelude.Read, Int -> AccountAggregationResponse -> ShowS
[AccountAggregationResponse] -> ShowS
AccountAggregationResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AccountAggregationResponse] -> ShowS
$cshowList :: [AccountAggregationResponse] -> ShowS
show :: AccountAggregationResponse -> String
$cshow :: AccountAggregationResponse -> String
showsPrec :: Int -> AccountAggregationResponse -> ShowS
$cshowsPrec :: Int -> AccountAggregationResponse -> ShowS
Prelude.Show, forall x.
Rep AccountAggregationResponse x -> AccountAggregationResponse
forall x.
AccountAggregationResponse -> Rep AccountAggregationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AccountAggregationResponse x -> AccountAggregationResponse
$cfrom :: forall x.
AccountAggregationResponse -> Rep AccountAggregationResponse x
Prelude.Generic)
newAccountAggregationResponse ::
AccountAggregationResponse
newAccountAggregationResponse :: AccountAggregationResponse
newAccountAggregationResponse =
AccountAggregationResponse'
{ $sel:accountId:AccountAggregationResponse' :: Maybe Text
accountId =
forall a. Maybe a
Prelude.Nothing,
$sel:severityCounts:AccountAggregationResponse' :: Maybe SeverityCounts
severityCounts = forall a. Maybe a
Prelude.Nothing
}
accountAggregationResponse_accountId :: Lens.Lens' AccountAggregationResponse (Prelude.Maybe Prelude.Text)
accountAggregationResponse_accountId :: Lens' AccountAggregationResponse (Maybe Text)
accountAggregationResponse_accountId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountAggregationResponse' {Maybe Text
accountId :: Maybe Text
$sel:accountId:AccountAggregationResponse' :: AccountAggregationResponse -> Maybe Text
accountId} -> Maybe Text
accountId) (\s :: AccountAggregationResponse
s@AccountAggregationResponse' {} Maybe Text
a -> AccountAggregationResponse
s {$sel:accountId:AccountAggregationResponse' :: Maybe Text
accountId = Maybe Text
a} :: AccountAggregationResponse)
accountAggregationResponse_severityCounts :: Lens.Lens' AccountAggregationResponse (Prelude.Maybe SeverityCounts)
accountAggregationResponse_severityCounts :: Lens' AccountAggregationResponse (Maybe SeverityCounts)
accountAggregationResponse_severityCounts = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountAggregationResponse' {Maybe SeverityCounts
severityCounts :: Maybe SeverityCounts
$sel:severityCounts:AccountAggregationResponse' :: AccountAggregationResponse -> Maybe SeverityCounts
severityCounts} -> Maybe SeverityCounts
severityCounts) (\s :: AccountAggregationResponse
s@AccountAggregationResponse' {} Maybe SeverityCounts
a -> AccountAggregationResponse
s {$sel:severityCounts:AccountAggregationResponse' :: Maybe SeverityCounts
severityCounts = Maybe SeverityCounts
a} :: AccountAggregationResponse)
instance Data.FromJSON AccountAggregationResponse where
parseJSON :: Value -> Parser AccountAggregationResponse
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"AccountAggregationResponse"
( \Object
x ->
Maybe Text -> Maybe SeverityCounts -> AccountAggregationResponse
AccountAggregationResponse'
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 AccountAggregationResponse where
hashWithSalt :: Int -> AccountAggregationResponse -> Int
hashWithSalt Int
_salt AccountAggregationResponse' {Maybe Text
Maybe SeverityCounts
severityCounts :: Maybe SeverityCounts
accountId :: Maybe Text
$sel:severityCounts:AccountAggregationResponse' :: AccountAggregationResponse -> Maybe SeverityCounts
$sel:accountId:AccountAggregationResponse' :: AccountAggregationResponse -> 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 AccountAggregationResponse where
rnf :: AccountAggregationResponse -> ()
rnf AccountAggregationResponse' {Maybe Text
Maybe SeverityCounts
severityCounts :: Maybe SeverityCounts
accountId :: Maybe Text
$sel:severityCounts:AccountAggregationResponse' :: AccountAggregationResponse -> Maybe SeverityCounts
$sel:accountId:AccountAggregationResponse' :: AccountAggregationResponse -> 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