{-# 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.IAM.GetServiceLinkedRoleDeletionStatus
-- 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)
--
-- Retrieves the status of your service-linked role deletion. After you use
-- DeleteServiceLinkedRole to submit a service-linked role for deletion,
-- you can use the @DeletionTaskId@ parameter in
-- @GetServiceLinkedRoleDeletionStatus@ to check the status of the
-- deletion. If the deletion fails, this operation returns the reason that
-- it failed, if that information is returned by the service.
module Amazonka.IAM.GetServiceLinkedRoleDeletionStatus
  ( -- * Creating a Request
    GetServiceLinkedRoleDeletionStatus (..),
    newGetServiceLinkedRoleDeletionStatus,

    -- * Request Lenses
    getServiceLinkedRoleDeletionStatus_deletionTaskId,

    -- * Destructuring the Response
    GetServiceLinkedRoleDeletionStatusResponse (..),
    newGetServiceLinkedRoleDeletionStatusResponse,

    -- * Response Lenses
    getServiceLinkedRoleDeletionStatusResponse_reason,
    getServiceLinkedRoleDeletionStatusResponse_httpStatus,
    getServiceLinkedRoleDeletionStatusResponse_status,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.IAM.Types
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:/ 'newGetServiceLinkedRoleDeletionStatus' smart constructor.
data GetServiceLinkedRoleDeletionStatus = GetServiceLinkedRoleDeletionStatus'
  { -- | The deletion task identifier. This identifier is returned by the
    -- DeleteServiceLinkedRole operation in the format
    -- @task\/aws-service-role\/\<service-principal-name>\/\<role-name>\/\<task-uuid>@.
    GetServiceLinkedRoleDeletionStatus -> Text
deletionTaskId :: Prelude.Text
  }
  deriving (GetServiceLinkedRoleDeletionStatus
-> GetServiceLinkedRoleDeletionStatus -> Bool
(GetServiceLinkedRoleDeletionStatus
 -> GetServiceLinkedRoleDeletionStatus -> Bool)
-> (GetServiceLinkedRoleDeletionStatus
    -> GetServiceLinkedRoleDeletionStatus -> Bool)
-> Eq GetServiceLinkedRoleDeletionStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetServiceLinkedRoleDeletionStatus
-> GetServiceLinkedRoleDeletionStatus -> Bool
$c/= :: GetServiceLinkedRoleDeletionStatus
-> GetServiceLinkedRoleDeletionStatus -> Bool
== :: GetServiceLinkedRoleDeletionStatus
-> GetServiceLinkedRoleDeletionStatus -> Bool
$c== :: GetServiceLinkedRoleDeletionStatus
-> GetServiceLinkedRoleDeletionStatus -> Bool
Prelude.Eq, ReadPrec [GetServiceLinkedRoleDeletionStatus]
ReadPrec GetServiceLinkedRoleDeletionStatus
Int -> ReadS GetServiceLinkedRoleDeletionStatus
ReadS [GetServiceLinkedRoleDeletionStatus]
(Int -> ReadS GetServiceLinkedRoleDeletionStatus)
-> ReadS [GetServiceLinkedRoleDeletionStatus]
-> ReadPrec GetServiceLinkedRoleDeletionStatus
-> ReadPrec [GetServiceLinkedRoleDeletionStatus]
-> Read GetServiceLinkedRoleDeletionStatus
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetServiceLinkedRoleDeletionStatus]
$creadListPrec :: ReadPrec [GetServiceLinkedRoleDeletionStatus]
readPrec :: ReadPrec GetServiceLinkedRoleDeletionStatus
$creadPrec :: ReadPrec GetServiceLinkedRoleDeletionStatus
readList :: ReadS [GetServiceLinkedRoleDeletionStatus]
$creadList :: ReadS [GetServiceLinkedRoleDeletionStatus]
readsPrec :: Int -> ReadS GetServiceLinkedRoleDeletionStatus
$creadsPrec :: Int -> ReadS GetServiceLinkedRoleDeletionStatus
Prelude.Read, Int -> GetServiceLinkedRoleDeletionStatus -> ShowS
[GetServiceLinkedRoleDeletionStatus] -> ShowS
GetServiceLinkedRoleDeletionStatus -> String
(Int -> GetServiceLinkedRoleDeletionStatus -> ShowS)
-> (GetServiceLinkedRoleDeletionStatus -> String)
-> ([GetServiceLinkedRoleDeletionStatus] -> ShowS)
-> Show GetServiceLinkedRoleDeletionStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetServiceLinkedRoleDeletionStatus] -> ShowS
$cshowList :: [GetServiceLinkedRoleDeletionStatus] -> ShowS
show :: GetServiceLinkedRoleDeletionStatus -> String
$cshow :: GetServiceLinkedRoleDeletionStatus -> String
showsPrec :: Int -> GetServiceLinkedRoleDeletionStatus -> ShowS
$cshowsPrec :: Int -> GetServiceLinkedRoleDeletionStatus -> ShowS
Prelude.Show, (forall x.
 GetServiceLinkedRoleDeletionStatus
 -> Rep GetServiceLinkedRoleDeletionStatus x)
