{-# 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.BatchGetAggregateResourceConfig
-- 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 current configuration items for resources that are present
-- in your Config aggregator. The operation also returns a list of
-- resources that are not processed in the current request. If there are no
-- unprocessed resources, the operation returns an empty
-- @unprocessedResourceIdentifiers@ list.
--
-- -   The API does not return results for deleted resources.
--
-- -   The API does not return tags and relationships.
module Amazonka.Config.BatchGetAggregateResourceConfig
  ( -- * Creating a Request
    BatchGetAggregateResourceConfig (..),
    newBatchGetAggregateResourceConfig,

    -- * Request Lenses
    batchGetAggregateResourceConfig_configurationAggregatorName,
    batchGetAggregateResourceConfig_resourceIdentifiers,

    -- * Destructuring the Response
    BatchGetAggregateResourceConfigResponse (..),
    newBatchGetAggregateResourceConfigResponse,

    -- * Response Lenses
    batchGetAggregateResourceConfigResponse_baseConfigurationItems,
    batchGetAggregateResourceConfigResponse_unprocessedResourceIdentifiers,
    batchGetAggregateResourceConfigResponse_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:/ 'newBatchGetAggregateResourceConfig' smart constructor.
data BatchGetAggregateResourceConfig = BatchGetAggregateResourceConfig'
  { -- | The name of the configuration aggregator.
    BatchGetAggregateResourceConfig -> Text
configurationAggregatorName :: Prelude.Text,
    -- | A list of aggregate ResourceIdentifiers objects.
    BatchGetAggregateResourceConfig
-> NonEmpty AggregateResourceIdentifier
resourceIdentifiers :: Prelude.NonEmpty AggregateResourceIdentifier
  }
  deriving (BatchGetAggregateResourceConfig
-> BatchGetAggregateResourceConfig -> Bool
(BatchGetAggregateResourceConfig
 -> BatchGetAggregateResourceConfig -> Bool)
-> (BatchGetAggregateResourceConfig
    -> BatchGetAggregateResourceConfig -> Bool)
-> Eq BatchGetAggregateResourceConfig
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchGetAggregateResourceConfig
-> BatchGetAggregateResourceConfig -> Bool
$c/= :: BatchGetAggregateResourceConfig
-> BatchGetAggregateResourceConfig -> Bool
== :: BatchGetAggregateResourceConfig
-> BatchGetAggregateResourceConfig -> Bool
$c== :: BatchGetAggregateResourceConfig
-> BatchGetAggregateResourceConfig -> Bool
Prelude.Eq, ReadPrec [BatchGetAggregateResourceConfig]
ReadPrec BatchGetAggregateResourceConfig
Int -> ReadS BatchGetAggregateResourceConfig
ReadS [BatchGetAggregateResourceConfig]
(Int -> ReadS BatchGetAggregateResourceConfig)
-> ReadS [BatchGetAggregateResourceConfig]
-> ReadPrec BatchGetAggregateResourceConfig
-> ReadPrec [BatchGetAggregateResourceConfig]
-> Read BatchGetAggregateResourceConfig
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchGetAggregateResourceConfig]
$creadListPrec :: ReadPrec [BatchGetAggregateResourceConfig]
readPrec :: ReadPrec BatchGetAggregateResourceConfig
$creadPrec :: ReadPrec BatchGetAggregateResourceConfig
readList :: ReadS [BatchGetAggregateResourceConfig]
$creadList :: ReadS [BatchGetAggregateResourceConfig]
readsPrec :: Int -> ReadS BatchGetAggregateResourceConfig
$creadsPrec :: Int -> ReadS BatchGetAggregateResourceConfig
Prelude.Read, Int -> BatchGetAggregateResourceConfig -> ShowS
[BatchGetAggregateResourceConfig] -> ShowS
BatchGetAggregateResourceConfig -> String
(Int -> BatchGetAggregateResourceConfig -> ShowS)
-> (BatchGetAggregateResourceConfig -> String)
-> ([BatchGetAggregateResourceConfig] -> ShowS)
-> Show BatchGetAggregateResourceConfig
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchGetAggregateResourceConfig] -> ShowS
$cshowList :: [BatchGetAggregateResourceConfig] -> ShowS
show :: BatchGetAggregateResourceConfig -> String
$cshow :: BatchGetAggregateResourceConfig -> String
showsPrec :: Int -> BatchGetAggregateResourceConfig -> ShowS
$cshowsPrec :: Int -> BatchGetAggregateResourceConfig -> ShowS
Prelude.Show, (forall x.
 BatchGetAggregateResourceConfig
 -> Rep BatchGetAggregateResourceConfig x)
-> (forall x.
    Rep BatchGetAggregateResourceConfig x
    -> BatchGetAggregateResourceConfig)
-> Generic BatchGetAggregateResourceConfig
forall x.
Rep BatchGetAggregateResourceConfig x
-> BatchGetAggregateResourceConfig
forall x.
BatchGetAggregateResourceConfig
-> Rep BatchGetAggregateResourceConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchGetAggregateResourceConfig x
-> BatchGetAggregateResourceConfig
$cfrom :: forall x.
BatchGetAggregateResourceConfig
-> Rep BatchGetAggregateResourceConfig x
Prelude.Generic)

