{-# 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.Inspector.Types.Finding
-- 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.Inspector.Types.Finding where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Inspector.Types.AssetAttributes
import Amazonka.Inspector.Types.AssetType
import Amazonka.Inspector.Types.Attribute
import Amazonka.Inspector.Types.InspectorServiceAttributes
import Amazonka.Inspector.Types.Severity
import qualified Amazonka.Prelude as Prelude

-- | Contains information about an Amazon Inspector finding. This data type
-- is used as the response element in the DescribeFindings action.
--
-- /See:/ 'newFinding' smart constructor.
data Finding = Finding'
  { -- | A collection of attributes of the host from which the finding is
    -- generated.
    Finding -> Maybe AssetAttributes
assetAttributes :: Prelude.Maybe AssetAttributes,
    -- | The type of the host from which the finding is generated.
    Finding -> Maybe AssetType
assetType :: Prelude.Maybe AssetType,
    -- | This data element is currently not used.
    Finding -> Maybe Natural
confidence :: Prelude.Maybe Prelude.Natural,
    -- | The description of the finding.
    Finding -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The ID of the finding.
    Finding -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | This data element is currently not used.
    Finding -> Maybe Bool
indicatorOfCompromise :: Prelude.Maybe Prelude.Bool,
    -- | The numeric value of the finding severity.
    Finding -> Maybe Double
numericSeverity :: Prelude.Maybe Prelude.Double,
    -- | The recommendation for the finding.
    Finding -> Maybe Text
recommendation :: Prelude.Maybe Prelude.Text,
    -- | The schema version of this data type.
    Finding -> Maybe Natural
schemaVersion :: Prelude.Maybe Prelude.Natural,
    -- | The data element is set to \"Inspector\".
    Finding -> Maybe Text
service :: Prelude.Maybe Prelude.Text,
    -- | This data type is used in the Finding data type.
    Finding -> Maybe InspectorServiceAttributes
serviceAttributes :: Prelude.Maybe InspectorServiceAttributes,
    -- | The finding severity. Values can be set to High, Medium, Low, and
    -- Informational.
    Finding -> Maybe Severity
severity :: Prelude.Maybe Severity,
    -- | The name of the finding.
    Finding -> Maybe Text
title :: Prelude.Maybe Prelude.Text,
    -- | The ARN that specifies the finding.
    Finding -> Text
arn :: Prelude.Text,
    -- | The system-defined attributes for the finding.
    Finding -> [Attribute]
attributes :: [Attribute],
    -- | The user-defined attributes that are assigned to the finding.
    Finding -> [Attribute]
userAttributes :: [Attribute],
    -- | The time when the finding was generated.
    Finding -> POSIX
createdAt :: Data.POSIX,
    -- | The time when AddAttributesToFindings is called.
    Finding -> POSIX
updatedAt :: Data.POSIX
  }
  deriving (Finding -> Finding -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Finding -> Finding -> Bool
$c/= :: Finding -> Finding -> Bool
== :: Finding -> Finding -> Bool
$c== :: Finding -> Finding -> Bool
Prelude.Eq, ReadPrec [Finding]
ReadPrec Finding
Int -> ReadS Finding
ReadS [Finding]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Finding]
$creadListPrec :: ReadPrec [Finding]
readPrec :: ReadPrec Finding
$creadPrec :: ReadPrec Finding
readList :: ReadS [Finding]
$creadList :: ReadS [Finding]
readsPrec :: Int -> ReadS Finding
$creadsPrec :: Int -> ReadS Finding
Prelude.Read, Int -> Finding -> ShowS
[Finding] -> ShowS
Finding -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Finding] -> ShowS
$cshowList :: [Finding] -> ShowS
show :: Finding -> String
$cshow :: Finding -> String
showsPrec :: Int -> Finding -> ShowS
$cshowsPrec :: Int -> Finding -> ShowS
Prelude.Show, forall x. Rep Finding x -> Finding
forall x. Finding -> Rep Finding x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Finding x -> Finding
$cfrom :: forall x. Finding -> Rep Finding x
Prelude.Generic)

