{-# 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.CloudFormation.BatchDescribeTypeConfigurations
-- 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 configuration data for the specified CloudFormation extensions,
-- from the CloudFormation registry for the account and region.
--
-- For more information, see
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-register.html#registry-set-configuration Configuring extensions at the account level>
-- in the /CloudFormation User Guide/.
module Amazonka.CloudFormation.BatchDescribeTypeConfigurations
  ( -- * Creating a Request
    BatchDescribeTypeConfigurations (..),
    newBatchDescribeTypeConfigurations,

    -- * Request Lenses
    batchDescribeTypeConfigurations_typeConfigurationIdentifiers,

    -- * Destructuring the Response
    BatchDescribeTypeConfigurationsResponse (..),
    newBatchDescribeTypeConfigurationsResponse,

    -- * Response Lenses
    batchDescribeTypeConfigurationsResponse_unprocessedTypeConfigurations,
    batchDescribeTypeConfigurationsResponse_typeConfigurations,
    batchDescribeTypeConfigurationsResponse_errors,
    batchDescribeTypeConfigurationsResponse_httpStatus,
  )
where

import Amazonka.CloudFormation.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:/ 'newBatchDescribeTypeConfigurations' smart constructor.
data BatchDescribeTypeConfigurations = BatchDescribeTypeConfigurations'
  { -- | The list of identifiers for the desired extension configurations.
    BatchDescribeTypeConfigurations
-> NonEmpty TypeConfigurationIdentifier
typeConfigurationIdentifiers :: Prelude.NonEmpty TypeConfigurationIdentifier
  }
  deriving (BatchDescribeTypeConfigurations
-> BatchDescribeTypeConfigurations -> Bool
(BatchDescribeTypeConfigurations
 -> BatchDescribeTypeConfigurations -> Bool)
-> (BatchDescribeTypeConfigurations
    -> BatchDescribeTypeConfigurations -> Bool)
-> Eq BatchDescribeTypeConfigurations
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchDescribeTypeConfigurations
-> BatchDescribeTypeConfigurations -> Bool
$c/= :: BatchDescribeTypeConfigurations
-> BatchDescribeTypeConfigurations -> Bool
== :: BatchDescribeTypeConfigurations
-> BatchDescribeTypeConfigurations -> Bool
$c== :: BatchDescribeTypeConfigurations
-> BatchDescribeTypeConfigurations -> Bool
Prelude.Eq, ReadPrec [BatchDescribeTypeConfigurations]
ReadPrec BatchDescribeTypeConfigurations
Int -> ReadS BatchDescribeTypeConfigurations
ReadS [BatchDescribeTypeConfigurations]
(Int -> ReadS BatchDescribeTypeConfigurations)
-> ReadS [BatchDescribeTypeConfigurations]
-> ReadPrec BatchDescribeTypeConfigurations
-> ReadPrec [BatchDescribeTypeConfigurations]
-> Read BatchDescribeTypeConfigurations
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchDescribeTypeConfigurations]
$creadListPrec :: ReadPrec [BatchDescribeTypeConfigurations]
readPrec :: ReadPrec BatchDescribeTypeConfigurations
$creadPrec :: ReadPrec BatchDescribeTypeConfigurations
readList :: ReadS [BatchDescribeTypeConfigurations]
$creadList :: ReadS [BatchDescribeTypeConfigurations]
readsPrec :: Int -> ReadS BatchDescribeTypeConfigurations
$creadsPrec :: Int -> ReadS BatchDescribeTypeConfigurations
Prelude.Read, Int -> BatchDescribeTypeConfigurations -> ShowS
[BatchDescribeTypeConfigurations] -> ShowS
BatchDescribeTypeConfigurations -> String
(Int -> BatchDescribeTypeConfigurations -> ShowS)
-> (BatchDescribeTypeConfigurations -> String)
-> ([BatchDescribeTypeConfigurations] -> ShowS)
-> Show BatchDescribeTypeConfigurations
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchDescribeTypeConfigurations] -> ShowS
$cshowList :: [BatchDescribeTypeConfigurations] -> ShowS
show :: BatchDescribeTypeConfigurations -> String
$cshow :: BatchDescribeTypeConfigurations -> String
showsPrec :: Int -> BatchDescribeTypeConfigurations -> ShowS
$cshowsPrec :: Int -> BatchDescribeTypeConfigurations -> ShowS
Prelude.Show, (forall x.
 BatchDescribeTypeConfigurations
 -> Rep BatchDescribeTypeConfigurations x)
