{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# 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.CreateAssessmentFramework
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a custom framework in Audit Manager.
module Amazonka.AuditManager.CreateAssessmentFramework
  ( -- * Creating a Request
    CreateAssessmentFramework (..),
    newCreateAssessmentFramework,

    -- * Request Lenses
    createAssessmentFramework_complianceType,
    createAssessmentFramework_description,
    createAssessmentFramework_tags,
    createAssessmentFramework_name,
    createAssessmentFramework_controlSets,

    -- * Destructuring the Response
    CreateAssessmentFrameworkResponse (..),
    newCreateAssessmentFrameworkResponse,

    -- * Response Lenses
    createAssessmentFrameworkResponse_framework,
    createAssessmentFrameworkResponse_httpStatus,
  )
where

import Amazonka.AuditManager.Types
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
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newCreateAssessmentFramework' smart constructor.
data CreateAssessmentFramework = CreateAssessmentFramework'
  { -- | The compliance type that the new custom framework supports, such as CIS
    -- or HIPAA.
    CreateAssessmentFramework -> Maybe Text
complianceType :: Prelude.Maybe Prelude.Text,
    -- | An optional description for the new custom framework.
    CreateAssessmentFramework -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The tags that are associated with the framework.
    CreateAssessmentFramework -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The name of the new custom framework.
    CreateAssessmentFramework -> Text
name :: Prelude.Text,
    -- | The control sets that are associated with the framework.
    CreateAssessmentFramework
-> NonEmpty CreateAssessmentFrameworkControlSet
controlSets :: Prelude.NonEmpty CreateAssessmentFrameworkControlSet
  }
  deriving (CreateAssessmentFramework -> CreateAssessmentFramework -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateAssessmentFramework -> CreateAssessmentFramework -> Bool
$c/= :: CreateAssessmentFramework -> CreateAssessmentFramework -> Bool
== :: CreateAssessmentFramework -> CreateAssessmentFramework -> Bool
$c== :: CreateAssessmentFramework -> CreateAssessmentFramework -> Bool
Prelude.Eq, ReadPrec [CreateAssessmentFramework]
ReadPrec CreateAssessmentFramework
Int -> ReadS CreateAssessmentFramework
ReadS [CreateAssessmentFramework]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateAssessmentFramework]
$creadListPrec :: ReadPrec [CreateAssessmentFramework]
readPrec :: ReadPrec CreateAssessmentFramework
$creadPrec :: ReadPrec CreateAssessmentFramework
readList :: ReadS [CreateAssessmentFramework]
$creadList :: ReadS [CreateAssessmentFramework]
readsPrec :: Int -> ReadS CreateAssessmentFramework
$creadsPrec :: Int -> ReadS CreateAssessmentFramework
Prelude.Read, Int -> CreateAssessmentFramework -> ShowS
[CreateAssessmentFramework] -> ShowS
CreateAssessmentFramework -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateAssessmentFramework] -> ShowS
$cshowList :: [CreateAssessmentFramework] -> ShowS
show :: CreateAssessmentFramework -> String
$cshow :: CreateAssessmentFramework -> String
showsPrec :: Int -> CreateAssessmentFramework -> ShowS
$cshowsPrec :: Int -> CreateAssessmentFramework -> ShowS
Prelude.Show, forall x.
Rep CreateAssessmentFramework x -> CreateAssessmentFramework
forall x.
CreateAssessmentFramework -> Rep CreateAssessmentFramework x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateAssessmentFramework x -> CreateAssessmentFramework
$cfrom :: forall x.
CreateAssessmentFramework -> Rep CreateAssessmentFramework x
Prelude.Generic)

-- |
-- Create a value of 'CreateAssessmentFramework' 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:
--
-- 'complianceType', 'createAssessmentFramework_complianceType' - The compliance type that the new custom framework supports, such as CIS
-- or HIPAA.
--
-- 'description', 'createAssessmentFramework_description' - An optional description for the new custom framework.
--
-- 'tags', 'createAssessmentFramework_tags' - The tags that are associated with the framework.
--
-- 'name', 'createAssessmentFramework_name' - The name of the new custom framework.
--
-- 'controlSets', 'createAssessmentFramework_controlSets' - The control sets that are associated with the framework.
newCreateAssessmentFramework ::
  -- | 'name'
  Prelude.Text ->
  -- | 'controlSets'
  Prelude.NonEmpty CreateAssessmentFrameworkControlSet ->
  CreateAssessmentFramework
