{-# 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.Inspector.DescribeExclusions
-- 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)
--
-- Describes the exclusions that are specified by the exclusions\' ARNs.
module Amazonka.Inspector.DescribeExclusions
  ( -- * Creating a Request
    DescribeExclusions (..),
    newDescribeExclusions,

    -- * Request Lenses
    describeExclusions_locale,
    describeExclusions_exclusionArns,

    -- * Destructuring the Response
    DescribeExclusionsResponse (..),
    newDescribeExclusionsResponse,

    -- * Response Lenses
    describeExclusionsResponse_httpStatus,
    describeExclusionsResponse_exclusions,
    describeExclusionsResponse_failedItems,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.Inspector.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:/ 'newDescribeExclusions' smart constructor.
data DescribeExclusions = DescribeExclusions'
  { -- | The locale into which you want to translate the exclusion\'s title,
    -- description, and recommendation.
    DescribeExclusions -> Maybe Locale
locale :: Prelude.Maybe Locale,
    -- | The list of ARNs that specify the exclusions that you want to describe.
    DescribeExclusions -> NonEmpty Text
exclusionArns :: Prelude.NonEmpty Prelude.Text
  }
  deriving (DescribeExclusions -> DescribeExclusions -> Bool
(DescribeExclusions -> DescribeExclusions -> Bool)
-> (DescribeExclusions -> DescribeExclusions -> Bool)
-> Eq DescribeExclusions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeExclusions -> DescribeExclusions -> Bool
$c/= :: DescribeExclusions -> DescribeExclusions -> Bool
== :: DescribeExclusions -> DescribeExclusions -> Bool
$c== :: DescribeExclusions -> DescribeExclusions -> Bool
Prelude.Eq, ReadPrec [DescribeExclusions]
ReadPrec DescribeExclusions
Int -> ReadS DescribeExclusions
ReadS [DescribeExclusions]
(Int -> ReadS DescribeExclusions)
-> ReadS [DescribeExclusions]
-> ReadPrec DescribeExclusions
-> ReadPrec [DescribeExclusions]
-> Read DescribeExclusions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeExclusions]
$creadListPrec :: ReadPrec [DescribeExclusions]
readPrec :: ReadPrec DescribeExclusions
$creadPrec :: ReadPrec DescribeExclusions
readList :: ReadS [DescribeExclusions]
$creadList :: ReadS [DescribeExclusions]
readsPrec :: Int -> ReadS DescribeExclusions
$creadsPrec :: Int -> ReadS DescribeExclusions
Prelude.Read, Int -> DescribeExclusions -> ShowS
[DescribeExclusions] -> ShowS
DescribeExclusions -> String
(Int -> DescribeExclusions -> ShowS)
-> (DescribeExclusions -> String)
-> ([DescribeExclusions] -> ShowS)
-> Show DescribeExclusions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeExclusions] -> ShowS
$cshowList :: [DescribeExclusions] -> ShowS
show :: DescribeExclusions -> String
$cshow :: DescribeExclusions -> String
showsPrec :: Int -> DescribeExclusions -> ShowS
$cshowsPrec :: Int -> DescribeExclusions -> ShowS
Prelude.Show, (forall x. DescribeExclusions -> Rep DescribeExclusions x)
-> (forall x. Rep DescribeExclusions x -> DescribeExclusions)
-> Generic DescribeExclusions
forall x. Rep DescribeExclusions x -> DescribeExclusions
forall x. DescribeExclusions -> Rep DescribeExclusions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeExclusions x -> DescribeExclusions
$cfrom :: forall x. DescribeExclusions -> Rep DescribeExclusions x
Prelude.Generic)

-- |
-- Create a value of 'DescribeExclusions' 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:
--
-- 'locale', 'describeExclusions_locale' - The locale into which you want to translate the exclusion\'s title,
-- description, and recommendation.
--
-- 'exclusionArns', 'describeExclusions_exclusionArns' - The list of ARNs that specify the exclusions that you want to describe.
newDescribeExclusions ::
  -- | 'exclusionArns'
  Prelude.NonEmpty Prelude.Text ->
  DescribeExclusions
newDescribeExclusions :: NonEmpty Text -> DescribeExclusions
newDescribeExclusions NonEmpty Text
pExclusionArns_ =
  DescribeExclusions' :: Maybe Locale -> NonEmpty Text -> DescribeExclusions
DescribeExclusions'
    { $sel:locale:DescribeExclusions' :: Maybe Locale
locale = Maybe Locale
forall a. Maybe a
Prelude.Nothing,
      $sel:exclusionArns:DescribeExclusions' :: NonEmpty Text
exclusionArns = 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
pExclusionArns_
    }