-> (forall x.
    Rep BatchDescribeTypeConfigurations x
    -> BatchDescribeTypeConfigurations)
-> Generic BatchDescribeTypeConfigurations
forall x.
Rep BatchDescribeTypeConfigurations x
-> BatchDescribeTypeConfigurations
forall x.
BatchDescribeTypeConfigurations
-> Rep BatchDescribeTypeConfigurations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchDescribeTypeConfigurations x
-> BatchDescribeTypeConfigurations
$cfrom :: forall x.
BatchDescribeTypeConfigurations
-> Rep BatchDescribeTypeConfigurations x
Prelude.Generic)

-- |
-- Create a value of 'BatchDescribeTypeConfigurations' 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:
--
-- 'typeConfigurationIdentifiers', 'batchDescribeTypeConfigurations_typeConfigurationIdentifiers' - The list of identifiers for the desired extension configurations.
newBatchDescribeTypeConfigurations ::
  -- | 'typeConfigurationIdentifiers'
  Prelude.NonEmpty TypeConfigurationIdentifier ->
  BatchDescribeTypeConfigurations
newBatchDescribeTypeConfigurations :: NonEmpty TypeConfigurationIdentifier
-> BatchDescribeTypeConfigurations
newBatchDescribeTypeConfigurations
  NonEmpty TypeConfigurationIdentifier
pTypeConfigurationIdentifiers_ =
    BatchDescribeTypeConfigurations' :: NonEmpty TypeConfigurationIdentifier
-> BatchDescribeTypeConfigurations
BatchDescribeTypeConfigurations'
      { $sel:typeConfigurationIdentifiers:BatchDescribeTypeConfigurations' :: NonEmpty TypeConfigurationIdentifier
typeConfigurationIdentifiers =
          Tagged
  (NonEmpty TypeConfigurationIdentifier)
  (Identity (NonEmpty TypeConfigurationIdentifier))
-> Tagged
     (NonEmpty TypeConfigurationIdentifier)
     (Identity (NonEmpty TypeConfigurationIdentifier))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
            (Tagged
   (NonEmpty TypeConfigurationIdentifier)
   (Identity (NonEmpty TypeConfigurationIdentifier))
 -> Tagged
      (NonEmpty TypeConfigurationIdentifier)
      (Identity (NonEmpty TypeConfigurationIdentifier)))
-> NonEmpty TypeConfigurationIdentifier
-> NonEmpty TypeConfigurationIdentifier
forall t b. AReview t b -> b -> t
Lens.# NonEmpty TypeConfigurationIdentifier
pTypeConfigurationIdentifiers_
      }

-- | The list of identifiers for the desired extension configurations.
batchDescribeTypeConfigurations_typeConfigurationIdentifiers :: Lens.Lens' BatchDescribeTypeConfigurations (Prelude.NonEmpty TypeConfigurationIdentifier)
batchDescribeTypeConfigurations_typeConfigurationIdentifiers :: (NonEmpty TypeConfigurationIdentifier
 -> f (NonEmpty TypeConfigurationIdentifier))
-> BatchDescribeTypeConfigurations
-> f BatchDescribeTypeConfigurations
batchDescribeTypeConfigurations_typeConfigurationIdentifiers = (BatchDescribeTypeConfigurations
 -> NonEmpty TypeConfigurationIdentifier)
-> (BatchDescribeTypeConfigurations
    -> NonEmpty TypeConfigurationIdentifier
    -> BatchDescribeTypeConfigurations)
-> Lens
     BatchDescribeTypeConfigurations
     BatchDescribeTypeConfigurations
     (NonEmpty TypeConfigurationIdentifier)
     (NonEmpty TypeConfigurationIdentifier)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDescribeTypeConfigurations' {NonEmpty TypeConfigurationIdentifier