-- |
-- Create a value of 'Finding' 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:
--
-- 'assetAttributes', 'finding_assetAttributes' - A collection of attributes of the host from which the finding is
-- generated.
--
-- 'assetType', 'finding_assetType' - The type of the host from which the finding is generated.
--
-- 'confidence', 'finding_confidence' - This data element is currently not used.
--
-- 'description', 'finding_description' - The description of the finding.
--
-- 'id', 'finding_id' - The ID of the finding.
--
-- 'indicatorOfCompromise', 'finding_indicatorOfCompromise' - This data element is currently not used.
--
-- 'numericSeverity', 'finding_numericSeverity' - The numeric value of the finding severity.
--
-- 'recommendation', 'finding_recommendation' - The recommendation for the finding.
--
-- 'schemaVersion', 'finding_schemaVersion' - The schema version of this data type.
--
-- 'service', 'finding_service' - The data element is set to \"Inspector\".
--
-- 'serviceAttributes', 'finding_serviceAttributes' - This data type is used in the Finding data type.
--
-- 'severity', 'finding_severity' - The finding severity. Values can be set to High, Medium, Low, and
-- Informational.
--
-- 'title', 'finding_title' - The name of the finding.
--
-- 'arn', 'finding_arn' - The ARN that specifies the finding.
--
-- 'attributes', 'finding_attributes' - The system-defined attributes for the finding.
--
-- 'userAttributes', 'finding_userAttributes' - The user-defined attributes that are assigned to the finding.
--
-- 'createdAt', 'finding_createdAt' - The time when the finding was generated.
--
-- 'updatedAt', 'finding_updatedAt' - The time when AddAttributesToFindings is called.
newFinding ::
  -- | 'arn'
  Prelude.Text ->
  -- | 'createdAt'
  Prelude.UTCTime ->
  -- | 'updatedAt'
  Prelude.UTCTime ->
  Finding
newFinding :: Text -> UTCTime -> UTCTime -> Finding
newFinding Text
pArn_ UTCTime
pCreatedAt_ UTCTime
pUpdatedAt_ =
  Finding'
    { $sel:assetAttributes:Finding' :: Maybe AssetAttributes
assetAttributes = forall a. Maybe a
Prelude.Nothing,
      $sel:assetType:Finding' :: Maybe AssetType
assetType = forall a. Maybe a
Prelude.Nothing,
      $sel:confidence:Finding' :: Maybe Natural
confidence = forall a. Maybe a
Prelude.Nothing,
      $sel:description:Finding' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:id:Finding' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
      $sel:indicatorOfCompromise:Finding' :: Maybe Bool
indicatorOfCompromise = forall a. Maybe a
Prelude.Nothing,
      $sel:numericSeverity:Finding' :: Maybe Double
numericSeverity = forall a. Maybe a
Prelude.Nothing,
      $sel:recommendation:Finding' :: Maybe Text
recommendation = forall a. Maybe a
Prelude.Nothing,
      $sel:schemaVersion:Finding' :: Maybe Natural
schemaVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:service:Finding' :: Maybe Text
service = forall a. Maybe a
Prelude.Nothing,
      $sel:serviceAttributes:Finding' :: Maybe InspectorServiceAttributes
serviceAttributes = forall a. Maybe a
Prelude.Nothing,
      $sel:severity:Finding' :: Maybe Severity
severity = forall a. Maybe a
Prelude.Nothing,
      $sel:title:Finding' :: Maybe Text
title = forall a. Maybe a
Prelude.Nothing,
      $sel:arn:Finding' :: Text
arn = Text
pArn_,
      $sel:attributes:Finding' :: [Attribute]
attributes = forall a. Monoid a => a
Prelude.mempty,
      $sel:userAttributes:Finding' :: [Attribute]
userAttributes = forall a. Monoid a => a
Prelude.mempty,
      $sel:createdAt:Finding' :: POSIX
createdAt = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreatedAt_,
      $sel:updatedAt:Finding' :: POSIX
updatedAt = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pUpdatedAt_
    }

