{-# 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.BatchDeleteDelegationByAssessment
-- 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)
--
-- Deletes the delegations in the specified Audit Manager assessment.
module Amazonka.AuditManager.BatchDeleteDelegationByAssessment
  ( -- * Creating a Request
    BatchDeleteDelegationByAssessment (..),
    newBatchDeleteDelegationByAssessment,

    -- * Request Lenses
    batchDeleteDelegationByAssessment_delegationIds,
    batchDeleteDelegationByAssessment_assessmentId,

    -- * Destructuring the Response
    BatchDeleteDelegationByAssessmentResponse (..),
    newBatchDeleteDelegationByAssessmentResponse,

    -- * Response Lenses
    batchDeleteDelegationByAssessmentResponse_errors,
    batchDeleteDelegationByAssessmentResponse_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:/ 'newBatchDeleteDelegationByAssessment' smart constructor.
data BatchDeleteDelegationByAssessment = BatchDeleteDelegationByAssessment'
  { -- | The identifiers for the specified delegations.
    BatchDeleteDelegationByAssessment -> NonEmpty Text
delegationIds :: Prelude.NonEmpty Prelude.Text,
    -- | The identifier for the specified assessment.
    BatchDeleteDelegationByAssessment -> Text
assessmentId :: Prelude.Text
  }
  deriving (BatchDeleteDelegationByAssessment
-> BatchDeleteDelegationByAssessment -> Bool
(BatchDeleteDelegationByAssessment
 -> BatchDeleteDelegationByAssessment -> Bool)
-> (BatchDeleteDelegationByAssessment
    -> BatchDeleteDelegationByAssessment -> Bool)
-> Eq BatchDeleteDelegationByAssessment
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchDeleteDelegationByAssessment
-> BatchDeleteDelegationByAssessment -> Bool
$c/= :: BatchDeleteDelegationByAssessment
-> BatchDeleteDelegationByAssessment -> Bool
== :: BatchDeleteDelegationByAssessment
-> BatchDeleteDelegationByAssessment -> Bool
$c== :: BatchDeleteDelegationByAssessment
-> BatchDeleteDelegationByAssessment -> Bool
Prelude.Eq, ReadPrec [BatchDeleteDelegationByAssessment]
ReadPrec BatchDeleteDelegationByAssessment
Int -> ReadS BatchDeleteDelegationByAssessment
ReadS [BatchDeleteDelegationByAssessment]
(Int -> ReadS BatchDeleteDelegationByAssessment)
-> ReadS [BatchDeleteDelegationByAssessment]
-> ReadPrec BatchDeleteDelegationByAssessment
-> ReadPrec [BatchDeleteDelegationByAssessment]
-> Read BatchDeleteDelegationByAssessment
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchDeleteDelegationByAssessment]
$creadListPrec :: ReadPrec [BatchDeleteDelegationByAssessment]
readPrec :: ReadPrec BatchDeleteDelegationByAssessment
$creadPrec :: ReadPrec BatchDeleteDelegationByAssessment
readList :: ReadS [BatchDeleteDelegationByAssessment]
$creadList :: ReadS [BatchDeleteDelegationByAssessment]
readsPrec :: Int -> ReadS BatchDeleteDelegationByAssessment
$creadsPrec :: Int -> ReadS BatchDeleteDelegationByAssessment
Prelude.Read, Int -> BatchDeleteDelegationByAssessment -> ShowS
[BatchDeleteDelegationByAssessment] -> ShowS
BatchDeleteDelegationByAssessment -> String
(Int -> BatchDeleteDelegationByAssessment -> ShowS)
-> (BatchDeleteDelegationByAssessment -> String)
-> ([BatchDeleteDelegationByAssessment] -> ShowS)
-> Show BatchDeleteDelegationByAssessment
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchDeleteDelegationByAssessment] -> ShowS
$cshowList :: [BatchDeleteDelegationByAssessment] -> ShowS
show :: BatchDeleteDelegationByAssessment -> String
$cshow :: BatchDeleteDelegationByAssessment -> String
showsPrec :: Int -> BatchDeleteDelegationByAssessment -> ShowS
$cshowsPrec :: Int -> BatchDeleteDelegationByAssessment -> ShowS
Prelude.Show, (forall x.
 BatchDeleteDelegationByAssessment
 -> Rep BatchDeleteDelegationByAssessment x)
