{-# 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.ECR.Types.EnhancedImageScanFinding
-- 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.ECR.Types.EnhancedImageScanFinding where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.ECR.Types.PackageVulnerabilityDetails
import Amazonka.ECR.Types.Remediation
import Amazonka.ECR.Types.Resource
import Amazonka.ECR.Types.ScoreDetails
import qualified Amazonka.Prelude as Prelude

-- | The details of an enhanced image scan. This is returned when enhanced
-- scanning is enabled for your private registry.
--
-- /See:/ 'newEnhancedImageScanFinding' smart constructor.
data EnhancedImageScanFinding = EnhancedImageScanFinding'
  { -- | The Amazon Web Services account ID associated with the image.
    EnhancedImageScanFinding -> Maybe Text
awsAccountId :: Prelude.Maybe Prelude.Text,
    -- | The description of the finding.
    EnhancedImageScanFinding -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Number (ARN) of the finding.
    EnhancedImageScanFinding -> Maybe Text
findingArn :: Prelude.Maybe Prelude.Text,
    -- | The date and time that the finding was first observed.
    EnhancedImageScanFinding -> Maybe POSIX
firstObservedAt :: Prelude.Maybe Data.POSIX,
    -- | The date and time that the finding was last observed.
    EnhancedImageScanFinding -> Maybe POSIX
lastObservedAt :: Prelude.Maybe Data.POSIX,
    -- | An object that contains the details of a package vulnerability finding.
    EnhancedImageScanFinding -> Maybe PackageVulnerabilityDetails
packageVulnerabilityDetails :: Prelude.Maybe PackageVulnerabilityDetails,
    -- | An object that contains the details about how to remediate a finding.
    EnhancedImageScanFinding -> Maybe Remediation
remediation :: Prelude.Maybe Remediation,
    -- | Contains information on the resources involved in a finding.
    EnhancedImageScanFinding -> Maybe [Resource]
resources :: Prelude.Maybe [Resource],
    -- | The Amazon Inspector score given to the finding.
    EnhancedImageScanFinding -> Maybe Double
score :: Prelude.Maybe Prelude.Double,
    -- | An object that contains details of the Amazon Inspector score.
    EnhancedImageScanFinding -> Maybe ScoreDetails
scoreDetails :: Prelude.Maybe ScoreDetails,
    -- | The severity of the finding.
    EnhancedImageScanFinding -> Maybe Text
severity :: Prelude.Maybe Prelude.Text,
    -- | The status of the finding.
    EnhancedImageScanFinding -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
    -- | The title of the finding.
    EnhancedImageScanFinding -> Maybe Text
title :: Prelude.Maybe Prelude.Text,
    -- | The type of the finding.
    EnhancedImageScanFinding -> Maybe Text
type' :: Prelude.Maybe Prelude.Text,
    -- | The date and time the finding was last updated at.
    EnhancedImageScanFinding -> Maybe POSIX
updatedAt :: Prelude.Maybe Data.POSIX
  }
  deriving (EnhancedImageScanFinding -> EnhancedImageScanFinding -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EnhancedImageScanFinding -> EnhancedImageScanFinding -> Bool
$c/= :: EnhancedImageScanFinding -> EnhancedImageScanFinding -> Bool
== :: EnhancedImageScanFinding -> EnhancedImageScanFinding -> Bool
$c== :: EnhancedImageScanFinding -> EnhancedImageScanFinding -> Bool
Prelude.Eq, ReadPrec [EnhancedImageScanFinding]
ReadPrec EnhancedImageScanFinding
Int -> ReadS EnhancedImageScanFinding
ReadS [EnhancedImageScanFinding]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EnhancedImageScanFinding]
$creadListPrec :: ReadPrec [EnhancedImageScanFinding]
readPrec :: ReadPrec EnhancedImageScanFinding
$creadPrec :: ReadPrec EnhancedImageScanFinding
readList :: ReadS [EnhancedImageScanFinding]
$creadList :: ReadS [EnhancedImageScanFinding]
readsPrec :: Int -> ReadS EnhancedImageScanFinding
$creadsPrec :: Int -> ReadS EnhancedImageScanFinding
Prelude.Read, Int -> EnhancedImageScanFinding -> ShowS
[EnhancedImageScanFinding] -> ShowS
EnhancedImageScanFinding -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EnhancedImageScanFinding] -> ShowS
$cshowList :: [EnhancedImageScanFinding] -> ShowS
show :: EnhancedImageScanFinding -> String
$cshow :: EnhancedImageScanFinding -> String
showsPrec :: Int -> EnhancedImageScanFinding -> ShowS
$cshowsPrec :: Int -> EnhancedImageScanFinding -> ShowS
Prelude.Show, forall x.
Rep EnhancedImageScanFinding x -> EnhancedImageScanFinding
forall x.
EnhancedImageScanFinding -> Rep EnhancedImageScanFinding x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep EnhancedImageScanFinding x -> EnhancedImageScanFinding
$cfrom :: forall x.
EnhancedImageScanFinding -> Rep EnhancedImageScanFinding x
Prelude.Generic)

