{-# 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.UpdateAssessmentControl
-- 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)
--
-- Updates a control within an assessment in Audit Manager.
module Amazonka.AuditManager.UpdateAssessmentControl
  ( -- * Creating a Request
    UpdateAssessmentControl (..),
    newUpdateAssessmentControl,

    -- * Request Lenses
    updateAssessmentControl_controlStatus,
    updateAssessmentControl_commentBody,
    updateAssessmentControl_assessmentId,
    updateAssessmentControl_controlSetId,
    updateAssessmentControl_controlId,

    -- * Destructuring the Response
    UpdateAssessmentControlResponse (..),
    newUpdateAssessmentControlResponse,

    -- * Response Lenses
    updateAssessmentControlResponse_control,
    updateAssessmentControlResponse_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:/ 'newUpdateAssessmentControl' smart constructor.
data UpdateAssessmentControl = UpdateAssessmentControl'
  { -- | The status of the specified control.
    UpdateAssessmentControl -> Maybe ControlStatus
controlStatus :: Prelude.Maybe ControlStatus,
    -- | The comment body text for the specified control.
    UpdateAssessmentControl -> Maybe Text
commentBody :: Prelude.Maybe Prelude.Text,
    -- | The identifier for the specified assessment.
    UpdateAssessmentControl -> Text
assessmentId :: Prelude.Text,
    -- | The identifier for the specified control set.
    UpdateAssessmentControl -> Text
controlSetId :: Prelude.Text,
    -- | The identifier for the specified control.
    UpdateAssessmentControl -> Text
controlId :: Prelude.Text
  }
  deriving (UpdateAssessmentControl -> UpdateAssessmentControl -> Bool
(UpdateAssessmentControl -> UpdateAssessmentControl -> Bool)
-> (UpdateAssessmentControl -> UpdateAssessmentControl -> Bool)
-> Eq UpdateAssessmentControl
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateAssessmentControl -> UpdateAssessmentControl -> Bool
$c/= :: UpdateAssessmentControl -> UpdateAssessmentControl -> Bool
== :: UpdateAssessmentControl -> UpdateAssessmentControl -> Bool
$c== :: UpdateAssessmentControl -> UpdateAssessmentControl -> Bool
Prelude.Eq, ReadPrec [UpdateAssessmentControl]
ReadPrec UpdateAssessmentControl
Int -> ReadS UpdateAssessmentControl
ReadS [UpdateAssessmentControl]
(Int -> ReadS UpdateAssessmentControl)
-> ReadS [UpdateAssessmentControl]
-> ReadPrec UpdateAssessmentControl
-> ReadPrec [UpdateAssessmentControl]
-> Read UpdateAssessmentControl
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateAssessmentControl]
$creadListPrec :: ReadPrec [UpdateAssessmentControl]
readPrec :: ReadPrec UpdateAssessmentControl
$creadPrec :: ReadPrec UpdateAssessmentControl
readList :: ReadS [UpdateAssessmentControl]
$creadList :: ReadS [UpdateAssessmentControl]
readsPrec :: Int -> ReadS UpdateAssessmentControl
$creadsPrec :: Int -> ReadS UpdateAssessmentControl
Prelude.Read, Int -> UpdateAssessmentControl -> ShowS
[UpdateAssessmentControl] -> ShowS
UpdateAssessmentControl -> String
(Int -> UpdateAssessmentControl -> ShowS)
-> (UpdateAssessmentControl -> String)
-> ([UpdateAssessmentControl] -> ShowS)
-> Show UpdateAssessmentControl
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateAssessmentControl] -> ShowS
$cshowList :: [UpdateAssessmentControl] -> ShowS
show :: UpdateAssessmentControl -> String
$cshow :: UpdateAssessmentControl -> String
showsPrec :: Int -> UpdateAssessmentControl -> ShowS
$cshowsPrec :: Int -> UpdateAssessmentControl -> ShowS
Prelude.Show, (forall x.
 UpdateAssessmentControl -> Rep UpdateAssessmentControl x)
-> (forall x.
    Rep UpdateAssessmentControl x -> UpdateAssessmentControl)
-> Generic UpdateAssessmentControl
forall x. Rep UpdateAssessmentControl x -> UpdateAssessmentControl
forall x. UpdateAssessmentControl -> Rep UpdateAssessmentControl x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateAssessmentControl x -> UpdateAssessmentControl
$cfrom :: forall x. UpdateAssessmentControl -> Rep UpdateAssessmentControl x
Prelude.Generic)

