{-# 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.AuditManager.Types.Evidence
-- 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.AuditManager.Types.Evidence where

import Amazonka.AuditManager.Types.Resource
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude

-- | A record that contains the information needed to demonstrate compliance
-- with the requirements specified by a control. Examples of evidence
-- include change activity invoked by a user, or a system configuration
-- snapshot.
--
-- /See:/ 'newEvidence' smart constructor.
data Evidence = Evidence'
  { -- | Specifies whether the evidence is included in the assessment report.
    Evidence -> Maybe Text
assessmentReportSelection :: Prelude.Maybe Prelude.Text,
    -- | The names and values that are used by the evidence event. This includes
    -- an attribute name (such as @allowUsersToChangePassword@) and value (such
    -- as @true@ or @false@).
    Evidence -> Maybe (HashMap Text Text)
attributes :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The identifier for the Amazon Web Services account.
    Evidence -> Maybe Text
awsAccountId :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Web Services account that the evidence is collected from, and
    -- its organization path.
    Evidence -> Maybe Text
awsOrganization :: Prelude.Maybe Prelude.Text,
    -- | The evaluation status for automated evidence that falls under the
    -- compliance check category.
    --
    -- -   Audit Manager classes evidence as non-compliant if Security Hub
    --     reports a /Fail/ result, or if Config reports a /Non-compliant/
    --     result.
    --
    -- -   Audit Manager classes evidence as compliant if Security Hub reports
    --     a /Pass/ result, or if Config reports a /Compliant/ result.
    --
    -- -   If a compliance check isn\'t available or applicable, then no
    --     compliance evaluation can be made for that evidence. This is the
    --     case if the evidence uses Config or Security Hub as the underlying
    --     data source type, but those services aren\'t enabled. This is also
    --     the case if the evidence uses an underlying data source type that
    --     doesn\'t support compliance checks (such as manual evidence, Amazon
    --     Web Services API calls, or CloudTrail).
    Evidence -> Maybe Text
complianceCheck :: Prelude.Maybe Prelude.Text,
    -- | The data source where the evidence was collected from.
    Evidence -> Maybe Text
dataSource :: Prelude.Maybe Prelude.Text,
    -- | The name of the evidence event.
    Evidence -> Maybe Text
eventName :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Web Service that the evidence is collected from.
    Evidence -> Maybe Text
eventSource :: Prelude.Maybe Prelude.Text,
    -- | The identifier for the Amazon Web Services account.
    Evidence -> Maybe Text
evidenceAwsAccountId :: Prelude.Maybe Prelude.Text,
    -- | The type of automated evidence.
    Evidence -> Maybe Text
evidenceByType :: Prelude.Maybe Prelude.Text,
    -- | The identifier for the folder that the evidence is stored in.
    Evidence -> Maybe Text
evidenceFolderId :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier for the IAM user or role that\'s associated with
    -- the evidence.
    Evidence -> Maybe Text
iamId :: Prelude.Maybe Prelude.Text,
    -- | The identifier for the evidence.
    Evidence -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The list of resources that are assessed to generate the evidence.
    Evidence -> Maybe [Resource]
resourcesIncluded :: Prelude.Maybe [Resource],
    -- | The timestamp that represents when the evidence was collected.
    Evidence -> Maybe POSIX
time :: Prelude.Maybe Data.POSIX
  }
  deriving (Evidence -> Evidence -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Evidence -> Evidence -> Bool
$c/= :: Evidence -> Evidence -> Bool
== :: Evidence -> Evidence -> Bool
$c== :: Evidence -> Evidence -> Bool
Prelude.Eq, ReadPrec [Evidence]
ReadPrec Evidence
Int -> ReadS Evidence
ReadS [Evidence]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Evidence]
$creadListPrec :: ReadPrec [Evidence]
readPrec :: ReadPrec Evidence
$creadPrec :: ReadPrec Evidence
readList :: ReadS [Evidence]
$creadList :: ReadS [Evidence]
readsPrec :: Int -> ReadS Evidence
$creadsPrec :: Int -> ReadS Evidence
Prelude.Read, Int -> Evidence -> ShowS
[Evidence] -> ShowS
Evidence -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Evidence] -> ShowS
$cshowList :: [Evidence] -> ShowS
show :: Evidence -> String
$cshow :: Evidence -> String
showsPrec :: Int -> Evidence -> ShowS
$cshowsPrec :: Int -> Evidence -> ShowS
Prelude.Show, forall x. Rep Evidence x -> Evidence
forall x. Evidence -> Rep Evidence x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Evidence x -> Evidence
$cfrom :: forall x. Evidence -> Rep Evidence x
Prelude.Generic)