-- | A collection of attributes of the host from which the finding is
-- generated.
finding_assetAttributes :: Lens.Lens' Finding (Prelude.Maybe AssetAttributes)
finding_assetAttributes :: Lens' Finding (Maybe AssetAttributes)
finding_assetAttributes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Finding' {Maybe AssetAttributes
assetAttributes :: Maybe AssetAttributes
$sel:assetAttributes:Finding' :: Finding -> Maybe AssetAttributes
assetAttributes} -> Maybe AssetAttributes
assetAttributes) (\s :: Finding
s@Finding' {} Maybe AssetAttributes
a -> Finding
s {$sel:assetAttributes:Finding' :: Maybe AssetAttributes
assetAttributes = Maybe AssetAttributes
a} :: Finding)

-- | The type of the host from which the finding is generated.
finding_assetType :: Lens.Lens' Finding (Prelude.Maybe AssetType)
finding_assetType :: Lens' Finding (Maybe AssetType)
finding_assetType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Finding' {Maybe AssetType
assetType :: Maybe AssetType
$sel:assetType:Finding' :: Finding -> Maybe AssetType
assetType} -> Maybe AssetType
assetType) (\s :: Finding
s@Finding' {} Maybe AssetType
a -> Finding
s {$sel:assetType:Finding' :: Maybe AssetType
assetType = Maybe AssetType
a} :: Finding)

-- | This data element is currently not used.
finding_confidence :: Lens.Lens' Finding (Prelude.Maybe Prelude.Natural)
finding_confidence :: Lens' Finding (Maybe Natural)
finding_confidence = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Finding' {Maybe Natural
confidence :: Maybe Natural
$sel:confidence:Finding' :: Finding -> Maybe Natural
confidence} -> Maybe Natural
confidence) (\s :: Finding
s@Finding' {} Maybe Natural
a -> Finding
s {$sel:confidence:Finding' :: Maybe Natural
confidence = Maybe Natural
a} :: Finding)

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

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

-- | This data element is currently not used.
finding_indicatorOfCompromise :: Lens.Lens' Finding (Prelude.Maybe Prelude.Bool)
finding_indicatorOfCompromise :: Lens' Finding (Maybe Bool)
finding_indicatorOfCompromise = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Finding' {Maybe Bool
indicatorOfCompromise :: Maybe Bool
$sel:indicatorOfCompromise:Finding' :: Finding -> Maybe Bool
indicatorOfCompromise} -> Maybe Bool
indicatorOfCompromise) (\s :: Finding
s@Finding' {} Maybe Bool
a -> Finding
s {$sel:indicatorOfCompromise:Finding' :: Maybe Bool
indicatorOfCompromise = Maybe Bool
a} :: Finding)

-- | The numeric value of the finding severity.
finding_numericSeverity :: Lens.Lens' Finding (Prelude.Maybe Prelude.Double)
finding_numericSeverity :: Lens' Finding (Maybe Double)
finding_numericSeverity = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Finding' {Maybe Double
numericSeverity :: Maybe Double
$sel:numericSeverity:Finding' :: Finding -> Maybe Double
numericSeverity} -> Maybe Double
numericSeverity) (\s :: Finding
s@Finding' {} Maybe Double
a -> Finding
s {$sel:numericSeverity:Finding' :: Maybe Double
numericSeverity = Maybe Double
a} :: Finding)