-- | The locale into which you want to translate the exclusion\'s title,
-- description, and recommendation.
describeExclusions_locale :: Lens.Lens' DescribeExclusions (Prelude.Maybe Locale)
describeExclusions_locale :: (Maybe Locale -> f (Maybe Locale))
-> DescribeExclusions -> f DescribeExclusions
describeExclusions_locale = (DescribeExclusions -> Maybe Locale)
-> (DescribeExclusions -> Maybe Locale -> DescribeExclusions)
-> Lens
     DescribeExclusions DescribeExclusions (Maybe Locale) (Maybe Locale)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeExclusions' {Maybe Locale
locale :: Maybe Locale
$sel:locale:DescribeExclusions' :: DescribeExclusions -> Maybe Locale
locale} -> Maybe Locale
locale) (\s :: DescribeExclusions
s@DescribeExclusions' {} Maybe Locale
a -> DescribeExclusions
s {$sel:locale:DescribeExclusions' :: Maybe Locale
locale = Maybe Locale
a} :: DescribeExclusions)

-- | The list of ARNs that specify the exclusions that you want to describe.
describeExclusions_exclusionArns :: Lens.Lens' DescribeExclusions (Prelude.NonEmpty Prelude.Text)
describeExclusions_exclusionArns :: (NonEmpty Text -> f (NonEmpty Text))
-> DescribeExclusions -> f DescribeExclusions
describeExclusions_exclusionArns = (DescribeExclusions -> NonEmpty Text)
-> (DescribeExclusions -> NonEmpty Text -> DescribeExclusions)
-> Lens
     DescribeExclusions
     DescribeExclusions
     (NonEmpty Text)
     (NonEmpty Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeExclusions' {NonEmpty Text
exclusionArns :: NonEmpty Text
$sel:exclusionArns:DescribeExclusions' :: DescribeExclusions -> NonEmpty Text
exclusionArns} -> NonEmpty Text
exclusionArns) (\s :: DescribeExclusions
s@DescribeExclusions' {} NonEmpty Text
a -> DescribeExclusions
s {$sel:exclusionArns:DescribeExclusions' :: NonEmpty Text
exclusionArns = NonEmpty Text
a} :: DescribeExclusions) ((NonEmpty Text -> f (NonEmpty Text))
 -> DescribeExclusions -> f DescribeExclusions)
-> ((NonEmpty Text -> f (NonEmpty Text))
    -> NonEmpty Text -> f (NonEmpty Text))
-> (NonEmpty Text -> f (NonEmpty Text))
-> DescribeExclusions
-> f DescribeExclusions
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

instance Core.AWSRequest DescribeExclusions where
  type
    AWSResponse DescribeExclusions =
      DescribeExclusionsResponse
  request :: DescribeExclusions -> Request DescribeExclusions
request = Service -> DescribeExclusions -> Request DescribeExclusions
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeExclusions
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeExclusions)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeExclusions))
-> Logger
-> Service
-> Proxy DescribeExclusions
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeExclusions)))
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 ->
          Int
-> HashMap Text Exclusion
-> HashMap Text FailedItemDetails
-> DescribeExclusionsResponse
DescribeExclusionsResponse'
            (Int
 -> HashMap Text Exclusion
 -> HashMap Text FailedItemDetails
 -> DescribeExclusionsResponse)
-> Either String Int
-> Either
     String
     (HashMap Text Exclusion
      -> HashMap Text FailedItemDetails -> DescribeExclusionsResponse)
forall (f :: * -> *) a b. Functor 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
  (HashMap Text Exclusion
   -> HashMap Text FailedItemDetails -> DescribeExclusionsResponse)
-> Either String (HashMap Text Exclusion)
-> Either
     String
     (HashMap Text FailedItemDetails -> DescribeExclusionsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (HashMap Text Exclusion))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"exclusions" Either String (Maybe (HashMap Text Exclusion))
-> HashMap Text Exclusion -> Either String (HashMap Text Exclusion)
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ HashMap Text Exclusion
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (HashMap Text FailedItemDetails -> DescribeExclusionsResponse)
-> Either String (HashMap Text FailedItemDetails)
-> Either String DescribeExclusionsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Either String (Maybe (HashMap Text FailedItemDetails))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"failedItems" Either String (Maybe (HashMap Text FailedItemDetails))
-> HashMap Text FailedItemDetails
-> Either String (HashMap Text FailedItemDetails)
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ HashMap Text FailedItemDetails
forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable DescribeExclusions

instance Prelude.NFData DescribeExclusions

instance Core.ToHeaders DescribeExclusions where
  toHeaders :: DescribeExclusions -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeExclusions -> 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
"InspectorService.DescribeExclusions" ::
                          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 DescribeExclusions where
  toJSON :: DescribeExclusions -> Value