-- |
-- Create a value of 'Evidence' 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:
--
-- 'assessmentReportSelection', 'evidence_assessmentReportSelection' - Specifies whether the evidence is included in the assessment report.
--
-- 'attributes', 'evidence_attributes' - The names and values that are used by the evidence event. This includes
-- an attribute name (such as @allowUsersToChangePassword@) and value (such
-- as @true@ or @false@).
--
-- 'awsAccountId', 'evidence_awsAccountId' - The identifier for the Amazon Web Services account.
--
-- 'awsOrganization', 'evidence_awsOrganization' - The Amazon Web Services account that the evidence is collected from, and
-- its organization path.
--
-- 'complianceCheck', 'evidence_complianceCheck' - The evaluation status for automated evidence that falls under the
-- compliance check category.
--
-- -   Audit Manager classes evidence as non-compliant if Security Hub
--     reports a /Fail/ result, or if Config reports a /Non-compliant/
--     result.
--
-- -   Audit Manager classes evidence as compliant if Security Hub reports
--     a /Pass/ result, or if Config reports a /Compliant/ result.
--
-- -   If a compliance check isn\'t available or applicable, then no
--     compliance evaluation can be made for that evidence. This is the
--     case if the evidence uses Config or Security Hub as the underlying
--     data source type, but those services aren\'t enabled. This is also
--     the case if the evidence uses an underlying data source type that
--     doesn\'t support compliance checks (such as manual evidence, Amazon
--     Web Services API calls, or CloudTrail).
--
-- 'dataSource', 'evidence_dataSource' - The data source where the evidence was collected from.
--
-- 'eventName', 'evidence_eventName' - The name of the evidence event.
--
-- 'eventSource', 'evidence_eventSource' - The Amazon Web Service that the evidence is collected from.
--
-- 'evidenceAwsAccountId', 'evidence_evidenceAwsAccountId' - The identifier for the Amazon Web Services account.
--
-- 'evidenceByType', 'evidence_evidenceByType' - The type of automated evidence.
--
-- 'evidenceFolderId', 'evidence_evidenceFolderId' - The identifier for the folder that the evidence is stored in.
--
-- 'iamId', 'evidence_iamId' - The unique identifier for the IAM user or role that\'s associated with
-- the evidence.
--
-- 'id', 'evidence_id' - The identifier for the evidence.
--
-- 'resourcesIncluded', 'evidence_resourcesIncluded' - The list of resources that are assessed to generate the evidence.
--
-- 'time', 'evidence_time' - The timestamp that represents when the evidence was collected.
newEvidence ::
  Evidence
newEvidence :: Evidence
newEvidence =
  Evidence'
    { $sel:assessmentReportSelection:Evidence' :: Maybe Text
assessmentReportSelection =
        forall a. Maybe a
Prelude.Nothing,
      $sel:attributes:Evidence' :: Maybe (HashMap Text Text)
attributes = forall a. Maybe a
Prelude.Nothing,
      $sel:awsAccountId:Evidence' :: Maybe Text
awsAccountId = forall a. Maybe a
Prelude.Nothing,
      $sel:awsOrganization:Evidence' :: Maybe Text
awsOrganization = forall a. Maybe a
Prelude.Nothing,
      $sel:complianceCheck:Evidence' :: Maybe Text
complianceCheck = forall a. Maybe a
Prelude.Nothing,
      $sel:dataSource:Evidence' :: Maybe Text
dataSource = forall a. Maybe a
Prelude.Nothing,
      $sel:eventName:Evidence' :: Maybe Text
eventName = forall a. Maybe a
Prelude.Nothing,
      $sel:eventSource:Evidence' :: Maybe Text
eventSource = forall a. Maybe a
Prelude.Nothing,
      $sel:evidenceAwsAccountId:Evidence' :: Maybe Text
evidenceAwsAccountId = forall a. Maybe a
Prelude.Nothing,
      $sel:evidenceByType:Evidence' :: Maybe Text
evidenceByType = forall a. Maybe a
Prelude.Nothing,
      $sel:evidenceFolderId:Evidence' :: Maybe Text
evidenceFolderId = forall a. Maybe a
Prelude.Nothing,
      $sel:iamId:Evidence' :: Maybe Text
iamId = forall a. Maybe a
Prelude.Nothing,
      $sel:id:Evidence' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
      $sel:resourcesIncluded:Evidence' :: Maybe [Resource]
resourcesIncluded = forall a. Maybe a
Prelude.Nothing,
      $sel:time:Evidence' :: Maybe POSIX
time = forall a. Maybe a
Prelude.Nothing
    }

