{-# 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.Config.DescribeRemediationExceptions
-- 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)
--
-- Returns the details of one or more remediation exceptions. A detailed
-- view of a remediation exception for a set of resources that includes an
-- explanation of an exception and the time when the exception will be
-- deleted. When you specify the limit and the next token, you receive a
-- paginated response.
--
-- Config generates a remediation exception when a problem occurs executing
-- a remediation action to a specific resource. Remediation exceptions
-- blocks auto-remediation until the exception is cleared.
--
-- When you specify the limit and the next token, you receive a paginated
-- response.
--
-- Limit and next token are not applicable if you request resources in
-- batch. It is only applicable, when you request all resources.
module Amazonka.Config.DescribeRemediationExceptions
  ( -- * Creating a Request
    DescribeRemediationExceptions (..),
    newDescribeRemediationExceptions,

    -- * Request Lenses
    describeRemediationExceptions_nextToken,
    describeRemediationExceptions_limit,
    describeRemediationExceptions_resourceKeys,
    describeRemediationExceptions_configRuleName,

    -- * Destructuring the Response
    DescribeRemediationExceptionsResponse (..),
    newDescribeRemediationExceptionsResponse,

    -- * Response Lenses
    describeRemediationExceptionsResponse_nextToken,
    describeRemediationExceptionsResponse_remediationExceptions,
    describeRemediationExceptionsResponse_httpStatus,
  )
where

import Amazonka.Config.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:/ 'newDescribeRemediationExceptions' smart constructor.
data DescribeRemediationExceptions = DescribeRemediationExceptions'
  { -- | The @nextToken@ string returned in a previous request that you use to
    -- request the next page of results in a paginated response.
    DescribeRemediationExceptions -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of RemediationExceptionResourceKey returned on each
    -- page. The default is 25. If you specify 0, Config uses the default.
    DescribeRemediationExceptions -> Maybe Natural
limit :: Prelude.Maybe Prelude.Natural,
    -- | An exception list of resource exception keys to be processed with the
    -- current request. Config adds exception for each resource key. For
    -- example, Config adds 3 exceptions for 3 resource keys.
    DescribeRemediationExceptions
-> Maybe (NonEmpty RemediationExceptionResourceKey)
resourceKeys :: Prelude.Maybe (Prelude.NonEmpty RemediationExceptionResourceKey),
    -- | The name of the Config rule.
    DescribeRemediationExceptions -> Text
configRuleName :: Prelude.Text
  }
  deriving (DescribeRemediationExceptions
-> DescribeRemediationExceptions -> Bool
(DescribeRemediationExceptions
 -> DescribeRemediationExceptions -> Bool)
-> (DescribeRemediationExceptions
    -> DescribeRemediationExceptions -> Bool)
-> Eq DescribeRemediationExceptions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeRemediationExceptions
-> DescribeRemediationExceptions -> Bool
$c/= :: DescribeRemediationExceptions
-> DescribeRemediationExceptions -> Bool
== :: DescribeRemediationExceptions
-> DescribeRemediationExceptions -> Bool
$c== :: DescribeRemediationExceptions
-> DescribeRemediationExceptions -> Bool
Prelude.Eq, ReadPrec [DescribeRemediationExceptions]
ReadPrec DescribeRemediationExceptions
Int -> ReadS DescribeRemediationExceptions
ReadS [DescribeRemediationExceptions]
(Int -> ReadS DescribeRemediationExceptions)
-> ReadS [DescribeRemediationExceptions]
-> ReadPrec DescribeRemediationExceptions
-> ReadPrec [DescribeRemediationExceptions]
-> Read DescribeRemediationExceptions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeRemediationExceptions]
$creadListPrec :: ReadPrec [DescribeRemediationExceptions]
readPrec :: ReadPrec DescribeRemediationExceptions
$creadPrec :: ReadPrec DescribeRemediationExceptions
readList :: ReadS [DescribeRemediationExceptions]
$creadList :: ReadS [DescribeRemediationExceptions]
readsPrec :: Int -> ReadS DescribeRemediationExceptions
$creadsPrec :: Int -> ReadS DescribeRemediationExceptions
Prelude.Read, Int -> DescribeRemediationExceptions -> ShowS
[DescribeRemediationExceptions] -> ShowS
DescribeRemediationExceptions -> String
(Int -> DescribeRemediationExceptions -> ShowS)
-> (DescribeRemediationExceptions -> String)
-> ([DescribeRemediationExceptions] -> ShowS)
-> Show DescribeRemediationExceptions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeRemediationExceptions] -> ShowS
$cshowList :: [DescribeRemediationExceptions] -> ShowS
show :: DescribeRemediationExceptions -> String
$cshow :: DescribeRemediationExceptions -> String
showsPrec :: Int -> DescribeRemediationExceptions -> ShowS
$cshowsPrec :: Int -> DescribeRemediationExceptions -> ShowS
Prelude.Show, (forall x.
 DescribeRemediationExceptions
 -> Rep DescribeRemediationExceptions x)