typeConfigurationIdentifiers :: NonEmpty TypeConfigurationIdentifier
$sel:typeConfigurationIdentifiers:BatchDescribeTypeConfigurations' :: BatchDescribeTypeConfigurations
-> NonEmpty TypeConfigurationIdentifier
typeConfigurationIdentifiers} -> NonEmpty TypeConfigurationIdentifier
typeConfigurationIdentifiers) (\s :: BatchDescribeTypeConfigurations
s@BatchDescribeTypeConfigurations' {} NonEmpty TypeConfigurationIdentifier
a -> BatchDescribeTypeConfigurations
s {$sel:typeConfigurationIdentifiers:BatchDescribeTypeConfigurations' :: NonEmpty TypeConfigurationIdentifier
typeConfigurationIdentifiers = NonEmpty TypeConfigurationIdentifier
a} :: BatchDescribeTypeConfigurations) ((NonEmpty TypeConfigurationIdentifier
  -> f (NonEmpty TypeConfigurationIdentifier))
 -> BatchDescribeTypeConfigurations
 -> f BatchDescribeTypeConfigurations)
-> ((NonEmpty TypeConfigurationIdentifier
     -> f (NonEmpty TypeConfigurationIdentifier))
    -> NonEmpty TypeConfigurationIdentifier
    -> f (NonEmpty TypeConfigurationIdentifier))
-> (NonEmpty TypeConfigurationIdentifier
    -> f (NonEmpty TypeConfigurationIdentifier))
-> BatchDescribeTypeConfigurations
-> f BatchDescribeTypeConfigurations
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty TypeConfigurationIdentifier
 -> f (NonEmpty TypeConfigurationIdentifier))
-> NonEmpty TypeConfigurationIdentifier
-> f (NonEmpty TypeConfigurationIdentifier)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Core.AWSRequest
    BatchDescribeTypeConfigurations
  where
  type
    AWSResponse BatchDescribeTypeConfigurations =
      BatchDescribeTypeConfigurationsResponse
  request :: BatchDescribeTypeConfigurations
-> Request BatchDescribeTypeConfigurations
request = Service
-> BatchDescribeTypeConfigurations
-> Request BatchDescribeTypeConfigurations
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy BatchDescribeTypeConfigurations
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse BatchDescribeTypeConfigurations)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse BatchDescribeTypeConfigurations))
-> Logger
-> Service
-> Proxy BatchDescribeTypeConfigurations
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse BatchDescribeTypeConfigurations)))
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
"BatchDescribeTypeConfigurationsResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe [TypeConfigurationIdentifier]
-> Maybe [TypeConfigurationDetails]
-> Maybe [BatchDescribeTypeConfigurationsError]
-> Int
-> BatchDescribeTypeConfigurationsResponse
BatchDescribeTypeConfigurationsResponse'
            (Maybe [TypeConfigurationIdentifier]
 -> Maybe [TypeConfigurationDetails]
 -> Maybe [BatchDescribeTypeConfigurationsError]
 -> Int
 -> BatchDescribeTypeConfigurationsResponse)
-> Either String (Maybe [TypeConfigurationIdentifier])
-> Either
     String
     (Maybe [TypeConfigurationDetails]
      -> Maybe [BatchDescribeTypeConfigurationsError]
      -> Int
      -> BatchDescribeTypeConfigurationsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"UnprocessedTypeConfigurations"
                            Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                            Either String [Node]
-> ([Node] -> Either String (Maybe [TypeConfigurationIdentifier]))
-> Either String (Maybe [TypeConfigurationIdentifier])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [TypeConfigurationIdentifier])
-> [Node] -> Either String (Maybe [TypeConfigurationIdentifier])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [TypeConfigurationIdentifier]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                        )
            Either
  String
  (Maybe [TypeConfigurationDetails]
   -> Maybe [BatchDescribeTypeConfigurationsError]
   -> Int
   -> BatchDescribeTypeConfigurationsResponse)