-- | Specifies whether the evidence is included in the assessment report.
evidence_assessmentReportSelection :: Lens.Lens' Evidence (Prelude.Maybe Prelude.Text)
evidence_assessmentReportSelection :: Lens' Evidence (Maybe Text)
evidence_assessmentReportSelection = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Evidence' {Maybe Text
assessmentReportSelection :: Maybe Text
$sel:assessmentReportSelection:Evidence' :: Evidence -> Maybe Text
assessmentReportSelection} -> Maybe Text
assessmentReportSelection) (\s :: Evidence
s@Evidence' {} Maybe Text
a -> Evidence
s {$sel:assessmentReportSelection:Evidence' :: Maybe Text
assessmentReportSelection = Maybe Text
a} :: Evidence)

-- | The names and values that are used by the evidence event. This includes
-- an attribute name (such as @allowUsersToChangePassword@) and value (such
-- as @true@ or @false@).
evidence_attributes :: Lens.Lens' Evidence (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
evidence_attributes :: Lens' Evidence (Maybe (HashMap Text Text))
evidence_attributes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Evidence' {Maybe (HashMap Text Text)
attributes :: Maybe (HashMap Text Text)
$sel:attributes:Evidence' :: Evidence -> Maybe (HashMap Text Text)
attributes} -> Maybe (HashMap Text Text)
attributes) (\s :: Evidence
s@Evidence' {} Maybe (HashMap Text Text)
a -> Evidence
s {$sel:attributes:Evidence' :: Maybe (HashMap Text Text)
attributes = Maybe (HashMap Text Text)
a} :: Evidence) 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 identifier for the Amazon Web Services account.
evidence_awsAccountId :: Lens.Lens' Evidence (Prelude.Maybe Prelude.Text)
evidence_awsAccountId :: Lens' Evidence (Maybe Text)
evidence_awsAccountId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Evidence' {Maybe Text
awsAccountId :: Maybe Text
$sel:awsAccountId:Evidence' :: Evidence -> Maybe Text
awsAccountId} -> Maybe Text
awsAccountId) (\s :: Evidence
s@Evidence' {} Maybe Text
a -> Evidence
s {$sel:awsAccountId:Evidence' :: Maybe Text
awsAccountId = Maybe Text
a} :: Evidence)

-- | The Amazon Web Services account that the evidence is collected from, and
-- its organization path.
evidence_awsOrganization :: Lens.Lens' Evidence (Prelude.Maybe Prelude.Text)
evidence_awsOrganization :: Lens' Evidence (Maybe Text)
evidence_awsOrganization = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Evidence' {Maybe Text
awsOrganization :: Maybe Text
$sel:awsOrganization:Evidence' :: Evidence -> Maybe Text
awsOrganization} -> Maybe Text
awsOrganization) (\s :: Evidence
s@Evidence' {} Maybe Text
a -> Evidence
s {$sel:awsOrganization:Evidence' :: Maybe Text
awsOrganization = Maybe Text
a} :: Evidence)

