{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Inspector2.Types.AggregationResponse
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Inspector2.Types.AggregationResponse 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.AccountAggregationResponse
import Amazonka.Inspector2.Types.AmiAggregationResponse
import Amazonka.Inspector2.Types.AwsEcrContainerAggregationResponse
import Amazonka.Inspector2.Types.Ec2InstanceAggregationResponse
import Amazonka.Inspector2.Types.FindingTypeAggregationResponse
import Amazonka.Inspector2.Types.ImageLayerAggregationResponse
import Amazonka.Inspector2.Types.LambdaFunctionAggregationResponse
import Amazonka.Inspector2.Types.LambdaLayerAggregationResponse
import Amazonka.Inspector2.Types.PackageAggregationResponse
import Amazonka.Inspector2.Types.RepositoryAggregationResponse
import Amazonka.Inspector2.Types.TitleAggregationResponse
import qualified Amazonka.Prelude as Prelude

-- | A structure that contains details about the results of an aggregation
-- type.
--
-- /See:/ 'newAggregationResponse' smart constructor.
data AggregationResponse = AggregationResponse'
  { -- | An object that contains details about an aggregation response based on
    -- Amazon Web Services account IDs.
    AggregationResponse -> Maybe AccountAggregationResponse
accountAggregation :: Prelude.Maybe AccountAggregationResponse,
    -- | An object that contains details about an aggregation response based on
    -- Amazon Machine Images (AMIs).
    AggregationResponse -> Maybe AmiAggregationResponse
amiAggregation :: Prelude.Maybe AmiAggregationResponse,
    -- | An object that contains details about an aggregation response based on
    -- Amazon ECR container images.
    AggregationResponse -> Maybe AwsEcrContainerAggregationResponse
awsEcrContainerAggregation :: Prelude.Maybe AwsEcrContainerAggregationResponse,
    -- | An object that contains details about an aggregation response based on
    -- Amazon EC2 instances.
    AggregationResponse -> Maybe Ec2InstanceAggregationResponse
ec2InstanceAggregation :: Prelude.Maybe Ec2InstanceAggregationResponse,
    -- | An object that contains details about an aggregation response based on
    -- finding types.
    AggregationResponse -> Maybe FindingTypeAggregationResponse
findingTypeAggregation :: Prelude.Maybe FindingTypeAggregationResponse,
    -- | An object that contains details about an aggregation response based on
    -- container image layers.
    AggregationResponse -> Maybe ImageLayerAggregationResponse
imageLayerAggregation :: Prelude.Maybe ImageLayerAggregationResponse,
    -- | An aggregation of findings by AWS Lambda function.
    AggregationResponse -> Maybe LambdaFunctionAggregationResponse
lambdaFunctionAggregation :: Prelude.Maybe LambdaFunctionAggregationResponse,
    -- | An aggregation of findings by AWS Lambda layer.
    AggregationResponse -> Maybe LambdaLayerAggregationResponse
lambdaLayerAggregation :: Prelude.Maybe LambdaLayerAggregationResponse,
    -- | An object that contains details about an aggregation response based on
    -- operating system package type.
    AggregationResponse -> Maybe PackageAggregationResponse
packageAggregation :: Prelude.Maybe PackageAggregationResponse,
    -- | An object that contains details about an aggregation response based on
    -- Amazon ECR repositories.
    AggregationResponse -> Maybe RepositoryAggregationResponse
repositoryAggregation :: Prelude.Maybe RepositoryAggregationResponse,
    -- | An object that contains details about an aggregation response based on
    -- finding title.
    AggregationResponse -> Maybe TitleAggregationResponse
titleAggregation :: Prelude.Maybe TitleAggregationResponse
  }
  deriving (AggregationResponse -> AggregationResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AggregationResponse -> AggregationResponse -> Bool
$c/= :: AggregationResponse -> AggregationResponse -> Bool
== :: AggregationResponse -> AggregationResponse -> Bool
$c== :: AggregationResponse -> AggregationResponse -> Bool
Prelude.Eq, ReadPrec [AggregationResponse]
ReadPrec AggregationResponse
Int -> ReadS AggregationResponse
ReadS [AggregationResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AggregationResponse]
$creadListPrec :: ReadPrec [AggregationResponse]
readPrec :: ReadPrec AggregationResponse
$creadPrec :: ReadPrec AggregationResponse
readList :: ReadS [AggregationResponse]
$creadList :: ReadS [AggregationResponse]
readsPrec :: Int -> ReadS AggregationResponse
$creadsPrec :: Int -> ReadS AggregationResponse
Prelude.Read, Int -> AggregationResponse -> ShowS
[AggregationResponse] -> ShowS
AggregationResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AggregationResponse] -> ShowS
$cshowList :: [AggregationResponse] -> ShowS
show :: AggregationResponse -> String
$cshow :: AggregationResponse -> String
showsPrec :: Int -> AggregationResponse -> ShowS
$cshowsPrec :: Int -> AggregationResponse -> ShowS
Prelude.Show, forall x. Rep AggregationResponse x -> AggregationResponse
forall x. AggregationResponse -> Rep AggregationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AggregationResponse x -> AggregationResponse
$cfrom :: forall x. AggregationResponse -> Rep AggregationResponse x
Prelude.Generic)