-> Either String (Maybe [TypeConfigurationDetails])
-> Either
     String
     (Maybe [BatchDescribeTypeConfigurationsError]
      -> Int -> BatchDescribeTypeConfigurationsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"TypeConfigurations"
                            Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                            Either String [Node]
-> ([Node] -> Either String (Maybe [TypeConfigurationDetails]))
-> Either String (Maybe [TypeConfigurationDetails])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [TypeConfigurationDetails])
-> [Node] -> Either String (Maybe [TypeConfigurationDetails])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [TypeConfigurationDetails]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                        )
            Either
  String
  (Maybe [BatchDescribeTypeConfigurationsError]
   -> Int -> BatchDescribeTypeConfigurationsResponse)
-> Either String (Maybe [BatchDescribeTypeConfigurationsError])
-> Either String (Int -> BatchDescribeTypeConfigurationsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Errors" Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                            Either String [Node]
-> ([Node]
    -> Either String (Maybe [BatchDescribeTypeConfigurationsError]))
-> Either String (Maybe [BatchDescribeTypeConfigurationsError])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [BatchDescribeTypeConfigurationsError])
-> [Node]
-> Either String (Maybe [BatchDescribeTypeConfigurationsError])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text
-> [Node] -> Either String [BatchDescribeTypeConfigurationsError]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                        )
            Either String (Int -> BatchDescribeTypeConfigurationsResponse)
-> Either String Int
-> Either String BatchDescribeTypeConfigurationsResponse
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
    BatchDescribeTypeConfigurations

instance
  Prelude.NFData
    BatchDescribeTypeConfigurations

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

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

instance Core.ToQuery BatchDescribeTypeConfigurations where
  toQuery :: BatchDescribeTypeConfigurations -> QueryString
toQuery BatchDescribeTypeConfigurations' {NonEmpty TypeConfigurationIdentifier
typeConfigurationIdentifiers :: NonEmpty TypeConfigurationIdentifier
$sel:typeConfigurationIdentifiers:BatchDescribeTypeConfigurations' :: BatchDescribeTypeConfigurations
-> NonEmpty TypeConfigurationIdentifier
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ( ByteString
"BatchDescribeTypeConfigurations" ::
                      Prelude.ByteString
                  ),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-05-15" :: Prelude.ByteString),
        ByteString
"TypeConfigurationIdentifiers"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ByteString -> NonEmpty TypeConfigurationIdentifier -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList
            ByteString
"member"
            NonEmpty TypeConfigurationIdentifier
typeConfigurationIdentifiers
      ]