-- | The evaluation status for automated evidence that falls under the
-- compliance check category.
--
-- -   Audit Manager classes evidence as non-compliant if Security Hub
--     reports a /Fail/ result, or if Config reports a /Non-compliant/
--     result.
--
-- -   Audit Manager classes evidence as compliant if Security Hub reports
--     a /Pass/ result, or if Config reports a /Compliant/ result.
--
-- -   If a compliance check isn\'t available or applicable, then no
--     compliance evaluation can be made for that evidence. This is the
--     case if the evidence uses Config or Security Hub as the underlying
--     data source type, but those services aren\'t enabled. This is also
--     the case if the evidence uses an underlying data source type that
--     doesn\'t support compliance checks (such as manual evidence, Amazon
--     Web Services API calls, or CloudTrail).
evidence_complianceCheck :: Lens.Lens' Evidence (Prelude.Maybe Prelude.Text)
evidence_complianceCheck :: Lens' Evidence (Maybe Text)
evidence_complianceCheck = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Evidence' {Maybe Text
complianceCheck :: Maybe Text
$sel:complianceCheck:Evidence' :: Evidence -> Maybe Text
complianceCheck} -> Maybe Text
complianceCheck) (\s :: Evidence
s@Evidence' {} Maybe Text
a -> Evidence
s {$sel:complianceCheck:Evidence' :: Maybe Text
complianceCheck = Maybe Text
a} :: Evidence)

-- | The data source where the evidence was collected from.
evidence_dataSource :: Lens.Lens' Evidence (Prelude.Maybe Prelude.Text)
evidence_dataSource :: Lens' Evidence (Maybe Text)
evidence_dataSource = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Evidence' {Maybe Text
dataSource :: Maybe Text
$sel:dataSource:Evidence' :: Evidence -> Maybe Text
dataSource} -> Maybe Text
dataSource) (\s :: Evidence
s@Evidence' {} Maybe Text
a -> Evidence
s {$sel:dataSource:Evidence' :: Maybe Text
dataSource = Maybe Text
a} :: Evidence)

-- | The name of the evidence event.
evidence_eventName :: Lens.Lens' Evidence (Prelude.Maybe Prelude.Text)
evidence_eventName :: Lens' Evidence (Maybe Text)
evidence_eventName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Evidence' {Maybe Text
eventName :: Maybe Text
$sel:eventName:Evidence' :: Evidence -> Maybe Text
eventName} -> Maybe Text
eventName) (\s :: Evidence
s@Evidence' {} Maybe Text
a -> Evidence
s {$sel:eventName:Evidence' :: Maybe Text
eventName = Maybe Text
a} :: Evidence)

-- | The Amazon Web Service that the evidence is collected from.
evidence_eventSource :: Lens.Lens' Evidence (Prelude.Maybe Prelude.Text)
evidence_eventSource :: Lens' Evidence (Maybe Text)
evidence_eventSource = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Evidence' {Maybe Text
eventSource :: Maybe Text
$sel:eventSource:Evidence' :: Evidence -> Maybe Text
eventSource} -> Maybe Text
eventSource) (\s :: Evidence
s@Evidence' {} Maybe Text
a -> Evidence
s {$sel:eventSource:Evidence' :: Maybe Text
eventSource = Maybe Text
a} :: Evidence)

-- | The identifier for the Amazon Web Services account.
evidence_evidenceAwsAccountId :: Lens.Lens' Evidence (Prelude.Maybe Prelude.Text)
evidence_evidenceAwsAccountId :: Lens' Evidence (Maybe Text)
evidence_evidenceAwsAccountId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Evidence' {Maybe Text
evidenceAwsAccountId :: Maybe Text
$sel:evidenceAwsAccountId:Evidence' :: Evidence -> Maybe Text
evidenceAwsAccountId} -> Maybe Text
evidenceAwsAccountId) (\s :: Evidence
s@Evidence' {} Maybe Text
a -> Evidence
s {$sel:evidenceAwsAccountId:Evidence' :: Maybe Text
evidenceAwsAccountId = Maybe Text
a} :: Evidence)

-- | The type of automated evidence.
evidence_evidenceByType :: Lens.Lens' Evidence (Prelude.Maybe Prelude.Text)
evidence_evidenceByType :: Lens' Evidence (Maybe Text)
evidence_evidenceByType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Evidence' {Maybe Text
evidenceByType :: Maybe Text
$sel:evidenceByType:Evidence' :: Evidence -> Maybe Text
evidenceByType} -> Maybe Text
evidenceByType) (\s :: Evidence
s@Evidence' {} Maybe Text
a -> Evidence
s {$sel:evidenceByType:Evidence' :: Maybe Text
evidenceByType = Maybe Text
a} :: Evidence)

