{-# 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.Framework
-- 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.Framework where

import Amazonka.AuditManager.Types.ControlSet
import Amazonka.AuditManager.Types.FrameworkType
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | The file used to structure and automate Audit Manager assessments for a
-- given compliance standard.
--
-- /See:/ 'newFramework' smart constructor.
data Framework = Framework'
  { -- | The IAM user or role that most recently updated the framework.
    Framework -> Maybe Text
lastUpdatedBy :: Prelude.Maybe Prelude.Text,
    -- | Specifies when the framework was most recently updated.
    Framework -> Maybe POSIX
lastUpdatedAt :: Prelude.Maybe Core.POSIX,
    -- | The Amazon Resource Name (ARN) of the specified framework.
    Framework -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | Specifies when the framework was created.
    Framework -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
    -- | The IAM user or role that created the framework.
    Framework -> Maybe Text
createdBy :: Prelude.Maybe Prelude.Text,
    -- | The control sets associated with the framework.
    Framework -> Maybe (NonEmpty ControlSet)
controlSets :: Prelude.Maybe (Prelude.NonEmpty ControlSet),
    -- | The sources from which Audit Manager collects evidence for the control.
    Framework -> Maybe Text
controlSources :: Prelude.Maybe Prelude.Text,
    -- | The name of the specified framework.
    Framework -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The compliance type that the new custom framework supports, such as CIS
    -- or HIPAA.
    Framework -> Maybe Text
complianceType :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier for the specified framework.
    Framework -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The framework type, such as custom or standard.
    Framework -> Maybe FrameworkType
type' :: Prelude.Maybe FrameworkType,
    -- | The logo associated with the framework.
    Framework -> Maybe Text
logo :: Prelude.Maybe Prelude.Text,
    -- | The description of the specified framework.
    Framework -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The tags associated with the framework.
    Framework -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
  }
  deriving (Framework -> Framework -> Bool
(Framework -> Framework -> Bool)
-> (Framework -> Framework -> Bool) -> Eq Framework
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Framework -> Framework -> Bool
$c/= :: Framework -> Framework -> Bool
== :: Framework -> Framework -> Bool
$c== :: Framework -> Framework -> Bool
Prelude.Eq, ReadPrec [Framework]
ReadPrec Framework
Int -> ReadS Framework
ReadS [Framework]
(Int -> ReadS Framework)
-> ReadS [Framework]
-> ReadPrec Framework
-> ReadPrec [Framework]
-> Read Framework
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Framework]
$creadListPrec :: ReadPrec [Framework]
readPrec :: ReadPrec Framework
$creadPrec :: ReadPrec Framework
readList :: ReadS [Framework]
$creadList :: ReadS [Framework]
readsPrec :: Int -> ReadS Framework
$creadsPrec :: Int -> ReadS Framework
Prelude.Read, Int -> Framework -> ShowS
[Framework] -> ShowS
Framework -> String
(Int -> Framework -> ShowS)
-> (Framework -> String)
-> ([Framework] -> ShowS)
-> Show Framework
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Framework] -> ShowS
$cshowList :: [Framework] -> ShowS
show :: Framework -> String
$cshow :: Framework -> String
showsPrec :: Int -> Framework -> ShowS
$cshowsPrec :: Int -> Framework -> ShowS
Prelude.Show, (forall x. Framework -> Rep Framework x)
-> (forall x. Rep Framework x -> Framework) -> Generic Framework
forall x. Rep Framework x -> Framework
forall x. Framework -> Rep Framework x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Framework x -> Framework
$cfrom :: forall x. Framework -> Rep Framework x
Prelude.Generic)