-- |
-- Create a value of 'AggregationResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'accountAggregation', 'aggregationResponse_accountAggregation' - An object that contains details about an aggregation response based on
-- Amazon Web Services account IDs.
--
-- 'amiAggregation', 'aggregationResponse_amiAggregation' - An object that contains details about an aggregation response based on
-- Amazon Machine Images (AMIs).
--
-- 'awsEcrContainerAggregation', 'aggregationResponse_awsEcrContainerAggregation' - An object that contains details about an aggregation response based on
-- Amazon ECR container images.
--
-- 'ec2InstanceAggregation', 'aggregationResponse_ec2InstanceAggregation' - An object that contains details about an aggregation response based on
-- Amazon EC2 instances.
--
-- 'findingTypeAggregation', 'aggregationResponse_findingTypeAggregation' - An object that contains details about an aggregation response based on
-- finding types.
--
-- 'imageLayerAggregation', 'aggregationResponse_imageLayerAggregation' - An object that contains details about an aggregation response based on
-- container image layers.
--
-- 'lambdaFunctionAggregation', 'aggregationResponse_lambdaFunctionAggregation' - An aggregation of findings by AWS Lambda function.
--
-- 'lambdaLayerAggregation', 'aggregationResponse_lambdaLayerAggregation' - An aggregation of findings by AWS Lambda layer.
--
-- 'packageAggregation', 'aggregationResponse_packageAggregation' - An object that contains details about an aggregation response based on
-- operating system package type.
--
-- 'repositoryAggregation', 'aggregationResponse_repositoryAggregation' - An object that contains details about an aggregation response based on
-- Amazon ECR repositories.
--
-- 'titleAggregation', 'aggregationResponse_titleAggregation' - An object that contains details about an aggregation response based on
-- finding title.
newAggregationResponse ::
  AggregationResponse
newAggregationResponse :: AggregationResponse
newAggregationResponse =
  AggregationResponse'
    { $sel:accountAggregation:AggregationResponse' :: Maybe AccountAggregationResponse
accountAggregation =
        forall a. Maybe a
Prelude.Nothing,
      $sel:amiAggregation:AggregationResponse' :: Maybe AmiAggregationResponse
amiAggregation = forall a. Maybe a
Prelude.Nothing,
      $sel:awsEcrContainerAggregation:AggregationResponse' :: Maybe AwsEcrContainerAggregationResponse
awsEcrContainerAggregation = forall a. Maybe a
Prelude.Nothing,
      $sel:ec2InstanceAggregation:AggregationResponse' :: Maybe Ec2InstanceAggregationResponse
ec2InstanceAggregation = forall a. Maybe a
Prelude.Nothing,
      $sel:findingTypeAggregation:AggregationResponse' :: Maybe FindingTypeAggregationResponse
findingTypeAggregation = forall a. Maybe a
Prelude.Nothing,
      $sel:imageLayerAggregation:AggregationResponse' :: Maybe ImageLayerAggregationResponse
imageLayerAggregation = forall a. Maybe a
Prelude.Nothing,
      $sel:lambdaFunctionAggregation:AggregationResponse' :: Maybe LambdaFunctionAggregationResponse
lambdaFunctionAggregation = forall a. Maybe a
Prelude.Nothing,
      $sel:lambdaLayerAggregation:AggregationResponse' :: Maybe LambdaLayerAggregationResponse
lambdaLayerAggregation = forall a. Maybe a
Prelude.Nothing,
      $sel:packageAggregation:AggregationResponse' :: Maybe PackageAggregationResponse
packageAggregation = forall a. Maybe a
Prelude.Nothing,
      $sel:repositoryAggregation:AggregationResponse' :: Maybe RepositoryAggregationResponse
repositoryAggregation = forall a. Maybe a
Prelude.Nothing,
      $sel:titleAggregation:AggregationResponse' :: Maybe TitleAggregationResponse
titleAggregation = forall a. Maybe a
Prelude.Nothing
    }

