{-# 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.AggregationRequest
-- 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.AggregationRequest 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.AccountAggregation
import Amazonka.Inspector2.Types.AmiAggregation
import Amazonka.Inspector2.Types.AwsEcrContainerAggregation
import Amazonka.Inspector2.Types.Ec2InstanceAggregation
import Amazonka.Inspector2.Types.FindingTypeAggregation
import Amazonka.Inspector2.Types.ImageLayerAggregation
import Amazonka.Inspector2.Types.LambdaFunctionAggregation
import Amazonka.Inspector2.Types.LambdaLayerAggregation
import Amazonka.Inspector2.Types.PackageAggregation
import Amazonka.Inspector2.Types.RepositoryAggregation
import Amazonka.Inspector2.Types.TitleAggregation
import qualified Amazonka.Prelude as Prelude

-- | Contains details about an aggregation request.
--
-- /See:/ 'newAggregationRequest' smart constructor.
data AggregationRequest = AggregationRequest'
  { -- | An object that contains details about an aggregation request based on
    -- Amazon Web Services account IDs.
    AggregationRequest -> Maybe AccountAggregation
accountAggregation :: Prelude.Maybe AccountAggregation,
    -- | An object that contains details about an aggregation request based on
    -- Amazon Machine Images (AMIs).
    AggregationRequest -> Maybe AmiAggregation
amiAggregation :: Prelude.Maybe AmiAggregation,
    -- | An object that contains details about an aggregation request based on
    -- Amazon ECR container images.
    AggregationRequest -> Maybe AwsEcrContainerAggregation
awsEcrContainerAggregation :: Prelude.Maybe AwsEcrContainerAggregation,
    -- | An object that contains details about an aggregation request based on
    -- Amazon EC2 instances.
    AggregationRequest -> Maybe Ec2InstanceAggregation
ec2InstanceAggregation :: Prelude.Maybe Ec2InstanceAggregation,
    -- | An object that contains details about an aggregation request based on
    -- finding types.
    AggregationRequest -> Maybe FindingTypeAggregation
findingTypeAggregation :: Prelude.Maybe FindingTypeAggregation,
    -- | An object that contains details about an aggregation request based on
    -- container image layers.
    AggregationRequest -> Maybe ImageLayerAggregation
imageLayerAggregation :: Prelude.Maybe ImageLayerAggregation,
    -- | Returns an object with findings aggregated by AWS Lambda function.
    AggregationRequest -> Maybe LambdaFunctionAggregation
lambdaFunctionAggregation :: Prelude.Maybe LambdaFunctionAggregation,
    -- | Returns an object with findings aggregated by AWS Lambda layer.
    AggregationRequest -> Maybe LambdaLayerAggregation
lambdaLayerAggregation :: Prelude.Maybe LambdaLayerAggregation,
    -- | An object that contains details about an aggregation request based on
    -- operating system package type.
    AggregationRequest -> Maybe PackageAggregation
packageAggregation :: Prelude.Maybe PackageAggregation,
    -- | An object that contains details about an aggregation request based on
    -- Amazon ECR repositories.
    AggregationRequest -> Maybe RepositoryAggregation
repositoryAggregation :: Prelude.Maybe RepositoryAggregation,
    -- | An object that contains details about an aggregation request based on
    -- finding title.
    AggregationRequest -> Maybe TitleAggregation
titleAggregation :: Prelude.Maybe TitleAggregation
  }
  deriving (AggregationRequest -> AggregationRequest -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AggregationRequest -> AggregationRequest -> Bool
$c/= :: AggregationRequest -> AggregationRequest -> Bool
== :: AggregationRequest -> AggregationRequest -> Bool
$c== :: AggregationRequest -> AggregationRequest -> Bool
Prelude.Eq, ReadPrec [AggregationRequest]
ReadPrec AggregationRequest
Int -> ReadS AggregationRequest
ReadS [AggregationRequest]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AggregationRequest]
$creadListPrec :: ReadPrec [AggregationRequest]
readPrec :: ReadPrec AggregationRequest
$creadPrec :: ReadPrec AggregationRequest
readList :: ReadS [AggregationRequest]
$creadList :: ReadS [AggregationRequest]
readsPrec :: Int -> ReadS AggregationRequest
$creadsPrec :: Int -> ReadS AggregationRequest
Prelude.Read, Int -> AggregationRequest -> ShowS
[AggregationRequest] -> ShowS
AggregationRequest -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AggregationRequest] -> ShowS
$cshowList :: [AggregationRequest] -> ShowS
show :: AggregationRequest -> String
$cshow :: AggregationRequest -> String
showsPrec :: Int -> AggregationRequest -> ShowS
$cshowsPrec :: Int -> AggregationRequest -> ShowS
Prelude.Show, forall x. Rep AggregationRequest x -> AggregationRequest
forall x. AggregationRequest -> Rep AggregationRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AggregationRequest x -> AggregationRequest
$cfrom :: forall x. AggregationRequest -> Rep AggregationRequest x
Prelude.Generic)