-- |
-- Create a value of 'Framework' 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:
--
-- 'lastUpdatedBy', 'framework_lastUpdatedBy' - The IAM user or role that most recently updated the framework.
--
-- 'lastUpdatedAt', 'framework_lastUpdatedAt' - Specifies when the framework was most recently updated.
--
-- 'arn', 'framework_arn' - The Amazon Resource Name (ARN) of the specified framework.
--
-- 'createdAt', 'framework_createdAt' - Specifies when the framework was created.
--
-- 'createdBy', 'framework_createdBy' - The IAM user or role that created the framework.
--
-- 'controlSets', 'framework_controlSets' - The control sets associated with the framework.
--
-- 'controlSources', 'framework_controlSources' - The sources from which Audit Manager collects evidence for the control.
--
-- 'name', 'framework_name' - The name of the specified framework.
--
-- 'complianceType', 'framework_complianceType' - The compliance type that the new custom framework supports, such as CIS
-- or HIPAA.
--
-- 'id', 'framework_id' - The unique identifier for the specified framework.
--
-- 'type'', 'framework_type' - The framework type, such as custom or standard.
--
-- 'logo', 'framework_logo' - The logo associated with the framework.
--
-- 'description', 'framework_description' - The description of the specified framework.
--
-- 'tags', 'framework_tags' - The tags associated with the framework.
newFramework ::
  Framework
newFramework :: Framework
newFramework =
  Framework' :: Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe (NonEmpty ControlSet)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe FrameworkType
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Framework
Framework'
    { $sel:lastUpdatedBy:Framework' :: Maybe Text
lastUpdatedBy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedAt:Framework' :: Maybe POSIX
lastUpdatedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:Framework' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:Framework' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:createdBy:Framework' :: Maybe Text
createdBy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:controlSets:Framework' :: Maybe (NonEmpty ControlSet)
controlSets = Maybe (NonEmpty ControlSet)
forall a. Maybe a
Prelude.Nothing,
      $sel:controlSources:Framework' :: Maybe Text
controlSources = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:Framework' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:complianceType:Framework' :: Maybe Text
complianceType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:id:Framework' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:type':Framework' :: Maybe FrameworkType
type' = Maybe FrameworkType
forall a. Maybe a
Prelude.Nothing,
      $sel:logo:Framework' :: Maybe Text
logo = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:Framework' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:Framework' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing
    }

-- | The IAM user or role that most recently updated the framework.
framework_lastUpdatedBy :: Lens.Lens' Framework (Prelude.Maybe Prelude.Text)
framework_lastUpdatedBy :: (Maybe Text -> f (Maybe Text)) -> Framework -> f Framework
framework_lastUpdatedBy = (Framework -> Maybe Text)
-> (Framework -> Maybe Text -> Framework)
-> Lens Framework Framework (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Framework' {Maybe Text
lastUpdatedBy :: Maybe Text
$sel:lastUpdatedBy:Framework' :: Framework -> Maybe Text
lastUpdatedBy} -> Maybe Text
lastUpdatedBy) (\s :: Framework
s@Framework' {} Maybe Text
a -> Framework
s {$sel:lastUpdatedBy:Framework' :: Maybe Text
lastUpdatedBy = Maybe Text
a} :: Framework)

-- | Specifies when the framework was most recently updated.
framework_lastUpdatedAt :: Lens.Lens' Framework (Prelude.Maybe Prelude.UTCTime)
framework_lastUpdatedAt :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Framework -> f Framework
framework_lastUpdatedAt = (Framework -> Maybe POSIX)
-> (Framework -> Maybe POSIX -> Framework)
-> Lens Framework Framework (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Framework' {Maybe POSIX
lastUpdatedAt :: Maybe POSIX
$sel:lastUpdatedAt:Framework' :: Framework -> Maybe POSIX
lastUpdatedAt} -> Maybe POSIX
lastUpdatedAt) (\s :: Framework
s@Framework' {} Maybe POSIX
a -> Framework
s {$sel:lastUpdatedAt:Framework' :: Maybe POSIX
lastUpdatedAt = Maybe POSIX
a} :: Framework) ((Maybe POSIX -> f (Maybe POSIX)) -> Framework -> f Framework)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Framework
-> f Framework
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 Amazon Resource Name (ARN) of the specified framework.
framework_arn :: Lens.Lens' Framework (Prelude.Maybe Prelude.Text)
framework_arn :: (Maybe Text -> f (Maybe Text)) -> Framework -> f Framework
framework_arn = (Framework -> Maybe Text)
-> (Framework -> Maybe Text -> Framework)
-> Lens Framework Framework (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Framework' {Maybe Text
arn :: Maybe Text
$sel:arn:Framework' :: Framework -> Maybe Text
arn} -> Maybe Text
arn) (\s :: Framework
s@Framework' {} Maybe Text
a -> Framework
s {$sel:arn:Framework' :: Maybe Text
arn = Maybe Text
a} :: Framework)

