{-# 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.LambdaLayerAggregationResponse 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 LambdaLayerAggregationResponse = LambdaLayerAggregationResponse'
{ LambdaLayerAggregationResponse -> Maybe SeverityCounts
severityCounts :: Prelude.Maybe SeverityCounts,
LambdaLayerAggregationResponse -> Text
accountId :: Prelude.Text,
LambdaLayerAggregationResponse -> Text
functionName :: Prelude.Text,
LambdaLayerAggregationResponse -> Text
layerArn :: Prelude.Text,
LambdaLayerAggregationResponse -> Text
resourceId :: Prelude.Text
}
deriving (LambdaLayerAggregationResponse
-> LambdaLayerAggregationResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LambdaLayerAggregationResponse
-> LambdaLayerAggregationResponse -> Bool
$c/= :: LambdaLayerAggregationResponse
-> LambdaLayerAggregationResponse -> Bool
== :: LambdaLayerAggregationResponse
-> LambdaLayerAggregationResponse -> Bool
$c== :: LambdaLayerAggregationResponse
-> LambdaLayerAggregationResponse -> Bool
Prelude.Eq, ReadPrec [LambdaLayerAggregationResponse]
ReadPrec LambdaLayerAggregationResponse
Int -> ReadS LambdaLayerAggregationResponse
ReadS [LambdaLayerAggregationResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LambdaLayerAggregationResponse]
$creadListPrec :: ReadPrec [LambdaLayerAggregationResponse]
readPrec :: ReadPrec LambdaLayerAggregationResponse
$creadPrec :: ReadPrec LambdaLayerAggregationResponse
readList :: ReadS [LambdaLayerAggregationResponse]
$creadList :: ReadS [LambdaLayerAggregationResponse]
readsPrec :: Int -> ReadS LambdaLayerAggregationResponse
$creadsPrec :: Int -> ReadS LambdaLayerAggregationResponse
Prelude.Read, Int -> LambdaLayerAggregationResponse -> ShowS
[LambdaLayerAggregationResponse] -> ShowS
LambdaLayerAggregationResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LambdaLayerAggregationResponse] -> ShowS
$cshowList :: [LambdaLayerAggregationResponse] -> ShowS
show :: LambdaLayerAggregationResponse -> String
$cshow :: LambdaLayerAggregationResponse -> String
showsPrec :: Int -> LambdaLayerAggregationResponse -> ShowS
$cshowsPrec :: Int -> LambdaLayerAggregationResponse -> ShowS
Prelude.Show, forall x.
Rep LambdaLayerAggregationResponse x
-> LambdaLayerAggregationResponse
forall x.
LambdaLayerAggregationResponse
-> Rep LambdaLayerAggregationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep LambdaLayerAggregationResponse x
-> LambdaLayerAggregationResponse
$cfrom :: forall x.
LambdaLayerAggregationResponse
-> Rep LambdaLayerAggregationResponse x
Prelude.Generic)
newLambdaLayerAggregationResponse ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
LambdaLayerAggregationResponse
newLambdaLayerAggregationResponse :: Text -> Text -> Text -> Text -> LambdaLayerAggregationResponse
newLambdaLayerAggregationResponse
Text
pAccountId_
Text
pFunctionName_
Text
pLayerArn_
Text
pResourceId_ =
LambdaLayerAggregationResponse'
{ $sel:severityCounts:LambdaLayerAggregationResponse' :: Maybe SeverityCounts
severityCounts =
forall a. Maybe a
Prelude.Nothing,
$sel:accountId:LambdaLayerAggregationResponse' :: Text
accountId = Text
pAccountId_,
$sel:functionName:LambdaLayerAggregationResponse' :: Text
functionName = Text
pFunctionName_,
$sel:layerArn:LambdaLayerAggregationResponse' :: Text
layerArn = Text
pLayerArn_,
$sel:resourceId:LambdaLayerAggregationResponse' :: Text
resourceId = Text
pResourceId_
}
lambdaLayerAggregationResponse_severityCounts :: Lens.Lens' LambdaLayerAggregationResponse (Prelude.Maybe SeverityCounts)
lambdaLayerAggregationResponse_severityCounts :: Lens' LambdaLayerAggregationResponse (Maybe SeverityCounts)
lambdaLayerAggregationResponse_severityCounts = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaLayerAggregationResponse' {Maybe SeverityCounts
severityCounts :: Maybe SeverityCounts
$sel:severityCounts:LambdaLayerAggregationResponse' :: LambdaLayerAggregationResponse -> Maybe SeverityCounts
severityCounts} -> Maybe SeverityCounts
severityCounts) (\s :: LambdaLayerAggregationResponse
s@LambdaLayerAggregationResponse' {} Maybe SeverityCounts
a -> LambdaLayerAggregationResponse
s {$sel:severityCounts:LambdaLayerAggregationResponse' :: Maybe SeverityCounts
severityCounts = Maybe SeverityCounts
a} :: LambdaLayerAggregationResponse)
lambdaLayerAggregationResponse_accountId :: Lens.Lens' LambdaLayerAggregationResponse Prelude.Text
lambdaLayerAggregationResponse_accountId :: Lens' LambdaLayerAggregationResponse Text
lambdaLayerAggregationResponse_accountId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaLayerAggregationResponse' {Text
accountId :: Text
$sel:accountId:LambdaLayerAggregationResponse' :: LambdaLayerAggregationResponse -> Text
accountId} -> Text
accountId) (\s :: LambdaLayerAggregationResponse
s@LambdaLayerAggregationResponse' {} Text
a -> LambdaLayerAggregationResponse
s {$sel:accountId:LambdaLayerAggregationResponse' :: Text
accountId = Text
a} :: LambdaLayerAggregationResponse)
lambdaLayerAggregationResponse_functionName :: Lens.Lens' LambdaLayerAggregationResponse Prelude.Text
lambdaLayerAggregationResponse_functionName :: Lens' LambdaLayerAggregationResponse Text
lambdaLayerAggregationResponse_functionName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaLayerAggregationResponse' {Text
functionName :: Text
$sel:functionName:LambdaLayerAggregationResponse' :: LambdaLayerAggregationResponse -> Text
functionName} -> Text
functionName) (\s :: LambdaLayerAggregationResponse
s@LambdaLayerAggregationResponse' {} Text
a -> LambdaLayerAggregationResponse
s {$sel:functionName:LambdaLayerAggregationResponse' :: Text
functionName = Text
a} :: LambdaLayerAggregationResponse)
lambdaLayerAggregationResponse_layerArn :: Lens.Lens' LambdaLayerAggregationResponse Prelude.Text
lambdaLayerAggregationResponse_layerArn :: Lens' LambdaLayerAggregationResponse Text
lambdaLayerAggregationResponse_layerArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaLayerAggregationResponse' {Text
layerArn :: Text
$sel:layerArn:LambdaLayerAggregationResponse' :: LambdaLayerAggregationResponse -> Text
layerArn} -> Text
layerArn) (\s :: LambdaLayerAggregationResponse
s@LambdaLayerAggregationResponse' {} Text
a -> LambdaLayerAggregationResponse
s {$sel:layerArn:LambdaLayerAggregationResponse' :: Text
layerArn = Text
a} :: LambdaLayerAggregationResponse)
lambdaLayerAggregationResponse_resourceId :: Lens.Lens' LambdaLayerAggregationResponse Prelude.Text
lambdaLayerAggregationResponse_resourceId :: Lens' LambdaLayerAggregationResponse Text
lambdaLayerAggregationResponse_resourceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaLayerAggregationResponse' {Text
resourceId :: Text
$sel:resourceId:LambdaLayerAggregationResponse' :: LambdaLayerAggregationResponse -> Text
resourceId} -> Text
resourceId) (\s :: LambdaLayerAggregationResponse
s@LambdaLayerAggregationResponse' {} Text
a -> LambdaLayerAggregationResponse
s {$sel:resourceId:LambdaLayerAggregationResponse' :: Text
resourceId = Text
a} :: LambdaLayerAggregationResponse)
instance Data.FromJSON LambdaLayerAggregationResponse where
parseJSON :: Value -> Parser LambdaLayerAggregationResponse
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"LambdaLayerAggregationResponse"
( \Object
x ->
Maybe SeverityCounts
-> Text -> Text -> Text -> Text -> LambdaLayerAggregationResponse
LambdaLayerAggregationResponse'
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
"severityCounts")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser 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 a
Data..: Key
"functionName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"layerArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"resourceId")
)
instance
Prelude.Hashable
LambdaLayerAggregationResponse
where
hashWithSalt :: Int -> LambdaLayerAggregationResponse -> Int
hashWithSalt
Int
_salt
LambdaLayerAggregationResponse' {Maybe SeverityCounts
Text
resourceId :: Text
layerArn :: Text
functionName :: Text
accountId :: Text
severityCounts :: Maybe SeverityCounts
$sel:resourceId:LambdaLayerAggregationResponse' :: LambdaLayerAggregationResponse -> Text
$sel:layerArn:LambdaLayerAggregationResponse' :: LambdaLayerAggregationResponse -> Text
$sel:functionName:LambdaLayerAggregationResponse' :: LambdaLayerAggregationResponse -> Text
$sel:accountId:LambdaLayerAggregationResponse' :: LambdaLayerAggregationResponse -> Text
$sel:severityCounts:LambdaLayerAggregationResponse' :: LambdaLayerAggregationResponse -> Maybe SeverityCounts
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SeverityCounts
severityCounts
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
accountId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
functionName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
layerArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
resourceId
instance
Prelude.NFData
LambdaLayerAggregationResponse
where
rnf :: LambdaLayerAggregationResponse -> ()
rnf LambdaLayerAggregationResponse' {Maybe SeverityCounts
Text
resourceId :: Text
layerArn :: Text
functionName :: Text
accountId :: Text
severityCounts :: Maybe SeverityCounts
$sel:resourceId:LambdaLayerAggregationResponse' :: LambdaLayerAggregationResponse -> Text
$sel:layerArn:LambdaLayerAggregationResponse' :: LambdaLayerAggregationResponse -> Text
$sel:functionName:LambdaLayerAggregationResponse' :: LambdaLayerAggregationResponse -> Text
$sel:accountId:LambdaLayerAggregationResponse' :: LambdaLayerAggregationResponse -> Text
$sel:severityCounts:LambdaLayerAggregationResponse' :: LambdaLayerAggregationResponse -> Maybe SeverityCounts
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe SeverityCounts
severityCounts
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
accountId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
functionName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
layerArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
resourceId