toJSON DescribeExclusions' {Maybe Locale
NonEmpty Text
exclusionArns :: NonEmpty Text
locale :: Maybe Locale
$sel:exclusionArns:DescribeExclusions' :: DescribeExclusions -> NonEmpty Text
$sel:locale:DescribeExclusions' :: DescribeExclusions -> Maybe Locale
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"locale" Text -> Locale -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Locale -> Pair) -> Maybe Locale -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Locale
locale,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"exclusionArns" Text -> NonEmpty Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= NonEmpty Text
exclusionArns)
          ]
      )

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

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

-- | /See:/ 'newDescribeExclusionsResponse' smart constructor.
data DescribeExclusionsResponse = DescribeExclusionsResponse'
  { -- | The response's http status code.
    DescribeExclusionsResponse -> Int
httpStatus :: Prelude.Int,
    -- | Information about the exclusions.
    DescribeExclusionsResponse -> HashMap Text Exclusion
exclusions :: Prelude.HashMap Prelude.Text Exclusion,
    -- | Exclusion details that cannot be described. An error code is provided
    -- for each failed item.
    DescribeExclusionsResponse -> HashMap Text FailedItemDetails
failedItems :: Prelude.HashMap Prelude.Text FailedItemDetails
  }
  deriving (DescribeExclusionsResponse -> DescribeExclusionsResponse -> Bool
(DescribeExclusionsResponse -> DescribeExclusionsResponse -> Bool)
-> (DescribeExclusionsResponse
    -> DescribeExclusionsResponse -> Bool)
-> Eq DescribeExclusionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeExclusionsResponse -> DescribeExclusionsResponse -> Bool
$c/= :: DescribeExclusionsResponse -> DescribeExclusionsResponse -> Bool
== :: DescribeExclusionsResponse -> DescribeExclusionsResponse -> Bool
$c== :: DescribeExclusionsResponse -> DescribeExclusionsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeExclusionsResponse]
ReadPrec DescribeExclusionsResponse
Int -> ReadS DescribeExclusionsResponse
ReadS [DescribeExclusionsResponse]
(Int -> ReadS DescribeExclusionsResponse)
-> ReadS [DescribeExclusionsResponse]
-> ReadPrec DescribeExclusionsResponse
-> ReadPrec [DescribeExclusionsResponse]
-> Read DescribeExclusionsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeExclusionsResponse]
$creadListPrec :: ReadPrec [DescribeExclusionsResponse]
readPrec :: ReadPrec DescribeExclusionsResponse
$creadPrec :: ReadPrec DescribeExclusionsResponse
readList :: ReadS [DescribeExclusionsResponse]
$creadList :: ReadS [DescribeExclusionsResponse]
readsPrec :: Int -> ReadS DescribeExclusionsResponse
$creadsPrec :: Int -> ReadS DescribeExclusionsResponse
Prelude.Read, Int -> DescribeExclusionsResponse -> ShowS
[DescribeExclusionsResponse] -> ShowS
DescribeExclusionsResponse -> String
(Int -> DescribeExclusionsResponse -> ShowS)
-> (DescribeExclusionsResponse -> String)
-> ([DescribeExclusionsResponse] -> ShowS)
-> Show DescribeExclusionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeExclusionsResponse] -> ShowS
$cshowList :: [DescribeExclusionsResponse] -> ShowS
show :: DescribeExclusionsResponse -> String
$cshow :: DescribeExclusionsResponse -> String
showsPrec :: Int -> DescribeExclusionsResponse -> ShowS
$cshowsPrec :: Int -> DescribeExclusionsResponse -> ShowS
Prelude.Show, (forall x.
 DescribeExclusionsResponse -> Rep DescribeExclusionsResponse x)
-> (forall x.
    Rep DescribeExclusionsResponse x -> DescribeExclusionsResponse)
-> Generic DescribeExclusionsResponse
forall x.
Rep DescribeExclusionsResponse x -> DescribeExclusionsResponse
forall x.
DescribeExclusionsResponse -> Rep DescribeExclusionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeExclusionsResponse x -> DescribeExclusionsResponse
$cfrom :: forall x.
DescribeExclusionsResponse -> Rep DescribeExclusionsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeExclusionsResponse' 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:
--
-- 'httpStatus', 'describeExclusionsResponse_httpStatus' - The response's http status code.
--
-- 'exclusions', 'describeExclusionsResponse_exclusions' - Information about the exclusions.
--
-- 'failedItems', 'describeExclusionsResponse_failedItems' - Exclusion details that cannot be described. An error code is provided
-- for each failed item.
newDescribeExclusionsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeExclusionsResponse
newDescribeExclusionsResponse :: Int -> DescribeExclusionsResponse
newDescribeExclusionsResponse Int
pHttpStatus_ =
  DescribeExclusionsResponse' :: Int
