{-# 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.UpdateAssessmentControlSetStatus
-- 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 the status of a control set in an Audit Manager assessment.
module Amazonka.AuditManager.UpdateAssessmentControlSetStatus
  ( -- * Creating a Request
    UpdateAssessmentControlSetStatus (..),
    newUpdateAssessmentControlSetStatus,

    -- * Request Lenses
    updateAssessmentControlSetStatus_assessmentId,
    updateAssessmentControlSetStatus_controlSetId,
    updateAssessmentControlSetStatus_status,
    updateAssessmentControlSetStatus_comment,

    -- * Destructuring the Response
    UpdateAssessmentControlSetStatusResponse (..),
    newUpdateAssessmentControlSetStatusResponse,

    -- * Response Lenses
    updateAssessmentControlSetStatusResponse_controlSet,
    updateAssessmentControlSetStatusResponse_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:/ 'newUpdateAssessmentControlSetStatus' smart constructor.
data UpdateAssessmentControlSetStatus = UpdateAssessmentControlSetStatus'
  { -- | The identifier for the specified assessment.
    UpdateAssessmentControlSetStatus -> Text
assessmentId :: Prelude.Text,
    -- | The identifier for the specified control set.
    UpdateAssessmentControlSetStatus -> Text
controlSetId :: Prelude.Text,
    -- | The status of the control set that is being updated.
    UpdateAssessmentControlSetStatus -> ControlSetStatus
status :: ControlSetStatus,
    -- | The comment related to the status update.
    UpdateAssessmentControlSetStatus -> Text
comment :: Prelude.Text
  }
  deriving (UpdateAssessmentControlSetStatus
-> UpdateAssessmentControlSetStatus -> Bool
(UpdateAssessmentControlSetStatus
 -> UpdateAssessmentControlSetStatus -> Bool)
-> (UpdateAssessmentControlSetStatus
    -> UpdateAssessmentControlSetStatus -> Bool)
-> Eq UpdateAssessmentControlSetStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateAssessmentControlSetStatus
-> UpdateAssessmentControlSetStatus -> Bool
$c/= :: UpdateAssessmentControlSetStatus
-> UpdateAssessmentControlSetStatus -> Bool
== :: UpdateAssessmentControlSetStatus
-> UpdateAssessmentControlSetStatus -> Bool
$c== :: UpdateAssessmentControlSetStatus
-> UpdateAssessmentControlSetStatus -> Bool
Prelude.Eq, ReadPrec [UpdateAssessmentControlSetStatus]
ReadPrec UpdateAssessmentControlSetStatus
Int -> ReadS UpdateAssessmentControlSetStatus
ReadS [UpdateAssessmentControlSetStatus]
(Int -> ReadS UpdateAssessmentControlSetStatus)
-> ReadS [UpdateAssessmentControlSetStatus]
-> ReadPrec UpdateAssessmentControlSetStatus
-> ReadPrec [UpdateAssessmentControlSetStatus]
-> Read UpdateAssessmentControlSetStatus
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateAssessmentControlSetStatus]
$creadListPrec :: ReadPrec [UpdateAssessmentControlSetStatus]
readPrec :: ReadPrec UpdateAssessmentControlSetStatus
$creadPrec :: ReadPrec UpdateAssessmentControlSetStatus
readList :: ReadS [UpdateAssessmentControlSetStatus]
$creadList :: ReadS [UpdateAssessmentControlSetStatus]
readsPrec :: Int -> ReadS UpdateAssessmentControlSetStatus
$creadsPrec :: Int -> ReadS UpdateAssessmentControlSetStatus
Prelude.Read, Int -> UpdateAssessmentControlSetStatus -> ShowS
[UpdateAssessmentControlSetStatus] -> ShowS
UpdateAssessmentControlSetStatus -> String
(Int -> UpdateAssessmentControlSetStatus -> ShowS)
-> (UpdateAssessmentControlSetStatus -> String)
-> ([UpdateAssessmentControlSetStatus] -> ShowS)
-> Show UpdateAssessmentControlSetStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateAssessmentControlSetStatus] -> ShowS
$cshowList :: [UpdateAssessmentControlSetStatus] -> ShowS
show :: UpdateAssessmentControlSetStatus -> String
$cshow :: UpdateAssessmentControlSetStatus -> String
showsPrec :: Int -> UpdateAssessmentControlSetStatus -> ShowS
$cshowsPrec :: Int -> UpdateAssessmentControlSetStatus -> ShowS
Prelude.Show, (forall x.
 UpdateAssessmentControlSetStatus
 -> Rep UpdateAssessmentControlSetStatus x)
-> (forall x.
    Rep UpdateAssessmentControlSetStatus x
    -> UpdateAssessmentControlSetStatus)
-> Generic UpdateAssessmentControlSetStatus
forall x.
Rep UpdateAssessmentControlSetStatus x
-> UpdateAssessmentControlSetStatus
forall x.
UpdateAssessmentControlSetStatus
-> Rep UpdateAssessmentControlSetStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateAssessmentControlSetStatus x
-> UpdateAssessmentControlSetStatus
$cfrom :: forall x.
UpdateAssessmentControlSetStatus
-> Rep UpdateAssessmentControlSetStatus x
Prelude.Generic)

