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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | The metadata of a framework, such as the name, ID, description, and so
-- on.
--
-- /See:/ 'newFrameworkMetadata' smart constructor.
data FrameworkMetadata = FrameworkMetadata'
  { -- | The name of the framework.
    FrameworkMetadata -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The compliance standard associated with the framework, such as PCI-DSS
    -- or HIPAA.
    FrameworkMetadata -> Maybe Text
complianceType :: Prelude.Maybe Prelude.Text,
    -- | The logo associated with the framework.
    FrameworkMetadata -> Maybe Text
logo :: Prelude.Maybe Prelude.Text,
    -- | The description of the framework.
    FrameworkMetadata -> Maybe Text
description :: Prelude.Maybe Prelude.Text
  }
  deriving (FrameworkMetadata -> FrameworkMetadata -> Bool
(FrameworkMetadata -> FrameworkMetadata -> Bool)
-> (FrameworkMetadata -> FrameworkMetadata -> Bool)
-> Eq FrameworkMetadata
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FrameworkMetadata -> FrameworkMetadata -> Bool
$c/= :: FrameworkMetadata -> FrameworkMetadata -> Bool
== :: FrameworkMetadata -> FrameworkMetadata -> Bool
$c== :: FrameworkMetadata -> FrameworkMetadata -> Bool
Prelude.Eq, ReadPrec [FrameworkMetadata]
ReadPrec FrameworkMetadata
Int -> ReadS FrameworkMetadata
ReadS [FrameworkMetadata]
(Int -> ReadS FrameworkMetadata)
-> ReadS [FrameworkMetadata]
-> ReadPrec FrameworkMetadata
-> ReadPrec [FrameworkMetadata]
-> Read FrameworkMetadata
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FrameworkMetadata]
$creadListPrec :: ReadPrec [FrameworkMetadata]
readPrec :: ReadPrec FrameworkMetadata
$creadPrec :: ReadPrec FrameworkMetadata
readList :: ReadS [FrameworkMetadata]
$creadList :: ReadS [FrameworkMetadata]
readsPrec :: Int -> ReadS FrameworkMetadata
$creadsPrec :: Int -> ReadS FrameworkMetadata
Prelude.Read, Int -> FrameworkMetadata -> ShowS
[FrameworkMetadata] -> ShowS
FrameworkMetadata -> String
(Int -> FrameworkMetadata -> ShowS)
-> (FrameworkMetadata -> String)
-> ([FrameworkMetadata] -> ShowS)
-> Show FrameworkMetadata
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FrameworkMetadata] -> ShowS
$cshowList :: [FrameworkMetadata] -> ShowS
show :: FrameworkMetadata -> String
$cshow :: FrameworkMetadata -> String
showsPrec :: Int -> FrameworkMetadata -> ShowS
$cshowsPrec :: Int -> FrameworkMetadata -> ShowS
Prelude.Show, (forall x. FrameworkMetadata -> Rep FrameworkMetadata x)
-> (forall x. Rep FrameworkMetadata x -> FrameworkMetadata)
-> Generic FrameworkMetadata
forall x. Rep FrameworkMetadata x -> FrameworkMetadata
forall x. FrameworkMetadata -> Rep FrameworkMetadata x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep FrameworkMetadata x -> FrameworkMetadata
$cfrom :: forall x. FrameworkMetadata -> Rep FrameworkMetadata x
Prelude.Generic)

-- |
-- Create a value of 'FrameworkMetadata' 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:
--
-- 'name', 'frameworkMetadata_name' - The name of the framework.
--
-- 'complianceType', 'frameworkMetadata_complianceType' - The compliance standard associated with the framework, such as PCI-DSS
-- or HIPAA.
--
-- 'logo', 'frameworkMetadata_logo' - The logo associated with the framework.
--
-- 'description', 'frameworkMetadata_description' - The description of the framework.
newFrameworkMetadata ::
  FrameworkMetadata
newFrameworkMetadata :: FrameworkMetadata
newFrameworkMetadata =
  FrameworkMetadata' :: Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> FrameworkMetadata
FrameworkMetadata'
    { $sel:name:FrameworkMetadata' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:complianceType:FrameworkMetadata' :: Maybe Text
complianceType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:logo:FrameworkMetadata' :: Maybe Text
logo = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:FrameworkMetadata' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

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

-- | The compliance standard associated with the framework, such as PCI-DSS
-- or HIPAA.
frameworkMetadata_complianceType :: Lens.Lens' FrameworkMetadata (Prelude.Maybe Prelude.Text)
frameworkMetadata_complianceType :: (Maybe Text -> f (Maybe Text))
-> FrameworkMetadata -> f FrameworkMetadata
frameworkMetadata_complianceType = (FrameworkMetadata -> Maybe Text)
-> (FrameworkMetadata -> Maybe Text -> FrameworkMetadata)
-> Lens
     FrameworkMetadata FrameworkMetadata (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FrameworkMetadata' {Maybe Text
complianceType :: Maybe Text
$sel:complianceType:FrameworkMetadata' :: FrameworkMetadata -> Maybe Text
complianceType} -> Maybe Text
complianceType) (\s :: FrameworkMetadata
s@FrameworkMetadata' {} Maybe Text
a -> FrameworkMetadata
s {$sel:complianceType:FrameworkMetadata' :: Maybe Text
complianceType = Maybe Text
a} :: FrameworkMetadata)

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

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

instance Core.FromJSON FrameworkMetadata where
  parseJSON :: Value -> Parser FrameworkMetadata
parseJSON =
    String
-> (Object -> Parser FrameworkMetadata)
-> Value
-> Parser FrameworkMetadata
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"FrameworkMetadata"
      ( \Object
x ->
          Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> FrameworkMetadata
FrameworkMetadata'
            (Maybe Text
 -> Maybe Text -> Maybe Text -> Maybe Text -> FrameworkMetadata)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe Text -> Maybe Text -> FrameworkMetadata)
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
"name")
            Parser
  (Maybe Text -> Maybe Text -> Maybe Text -> FrameworkMetadata)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> FrameworkMetadata)
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 Text -> FrameworkMetadata)
-> Parser (Maybe Text) -> Parser (Maybe Text -> FrameworkMetadata)
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 -> FrameworkMetadata)
-> Parser (Maybe Text) -> Parser FrameworkMetadata
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 FrameworkMetadata

instance Prelude.NFData FrameworkMetadata