-- | /See:/ 'newBatchDescribeTypeConfigurationsResponse' smart constructor.
data BatchDescribeTypeConfigurationsResponse = BatchDescribeTypeConfigurationsResponse'
  { -- | A list of any of the specified extension configurations that
    -- CloudFormation could not process for any reason.
    BatchDescribeTypeConfigurationsResponse
-> Maybe [TypeConfigurationIdentifier]
unprocessedTypeConfigurations :: Prelude.Maybe [TypeConfigurationIdentifier],
    -- | A list of any of the specified extension configurations from the
    -- CloudFormation registry.
    BatchDescribeTypeConfigurationsResponse
-> Maybe [TypeConfigurationDetails]
typeConfigurations :: Prelude.Maybe [TypeConfigurationDetails],
    -- | A list of information concerning any errors generated during the setting
    -- of the specified configurations.
    BatchDescribeTypeConfigurationsResponse
-> Maybe [BatchDescribeTypeConfigurationsError]
errors :: Prelude.Maybe [BatchDescribeTypeConfigurationsError],
    -- | The response's http status code.
    BatchDescribeTypeConfigurationsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (BatchDescribeTypeConfigurationsResponse
-> BatchDescribeTypeConfigurationsResponse -> Bool
(BatchDescribeTypeConfigurationsResponse
 -> BatchDescribeTypeConfigurationsResponse -> Bool)
-> (BatchDescribeTypeConfigurationsResponse
    -> BatchDescribeTypeConfigurationsResponse -> Bool)
-> Eq BatchDescribeTypeConfigurationsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchDescribeTypeConfigurationsResponse
-> BatchDescribeTypeConfigurationsResponse -> Bool
$c/= :: BatchDescribeTypeConfigurationsResponse
-> BatchDescribeTypeConfigurationsResponse -> Bool
== :: BatchDescribeTypeConfigurationsResponse
-> BatchDescribeTypeConfigurationsResponse -> Bool
$c== :: BatchDescribeTypeConfigurationsResponse
-> BatchDescribeTypeConfigurationsResponse -> Bool
Prelude.Eq, ReadPrec [BatchDescribeTypeConfigurationsResponse]
ReadPrec BatchDescribeTypeConfigurationsResponse
Int -> ReadS BatchDescribeTypeConfigurationsResponse
ReadS [BatchDescribeTypeConfigurationsResponse]
(Int -> ReadS BatchDescribeTypeConfigurationsResponse)
-> ReadS [BatchDescribeTypeConfigurationsResponse]
-> ReadPrec BatchDescribeTypeConfigurationsResponse
-> ReadPrec [BatchDescribeTypeConfigurationsResponse]
-> Read BatchDescribeTypeConfigurationsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchDescribeTypeConfigurationsResponse]
$creadListPrec :: ReadPrec [BatchDescribeTypeConfigurationsResponse]
readPrec :: ReadPrec BatchDescribeTypeConfigurationsResponse
$creadPrec :: ReadPrec BatchDescribeTypeConfigurationsResponse
readList :: ReadS [BatchDescribeTypeConfigurationsResponse]
$creadList :: ReadS [BatchDescribeTypeConfigurationsResponse]
readsPrec :: Int -> ReadS BatchDescribeTypeConfigurationsResponse
$creadsPrec :: Int -> ReadS BatchDescribeTypeConfigurationsResponse
Prelude.Read, Int -> BatchDescribeTypeConfigurationsResponse -> ShowS
[BatchDescribeTypeConfigurationsResponse] -> ShowS
BatchDescribeTypeConfigurationsResponse -> String
(Int -> BatchDescribeTypeConfigurationsResponse -> ShowS)
-> (BatchDescribeTypeConfigurationsResponse -> String)
-> ([BatchDescribeTypeConfigurationsResponse] -> ShowS)
-> Show BatchDescribeTypeConfigurationsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchDescribeTypeConfigurationsResponse] -> ShowS
$cshowList :: [BatchDescribeTypeConfigurationsResponse] -> ShowS
show :: BatchDescribeTypeConfigurationsResponse -> String
$cshow :: BatchDescribeTypeConfigurationsResponse -> String
showsPrec :: Int -> BatchDescribeTypeConfigurationsResponse -> ShowS
$cshowsPrec :: Int -> BatchDescribeTypeConfigurationsResponse -> ShowS
Prelude.Show, (forall x.
 BatchDescribeTypeConfigurationsResponse
 -> Rep BatchDescribeTypeConfigurationsResponse x)
-> (forall x.
    Rep BatchDescribeTypeConfigurationsResponse x
    -> BatchDescribeTypeConfigurationsResponse)
-> Generic BatchDescribeTypeConfigurationsResponse
forall x.
Rep BatchDescribeTypeConfigurationsResponse x
-> BatchDescribeTypeConfigurationsResponse
forall x.
BatchDescribeTypeConfigurationsResponse
-> Rep BatchDescribeTypeConfigurationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchDescribeTypeConfigurationsResponse x
-> BatchDescribeTypeConfigurationsResponse
$cfrom :: forall x.
BatchDescribeTypeConfigurationsResponse
-> Rep BatchDescribeTypeConfigurationsResponse x
Prelude.Generic)