-- |
-- Create a value of 'EnhancedImageScanFinding' 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:
--
-- 'awsAccountId', 'enhancedImageScanFinding_awsAccountId' - The Amazon Web Services account ID associated with the image.
--
-- 'description', 'enhancedImageScanFinding_description' - The description of the finding.
--
-- 'findingArn', 'enhancedImageScanFinding_findingArn' - The Amazon Resource Number (ARN) of the finding.
--
-- 'firstObservedAt', 'enhancedImageScanFinding_firstObservedAt' - The date and time that the finding was first observed.
--
-- 'lastObservedAt', 'enhancedImageScanFinding_lastObservedAt' - The date and time that the finding was last observed.
--
-- 'packageVulnerabilityDetails', 'enhancedImageScanFinding_packageVulnerabilityDetails' - An object that contains the details of a package vulnerability finding.
--
-- 'remediation', 'enhancedImageScanFinding_remediation' - An object that contains the details about how to remediate a finding.
--
-- 'resources', 'enhancedImageScanFinding_resources' - Contains information on the resources involved in a finding.
--
-- 'score', 'enhancedImageScanFinding_score' - The Amazon Inspector score given to the finding.
--
-- 'scoreDetails', 'enhancedImageScanFinding_scoreDetails' - An object that contains details of the Amazon Inspector score.
--
-- 'severity', 'enhancedImageScanFinding_severity' - The severity of the finding.
--
-- 'status', 'enhancedImageScanFinding_status' - The status of the finding.
--
-- 'title', 'enhancedImageScanFinding_title' - The title of the finding.
--
-- 'type'', 'enhancedImageScanFinding_type' - The type of the finding.
--
-- 'updatedAt', 'enhancedImageScanFinding_updatedAt' - The date and time the finding was last updated at.
newEnhancedImageScanFinding ::
  EnhancedImageScanFinding
newEnhancedImageScanFinding :: EnhancedImageScanFinding
newEnhancedImageScanFinding =
  EnhancedImageScanFinding'
    { $sel:awsAccountId:EnhancedImageScanFinding' :: Maybe Text
awsAccountId =
        forall a. Maybe a
Prelude.Nothing,
      $sel:description:EnhancedImageScanFinding' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:findingArn:EnhancedImageScanFinding' :: Maybe Text
findingArn = forall a. Maybe a
Prelude.Nothing,
      $sel:firstObservedAt:EnhancedImageScanFinding' :: Maybe POSIX
firstObservedAt = forall a. Maybe a
Prelude.Nothing,
      $sel:lastObservedAt:EnhancedImageScanFinding' :: Maybe POSIX
lastObservedAt = forall a. Maybe a
Prelude.Nothing,
      $sel:packageVulnerabilityDetails:EnhancedImageScanFinding' :: Maybe PackageVulnerabilityDetails
packageVulnerabilityDetails = forall a. Maybe a
Prelude.Nothing,
      $sel:remediation:EnhancedImageScanFinding' :: Maybe Remediation
remediation = forall a. Maybe a
Prelude.Nothing,
      $sel:resources:EnhancedImageScanFinding' :: Maybe [Resource]
resources = forall a. Maybe a
Prelude.Nothing,
      $sel:score:EnhancedImageScanFinding' :: Maybe Double
score = forall a. Maybe a
Prelude.Nothing,
      $sel:scoreDetails:EnhancedImageScanFinding' :: Maybe ScoreDetails
scoreDetails = forall a. Maybe a
Prelude.Nothing,
      $sel:severity:EnhancedImageScanFinding' :: Maybe Text
severity = forall a. Maybe a
Prelude.Nothing,
      $sel:status:EnhancedImageScanFinding' :: Maybe Text
status = forall a. Maybe a
Prelude.Nothing,
      $sel:title:EnhancedImageScanFinding' :: Maybe Text
title = forall a. Maybe a
Prelude.Nothing,
      $sel:type':EnhancedImageScanFinding' :: Maybe Text
type' = forall a. Maybe a
Prelude.Nothing,
      $sel:updatedAt:EnhancedImageScanFinding' :: Maybe POSIX
updatedAt = forall a. Maybe a
Prelude.Nothing
    }

