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

import Amazonka.AuditManager.Types.AssessmentControl
import Amazonka.AuditManager.Types.ControlSetStatus
import Amazonka.AuditManager.Types.Delegation
import Amazonka.AuditManager.Types.Role
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Represents a set of controls in an Audit Manager assessment.
--
-- /See:/ 'newAssessmentControlSet' smart constructor.
data AssessmentControlSet = AssessmentControlSet'
  { -- | Specifies the current status of the control set.
    AssessmentControlSet -> Maybe ControlSetStatus
status :: Prelude.Maybe ControlSetStatus,
    -- | The list of controls contained with the control set.
    AssessmentControlSet -> Maybe [AssessmentControl]
controls :: Prelude.Maybe [AssessmentControl],
    -- | The roles associated with the control set.
    AssessmentControlSet -> Maybe [Role]
roles :: Prelude.Maybe [Role],
    -- | The total number of evidence objects uploaded manually to the control
    -- set.
    AssessmentControlSet -> Maybe Int
manualEvidenceCount :: Prelude.Maybe Prelude.Int,
    -- | The delegations associated with the control set.
    AssessmentControlSet -> Maybe [Delegation]
delegations :: Prelude.Maybe [Delegation],
    -- | The total number of evidence objects retrieved automatically for the
    -- control set.
    AssessmentControlSet -> Maybe Int
systemEvidenceCount :: Prelude.Maybe Prelude.Int,
    -- | The identifier of the control set in the assessment. This is the control
    -- set name in a plain string format.
    AssessmentControlSet -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The description for the control set.
    AssessmentControlSet -> Maybe Text
description :: Prelude.Maybe Prelude.Text
  }
  deriving (AssessmentControlSet -> AssessmentControlSet -> Bool
(AssessmentControlSet -> AssessmentControlSet -> Bool)
-> (AssessmentControlSet -> AssessmentControlSet -> Bool)
-> Eq AssessmentControlSet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssessmentControlSet -> AssessmentControlSet -> Bool
$c/= :: AssessmentControlSet -> AssessmentControlSet -> Bool
== :: AssessmentControlSet -> AssessmentControlSet -> Bool
$c== :: AssessmentControlSet -> AssessmentControlSet -> Bool
Prelude.Eq, ReadPrec [AssessmentControlSet]
ReadPrec AssessmentControlSet
Int -> ReadS AssessmentControlSet
ReadS [AssessmentControlSet]
(Int -> ReadS AssessmentControlSet)
-> ReadS [AssessmentControlSet]
-> ReadPrec AssessmentControlSet
-> ReadPrec [AssessmentControlSet]
-> Read AssessmentControlSet
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssessmentControlSet]
$creadListPrec :: ReadPrec [AssessmentControlSet]
readPrec :: ReadPrec AssessmentControlSet
$creadPrec :: ReadPrec AssessmentControlSet
readList :: ReadS [AssessmentControlSet]
$creadList :: ReadS [AssessmentControlSet]
readsPrec :: Int -> ReadS AssessmentControlSet
$creadsPrec :: Int -> ReadS AssessmentControlSet
Prelude.Read, Int -> AssessmentControlSet -> ShowS
[AssessmentControlSet] -> ShowS
AssessmentControlSet -> String
(Int -> AssessmentControlSet -> ShowS)
-> (AssessmentControlSet -> String)
-> ([AssessmentControlSet] -> ShowS)
-> Show AssessmentControlSet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssessmentControlSet] -> ShowS
$cshowList :: [AssessmentControlSet] -> ShowS
show :: AssessmentControlSet -> String
$cshow :: AssessmentControlSet -> String
showsPrec :: Int -> AssessmentControlSet -> ShowS
$cshowsPrec :: Int -> AssessmentControlSet -> ShowS
Prelude.Show, (forall x. AssessmentControlSet -> Rep AssessmentControlSet x)
-> (forall x. Rep AssessmentControlSet x -> AssessmentControlSet)
-> Generic AssessmentControlSet
forall x. Rep AssessmentControlSet x -> AssessmentControlSet
forall x. AssessmentControlSet -> Rep AssessmentControlSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AssessmentControlSet x -> AssessmentControlSet
$cfrom :: forall x. AssessmentControlSet -> Rep AssessmentControlSet x
Prelude.Generic)