-- |
-- Create a value of 'BatchDescribeTypeConfigurationsResponse' 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:
--
-- 'unprocessedTypeConfigurations', 'batchDescribeTypeConfigurationsResponse_unprocessedTypeConfigurations' - A list of any of the specified extension configurations that
-- CloudFormation could not process for any reason.
--
-- 'typeConfigurations', 'batchDescribeTypeConfigurationsResponse_typeConfigurations' - A list of any of the specified extension configurations from the
-- CloudFormation registry.
--
-- 'errors', 'batchDescribeTypeConfigurationsResponse_errors' - A list of information concerning any errors generated during the setting
-- of the specified configurations.
--
-- 'httpStatus', 'batchDescribeTypeConfigurationsResponse_httpStatus' - The response's http status code.
newBatchDescribeTypeConfigurationsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  BatchDescribeTypeConfigurationsResponse
newBatchDescribeTypeConfigurationsResponse :: Int -> BatchDescribeTypeConfigurationsResponse
newBatchDescribeTypeConfigurationsResponse
  Int
pHttpStatus_ =
    BatchDescribeTypeConfigurationsResponse' :: Maybe [TypeConfigurationIdentifier]
-> Maybe [TypeConfigurationDetails]
-> Maybe [BatchDescribeTypeConfigurationsError]
-> Int
-> BatchDescribeTypeConfigurationsResponse
BatchDescribeTypeConfigurationsResponse'
      { $sel:unprocessedTypeConfigurations:BatchDescribeTypeConfigurationsResponse' :: Maybe [TypeConfigurationIdentifier]
unprocessedTypeConfigurations =
          Maybe [TypeConfigurationIdentifier]
forall a. Maybe a
Prelude.Nothing,
        $sel:typeConfigurations:BatchDescribeTypeConfigurationsResponse' :: Maybe [TypeConfigurationDetails]
typeConfigurations =
          Maybe [TypeConfigurationDetails]
forall a. Maybe a
Prelude.Nothing,
        $sel:errors:BatchDescribeTypeConfigurationsResponse' :: Maybe [BatchDescribeTypeConfigurationsError]
errors = Maybe [BatchDescribeTypeConfigurationsError]
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:BatchDescribeTypeConfigurationsResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | A list of any of the specified extension configurations that
-- CloudFormation could not process for any reason.
batchDescribeTypeConfigurationsResponse_unprocessedTypeConfigurations :: Lens.Lens' BatchDescribeTypeConfigurationsResponse (Prelude.Maybe [TypeConfigurationIdentifier])
batchDescribeTypeConfigurationsResponse_unprocessedTypeConfigurations :: (Maybe [TypeConfigurationIdentifier]
 -> f (Maybe [TypeConfigurationIdentifier]))
-> BatchDescribeTypeConfigurationsResponse
-> f BatchDescribeTypeConfigurationsResponse
batchDescribeTypeConfigurationsResponse_unprocessedTypeConfigurations = (BatchDescribeTypeConfigurationsResponse
 -> Maybe [TypeConfigurationIdentifier])
-> (BatchDescribeTypeConfigurationsResponse
    -> Maybe [TypeConfigurationIdentifier]
    -> BatchDescribeTypeConfigurationsResponse)
-> Lens
     BatchDescribeTypeConfigurationsResponse
     BatchDescribeTypeConfigurationsResponse
     (Maybe [TypeConfigurationIdentifier])
     (Maybe [TypeConfigurationIdentifier])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDescribeTypeConfigurationsResponse' {Maybe [TypeConfigurationIdentifier]
unprocessedTypeConfigurations :: Maybe [TypeConfigurationIdentifier]
$sel:unprocessedTypeConfigurations:BatchDescribeTypeConfigurationsResponse' :: BatchDescribeTypeConfigurationsResponse
-> Maybe [TypeConfigurationIdentifier]
unprocessedTypeConfigurations} -> Maybe [TypeConfigurationIdentifier]
unprocessedTypeConfigurations) (\s :: BatchDescribeTypeConfigurationsResponse
s@BatchDescribeTypeConfigurationsResponse' {} Maybe [TypeConfigurationIdentifier]
a -> BatchDescribeTypeConfigurationsResponse
s {$sel:unprocessedTypeConfigurations:BatchDescribeTypeConfigurationsResponse' :: Maybe [TypeConfigurationIdentifier]
unprocessedTypeConfigurations = Maybe [TypeConfigurationIdentifier]
a} :: BatchDescribeTypeConfigurationsResponse) ((Maybe [TypeConfigurationIdentifier]
  -> f (Maybe [TypeConfigurationIdentifier]))
 -> BatchDescribeTypeConfigurationsResponse
 -> f BatchDescribeTypeConfigurationsResponse)