-> (forall x.
    Rep GetServiceLinkedRoleDeletionStatus x
    -> GetServiceLinkedRoleDeletionStatus)
-> Generic GetServiceLinkedRoleDeletionStatus
forall x.
Rep GetServiceLinkedRoleDeletionStatus x
-> GetServiceLinkedRoleDeletionStatus
forall x.
GetServiceLinkedRoleDeletionStatus
-> Rep GetServiceLinkedRoleDeletionStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetServiceLinkedRoleDeletionStatus x
-> GetServiceLinkedRoleDeletionStatus
$cfrom :: forall x.
GetServiceLinkedRoleDeletionStatus
-> Rep GetServiceLinkedRoleDeletionStatus x
Prelude.Generic)

-- |
-- Create a value of 'GetServiceLinkedRoleDeletionStatus' 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:
--
-- 'deletionTaskId', 'getServiceLinkedRoleDeletionStatus_deletionTaskId' - The deletion task identifier. This identifier is returned by the
-- DeleteServiceLinkedRole operation in the format
-- @task\/aws-service-role\/\<service-principal-name>\/\<role-name>\/\<task-uuid>@.
newGetServiceLinkedRoleDeletionStatus ::
  -- | 'deletionTaskId'
  Prelude.Text ->
  GetServiceLinkedRoleDeletionStatus
newGetServiceLinkedRoleDeletionStatus :: Text -> GetServiceLinkedRoleDeletionStatus
newGetServiceLinkedRoleDeletionStatus
  Text
pDeletionTaskId_ =
    GetServiceLinkedRoleDeletionStatus' :: Text -> GetServiceLinkedRoleDeletionStatus
GetServiceLinkedRoleDeletionStatus'
      { $sel:deletionTaskId:GetServiceLinkedRoleDeletionStatus' :: Text
deletionTaskId =
          Text
pDeletionTaskId_
      }

-- | The deletion task identifier. This identifier is returned by the
-- DeleteServiceLinkedRole operation in the format
-- @task\/aws-service-role\/\<service-principal-name>\/\<role-name>\/\<task-uuid>@.
getServiceLinkedRoleDeletionStatus_deletionTaskId :: Lens.Lens' GetServiceLinkedRoleDeletionStatus Prelude.Text
getServiceLinkedRoleDeletionStatus_deletionTaskId :: (Text -> f Text)
-> GetServiceLinkedRoleDeletionStatus
-> f GetServiceLinkedRoleDeletionStatus
getServiceLinkedRoleDeletionStatus_deletionTaskId = (GetServiceLinkedRoleDeletionStatus -> Text)
-> (GetServiceLinkedRoleDeletionStatus
    -> Text -> GetServiceLinkedRoleDeletionStatus)
-> Lens
     GetServiceLinkedRoleDeletionStatus
     GetServiceLinkedRoleDeletionStatus
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetServiceLinkedRoleDeletionStatus' {Text
deletionTaskId :: Text
$sel:deletionTaskId:GetServiceLinkedRoleDeletionStatus' :: GetServiceLinkedRoleDeletionStatus -> Text
deletionTaskId} -> Text
deletionTaskId) (\s :: GetServiceLinkedRoleDeletionStatus
s@GetServiceLinkedRoleDeletionStatus' {} Text
a -> GetServiceLinkedRoleDeletionStatus
s {$sel:deletionTaskId:GetServiceLinkedRoleDeletionStatus' :: Text
deletionTaskId = Text
a} :: GetServiceLinkedRoleDeletionStatus)

instance
  Core.AWSRequest
    GetServiceLinkedRoleDeletionStatus
  where
  type
    AWSResponse GetServiceLinkedRoleDeletionStatus =
      GetServiceLinkedRoleDeletionStatusResponse
  request :: GetServiceLinkedRoleDeletionStatus