-- |
-- Create a value of 'UpdateAssessmentControl' 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:
--
-- 'controlStatus', 'updateAssessmentControl_controlStatus' - The status of the specified control.
--
-- 'commentBody', 'updateAssessmentControl_commentBody' - The comment body text for the specified control.
--
-- 'assessmentId', 'updateAssessmentControl_assessmentId' - The identifier for the specified assessment.
--
-- 'controlSetId', 'updateAssessmentControl_controlSetId' - The identifier for the specified control set.
--
-- 'controlId', 'updateAssessmentControl_controlId' - The identifier for the specified control.
newUpdateAssessmentControl ::
  -- | 'assessmentId'
  Prelude.Text ->
  -- | 'controlSetId'
  Prelude.Text ->
  -- | 'controlId'
  Prelude.Text ->
  UpdateAssessmentControl
newUpdateAssessmentControl :: Text -> Text -> Text -> UpdateAssessmentControl
newUpdateAssessmentControl
  Text
pAssessmentId_
  Text
pControlSetId_
  Text
pControlId_ =
    UpdateAssessmentControl' :: Maybe ControlStatus
-> Maybe Text -> Text -> Text -> Text -> UpdateAssessmentControl
UpdateAssessmentControl'
      { $sel:controlStatus:UpdateAssessmentControl' :: Maybe ControlStatus
controlStatus =
          Maybe ControlStatus
forall a. Maybe a
Prelude.Nothing,
        $sel:commentBody:UpdateAssessmentControl' :: Maybe Text
commentBody = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:assessmentId:UpdateAssessmentControl' :: Text
assessmentId = Text
pAssessmentId_,
        $sel:controlSetId:UpdateAssessmentControl' :: Text
controlSetId = Text
pControlSetId_,
        $sel:controlId:UpdateAssessmentControl' :: Text
controlId = Text
pControlId_
      }

-- | The status of the specified control.
updateAssessmentControl_controlStatus :: Lens.Lens' UpdateAssessmentControl (Prelude.Maybe ControlStatus)
updateAssessmentControl_controlStatus :: (Maybe ControlStatus -> f (Maybe ControlStatus))
-> UpdateAssessmentControl -> f UpdateAssessmentControl
updateAssessmentControl_controlStatus = (UpdateAssessmentControl -> Maybe ControlStatus)
-> (UpdateAssessmentControl
    -> Maybe ControlStatus -> UpdateAssessmentControl)
-> Lens
     UpdateAssessmentControl
     UpdateAssessmentControl
     (Maybe ControlStatus)
     (Maybe ControlStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAssessmentControl' {Maybe ControlStatus
controlStatus :: Maybe ControlStatus
$sel:controlStatus:UpdateAssessmentControl' :: UpdateAssessmentControl -> Maybe ControlStatus
controlStatus} -> Maybe ControlStatus
controlStatus) (\s :: UpdateAssessmentControl
s@UpdateAssessmentControl' {} Maybe ControlStatus
a -> UpdateAssessmentControl
s {$sel:controlStatus:UpdateAssessmentControl' :: Maybe ControlStatus
controlStatus = Maybe ControlStatus
a} :: UpdateAssessmentControl)

-- | The comment body text for the specified control.
updateAssessmentControl_commentBody :: Lens.Lens' UpdateAssessmentControl (Prelude.Maybe Prelude.Text)
updateAssessmentControl_commentBody :: (Maybe Text -> f (Maybe Text))
-> UpdateAssessmentControl -> f UpdateAssessmentControl
updateAssessmentControl_commentBody = (UpdateAssessmentControl -> Maybe Text)
-> (UpdateAssessmentControl
    -> Maybe Text -> UpdateAssessmentControl)
-> Lens
     UpdateAssessmentControl
     UpdateAssessmentControl
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAssessmentControl' {Maybe Text
commentBody :: Maybe Text
$sel:commentBody:UpdateAssessmentControl' :: UpdateAssessmentControl -> Maybe Text
commentBody} -> Maybe Text
commentBody) (\s :: UpdateAssessmentControl
s@UpdateAssessmentControl' {} Maybe Text
a -> UpdateAssessmentControl
s {$sel:commentBody:UpdateAssessmentControl' :: Maybe Text
commentBody = Maybe Text
a} :: UpdateAssessmentControl)