-- | The recommendation for the finding.
finding_recommendation :: Lens.Lens' Finding (Prelude.Maybe Prelude.Text)
finding_recommendation :: Lens' Finding (Maybe Text)
finding_recommendation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Finding' {Maybe Text
recommendation :: Maybe Text
$sel:recommendation:Finding' :: Finding -> Maybe Text
recommendation} -> Maybe Text
recommendation) (\s :: Finding
s@Finding' {} Maybe Text
a -> Finding
s {$sel:recommendation:Finding' :: Maybe Text
recommendation = Maybe Text
a} :: Finding)

-- | The schema version of this data type.
finding_schemaVersion :: Lens.Lens' Finding (Prelude.Maybe Prelude.Natural)
finding_schemaVersion :: Lens' Finding (Maybe Natural)
finding_schemaVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Finding' {Maybe Natural
schemaVersion :: Maybe Natural
$sel:schemaVersion:Finding' :: Finding -> Maybe Natural
schemaVersion} -> Maybe Natural
schemaVersion) (\s :: Finding
s@Finding' {} Maybe Natural
a -> Finding
s {$sel:schemaVersion:Finding' :: Maybe Natural
schemaVersion = Maybe Natural
a} :: Finding)

-- | The data element is set to \"Inspector\".
finding_service :: Lens.Lens' Finding (Prelude.Maybe Prelude.Text)
finding_service :: Lens' Finding (Maybe Text)
finding_service = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Finding' {Maybe Text
service :: Maybe Text
$sel:service:Finding' :: Finding -> Maybe Text
service} -> Maybe Text
service) (\s :: Finding
s@Finding' {} Maybe Text
a -> Finding
s {$sel:service:Finding' :: Maybe Text
service = Maybe Text
a} :: Finding)

-- | This data type is used in the Finding data type.
finding_serviceAttributes :: Lens.Lens' Finding (Prelude.Maybe InspectorServiceAttributes)
finding_serviceAttributes :: Lens' Finding (Maybe InspectorServiceAttributes)
finding_serviceAttributes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Finding' {Maybe InspectorServiceAttributes
serviceAttributes :: Maybe InspectorServiceAttributes
$sel:serviceAttributes:Finding' :: Finding -> Maybe InspectorServiceAttributes
serviceAttributes} -> Maybe InspectorServiceAttributes
serviceAttributes) (\s :: Finding
s@Finding' {} Maybe InspectorServiceAttributes
a -> Finding
s {$sel:serviceAttributes:Finding' :: Maybe InspectorServiceAttributes
serviceAttributes = Maybe InspectorServiceAttributes
a} :: Finding)

-- | The finding severity. Values can be set to High, Medium, Low, and
-- Informational.
finding_severity :: Lens.Lens' Finding (Prelude.Maybe Severity)
finding_severity :: Lens' Finding (Maybe Severity)
finding_severity = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Finding' {Maybe Severity
severity :: Maybe Severity
$sel:severity:Finding' :: Finding -> Maybe Severity
severity} -> Maybe Severity
severity) (\s :: Finding
s@Finding' {} Maybe Severity
a -> Finding
s {$sel:severity:Finding' :: Maybe Severity
severity = Maybe Severity
a} :: Finding)

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

-- | The ARN that specifies the finding.
finding_arn :: Lens.Lens' Finding Prelude.Text
finding_arn :: Lens' Finding Text
finding_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Finding' {Text
arn :: Text
$sel:arn:Finding' :: Finding -> Text
arn} -> Text
arn) (\s :: Finding
s@Finding' {} Text
a -> Finding
s {$sel:arn:Finding' :: Text
arn = Text
a} :: Finding)