-- | An object that contains details about an aggregation response based on
-- Amazon Web Services account IDs.
aggregationResponse_accountAggregation :: Lens.Lens' AggregationResponse (Prelude.Maybe AccountAggregationResponse)
aggregationResponse_accountAggregation :: Lens' AggregationResponse (Maybe AccountAggregationResponse)
aggregationResponse_accountAggregation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AggregationResponse' {Maybe AccountAggregationResponse
accountAggregation :: Maybe AccountAggregationResponse
$sel:accountAggregation:AggregationResponse' :: AggregationResponse -> Maybe AccountAggregationResponse
accountAggregation} -> Maybe AccountAggregationResponse
accountAggregation) (\s :: AggregationResponse
s@AggregationResponse' {} Maybe AccountAggregationResponse
a -> AggregationResponse
s {$sel:accountAggregation:AggregationResponse' :: Maybe AccountAggregationResponse
accountAggregation = Maybe AccountAggregationResponse
a} :: AggregationResponse)

-- | An object that contains details about an aggregation response based on
-- Amazon Machine Images (AMIs).
aggregationResponse_amiAggregation :: Lens.Lens' AggregationResponse (Prelude.Maybe AmiAggregationResponse)
aggregationResponse_amiAggregation :: Lens' AggregationResponse (Maybe AmiAggregationResponse)
aggregationResponse_amiAggregation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AggregationResponse' {Maybe AmiAggregationResponse
amiAggregation :: Maybe AmiAggregationResponse
$sel:amiAggregation:AggregationResponse' :: AggregationResponse -> Maybe AmiAggregationResponse
amiAggregation} -> Maybe AmiAggregationResponse
amiAggregation) (\s :: AggregationResponse
s@AggregationResponse' {} Maybe AmiAggregationResponse
a -> AggregationResponse
s {$sel:amiAggregation:AggregationResponse' :: Maybe AmiAggregationResponse
amiAggregation = Maybe AmiAggregationResponse
a} :: AggregationResponse)

-- | An object that contains details about an aggregation response based on
-- Amazon ECR container images.
aggregationResponse_awsEcrContainerAggregation :: Lens.Lens' AggregationResponse (Prelude.Maybe AwsEcrContainerAggregationResponse)
aggregationResponse_awsEcrContainerAggregation :: Lens'
  AggregationResponse (Maybe AwsEcrContainerAggregationResponse)
aggregationResponse_awsEcrContainerAggregation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AggregationResponse' {Maybe AwsEcrContainerAggregationResponse
awsEcrContainerAggregation :: Maybe AwsEcrContainerAggregationResponse
$sel:awsEcrContainerAggregation:AggregationResponse' :: AggregationResponse -> Maybe AwsEcrContainerAggregationResponse
awsEcrContainerAggregation} -> Maybe AwsEcrContainerAggregationResponse
awsEcrContainerAggregation) (\s :: AggregationResponse
s@AggregationResponse' {} Maybe AwsEcrContainerAggregationResponse
a -> AggregationResponse
s {$sel:awsEcrContainerAggregation:AggregationResponse' :: Maybe AwsEcrContainerAggregationResponse
awsEcrContainerAggregation = Maybe AwsEcrContainerAggregationResponse
a} :: AggregationResponse)