-- | Specifies when the framework was created.
framework_createdAt :: Lens.Lens' Framework (Prelude.Maybe Prelude.UTCTime)
framework_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Framework -> f Framework
framework_createdAt = (Framework -> Maybe POSIX)
-> (Framework -> Maybe POSIX -> Framework)
-> Lens Framework Framework (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Framework' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:Framework' :: Framework -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: Framework
s@Framework' {} Maybe POSIX
a -> Framework
s {$sel:createdAt:Framework' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: Framework) ((Maybe POSIX -> f (Maybe POSIX)) -> Framework -> f Framework)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Framework
-> f Framework
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 IAM user or role that created the framework.
framework_createdBy :: Lens.Lens' Framework (Prelude.Maybe Prelude.Text)
framework_createdBy :: (Maybe Text -> f (Maybe Text)) -> Framework -> f Framework
framework_createdBy = (Framework -> Maybe Text)
-> (Framework -> Maybe Text -> Framework)
-> Lens Framework Framework (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Framework' {Maybe Text
createdBy :: Maybe Text
$sel:createdBy:Framework' :: Framework -> Maybe Text
createdBy} -> Maybe Text
createdBy) (\s :: Framework
s@Framework' {} Maybe Text
a -> Framework
s {$sel:createdBy:Framework' :: Maybe Text
createdBy = Maybe Text
a} :: Framework)

-- | The control sets associated with the framework.
framework_controlSets :: Lens.Lens' Framework (Prelude.Maybe (Prelude.NonEmpty ControlSet))
framework_controlSets :: (Maybe (NonEmpty ControlSet) -> f (Maybe (NonEmpty ControlSet)))
-> Framework -> f Framework
framework_controlSets = (Framework -> Maybe (NonEmpty ControlSet))
-> (Framework -> Maybe (NonEmpty ControlSet) -> Framework)
-> Lens
     Framework
     Framework
     (Maybe (NonEmpty ControlSet))
     (Maybe (NonEmpty ControlSet))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Framework' {Maybe (NonEmpty ControlSet)
controlSets :: Maybe (NonEmpty ControlSet)
$sel:controlSets:Framework' :: Framework -> Maybe (NonEmpty ControlSet)
controlSets} -> Maybe (NonEmpty ControlSet)
controlSets) (\s :: Framework
s@Framework' {} Maybe (NonEmpty ControlSet)
a -> Framework
s {$sel:controlSets:Framework' :: Maybe (NonEmpty ControlSet)
controlSets = Maybe (NonEmpty ControlSet)
a} :: Framework) ((Maybe (NonEmpty ControlSet) -> f (Maybe (NonEmpty ControlSet)))
 -> Framework -> f Framework)
-> ((Maybe (NonEmpty ControlSet)
     -> f (Maybe (NonEmpty ControlSet)))
    -> Maybe (NonEmpty ControlSet) -> f (Maybe (NonEmpty ControlSet)))
-> (Maybe (NonEmpty ControlSet) -> f (Maybe (NonEmpty ControlSet)))
-> Framework
-> f Framework
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty ControlSet)
  (NonEmpty ControlSet)
  (NonEmpty ControlSet)
  (NonEmpty ControlSet)
-> Iso
     (Maybe (NonEmpty ControlSet))
     (Maybe (NonEmpty ControlSet))
     (Maybe (NonEmpty ControlSet))
     (Maybe (NonEmpty ControlSet))
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
  (NonEmpty ControlSet)
  (NonEmpty ControlSet)
  (NonEmpty ControlSet)
  (NonEmpty ControlSet)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The sources from which Audit Manager collects evidence for the control.