-- |
-- Create a value of 'AssessmentControlSet' 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:
--
-- 'status', 'assessmentControlSet_status' - Specifies the current status of the control set.
--
-- 'controls', 'assessmentControlSet_controls' - The list of controls contained with the control set.
--
-- 'roles', 'assessmentControlSet_roles' - The roles associated with the control set.
--
-- 'manualEvidenceCount', 'assessmentControlSet_manualEvidenceCount' - The total number of evidence objects uploaded manually to the control
-- set.
--
-- 'delegations', 'assessmentControlSet_delegations' - The delegations associated with the control set.
--
-- 'systemEvidenceCount', 'assessmentControlSet_systemEvidenceCount' - The total number of evidence objects retrieved automatically for the
-- control set.
--
-- 'id', 'assessmentControlSet_id' - The identifier of the control set in the assessment. This is the control
-- set name in a plain string format.
--
-- 'description', 'assessmentControlSet_description' - The description for the control set.
newAssessmentControlSet ::
  AssessmentControlSet
newAssessmentControlSet :: AssessmentControlSet
newAssessmentControlSet =
  AssessmentControlSet' :: Maybe ControlSetStatus
-> Maybe [AssessmentControl]
-> Maybe [Role]
-> Maybe Int
-> Maybe [Delegation]
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> AssessmentControlSet
AssessmentControlSet'
    { $sel:status:AssessmentControlSet' :: Maybe ControlSetStatus
status = Maybe ControlSetStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:controls:AssessmentControlSet' :: Maybe [AssessmentControl]
controls = Maybe [AssessmentControl]
forall a. Maybe a
Prelude.Nothing,
      $sel:roles:AssessmentControlSet' :: Maybe [Role]
roles = Maybe [Role]
forall a. Maybe a
Prelude.Nothing,
      $sel:manualEvidenceCount:AssessmentControlSet' :: Maybe Int
manualEvidenceCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:delegations:AssessmentControlSet' :: Maybe [Delegation]
delegations = Maybe [Delegation]
forall a. Maybe a
Prelude.Nothing,
      $sel:systemEvidenceCount:AssessmentControlSet' :: Maybe Int
systemEvidenceCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:id:AssessmentControlSet' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:AssessmentControlSet' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | Specifies the current status of the control set.
assessmentControlSet_status :: Lens.Lens' AssessmentControlSet (Prelude.Maybe ControlSetStatus)
assessmentControlSet_status :: (Maybe ControlSetStatus -> f (Maybe ControlSetStatus))
-> AssessmentControlSet -> f AssessmentControlSet
assessmentControlSet_status = (AssessmentControlSet -> Maybe ControlSetStatus)
-> (AssessmentControlSet
    -> Maybe ControlSetStatus -> AssessmentControlSet)
-> Lens
     AssessmentControlSet
     AssessmentControlSet
     (Maybe ControlSetStatus)
     (Maybe ControlSetStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssessmentControlSet' {Maybe ControlSetStatus
status :: Maybe ControlSetStatus
$sel:status:AssessmentControlSet' :: AssessmentControlSet -> Maybe ControlSetStatus
status} -> Maybe ControlSetStatus
status) (\s :: AssessmentControlSet
s@AssessmentControlSet' {} Maybe ControlSetStatus
a -> AssessmentControlSet
s {$sel:status:AssessmentControlSet' :: Maybe ControlSetStatus
status = Maybe ControlSetStatus
a} :: AssessmentControlSet)

-- | The list of controls contained with the control set.
assessmentControlSet_controls :: Lens.Lens' AssessmentControlSet (Prelude.Maybe [AssessmentControl])
assessmentControlSet_controls :: (Maybe [AssessmentControl] -> f (Maybe [AssessmentControl]))
-> AssessmentControlSet -> f AssessmentControlSet
assessmentControlSet_controls = (AssessmentControlSet -> Maybe [AssessmentControl])
-> (AssessmentControlSet
    -> Maybe [AssessmentControl] -> AssessmentControlSet)
-> Lens
     AssessmentControlSet
     AssessmentControlSet
     (Maybe [AssessmentControl])
     (Maybe [AssessmentControl])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssessmentControlSet' {Maybe [AssessmentControl]