-- | The Amazon Web Services account ID associated with the image.
enhancedImageScanFinding_awsAccountId :: Lens.Lens' EnhancedImageScanFinding (Prelude.Maybe Prelude.Text)
enhancedImageScanFinding_awsAccountId :: Lens' EnhancedImageScanFinding (Maybe Text)
enhancedImageScanFinding_awsAccountId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnhancedImageScanFinding' {Maybe Text
awsAccountId :: Maybe Text
$sel:awsAccountId:EnhancedImageScanFinding' :: EnhancedImageScanFinding -> Maybe Text
awsAccountId} -> Maybe Text
awsAccountId) (\s :: EnhancedImageScanFinding
s@EnhancedImageScanFinding' {} Maybe Text
a -> EnhancedImageScanFinding
s {$sel:awsAccountId:EnhancedImageScanFinding' :: Maybe Text
awsAccountId = Maybe Text
a} :: EnhancedImageScanFinding)

-- | The description of the finding.
enhancedImageScanFinding_description :: Lens.Lens' EnhancedImageScanFinding (Prelude.Maybe Prelude.Text)
enhancedImageScanFinding_description :: Lens' EnhancedImageScanFinding (Maybe Text)
enhancedImageScanFinding_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnhancedImageScanFinding' {Maybe Text
description :: Maybe Text
$sel:description:EnhancedImageScanFinding' :: EnhancedImageScanFinding -> Maybe Text
description} -> Maybe Text
description) (\s :: EnhancedImageScanFinding
s@EnhancedImageScanFinding' {} Maybe Text
a -> EnhancedImageScanFinding
s {$sel:description:EnhancedImageScanFinding' :: Maybe Text
description = Maybe Text
a} :: EnhancedImageScanFinding)

-- | The Amazon Resource Number (ARN) of the finding.
enhancedImageScanFinding_findingArn :: Lens.Lens' EnhancedImageScanFinding (Prelude.Maybe Prelude.Text)
enhancedImageScanFinding_findingArn :: Lens' EnhancedImageScanFinding (Maybe Text)
enhancedImageScanFinding_findingArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnhancedImageScanFinding' {Maybe Text
findingArn :: Maybe Text
$sel:findingArn:EnhancedImageScanFinding' :: EnhancedImageScanFinding -> Maybe Text
findingArn} -> Maybe Text
findingArn) (\s :: EnhancedImageScanFinding
s@EnhancedImageScanFinding' {} Maybe Text
a -> EnhancedImageScanFinding
s {$sel:findingArn:EnhancedImageScanFinding' :: Maybe Text
findingArn = Maybe Text
a} :: EnhancedImageScanFinding)