-- | The system-defined attributes for the finding.
finding_attributes :: Lens.Lens' Finding [Attribute]
finding_attributes :: Lens' Finding [Attribute]
finding_attributes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Finding' {[Attribute]
attributes :: [Attribute]
$sel:attributes:Finding' :: Finding -> [Attribute]
attributes} -> [Attribute]
attributes) (\s :: Finding
s@Finding' {} [Attribute]
a -> Finding
s {$sel:attributes:Finding' :: [Attribute]
attributes = [Attribute]
a} :: Finding) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The user-defined attributes that are assigned to the finding.
finding_userAttributes :: Lens.Lens' Finding [Attribute]
finding_userAttributes :: Lens' Finding [Attribute]
finding_userAttributes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Finding' {[Attribute]
userAttributes :: [Attribute]
$sel:userAttributes:Finding' :: Finding -> [Attribute]
userAttributes} -> [Attribute]
userAttributes) (\s :: Finding
s@Finding' {} [Attribute]
a -> Finding
s {$sel:userAttributes:Finding' :: [Attribute]
userAttributes = [Attribute]
a} :: Finding) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The time when the finding was generated.
finding_createdAt :: Lens.Lens' Finding Prelude.UTCTime
finding_createdAt :: Lens' Finding UTCTime
finding_createdAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Finding' {POSIX
createdAt :: POSIX
$sel:createdAt:Finding' :: Finding -> POSIX
createdAt} -> POSIX
createdAt) (\s :: Finding
s@Finding' {} POSIX
a -> Finding
s {$sel:createdAt:Finding' :: POSIX
createdAt = POSIX
a} :: Finding) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The time when AddAttributesToFindings is called.
finding_updatedAt :: Lens.Lens' Finding Prelude.UTCTime
finding_updatedAt :: Lens' Finding UTCTime
finding_updatedAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Finding' {POSIX
updatedAt :: POSIX
$sel:updatedAt:Finding' :: Finding -> POSIX
updatedAt} -> POSIX
updatedAt) (\s :: Finding
s@Finding' {} POSIX
a -> Finding
s {$sel:updatedAt:Finding' :: POSIX
updatedAt = POSIX
a} :: Finding) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

instance Data.FromJSON Finding where
  parseJSON :: Value -> Parser Finding
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"Finding"
      ( \Object
x ->
          Maybe AssetAttributes
-> Maybe AssetType
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Double
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe InspectorServiceAttributes
-> Maybe Severity
-> Maybe Text
-> Text
-> [Attribute]
-> [Attribute]
-> POSIX
-> POSIX
-> Finding
Finding'
            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
"assetAttributes")
            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
"assetType")
            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
"confidence")
            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
"id")
            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
"indicatorOfCompromise")
            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
"numericSeverity")
            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
"recommendation")
            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
"schemaVersion")
            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
"service")
            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
"serviceAttributes")
            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
"title")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"arn")
            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
"attributes" 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
"userAttributes" 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 a
Data..: Key
"createdAt")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"updatedAt")
      )

instance Prelude.Hashable Finding where
  hashWithSalt :: Int -> Finding -> Int