-- |
-- Create a value of 'BatchGetAggregateResourceConfig' 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:
--
-- 'configurationAggregatorName', 'batchGetAggregateResourceConfig_configurationAggregatorName' - The name of the configuration aggregator.
--
-- 'resourceIdentifiers', 'batchGetAggregateResourceConfig_resourceIdentifiers' - A list of aggregate ResourceIdentifiers objects.
newBatchGetAggregateResourceConfig ::
  -- | 'configurationAggregatorName'
  Prelude.Text ->
  -- | 'resourceIdentifiers'
  Prelude.NonEmpty AggregateResourceIdentifier ->
  BatchGetAggregateResourceConfig
newBatchGetAggregateResourceConfig :: Text
-> NonEmpty AggregateResourceIdentifier
-> BatchGetAggregateResourceConfig
newBatchGetAggregateResourceConfig
  Text
pConfigurationAggregatorName_
  NonEmpty AggregateResourceIdentifier
pResourceIdentifiers_ =
    BatchGetAggregateResourceConfig' :: Text
-> NonEmpty AggregateResourceIdentifier
-> BatchGetAggregateResourceConfig
BatchGetAggregateResourceConfig'
      { $sel:configurationAggregatorName:BatchGetAggregateResourceConfig' :: Text
configurationAggregatorName =
          Text
pConfigurationAggregatorName_,
        $sel:resourceIdentifiers:BatchGetAggregateResourceConfig' :: NonEmpty AggregateResourceIdentifier
resourceIdentifiers =
          Tagged
  (NonEmpty AggregateResourceIdentifier)
  (Identity (NonEmpty AggregateResourceIdentifier))
-> Tagged
     (NonEmpty AggregateResourceIdentifier)
     (Identity (NonEmpty AggregateResourceIdentifier))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
            (Tagged
   (NonEmpty AggregateResourceIdentifier)
   (Identity (NonEmpty AggregateResourceIdentifier))
 -> Tagged
      (NonEmpty AggregateResourceIdentifier)
      (Identity (NonEmpty AggregateResourceIdentifier)))
-> NonEmpty AggregateResourceIdentifier
-> NonEmpty AggregateResourceIdentifier
forall t b. AReview t b -> b -> t
Lens.# NonEmpty AggregateResourceIdentifier
pResourceIdentifiers_
      }

-- | The name of the configuration aggregator.
batchGetAggregateResourceConfig_configurationAggregatorName :: Lens.Lens' BatchGetAggregateResourceConfig Prelude.Text
batchGetAggregateResourceConfig_configurationAggregatorName :: (Text -> f Text)
-> BatchGetAggregateResourceConfig
-> f BatchGetAggregateResourceConfig
batchGetAggregateResourceConfig_configurationAggregatorName = (BatchGetAggregateResourceConfig -> Text)
-> (BatchGetAggregateResourceConfig
    -> Text -> BatchGetAggregateResourceConfig)
-> Lens
     BatchGetAggregateResourceConfig
     BatchGetAggregateResourceConfig
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetAggregateResourceConfig' {Text
configurationAggregatorName :: Text
$sel:configurationAggregatorName:BatchGetAggregateResourceConfig' :: BatchGetAggregateResourceConfig -> Text
configurationAggregatorName} -> Text
configurationAggregatorName) (\s :: BatchGetAggregateResourceConfig
s@BatchGetAggregateResourceConfig' {} Text
a -> BatchGetAggregateResourceConfig
s {$sel:configurationAggregatorName:BatchGetAggregateResourceConfig' :: Text
configurationAggregatorName = Text
a} :: BatchGetAggregateResourceConfig)