controls :: Maybe [AssessmentControl]
$sel:controls:AssessmentControlSet' :: AssessmentControlSet -> Maybe [AssessmentControl]
controls} -> Maybe [AssessmentControl]
controls) (\s :: AssessmentControlSet
s@AssessmentControlSet' {} Maybe [AssessmentControl]
a -> AssessmentControlSet
s {$sel:controls:AssessmentControlSet' :: Maybe [AssessmentControl]
controls = Maybe [AssessmentControl]
a} :: AssessmentControlSet) ((Maybe [AssessmentControl] -> f (Maybe [AssessmentControl]))
 -> AssessmentControlSet -> f AssessmentControlSet)
-> ((Maybe [AssessmentControl] -> f (Maybe [AssessmentControl]))
    -> Maybe [AssessmentControl] -> f (Maybe [AssessmentControl]))
-> (Maybe [AssessmentControl] -> f (Maybe [AssessmentControl]))
-> AssessmentControlSet
-> f AssessmentControlSet
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [AssessmentControl]
  [AssessmentControl]
  [AssessmentControl]
  [AssessmentControl]
-> Iso
     (Maybe [AssessmentControl])
     (Maybe [AssessmentControl])
     (Maybe [AssessmentControl])
     (Maybe [AssessmentControl])
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
  [AssessmentControl]
  [AssessmentControl]
  [AssessmentControl]
  [AssessmentControl]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The roles associated with the control set.
assessmentControlSet_roles :: Lens.Lens' AssessmentControlSet (Prelude.Maybe [Role])
assessmentControlSet_roles :: (Maybe [Role] -> f (Maybe [Role]))
-> AssessmentControlSet -> f AssessmentControlSet
assessmentControlSet_roles = (AssessmentControlSet -> Maybe [Role])
-> (AssessmentControlSet -> Maybe [Role] -> AssessmentControlSet)
-> Lens
     AssessmentControlSet
     AssessmentControlSet
     (Maybe [Role])
     (Maybe [Role])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssessmentControlSet' {Maybe [Role]
roles :: Maybe [Role]
$sel:roles:AssessmentControlSet' :: AssessmentControlSet -> Maybe [Role]
roles} -> Maybe [Role]
roles) (\s :: AssessmentControlSet
s@AssessmentControlSet' {} Maybe [Role]
a -> AssessmentControlSet
s {$sel:roles:AssessmentControlSet' :: Maybe [Role]
roles = Maybe [Role]
a} :: AssessmentControlSet) ((Maybe [Role] -> f (Maybe [Role]))
 -> AssessmentControlSet -> f AssessmentControlSet)
-> ((Maybe [Role] -> f (Maybe [Role]))
    -> Maybe [Role] -> f (Maybe [Role]))
-> (Maybe [Role] -> f (Maybe [Role]))
-> AssessmentControlSet
-> f AssessmentControlSet
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Role] [Role] [Role] [Role]
-> Iso (Maybe [Role]) (Maybe [Role]) (Maybe [Role]) (Maybe [Role])
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 [Role] [Role] [Role] [Role]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The total number of evidence objects uploaded manually to the control
-- set.
assessmentControlSet_manualEvidenceCount :: Lens.Lens' AssessmentControlSet (Prelude.Maybe Prelude.Int)
assessmentControlSet_manualEvidenceCount :: (Maybe Int -> f (Maybe Int))
-> AssessmentControlSet -> f AssessmentControlSet
assessmentControlSet_manualEvidenceCount = (AssessmentControlSet -> Maybe Int)
-> (AssessmentControlSet -> Maybe Int -> AssessmentControlSet)
-> Lens
     AssessmentControlSet AssessmentControlSet (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssessmentControlSet' {Maybe Int
manualEvidenceCount :: Maybe Int
$sel:manualEvidenceCount:AssessmentControlSet' :: AssessmentControlSet -> Maybe Int
manualEvidenceCount} -> Maybe Int
manualEvidenceCount) (\s :: AssessmentControlSet
s@AssessmentControlSet' {} Maybe Int
a -> AssessmentControlSet
s {$sel:manualEvidenceCount:AssessmentControlSet' :: Maybe Int
manualEvidenceCount = Maybe Int
a} :: AssessmentControlSet)