-- | An object that contains details about an aggregation response based on
-- Amazon EC2 instances.
aggregationResponse_ec2InstanceAggregation :: Lens.Lens' AggregationResponse (Prelude.Maybe Ec2InstanceAggregationResponse)
aggregationResponse_ec2InstanceAggregation :: Lens' AggregationResponse (Maybe Ec2InstanceAggregationResponse)
aggregationResponse_ec2InstanceAggregation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AggregationResponse' {Maybe Ec2InstanceAggregationResponse
ec2InstanceAggregation :: Maybe Ec2InstanceAggregationResponse
$sel:ec2InstanceAggregation:AggregationResponse' :: AggregationResponse -> Maybe Ec2InstanceAggregationResponse
ec2InstanceAggregation} -> Maybe Ec2InstanceAggregationResponse
ec2InstanceAggregation) (\s :: AggregationResponse
s@AggregationResponse' {} Maybe Ec2InstanceAggregationResponse
a -> AggregationResponse
s {$sel:ec2InstanceAggregation:AggregationResponse' :: Maybe Ec2InstanceAggregationResponse
ec2InstanceAggregation = Maybe Ec2InstanceAggregationResponse
a} :: AggregationResponse)

-- | An object that contains details about an aggregation response based on
-- finding types.
aggregationResponse_findingTypeAggregation :: Lens.Lens' AggregationResponse (Prelude.Maybe FindingTypeAggregationResponse)
aggregationResponse_findingTypeAggregation :: Lens' AggregationResponse (Maybe FindingTypeAggregationResponse)
aggregationResponse_findingTypeAggregation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AggregationResponse' {Maybe FindingTypeAggregationResponse
findingTypeAggregation :: Maybe FindingTypeAggregationResponse
$sel:findingTypeAggregation:AggregationResponse' :: AggregationResponse -> Maybe FindingTypeAggregationResponse
findingTypeAggregation} -> Maybe FindingTypeAggregationResponse
findingTypeAggregation) (\s :: AggregationResponse
s@AggregationResponse' {} Maybe FindingTypeAggregationResponse
a -> AggregationResponse
s {$sel:findingTypeAggregation:AggregationResponse' :: Maybe FindingTypeAggregationResponse
findingTypeAggregation = Maybe FindingTypeAggregationResponse
a} :: AggregationResponse)

-- | An object that contains details about an aggregation response based on
-- container image layers.
aggregationResponse_imageLayerAggregation :: Lens.Lens' AggregationResponse (Prelude.Maybe ImageLayerAggregationResponse)
aggregationResponse_imageLayerAggregation :: Lens' AggregationResponse (Maybe ImageLayerAggregationResponse)
aggregationResponse_imageLayerAggregation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AggregationResponse' {Maybe ImageLayerAggregationResponse
imageLayerAggregation :: Maybe ImageLayerAggregationResponse
$sel:imageLayerAggregation:AggregationResponse' :: AggregationResponse -> Maybe ImageLayerAggregationResponse
imageLayerAggregation} -> Maybe ImageLayerAggregationResponse
imageLayerAggregation) (\s :: AggregationResponse
s@AggregationResponse' {} Maybe ImageLayerAggregationResponse
a -> AggregationResponse
s {$sel:imageLayerAggregation:AggregationResponse' :: Maybe ImageLayerAggregationResponse
imageLayerAggregation = Maybe ImageLayerAggregationResponse
a} :: AggregationResponse)

-- | An aggregation of findings by AWS Lambda function.
aggregationResponse_lambdaFunctionAggregation :: Lens.Lens' AggregationResponse (Prelude.Maybe LambdaFunctionAggregationResponse)
aggregationResponse_lambdaFunctionAggregation :: Lens' AggregationResponse (Maybe LambdaFunctionAggregationResponse)
aggregationResponse_lambdaFunctionAggregation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AggregationResponse' {Maybe LambdaFunctionAggregationResponse
lambdaFunctionAggregation :: Maybe LambdaFunctionAggregationResponse
$sel:lambdaFunctionAggregation:AggregationResponse' :: AggregationResponse -> Maybe LambdaFunctionAggregationResponse
lambdaFunctionAggregation} -> Maybe LambdaFunctionAggregationResponse
lambdaFunctionAggregation) (\s :: AggregationResponse
s@AggregationResponse' {} Maybe LambdaFunctionAggregationResponse
a -> AggregationResponse
s {$sel:lambdaFunctionAggregation:AggregationResponse' :: Maybe LambdaFunctionAggregationResponse
lambdaFunctionAggregation = Maybe LambdaFunctionAggregationResponse
a} :: AggregationResponse)