framework_controlSources :: Lens.Lens' Framework (Prelude.Maybe Prelude.Text)
framework_controlSources :: (Maybe Text -> f (Maybe Text)) -> Framework -> f Framework
framework_controlSources = (Framework -> Maybe Text)
-> (Framework -> Maybe Text -> Framework)
-> Lens Framework Framework (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Framework' {Maybe Text
controlSources :: Maybe Text
$sel:controlSources:Framework' :: Framework -> Maybe Text
controlSources} -> Maybe Text
controlSources) (\s :: Framework
s@Framework' {} Maybe Text
a -> Framework
s {$sel:controlSources:Framework' :: Maybe Text
controlSources = Maybe Text
a} :: Framework)

-- | The name of the specified framework.
framework_name :: Lens.Lens' Framework (Prelude.Maybe Prelude.Text)
framework_name :: (Maybe Text -> f (Maybe Text)) -> Framework -> f Framework
framework_name = (Framework -> Maybe Text)
-> (Framework -> Maybe Text -> Framework)
-> Lens Framework Framework (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Framework' {Maybe Text
name :: Maybe Text
$sel:name:Framework' :: Framework -> Maybe Text
name} -> Maybe Text
name) (\s :: Framework
s@Framework' {} Maybe Text
a -> Framework
s {$sel:name:Framework' :: Maybe Text
name = Maybe Text
a} :: Framework)

-- | The compliance type that the new custom framework supports, such as CIS
-- or HIPAA.
framework_complianceType :: Lens.Lens' Framework (Prelude.Maybe Prelude.Text)
framework_complianceType :: (Maybe Text -> f (Maybe Text)) -> Framework -> f Framework
framework_complianceType = (Framework -> Maybe Text)
-> (Framework -> Maybe Text -> Framework)
-> Lens Framework Framework (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Framework' {Maybe Text
complianceType :: Maybe Text
$sel:complianceType:Framework' :: Framework -> Maybe Text
complianceType} -> Maybe Text
complianceType) (\s :: Framework
s@Framework' {} Maybe Text
a -> Framework
s {$sel:complianceType:Framework' :: Maybe Text
complianceType = Maybe Text
a} :: Framework)

-- | The unique identifier for the specified framework.
framework_id :: Lens.Lens' Framework (Prelude.Maybe Prelude.Text)
framework_id :: (Maybe Text -> f (Maybe Text)) -> Framework -> f Framework
framework_id = (Framework -> Maybe Text)
-> (Framework -> Maybe Text -> Framework)
-> Lens Framework Framework (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Framework' {Maybe Text
id :: Maybe Text
$sel:id:Framework' :: Framework -> Maybe Text
id} -> Maybe Text
id) (\s :: Framework
s@Framework' {} Maybe Text
a -> Framework
s {$sel:id:Framework' :: Maybe Text
id = Maybe Text
a} :: Framework)

-- | The framework type, such as custom or standard.
framework_type :: Lens.Lens' Framework (Prelude.Maybe FrameworkType)
framework_type :: (Maybe FrameworkType -> f (Maybe FrameworkType))
-> Framework -> f Framework
framework_type = (Framework -> Maybe FrameworkType)
-> (Framework -> Maybe FrameworkType -> Framework)
-> Lens
     Framework Framework (Maybe FrameworkType) (Maybe FrameworkType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Framework' {Maybe FrameworkType
type' :: Maybe FrameworkType
$sel:type':Framework' :: Framework -> Maybe FrameworkType
type'} -> Maybe FrameworkType
type') (\s :: Framework
s@Framework' {} Maybe FrameworkType
a -> Framework
s {$sel:type':Framework' :: Maybe FrameworkType
type' = Maybe FrameworkType
a} :: Framework)

-- | The logo associated with the framework.
framework_logo :: Lens.Lens' Framework (Prelude.Maybe Prelude.Text)
 = (Framework -> Maybe Text)
-> (Framework -> Maybe Text -> Framework)
-> Lens Framework Framework (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Framework' {Maybe Text
logo :: Maybe Text
$sel:logo:Framework' :: Framework -> Maybe Text
logo} -> Maybe Text
logo) (\s :: Framework
s@Framework' {} Maybe Text
a -> Framework
s {$sel:logo:Framework' :: Maybe Text
logo = Maybe Text
a} :: Framework)