-- | The delegations associated with the control set.
assessmentControlSet_delegations :: Lens.Lens' AssessmentControlSet (Prelude.Maybe [Delegation])
assessmentControlSet_delegations :: (Maybe [Delegation] -> f (Maybe [Delegation]))
-> AssessmentControlSet -> f AssessmentControlSet
assessmentControlSet_delegations = (AssessmentControlSet -> Maybe [Delegation])
-> (AssessmentControlSet
    -> Maybe [Delegation] -> AssessmentControlSet)
-> Lens
     AssessmentControlSet
     AssessmentControlSet
     (Maybe [Delegation])
     (Maybe [Delegation])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssessmentControlSet' {Maybe [Delegation]
delegations :: Maybe [Delegation]
$sel:delegations:AssessmentControlSet' :: AssessmentControlSet -> Maybe [Delegation]
delegations} -> Maybe [Delegation]
delegations) (\s :: AssessmentControlSet
s@AssessmentControlSet' {} Maybe [Delegation]
a -> AssessmentControlSet
s {$sel:delegations:AssessmentControlSet' :: Maybe [Delegation]
delegations = Maybe [Delegation]
a} :: AssessmentControlSet) ((Maybe [Delegation] -> f (Maybe [Delegation]))
 -> AssessmentControlSet -> f AssessmentControlSet)
-> ((Maybe [Delegation] -> f (Maybe [Delegation]))
    -> Maybe [Delegation] -> f (Maybe [Delegation]))
-> (Maybe [Delegation] -> f (Maybe [Delegation]))
-> AssessmentControlSet
-> f AssessmentControlSet
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Delegation] [Delegation] [Delegation] [Delegation]
-> Iso
     (Maybe [Delegation])
     (Maybe [Delegation])
     (Maybe [Delegation])
     (Maybe [Delegation])
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 [Delegation] [Delegation] [Delegation] [Delegation]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The total number of evidence objects retrieved automatically for the
-- control set.
assessmentControlSet_systemEvidenceCount :: Lens.Lens' AssessmentControlSet (Prelude.Maybe Prelude.Int)
assessmentControlSet_systemEvidenceCount :: (Maybe Int -> f (Maybe Int))
-> AssessmentControlSet -> f AssessmentControlSet
assessmentControlSet_systemEvidenceCount = (AssessmentControlSet -> Maybe Int)
-> (AssessmentControlSet -> Maybe Int -> AssessmentControlSet)
-> Lens
     AssessmentControlSet AssessmentControlSet (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssessmentControlSet' {Maybe Int
systemEvidenceCount :: Maybe Int
$sel:systemEvidenceCount:AssessmentControlSet' :: AssessmentControlSet -> Maybe Int
systemEvidenceCount} -> Maybe Int
systemEvidenceCount) (\s :: AssessmentControlSet
s@AssessmentControlSet' {} Maybe Int
a -> AssessmentControlSet
s {$sel:systemEvidenceCount:AssessmentControlSet' :: Maybe Int
systemEvidenceCount = Maybe Int
a} :: AssessmentControlSet)

-- | The identifier of the control set in the assessment. This is the control
-- set name in a plain string format.
assessmentControlSet_id :: Lens.Lens' AssessmentControlSet (Prelude.Maybe Prelude.Text)
assessmentControlSet_id :: (Maybe Text -> f (Maybe Text))
-> AssessmentControlSet -> f AssessmentControlSet
assessmentControlSet_id = (AssessmentControlSet -> Maybe Text)
-> (AssessmentControlSet -> Maybe Text -> AssessmentControlSet)
-> Lens
     AssessmentControlSet AssessmentControlSet (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssessmentControlSet' {Maybe Text
id :: Maybe Text
$sel:id:AssessmentControlSet' :: AssessmentControlSet -> Maybe Text
id} -> Maybe Text
id) (\s :: AssessmentControlSet
s@AssessmentControlSet' {} Maybe Text
a -> AssessmentControlSet
s {$sel:id:AssessmentControlSet' :: Maybe Text
id = Maybe Text
a} :: AssessmentControlSet)