-- | The date and time that the finding was first observed.
enhancedImageScanFinding_firstObservedAt :: Lens.Lens' EnhancedImageScanFinding (Prelude.Maybe Prelude.UTCTime)
enhancedImageScanFinding_firstObservedAt :: Lens' EnhancedImageScanFinding (Maybe UTCTime)
enhancedImageScanFinding_firstObservedAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnhancedImageScanFinding' {Maybe POSIX
firstObservedAt :: Maybe POSIX
$sel:firstObservedAt:EnhancedImageScanFinding' :: EnhancedImageScanFinding -> Maybe POSIX
firstObservedAt} -> Maybe POSIX
firstObservedAt) (\s :: EnhancedImageScanFinding
s@EnhancedImageScanFinding' {} Maybe POSIX
a -> EnhancedImageScanFinding
s {$sel:firstObservedAt:EnhancedImageScanFinding' :: Maybe POSIX
firstObservedAt = Maybe POSIX
a} :: EnhancedImageScanFinding) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The date and time that the finding was last observed.
enhancedImageScanFinding_lastObservedAt :: Lens.Lens' EnhancedImageScanFinding (Prelude.Maybe Prelude.UTCTime)
enhancedImageScanFinding_lastObservedAt :: Lens' EnhancedImageScanFinding (Maybe UTCTime)
enhancedImageScanFinding_lastObservedAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnhancedImageScanFinding' {Maybe POSIX
lastObservedAt :: Maybe POSIX
$sel:lastObservedAt:EnhancedImageScanFinding' :: EnhancedImageScanFinding -> Maybe POSIX
lastObservedAt} -> Maybe POSIX
lastObservedAt) (\s :: EnhancedImageScanFinding
s@EnhancedImageScanFinding' {} Maybe POSIX
a -> EnhancedImageScanFinding
s {$sel:lastObservedAt:EnhancedImageScanFinding' :: Maybe POSIX
lastObservedAt = Maybe POSIX
a} :: EnhancedImageScanFinding) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | An object that contains the details of a package vulnerability finding.
enhancedImageScanFinding_packageVulnerabilityDetails :: Lens.Lens' EnhancedImageScanFinding (Prelude.Maybe PackageVulnerabilityDetails)
enhancedImageScanFinding_packageVulnerabilityDetails :: Lens' EnhancedImageScanFinding (Maybe PackageVulnerabilityDetails)
enhancedImageScanFinding_packageVulnerabilityDetails = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnhancedImageScanFinding' {Maybe PackageVulnerabilityDetails
packageVulnerabilityDetails :: Maybe PackageVulnerabilityDetails
$sel:packageVulnerabilityDetails:EnhancedImageScanFinding' :: EnhancedImageScanFinding -> Maybe PackageVulnerabilityDetails
packageVulnerabilityDetails} -> Maybe PackageVulnerabilityDetails
packageVulnerabilityDetails) (\s :: EnhancedImageScanFinding
s@EnhancedImageScanFinding' {} Maybe PackageVulnerabilityDetails
a -> EnhancedImageScanFinding
s {$sel:packageVulnerabilityDetails:EnhancedImageScanFinding' :: Maybe PackageVulnerabilityDetails
packageVulnerabilityDetails = Maybe PackageVulnerabilityDetails
a} :: EnhancedImageScanFinding)

-- | An object that contains the details about how to remediate a finding.
enhancedImageScanFinding_remediation :: Lens.Lens' EnhancedImageScanFinding (Prelude.Maybe Remediation)
enhancedImageScanFinding_remediation :: Lens' EnhancedImageScanFinding (Maybe Remediation)
enhancedImageScanFinding_remediation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnhancedImageScanFinding' {Maybe Remediation
remediation :: Maybe Remediation
$sel:remediation:EnhancedImageScanFinding' :: EnhancedImageScanFinding -> Maybe Remediation
remediation} -> Maybe Remediation
remediation) (\s :: EnhancedImageScanFinding
s@EnhancedImageScanFinding' {} Maybe Remediation
a -> EnhancedImageScanFinding
s {$sel:remediation:EnhancedImageScanFinding' :: Maybe Remediation
remediation = Maybe Remediation
a} :: EnhancedImageScanFinding)

-- | Contains information on the resources involved in a finding.
enhancedImageScanFinding_resources :: Lens.Lens' EnhancedImageScanFinding (Prelude.Maybe [Resource])
enhancedImageScanFinding_resources :: Lens' EnhancedImageScanFinding (Maybe [Resource])
enhancedImageScanFinding_resources = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnhancedImageScanFinding' {Maybe [Resource]
resources :: Maybe [Resource]
$sel:resources:EnhancedImageScanFinding' :: EnhancedImageScanFinding -> Maybe [Resource]
resources} -> Maybe [Resource]
resources) (\s :: EnhancedImageScanFinding
s@EnhancedImageScanFinding' {} Maybe [Resource]
a -> EnhancedImageScanFinding
s {$sel:resources:EnhancedImageScanFinding' :: Maybe [Resource]
resources = Maybe [Resource]
a} :: EnhancedImageScanFinding) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The Amazon Inspector score given to the finding.
enhancedImageScanFinding_score :: Lens.Lens' EnhancedImageScanFinding (Prelude.Maybe Prelude.Double)
enhancedImageScanFinding_score :: Lens' EnhancedImageScanFinding (Maybe Double)
enhancedImageScanFinding_score = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnhancedImageScanFinding' {Maybe Double
score :: Maybe Double
$sel:score:EnhancedImageScanFinding' :: EnhancedImageScanFinding -> Maybe Double
score} -> Maybe Double
score) (\s :: EnhancedImageScanFinding
s@EnhancedImageScanFinding' {} Maybe Double
a -> EnhancedImageScanFinding
s {$sel:score:EnhancedImageScanFinding' :: Maybe Double
score = Maybe Double
a} :: EnhancedImageScanFinding)