-- |
-- Create a value of 'UpdateAssessmentControlSetStatus' 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:
--
-- 'assessmentId', 'updateAssessmentControlSetStatus_assessmentId' - The identifier for the specified assessment.
--
-- 'controlSetId', 'updateAssessmentControlSetStatus_controlSetId' - The identifier for the specified control set.
--
-- 'status', 'updateAssessmentControlSetStatus_status' - The status of the control set that is being updated.
--
-- 'comment', 'updateAssessmentControlSetStatus_comment' - The comment related to the status update.
newUpdateAssessmentControlSetStatus ::
  -- | 'assessmentId'
  Prelude.Text ->
  -- | 'controlSetId'
  Prelude.Text ->
  -- | 'status'
  ControlSetStatus ->
  -- | 'comment'
  Prelude.Text ->
  UpdateAssessmentControlSetStatus
newUpdateAssessmentControlSetStatus :: Text
-> Text
-> ControlSetStatus
-> Text
-> UpdateAssessmentControlSetStatus
newUpdateAssessmentControlSetStatus
  Text
pAssessmentId_
  Text
pControlSetId_
  ControlSetStatus
pStatus_
  Text
pComment_ =
    UpdateAssessmentControlSetStatus' :: Text
-> Text
-> ControlSetStatus
-> Text
-> UpdateAssessmentControlSetStatus
UpdateAssessmentControlSetStatus'
      { $sel:assessmentId:UpdateAssessmentControlSetStatus' :: Text
assessmentId =
          Text
pAssessmentId_,
        $sel:controlSetId:UpdateAssessmentControlSetStatus' :: Text
controlSetId = Text
pControlSetId_,
        $sel:status:UpdateAssessmentControlSetStatus' :: ControlSetStatus
status = ControlSetStatus
pStatus_,
        $sel:comment:UpdateAssessmentControlSetStatus' :: Text
comment = Text
pComment_
      }

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

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

-- | The status of the control set that is being updated.
updateAssessmentControlSetStatus_status :: Lens.Lens' UpdateAssessmentControlSetStatus ControlSetStatus
updateAssessmentControlSetStatus_status :: (ControlSetStatus -> f ControlSetStatus)
-> UpdateAssessmentControlSetStatus
-> f UpdateAssessmentControlSetStatus
updateAssessmentControlSetStatus_status = (UpdateAssessmentControlSetStatus -> ControlSetStatus)
-> (UpdateAssessmentControlSetStatus
    -> ControlSetStatus -> UpdateAssessmentControlSetStatus)
-> Lens
     UpdateAssessmentControlSetStatus
     UpdateAssessmentControlSetStatus
     ControlSetStatus
     ControlSetStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAssessmentControlSetStatus' {ControlSetStatus
status :: ControlSetStatus
$sel:status:UpdateAssessmentControlSetStatus' :: UpdateAssessmentControlSetStatus -> ControlSetStatus
status} -> ControlSetStatus
status) (\s :: UpdateAssessmentControlSetStatus
s@UpdateAssessmentControlSetStatus' {} ControlSetStatus
a -> UpdateAssessmentControlSetStatus
s {$sel:status:UpdateAssessmentControlSetStatus' :: ControlSetStatus
status = ControlSetStatus
a} :: UpdateAssessmentControlSetStatus)

-- | The comment related to the status update.
updateAssessmentControlSetStatus_comment :: Lens.Lens' UpdateAssessmentControlSetStatus Prelude.Text
updateAssessmentControlSetStatus_comment :: (Text -> f Text)
-> UpdateAssessmentControlSetStatus
-> f UpdateAssessmentControlSetStatus
updateAssessmentControlSetStatus_comment = (UpdateAssessmentControlSetStatus -> Text)
-> (UpdateAssessmentControlSetStatus
    -> Text -> UpdateAssessmentControlSetStatus)
-> Lens
     UpdateAssessmentControlSetStatus
     UpdateAssessmentControlSetStatus
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAssessmentControlSetStatus' {Text
comment :: Text
$sel:comment:UpdateAssessmentControlSetStatus' :: UpdateAssessmentControlSetStatus -> Text
comment} -> Text
comment) (\s :: UpdateAssessmentControlSetStatus
s@UpdateAssessmentControlSetStatus' {} Text
a -> UpdateAssessmentControlSetStatus
s {$sel:comment:UpdateAssessmentControlSetStatus' :: Text
comment = Text
a} :: UpdateAssessmentControlSetStatus)

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

instance
  Prelude.NFData
    UpdateAssessmentControlSetStatus