-- | An aggregation of findings by AWS Lambda layer.
aggregationResponse_lambdaLayerAggregation :: Lens.Lens' AggregationResponse (Prelude.Maybe LambdaLayerAggregationResponse)
aggregationResponse_lambdaLayerAggregation :: Lens' AggregationResponse (Maybe LambdaLayerAggregationResponse)
aggregationResponse_lambdaLayerAggregation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AggregationResponse' {Maybe LambdaLayerAggregationResponse
lambdaLayerAggregation :: Maybe LambdaLayerAggregationResponse
$sel:lambdaLayerAggregation:AggregationResponse' :: AggregationResponse -> Maybe LambdaLayerAggregationResponse
lambdaLayerAggregation} -> Maybe LambdaLayerAggregationResponse
lambdaLayerAggregation) (\s :: AggregationResponse
s@AggregationResponse' {} Maybe LambdaLayerAggregationResponse
a -> AggregationResponse
s {$sel:lambdaLayerAggregation:AggregationResponse' :: Maybe LambdaLayerAggregationResponse
lambdaLayerAggregation = Maybe LambdaLayerAggregationResponse
a} :: AggregationResponse)

-- | An object that contains details about an aggregation response based on
-- operating system package type.
aggregationResponse_packageAggregation :: Lens.Lens' AggregationResponse (Prelude.Maybe PackageAggregationResponse)
aggregationResponse_packageAggregation :: Lens' AggregationResponse (Maybe PackageAggregationResponse)
aggregationResponse_packageAggregation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AggregationResponse' {Maybe PackageAggregationResponse
packageAggregation :: Maybe PackageAggregationResponse
$sel:packageAggregation:AggregationResponse' :: AggregationResponse -> Maybe PackageAggregationResponse
packageAggregation} -> Maybe PackageAggregationResponse
packageAggregation) (\s :: AggregationResponse
s@AggregationResponse' {} Maybe PackageAggregationResponse
a -> AggregationResponse
s {$sel:packageAggregation:AggregationResponse' :: Maybe PackageAggregationResponse
packageAggregation = Maybe PackageAggregationResponse
a} :: AggregationResponse)

-- | An object that contains details about an aggregation response based on
-- Amazon ECR repositories.
aggregationResponse_repositoryAggregation :: Lens.Lens' AggregationResponse (Prelude.Maybe RepositoryAggregationResponse)
aggregationResponse_repositoryAggregation :: Lens' AggregationResponse (Maybe RepositoryAggregationResponse)
aggregationResponse_repositoryAggregation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AggregationResponse' {Maybe RepositoryAggregationResponse
repositoryAggregation :: Maybe RepositoryAggregationResponse
$sel:repositoryAggregation:AggregationResponse' :: AggregationResponse -> Maybe RepositoryAggregationResponse
repositoryAggregation} -> Maybe RepositoryAggregationResponse
repositoryAggregation) (\s :: AggregationResponse
s@AggregationResponse' {} Maybe RepositoryAggregationResponse
a -> AggregationResponse
s {$sel:repositoryAggregation:AggregationResponse' :: Maybe RepositoryAggregationResponse
repositoryAggregation = Maybe RepositoryAggregationResponse
a} :: AggregationResponse)

-- | An object that contains details about an aggregation response based on
-- finding title.
aggregationResponse_titleAggregation :: Lens.Lens' AggregationResponse (Prelude.Maybe TitleAggregationResponse)
aggregationResponse_titleAggregation :: Lens' AggregationResponse (Maybe TitleAggregationResponse)
aggregationResponse_titleAggregation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AggregationResponse' {Maybe TitleAggregationResponse
titleAggregation :: Maybe TitleAggregationResponse
$sel:titleAggregation:AggregationResponse' :: AggregationResponse -> Maybe TitleAggregationResponse
titleAggregation} -> Maybe TitleAggregationResponse
titleAggregation) (\s :: AggregationResponse
s@AggregationResponse' {} Maybe TitleAggregationResponse
a -> AggregationResponse
s {$sel:titleAggregation:AggregationResponse' :: Maybe TitleAggregationResponse
titleAggregation = Maybe TitleAggregationResponse
a} :: AggregationResponse)