-> ((Maybe [TypeConfigurationIdentifier]
     -> f (Maybe [TypeConfigurationIdentifier]))
    -> Maybe [TypeConfigurationIdentifier]
    -> f (Maybe [TypeConfigurationIdentifier]))
-> (Maybe [TypeConfigurationIdentifier]
    -> f (Maybe [TypeConfigurationIdentifier]))
-> BatchDescribeTypeConfigurationsResponse
-> f BatchDescribeTypeConfigurationsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [TypeConfigurationIdentifier]
  [TypeConfigurationIdentifier]
  [TypeConfigurationIdentifier]
  [TypeConfigurationIdentifier]
-> Iso
     (Maybe [TypeConfigurationIdentifier])
     (Maybe [TypeConfigurationIdentifier])
     (Maybe [TypeConfigurationIdentifier])
     (Maybe [TypeConfigurationIdentifier])
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
  [TypeConfigurationIdentifier]
  [TypeConfigurationIdentifier]
  [TypeConfigurationIdentifier]
  [TypeConfigurationIdentifier]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A list of any of the specified extension configurations from the
-- CloudFormation registry.
batchDescribeTypeConfigurationsResponse_typeConfigurations :: Lens.Lens' BatchDescribeTypeConfigurationsResponse (Prelude.Maybe [TypeConfigurationDetails])
batchDescribeTypeConfigurationsResponse_typeConfigurations :: (Maybe [TypeConfigurationDetails]
 -> f (Maybe [TypeConfigurationDetails]))
-> BatchDescribeTypeConfigurationsResponse
-> f BatchDescribeTypeConfigurationsResponse
batchDescribeTypeConfigurationsResponse_typeConfigurations = (BatchDescribeTypeConfigurationsResponse
 -> Maybe [TypeConfigurationDetails])
-> (BatchDescribeTypeConfigurationsResponse
    -> Maybe [TypeConfigurationDetails]
    -> BatchDescribeTypeConfigurationsResponse)
-> Lens
     BatchDescribeTypeConfigurationsResponse
     BatchDescribeTypeConfigurationsResponse
     (Maybe [TypeConfigurationDetails])
     (Maybe [TypeConfigurationDetails])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDescribeTypeConfigurationsResponse' {Maybe [TypeConfigurationDetails]
typeConfigurations :: Maybe [TypeConfigurationDetails]
$sel:typeConfigurations:BatchDescribeTypeConfigurationsResponse' :: BatchDescribeTypeConfigurationsResponse
-> Maybe [TypeConfigurationDetails]
typeConfigurations} -> Maybe [TypeConfigurationDetails]
typeConfigurations) (\s :: BatchDescribeTypeConfigurationsResponse
s@BatchDescribeTypeConfigurationsResponse' {} Maybe [TypeConfigurationDetails]
a -> BatchDescribeTypeConfigurationsResponse
s {$sel:typeConfigurations:BatchDescribeTypeConfigurationsResponse' :: Maybe [TypeConfigurationDetails]
typeConfigurations = Maybe [TypeConfigurationDetails]
a} :: BatchDescribeTypeConfigurationsResponse) ((Maybe [TypeConfigurationDetails]
  -> f (Maybe [TypeConfigurationDetails]))
 -> BatchDescribeTypeConfigurationsResponse
 -> f BatchDescribeTypeConfigurationsResponse)
-> ((Maybe [TypeConfigurationDetails]
     -> f (Maybe [TypeConfigurationDetails]))
    -> Maybe [TypeConfigurationDetails]
    -> f (Maybe [TypeConfigurationDetails]))
-> (Maybe [TypeConfigurationDetails]
    -> f (Maybe [TypeConfigurationDetails]))
-> BatchDescribeTypeConfigurationsResponse
-> f BatchDescribeTypeConfigurationsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [TypeConfigurationDetails]
  [TypeConfigurationDetails]
  [TypeConfigurationDetails]
  [TypeConfigurationDetails]