-- | A list of aggregate ResourceIdentifiers objects.
batchGetAggregateResourceConfig_resourceIdentifiers :: Lens.Lens' BatchGetAggregateResourceConfig (Prelude.NonEmpty AggregateResourceIdentifier)
batchGetAggregateResourceConfig_resourceIdentifiers :: (NonEmpty AggregateResourceIdentifier
 -> f (NonEmpty AggregateResourceIdentifier))
-> BatchGetAggregateResourceConfig
-> f BatchGetAggregateResourceConfig
batchGetAggregateResourceConfig_resourceIdentifiers = (BatchGetAggregateResourceConfig
 -> NonEmpty AggregateResourceIdentifier)
-> (BatchGetAggregateResourceConfig
    -> NonEmpty AggregateResourceIdentifier
    -> BatchGetAggregateResourceConfig)
-> Lens
     BatchGetAggregateResourceConfig
     BatchGetAggregateResourceConfig
     (NonEmpty AggregateResourceIdentifier)
     (NonEmpty AggregateResourceIdentifier)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetAggregateResourceConfig' {NonEmpty AggregateResourceIdentifier
resourceIdentifiers :: NonEmpty AggregateResourceIdentifier
$sel:resourceIdentifiers:BatchGetAggregateResourceConfig' :: BatchGetAggregateResourceConfig
-> NonEmpty AggregateResourceIdentifier
resourceIdentifiers} -> NonEmpty AggregateResourceIdentifier
resourceIdentifiers) (\s :: BatchGetAggregateResourceConfig
s@BatchGetAggregateResourceConfig' {} NonEmpty AggregateResourceIdentifier
a -> BatchGetAggregateResourceConfig
s {$sel:resourceIdentifiers:BatchGetAggregateResourceConfig' :: NonEmpty AggregateResourceIdentifier
resourceIdentifiers = NonEmpty AggregateResourceIdentifier
a} :: BatchGetAggregateResourceConfig) ((NonEmpty AggregateResourceIdentifier
  -> f (NonEmpty AggregateResourceIdentifier))
 -> BatchGetAggregateResourceConfig
 -> f BatchGetAggregateResourceConfig)
-> ((NonEmpty AggregateResourceIdentifier
     -> f (NonEmpty AggregateResourceIdentifier))
    -> NonEmpty AggregateResourceIdentifier
    -> f (NonEmpty AggregateResourceIdentifier))
-> (NonEmpty AggregateResourceIdentifier
    -> f (NonEmpty AggregateResourceIdentifier))
-> BatchGetAggregateResourceConfig
-> f BatchGetAggregateResourceConfig
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty AggregateResourceIdentifier
 -> f (NonEmpty AggregateResourceIdentifier))
-> NonEmpty AggregateResourceIdentifier
-> f (NonEmpty AggregateResourceIdentifier)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    BatchGetAggregateResourceConfig

instance
  Core.ToHeaders
    BatchGetAggregateResourceConfig
  where
  toHeaders :: BatchGetAggregateResourceConfig -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> BatchGetAggregateResourceConfig -> 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.BatchGetAggregateResourceConfig" ::
                          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 BatchGetAggregateResourceConfig where
  toJSON :: BatchGetAggregateResourceConfig -> Value
toJSON BatchGetAggregateResourceConfig' {NonEmpty AggregateResourceIdentifier
Text
resourceIdentifiers :: NonEmpty AggregateResourceIdentifier
configurationAggregatorName :: Text
$sel:resourceIdentifiers:BatchGetAggregateResourceConfig' :: BatchGetAggregateResourceConfig
-> NonEmpty AggregateResourceIdentifier
$sel:configurationAggregatorName:BatchGetAggregateResourceConfig' :: BatchGetAggregateResourceConfig -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"ConfigurationAggregatorName"
                  Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
configurationAggregatorName
              ),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"ResourceIdentifiers" Text -> NonEmpty AggregateResourceIdentifier -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= NonEmpty AggregateResourceIdentifier
resourceIdentifiers)
          ]
      )

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

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