newCreateAssessmentFramework :: Text
-> NonEmpty CreateAssessmentFrameworkControlSet
-> CreateAssessmentFramework
newCreateAssessmentFramework Text
pName_ NonEmpty CreateAssessmentFrameworkControlSet
pControlSets_ =
  CreateAssessmentFramework'
    { $sel:complianceType:CreateAssessmentFramework' :: Maybe Text
complianceType =
        forall a. Maybe a
Prelude.Nothing,
      $sel:description:CreateAssessmentFramework' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateAssessmentFramework' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:name:CreateAssessmentFramework' :: Text
name = Text
pName_,
      $sel:controlSets:CreateAssessmentFramework' :: NonEmpty CreateAssessmentFrameworkControlSet
controlSets = forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced forall t b. AReview t b -> b -> t
Lens.# NonEmpty CreateAssessmentFrameworkControlSet
pControlSets_
    }

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

-- | An optional description for the new custom framework.
createAssessmentFramework_description :: Lens.Lens' CreateAssessmentFramework (Prelude.Maybe Prelude.Text)
createAssessmentFramework_description :: Lens' CreateAssessmentFramework (Maybe Text)
createAssessmentFramework_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAssessmentFramework' {Maybe Text
description :: Maybe Text
$sel:description:CreateAssessmentFramework' :: CreateAssessmentFramework -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateAssessmentFramework
s@CreateAssessmentFramework' {} Maybe Text
a -> CreateAssessmentFramework
s {$sel:description:CreateAssessmentFramework' :: Maybe Text
description = Maybe Text
a} :: CreateAssessmentFramework)

-- | The tags that are associated with the framework.
createAssessmentFramework_tags :: Lens.Lens' CreateAssessmentFramework (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createAssessmentFramework_tags :: Lens' CreateAssessmentFramework (Maybe (HashMap Text Text))
createAssessmentFramework_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAssessmentFramework' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateAssessmentFramework' :: CreateAssessmentFramework -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateAssessmentFramework
s@CreateAssessmentFramework' {} Maybe (HashMap Text Text)
a -> CreateAssessmentFramework
s {$sel:tags:CreateAssessmentFramework' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateAssessmentFramework) 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 name of the new custom framework.
createAssessmentFramework_name :: Lens.Lens' CreateAssessmentFramework Prelude.Text
createAssessmentFramework_name :: Lens' CreateAssessmentFramework Text
createAssessmentFramework_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAssessmentFramework' {Text
name :: Text
$sel:name:CreateAssessmentFramework' :: CreateAssessmentFramework -> Text
name} -> Text
name) (\s :: CreateAssessmentFramework
s@CreateAssessmentFramework' {} Text
a -> CreateAssessmentFramework
s {$sel:name:CreateAssessmentFramework' :: Text
name = Text
a} :: CreateAssessmentFramework)

-- | The control sets that are associated with the framework.
createAssessmentFramework_controlSets :: Lens.Lens' CreateAssessmentFramework (Prelude.NonEmpty CreateAssessmentFrameworkControlSet)
createAssessmentFramework_controlSets :: Lens'
  CreateAssessmentFramework
  (NonEmpty CreateAssessmentFrameworkControlSet)
createAssessmentFramework_controlSets = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAssessmentFramework' {NonEmpty CreateAssessmentFrameworkControlSet
controlSets :: NonEmpty CreateAssessmentFrameworkControlSet
$sel:controlSets:CreateAssessmentFramework' :: CreateAssessmentFramework
-> NonEmpty CreateAssessmentFrameworkControlSet
controlSets} -> NonEmpty CreateAssessmentFrameworkControlSet
controlSets) (\s :: CreateAssessmentFramework
s@CreateAssessmentFramework' {} NonEmpty CreateAssessmentFrameworkControlSet
a -> CreateAssessmentFramework
s {$sel:controlSets:CreateAssessmentFramework' :: NonEmpty CreateAssessmentFrameworkControlSet
controlSets = NonEmpty CreateAssessmentFrameworkControlSet
a} :: CreateAssessmentFramework) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.AWSRequest CreateAssessmentFramework where
  type
    AWSResponse CreateAssessmentFramework =
      CreateAssessmentFrameworkResponse
  request :: (Service -> Service)
-> CreateAssessmentFramework -> Request CreateAssessmentFramework
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateAssessmentFramework
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateAssessmentFramework)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Framework -> Int -> CreateAssessmentFrameworkResponse
CreateAssessmentFrameworkResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"framework")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable CreateAssessmentFramework where
  hashWithSalt :: Int -> CreateAssessmentFramework -> Int