-- |
-- Create a value of 'AggregationRequest' 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', 'aggregationRequest_accountAggregation' - An object that contains details about an aggregation request based on
-- Amazon Web Services account IDs.
--
-- 'amiAggregation', 'aggregationRequest_amiAggregation' - An object that contains details about an aggregation request based on
-- Amazon Machine Images (AMIs).
--
-- 'awsEcrContainerAggregation', 'aggregationRequest_awsEcrContainerAggregation' - An object that contains details about an aggregation request based on
-- Amazon ECR container images.
--
-- 'ec2InstanceAggregation', 'aggregationRequest_ec2InstanceAggregation' - An object that contains details about an aggregation request based on
-- Amazon EC2 instances.
--
-- 'findingTypeAggregation', 'aggregationRequest_findingTypeAggregation' - An object that contains details about an aggregation request based on
-- finding types.
--
-- 'imageLayerAggregation', 'aggregationRequest_imageLayerAggregation' - An object that contains details about an aggregation request based on
-- container image layers.
--
-- 'lambdaFunctionAggregation', 'aggregationRequest_lambdaFunctionAggregation' - Returns an object with findings aggregated by AWS Lambda function.
--
-- 'lambdaLayerAggregation', 'aggregationRequest_lambdaLayerAggregation' - Returns an object with findings aggregated by AWS Lambda layer.
--
-- 'packageAggregation', 'aggregationRequest_packageAggregation' - An object that contains details about an aggregation request based on
-- operating system package type.
--
-- 'repositoryAggregation', 'aggregationRequest_repositoryAggregation' - An object that contains details about an aggregation request based on
-- Amazon ECR repositories.
--
-- 'titleAggregation', 'aggregationRequest_titleAggregation' - An object that contains details about an aggregation request based on
-- finding title.
newAggregationRequest ::
  AggregationRequest
newAggregationRequest :: AggregationRequest
newAggregationRequest =
  AggregationRequest'
    { $sel:accountAggregation:AggregationRequest' :: Maybe AccountAggregation
accountAggregation =
        forall a. Maybe a
Prelude.Nothing,
      $sel:amiAggregation:AggregationRequest' :: Maybe AmiAggregation
amiAggregation = forall a. Maybe a
Prelude.Nothing,
      $sel:awsEcrContainerAggregation:AggregationRequest' :: Maybe AwsEcrContainerAggregation
awsEcrContainerAggregation = forall a. Maybe a
Prelude.Nothing,
      $sel:ec2InstanceAggregation:AggregationRequest' :: Maybe Ec2InstanceAggregation
ec2InstanceAggregation = forall a. Maybe a
Prelude.Nothing,
      $sel:findingTypeAggregation:AggregationRequest' :: Maybe FindingTypeAggregation
findingTypeAggregation = forall a. Maybe a
Prelude.Nothing,
      $sel:imageLayerAggregation:AggregationRequest' :: Maybe ImageLayerAggregation
imageLayerAggregation = forall a. Maybe a
Prelude.Nothing,
      $sel:lambdaFunctionAggregation:AggregationRequest' :: Maybe LambdaFunctionAggregation
lambdaFunctionAggregation = forall a. Maybe a
Prelude.Nothing,
      $sel:lambdaLayerAggregation:AggregationRequest' :: Maybe LambdaLayerAggregation
lambdaLayerAggregation = forall a. Maybe a
Prelude.Nothing,
      $sel:packageAggregation:AggregationRequest' :: Maybe PackageAggregation
packageAggregation = forall a. Maybe a
Prelude.Nothing,
      $sel:repositoryAggregation:AggregationRequest' :: Maybe RepositoryAggregation
repositoryAggregation = forall a. Maybe a
Prelude.Nothing,
      $sel:titleAggregation:AggregationRequest' :: Maybe TitleAggregation
titleAggregation = forall a. Maybe a
Prelude.Nothing
    }

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

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

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

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

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

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