-> Request GetServiceLinkedRoleDeletionStatus
request = Service
-> GetServiceLinkedRoleDeletionStatus
-> Request GetServiceLinkedRoleDeletionStatus
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy GetServiceLinkedRoleDeletionStatus
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse GetServiceLinkedRoleDeletionStatus)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse GetServiceLinkedRoleDeletionStatus))
-> Logger
-> Service
-> Proxy GetServiceLinkedRoleDeletionStatus
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse GetServiceLinkedRoleDeletionStatus)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"GetServiceLinkedRoleDeletionStatusResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe DeletionTaskFailureReasonType
-> Int
-> DeletionTaskStatusType
-> GetServiceLinkedRoleDeletionStatusResponse
GetServiceLinkedRoleDeletionStatusResponse'
            (Maybe DeletionTaskFailureReasonType
 -> Int
 -> DeletionTaskStatusType
 -> GetServiceLinkedRoleDeletionStatusResponse)
-> Either String (Maybe DeletionTaskFailureReasonType)
-> Either
     String
     (Int
      -> DeletionTaskStatusType
      -> GetServiceLinkedRoleDeletionStatusResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node]
-> Text -> Either String (Maybe DeletionTaskFailureReasonType)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Reason")
              Either
  String
  (Int
   -> DeletionTaskStatusType
   -> GetServiceLinkedRoleDeletionStatusResponse)
-> Either String Int
-> Either
     String
     (DeletionTaskStatusType
      -> GetServiceLinkedRoleDeletionStatusResponse)
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))
              Either
  String
  (DeletionTaskStatusType
   -> GetServiceLinkedRoleDeletionStatusResponse)
-> Either String DeletionTaskStatusType
-> Either String GetServiceLinkedRoleDeletionStatusResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String DeletionTaskStatusType
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"Status")
      )

instance
  Prelude.Hashable
    GetServiceLinkedRoleDeletionStatus

instance
  Prelude.NFData
    GetServiceLinkedRoleDeletionStatus

instance
  Core.ToHeaders
    GetServiceLinkedRoleDeletionStatus
  where
  toHeaders :: GetServiceLinkedRoleDeletionStatus -> ResponseHeaders
toHeaders = ResponseHeaders
-> GetServiceLinkedRoleDeletionStatus -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

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

instance
  Core.ToQuery
    GetServiceLinkedRoleDeletionStatus
  where
  toQuery :: GetServiceLinkedRoleDeletionStatus -> QueryString
toQuery GetServiceLinkedRoleDeletionStatus' {Text
deletionTaskId :: Text
$sel:deletionTaskId:GetServiceLinkedRoleDeletionStatus' :: GetServiceLinkedRoleDeletionStatus -> Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ( ByteString
"GetServiceLinkedRoleDeletionStatus" ::
                      Prelude.ByteString
                  ),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-05-08" :: Prelude.ByteString),
        ByteString
"DeletionTaskId" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
deletionTaskId
      ]