-> (forall x.
    Rep BatchDeleteDelegationByAssessment x
    -> BatchDeleteDelegationByAssessment)
-> Generic BatchDeleteDelegationByAssessment
forall x.
Rep BatchDeleteDelegationByAssessment x
-> BatchDeleteDelegationByAssessment
forall x.
BatchDeleteDelegationByAssessment
-> Rep BatchDeleteDelegationByAssessment x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchDeleteDelegationByAssessment x
-> BatchDeleteDelegationByAssessment
$cfrom :: forall x.
BatchDeleteDelegationByAssessment
-> Rep BatchDeleteDelegationByAssessment x
Prelude.Generic)

-- |
-- Create a value of 'BatchDeleteDelegationByAssessment' 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:
--
-- 'delegationIds', 'batchDeleteDelegationByAssessment_delegationIds' - The identifiers for the specified delegations.
--
-- 'assessmentId', 'batchDeleteDelegationByAssessment_assessmentId' - The identifier for the specified assessment.
newBatchDeleteDelegationByAssessment ::
  -- | 'delegationIds'
  Prelude.NonEmpty Prelude.Text ->
  -- | 'assessmentId'
  Prelude.Text ->
  BatchDeleteDelegationByAssessment
newBatchDeleteDelegationByAssessment :: NonEmpty Text -> Text -> BatchDeleteDelegationByAssessment
newBatchDeleteDelegationByAssessment
  NonEmpty Text
pDelegationIds_
  Text
pAssessmentId_ =
    BatchDeleteDelegationByAssessment' :: NonEmpty Text -> Text -> BatchDeleteDelegationByAssessment
BatchDeleteDelegationByAssessment'
      { $sel:delegationIds:BatchDeleteDelegationByAssessment' :: NonEmpty Text
delegationIds =
          Tagged (NonEmpty Text) (Identity (NonEmpty Text))
-> Tagged (NonEmpty Text) (Identity (NonEmpty Text))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced (Tagged (NonEmpty Text) (Identity (NonEmpty Text))
 -> Tagged (NonEmpty Text) (Identity (NonEmpty Text)))
-> NonEmpty Text -> NonEmpty Text
forall t b. AReview t b -> b -> t
Lens.# NonEmpty Text
pDelegationIds_,
        $sel:assessmentId:BatchDeleteDelegationByAssessment' :: Text
assessmentId = Text
pAssessmentId_
      }

-- | The identifiers for the specified delegations.
batchDeleteDelegationByAssessment_delegationIds :: Lens.Lens' BatchDeleteDelegationByAssessment (Prelude.NonEmpty Prelude.Text)
batchDeleteDelegationByAssessment_delegationIds :: (NonEmpty Text -> f (NonEmpty Text))
-> BatchDeleteDelegationByAssessment
-> f BatchDeleteDelegationByAssessment
batchDeleteDelegationByAssessment_delegationIds = (BatchDeleteDelegationByAssessment -> NonEmpty Text)
-> (BatchDeleteDelegationByAssessment
    -> NonEmpty Text -> BatchDeleteDelegationByAssessment)
-> Lens
     BatchDeleteDelegationByAssessment
     BatchDeleteDelegationByAssessment
     (NonEmpty Text)
     (NonEmpty Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDeleteDelegationByAssessment' {NonEmpty Text
delegationIds :: NonEmpty Text
$sel:delegationIds:BatchDeleteDelegationByAssessment' :: BatchDeleteDelegationByAssessment -> NonEmpty Text
delegationIds} -> NonEmpty Text
delegationIds) (\s :: BatchDeleteDelegationByAssessment
s@BatchDeleteDelegationByAssessment' {} NonEmpty Text
a -> BatchDeleteDelegationByAssessment
s {$sel:delegationIds:BatchDeleteDelegationByAssessment' :: NonEmpty Text
delegationIds = NonEmpty Text
a} :: BatchDeleteDelegationByAssessment) ((NonEmpty Text -> f (NonEmpty Text))
 -> BatchDeleteDelegationByAssessment
 -> f BatchDeleteDelegationByAssessment)
-> ((NonEmpty Text -> f (NonEmpty Text))
    -> NonEmpty Text -> f (NonEmpty Text))