-> HashMap Text Exclusion
-> HashMap Text FailedItemDetails
-> DescribeExclusionsResponse
DescribeExclusionsResponse'
    { $sel:httpStatus:DescribeExclusionsResponse' :: Int
httpStatus =
        Int
pHttpStatus_,
      $sel:exclusions:DescribeExclusionsResponse' :: HashMap Text Exclusion
exclusions = HashMap Text Exclusion
forall a. Monoid a => a
Prelude.mempty,
      $sel:failedItems:DescribeExclusionsResponse' :: HashMap Text FailedItemDetails
failedItems = HashMap Text FailedItemDetails
forall a. Monoid a => a
Prelude.mempty
    }

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

-- | Information about the exclusions.
describeExclusionsResponse_exclusions :: Lens.Lens' DescribeExclusionsResponse (Prelude.HashMap Prelude.Text Exclusion)
describeExclusionsResponse_exclusions :: (HashMap Text Exclusion -> f (HashMap Text Exclusion))
-> DescribeExclusionsResponse -> f DescribeExclusionsResponse
describeExclusionsResponse_exclusions = (DescribeExclusionsResponse -> HashMap Text Exclusion)
-> (DescribeExclusionsResponse
    -> HashMap Text Exclusion -> DescribeExclusionsResponse)
-> Lens
     DescribeExclusionsResponse
     DescribeExclusionsResponse
     (HashMap Text Exclusion)
     (HashMap Text Exclusion)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeExclusionsResponse' {HashMap Text Exclusion
exclusions :: HashMap Text Exclusion
$sel:exclusions:DescribeExclusionsResponse' :: DescribeExclusionsResponse -> HashMap Text Exclusion
exclusions} -> HashMap Text Exclusion
exclusions) (\s :: DescribeExclusionsResponse
s@DescribeExclusionsResponse' {} HashMap Text Exclusion
a -> DescribeExclusionsResponse
s {$sel:exclusions:DescribeExclusionsResponse' :: HashMap Text Exclusion
exclusions = HashMap Text Exclusion
a} :: DescribeExclusionsResponse) ((HashMap Text Exclusion -> f (HashMap Text Exclusion))
 -> DescribeExclusionsResponse -> f DescribeExclusionsResponse)
-> ((HashMap Text Exclusion -> f (HashMap Text Exclusion))
    -> HashMap Text Exclusion -> f (HashMap Text Exclusion))
-> (HashMap Text Exclusion -> f (HashMap Text Exclusion))
-> DescribeExclusionsResponse
-> f DescribeExclusionsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (HashMap Text Exclusion -> f (HashMap Text Exclusion))
-> HashMap Text Exclusion -> f (HashMap Text Exclusion)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Exclusion details that cannot be described. An error code is provided
-- for each failed item.
describeExclusionsResponse_failedItems :: Lens.Lens' DescribeExclusionsResponse (Prelude.HashMap Prelude.Text FailedItemDetails)
describeExclusionsResponse_failedItems :: (HashMap Text FailedItemDetails
 -> f (HashMap Text FailedItemDetails))
-> DescribeExclusionsResponse -> f DescribeExclusionsResponse
describeExclusionsResponse_failedItems = (DescribeExclusionsResponse -> HashMap Text FailedItemDetails)
-> (DescribeExclusionsResponse
    -> HashMap Text FailedItemDetails -> DescribeExclusionsResponse)
-> Lens
     DescribeExclusionsResponse
     DescribeExclusionsResponse
     (HashMap Text FailedItemDetails)
     (HashMap Text FailedItemDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeExclusionsResponse' {HashMap Text FailedItemDetails
failedItems :: HashMap Text FailedItemDetails
$sel:failedItems:DescribeExclusionsResponse' :: DescribeExclusionsResponse -> HashMap Text FailedItemDetails
failedItems} -> HashMap Text FailedItemDetails
failedItems) (\s :: DescribeExclusionsResponse
s@DescribeExclusionsResponse' {} HashMap Text FailedItemDetails
a -> DescribeExclusionsResponse
s {$sel:failedItems:DescribeExclusionsResponse' :: HashMap Text FailedItemDetails
failedItems = HashMap Text FailedItemDetails
a} :: DescribeExclusionsResponse) ((HashMap Text FailedItemDetails
  -> f (HashMap Text FailedItemDetails))
 -> DescribeExclusionsResponse -> f DescribeExclusionsResponse)
-> ((HashMap Text FailedItemDetails
     -> f (HashMap Text FailedItemDetails))
    -> HashMap Text FailedItemDetails
    -> f (HashMap Text FailedItemDetails))
-> (HashMap Text FailedItemDetails
    -> f (HashMap Text FailedItemDetails))
-> DescribeExclusionsResponse
-> f DescribeExclusionsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (HashMap Text FailedItemDetails
 -> f (HashMap Text FailedItemDetails))
-> HashMap Text FailedItemDetails
-> f (HashMap Text FailedItemDetails)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Prelude.NFData DescribeExclusionsResponse