hashWithSalt Int
_salt Finding' {[Attribute]
Maybe Bool
Maybe Double
Maybe Natural
Maybe Text
Maybe AssetType
Maybe InspectorServiceAttributes
Maybe Severity
Maybe AssetAttributes
Text
POSIX
updatedAt :: POSIX
createdAt :: POSIX
userAttributes :: [Attribute]
attributes :: [Attribute]
arn :: Text
title :: Maybe Text
severity :: Maybe Severity
serviceAttributes :: Maybe InspectorServiceAttributes
service :: Maybe Text
schemaVersion :: Maybe Natural
recommendation :: Maybe Text
numericSeverity :: Maybe Double
indicatorOfCompromise :: Maybe Bool
id :: Maybe Text
description :: Maybe Text
confidence :: Maybe Natural
assetType :: Maybe AssetType
assetAttributes :: Maybe AssetAttributes
$sel:updatedAt:Finding' :: Finding -> POSIX
$sel:createdAt:Finding' :: Finding -> POSIX
$sel:userAttributes:Finding' :: Finding -> [Attribute]
$sel:attributes:Finding' :: Finding -> [Attribute]
$sel:arn:Finding' :: Finding -> Text
$sel:title:Finding' :: Finding -> Maybe Text
$sel:severity:Finding' :: Finding -> Maybe Severity
$sel:serviceAttributes:Finding' :: Finding -> Maybe InspectorServiceAttributes
$sel:service:Finding' :: Finding -> Maybe Text
$sel:schemaVersion:Finding' :: Finding -> Maybe Natural
$sel:recommendation:Finding' :: Finding -> Maybe Text
$sel:numericSeverity:Finding' :: Finding -> Maybe Double
$sel:indicatorOfCompromise:Finding' :: Finding -> Maybe Bool
$sel:id:Finding' :: Finding -> Maybe Text
$sel:description:Finding' :: Finding -> Maybe Text
$sel:confidence:Finding' :: Finding -> Maybe Natural
$sel:assetType:Finding' :: Finding -> Maybe AssetType
$sel:assetAttributes:Finding' :: Finding -> Maybe AssetAttributes
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AssetAttributes
assetAttributes
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AssetType
assetType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
confidence
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
id
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
indicatorOfCompromise
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
numericSeverity
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
recommendation
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
schemaVersion
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
service
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe InspectorServiceAttributes
serviceAttributes
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Severity
severity
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
title
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
arn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [Attribute]
attributes
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [Attribute]
userAttributes
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
createdAt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
updatedAt

instance Prelude.NFData Finding where
  rnf :: Finding -> ()
rnf Finding' {[Attribute]
Maybe Bool
Maybe Double
Maybe Natural
Maybe Text
Maybe AssetType
Maybe InspectorServiceAttributes
Maybe Severity
Maybe AssetAttributes
Text
POSIX
updatedAt :: POSIX
createdAt :: POSIX
userAttributes :: [Attribute]
attributes :: [Attribute]
arn :: Text
title :: Maybe Text
severity :: Maybe Severity
serviceAttributes :: Maybe InspectorServiceAttributes
service :: Maybe Text
schemaVersion :: Maybe Natural
recommendation :: Maybe Text
numericSeverity :: Maybe Double
indicatorOfCompromise :: Maybe Bool
id :: Maybe Text
description :: Maybe Text
confidence :: Maybe Natural
assetType :: Maybe AssetType
assetAttributes :: Maybe AssetAttributes
$sel:updatedAt:Finding' :: Finding -> POSIX
$sel:createdAt:Finding' :: Finding -> POSIX
$sel:userAttributes:Finding' :: Finding -> [Attribute]
$sel:attributes:Finding' :: Finding -> [Attribute]
$sel:arn:Finding' :: Finding -> Text
$sel:title:Finding' :: Finding -> Maybe Text
$sel:severity:Finding' :: Finding -> Maybe Severity
$sel:serviceAttributes:Finding' :: Finding -> Maybe InspectorServiceAttributes
$sel:service:Finding' :: Finding -> Maybe Text
$sel:schemaVersion:Finding' :: Finding -> Maybe Natural
$sel:recommendation:Finding' :: Finding -> Maybe Text
$sel:numericSeverity:Finding' :: Finding -> Maybe Double
$sel:indicatorOfCompromise:Finding' :: Finding -> Maybe Bool
$sel:id:Finding' :: Finding -> Maybe Text
$sel:description:Finding' :: Finding -> Maybe Text
$sel:confidence:Finding' :: Finding -> Maybe Natural
$sel:assetType:Finding' :: Finding -> Maybe AssetType
$sel:assetAttributes:Finding' :: Finding -> Maybe AssetAttributes
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe AssetAttributes
assetAttributes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AssetType
assetType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
confidence
      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
id
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
indicatorOfCompromise
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
numericSeverity
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
recommendation
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
schemaVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
service
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe InspectorServiceAttributes
serviceAttributes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Severity
severity
      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 Text
arn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [Attribute]
attributes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [Attribute]
userAttributes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
createdAt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
updatedAt