{-# 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-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)
--
-- 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.Lens as Lens
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 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 to be associated with the framework.
    CreateAssessmentFramework
-> NonEmpty CreateAssessmentFrameworkControlSet
controlSets :: Prelude.NonEmpty CreateAssessmentFrameworkControlSet
  }
  deriving (CreateAssessmentFramework -> CreateAssessmentFramework -> Bool
(CreateAssessmentFramework -> CreateAssessmentFramework -> Bool)
-> (CreateAssessmentFramework -> CreateAssessmentFramework -> Bool)
-> Eq CreateAssessmentFramework
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]
(Int -> ReadS CreateAssessmentFramework)
-> ReadS [CreateAssessmentFramework]
-> ReadPrec CreateAssessmentFramework
-> ReadPrec [CreateAssessmentFramework]
-> Read 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
(Int -> CreateAssessmentFramework -> ShowS)
-> (CreateAssessmentFramework -> String)
-> ([CreateAssessmentFramework] -> ShowS)
-> Show CreateAssessmentFramework
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.
 CreateAssessmentFramework -> Rep CreateAssessmentFramework x)
-> (forall x.
    Rep CreateAssessmentFramework x -> CreateAssessmentFramework)
-> Generic CreateAssessmentFramework
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 associated with the framework.
--
-- 'name', 'createAssessmentFramework_name' - The name of the new custom framework.
--
-- 'controlSets', 'createAssessmentFramework_controlSets' - The control sets to be 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' :: Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> NonEmpty CreateAssessmentFrameworkControlSet
-> CreateAssessmentFramework
CreateAssessmentFramework'
    { $sel:complianceType:CreateAssessmentFramework' :: Maybe Text
complianceType =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:CreateAssessmentFramework' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateAssessmentFramework' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:name:CreateAssessmentFramework' :: Text
name = Text
pName_,
      $sel:controlSets:CreateAssessmentFramework' :: NonEmpty CreateAssessmentFrameworkControlSet
controlSets = Tagged
  (NonEmpty CreateAssessmentFrameworkControlSet)
  (Identity (NonEmpty CreateAssessmentFrameworkControlSet))
-> Tagged
     (NonEmpty CreateAssessmentFrameworkControlSet)
     (Identity (NonEmpty CreateAssessmentFrameworkControlSet))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced (Tagged
   (NonEmpty CreateAssessmentFrameworkControlSet)
   (Identity (NonEmpty CreateAssessmentFrameworkControlSet))
 -> Tagged
      (NonEmpty CreateAssessmentFrameworkControlSet)
      (Identity (NonEmpty CreateAssessmentFrameworkControlSet)))
-> NonEmpty CreateAssessmentFrameworkControlSet
-> NonEmpty CreateAssessmentFrameworkControlSet
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 :: (Maybe Text -> f (Maybe Text))
-> CreateAssessmentFramework -> f CreateAssessmentFramework
createAssessmentFramework_complianceType = (CreateAssessmentFramework -> Maybe Text)
-> (CreateAssessmentFramework
    -> Maybe Text -> CreateAssessmentFramework)
-> Lens
     CreateAssessmentFramework
     CreateAssessmentFramework
     (Maybe Text)
     (Maybe Text)
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 :: (Maybe Text -> f (Maybe Text))
-> CreateAssessmentFramework -> f CreateAssessmentFramework
createAssessmentFramework_description = (CreateAssessmentFramework -> Maybe Text)
-> (CreateAssessmentFramework
    -> Maybe Text -> CreateAssessmentFramework)
-> Lens
     CreateAssessmentFramework
     CreateAssessmentFramework
     (Maybe Text)
     (Maybe Text)
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 associated with the framework.
createAssessmentFramework_tags :: Lens.Lens' CreateAssessmentFramework (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createAssessmentFramework_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateAssessmentFramework -> f CreateAssessmentFramework
createAssessmentFramework_tags = (CreateAssessmentFramework -> Maybe (HashMap Text Text))
-> (CreateAssessmentFramework
    -> Maybe (HashMap Text Text) -> CreateAssessmentFramework)
-> Lens
     CreateAssessmentFramework
     CreateAssessmentFramework
     (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 (\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) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> CreateAssessmentFramework -> f CreateAssessmentFramework)
-> ((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)))
-> CreateAssessmentFramework
-> f CreateAssessmentFramework
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

