{-# 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.SecurityHub.Types.StandardsControl
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.SecurityHub.Types.StandardsControl where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SecurityHub.Types.ControlStatus
import Amazonka.SecurityHub.Types.SeverityRating

-- | Details for an individual security standard control.
--
-- /See:/ 'newStandardsControl' smart constructor.
data StandardsControl = StandardsControl'
  { -- | A link to remediation information for the control in the Security Hub
    -- user documentation.
    StandardsControl -> Maybe Text
remediationUrl :: Prelude.Maybe Prelude.Text,
    -- | The severity of findings generated from this security standard control.
    --
    -- The finding severity is based on an assessment of how easy it would be
    -- to compromise Amazon Web Services resources if the issue is detected.
    StandardsControl -> Maybe SeverityRating
severityRating :: Prelude.Maybe SeverityRating,
    -- | The date and time that the status of the security standard control was
    -- most recently updated.
    StandardsControl -> Maybe POSIX
controlStatusUpdatedAt :: Prelude.Maybe Core.POSIX,
    -- | The list of requirements that are related to this control.
    StandardsControl -> Maybe [Text]
relatedRequirements :: Prelude.Maybe [Prelude.Text],
    -- | The current status of the security standard control. Indicates whether
    -- the control is enabled or disabled. Security Hub does not check against
    -- disabled controls.
    StandardsControl -> Maybe ControlStatus
controlStatus :: Prelude.Maybe ControlStatus,
    -- | The reason provided for the most recent change in status for the
    -- control.
    StandardsControl -> Maybe Text
disabledReason :: Prelude.Maybe Prelude.Text,
    -- | The identifier of the security standard control.
    StandardsControl -> Maybe Text
controlId :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the security standard control.
    StandardsControl -> Maybe Text
standardsControlArn :: Prelude.Maybe Prelude.Text,
    -- | The title of the security standard control.
    StandardsControl -> Maybe Text
title :: Prelude.Maybe Prelude.Text,
    -- | The longer description of the security standard control. Provides
    -- information about what the control is checking for.
    StandardsControl -> Maybe Text
description :: Prelude.Maybe Prelude.Text
  }
  deriving (StandardsControl -> StandardsControl -> Bool
(StandardsControl -> StandardsControl -> Bool)
-> (StandardsControl -> StandardsControl -> Bool)
-> Eq StandardsControl
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StandardsControl -> StandardsControl -> Bool
$c/= :: StandardsControl -> StandardsControl -> Bool
== :: StandardsControl -> StandardsControl -> Bool
$c== :: StandardsControl -> StandardsControl -> Bool
Prelude.Eq, ReadPrec [StandardsControl]
ReadPrec StandardsControl
Int -> ReadS StandardsControl
ReadS [StandardsControl]
(Int -> ReadS StandardsControl)
-> ReadS [StandardsControl]
-> ReadPrec StandardsControl
-> ReadPrec [StandardsControl]
-> Read StandardsControl
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StandardsControl]
$creadListPrec :: ReadPrec [StandardsControl]
readPrec :: ReadPrec StandardsControl
$creadPrec :: ReadPrec StandardsControl
readList :: ReadS [StandardsControl]
$creadList :: ReadS [StandardsControl]
readsPrec :: Int -> ReadS StandardsControl
$creadsPrec :: Int -> ReadS StandardsControl
Prelude.Read, Int -> StandardsControl -> ShowS
[StandardsControl] -> ShowS
StandardsControl -> String
(Int -> StandardsControl -> ShowS)
-> (StandardsControl -> String)
-> ([StandardsControl] -> ShowS)
-> Show StandardsControl
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StandardsControl] -> ShowS
$cshowList :: [StandardsControl] -> ShowS
show :: StandardsControl -> String
$cshow :: StandardsControl -> String
showsPrec :: Int -> StandardsControl -> ShowS
$cshowsPrec :: Int -> StandardsControl -> ShowS
Prelude.Show, (forall x. StandardsControl -> Rep StandardsControl x)
-> (forall x. Rep StandardsControl x -> StandardsControl)
-> Generic StandardsControl
forall x. Rep StandardsControl x -> StandardsControl
forall x. StandardsControl -> Rep StandardsControl x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StandardsControl x -> StandardsControl
$cfrom :: forall x. StandardsControl -> Rep StandardsControl x
Prelude.Generic)