instance
  Core.ToHeaders
    UpdateAssessmentControlSetStatus
  where
  toHeaders :: UpdateAssessmentControlSetStatus -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> UpdateAssessmentControlSetStatus -> 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 UpdateAssessmentControlSetStatus where
  toJSON :: UpdateAssessmentControlSetStatus -> Value
toJSON UpdateAssessmentControlSetStatus' {Text
ControlSetStatus
comment :: Text
status :: ControlSetStatus
controlSetId :: Text
assessmentId :: Text
$sel:comment:UpdateAssessmentControlSetStatus' :: UpdateAssessmentControlSetStatus -> Text
$sel:status:UpdateAssessmentControlSetStatus' :: UpdateAssessmentControlSetStatus -> ControlSetStatus
$sel:controlSetId:UpdateAssessmentControlSetStatus' :: UpdateAssessmentControlSetStatus -> Text
$sel:assessmentId:UpdateAssessmentControlSetStatus' :: UpdateAssessmentControlSetStatus -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"status" Text -> ControlSetStatus -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ControlSetStatus
status),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"comment" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
comment)
          ]
      )

instance Core.ToPath UpdateAssessmentControlSetStatus where
  toPath :: UpdateAssessmentControlSetStatus -> ByteString
toPath UpdateAssessmentControlSetStatus' {Text
ControlSetStatus
comment :: Text
status :: ControlSetStatus
controlSetId :: Text
assessmentId :: Text
$sel:comment:UpdateAssessmentControlSetStatus' :: UpdateAssessmentControlSetStatus -> Text
$sel:status:UpdateAssessmentControlSetStatus' :: UpdateAssessmentControlSetStatus -> ControlSetStatus
$sel:controlSetId:UpdateAssessmentControlSetStatus' :: UpdateAssessmentControlSetStatus -> Text
$sel:assessmentId:UpdateAssessmentControlSetStatus' :: UpdateAssessmentControlSetStatus -> Text
..} =
    [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
"/status"
      ]

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

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

-- |
-- Create a value of 'UpdateAssessmentControlSetStatusResponse' 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:
--
-- 'controlSet', 'updateAssessmentControlSetStatusResponse_controlSet' - The name of the updated control set returned by the
-- @UpdateAssessmentControlSetStatus@ API.
--
-- 'httpStatus', 'updateAssessmentControlSetStatusResponse_httpStatus' - The response's http status code.
newUpdateAssessmentControlSetStatusResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateAssessmentControlSetStatusResponse
newUpdateAssessmentControlSetStatusResponse :: Int -> UpdateAssessmentControlSetStatusResponse
newUpdateAssessmentControlSetStatusResponse
  Int
pHttpStatus_ =
    UpdateAssessmentControlSetStatusResponse' :: Maybe AssessmentControlSet
-> Int -> UpdateAssessmentControlSetStatusResponse
UpdateAssessmentControlSetStatusResponse'
      { $sel:controlSet:UpdateAssessmentControlSetStatusResponse' :: Maybe AssessmentControlSet
controlSet =
          Maybe AssessmentControlSet
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:UpdateAssessmentControlSetStatusResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The name of the updated control set returned by the
-- @UpdateAssessmentControlSetStatus@ API.
updateAssessmentControlSetStatusResponse_controlSet :: Lens.Lens' UpdateAssessmentControlSetStatusResponse (Prelude.Maybe AssessmentControlSet)
updateAssessmentControlSetStatusResponse_controlSet :: (Maybe AssessmentControlSet -> f (Maybe AssessmentControlSet))
-> UpdateAssessmentControlSetStatusResponse
-> f UpdateAssessmentControlSetStatusResponse
updateAssessmentControlSetStatusResponse_controlSet = (UpdateAssessmentControlSetStatusResponse
 -> Maybe AssessmentControlSet)
-> (UpdateAssessmentControlSetStatusResponse
    -> Maybe AssessmentControlSet
    -> UpdateAssessmentControlSetStatusResponse)
-> Lens
     UpdateAssessmentControlSetStatusResponse
     UpdateAssessmentControlSetStatusResponse
     (Maybe AssessmentControlSet)
     (Maybe AssessmentControlSet)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAssessmentControlSetStatusResponse' {Maybe AssessmentControlSet
controlSet :: Maybe AssessmentControlSet
$sel:controlSet:UpdateAssessmentControlSetStatusResponse' :: UpdateAssessmentControlSetStatusResponse
-> Maybe AssessmentControlSet
controlSet} -> Maybe AssessmentControlSet
controlSet) (\s :: UpdateAssessmentControlSetStatusResponse
s@UpdateAssessmentControlSetStatusResponse' {} Maybe AssessmentControlSet
a -> UpdateAssessmentControlSetStatusResponse
s {$sel:controlSet:UpdateAssessmentControlSetStatusResponse' :: Maybe AssessmentControlSet
controlSet = Maybe AssessmentControlSet
a} :: UpdateAssessmentControlSetStatusResponse)

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

instance
  Prelude.NFData
    UpdateAssessmentControlSetStatusResponse