instance Data.FromJSON AggregationResponse where
  parseJSON :: Value -> Parser AggregationResponse
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"AggregationResponse"
      ( \Object
x ->
          Maybe AccountAggregationResponse
-> Maybe AmiAggregationResponse
-> Maybe AwsEcrContainerAggregationResponse
-> Maybe Ec2InstanceAggregationResponse
-> Maybe FindingTypeAggregationResponse
-> Maybe ImageLayerAggregationResponse
-> Maybe LambdaFunctionAggregationResponse
-> Maybe LambdaLayerAggregationResponse
-> Maybe PackageAggregationResponse
-> Maybe RepositoryAggregationResponse
-> Maybe TitleAggregationResponse
-> AggregationResponse
AggregationResponse'
            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
"accountAggregation")
            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
"amiAggregation")
            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
"awsEcrContainerAggregation")
            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
"ec2InstanceAggregation")
            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
"findingTypeAggregation")
            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
"imageLayerAggregation")
            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
"lambdaFunctionAggregation")
            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
"lambdaLayerAggregation")
            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
"packageAggregation")
            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
"repositoryAggregation")
            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
"titleAggregation")
      )

instance Prelude.Hashable AggregationResponse where
  hashWithSalt :: Int -> AggregationResponse -> Int
hashWithSalt Int
_salt AggregationResponse' {Maybe RepositoryAggregationResponse
Maybe PackageAggregationResponse
Maybe LambdaLayerAggregationResponse
Maybe LambdaFunctionAggregationResponse
Maybe ImageLayerAggregationResponse
Maybe FindingTypeAggregationResponse
Maybe Ec2InstanceAggregationResponse
Maybe AwsEcrContainerAggregationResponse
Maybe AmiAggregationResponse
Maybe AccountAggregationResponse
Maybe TitleAggregationResponse
titleAggregation :: Maybe TitleAggregationResponse
repositoryAggregation :: Maybe RepositoryAggregationResponse
packageAggregation :: Maybe PackageAggregationResponse
lambdaLayerAggregation :: Maybe LambdaLayerAggregationResponse
lambdaFunctionAggregation :: Maybe LambdaFunctionAggregationResponse
imageLayerAggregation :: Maybe ImageLayerAggregationResponse
findingTypeAggregation :: Maybe FindingTypeAggregationResponse
ec2InstanceAggregation :: Maybe Ec2InstanceAggregationResponse
awsEcrContainerAggregation :: Maybe AwsEcrContainerAggregationResponse
amiAggregation :: Maybe AmiAggregationResponse
accountAggregation :: Maybe AccountAggregationResponse
$sel:titleAggregation:AggregationResponse' :: AggregationResponse -> Maybe TitleAggregationResponse
$sel:repositoryAggregation:AggregationResponse' :: AggregationResponse -> Maybe RepositoryAggregationResponse
$sel:packageAggregation:AggregationResponse' :: AggregationResponse -> Maybe PackageAggregationResponse
$sel:lambdaLayerAggregation:AggregationResponse' :: AggregationResponse -> Maybe LambdaLayerAggregationResponse
$sel:lambdaFunctionAggregation:AggregationResponse' :: AggregationResponse -> Maybe LambdaFunctionAggregationResponse
$sel:imageLayerAggregation:AggregationResponse' :: AggregationResponse -> Maybe ImageLayerAggregationResponse
$sel:findingTypeAggregation:AggregationResponse' :: AggregationResponse -> Maybe FindingTypeAggregationResponse
$sel:ec2InstanceAggregation:AggregationResponse' :: AggregationResponse -> Maybe Ec2InstanceAggregationResponse
$sel:awsEcrContainerAggregation:AggregationResponse' :: AggregationResponse -> Maybe AwsEcrContainerAggregationResponse
$sel:amiAggregation:AggregationResponse' :: AggregationResponse -> Maybe AmiAggregationResponse
$sel:accountAggregation:AggregationResponse' :: AggregationResponse -> Maybe AccountAggregationResponse
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AccountAggregationResponse
accountAggregation
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AmiAggregationResponse
amiAggregation
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AwsEcrContainerAggregationResponse
awsEcrContainerAggregation
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Ec2InstanceAggregationResponse
ec2InstanceAggregation
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe FindingTypeAggregationResponse
findingTypeAggregation
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ImageLayerAggregationResponse
imageLayerAggregation
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe LambdaFunctionAggregationResponse
lambdaFunctionAggregation
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe LambdaLayerAggregationResponse
lambdaLayerAggregation
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe PackageAggregationResponse
packageAggregation
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RepositoryAggregationResponse
repositoryAggregation
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TitleAggregationResponse
titleAggregation

