{-# 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.UpdateAssessmentFramework
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Updates a custom framework in Audit Manager.
module Amazonka.AuditManager.UpdateAssessmentFramework
  ( -- * Creating a Request
    UpdateAssessmentFramework (..),
    newUpdateAssessmentFramework,

    -- * Request Lenses
    updateAssessmentFramework_complianceType,
    updateAssessmentFramework_description,
    updateAssessmentFramework_frameworkId,
    updateAssessmentFramework_name,
    updateAssessmentFramework_controlSets,

    -- * Destructuring the Response
    UpdateAssessmentFrameworkResponse (..),
    newUpdateAssessmentFrameworkResponse,

    -- * Response Lenses
    updateAssessmentFrameworkResponse_framework,
    updateAssessmentFrameworkResponse_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:/ 'newUpdateAssessmentFramework' smart constructor.
data UpdateAssessmentFramework = UpdateAssessmentFramework'
  { -- | The compliance type that the new custom framework supports, such as CIS
    -- or HIPAA.
    UpdateAssessmentFramework -> Maybe Text
complianceType :: Prelude.Maybe Prelude.Text,
    -- | The description of the updated framework.
    UpdateAssessmentFramework -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier for the framework.
    UpdateAssessmentFramework -> Text
frameworkId :: Prelude.Text,
    -- | The name of the framework to be updated.
    UpdateAssessmentFramework -> Text
name :: Prelude.Text,
    -- | The control sets that are associated with the framework.
    UpdateAssessmentFramework
-> NonEmpty UpdateAssessmentFrameworkControlSet
controlSets :: Prelude.NonEmpty UpdateAssessmentFrameworkControlSet
  }
  deriving (UpdateAssessmentFramework -> UpdateAssessmentFramework -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateAssessmentFramework -> UpdateAssessmentFramework -> Bool
$c/= :: UpdateAssessmentFramework -> UpdateAssessmentFramework -> Bool
== :: UpdateAssessmentFramework -> UpdateAssessmentFramework -> Bool
$c== :: UpdateAssessmentFramework -> UpdateAssessmentFramework -> Bool
Prelude.Eq, ReadPrec [UpdateAssessmentFramework]
ReadPrec UpdateAssessmentFramework
Int -> ReadS UpdateAssessmentFramework
ReadS [UpdateAssessmentFramework]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateAssessmentFramework]
$creadListPrec :: ReadPrec [UpdateAssessmentFramework]
readPrec :: ReadPrec UpdateAssessmentFramework
$creadPrec :: ReadPrec UpdateAssessmentFramework
readList :: ReadS [UpdateAssessmentFramework]
$creadList :: ReadS [UpdateAssessmentFramework]
readsPrec :: Int -> ReadS UpdateAssessmentFramework
$creadsPrec :: Int -> ReadS UpdateAssessmentFramework
Prelude.Read, Int -> UpdateAssessmentFramework -> ShowS
[UpdateAssessmentFramework] -> ShowS
UpdateAssessmentFramework -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateAssessmentFramework] -> ShowS
$cshowList :: [UpdateAssessmentFramework] -> ShowS
show :: UpdateAssessmentFramework -> String
$cshow :: UpdateAssessmentFramework -> String
showsPrec :: Int -> UpdateAssessmentFramework -> ShowS
$cshowsPrec :: Int -> UpdateAssessmentFramework -> ShowS
Prelude.Show, forall x.
Rep UpdateAssessmentFramework x -> UpdateAssessmentFramework
forall x.
UpdateAssessmentFramework -> Rep UpdateAssessmentFramework x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateAssessmentFramework x -> UpdateAssessmentFramework
$cfrom :: forall x.
UpdateAssessmentFramework -> Rep UpdateAssessmentFramework x
Prelude.Generic)

-- |
-- Create a value of 'UpdateAssessmentFramework' 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', 'updateAssessmentFramework_complianceType' - The compliance type that the new custom framework supports, such as CIS
-- or HIPAA.
--
-- 'description', 'updateAssessmentFramework_description' - The description of the updated framework.
--
-- 'frameworkId', 'updateAssessmentFramework_frameworkId' - The unique identifier for the framework.
--
-- 'name', 'updateAssessmentFramework_name' - The name of the framework to be updated.
--
-- 'controlSets', 'updateAssessmentFramework_controlSets' - The control sets that are associated with the framework.
newUpdateAssessmentFramework ::
  -- | 'frameworkId'
  Prelude.Text ->
  -- | 'name'
  Prelude.Text ->
  -- | 'controlSets'
  Prelude.NonEmpty UpdateAssessmentFrameworkControlSet ->
  UpdateAssessmentFramework
newUpdateAssessmentFramework :: Text
-> Text
-> NonEmpty UpdateAssessmentFrameworkControlSet
-> UpdateAssessmentFramework
newUpdateAssessmentFramework
  Text