-> (forall x.
    Rep DescribeRemediationExceptions x
    -> DescribeRemediationExceptions)
-> Generic DescribeRemediationExceptions
forall x.
Rep DescribeRemediationExceptions x
-> DescribeRemediationExceptions
forall x.
DescribeRemediationExceptions
-> Rep DescribeRemediationExceptions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeRemediationExceptions x
-> DescribeRemediationExceptions
$cfrom :: forall x.
DescribeRemediationExceptions
-> Rep DescribeRemediationExceptions x
Prelude.Generic)

-- |
-- Create a value of 'DescribeRemediationExceptions' 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:
--
-- 'nextToken', 'describeRemediationExceptions_nextToken' - The @nextToken@ string returned in a previous request that you use to
-- request the next page of results in a paginated response.
--
-- 'limit', 'describeRemediationExceptions_limit' - The maximum number of RemediationExceptionResourceKey returned on each
-- page. The default is 25. If you specify 0, Config uses the default.
--
-- 'resourceKeys', 'describeRemediationExceptions_resourceKeys' - An exception list of resource exception keys to be processed with the
-- current request. Config adds exception for each resource key. For
-- example, Config adds 3 exceptions for 3 resource keys.
--
-- 'configRuleName', 'describeRemediationExceptions_configRuleName' - The name of the Config rule.
newDescribeRemediationExceptions ::
  -- | 'configRuleName'
  Prelude.Text ->
  DescribeRemediationExceptions
newDescribeRemediationExceptions :: Text -> DescribeRemediationExceptions
newDescribeRemediationExceptions Text
pConfigRuleName_ =
  DescribeRemediationExceptions' :: Maybe Text
-> Maybe Natural
-> Maybe (NonEmpty RemediationExceptionResourceKey)
-> Text
-> DescribeRemediationExceptions
DescribeRemediationExceptions'
    { $sel:nextToken:DescribeRemediationExceptions' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:limit:DescribeRemediationExceptions' :: Maybe Natural
limit = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceKeys:DescribeRemediationExceptions' :: Maybe (NonEmpty RemediationExceptionResourceKey)
resourceKeys = Maybe (NonEmpty RemediationExceptionResourceKey)
forall a. Maybe a
Prelude.Nothing,
      $sel:configRuleName:DescribeRemediationExceptions' :: Text
configRuleName = Text
pConfigRuleName_
    }

-- | The @nextToken@ string returned in a previous request that you use to
-- request the next page of results in a paginated response.
describeRemediationExceptions_nextToken :: Lens.Lens' DescribeRemediationExceptions (Prelude.Maybe Prelude.Text)
describeRemediationExceptions_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeRemediationExceptions -> f DescribeRemediationExceptions
describeRemediationExceptions_nextToken = (DescribeRemediationExceptions -> Maybe Text)
-> (DescribeRemediationExceptions
    -> Maybe Text -> DescribeRemediationExceptions)