-- | The identifier for the specified assessment.
updateAssessmentControl_assessmentId :: Lens.Lens' UpdateAssessmentControl Prelude.Text
updateAssessmentControl_assessmentId :: (Text -> f Text)
-> UpdateAssessmentControl -> f UpdateAssessmentControl
updateAssessmentControl_assessmentId = (UpdateAssessmentControl -> Text)
-> (UpdateAssessmentControl -> Text -> UpdateAssessmentControl)
-> Lens UpdateAssessmentControl UpdateAssessmentControl Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAssessmentControl' {Text
assessmentId :: Text
$sel:assessmentId:UpdateAssessmentControl' :: UpdateAssessmentControl -> Text
assessmentId} -> Text
assessmentId) (\s :: UpdateAssessmentControl
s@UpdateAssessmentControl' {} Text
a -> UpdateAssessmentControl
s {$sel:assessmentId:UpdateAssessmentControl' :: Text
assessmentId = Text
a} :: UpdateAssessmentControl)

-- | The identifier for the specified control set.
updateAssessmentControl_controlSetId :: Lens.Lens' UpdateAssessmentControl Prelude.Text
updateAssessmentControl_controlSetId :: (Text -> f Text)
-> UpdateAssessmentControl -> f UpdateAssessmentControl
updateAssessmentControl_controlSetId = (UpdateAssessmentControl -> Text)
-> (UpdateAssessmentControl -> Text -> UpdateAssessmentControl)
-> Lens UpdateAssessmentControl UpdateAssessmentControl Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAssessmentControl' {Text
controlSetId :: Text
$sel:controlSetId:UpdateAssessmentControl' :: UpdateAssessmentControl -> Text
controlSetId} -> Text
controlSetId) (\s :: UpdateAssessmentControl
s@UpdateAssessmentControl' {} Text
a -> UpdateAssessmentControl
s {$sel:controlSetId:UpdateAssessmentControl' :: Text
controlSetId = Text
a} :: UpdateAssessmentControl)

-- | The identifier for the specified control.
updateAssessmentControl_controlId :: Lens.Lens' UpdateAssessmentControl Prelude.Text
updateAssessmentControl_controlId :: (Text -> f Text)
-> UpdateAssessmentControl -> f UpdateAssessmentControl
updateAssessmentControl_controlId = (UpdateAssessmentControl -> Text)
-> (UpdateAssessmentControl -> Text -> UpdateAssessmentControl)
-> Lens UpdateAssessmentControl UpdateAssessmentControl Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAssessmentControl' {Text
controlId :: Text
$sel:controlId:UpdateAssessmentControl' :: UpdateAssessmentControl -> Text
controlId} -> Text
controlId) (\s :: UpdateAssessmentControl
s@UpdateAssessmentControl' {} Text
a -> UpdateAssessmentControl
s {$sel:controlId:UpdateAssessmentControl' :: Text
controlId = Text
a} :: UpdateAssessmentControl)

instance Core.AWSRequest UpdateAssessmentControl where
  type
    AWSResponse UpdateAssessmentControl =
      UpdateAssessmentControlResponse
  request :: UpdateAssessmentControl -> Request UpdateAssessmentControl
request = Service
-> UpdateAssessmentControl -> Request UpdateAssessmentControl
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateAssessmentControl
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateAssessmentControl)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateAssessmentControl))
-> Logger
-> Service
-> Proxy UpdateAssessmentControl
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateAssessmentControl)))
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 AssessmentControl -> Int -> UpdateAssessmentControlResponse
UpdateAssessmentControlResponse'
            (Maybe AssessmentControl -> Int -> UpdateAssessmentControlResponse)
-> Either String (Maybe AssessmentControl)
-> Either String (Int -> UpdateAssessmentControlResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe AssessmentControl)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"control")
            Either String (Int -> UpdateAssessmentControlResponse)
-> Either String Int
-> Either String UpdateAssessmentControlResponse
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 UpdateAssessmentControl

instance Prelude.NFData UpdateAssessmentControl

instance Core.ToHeaders UpdateAssessmentControl where
  toHeaders :: UpdateAssessmentControl -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateAssessmentControl -> 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 UpdateAssessmentControl where
  toJSON :: UpdateAssessmentControl -> Value