-- | Returns an object with findings aggregated by AWS Lambda function.
aggregationRequest_lambdaFunctionAggregation :: Lens.Lens' AggregationRequest (Prelude.Maybe LambdaFunctionAggregation)
aggregationRequest_lambdaFunctionAggregation :: Lens' AggregationRequest (Maybe LambdaFunctionAggregation)
aggregationRequest_lambdaFunctionAggregation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AggregationRequest' {Maybe LambdaFunctionAggregation
lambdaFunctionAggregation :: Maybe LambdaFunctionAggregation
$sel:lambdaFunctionAggregation:AggregationRequest' :: AggregationRequest -> Maybe LambdaFunctionAggregation
lambdaFunctionAggregation} -> Maybe LambdaFunctionAggregation
lambdaFunctionAggregation) (\s :: AggregationRequest
s@AggregationRequest' {} Maybe LambdaFunctionAggregation
a -> AggregationRequest
s {$sel:lambdaFunctionAggregation:AggregationRequest' :: Maybe LambdaFunctionAggregation
lambdaFunctionAggregation = Maybe LambdaFunctionAggregation
a} :: AggregationRequest)

-- | Returns an object with findings aggregated by AWS Lambda layer.
aggregationRequest_lambdaLayerAggregation :: Lens.Lens' AggregationRequest (Prelude.Maybe LambdaLayerAggregation)
aggregationRequest_lambdaLayerAggregation :: Lens' AggregationRequest (Maybe LambdaLayerAggregation)
aggregationRequest_lambdaLayerAggregation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AggregationRequest' {Maybe LambdaLayerAggregation
lambdaLayerAggregation :: Maybe LambdaLayerAggregation
$sel:lambdaLayerAggregation:AggregationRequest' :: AggregationRequest -> Maybe LambdaLayerAggregation
lambdaLayerAggregation} -> Maybe LambdaLayerAggregation
lambdaLayerAggregation) (\s :: AggregationRequest
s@AggregationRequest' {} Maybe LambdaLayerAggregation
a -> AggregationRequest
s {$sel:lambdaLayerAggregation:AggregationRequest' :: Maybe LambdaLayerAggregation
lambdaLayerAggregation = Maybe LambdaLayerAggregation
a} :: AggregationRequest)

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

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

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

instance Prelude.Hashable AggregationRequest where
  hashWithSalt :: Int -> AggregationRequest -> Int