-- |
-- Create a value of 'StandardsControl' 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:
--
-- 'remediationUrl', 'standardsControl_remediationUrl' - A link to remediation information for the control in the Security Hub
-- user documentation.
--
-- 'severityRating', 'standardsControl_severityRating' - The severity of findings generated from this security standard control.
--
-- The finding severity is based on an assessment of how easy it would be
-- to compromise Amazon Web Services resources if the issue is detected.
--
-- 'controlStatusUpdatedAt', 'standardsControl_controlStatusUpdatedAt' - The date and time that the status of the security standard control was
-- most recently updated.
--
-- 'relatedRequirements', 'standardsControl_relatedRequirements' - The list of requirements that are related to this control.
--
-- 'controlStatus', 'standardsControl_controlStatus' - The current status of the security standard control. Indicates whether
-- the control is enabled or disabled. Security Hub does not check against
-- disabled controls.
--
-- 'disabledReason', 'standardsControl_disabledReason' - The reason provided for the most recent change in status for the
-- control.
--
-- 'controlId', 'standardsControl_controlId' - The identifier of the security standard control.
--
-- 'standardsControlArn', 'standardsControl_standardsControlArn' - The ARN of the security standard control.
--
-- 'title', 'standardsControl_title' - The title of the security standard control.
--
-- 'description', 'standardsControl_description' - The longer description of the security standard control. Provides
-- information about what the control is checking for.
newStandardsControl ::
  StandardsControl
newStandardsControl :: StandardsControl
newStandardsControl =
  StandardsControl' :: Maybe Text
-> Maybe SeverityRating
-> Maybe POSIX
-> Maybe [Text]
-> Maybe ControlStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> StandardsControl
StandardsControl'
    { $sel:remediationUrl:StandardsControl' :: Maybe Text
remediationUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:severityRating:StandardsControl' :: Maybe SeverityRating
severityRating = Maybe SeverityRating
forall a. Maybe a
Prelude.Nothing,
      $sel:controlStatusUpdatedAt:StandardsControl' :: Maybe POSIX
controlStatusUpdatedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:relatedRequirements:StandardsControl' :: Maybe [Text]
relatedRequirements = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:controlStatus:StandardsControl' :: Maybe ControlStatus
controlStatus = Maybe ControlStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:disabledReason:StandardsControl' :: Maybe Text
disabledReason = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:controlId:StandardsControl' :: Maybe Text
controlId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:standardsControlArn:StandardsControl' :: Maybe Text
standardsControlArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:title:StandardsControl' :: Maybe Text
title = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:StandardsControl' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | A link to remediation information for the control in the Security Hub
-- user documentation.
standardsControl_remediationUrl :: Lens.Lens' StandardsControl (Prelude.Maybe Prelude.Text)
standardsControl_remediationUrl :: (Maybe Text -> f (Maybe Text))
-> StandardsControl -> f StandardsControl
standardsControl_remediationUrl = (StandardsControl -> Maybe Text)
-> (StandardsControl -> Maybe Text -> StandardsControl)
-> Lens StandardsControl StandardsControl (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StandardsControl' {Maybe Text
remediationUrl :: Maybe Text
$sel:remediationUrl:StandardsControl' :: StandardsControl -> Maybe Text
remediationUrl} -> Maybe Text
remediationUrl) (\s :: StandardsControl
s@StandardsControl' {} Maybe Text
a -> StandardsControl
s {$sel:remediationUrl:StandardsControl' :: Maybe Text
remediationUrl = Maybe Text
a} :: StandardsControl)