-- | /See:/ 'newGetServiceLinkedRoleDeletionStatusResponse' smart constructor.
data GetServiceLinkedRoleDeletionStatusResponse = GetServiceLinkedRoleDeletionStatusResponse'
  { -- | An object that contains details about the reason the deletion failed.
    GetServiceLinkedRoleDeletionStatusResponse
-> Maybe DeletionTaskFailureReasonType
reason :: Prelude.Maybe DeletionTaskFailureReasonType,
    -- | The response's http status code.
    GetServiceLinkedRoleDeletionStatusResponse -> Int
httpStatus :: Prelude.Int,
    -- | The status of the deletion.
    GetServiceLinkedRoleDeletionStatusResponse
-> DeletionTaskStatusType
status :: DeletionTaskStatusType
  }
  deriving (GetServiceLinkedRoleDeletionStatusResponse
-> GetServiceLinkedRoleDeletionStatusResponse -> Bool
(GetServiceLinkedRoleDeletionStatusResponse
 -> GetServiceLinkedRoleDeletionStatusResponse -> Bool)
-> (GetServiceLinkedRoleDeletionStatusResponse
    -> GetServiceLinkedRoleDeletionStatusResponse -> Bool)
-> Eq GetServiceLinkedRoleDeletionStatusResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetServiceLinkedRoleDeletionStatusResponse
-> GetServiceLinkedRoleDeletionStatusResponse -> Bool
$c/= :: GetServiceLinkedRoleDeletionStatusResponse
-> GetServiceLinkedRoleDeletionStatusResponse -> Bool
== :: GetServiceLinkedRoleDeletionStatusResponse
-> GetServiceLinkedRoleDeletionStatusResponse -> Bool
$c== :: GetServiceLinkedRoleDeletionStatusResponse
-> GetServiceLinkedRoleDeletionStatusResponse -> Bool
Prelude.Eq, ReadPrec [GetServiceLinkedRoleDeletionStatusResponse]
ReadPrec GetServiceLinkedRoleDeletionStatusResponse
Int -> ReadS GetServiceLinkedRoleDeletionStatusResponse
ReadS [GetServiceLinkedRoleDeletionStatusResponse]
(Int -> ReadS GetServiceLinkedRoleDeletionStatusResponse)
-> ReadS [GetServiceLinkedRoleDeletionStatusResponse]
-> ReadPrec GetServiceLinkedRoleDeletionStatusResponse
-> ReadPrec [GetServiceLinkedRoleDeletionStatusResponse]
-> Read GetServiceLinkedRoleDeletionStatusResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetServiceLinkedRoleDeletionStatusResponse]
$creadListPrec :: ReadPrec [GetServiceLinkedRoleDeletionStatusResponse]
readPrec :: ReadPrec GetServiceLinkedRoleDeletionStatusResponse
$creadPrec :: ReadPrec GetServiceLinkedRoleDeletionStatusResponse
readList :: ReadS [GetServiceLinkedRoleDeletionStatusResponse]
$creadList :: ReadS [GetServiceLinkedRoleDeletionStatusResponse]
readsPrec :: Int -> ReadS GetServiceLinkedRoleDeletionStatusResponse
$creadsPrec :: Int -> ReadS GetServiceLinkedRoleDeletionStatusResponse
Prelude.Read, Int -> GetServiceLinkedRoleDeletionStatusResponse -> ShowS
[GetServiceLinkedRoleDeletionStatusResponse] -> ShowS
GetServiceLinkedRoleDeletionStatusResponse -> String
(Int -> GetServiceLinkedRoleDeletionStatusResponse -> ShowS)
-> (GetServiceLinkedRoleDeletionStatusResponse -> String)
-> ([GetServiceLinkedRoleDeletionStatusResponse] -> ShowS)
-> Show GetServiceLinkedRoleDeletionStatusResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetServiceLinkedRoleDeletionStatusResponse] -> ShowS
$cshowList :: [GetServiceLinkedRoleDeletionStatusResponse] -> ShowS
show :: GetServiceLinkedRoleDeletionStatusResponse -> String
$cshow :: GetServiceLinkedRoleDeletionStatusResponse -> String
showsPrec :: Int -> GetServiceLinkedRoleDeletionStatusResponse -> ShowS
$cshowsPrec :: Int -> GetServiceLinkedRoleDeletionStatusResponse -> ShowS
Prelude.Show, (forall x.
 GetServiceLinkedRoleDeletionStatusResponse
 -> Rep GetServiceLinkedRoleDeletionStatusResponse x)
-> (forall x.
    Rep GetServiceLinkedRoleDeletionStatusResponse x
    -> GetServiceLinkedRoleDeletionStatusResponse)
-> Generic GetServiceLinkedRoleDeletionStatusResponse
forall x.
Rep GetServiceLinkedRoleDeletionStatusResponse x
-> GetServiceLinkedRoleDeletionStatusResponse
forall x.
GetServiceLinkedRoleDeletionStatusResponse
-> Rep GetServiceLinkedRoleDeletionStatusResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetServiceLinkedRoleDeletionStatusResponse x
-> GetServiceLinkedRoleDeletionStatusResponse
$cfrom :: forall x.
GetServiceLinkedRoleDeletionStatusResponse
-> Rep GetServiceLinkedRoleDeletionStatusResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetServiceLinkedRoleDeletionStatusResponse' 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:
--
-- 'reason', 'getServiceLinkedRoleDeletionStatusResponse_reason' - An object that contains details about the reason the deletion failed.
--
-- 'httpStatus', 'getServiceLinkedRoleDeletionStatusResponse_httpStatus' - The response's http status code.
--
-- 'status', 'getServiceLinkedRoleDeletionStatusResponse_status' - The status of the deletion.
newGetServiceLinkedRoleDeletionStatusResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'status'
  DeletionTaskStatusType ->
  GetServiceLinkedRoleDeletionStatusResponse
newGetServiceLinkedRoleDeletionStatusResponse :: Int
-> DeletionTaskStatusType
-> GetServiceLinkedRoleDeletionStatusResponse
newGetServiceLinkedRoleDeletionStatusResponse
  Int
pHttpStatus_
  DeletionTaskStatusType
pStatus_ =
    GetServiceLinkedRoleDeletionStatusResponse' :: Maybe DeletionTaskFailureReasonType