hashWithSalt Int
_salt AggregationRequest' {Maybe FindingTypeAggregation
Maybe AccountAggregation
Maybe RepositoryAggregation
Maybe PackageAggregation
Maybe LambdaLayerAggregation
Maybe LambdaFunctionAggregation
Maybe ImageLayerAggregation
Maybe Ec2InstanceAggregation
Maybe AwsEcrContainerAggregation
Maybe AmiAggregation
Maybe TitleAggregation
titleAggregation :: Maybe TitleAggregation
repositoryAggregation :: Maybe RepositoryAggregation
packageAggregation :: Maybe PackageAggregation
lambdaLayerAggregation :: Maybe LambdaLayerAggregation
lambdaFunctionAggregation :: Maybe LambdaFunctionAggregation
imageLayerAggregation :: Maybe ImageLayerAggregation
findingTypeAggregation :: Maybe FindingTypeAggregation
ec2InstanceAggregation :: Maybe Ec2InstanceAggregation
awsEcrContainerAggregation :: Maybe AwsEcrContainerAggregation
amiAggregation :: Maybe AmiAggregation
accountAggregation :: Maybe AccountAggregation
$sel:titleAggregation:AggregationRequest' :: AggregationRequest -> Maybe TitleAggregation
$sel:repositoryAggregation:AggregationRequest' :: AggregationRequest -> Maybe RepositoryAggregation
$sel:packageAggregation:AggregationRequest' :: AggregationRequest -> Maybe PackageAggregation
$sel:lambdaLayerAggregation:AggregationRequest' :: AggregationRequest -> Maybe LambdaLayerAggregation
$sel:lambdaFunctionAggregation:AggregationRequest' :: AggregationRequest -> Maybe LambdaFunctionAggregation
$sel:imageLayerAggregation:AggregationRequest' :: AggregationRequest -> Maybe ImageLayerAggregation
$sel:findingTypeAggregation:AggregationRequest' :: AggregationRequest -> Maybe FindingTypeAggregation
$sel:ec2InstanceAggregation:AggregationRequest' :: AggregationRequest -> Maybe Ec2InstanceAggregation
$sel:awsEcrContainerAggregation:AggregationRequest' :: AggregationRequest -> Maybe AwsEcrContainerAggregation
$sel:amiAggregation:AggregationRequest' :: AggregationRequest -> Maybe AmiAggregation
$sel:accountAggregation:AggregationRequest' :: AggregationRequest -> Maybe AccountAggregation
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AccountAggregation
accountAggregation
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AmiAggregation
amiAggregation
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AwsEcrContainerAggregation
awsEcrContainerAggregation
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Ec2InstanceAggregation
ec2InstanceAggregation
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe FindingTypeAggregation
findingTypeAggregation
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ImageLayerAggregation
imageLayerAggregation
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe LambdaFunctionAggregation
lambdaFunctionAggregation
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe LambdaLayerAggregation
lambdaLayerAggregation
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe PackageAggregation
packageAggregation
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RepositoryAggregation
repositoryAggregation
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TitleAggregation
titleAggregation

instance Prelude.NFData AggregationRequest where
  rnf :: AggregationRequest -> ()
rnf AggregationRequest' {Maybe FindingTypeAggregation
Maybe AccountAggregation
Maybe RepositoryAggregation
Maybe PackageAggregation
Maybe LambdaLayerAggregation
Maybe LambdaFunctionAggregation
Maybe ImageLayerAggregation
Maybe Ec2InstanceAggregation
Maybe AwsEcrContainerAggregation
Maybe AmiAggregation
Maybe TitleAggregation
titleAggregation :: Maybe TitleAggregation
repositoryAggregation :: Maybe RepositoryAggregation
packageAggregation :: Maybe PackageAggregation
lambdaLayerAggregation :: Maybe LambdaLayerAggregation
lambdaFunctionAggregation :: Maybe LambdaFunctionAggregation
imageLayerAggregation :: Maybe ImageLayerAggregation
findingTypeAggregation :: Maybe FindingTypeAggregation
ec2InstanceAggregation :: Maybe Ec2InstanceAggregation
awsEcrContainerAggregation :: Maybe AwsEcrContainerAggregation
amiAggregation :: Maybe AmiAggregation
accountAggregation :: Maybe AccountAggregation
$sel:titleAggregation:AggregationRequest' :: AggregationRequest -> Maybe TitleAggregation
$sel:repositoryAggregation:AggregationRequest' :: AggregationRequest -> Maybe RepositoryAggregation
$sel:packageAggregation:AggregationRequest' :: AggregationRequest -> Maybe PackageAggregation
$sel:lambdaLayerAggregation:AggregationRequest' :: AggregationRequest -> Maybe LambdaLayerAggregation
$sel:lambdaFunctionAggregation:AggregationRequest' :: AggregationRequest -> Maybe LambdaFunctionAggregation
$sel:imageLayerAggregation:AggregationRequest' :: AggregationRequest -> Maybe ImageLayerAggregation
$sel:findingTypeAggregation:AggregationRequest' :: AggregationRequest -> Maybe FindingTypeAggregation
$sel:ec2InstanceAggregation:AggregationRequest' :: AggregationRequest -> Maybe Ec2InstanceAggregation
$sel:awsEcrContainerAggregation:AggregationRequest' :: AggregationRequest -> Maybe AwsEcrContainerAggregation
$sel:amiAggregation:AggregationRequest' :: AggregationRequest -> Maybe AmiAggregation
$sel:accountAggregation:AggregationRequest' :: AggregationRequest -> Maybe AccountAggregation
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe AccountAggregation
accountAggregation
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AmiAggregation
amiAggregation
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AwsEcrContainerAggregation
awsEcrContainerAggregation
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Ec2InstanceAggregation
ec2InstanceAggregation
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe FindingTypeAggregation
findingTypeAggregation
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ImageLayerAggregation
imageLayerAggregation
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe LambdaFunctionAggregation
lambdaFunctionAggregation
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe LambdaLayerAggregation
lambdaLayerAggregation
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe PackageAggregation
packageAggregation
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RepositoryAggregation
repositoryAggregation
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe TitleAggregation
titleAggregation