-- | The identifier for the folder that the evidence is stored in.
evidence_evidenceFolderId :: Lens.Lens' Evidence (Prelude.Maybe Prelude.Text)
evidence_evidenceFolderId :: Lens' Evidence (Maybe Text)
evidence_evidenceFolderId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Evidence' {Maybe Text
evidenceFolderId :: Maybe Text
$sel:evidenceFolderId:Evidence' :: Evidence -> Maybe Text
evidenceFolderId} -> Maybe Text
evidenceFolderId) (\s :: Evidence
s@Evidence' {} Maybe Text
a -> Evidence
s {$sel:evidenceFolderId:Evidence' :: Maybe Text
evidenceFolderId = Maybe Text
a} :: Evidence)

-- | The unique identifier for the IAM user or role that\'s associated with
-- the evidence.
evidence_iamId :: Lens.Lens' Evidence (Prelude.Maybe Prelude.Text)
evidence_iamId :: Lens' Evidence (Maybe Text)
evidence_iamId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Evidence' {Maybe Text
iamId :: Maybe Text
$sel:iamId:Evidence' :: Evidence -> Maybe Text
iamId} -> Maybe Text
iamId) (\s :: Evidence
s@Evidence' {} Maybe Text
a -> Evidence
s {$sel:iamId:Evidence' :: Maybe Text
iamId = Maybe Text
a} :: Evidence)

-- | The identifier for the evidence.
evidence_id :: Lens.Lens' Evidence (Prelude.Maybe Prelude.Text)
evidence_id :: Lens' Evidence (Maybe Text)
evidence_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Evidence' {Maybe Text
id :: Maybe Text
$sel:id:Evidence' :: Evidence -> Maybe Text
id} -> Maybe Text
id) (\s :: Evidence
s@Evidence' {} Maybe Text
a -> Evidence
s {$sel:id:Evidence' :: Maybe Text
id = Maybe Text
a} :: Evidence)

-- | The list of resources that are assessed to generate the evidence.
evidence_resourcesIncluded :: Lens.Lens' Evidence (Prelude.Maybe [Resource])
evidence_resourcesIncluded :: Lens' Evidence (Maybe [Resource])
evidence_resourcesIncluded = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Evidence' {Maybe [Resource]
resourcesIncluded :: Maybe [Resource]
$sel:resourcesIncluded:Evidence' :: Evidence -> Maybe [Resource]
resourcesIncluded} -> Maybe [Resource]
resourcesIncluded) (\s :: Evidence
s@Evidence' {} Maybe [Resource]
a -> Evidence
s {$sel:resourcesIncluded:Evidence' :: Maybe [Resource]
resourcesIncluded = Maybe [Resource]
a} :: Evidence) 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 timestamp that represents when the evidence was collected.
evidence_time :: Lens.Lens' Evidence (Prelude.Maybe Prelude.UTCTime)
evidence_time :: Lens' Evidence (Maybe UTCTime)
evidence_time = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Evidence' {Maybe POSIX
time :: Maybe POSIX
$sel:time:Evidence' :: Evidence -> Maybe POSIX
time} -> Maybe POSIX
time) (\s :: Evidence
s@Evidence' {} Maybe POSIX
a -> Evidence
s {$sel:time:Evidence' :: Maybe POSIX
time = Maybe POSIX
a} :: Evidence) 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 Evidence where
  parseJSON :: Value -> Parser Evidence
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"Evidence"
      ( \Object
x ->
          Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Resource]
-> Maybe POSIX
-> Evidence
Evidence'
            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
"assessmentReportSelection")
            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
"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
"awsOrganization")
            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
"complianceCheck")
            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
"dataSource")
            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
"eventName")
            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
"eventSource")
            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
"evidenceAwsAccountId")
            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
"evidenceByType")
            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
"evidenceFolderId")
            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
"iamId")
            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
"resourcesIncluded"
                            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
"time")
      )

instance Prelude.Hashable Evidence where
  hashWithSalt :: Int -> Evidence -> Int