-> Lens
     DescribeRemediationExceptions
     DescribeRemediationExceptions
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRemediationExceptions' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeRemediationExceptions' :: DescribeRemediationExceptions -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeRemediationExceptions
s@DescribeRemediationExceptions' {} Maybe Text
a -> DescribeRemediationExceptions
s {$sel:nextToken:DescribeRemediationExceptions' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeRemediationExceptions)

-- | The maximum number of RemediationExceptionResourceKey returned on each
-- page. The default is 25. If you specify 0, Config uses the default.
describeRemediationExceptions_limit :: Lens.Lens' DescribeRemediationExceptions (Prelude.Maybe Prelude.Natural)
describeRemediationExceptions_limit :: (Maybe Natural -> f (Maybe Natural))
-> DescribeRemediationExceptions -> f DescribeRemediationExceptions
describeRemediationExceptions_limit = (DescribeRemediationExceptions -> Maybe Natural)
-> (DescribeRemediationExceptions
    -> Maybe Natural -> DescribeRemediationExceptions)
-> Lens
     DescribeRemediationExceptions
     DescribeRemediationExceptions
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRemediationExceptions' {Maybe Natural
limit :: Maybe Natural
$sel:limit:DescribeRemediationExceptions' :: DescribeRemediationExceptions -> Maybe Natural
limit} -> Maybe Natural
limit) (\s :: DescribeRemediationExceptions
s@DescribeRemediationExceptions' {} Maybe Natural
a -> DescribeRemediationExceptions
s {$sel:limit:DescribeRemediationExceptions' :: Maybe Natural
limit = Maybe Natural
a} :: DescribeRemediationExceptions)

-- | An exception list of resource exception keys to be processed with the
-- current request. Config adds exception for each resource key. For
-- example, Config adds 3 exceptions for 3 resource keys.
describeRemediationExceptions_resourceKeys :: Lens.Lens' DescribeRemediationExceptions (Prelude.Maybe (Prelude.NonEmpty RemediationExceptionResourceKey))
describeRemediationExceptions_resourceKeys :: (Maybe (NonEmpty RemediationExceptionResourceKey)
 -> f (Maybe (NonEmpty RemediationExceptionResourceKey)))
-> DescribeRemediationExceptions -> f DescribeRemediationExceptions
describeRemediationExceptions_resourceKeys = (DescribeRemediationExceptions
 -> Maybe (NonEmpty RemediationExceptionResourceKey))
-> (DescribeRemediationExceptions
    -> Maybe (NonEmpty RemediationExceptionResourceKey)
    -> DescribeRemediationExceptions)
-> Lens
     DescribeRemediationExceptions
     DescribeRemediationExceptions
     (Maybe (NonEmpty RemediationExceptionResourceKey))
     (Maybe (NonEmpty RemediationExceptionResourceKey))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRemediationExceptions' {Maybe (NonEmpty RemediationExceptionResourceKey)
resourceKeys :: Maybe (NonEmpty RemediationExceptionResourceKey)
$sel:resourceKeys:DescribeRemediationExceptions' :: DescribeRemediationExceptions
-> Maybe (NonEmpty RemediationExceptionResourceKey)
resourceKeys} -> Maybe (NonEmpty RemediationExceptionResourceKey)
resourceKeys) (\s :: DescribeRemediationExceptions
s@DescribeRemediationExceptions' {} Maybe (NonEmpty RemediationExceptionResourceKey)
a -> DescribeRemediationExceptions
s {$sel:resourceKeys:DescribeRemediationExceptions' :: Maybe (NonEmpty RemediationExceptionResourceKey)
resourceKeys = Maybe (NonEmpty RemediationExceptionResourceKey)
a} :: DescribeRemediationExceptions) ((Maybe (NonEmpty RemediationExceptionResourceKey)
  -> f (Maybe (NonEmpty RemediationExceptionResourceKey)))
 -> DescribeRemediationExceptions
 -> f DescribeRemediationExceptions)
-> ((Maybe (NonEmpty RemediationExceptionResourceKey)
     -> f (Maybe (NonEmpty RemediationExceptionResourceKey)))
    -> Maybe (NonEmpty RemediationExceptionResourceKey)
    -> f (Maybe (NonEmpty RemediationExceptionResourceKey)))
-> (Maybe (NonEmpty RemediationExceptionResourceKey)
    -> f (Maybe (NonEmpty RemediationExceptionResourceKey)))