-- | The description of the specified framework.
framework_description :: Lens.Lens' Framework (Prelude.Maybe Prelude.Text)
framework_description :: (Maybe Text -> f (Maybe Text)) -> Framework -> f Framework
framework_description = (Framework -> Maybe Text)
-> (Framework -> Maybe Text -> Framework)
-> Lens Framework Framework (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Framework' {Maybe Text
description :: Maybe Text
$sel:description:Framework' :: Framework -> Maybe Text
description} -> Maybe Text
description) (\s :: Framework
s@Framework' {} Maybe Text
a -> Framework
s {$sel:description:Framework' :: Maybe Text
description = Maybe Text
a} :: Framework)

-- | The tags associated with the framework.
framework_tags :: Lens.Lens' Framework (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
framework_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Framework -> f Framework
framework_tags = (Framework -> Maybe (HashMap Text Text))
-> (Framework -> Maybe (HashMap Text Text) -> Framework)
-> Lens
     Framework
     Framework
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Framework' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:Framework' :: Framework -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: Framework
s@Framework' {} Maybe (HashMap Text Text)
a -> Framework
s {$sel:tags:Framework' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: Framework) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> Framework -> f Framework)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Framework
-> f Framework
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text 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
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.FromJSON Framework where
  parseJSON :: Value -> Parser Framework
parseJSON =
    String -> (Object -> Parser Framework) -> Value -> Parser Framework
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Framework"
      ( \Object
x ->
          Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe (NonEmpty ControlSet)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe FrameworkType
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Framework
Framework'
            (Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe (NonEmpty ControlSet)
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe FrameworkType
 -> Maybe Text
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Framework)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (NonEmpty ControlSet)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe FrameworkType
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Framework)
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
"lastUpdatedBy")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe (NonEmpty ControlSet)
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe FrameworkType
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Framework)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (NonEmpty ControlSet)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe FrameworkType
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Framework)
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
"lastUpdatedAt")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe (NonEmpty ControlSet)
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe FrameworkType
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Framework)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe (NonEmpty ControlSet)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe FrameworkType
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Framework)
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
"arn")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe (NonEmpty ControlSet)
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe FrameworkType
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Framework)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe (NonEmpty ControlSet)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe FrameworkType
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Framework)
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
"createdAt")
            Parser
  (Maybe Text
   -> Maybe (NonEmpty ControlSet)
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe FrameworkType
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Framework)
-> Parser (Maybe Text)
-> Parser
     (Maybe (NonEmpty ControlSet)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe FrameworkType
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Framework)
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
"createdBy")
            Parser
  (Maybe (NonEmpty ControlSet)
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe FrameworkType
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Framework)
-> Parser (Maybe (NonEmpty ControlSet))
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe FrameworkType
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Framework)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty ControlSet))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"controlSets")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe FrameworkType
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Framework)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe FrameworkType
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Framework)
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
"controlSources")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe FrameworkType
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Framework)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe FrameworkType
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Framework)
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
"name")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe FrameworkType
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Framework)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe FrameworkType
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Framework)
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
"complianceType")
            Parser
  (Maybe Text
   -> Maybe FrameworkType
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Framework)
-> Parser (Maybe Text)
-> Parser
     (Maybe FrameworkType
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Framework)
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 FrameworkType
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Framework)
-> Parser (Maybe FrameworkType)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe (HashMap Text Text) -> Framework)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe FrameworkType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"type")
            Parser
  (Maybe Text
   -> Maybe Text -> Maybe (HashMap Text Text) -> Framework)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe (HashMap Text Text) -> Framework)
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
"logo")
            Parser (Maybe Text -> Maybe (HashMap Text Text) -> Framework)
-> Parser (Maybe Text)
-> Parser (Maybe (HashMap Text Text) -> Framework)
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")
            Parser (Maybe (HashMap Text Text) -> Framework)
-> Parser (Maybe (HashMap Text Text)) -> Parser Framework
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tags" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable Framework

instance Prelude.NFData Framework