-- | The severity of findings generated from this security standard control.
--
-- The finding severity is based on an assessment of how easy it would be
-- to compromise Amazon Web Services resources if the issue is detected.
standardsControl_severityRating :: Lens.Lens' StandardsControl (Prelude.Maybe SeverityRating)
standardsControl_severityRating :: (Maybe SeverityRating -> f (Maybe SeverityRating))
-> StandardsControl -> f StandardsControl
standardsControl_severityRating = (StandardsControl -> Maybe SeverityRating)
-> (StandardsControl -> Maybe SeverityRating -> StandardsControl)
-> Lens
     StandardsControl
     StandardsControl
     (Maybe SeverityRating)
     (Maybe SeverityRating)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StandardsControl' {Maybe SeverityRating
severityRating :: Maybe SeverityRating
$sel:severityRating:StandardsControl' :: StandardsControl -> Maybe SeverityRating
severityRating} -> Maybe SeverityRating
severityRating) (\s :: StandardsControl
s@StandardsControl' {} Maybe SeverityRating
a -> StandardsControl
s {$sel:severityRating:StandardsControl' :: Maybe SeverityRating
severityRating = Maybe SeverityRating
a} :: StandardsControl)

-- | The date and time that the status of the security standard control was
-- most recently updated.
standardsControl_controlStatusUpdatedAt :: Lens.Lens' StandardsControl (Prelude.Maybe Prelude.UTCTime)
standardsControl_controlStatusUpdatedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> StandardsControl -> f StandardsControl
standardsControl_controlStatusUpdatedAt = (StandardsControl -> Maybe POSIX)
-> (StandardsControl -> Maybe POSIX -> StandardsControl)
-> Lens
     StandardsControl StandardsControl (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StandardsControl' {Maybe POSIX
controlStatusUpdatedAt :: Maybe POSIX
$sel:controlStatusUpdatedAt:StandardsControl' :: StandardsControl -> Maybe POSIX
controlStatusUpdatedAt} -> Maybe POSIX
controlStatusUpdatedAt) (\s :: StandardsControl
s@StandardsControl' {} Maybe POSIX
a -> StandardsControl
s {$sel:controlStatusUpdatedAt:StandardsControl' :: Maybe POSIX
controlStatusUpdatedAt = Maybe POSIX
a} :: StandardsControl) ((Maybe POSIX -> f (Maybe POSIX))
 -> StandardsControl -> f StandardsControl)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> StandardsControl
-> f StandardsControl
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The list of requirements that are related to this control.
standardsControl_relatedRequirements :: Lens.Lens' StandardsControl (Prelude.Maybe [Prelude.Text])
standardsControl_relatedRequirements :: (Maybe [Text] -> f (Maybe [Text]))
-> StandardsControl -> f StandardsControl
standardsControl_relatedRequirements = (StandardsControl -> Maybe [Text])
-> (StandardsControl -> Maybe [Text] -> StandardsControl)
-> Lens
     StandardsControl StandardsControl (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StandardsControl' {Maybe [Text]
relatedRequirements :: Maybe [Text]
$sel:relatedRequirements:StandardsControl' :: StandardsControl -> Maybe [Text]
relatedRequirements} -> Maybe [Text]
relatedRequirements) (\s :: StandardsControl
s@StandardsControl' {} Maybe [Text]
a -> StandardsControl
s {$sel:relatedRequirements:StandardsControl' :: Maybe [Text]
relatedRequirements = Maybe [Text]
a} :: StandardsControl) ((Maybe [Text] -> f (Maybe [Text]))
 -> StandardsControl -> f StandardsControl)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> StandardsControl