hashWithSalt Int
_salt Evidence' {Maybe [Resource]
Maybe Text
Maybe (HashMap Text Text)
Maybe POSIX
time :: Maybe POSIX
resourcesIncluded :: Maybe [Resource]
id :: Maybe Text
iamId :: Maybe Text
evidenceFolderId :: Maybe Text
evidenceByType :: Maybe Text
evidenceAwsAccountId :: Maybe Text
eventSource :: Maybe Text
eventName :: Maybe Text
dataSource :: Maybe Text
complianceCheck :: Maybe Text
awsOrganization :: Maybe Text
awsAccountId :: Maybe Text
attributes :: Maybe (HashMap Text Text)
assessmentReportSelection :: Maybe Text
$sel:time:Evidence' :: Evidence -> Maybe POSIX
$sel:resourcesIncluded:Evidence' :: Evidence -> Maybe [Resource]
$sel:id:Evidence' :: Evidence -> Maybe Text
$sel:iamId:Evidence' :: Evidence -> Maybe Text
$sel:evidenceFolderId:Evidence' :: Evidence -> Maybe Text
$sel:evidenceByType:Evidence' :: Evidence -> Maybe Text
$sel:evidenceAwsAccountId:Evidence' :: Evidence -> Maybe Text
$sel:eventSource:Evidence' :: Evidence -> Maybe Text
$sel:eventName:Evidence' :: Evidence -> Maybe Text
$sel:dataSource:Evidence' :: Evidence -> Maybe Text
$sel:complianceCheck:Evidence' :: Evidence -> Maybe Text
$sel:awsOrganization:Evidence' :: Evidence -> Maybe Text
$sel:awsAccountId:Evidence' :: Evidence -> Maybe Text
$sel:attributes:Evidence' :: Evidence -> Maybe (HashMap Text Text)
$sel:assessmentReportSelection:Evidence' :: Evidence -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
assessmentReportSelection
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
attributes
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
awsAccountId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
awsOrganization
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
complianceCheck
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
dataSource
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
eventName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
eventSource
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
evidenceAwsAccountId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
evidenceByType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
evidenceFolderId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
iamId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
id
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Resource]
resourcesIncluded
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
time

instance Prelude.NFData Evidence where
  rnf :: Evidence -> ()
rnf Evidence' {Maybe [Resource]
Maybe Text
Maybe (HashMap Text Text)
Maybe POSIX
time :: Maybe POSIX
resourcesIncluded :: Maybe [Resource]
id :: Maybe Text
iamId :: Maybe Text
evidenceFolderId :: Maybe Text
evidenceByType :: Maybe Text
evidenceAwsAccountId :: Maybe Text
eventSource :: Maybe Text
eventName :: Maybe Text
dataSource :: Maybe Text
complianceCheck :: Maybe Text
awsOrganization :: Maybe Text
awsAccountId :: Maybe Text
attributes :: Maybe (HashMap Text Text)
assessmentReportSelection :: Maybe Text
$sel:time:Evidence' :: Evidence -> Maybe POSIX
$sel:resourcesIncluded:Evidence' :: Evidence -> Maybe [Resource]
$sel:id:Evidence' :: Evidence -> Maybe Text
$sel:iamId:Evidence' :: Evidence -> Maybe Text
$sel:evidenceFolderId:Evidence' :: Evidence -> Maybe Text
$sel:evidenceByType:Evidence' :: Evidence -> Maybe Text
$sel:evidenceAwsAccountId:Evidence' :: Evidence -> Maybe Text
$sel:eventSource:Evidence' :: Evidence -> Maybe Text
$sel:eventName:Evidence' :: Evidence -> Maybe Text
$sel:dataSource:Evidence' :: Evidence -> Maybe Text
$sel:complianceCheck:Evidence' :: Evidence -> Maybe Text
$sel:awsOrganization:Evidence' :: Evidence -> Maybe Text
$sel:awsAccountId:Evidence' :: Evidence -> Maybe Text
$sel:attributes:Evidence' :: Evidence -> Maybe (HashMap Text Text)
$sel:assessmentReportSelection:Evidence' :: Evidence -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
assessmentReportSelection
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
attributes
      seq :: forall a b. a -> b -> b
`Prelude.seq` 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
awsOrganization
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
complianceCheck
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
dataSource
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
eventName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
eventSource
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
evidenceAwsAccountId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
evidenceByType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
evidenceFolderId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
iamId
      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 [Resource]
resourcesIncluded
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
time