pFrameworkId_
  Text
pName_
  NonEmpty UpdateAssessmentFrameworkControlSet
pControlSets_ =
    UpdateAssessmentFramework'
      { $sel:complianceType:UpdateAssessmentFramework' :: Maybe Text
complianceType =
          forall a. Maybe a
Prelude.Nothing,
        $sel:description:UpdateAssessmentFramework' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
        $sel:frameworkId:UpdateAssessmentFramework' :: Text
frameworkId = Text
pFrameworkId_,
        $sel:name:UpdateAssessmentFramework' :: Text
name = Text
pName_,
        $sel:controlSets:UpdateAssessmentFramework' :: NonEmpty UpdateAssessmentFrameworkControlSet
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 UpdateAssessmentFrameworkControlSet
pControlSets_
      }

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

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

-- | The unique identifier for the framework.
updateAssessmentFramework_frameworkId :: Lens.Lens' UpdateAssessmentFramework Prelude.Text
updateAssessmentFramework_frameworkId :: Lens' UpdateAssessmentFramework Text
updateAssessmentFramework_frameworkId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAssessmentFramework' {Text
frameworkId :: Text
$sel:frameworkId:UpdateAssessmentFramework' :: UpdateAssessmentFramework -> Text
frameworkId} -> Text
frameworkId) (\s :: UpdateAssessmentFramework
s@UpdateAssessmentFramework' {} Text
a -> UpdateAssessmentFramework
s {$sel:frameworkId:UpdateAssessmentFramework' :: Text
frameworkId = Text
a} :: UpdateAssessmentFramework)

-- | The name of the framework to be updated.
updateAssessmentFramework_name :: Lens.Lens' UpdateAssessmentFramework Prelude.Text
updateAssessmentFramework_name :: Lens' UpdateAssessmentFramework Text
updateAssessmentFramework_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAssessmentFramework' {Text
name :: Text
$sel:name:UpdateAssessmentFramework' :: UpdateAssessmentFramework -> Text
name} -> Text
name) (\s :: UpdateAssessmentFramework
s@UpdateAssessmentFramework' {} Text
a -> UpdateAssessmentFramework
s {$sel:name:UpdateAssessmentFramework' :: Text
name = Text
a} :: UpdateAssessmentFramework)

-- | The control sets that are associated with the framework.
updateAssessmentFramework_controlSets :: Lens.Lens' UpdateAssessmentFramework (Prelude.NonEmpty UpdateAssessmentFrameworkControlSet)
updateAssessmentFramework_controlSets :: Lens'
  UpdateAssessmentFramework
  (NonEmpty UpdateAssessmentFrameworkControlSet)
updateAssessmentFramework_controlSets = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAssessmentFramework' {NonEmpty UpdateAssessmentFrameworkControlSet
controlSets :: NonEmpty UpdateAssessmentFrameworkControlSet
$sel:controlSets:UpdateAssessmentFramework' :: UpdateAssessmentFramework
-> NonEmpty UpdateAssessmentFrameworkControlSet
controlSets} -> NonEmpty UpdateAssessmentFrameworkControlSet
controlSets) (\s :: UpdateAssessmentFramework
s@UpdateAssessmentFramework' {} NonEmpty UpdateAssessmentFrameworkControlSet
a -> UpdateAssessmentFramework
s {$sel:controlSets:UpdateAssessmentFramework' :: NonEmpty UpdateAssessmentFrameworkControlSet
controlSets = NonEmpty UpdateAssessmentFrameworkControlSet
a} :: UpdateAssessmentFramework) 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 UpdateAssessmentFramework where
  type
    AWSResponse UpdateAssessmentFramework =
      UpdateAssessmentFrameworkResponse
  request :: (Service -> Service)
-> UpdateAssessmentFramework -> Request UpdateAssessmentFramework
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy UpdateAssessmentFramework
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateAssessmentFramework)))
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 -> UpdateAssessmentFrameworkResponse
UpdateAssessmentFrameworkResponse'
            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 UpdateAssessmentFramework where
  hashWithSalt :: Int -> UpdateAssessmentFramework -> Int