-> DescribeRemediationExceptions
-> f DescribeRemediationExceptions
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty RemediationExceptionResourceKey)
  (NonEmpty RemediationExceptionResourceKey)
  (NonEmpty RemediationExceptionResourceKey)
  (NonEmpty RemediationExceptionResourceKey)
-> Iso
     (Maybe (NonEmpty RemediationExceptionResourceKey))
     (Maybe (NonEmpty RemediationExceptionResourceKey))
     (Maybe (NonEmpty RemediationExceptionResourceKey))
     (Maybe (NonEmpty RemediationExceptionResourceKey))
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
  (NonEmpty RemediationExceptionResourceKey)
  (NonEmpty RemediationExceptionResourceKey)
  (NonEmpty RemediationExceptionResourceKey)
  (NonEmpty RemediationExceptionResourceKey)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the Config rule.
describeRemediationExceptions_configRuleName :: Lens.Lens' DescribeRemediationExceptions Prelude.Text
describeRemediationExceptions_configRuleName :: (Text -> f Text)
-> DescribeRemediationExceptions -> f DescribeRemediationExceptions
describeRemediationExceptions_configRuleName = (DescribeRemediationExceptions -> Text)
-> (DescribeRemediationExceptions
    -> Text -> DescribeRemediationExceptions)
-> Lens
     DescribeRemediationExceptions
     DescribeRemediationExceptions
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRemediationExceptions' {Text
configRuleName :: Text
$sel:configRuleName:DescribeRemediationExceptions' :: DescribeRemediationExceptions -> Text
configRuleName} -> Text
configRuleName) (\s :: DescribeRemediationExceptions
s@DescribeRemediationExceptions' {} Text
a -> DescribeRemediationExceptions
s {$sel:configRuleName:DescribeRemediationExceptions' :: Text
configRuleName = Text
a} :: DescribeRemediationExceptions)

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

instance Prelude.NFData DescribeRemediationExceptions

instance Core.ToHeaders DescribeRemediationExceptions where
  toHeaders :: DescribeRemediationExceptions -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeRemediationExceptions -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"StarlingDoveService.DescribeRemediationExceptions" ::
                          Prelude.ByteString
                      ),
            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 DescribeRemediationExceptions where
  toJSON :: DescribeRemediationExceptions -> Value
toJSON DescribeRemediationExceptions' {Maybe Natural
Maybe (NonEmpty RemediationExceptionResourceKey)
Maybe Text
Text
configRuleName :: Text
resourceKeys :: Maybe (NonEmpty RemediationExceptionResourceKey)
limit :: Maybe Natural
nextToken :: Maybe Text
$sel:configRuleName:DescribeRemediationExceptions' :: DescribeRemediationExceptions -> Text
$sel:resourceKeys:DescribeRemediationExceptions' :: DescribeRemediationExceptions
-> Maybe (NonEmpty RemediationExceptionResourceKey)
$sel:limit:DescribeRemediationExceptions' :: DescribeRemediationExceptions -> Maybe Natural
$sel:nextToken:DescribeRemediationExceptions' :: DescribeRemediationExceptions -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"NextToken" 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
nextToken,
            (Text
"Limit" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
limit,
            (Text
"ResourceKeys" Text -> NonEmpty RemediationExceptionResourceKey -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty RemediationExceptionResourceKey -> Pair)
-> Maybe (NonEmpty RemediationExceptionResourceKey) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty RemediationExceptionResourceKey)
resourceKeys,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"ConfigRuleName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
configRuleName)
          ]
      )

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

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