-> (NonEmpty Text -> f (NonEmpty Text))
-> BatchDeleteDelegationByAssessment
-> f BatchDeleteDelegationByAssessment
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty Text -> f (NonEmpty Text))
-> NonEmpty Text -> f (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Core.AWSRequest
    BatchDeleteDelegationByAssessment
  where
  type
    AWSResponse BatchDeleteDelegationByAssessment =
      BatchDeleteDelegationByAssessmentResponse
  request :: BatchDeleteDelegationByAssessment
-> Request BatchDeleteDelegationByAssessment
request = Service
-> BatchDeleteDelegationByAssessment
-> Request BatchDeleteDelegationByAssessment
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy BatchDeleteDelegationByAssessment
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse BatchDeleteDelegationByAssessment)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse BatchDeleteDelegationByAssessment))
-> Logger
-> Service
-> Proxy BatchDeleteDelegationByAssessment
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse BatchDeleteDelegationByAssessment)))
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 [BatchDeleteDelegationByAssessmentError]
-> Int -> BatchDeleteDelegationByAssessmentResponse
BatchDeleteDelegationByAssessmentResponse'
            (Maybe [BatchDeleteDelegationByAssessmentError]
 -> Int -> BatchDeleteDelegationByAssessmentResponse)
-> Either String (Maybe [BatchDeleteDelegationByAssessmentError])
-> Either String (Int -> BatchDeleteDelegationByAssessmentResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text
-> Either
     String (Maybe (Maybe [BatchDeleteDelegationByAssessmentError]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"errors" Either
  String (Maybe (Maybe [BatchDeleteDelegationByAssessmentError]))
-> Maybe [BatchDeleteDelegationByAssessmentError]
-> Either String (Maybe [BatchDeleteDelegationByAssessmentError])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [BatchDeleteDelegationByAssessmentError]
forall a. Monoid a => a
Prelude.mempty)
              Either String (Int -> BatchDeleteDelegationByAssessmentResponse)
-> Either String Int
-> Either String BatchDeleteDelegationByAssessmentResponse
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
    BatchDeleteDelegationByAssessment

instance
  Prelude.NFData
    BatchDeleteDelegationByAssessment

instance
  Core.ToHeaders
    BatchDeleteDelegationByAssessment
  where
  toHeaders :: BatchDeleteDelegationByAssessment -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> BatchDeleteDelegationByAssessment -> 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
    BatchDeleteDelegationByAssessment
  where
  toJSON :: BatchDeleteDelegationByAssessment -> Value
toJSON BatchDeleteDelegationByAssessment' {NonEmpty Text
Text
assessmentId :: Text
delegationIds :: NonEmpty Text
$sel:assessmentId:BatchDeleteDelegationByAssessment' :: BatchDeleteDelegationByAssessment -> Text
$sel:delegationIds:BatchDeleteDelegationByAssessment' :: BatchDeleteDelegationByAssessment -> NonEmpty 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
"delegationIds" Text -> NonEmpty Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= NonEmpty Text
delegationIds)
          ]
      )

instance
  Core.ToPath
    BatchDeleteDelegationByAssessment
  where
  toPath :: BatchDeleteDelegationByAssessment -> ByteString
toPath BatchDeleteDelegationByAssessment' {NonEmpty Text
Text
assessmentId :: Text
delegationIds :: NonEmpty Text
$sel:assessmentId:BatchDeleteDelegationByAssessment' :: BatchDeleteDelegationByAssessment -> Text
$sel:delegationIds:BatchDeleteDelegationByAssessment' :: BatchDeleteDelegationByAssessment -> NonEmpty 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
"/delegations"
      ]

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

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

-- |
-- Create a value of 'BatchDeleteDelegationByAssessmentResponse' 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:
--
-- 'errors', 'batchDeleteDelegationByAssessmentResponse_errors' - A list of errors returned by the @BatchDeleteDelegationByAssessment@
-- API.
--
-- 'httpStatus', 'batchDeleteDelegationByAssessmentResponse_httpStatus' - The response's http status code.
newBatchDeleteDelegationByAssessmentResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  BatchDeleteDelegationByAssessmentResponse
newBatchDeleteDelegationByAssessmentResponse :: Int -> BatchDeleteDelegationByAssessmentResponse
newBatchDeleteDelegationByAssessmentResponse
  Int
pHttpStatus_ =
    BatchDeleteDelegationByAssessmentResponse' :: Maybe [BatchDeleteDelegationByAssessmentError]