-> Iso
     (Maybe [TypeConfigurationDetails])
     (Maybe [TypeConfigurationDetails])
     (Maybe [TypeConfigurationDetails])
     (Maybe [TypeConfigurationDetails])
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
  [TypeConfigurationDetails]
  [TypeConfigurationDetails]
  [TypeConfigurationDetails]
  [TypeConfigurationDetails]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A list of information concerning any errors generated during the setting
-- of the specified configurations.
batchDescribeTypeConfigurationsResponse_errors :: Lens.Lens' BatchDescribeTypeConfigurationsResponse (Prelude.Maybe [BatchDescribeTypeConfigurationsError])
batchDescribeTypeConfigurationsResponse_errors :: (Maybe [BatchDescribeTypeConfigurationsError]
 -> f (Maybe [BatchDescribeTypeConfigurationsError]))
-> BatchDescribeTypeConfigurationsResponse
-> f BatchDescribeTypeConfigurationsResponse
batchDescribeTypeConfigurationsResponse_errors = (BatchDescribeTypeConfigurationsResponse
 -> Maybe [BatchDescribeTypeConfigurationsError])
-> (BatchDescribeTypeConfigurationsResponse
    -> Maybe [BatchDescribeTypeConfigurationsError]
    -> BatchDescribeTypeConfigurationsResponse)
-> Lens
     BatchDescribeTypeConfigurationsResponse
     BatchDescribeTypeConfigurationsResponse
     (Maybe [BatchDescribeTypeConfigurationsError])
     (Maybe [BatchDescribeTypeConfigurationsError])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDescribeTypeConfigurationsResponse' {Maybe [BatchDescribeTypeConfigurationsError]
errors :: Maybe [BatchDescribeTypeConfigurationsError]
$sel:errors:BatchDescribeTypeConfigurationsResponse' :: BatchDescribeTypeConfigurationsResponse
-> Maybe [BatchDescribeTypeConfigurationsError]
errors} -> Maybe [BatchDescribeTypeConfigurationsError]
errors) (\s :: BatchDescribeTypeConfigurationsResponse
s@BatchDescribeTypeConfigurationsResponse' {} Maybe [BatchDescribeTypeConfigurationsError]
a -> BatchDescribeTypeConfigurationsResponse
s {$sel:errors:BatchDescribeTypeConfigurationsResponse' :: Maybe [BatchDescribeTypeConfigurationsError]
errors = Maybe [BatchDescribeTypeConfigurationsError]
a} :: BatchDescribeTypeConfigurationsResponse) ((Maybe [BatchDescribeTypeConfigurationsError]
  -> f (Maybe [BatchDescribeTypeConfigurationsError]))
 -> BatchDescribeTypeConfigurationsResponse
 -> f BatchDescribeTypeConfigurationsResponse)
-> ((Maybe [BatchDescribeTypeConfigurationsError]
     -> f (Maybe [BatchDescribeTypeConfigurationsError]))
    -> Maybe [BatchDescribeTypeConfigurationsError]
    -> f (Maybe [BatchDescribeTypeConfigurationsError]))
-> (Maybe [BatchDescribeTypeConfigurationsError]
    -> f (Maybe [BatchDescribeTypeConfigurationsError]))
-> BatchDescribeTypeConfigurationsResponse
-> f BatchDescribeTypeConfigurationsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [BatchDescribeTypeConfigurationsError]
  [BatchDescribeTypeConfigurationsError]
  [BatchDescribeTypeConfigurationsError]
  [BatchDescribeTypeConfigurationsError]
-> Iso
     (Maybe [BatchDescribeTypeConfigurationsError])
     (Maybe [BatchDescribeTypeConfigurationsError])
     (Maybe [BatchDescribeTypeConfigurationsError])
     (Maybe [BatchDescribeTypeConfigurationsError])
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
  [BatchDescribeTypeConfigurationsError]
  [BatchDescribeTypeConfigurationsError]
  [BatchDescribeTypeConfigurationsError]
  [BatchDescribeTypeConfigurationsError]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    BatchDescribeTypeConfigurationsResponse