-- | The name of the new custom framework.
createAssessmentFramework_name :: Lens.Lens' CreateAssessmentFramework Prelude.Text
createAssessmentFramework_name :: (Text -> f Text)
-> CreateAssessmentFramework -> f CreateAssessmentFramework
createAssessmentFramework_name = (CreateAssessmentFramework -> Text)
-> (CreateAssessmentFramework -> Text -> CreateAssessmentFramework)
-> Lens
     CreateAssessmentFramework CreateAssessmentFramework Text Text
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 to be associated with the framework.
createAssessmentFramework_controlSets :: Lens.Lens' CreateAssessmentFramework (Prelude.NonEmpty CreateAssessmentFrameworkControlSet)
createAssessmentFramework_controlSets :: (NonEmpty CreateAssessmentFrameworkControlSet
 -> f (NonEmpty CreateAssessmentFrameworkControlSet))
-> CreateAssessmentFramework -> f CreateAssessmentFramework
createAssessmentFramework_controlSets = (CreateAssessmentFramework
 -> NonEmpty CreateAssessmentFrameworkControlSet)
-> (CreateAssessmentFramework
    -> NonEmpty CreateAssessmentFrameworkControlSet
    -> CreateAssessmentFramework)
-> Lens
     CreateAssessmentFramework
     CreateAssessmentFramework
     (NonEmpty CreateAssessmentFrameworkControlSet)
     (NonEmpty CreateAssessmentFrameworkControlSet)
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) ((NonEmpty CreateAssessmentFrameworkControlSet
  -> f (NonEmpty CreateAssessmentFrameworkControlSet))
 -> CreateAssessmentFramework -> f CreateAssessmentFramework)
-> ((NonEmpty CreateAssessmentFrameworkControlSet
     -> f (NonEmpty CreateAssessmentFrameworkControlSet))
    -> NonEmpty CreateAssessmentFrameworkControlSet
    -> f (NonEmpty CreateAssessmentFrameworkControlSet))
-> (NonEmpty CreateAssessmentFrameworkControlSet
    -> f (NonEmpty CreateAssessmentFrameworkControlSet))
-> CreateAssessmentFramework
-> f CreateAssessmentFramework
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty CreateAssessmentFrameworkControlSet
 -> f (NonEmpty CreateAssessmentFrameworkControlSet))
-> NonEmpty CreateAssessmentFrameworkControlSet
-> f (NonEmpty CreateAssessmentFrameworkControlSet)
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 :: CreateAssessmentFramework -> Request CreateAssessmentFramework
request = Service
-> CreateAssessmentFramework -> Request CreateAssessmentFramework
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateAssessmentFramework
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateAssessmentFramework)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateAssessmentFramework))
-> Logger
-> Service
-> Proxy CreateAssessmentFramework
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateAssessmentFramework)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Framework -> Int -> CreateAssessmentFrameworkResponse
CreateAssessmentFrameworkResponse'
            (Maybe Framework -> Int -> CreateAssessmentFrameworkResponse)
-> Either String (Maybe Framework)
-> Either String (Int -> CreateAssessmentFrameworkResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Framework)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"framework")
            Either String (Int -> CreateAssessmentFrameworkResponse)
-> Either String Int
-> Either String CreateAssessmentFrameworkResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable CreateAssessmentFramework

instance Prelude.NFData CreateAssessmentFramework

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