-> Int -> BatchDeleteDelegationByAssessmentResponse
BatchDeleteDelegationByAssessmentResponse'
      { $sel:errors:BatchDeleteDelegationByAssessmentResponse' :: Maybe [BatchDeleteDelegationByAssessmentError]
errors =
          Maybe [BatchDeleteDelegationByAssessmentError]
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:BatchDeleteDelegationByAssessmentResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | A list of errors returned by the @BatchDeleteDelegationByAssessment@
-- API.
batchDeleteDelegationByAssessmentResponse_errors :: Lens.Lens' BatchDeleteDelegationByAssessmentResponse (Prelude.Maybe [BatchDeleteDelegationByAssessmentError])
batchDeleteDelegationByAssessmentResponse_errors :: (Maybe [BatchDeleteDelegationByAssessmentError]
 -> f (Maybe [BatchDeleteDelegationByAssessmentError]))
-> BatchDeleteDelegationByAssessmentResponse
-> f BatchDeleteDelegationByAssessmentResponse
batchDeleteDelegationByAssessmentResponse_errors = (BatchDeleteDelegationByAssessmentResponse
 -> Maybe [BatchDeleteDelegationByAssessmentError])
-> (BatchDeleteDelegationByAssessmentResponse
    -> Maybe [BatchDeleteDelegationByAssessmentError]
    -> BatchDeleteDelegationByAssessmentResponse)
-> Lens
     BatchDeleteDelegationByAssessmentResponse
     BatchDeleteDelegationByAssessmentResponse
     (Maybe [BatchDeleteDelegationByAssessmentError])
     (Maybe [BatchDeleteDelegationByAssessmentError])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDeleteDelegationByAssessmentResponse' {Maybe [BatchDeleteDelegationByAssessmentError]
errors :: Maybe [BatchDeleteDelegationByAssessmentError]
$sel:errors:BatchDeleteDelegationByAssessmentResponse' :: BatchDeleteDelegationByAssessmentResponse
-> Maybe [BatchDeleteDelegationByAssessmentError]
errors} -> Maybe [BatchDeleteDelegationByAssessmentError]
errors) (\s :: BatchDeleteDelegationByAssessmentResponse
s@BatchDeleteDelegationByAssessmentResponse' {} Maybe [BatchDeleteDelegationByAssessmentError]
a -> BatchDeleteDelegationByAssessmentResponse
s {$sel:errors:BatchDeleteDelegationByAssessmentResponse' :: Maybe [BatchDeleteDelegationByAssessmentError]
errors = Maybe [BatchDeleteDelegationByAssessmentError]
a} :: BatchDeleteDelegationByAssessmentResponse) ((Maybe [BatchDeleteDelegationByAssessmentError]
  -> f (Maybe [BatchDeleteDelegationByAssessmentError]))
 -> BatchDeleteDelegationByAssessmentResponse
 -> f BatchDeleteDelegationByAssessmentResponse)
-> ((Maybe [BatchDeleteDelegationByAssessmentError]
     -> f (Maybe [BatchDeleteDelegationByAssessmentError]))
    -> Maybe [BatchDeleteDelegationByAssessmentError]
    -> f (Maybe [BatchDeleteDelegationByAssessmentError]))
-> (Maybe [BatchDeleteDelegationByAssessmentError]
    -> f (Maybe [BatchDeleteDelegationByAssessmentError]))
-> BatchDeleteDelegationByAssessmentResponse
-> f BatchDeleteDelegationByAssessmentResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [BatchDeleteDelegationByAssessmentError]
  [BatchDeleteDelegationByAssessmentError]
  [BatchDeleteDelegationByAssessmentError]
  [BatchDeleteDelegationByAssessmentError]
-> Iso
     (Maybe [BatchDeleteDelegationByAssessmentError])
     (Maybe [BatchDeleteDelegationByAssessmentError])
     (Maybe [BatchDeleteDelegationByAssessmentError])
     (Maybe [BatchDeleteDelegationByAssessmentError])
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
  [BatchDeleteDelegationByAssessmentError]
  [BatchDeleteDelegationByAssessmentError]
  [BatchDeleteDelegationByAssessmentError]
  [BatchDeleteDelegationByAssessmentError]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    BatchDeleteDelegationByAssessmentResponse