-- | /See:/ 'newBatchGetAggregateResourceConfigResponse' smart constructor.
data BatchGetAggregateResourceConfigResponse = BatchGetAggregateResourceConfigResponse'
  { -- | A list that contains the current configuration of one or more resources.
    BatchGetAggregateResourceConfigResponse
-> Maybe [BaseConfigurationItem]
baseConfigurationItems :: Prelude.Maybe [BaseConfigurationItem],
    -- | A list of resource identifiers that were not processed with current
    -- scope. The list is empty if all the resources are processed.
    BatchGetAggregateResourceConfigResponse
-> Maybe [AggregateResourceIdentifier]
unprocessedResourceIdentifiers :: Prelude.Maybe [AggregateResourceIdentifier],
    -- | The response's http status code.
    BatchGetAggregateResourceConfigResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (BatchGetAggregateResourceConfigResponse
-> BatchGetAggregateResourceConfigResponse -> Bool
(BatchGetAggregateResourceConfigResponse
 -> BatchGetAggregateResourceConfigResponse -> Bool)
-> (BatchGetAggregateResourceConfigResponse
    -> BatchGetAggregateResourceConfigResponse -> Bool)
-> Eq BatchGetAggregateResourceConfigResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchGetAggregateResourceConfigResponse
-> BatchGetAggregateResourceConfigResponse -> Bool
$c/= :: BatchGetAggregateResourceConfigResponse
-> BatchGetAggregateResourceConfigResponse -> Bool
== :: BatchGetAggregateResourceConfigResponse
-> BatchGetAggregateResourceConfigResponse -> Bool
$c== :: BatchGetAggregateResourceConfigResponse
-> BatchGetAggregateResourceConfigResponse -> Bool
Prelude.Eq, ReadPrec [BatchGetAggregateResourceConfigResponse]
ReadPrec BatchGetAggregateResourceConfigResponse
Int -> ReadS BatchGetAggregateResourceConfigResponse
ReadS [BatchGetAggregateResourceConfigResponse]
(Int -> ReadS BatchGetAggregateResourceConfigResponse)
-> ReadS [BatchGetAggregateResourceConfigResponse]
-> ReadPrec BatchGetAggregateResourceConfigResponse
-> ReadPrec [BatchGetAggregateResourceConfigResponse]
-> Read BatchGetAggregateResourceConfigResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchGetAggregateResourceConfigResponse]
$creadListPrec :: ReadPrec [BatchGetAggregateResourceConfigResponse]
readPrec :: ReadPrec BatchGetAggregateResourceConfigResponse
$creadPrec :: ReadPrec BatchGetAggregateResourceConfigResponse
readList :: ReadS [BatchGetAggregateResourceConfigResponse]
$creadList :: ReadS [BatchGetAggregateResourceConfigResponse]
readsPrec :: Int -> ReadS BatchGetAggregateResourceConfigResponse
$creadsPrec :: Int -> ReadS BatchGetAggregateResourceConfigResponse
Prelude.Read, Int -> BatchGetAggregateResourceConfigResponse -> ShowS
[BatchGetAggregateResourceConfigResponse] -> ShowS
BatchGetAggregateResourceConfigResponse -> String
(Int -> BatchGetAggregateResourceConfigResponse -> ShowS)
-> (BatchGetAggregateResourceConfigResponse -> String)
-> ([BatchGetAggregateResourceConfigResponse] -> ShowS)
-> Show BatchGetAggregateResourceConfigResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchGetAggregateResourceConfigResponse] -> ShowS
$cshowList :: [BatchGetAggregateResourceConfigResponse] -> ShowS
show :: BatchGetAggregateResourceConfigResponse -> String
$cshow :: BatchGetAggregateResourceConfigResponse -> String
showsPrec :: Int -> BatchGetAggregateResourceConfigResponse -> ShowS
$cshowsPrec :: Int -> BatchGetAggregateResourceConfigResponse -> ShowS
Prelude.Show, (forall x.
 BatchGetAggregateResourceConfigResponse
 -> Rep BatchGetAggregateResourceConfigResponse x)
-> (forall x.
    Rep BatchGetAggregateResourceConfigResponse x
    -> BatchGetAggregateResourceConfigResponse)