instance Core.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
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"complianceType" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
complianceType,
            (Text
"description" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
            (Text
"tags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"controlSets" Text -> NonEmpty CreateAssessmentFrameworkControlSet -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= NonEmpty CreateAssessmentFrameworkControlSet
controlSets)
          ]
      )

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

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

-- | /See:/ 'newCreateAssessmentFrameworkResponse' smart constructor.
data CreateAssessmentFrameworkResponse = CreateAssessmentFrameworkResponse'
  { -- | The name of the new framework returned by the
    -- @CreateAssessmentFramework@ API.
    CreateAssessmentFrameworkResponse -> Maybe Framework
framework :: Prelude.Maybe Framework,
    -- | The response's http status code.
    CreateAssessmentFrameworkResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateAssessmentFrameworkResponse
-> CreateAssessmentFrameworkResponse -> Bool
(CreateAssessmentFrameworkResponse
 -> CreateAssessmentFrameworkResponse -> Bool)
-> (CreateAssessmentFrameworkResponse
    -> CreateAssessmentFrameworkResponse -> Bool)
-> Eq CreateAssessmentFrameworkResponse
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]
(Int -> ReadS CreateAssessmentFrameworkResponse)
-> ReadS [CreateAssessmentFrameworkResponse]
-> ReadPrec CreateAssessmentFrameworkResponse
-> ReadPrec [CreateAssessmentFrameworkResponse]
-> Read 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
(Int -> CreateAssessmentFrameworkResponse -> ShowS)
-> (CreateAssessmentFrameworkResponse -> String)
-> ([CreateAssessmentFrameworkResponse] -> ShowS)
-> Show CreateAssessmentFrameworkResponse
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.
 CreateAssessmentFrameworkResponse
 -> Rep CreateAssessmentFrameworkResponse x)
-> (forall x.
    Rep CreateAssessmentFrameworkResponse x
    -> CreateAssessmentFrameworkResponse)
-> Generic CreateAssessmentFrameworkResponse
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 returned by the
-- @CreateAssessmentFramework@ API.
--
-- 'httpStatus', 'createAssessmentFrameworkResponse_httpStatus' - The response's http status code.
newCreateAssessmentFrameworkResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateAssessmentFrameworkResponse
newCreateAssessmentFrameworkResponse :: Int -> CreateAssessmentFrameworkResponse
newCreateAssessmentFrameworkResponse Int
pHttpStatus_ =
  CreateAssessmentFrameworkResponse' :: Maybe Framework -> Int -> CreateAssessmentFrameworkResponse
CreateAssessmentFrameworkResponse'
    { $sel:framework:CreateAssessmentFrameworkResponse' :: Maybe Framework
framework =
        Maybe Framework
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateAssessmentFrameworkResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The name of the new framework returned by the
-- @CreateAssessmentFramework@ API.
createAssessmentFrameworkResponse_framework :: Lens.Lens' CreateAssessmentFrameworkResponse (Prelude.Maybe Framework)
createAssessmentFrameworkResponse_framework :: (Maybe Framework -> f (Maybe Framework))
-> CreateAssessmentFrameworkResponse
-> f CreateAssessmentFrameworkResponse
createAssessmentFrameworkResponse_framework = (CreateAssessmentFrameworkResponse -> Maybe Framework)
-> (CreateAssessmentFrameworkResponse
    -> Maybe Framework -> CreateAssessmentFrameworkResponse)
-> Lens
     CreateAssessmentFrameworkResponse
     CreateAssessmentFrameworkResponse
     (Maybe Framework)
     (Maybe 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 :: (Int -> f Int)
-> CreateAssessmentFrameworkResponse
-> f CreateAssessmentFrameworkResponse
createAssessmentFrameworkResponse_httpStatus = (CreateAssessmentFrameworkResponse -> Int)
-> (CreateAssessmentFrameworkResponse
    -> Int -> CreateAssessmentFrameworkResponse)
-> Lens
     CreateAssessmentFrameworkResponse
     CreateAssessmentFrameworkResponse
     Int
     Int
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