-- | An object that contains details of the Amazon Inspector score.
enhancedImageScanFinding_scoreDetails :: Lens.Lens' EnhancedImageScanFinding (Prelude.Maybe ScoreDetails)
enhancedImageScanFinding_scoreDetails :: Lens' EnhancedImageScanFinding (Maybe ScoreDetails)
enhancedImageScanFinding_scoreDetails = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnhancedImageScanFinding' {Maybe ScoreDetails
scoreDetails :: Maybe ScoreDetails
$sel:scoreDetails:EnhancedImageScanFinding' :: EnhancedImageScanFinding -> Maybe ScoreDetails
scoreDetails} -> Maybe ScoreDetails
scoreDetails) (\s :: EnhancedImageScanFinding
s@EnhancedImageScanFinding' {} Maybe ScoreDetails
a -> EnhancedImageScanFinding
s {$sel:scoreDetails:EnhancedImageScanFinding' :: Maybe ScoreDetails
scoreDetails = Maybe ScoreDetails
a} :: EnhancedImageScanFinding)

-- | The severity of the finding.
enhancedImageScanFinding_severity :: Lens.Lens' EnhancedImageScanFinding (Prelude.Maybe Prelude.Text)
enhancedImageScanFinding_severity :: Lens' EnhancedImageScanFinding (Maybe Text)
enhancedImageScanFinding_severity = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnhancedImageScanFinding' {Maybe Text
severity :: Maybe Text
$sel:severity:EnhancedImageScanFinding' :: EnhancedImageScanFinding -> Maybe Text
severity} -> Maybe Text
severity) (\s :: EnhancedImageScanFinding
s@EnhancedImageScanFinding' {} Maybe Text
a -> EnhancedImageScanFinding
s {$sel:severity:EnhancedImageScanFinding' :: Maybe Text
severity = Maybe Text
a} :: EnhancedImageScanFinding)

-- | The status of the finding.
enhancedImageScanFinding_status :: Lens.Lens' EnhancedImageScanFinding (Prelude.Maybe Prelude.Text)
enhancedImageScanFinding_status :: Lens' EnhancedImageScanFinding (Maybe Text)
enhancedImageScanFinding_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnhancedImageScanFinding' {Maybe Text
status :: Maybe Text
$sel:status:EnhancedImageScanFinding' :: EnhancedImageScanFinding -> Maybe Text
status} -> Maybe Text
status) (\s :: EnhancedImageScanFinding
s@EnhancedImageScanFinding' {} Maybe Text
a -> EnhancedImageScanFinding
s {$sel:status:EnhancedImageScanFinding' :: Maybe Text
status = Maybe Text
a} :: EnhancedImageScanFinding)

-- | The title of the finding.
enhancedImageScanFinding_title :: Lens.Lens' EnhancedImageScanFinding (Prelude.Maybe Prelude.Text)
enhancedImageScanFinding_title :: Lens' EnhancedImageScanFinding (Maybe Text)
enhancedImageScanFinding_title = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnhancedImageScanFinding' {Maybe Text
title :: Maybe Text
$sel:title:EnhancedImageScanFinding' :: EnhancedImageScanFinding -> Maybe Text
title} -> Maybe Text
title) (\s :: EnhancedImageScanFinding
s@EnhancedImageScanFinding' {} Maybe Text
a -> EnhancedImageScanFinding
s {$sel:title:EnhancedImageScanFinding' :: Maybe Text
title = Maybe Text
a} :: EnhancedImageScanFinding)