-- | /See:/ 'newDescribeRemediationExceptionsResponse' smart constructor.
data DescribeRemediationExceptionsResponse = DescribeRemediationExceptionsResponse'
  { -- | The @nextToken@ string returned in a previous request that you use to
    -- request the next page of results in a paginated response.
    DescribeRemediationExceptionsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Returns a list of remediation exception objects.
    DescribeRemediationExceptionsResponse
-> Maybe [RemediationException]
remediationExceptions :: Prelude.Maybe [RemediationException],
    -- | The response's http status code.
    DescribeRemediationExceptionsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeRemediationExceptionsResponse
-> DescribeRemediationExceptionsResponse -> Bool
(DescribeRemediationExceptionsResponse
 -> DescribeRemediationExceptionsResponse -> Bool)
-> (DescribeRemediationExceptionsResponse
    -> DescribeRemediationExceptionsResponse -> Bool)
-> Eq DescribeRemediationExceptionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeRemediationExceptionsResponse
-> DescribeRemediationExceptionsResponse -> Bool
$c/= :: DescribeRemediationExceptionsResponse
-> DescribeRemediationExceptionsResponse -> Bool
== :: DescribeRemediationExceptionsResponse
-> DescribeRemediationExceptionsResponse -> Bool
$c== :: DescribeRemediationExceptionsResponse
-> DescribeRemediationExceptionsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeRemediationExceptionsResponse]
ReadPrec DescribeRemediationExceptionsResponse
Int -> ReadS DescribeRemediationExceptionsResponse
ReadS [DescribeRemediationExceptionsResponse]
(Int -> ReadS DescribeRemediationExceptionsResponse)
-> ReadS [DescribeRemediationExceptionsResponse]
-> ReadPrec DescribeRemediationExceptionsResponse
-> ReadPrec [DescribeRemediationExceptionsResponse]
-> Read DescribeRemediationExceptionsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeRemediationExceptionsResponse]
$creadListPrec :: ReadPrec [DescribeRemediationExceptionsResponse]
readPrec :: ReadPrec DescribeRemediationExceptionsResponse
$creadPrec :: ReadPrec DescribeRemediationExceptionsResponse
readList :: ReadS [DescribeRemediationExceptionsResponse]
$creadList :: ReadS [DescribeRemediationExceptionsResponse]
readsPrec :: Int -> ReadS DescribeRemediationExceptionsResponse
$creadsPrec :: Int -> ReadS DescribeRemediationExceptionsResponse
Prelude.Read, Int -> DescribeRemediationExceptionsResponse -> ShowS
[DescribeRemediationExceptionsResponse] -> ShowS
DescribeRemediationExceptionsResponse -> String
(Int -> DescribeRemediationExceptionsResponse -> ShowS)
-> (DescribeRemediationExceptionsResponse -> String)
-> ([DescribeRemediationExceptionsResponse] -> ShowS)
-> Show DescribeRemediationExceptionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeRemediationExceptionsResponse] -> ShowS
$cshowList :: [DescribeRemediationExceptionsResponse] -> ShowS
show :: DescribeRemediationExceptionsResponse -> String
$cshow :: DescribeRemediationExceptionsResponse -> String
showsPrec :: Int -> DescribeRemediationExceptionsResponse -> ShowS
$cshowsPrec :: Int -> DescribeRemediationExceptionsResponse -> ShowS
Prelude.Show, (forall x.
 DescribeRemediationExceptionsResponse
 -> Rep DescribeRemediationExceptionsResponse x)
-> (forall x.
    Rep DescribeRemediationExceptionsResponse x
    -> DescribeRemediationExceptionsResponse)
-> Generic DescribeRemediationExceptionsResponse
forall x.
Rep DescribeRemediationExceptionsResponse x
-> DescribeRemediationExceptionsResponse
forall x.
DescribeRemediationExceptionsResponse
-> Rep DescribeRemediationExceptionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeRemediationExceptionsResponse x
-> DescribeRemediationExceptionsResponse
$cfrom :: forall x.
DescribeRemediationExceptionsResponse
-> Rep DescribeRemediationExceptionsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeRemediationExceptionsResponse' 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:
--
-- 'nextToken', 'describeRemediationExceptionsResponse_nextToken' - The @nextToken@ string returned in a previous request that you use to
-- request the next page of results in a paginated response.
--
-- 'remediationExceptions', 'describeRemediationExceptionsResponse_remediationExceptions' - Returns a list of remediation exception objects.
--
-- 'httpStatus', 'describeRemediationExceptionsResponse_httpStatus' - The response's http status code.
newDescribeRemediationExceptionsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeRemediationExceptionsResponse
newDescribeRemediationExceptionsResponse :: Int -> DescribeRemediationExceptionsResponse
newDescribeRemediationExceptionsResponse Int
pHttpStatus_ =
  DescribeRemediationExceptionsResponse' :: Maybe Text