instance Data.ToJSON AggregationRequest where
  toJSON :: AggregationRequest -> Value
toJSON AggregationRequest' {Maybe FindingTypeAggregation
Maybe AccountAggregation
Maybe RepositoryAggregation
Maybe PackageAggregation
Maybe LambdaLayerAggregation
Maybe LambdaFunctionAggregation
Maybe ImageLayerAggregation
Maybe Ec2InstanceAggregation
Maybe AwsEcrContainerAggregation
Maybe AmiAggregation
Maybe TitleAggregation
titleAggregation :: Maybe TitleAggregation
repositoryAggregation :: Maybe RepositoryAggregation
packageAggregation :: Maybe PackageAggregation
lambdaLayerAggregation :: Maybe LambdaLayerAggregation
lambdaFunctionAggregation :: Maybe LambdaFunctionAggregation
imageLayerAggregation :: Maybe ImageLayerAggregation
findingTypeAggregation :: Maybe FindingTypeAggregation
ec2InstanceAggregation :: Maybe Ec2InstanceAggregation
awsEcrContainerAggregation :: Maybe AwsEcrContainerAggregation
amiAggregation :: Maybe AmiAggregation
accountAggregation :: Maybe AccountAggregation
$sel:titleAggregation:AggregationRequest' :: AggregationRequest -> Maybe TitleAggregation
$sel:repositoryAggregation:AggregationRequest' :: AggregationRequest -> Maybe RepositoryAggregation
$sel:packageAggregation:AggregationRequest' :: AggregationRequest -> Maybe PackageAggregation
$sel:lambdaLayerAggregation:AggregationRequest' :: AggregationRequest -> Maybe LambdaLayerAggregation
$sel:lambdaFunctionAggregation:AggregationRequest' :: AggregationRequest -> Maybe LambdaFunctionAggregation
$sel:imageLayerAggregation:AggregationRequest' :: AggregationRequest -> Maybe ImageLayerAggregation
$sel:findingTypeAggregation:AggregationRequest' :: AggregationRequest -> Maybe FindingTypeAggregation
$sel:ec2InstanceAggregation:AggregationRequest' :: AggregationRequest -> Maybe Ec2InstanceAggregation
$sel:awsEcrContainerAggregation:AggregationRequest' :: AggregationRequest -> Maybe AwsEcrContainerAggregation
$sel:amiAggregation:AggregationRequest' :: AggregationRequest -> Maybe AmiAggregation
$sel:accountAggregation:AggregationRequest' :: AggregationRequest -> Maybe AccountAggregation
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"accountAggregation" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AccountAggregation
accountAggregation,
            (Key
"amiAggregation" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AmiAggregation
amiAggregation,
            (Key
"awsEcrContainerAggregation" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AwsEcrContainerAggregation
awsEcrContainerAggregation,
            (Key
"ec2InstanceAggregation" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Ec2InstanceAggregation
ec2InstanceAggregation,
            (Key
"findingTypeAggregation" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FindingTypeAggregation
findingTypeAggregation,
            (Key
"imageLayerAggregation" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ImageLayerAggregation
imageLayerAggregation,
            (Key
"lambdaFunctionAggregation" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LambdaFunctionAggregation
lambdaFunctionAggregation,
            (Key
"lambdaLayerAggregation" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LambdaLayerAggregation
lambdaLayerAggregation,
            (Key
"packageAggregation" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PackageAggregation
packageAggregation,
            (Key
"repositoryAggregation" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RepositoryAggregation
repositoryAggregation,
            (Key
"titleAggregation" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TitleAggregation
titleAggregation
          ]
      )