hashWithSalt Int
_salt UpdateAssessmentFramework' {Maybe Text
NonEmpty UpdateAssessmentFrameworkControlSet
Text
controlSets :: NonEmpty UpdateAssessmentFrameworkControlSet
name :: Text
frameworkId :: Text
description :: Maybe Text
complianceType :: Maybe Text
$sel:controlSets:UpdateAssessmentFramework' :: UpdateAssessmentFramework
-> NonEmpty UpdateAssessmentFrameworkControlSet
$sel:name:UpdateAssessmentFramework' :: UpdateAssessmentFramework -> Text
$sel:frameworkId:UpdateAssessmentFramework' :: UpdateAssessmentFramework -> Text
$sel:description:UpdateAssessmentFramework' :: UpdateAssessmentFramework -> Maybe Text
$sel:complianceType:UpdateAssessmentFramework' :: UpdateAssessmentFramework -> 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` Text
frameworkId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` NonEmpty UpdateAssessmentFrameworkControlSet
controlSets

instance Prelude.NFData UpdateAssessmentFramework where
  rnf :: UpdateAssessmentFramework -> ()
rnf UpdateAssessmentFramework' {Maybe Text
NonEmpty UpdateAssessmentFrameworkControlSet
Text
controlSets :: NonEmpty UpdateAssessmentFrameworkControlSet
name :: Text
frameworkId :: Text
description :: Maybe Text
complianceType :: Maybe Text
$sel:controlSets:UpdateAssessmentFramework' :: UpdateAssessmentFramework
-> NonEmpty UpdateAssessmentFrameworkControlSet
$sel:name:UpdateAssessmentFramework' :: UpdateAssessmentFramework -> Text
$sel:frameworkId:UpdateAssessmentFramework' :: UpdateAssessmentFramework -> Text
$sel:description:UpdateAssessmentFramework' :: UpdateAssessmentFramework -> Maybe Text
$sel:complianceType:UpdateAssessmentFramework' :: UpdateAssessmentFramework -> 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 Text
frameworkId
      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 UpdateAssessmentFrameworkControlSet
controlSets

instance Data.ToHeaders UpdateAssessmentFramework where
  toHeaders :: UpdateAssessmentFramework -> 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 UpdateAssessmentFramework where
  toJSON :: UpdateAssessmentFramework -> Value
toJSON UpdateAssessmentFramework' {Maybe Text
NonEmpty UpdateAssessmentFrameworkControlSet
Text
controlSets :: NonEmpty UpdateAssessmentFrameworkControlSet
name :: Text
frameworkId :: Text
description :: Maybe Text
complianceType :: Maybe Text
$sel:controlSets:UpdateAssessmentFramework' :: UpdateAssessmentFramework
-> NonEmpty UpdateAssessmentFrameworkControlSet
$sel:name:UpdateAssessmentFramework' :: UpdateAssessmentFramework -> Text
$sel:frameworkId:UpdateAssessmentFramework' :: UpdateAssessmentFramework -> Text
$sel:description:UpdateAssessmentFramework' :: UpdateAssessmentFramework -> Maybe Text
$sel:complianceType:UpdateAssessmentFramework' :: UpdateAssessmentFramework -> 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,
            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 UpdateAssessmentFrameworkControlSet
controlSets)
          ]
      )

instance Data.ToPath UpdateAssessmentFramework where
  toPath :: UpdateAssessmentFramework -> ByteString
toPath UpdateAssessmentFramework' {Maybe Text
NonEmpty UpdateAssessmentFrameworkControlSet
Text
controlSets :: NonEmpty UpdateAssessmentFrameworkControlSet
name :: Text
frameworkId :: Text
description :: Maybe Text
complianceType :: Maybe Text
$sel:controlSets:UpdateAssessmentFramework' :: UpdateAssessmentFramework
-> NonEmpty UpdateAssessmentFrameworkControlSet
$sel:name:UpdateAssessmentFramework' :: UpdateAssessmentFramework -> Text
$sel:frameworkId:UpdateAssessmentFramework' :: UpdateAssessmentFramework -> Text
$sel:description:UpdateAssessmentFramework' :: UpdateAssessmentFramework -> Maybe Text
$sel:complianceType:UpdateAssessmentFramework' :: UpdateAssessmentFramework -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/assessmentFrameworks/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
frameworkId]

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

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

-- |
-- Create a value of 'UpdateAssessmentFrameworkResponse' 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', 'updateAssessmentFrameworkResponse_framework' - The name of the framework.
--
-- 'httpStatus', 'updateAssessmentFrameworkResponse_httpStatus' - The response's http status code.
newUpdateAssessmentFrameworkResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateAssessmentFrameworkResponse
newUpdateAssessmentFrameworkResponse :: Int -> UpdateAssessmentFrameworkResponse
newUpdateAssessmentFrameworkResponse Int
pHttpStatus_ =
  UpdateAssessmentFrameworkResponse'
    { $sel:framework:UpdateAssessmentFrameworkResponse' :: Maybe Framework
framework =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateAssessmentFrameworkResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

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

instance
  Prelude.NFData
    UpdateAssessmentFrameworkResponse
  where
  rnf :: UpdateAssessmentFrameworkResponse -> ()
rnf UpdateAssessmentFrameworkResponse' {Int
Maybe Framework
httpStatus :: Int
framework :: Maybe Framework
$sel:httpStatus:UpdateAssessmentFrameworkResponse' :: UpdateAssessmentFrameworkResponse -> Int
$sel:framework:UpdateAssessmentFrameworkResponse' :: UpdateAssessmentFrameworkResponse -> 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