instance Prelude.NFData AggregationResponse where
  rnf :: AggregationResponse -> ()
rnf AggregationResponse' {Maybe RepositoryAggregationResponse
Maybe PackageAggregationResponse
Maybe LambdaLayerAggregationResponse
Maybe LambdaFunctionAggregationResponse
Maybe ImageLayerAggregationResponse
Maybe FindingTypeAggregationResponse
Maybe Ec2InstanceAggregationResponse
Maybe AwsEcrContainerAggregationResponse
Maybe AmiAggregationResponse
Maybe AccountAggregationResponse
Maybe TitleAggregationResponse
titleAggregation :: Maybe TitleAggregationResponse
repositoryAggregation :: Maybe RepositoryAggregationResponse
packageAggregation :: Maybe PackageAggregationResponse
lambdaLayerAggregation :: Maybe LambdaLayerAggregationResponse
lambdaFunctionAggregation :: Maybe LambdaFunctionAggregationResponse
imageLayerAggregation :: Maybe ImageLayerAggregationResponse
findingTypeAggregation :: Maybe FindingTypeAggregationResponse
ec2InstanceAggregation :: Maybe Ec2InstanceAggregationResponse
awsEcrContainerAggregation :: Maybe AwsEcrContainerAggregationResponse
amiAggregation :: Maybe AmiAggregationResponse
accountAggregation :: Maybe AccountAggregationResponse
$sel:titleAggregation:AggregationResponse' :: AggregationResponse -> Maybe TitleAggregationResponse
$sel:repositoryAggregation:AggregationResponse' :: AggregationResponse -> Maybe RepositoryAggregationResponse
$sel:packageAggregation:AggregationResponse' :: AggregationResponse -> Maybe PackageAggregationResponse
$sel:lambdaLayerAggregation:AggregationResponse' :: AggregationResponse -> Maybe LambdaLayerAggregationResponse
$sel:lambdaFunctionAggregation:AggregationResponse' :: AggregationResponse -> Maybe LambdaFunctionAggregationResponse
$sel:imageLayerAggregation:AggregationResponse' :: AggregationResponse -> Maybe ImageLayerAggregationResponse
$sel:findingTypeAggregation:AggregationResponse' :: AggregationResponse -> Maybe FindingTypeAggregationResponse
$sel:ec2InstanceAggregation:AggregationResponse' :: AggregationResponse -> Maybe Ec2InstanceAggregationResponse
$sel:awsEcrContainerAggregation:AggregationResponse' :: AggregationResponse -> Maybe AwsEcrContainerAggregationResponse
$sel:amiAggregation:AggregationResponse' :: AggregationResponse -> Maybe AmiAggregationResponse
$sel:accountAggregation:AggregationResponse' :: AggregationResponse -> Maybe AccountAggregationResponse
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe AccountAggregationResponse
accountAggregation
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AmiAggregationResponse
amiAggregation
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AwsEcrContainerAggregationResponse
awsEcrContainerAggregation
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Ec2InstanceAggregationResponse
ec2InstanceAggregation
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe FindingTypeAggregationResponse
findingTypeAggregation
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ImageLayerAggregationResponse
imageLayerAggregation
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe LambdaFunctionAggregationResponse
lambdaFunctionAggregation
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe LambdaLayerAggregationResponse
lambdaLayerAggregation
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe PackageAggregationResponse
packageAggregation
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RepositoryAggregationResponse
repositoryAggregation
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe TitleAggregationResponse
titleAggregation