-> Generic BatchGetAggregateResourceConfigResponse
forall x.
Rep BatchGetAggregateResourceConfigResponse x
-> BatchGetAggregateResourceConfigResponse
forall x.
BatchGetAggregateResourceConfigResponse
-> Rep BatchGetAggregateResourceConfigResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchGetAggregateResourceConfigResponse x
-> BatchGetAggregateResourceConfigResponse
$cfrom :: forall x.
BatchGetAggregateResourceConfigResponse
-> Rep BatchGetAggregateResourceConfigResponse x
Prelude.Generic)

-- |
-- Create a value of 'BatchGetAggregateResourceConfigResponse' 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:
--
-- 'baseConfigurationItems', 'batchGetAggregateResourceConfigResponse_baseConfigurationItems' - A list that contains the current configuration of one or more resources.
--
-- 'unprocessedResourceIdentifiers', 'batchGetAggregateResourceConfigResponse_unprocessedResourceIdentifiers' - A list of resource identifiers that were not processed with current
-- scope. The list is empty if all the resources are processed.
--
-- 'httpStatus', 'batchGetAggregateResourceConfigResponse_httpStatus' - The response's http status code.
newBatchGetAggregateResourceConfigResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  BatchGetAggregateResourceConfigResponse
newBatchGetAggregateResourceConfigResponse :: Int -> BatchGetAggregateResourceConfigResponse
newBatchGetAggregateResourceConfigResponse
  Int
pHttpStatus_ =
    BatchGetAggregateResourceConfigResponse' :: Maybe [BaseConfigurationItem]
-> Maybe [AggregateResourceIdentifier]
-> Int
-> BatchGetAggregateResourceConfigResponse
BatchGetAggregateResourceConfigResponse'
      { $sel:baseConfigurationItems:BatchGetAggregateResourceConfigResponse' :: Maybe [BaseConfigurationItem]
baseConfigurationItems =
          Maybe [BaseConfigurationItem]
forall a. Maybe a
Prelude.Nothing,
        $sel:unprocessedResourceIdentifiers:BatchGetAggregateResourceConfigResponse' :: Maybe [AggregateResourceIdentifier]
unprocessedResourceIdentifiers =
          Maybe [AggregateResourceIdentifier]
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:BatchGetAggregateResourceConfigResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | A list that contains the current configuration of one or more resources.
batchGetAggregateResourceConfigResponse_baseConfigurationItems :: Lens.Lens' BatchGetAggregateResourceConfigResponse (Prelude.Maybe [BaseConfigurationItem])
batchGetAggregateResourceConfigResponse_baseConfigurationItems :: (Maybe [BaseConfigurationItem]
 -> f (Maybe [BaseConfigurationItem]))
-> BatchGetAggregateResourceConfigResponse
-> f BatchGetAggregateResourceConfigResponse
batchGetAggregateResourceConfigResponse_baseConfigurationItems = (BatchGetAggregateResourceConfigResponse
 -> Maybe [BaseConfigurationItem])
-> (BatchGetAggregateResourceConfigResponse
    -> Maybe [BaseConfigurationItem]
    -> BatchGetAggregateResourceConfigResponse)
-> Lens
     BatchGetAggregateResourceConfigResponse
     BatchGetAggregateResourceConfigResponse
     (Maybe [BaseConfigurationItem])
     (Maybe [BaseConfigurationItem])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetAggregateResourceConfigResponse' {Maybe [BaseConfigurationItem]
baseConfigurationItems :: Maybe [BaseConfigurationItem]
$sel:baseConfigurationItems:BatchGetAggregateResourceConfigResponse' :: BatchGetAggregateResourceConfigResponse
-> Maybe [BaseConfigurationItem]
baseConfigurationItems} -> Maybe [BaseConfigurationItem]
baseConfigurationItems) (\s :: BatchGetAggregateResourceConfigResponse
s@BatchGetAggregateResourceConfigResponse' {} Maybe [BaseConfigurationItem]
a -> BatchGetAggregateResourceConfigResponse
s {$sel:baseConfigurationItems:BatchGetAggregateResourceConfigResponse' :: Maybe [BaseConfigurationItem]
baseConfigurationItems = Maybe [BaseConfigurationItem]
a} :: BatchGetAggregateResourceConfigResponse) ((Maybe [BaseConfigurationItem]
  -> f (Maybe [BaseConfigurationItem]))
 -> BatchGetAggregateResourceConfigResponse
 -> f BatchGetAggregateResourceConfigResponse)