toJSON UpdateAssessmentControl' {Maybe Text
Maybe ControlStatus
Text
controlId :: Text
controlSetId :: Text
assessmentId :: Text
commentBody :: Maybe Text
controlStatus :: Maybe ControlStatus
$sel:controlId:UpdateAssessmentControl' :: UpdateAssessmentControl -> Text
$sel:controlSetId:UpdateAssessmentControl' :: UpdateAssessmentControl -> Text
$sel:assessmentId:UpdateAssessmentControl' :: UpdateAssessmentControl -> Text
$sel:commentBody:UpdateAssessmentControl' :: UpdateAssessmentControl -> Maybe Text
$sel:controlStatus:UpdateAssessmentControl' :: UpdateAssessmentControl -> Maybe ControlStatus
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"controlStatus" Text -> ControlStatus -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ControlStatus -> Pair) -> Maybe ControlStatus -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ControlStatus
controlStatus,
            (Text
"commentBody" 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
commentBody
          ]
      )

instance Core.ToPath UpdateAssessmentControl where
  toPath :: UpdateAssessmentControl -> ByteString
toPath UpdateAssessmentControl' {Maybe Text
Maybe ControlStatus
Text
controlId :: Text
controlSetId :: Text
assessmentId :: Text
commentBody :: Maybe Text
controlStatus :: Maybe ControlStatus
$sel:controlId:UpdateAssessmentControl' :: UpdateAssessmentControl -> Text
$sel:controlSetId:UpdateAssessmentControl' :: UpdateAssessmentControl -> Text
$sel:assessmentId:UpdateAssessmentControl' :: UpdateAssessmentControl -> Text
$sel:commentBody:UpdateAssessmentControl' :: UpdateAssessmentControl -> Maybe Text
$sel:controlStatus:UpdateAssessmentControl' :: UpdateAssessmentControl -> Maybe ControlStatus
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/assessments/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
assessmentId,
        ByteString
"/controlSets/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
controlSetId,
        ByteString
"/controls/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
controlId
      ]

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

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

-- |
-- Create a value of 'UpdateAssessmentControlResponse' 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:
--
-- 'control', 'updateAssessmentControlResponse_control' - The name of the updated control set returned by the
-- @UpdateAssessmentControl@ API.
--
-- 'httpStatus', 'updateAssessmentControlResponse_httpStatus' - The response's http status code.
newUpdateAssessmentControlResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateAssessmentControlResponse
newUpdateAssessmentControlResponse :: Int -> UpdateAssessmentControlResponse
newUpdateAssessmentControlResponse Int
pHttpStatus_ =
  UpdateAssessmentControlResponse' :: Maybe AssessmentControl -> Int -> UpdateAssessmentControlResponse
UpdateAssessmentControlResponse'
    { $sel:control:UpdateAssessmentControlResponse' :: Maybe AssessmentControl
control =
        Maybe AssessmentControl
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateAssessmentControlResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The name of the updated control set returned by the
-- @UpdateAssessmentControl@ API.
updateAssessmentControlResponse_control :: Lens.Lens' UpdateAssessmentControlResponse (Prelude.Maybe AssessmentControl)
updateAssessmentControlResponse_control :: (Maybe AssessmentControl -> f (Maybe AssessmentControl))
-> UpdateAssessmentControlResponse
-> f UpdateAssessmentControlResponse
updateAssessmentControlResponse_control = (UpdateAssessmentControlResponse -> Maybe AssessmentControl)
-> (UpdateAssessmentControlResponse
    -> Maybe AssessmentControl -> UpdateAssessmentControlResponse)
-> Lens
     UpdateAssessmentControlResponse
     UpdateAssessmentControlResponse
     (Maybe AssessmentControl)
     (Maybe AssessmentControl)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAssessmentControlResponse' {Maybe AssessmentControl
control :: Maybe AssessmentControl
$sel:control:UpdateAssessmentControlResponse' :: UpdateAssessmentControlResponse -> Maybe AssessmentControl
control} -> Maybe AssessmentControl
control) (\s :: UpdateAssessmentControlResponse
s@UpdateAssessmentControlResponse' {} Maybe AssessmentControl
a -> UpdateAssessmentControlResponse
s {$sel:control:UpdateAssessmentControlResponse' :: Maybe AssessmentControl
control = Maybe AssessmentControl
a} :: UpdateAssessmentControlResponse)

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

instance
  Prelude.NFData
    UpdateAssessmentControlResponse