-- | The type of the finding.
enhancedImageScanFinding_type :: Lens.Lens' EnhancedImageScanFinding (Prelude.Maybe Prelude.Text)
enhancedImageScanFinding_type :: Lens' EnhancedImageScanFinding (Maybe Text)
enhancedImageScanFinding_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnhancedImageScanFinding' {Maybe Text
type' :: Maybe Text
$sel:type':EnhancedImageScanFinding' :: EnhancedImageScanFinding -> Maybe Text
type'} -> Maybe Text
type') (\s :: EnhancedImageScanFinding
s@EnhancedImageScanFinding' {} Maybe Text
a -> EnhancedImageScanFinding
s {$sel:type':EnhancedImageScanFinding' :: Maybe Text
type' = Maybe Text
a} :: EnhancedImageScanFinding)

-- | The date and time the finding was last updated at.
enhancedImageScanFinding_updatedAt :: Lens.Lens' EnhancedImageScanFinding (Prelude.Maybe Prelude.UTCTime)
enhancedImageScanFinding_updatedAt :: Lens' EnhancedImageScanFinding (Maybe UTCTime)
enhancedImageScanFinding_updatedAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnhancedImageScanFinding' {Maybe POSIX
updatedAt :: Maybe POSIX
$sel:updatedAt:EnhancedImageScanFinding' :: EnhancedImageScanFinding -> Maybe POSIX
updatedAt} -> Maybe POSIX
updatedAt) (\s :: EnhancedImageScanFinding
s@EnhancedImageScanFinding' {} Maybe POSIX
a -> EnhancedImageScanFinding
s {$sel:updatedAt:EnhancedImageScanFinding' :: Maybe POSIX
updatedAt = Maybe POSIX
a} :: EnhancedImageScanFinding) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

instance Data.FromJSON EnhancedImageScanFinding where
  parseJSON :: Value -> Parser EnhancedImageScanFinding
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"EnhancedImageScanFinding"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe PackageVulnerabilityDetails
-> Maybe Remediation
-> Maybe [Resource]
-> Maybe Double
-> Maybe ScoreDetails
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> EnhancedImageScanFinding
EnhancedImageScanFinding'
            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
"awsAccountId")
            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
"description")
            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
"findingArn")
            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
"firstObservedAt")
            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
"lastObservedAt")
            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
"packageVulnerabilityDetails")
            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
"remediation")
            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
"resources" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            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
"score")
            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
"scoreDetails")
            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
"severity")
            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
"status")
            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
"title")
            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
"type")
            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
"updatedAt")
      )

instance Prelude.Hashable EnhancedImageScanFinding where
  hashWithSalt :: Int -> EnhancedImageScanFinding -> Int
hashWithSalt Int
_salt EnhancedImageScanFinding' {Maybe Double
Maybe [Resource]
Maybe Text
Maybe POSIX
Maybe Remediation
Maybe ScoreDetails
Maybe PackageVulnerabilityDetails
updatedAt :: Maybe POSIX
type' :: Maybe Text
title :: Maybe Text
status :: Maybe Text
severity :: Maybe Text
scoreDetails :: Maybe ScoreDetails
score :: Maybe Double
resources :: Maybe [Resource]
remediation :: Maybe Remediation
packageVulnerabilityDetails :: Maybe PackageVulnerabilityDetails
lastObservedAt :: Maybe POSIX
firstObservedAt :: Maybe POSIX
findingArn :: Maybe Text
description :: Maybe Text
awsAccountId :: Maybe Text
$sel:updatedAt:EnhancedImageScanFinding' :: EnhancedImageScanFinding -> Maybe POSIX
$sel:type':EnhancedImageScanFinding' :: EnhancedImageScanFinding -> Maybe Text
$sel:title:EnhancedImageScanFinding' :: EnhancedImageScanFinding -> Maybe Text
$sel:status:EnhancedImageScanFinding' :: EnhancedImageScanFinding -> Maybe Text
$sel:severity:EnhancedImageScanFinding' :: EnhancedImageScanFinding -> Maybe Text
$sel:scoreDetails:EnhancedImageScanFinding' :: EnhancedImageScanFinding -> Maybe ScoreDetails
$sel:score:EnhancedImageScanFinding' :: EnhancedImageScanFinding -> Maybe Double
$sel:resources:EnhancedImageScanFinding' :: EnhancedImageScanFinding -> Maybe [Resource]
$sel:remediation:EnhancedImageScanFinding' :: EnhancedImageScanFinding -> Maybe Remediation
$sel:packageVulnerabilityDetails:EnhancedImageScanFinding' :: EnhancedImageScanFinding -> Maybe PackageVulnerabilityDetails
$sel:lastObservedAt:EnhancedImageScanFinding' :: EnhancedImageScanFinding -> Maybe POSIX
$sel:firstObservedAt:EnhancedImageScanFinding' :: EnhancedImageScanFinding -> Maybe POSIX
$sel:findingArn:EnhancedImageScanFinding' :: EnhancedImageScanFinding -> Maybe Text
$sel:description:EnhancedImageScanFinding' :: EnhancedImageScanFinding -> Maybe Text
$sel:awsAccountId:EnhancedImageScanFinding' :: EnhancedImageScanFinding -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
awsAccountId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
findingArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
firstObservedAt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastObservedAt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe PackageVulnerabilityDetails
packageVulnerabilityDetails
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Remediation
remediation
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Resource]
resources
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
score
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ScoreDetails
scoreDetails
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
severity
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
status
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
title
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
type'
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
updatedAt