-> f StandardsControl
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The current status of the security standard control. Indicates whether
-- the control is enabled or disabled. Security Hub does not check against
-- disabled controls.
standardsControl_controlStatus :: Lens.Lens' StandardsControl (Prelude.Maybe ControlStatus)
standardsControl_controlStatus :: (Maybe ControlStatus -> f (Maybe ControlStatus))
-> StandardsControl -> f StandardsControl
standardsControl_controlStatus = (StandardsControl -> Maybe ControlStatus)
-> (StandardsControl -> Maybe ControlStatus -> StandardsControl)
-> Lens
     StandardsControl
     StandardsControl
     (Maybe ControlStatus)
     (Maybe ControlStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StandardsControl' {Maybe ControlStatus
controlStatus :: Maybe ControlStatus
$sel:controlStatus:StandardsControl' :: StandardsControl -> Maybe ControlStatus
controlStatus} -> Maybe ControlStatus
controlStatus) (\s :: StandardsControl
s@StandardsControl' {} Maybe ControlStatus
a -> StandardsControl
s {$sel:controlStatus:StandardsControl' :: Maybe ControlStatus
controlStatus = Maybe ControlStatus
a} :: StandardsControl)

-- | The reason provided for the most recent change in status for the
-- control.
standardsControl_disabledReason :: Lens.Lens' StandardsControl (Prelude.Maybe Prelude.Text)
standardsControl_disabledReason :: (Maybe Text -> f (Maybe Text))
-> StandardsControl -> f StandardsControl
standardsControl_disabledReason = (StandardsControl -> Maybe Text)
-> (StandardsControl -> Maybe Text -> StandardsControl)
-> Lens StandardsControl StandardsControl (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StandardsControl' {Maybe Text
disabledReason :: Maybe Text
$sel:disabledReason:StandardsControl' :: StandardsControl -> Maybe Text
disabledReason} -> Maybe Text
disabledReason) (\s :: StandardsControl
s@StandardsControl' {} Maybe Text
a -> StandardsControl
s {$sel:disabledReason:StandardsControl' :: Maybe Text
disabledReason = Maybe Text
a} :: StandardsControl)

-- | The identifier of the security standard control.
standardsControl_controlId :: Lens.Lens' StandardsControl (Prelude.Maybe Prelude.Text)
standardsControl_controlId :: (Maybe Text -> f (Maybe Text))
-> StandardsControl -> f StandardsControl
standardsControl_controlId = (StandardsControl -> Maybe Text)
-> (StandardsControl -> Maybe Text -> StandardsControl)
-> Lens StandardsControl StandardsControl (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StandardsControl' {Maybe Text
controlId :: Maybe Text
$sel:controlId:StandardsControl' :: StandardsControl -> Maybe Text
controlId} -> Maybe Text
controlId) (\s :: StandardsControl
s@StandardsControl' {} Maybe Text
a -> StandardsControl
s {$sel:controlId:StandardsControl' :: Maybe Text
controlId = Maybe Text
a} :: StandardsControl)

-- | The ARN of the security standard control.
standardsControl_standardsControlArn :: Lens.Lens' StandardsControl (Prelude.Maybe Prelude.Text)
standardsControl_standardsControlArn :: (Maybe Text -> f (Maybe Text))
-> StandardsControl -> f StandardsControl
standardsControl_standardsControlArn = (StandardsControl -> Maybe Text)
-> (StandardsControl -> Maybe Text -> StandardsControl)
-> Lens StandardsControl StandardsControl (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StandardsControl' {Maybe Text
standardsControlArn :: Maybe Text
$sel:standardsControlArn:StandardsControl' :: StandardsControl -> Maybe Text
standardsControlArn} -> Maybe Text
standardsControlArn) (\s :: StandardsControl
s@StandardsControl' {} Maybe Text
a -> StandardsControl
s {$sel:standardsControlArn:StandardsControl' :: Maybe Text
standardsControlArn = Maybe Text
a} :: StandardsControl)