-- | The description for the control set.
assessmentControlSet_description :: Lens.Lens' AssessmentControlSet (Prelude.Maybe Prelude.Text)
assessmentControlSet_description :: (Maybe Text -> f (Maybe Text))
-> AssessmentControlSet -> f AssessmentControlSet
assessmentControlSet_description = (AssessmentControlSet -> Maybe Text)
-> (AssessmentControlSet -> Maybe Text -> AssessmentControlSet)
-> Lens
     AssessmentControlSet AssessmentControlSet (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssessmentControlSet' {Maybe Text
description :: Maybe Text
$sel:description:AssessmentControlSet' :: AssessmentControlSet -> Maybe Text
description} -> Maybe Text
description) (\s :: AssessmentControlSet
s@AssessmentControlSet' {} Maybe Text
a -> AssessmentControlSet
s {$sel:description:AssessmentControlSet' :: Maybe Text
description = Maybe Text
a} :: AssessmentControlSet)

instance Core.FromJSON AssessmentControlSet where
  parseJSON :: Value -> Parser AssessmentControlSet
parseJSON =
    String
-> (Object -> Parser AssessmentControlSet)
-> Value
-> Parser AssessmentControlSet
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"AssessmentControlSet"
      ( \Object
x ->
          Maybe ControlSetStatus
-> Maybe [AssessmentControl]
-> Maybe [Role]
-> Maybe Int
-> Maybe [Delegation]
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> AssessmentControlSet
AssessmentControlSet'
            (Maybe ControlSetStatus
 -> Maybe [AssessmentControl]
 -> Maybe [Role]
 -> Maybe Int
 -> Maybe [Delegation]
 -> Maybe Int
 -> Maybe Text
 -> Maybe Text
 -> AssessmentControlSet)
-> Parser (Maybe ControlSetStatus)
-> Parser
     (Maybe [AssessmentControl]
      -> Maybe [Role]
      -> Maybe Int
      -> Maybe [Delegation]
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> AssessmentControlSet)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ControlSetStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"status")
            Parser
  (Maybe [AssessmentControl]
   -> Maybe [Role]
   -> Maybe Int
   -> Maybe [Delegation]
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> AssessmentControlSet)
-> Parser (Maybe [AssessmentControl])
-> Parser
     (Maybe [Role]
      -> Maybe Int
      -> Maybe [Delegation]
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> AssessmentControlSet)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [AssessmentControl]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"controls" Parser (Maybe (Maybe [AssessmentControl]))
-> Maybe [AssessmentControl] -> Parser (Maybe [AssessmentControl])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [AssessmentControl]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe [Role]
   -> Maybe Int
   -> Maybe [Delegation]
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> AssessmentControlSet)
-> Parser (Maybe [Role])
-> Parser
     (Maybe Int
      -> Maybe [Delegation]
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> AssessmentControlSet)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Role]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"roles" Parser (Maybe (Maybe [Role]))
-> Maybe [Role] -> Parser (Maybe [Role])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Role]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Int
   -> Maybe [Delegation]
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> AssessmentControlSet)
-> Parser (Maybe Int)
-> Parser
     (Maybe [Delegation]
      -> Maybe Int -> Maybe Text -> Maybe Text -> AssessmentControlSet)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"manualEvidenceCount")
            Parser
  (Maybe [Delegation]
   -> Maybe Int -> Maybe Text -> Maybe Text -> AssessmentControlSet)
-> Parser (Maybe [Delegation])
-> Parser
     (Maybe Int -> Maybe Text -> Maybe Text -> AssessmentControlSet)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Delegation]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"delegations" Parser (Maybe (Maybe [Delegation]))
-> Maybe [Delegation] -> Parser (Maybe [Delegation])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Delegation]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Int -> Maybe Text -> Maybe Text -> AssessmentControlSet)
-> Parser (Maybe Int)
-> Parser (Maybe Text -> Maybe Text -> AssessmentControlSet)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"systemEvidenceCount")
            Parser (Maybe Text -> Maybe Text -> AssessmentControlSet)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> AssessmentControlSet)
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
"id")
            Parser (Maybe Text -> AssessmentControlSet)
-> Parser (Maybe Text) -> Parser AssessmentControlSet
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 AssessmentControlSet

instance Prelude.NFData AssessmentControlSet