instance Prelude.NFData EnhancedImageScanFinding where
  rnf :: EnhancedImageScanFinding -> ()
rnf EnhancedImageScanFinding' {Maybe Double
Maybe [Resource]
Maybe Text
Maybe POSIX
Maybe Remediation
Maybe ScoreDetails
Maybe PackageVulnerabilityDetails
updatedAt :: Maybe POSIX
type' :: Maybe Text
title :: Maybe Text
status :: Maybe Text
severity :: Maybe Text
scoreDetails :: Maybe ScoreDetails
score :: Maybe Double
resources :: Maybe [Resource]
remediation :: Maybe Remediation
packageVulnerabilityDetails :: Maybe PackageVulnerabilityDetails
lastObservedAt :: Maybe POSIX
firstObservedAt :: Maybe POSIX
findingArn :: Maybe Text
description :: Maybe Text
awsAccountId :: Maybe Text
$sel:updatedAt:EnhancedImageScanFinding' :: EnhancedImageScanFinding -> Maybe POSIX
$sel:type':EnhancedImageScanFinding' :: EnhancedImageScanFinding -> Maybe Text
$sel:title:EnhancedImageScanFinding' :: EnhancedImageScanFinding -> Maybe Text
$sel:status:EnhancedImageScanFinding' :: EnhancedImageScanFinding -> Maybe Text
$sel:severity:EnhancedImageScanFinding' :: EnhancedImageScanFinding -> Maybe Text
$sel:scoreDetails:EnhancedImageScanFinding' :: EnhancedImageScanFinding -> Maybe ScoreDetails
$sel:score:EnhancedImageScanFinding' :: EnhancedImageScanFinding -> Maybe Double
$sel:resources:EnhancedImageScanFinding' :: EnhancedImageScanFinding -> Maybe [Resource]
$sel:remediation:EnhancedImageScanFinding' :: EnhancedImageScanFinding -> Maybe Remediation
$sel:packageVulnerabilityDetails:EnhancedImageScanFinding' :: EnhancedImageScanFinding -> Maybe PackageVulnerabilityDetails
$sel:lastObservedAt:EnhancedImageScanFinding' :: EnhancedImageScanFinding -> Maybe POSIX
$sel:firstObservedAt:EnhancedImageScanFinding' :: EnhancedImageScanFinding -> Maybe POSIX
$sel:findingArn:EnhancedImageScanFinding' :: EnhancedImageScanFinding -> Maybe Text
$sel:description:EnhancedImageScanFinding' :: EnhancedImageScanFinding -> Maybe Text
$sel:awsAccountId:EnhancedImageScanFinding' :: EnhancedImageScanFinding -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
awsAccountId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
findingArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
firstObservedAt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastObservedAt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe PackageVulnerabilityDetails
packageVulnerabilityDetails
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Remediation
remediation
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Resource]
resources
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
score
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ScoreDetails
scoreDetails
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
severity
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
status
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
title
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
type'
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
updatedAt