-- | The title of the security standard control.
standardsControl_title :: Lens.Lens' StandardsControl (Prelude.Maybe Prelude.Text)
standardsControl_title :: (Maybe Text -> f (Maybe Text))
-> StandardsControl -> f StandardsControl
standardsControl_title = (StandardsControl -> Maybe Text)
-> (StandardsControl -> Maybe Text -> StandardsControl)
-> Lens StandardsControl StandardsControl (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StandardsControl' {Maybe Text
title :: Maybe Text
$sel:title:StandardsControl' :: StandardsControl -> Maybe Text
title} -> Maybe Text
title) (\s :: StandardsControl
s@StandardsControl' {} Maybe Text
a -> StandardsControl
s {$sel:title:StandardsControl' :: Maybe Text
title = Maybe Text
a} :: StandardsControl)

-- | The longer description of the security standard control. Provides
-- information about what the control is checking for.
standardsControl_description :: Lens.Lens' StandardsControl (Prelude.Maybe Prelude.Text)
standardsControl_description :: (Maybe Text -> f (Maybe Text))
-> StandardsControl -> f StandardsControl
standardsControl_description = (StandardsControl -> Maybe Text)
-> (StandardsControl -> Maybe Text -> StandardsControl)
-> Lens StandardsControl StandardsControl (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StandardsControl' {Maybe Text
description :: Maybe Text
$sel:description:StandardsControl' :: StandardsControl -> Maybe Text
description} -> Maybe Text
description) (\s :: StandardsControl
s@StandardsControl' {} Maybe Text
a -> StandardsControl
s {$sel:description:StandardsControl' :: Maybe Text
description = Maybe Text
a} :: StandardsControl)

instance Core.FromJSON StandardsControl where
  parseJSON :: Value -> Parser StandardsControl
parseJSON =
    String
-> (Object -> Parser StandardsControl)
-> Value
-> Parser StandardsControl
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"StandardsControl"
      ( \Object
x ->
          Maybe Text
-> Maybe SeverityRating
-> Maybe POSIX
-> Maybe [Text]
-> Maybe ControlStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> StandardsControl
StandardsControl'
            (Maybe Text
 -> Maybe SeverityRating
 -> Maybe POSIX
 -> Maybe [Text]
 -> Maybe ControlStatus
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> StandardsControl)
-> Parser (Maybe Text)
-> Parser
     (Maybe SeverityRating
      -> Maybe POSIX
      -> Maybe [Text]
      -> Maybe ControlStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> StandardsControl)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RemediationUrl")
            Parser
  (Maybe SeverityRating
   -> Maybe POSIX
   -> Maybe [Text]
   -> Maybe ControlStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> StandardsControl)
-> Parser (Maybe SeverityRating)
-> Parser
     (Maybe POSIX
      -> Maybe [Text]
      -> Maybe ControlStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> StandardsControl)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SeverityRating)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SeverityRating")
            Parser
  (Maybe POSIX
   -> Maybe [Text]
   -> Maybe ControlStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> StandardsControl)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe [Text]
      -> Maybe ControlStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> StandardsControl)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ControlStatusUpdatedAt")
            Parser
  (Maybe [Text]
   -> Maybe ControlStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> StandardsControl)
-> Parser (Maybe [Text])
-> Parser
     (Maybe ControlStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> StandardsControl)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RelatedRequirements"
                            Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe ControlStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> StandardsControl)
-> Parser (Maybe ControlStatus)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> StandardsControl)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ControlStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ControlStatus")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> StandardsControl)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe Text -> Maybe Text -> StandardsControl)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DisabledReason")
            Parser
  (Maybe Text
   -> Maybe Text -> Maybe Text -> Maybe Text -> StandardsControl)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe Text -> Maybe Text -> StandardsControl)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ControlId")
            Parser (Maybe Text -> Maybe Text -> Maybe Text -> StandardsControl)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> StandardsControl)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StandardsControlArn")
            Parser (Maybe Text -> Maybe Text -> StandardsControl)
-> Parser (Maybe Text) -> Parser (Maybe Text -> StandardsControl)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Title")
            Parser (Maybe Text -> StandardsControl)
-> Parser (Maybe Text) -> Parser StandardsControl
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Description")
      )

instance Prelude.Hashable StandardsControl

instance Prelude.NFData StandardsControl