-> Maybe [RemediationException]
-> Int
-> DescribeRemediationExceptionsResponse
DescribeRemediationExceptionsResponse'
    { $sel:nextToken:DescribeRemediationExceptionsResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:remediationExceptions:DescribeRemediationExceptionsResponse' :: Maybe [RemediationException]
remediationExceptions =
        Maybe [RemediationException]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeRemediationExceptionsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The @nextToken@ string returned in a previous request that you use to
-- request the next page of results in a paginated response.
describeRemediationExceptionsResponse_nextToken :: Lens.Lens' DescribeRemediationExceptionsResponse (Prelude.Maybe Prelude.Text)
describeRemediationExceptionsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeRemediationExceptionsResponse
-> f DescribeRemediationExceptionsResponse
describeRemediationExceptionsResponse_nextToken = (DescribeRemediationExceptionsResponse -> Maybe Text)
-> (DescribeRemediationExceptionsResponse
    -> Maybe Text -> DescribeRemediationExceptionsResponse)
-> Lens
     DescribeRemediationExceptionsResponse
     DescribeRemediationExceptionsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRemediationExceptionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeRemediationExceptionsResponse' :: DescribeRemediationExceptionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeRemediationExceptionsResponse
s@DescribeRemediationExceptionsResponse' {} Maybe Text
a -> DescribeRemediationExceptionsResponse
s {$sel:nextToken:DescribeRemediationExceptionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeRemediationExceptionsResponse)

-- | Returns a list of remediation exception objects.
describeRemediationExceptionsResponse_remediationExceptions :: Lens.Lens' DescribeRemediationExceptionsResponse (Prelude.Maybe [RemediationException])
describeRemediationExceptionsResponse_remediationExceptions :: (Maybe [RemediationException] -> f (Maybe [RemediationException]))
-> DescribeRemediationExceptionsResponse
-> f DescribeRemediationExceptionsResponse
describeRemediationExceptionsResponse_remediationExceptions = (DescribeRemediationExceptionsResponse
 -> Maybe [RemediationException])
-> (DescribeRemediationExceptionsResponse
    -> Maybe [RemediationException]
    -> DescribeRemediationExceptionsResponse)
-> Lens
     DescribeRemediationExceptionsResponse
     DescribeRemediationExceptionsResponse
     (Maybe [RemediationException])
     (Maybe [RemediationException])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRemediationExceptionsResponse' {Maybe [RemediationException]
remediationExceptions :: Maybe [RemediationException]
$sel:remediationExceptions:DescribeRemediationExceptionsResponse' :: DescribeRemediationExceptionsResponse
-> Maybe [RemediationException]
remediationExceptions} -> Maybe [RemediationException]
remediationExceptions) (\s :: DescribeRemediationExceptionsResponse
s@DescribeRemediationExceptionsResponse' {} Maybe [RemediationException]
a -> DescribeRemediationExceptionsResponse
s {$sel:remediationExceptions:DescribeRemediationExceptionsResponse' :: Maybe [RemediationException]
remediationExceptions = Maybe [RemediationException]
a} :: DescribeRemediationExceptionsResponse) ((Maybe [RemediationException] -> f (Maybe [RemediationException]))
 -> DescribeRemediationExceptionsResponse
 -> f DescribeRemediationExceptionsResponse)
-> ((Maybe [RemediationException]
     -> f (Maybe [RemediationException]))
    -> Maybe [RemediationException]
    -> f (Maybe [RemediationException]))
-> (Maybe [RemediationException]
    -> f (Maybe [RemediationException]))
-> DescribeRemediationExceptionsResponse
-> f DescribeRemediationExceptionsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [RemediationException]
  [RemediationException]
  [RemediationException]
  [RemediationException]
-> Iso
     (Maybe [RemediationException])
     (Maybe [RemediationException])
     (Maybe [RemediationException])
     (Maybe [RemediationException])
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
  [RemediationException]
  [RemediationException]
  [RemediationException]
  [RemediationException]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    DescribeRemediationExceptionsResponse