-> ((Maybe [BaseConfigurationItem]
     -> f (Maybe [BaseConfigurationItem]))
    -> Maybe [BaseConfigurationItem]
    -> f (Maybe [BaseConfigurationItem]))
-> (Maybe [BaseConfigurationItem]
    -> f (Maybe [BaseConfigurationItem]))
-> BatchGetAggregateResourceConfigResponse
-> f BatchGetAggregateResourceConfigResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [BaseConfigurationItem]
  [BaseConfigurationItem]
  [BaseConfigurationItem]
  [BaseConfigurationItem]
-> Iso
     (Maybe [BaseConfigurationItem])
     (Maybe [BaseConfigurationItem])
     (Maybe [BaseConfigurationItem])
     (Maybe [BaseConfigurationItem])
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
  [BaseConfigurationItem]
  [BaseConfigurationItem]
  [BaseConfigurationItem]
  [BaseConfigurationItem]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A list of resource identifiers that were not processed with current
-- scope. The list is empty if all the resources are processed.
batchGetAggregateResourceConfigResponse_unprocessedResourceIdentifiers :: Lens.Lens' BatchGetAggregateResourceConfigResponse (Prelude.Maybe [AggregateResourceIdentifier])
batchGetAggregateResourceConfigResponse_unprocessedResourceIdentifiers :: (Maybe [AggregateResourceIdentifier]
 -> f (Maybe [AggregateResourceIdentifier]))
-> BatchGetAggregateResourceConfigResponse
-> f BatchGetAggregateResourceConfigResponse
batchGetAggregateResourceConfigResponse_unprocessedResourceIdentifiers = (BatchGetAggregateResourceConfigResponse
 -> Maybe [AggregateResourceIdentifier])
-> (BatchGetAggregateResourceConfigResponse
    -> Maybe [AggregateResourceIdentifier]
    -> BatchGetAggregateResourceConfigResponse)
-> Lens
     BatchGetAggregateResourceConfigResponse
     BatchGetAggregateResourceConfigResponse
     (Maybe [AggregateResourceIdentifier])
     (Maybe [AggregateResourceIdentifier])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetAggregateResourceConfigResponse' {Maybe [AggregateResourceIdentifier]
unprocessedResourceIdentifiers :: Maybe [AggregateResourceIdentifier]
$sel:unprocessedResourceIdentifiers:BatchGetAggregateResourceConfigResponse' :: BatchGetAggregateResourceConfigResponse
-> Maybe [AggregateResourceIdentifier]
unprocessedResourceIdentifiers} -> Maybe [AggregateResourceIdentifier]
unprocessedResourceIdentifiers) (\s :: BatchGetAggregateResourceConfigResponse
s@BatchGetAggregateResourceConfigResponse' {} Maybe [AggregateResourceIdentifier]
a -> BatchGetAggregateResourceConfigResponse
s {$sel:unprocessedResourceIdentifiers:BatchGetAggregateResourceConfigResponse' :: Maybe [AggregateResourceIdentifier]
unprocessedResourceIdentifiers = Maybe [AggregateResourceIdentifier]
a} :: BatchGetAggregateResourceConfigResponse) ((Maybe [AggregateResourceIdentifier]
  -> f (Maybe [AggregateResourceIdentifier]))
 -> BatchGetAggregateResourceConfigResponse
 -> f BatchGetAggregateResourceConfigResponse)
-> ((Maybe [AggregateResourceIdentifier]
     -> f (Maybe [AggregateResourceIdentifier]))
    -> Maybe [AggregateResourceIdentifier]
    -> f (Maybe [AggregateResourceIdentifier]))
-> (Maybe [AggregateResourceIdentifier]
    -> f (Maybe [AggregateResourceIdentifier]))
-> BatchGetAggregateResourceConfigResponse
-> f BatchGetAggregateResourceConfigResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [AggregateResourceIdentifier]
  [AggregateResourceIdentifier]
  [AggregateResourceIdentifier]
  [AggregateResourceIdentifier]
-> Iso
     (Maybe [AggregateResourceIdentifier])
     (Maybe [AggregateResourceIdentifier])
     (Maybe [AggregateResourceIdentifier])
     (Maybe [AggregateResourceIdentifier])
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
  [AggregateResourceIdentifier]
  [AggregateResourceIdentifier]
  [AggregateResourceIdentifier]
  [AggregateResourceIdentifier]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    BatchGetAggregateResourceConfigResponse