-> Int
-> DeletionTaskStatusType
-> GetServiceLinkedRoleDeletionStatusResponse
GetServiceLinkedRoleDeletionStatusResponse'
      { $sel:reason:GetServiceLinkedRoleDeletionStatusResponse' :: Maybe DeletionTaskFailureReasonType
reason =
          Maybe DeletionTaskFailureReasonType
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:GetServiceLinkedRoleDeletionStatusResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:status:GetServiceLinkedRoleDeletionStatusResponse' :: DeletionTaskStatusType
status = DeletionTaskStatusType
pStatus_
      }

-- | An object that contains details about the reason the deletion failed.
getServiceLinkedRoleDeletionStatusResponse_reason :: Lens.Lens' GetServiceLinkedRoleDeletionStatusResponse (Prelude.Maybe DeletionTaskFailureReasonType)
getServiceLinkedRoleDeletionStatusResponse_reason :: (Maybe DeletionTaskFailureReasonType
 -> f (Maybe DeletionTaskFailureReasonType))
-> GetServiceLinkedRoleDeletionStatusResponse
-> f GetServiceLinkedRoleDeletionStatusResponse
getServiceLinkedRoleDeletionStatusResponse_reason = (GetServiceLinkedRoleDeletionStatusResponse
 -> Maybe DeletionTaskFailureReasonType)
-> (GetServiceLinkedRoleDeletionStatusResponse
    -> Maybe DeletionTaskFailureReasonType
    -> GetServiceLinkedRoleDeletionStatusResponse)
-> Lens
     GetServiceLinkedRoleDeletionStatusResponse
     GetServiceLinkedRoleDeletionStatusResponse
     (Maybe DeletionTaskFailureReasonType)
     (Maybe DeletionTaskFailureReasonType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetServiceLinkedRoleDeletionStatusResponse' {Maybe DeletionTaskFailureReasonType
reason :: Maybe DeletionTaskFailureReasonType
$sel:reason:GetServiceLinkedRoleDeletionStatusResponse' :: GetServiceLinkedRoleDeletionStatusResponse
-> Maybe DeletionTaskFailureReasonType
reason} -> Maybe DeletionTaskFailureReasonType
reason) (\s :: GetServiceLinkedRoleDeletionStatusResponse
s@GetServiceLinkedRoleDeletionStatusResponse' {} Maybe DeletionTaskFailureReasonType
a -> GetServiceLinkedRoleDeletionStatusResponse
s {$sel:reason:GetServiceLinkedRoleDeletionStatusResponse' :: Maybe DeletionTaskFailureReasonType
reason = Maybe DeletionTaskFailureReasonType
a} :: GetServiceLinkedRoleDeletionStatusResponse)

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

-- | The status of the deletion.
getServiceLinkedRoleDeletionStatusResponse_status :: Lens.Lens' GetServiceLinkedRoleDeletionStatusResponse DeletionTaskStatusType
getServiceLinkedRoleDeletionStatusResponse_status :: (DeletionTaskStatusType -> f DeletionTaskStatusType)
-> GetServiceLinkedRoleDeletionStatusResponse
-> f GetServiceLinkedRoleDeletionStatusResponse
getServiceLinkedRoleDeletionStatusResponse_status = (GetServiceLinkedRoleDeletionStatusResponse
 -> DeletionTaskStatusType)
-> (GetServiceLinkedRoleDeletionStatusResponse
    -> DeletionTaskStatusType
    -> GetServiceLinkedRoleDeletionStatusResponse)
-> Lens
     GetServiceLinkedRoleDeletionStatusResponse
     GetServiceLinkedRoleDeletionStatusResponse
     DeletionTaskStatusType
     DeletionTaskStatusType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetServiceLinkedRoleDeletionStatusResponse' {DeletionTaskStatusType
status :: DeletionTaskStatusType
$sel:status:GetServiceLinkedRoleDeletionStatusResponse' :: GetServiceLinkedRoleDeletionStatusResponse
-> DeletionTaskStatusType
status} -> DeletionTaskStatusType
status) (\s :: GetServiceLinkedRoleDeletionStatusResponse
s@GetServiceLinkedRoleDeletionStatusResponse' {} DeletionTaskStatusType
a -> GetServiceLinkedRoleDeletionStatusResponse
s {$sel:status:GetServiceLinkedRoleDeletionStatusResponse' :: DeletionTaskStatusType
status = DeletionTaskStatusType
a} :: GetServiceLinkedRoleDeletionStatusResponse)

instance
  Prelude.NFData
    GetServiceLinkedRoleDeletionStatusResponse