hashWithSalt Int
_salt CreateAssessmentFramework' {Maybe Text
Maybe (HashMap Text Text)
NonEmpty CreateAssessmentFrameworkControlSet
Text
controlSets :: NonEmpty CreateAssessmentFrameworkControlSet
name :: Text
tags :: Maybe (HashMap Text Text)
description :: Maybe Text
complianceType :: Maybe Text
$sel:controlSets:CreateAssessmentFramework' :: CreateAssessmentFramework
-> NonEmpty CreateAssessmentFrameworkControlSet
$sel:name:CreateAssessmentFramework' :: CreateAssessmentFramework -> Text
$sel:tags:CreateAssessmentFramework' :: CreateAssessmentFramework -> Maybe (HashMap Text Text)
$sel:description:CreateAssessmentFramework' :: CreateAssessmentFramework -> Maybe Text
$sel:complianceType:CreateAssessmentFramework' :: CreateAssessmentFramework -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
complianceType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` NonEmpty CreateAssessmentFrameworkControlSet
controlSets

instance Prelude.NFData CreateAssessmentFramework where
  rnf :: CreateAssessmentFramework -> ()
rnf CreateAssessmentFramework' {Maybe Text
Maybe (HashMap Text Text)
NonEmpty CreateAssessmentFrameworkControlSet
Text
controlSets :: NonEmpty CreateAssessmentFrameworkControlSet
name :: Text
tags :: Maybe (HashMap Text Text)
description :: Maybe Text
complianceType :: Maybe Text
$sel:controlSets:CreateAssessmentFramework' :: CreateAssessmentFramework
-> NonEmpty CreateAssessmentFrameworkControlSet
$sel:name:CreateAssessmentFramework' :: CreateAssessmentFramework -> Text
$sel:tags:CreateAssessmentFramework' :: CreateAssessmentFramework -> Maybe (HashMap Text Text)
$sel:description:CreateAssessmentFramework' :: CreateAssessmentFramework -> Maybe Text
$sel:complianceType:CreateAssessmentFramework' :: CreateAssessmentFramework -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
complianceType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf NonEmpty CreateAssessmentFrameworkControlSet
controlSets

instance Data.ToHeaders CreateAssessmentFramework where
  toHeaders :: CreateAssessmentFramework -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON CreateAssessmentFramework where
  toJSON :: CreateAssessmentFramework -> Value
toJSON CreateAssessmentFramework' {Maybe Text
Maybe (HashMap Text Text)
NonEmpty CreateAssessmentFrameworkControlSet
Text
controlSets :: NonEmpty CreateAssessmentFrameworkControlSet
name :: Text
tags :: Maybe (HashMap Text Text)
description :: Maybe Text
complianceType :: Maybe Text
$sel:controlSets:CreateAssessmentFramework' :: CreateAssessmentFramework
-> NonEmpty CreateAssessmentFrameworkControlSet
$sel:name:CreateAssessmentFramework' :: CreateAssessmentFramework -> Text
$sel:tags:CreateAssessmentFramework' :: CreateAssessmentFramework -> Maybe (HashMap Text Text)
$sel:description:CreateAssessmentFramework' :: CreateAssessmentFramework -> Maybe Text
$sel:complianceType:CreateAssessmentFramework' :: CreateAssessmentFramework -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"complianceType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
complianceType,
            (Key
"description" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
            (Key
"tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
            forall a. a -> Maybe a
Prelude.Just (Key
"name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
name),
            forall a. a -> Maybe a
Prelude.Just (Key
"controlSets" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= NonEmpty CreateAssessmentFrameworkControlSet
controlSets)
          ]
      )

instance Data.ToPath CreateAssessmentFramework where
  toPath :: CreateAssessmentFramework -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/assessmentFrameworks"

instance Data.ToQuery CreateAssessmentFramework where
  toQuery :: CreateAssessmentFramework -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newCreateAssessmentFrameworkResponse' smart constructor.
data CreateAssessmentFrameworkResponse = CreateAssessmentFrameworkResponse'
  { -- | The name of the new framework that the @CreateAssessmentFramework@ API
    -- returned.
    CreateAssessmentFrameworkResponse -> Maybe Framework
framework :: Prelude.Maybe Framework,
    -- | The response's http status code.
    CreateAssessmentFrameworkResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateAssessmentFrameworkResponse
-> CreateAssessmentFrameworkResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateAssessmentFrameworkResponse
-> CreateAssessmentFrameworkResponse -> Bool
$c/= :: CreateAssessmentFrameworkResponse
-> CreateAssessmentFrameworkResponse -> Bool
== :: CreateAssessmentFrameworkResponse
-> CreateAssessmentFrameworkResponse -> Bool
$c== :: CreateAssessmentFrameworkResponse
-> CreateAssessmentFrameworkResponse -> Bool
Prelude.Eq, ReadPrec [CreateAssessmentFrameworkResponse]
ReadPrec CreateAssessmentFrameworkResponse
Int -> ReadS CreateAssessmentFrameworkResponse
ReadS [CreateAssessmentFrameworkResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateAssessmentFrameworkResponse]
$creadListPrec :: ReadPrec [CreateAssessmentFrameworkResponse]
readPrec :: ReadPrec CreateAssessmentFrameworkResponse
$creadPrec :: ReadPrec CreateAssessmentFrameworkResponse
readList :: ReadS [CreateAssessmentFrameworkResponse]
$creadList :: ReadS [CreateAssessmentFrameworkResponse]
readsPrec :: Int -> ReadS CreateAssessmentFrameworkResponse
$creadsPrec :: Int -> ReadS CreateAssessmentFrameworkResponse
Prelude.Read, Int -> CreateAssessmentFrameworkResponse -> ShowS
[CreateAssessmentFrameworkResponse] -> ShowS
CreateAssessmentFrameworkResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateAssessmentFrameworkResponse] -> ShowS
$cshowList :: [CreateAssessmentFrameworkResponse] -> ShowS
show :: CreateAssessmentFrameworkResponse -> String
$cshow :: CreateAssessmentFrameworkResponse -> String
showsPrec :: Int -> CreateAssessmentFrameworkResponse -> ShowS
$cshowsPrec :: Int -> CreateAssessmentFrameworkResponse -> ShowS
Prelude.Show, forall x.
Rep CreateAssessmentFrameworkResponse x
-> CreateAssessmentFrameworkResponse
forall x.
CreateAssessmentFrameworkResponse
-> Rep CreateAssessmentFrameworkResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateAssessmentFrameworkResponse x
-> CreateAssessmentFrameworkResponse
$cfrom :: forall x.
CreateAssessmentFrameworkResponse
-> Rep CreateAssessmentFrameworkResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateAssessmentFrameworkResponse' 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:
--
-- 'framework', 'createAssessmentFrameworkResponse_framework' - The name of the new framework that the @CreateAssessmentFramework@ API
-- returned.
--
-- 'httpStatus', 'createAssessmentFrameworkResponse_httpStatus' - The response's http status code.
newCreateAssessmentFrameworkResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateAssessmentFrameworkResponse
newCreateAssessmentFrameworkResponse :: Int -> CreateAssessmentFrameworkResponse
newCreateAssessmentFrameworkResponse Int
pHttpStatus_ =
  CreateAssessmentFrameworkResponse'
    { $sel:framework:CreateAssessmentFrameworkResponse' :: Maybe Framework
framework =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateAssessmentFrameworkResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The name of the new framework that the @CreateAssessmentFramework@ API
-- returned.
createAssessmentFrameworkResponse_framework :: Lens.Lens' CreateAssessmentFrameworkResponse (Prelude.Maybe Framework)
createAssessmentFrameworkResponse_framework :: Lens' CreateAssessmentFrameworkResponse (Maybe Framework)
createAssessmentFrameworkResponse_framework = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAssessmentFrameworkResponse' {Maybe Framework
framework :: Maybe Framework
$sel:framework:CreateAssessmentFrameworkResponse' :: CreateAssessmentFrameworkResponse -> Maybe Framework
framework} -> Maybe Framework
framework) (\s :: CreateAssessmentFrameworkResponse
s@CreateAssessmentFrameworkResponse' {} Maybe Framework
a -> CreateAssessmentFrameworkResponse
s {$sel:framework:CreateAssessmentFrameworkResponse' :: Maybe Framework
framework = Maybe Framework
a} :: CreateAssessmentFrameworkResponse)

-- | The response's http status code.
createAssessmentFrameworkResponse_httpStatus :: Lens.Lens' CreateAssessmentFrameworkResponse Prelude.Int
createAssessmentFrameworkResponse_httpStatus :: Lens' CreateAssessmentFrameworkResponse Int
createAssessmentFrameworkResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAssessmentFrameworkResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateAssessmentFrameworkResponse' :: CreateAssessmentFrameworkResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateAssessmentFrameworkResponse
s@CreateAssessmentFrameworkResponse' {} Int
a -> CreateAssessmentFrameworkResponse
s {$sel:httpStatus:CreateAssessmentFrameworkResponse' :: Int
httpStatus = Int
a} :: CreateAssessmentFrameworkResponse)

instance
  Prelude.NFData
    CreateAssessmentFrameworkResponse
  where
  rnf :: CreateAssessmentFrameworkResponse -> ()
rnf CreateAssessmentFrameworkResponse' {Int
Maybe Framework
httpStatus :: Int
framework :: Maybe Framework
$sel:httpStatus:CreateAssessmentFrameworkResponse' :: CreateAssessmentFrameworkResponse -> Int
$sel:framework:CreateAssessmentFrameworkResponse' :: CreateAssessmentFrameworkResponse -> Maybe Framework
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Framework
framework
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus