{-# 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.PinpointSmsVoiceV2.DescribeConfigurationSets
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Describes the specified configuration sets or all in your account.
--
-- If you specify configuration set names, the output includes information
-- for only the specified configuration sets. If you specify filters, the
-- output includes information for only those configuration sets that meet
-- the filter criteria. If you don\'t specify configuration set names or
-- filters, the output includes information for all configuration sets.
--
-- If you specify a configuration set name that isn\'t valid, an error is
-- returned.
--
-- This operation returns paginated results.
module Amazonka.PinpointSmsVoiceV2.DescribeConfigurationSets
  ( -- * Creating a Request
    DescribeConfigurationSets (..),
    newDescribeConfigurationSets,

    -- * Request Lenses
    describeConfigurationSets_configurationSetNames,
    describeConfigurationSets_filters,
    describeConfigurationSets_maxResults,
    describeConfigurationSets_nextToken,

    -- * Destructuring the Response
    DescribeConfigurationSetsResponse (..),
    newDescribeConfigurationSetsResponse,

    -- * Response Lenses
    describeConfigurationSetsResponse_configurationSets,
    describeConfigurationSetsResponse_nextToken,
    describeConfigurationSetsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.PinpointSmsVoiceV2.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newDescribeConfigurationSets' smart constructor.
data DescribeConfigurationSets = DescribeConfigurationSets'
  { -- | An array of strings. Each element can be either a ConfigurationSetName
    -- or ConfigurationSetArn.
    DescribeConfigurationSets -> Maybe [Text]
configurationSetNames :: Prelude.Maybe [Prelude.Text],
    -- | An array of filters to apply to the results that are returned.
    DescribeConfigurationSets -> Maybe [ConfigurationSetFilter]
filters :: Prelude.Maybe [ConfigurationSetFilter],
    -- | The maximum number of results to return per each request.
    DescribeConfigurationSets -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The token to be used for the next set of paginated results. You don\'t
    -- need to supply a value for this field in the initial request.
    DescribeConfigurationSets -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
  }
  deriving (DescribeConfigurationSets -> DescribeConfigurationSets -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeConfigurationSets -> DescribeConfigurationSets -> Bool
$c/= :: DescribeConfigurationSets -> DescribeConfigurationSets -> Bool
== :: DescribeConfigurationSets -> DescribeConfigurationSets -> Bool
$c== :: DescribeConfigurationSets -> DescribeConfigurationSets -> Bool
Prelude.Eq, ReadPrec [DescribeConfigurationSets]
ReadPrec DescribeConfigurationSets
Int -> ReadS DescribeConfigurationSets
ReadS [DescribeConfigurationSets]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeConfigurationSets]
$creadListPrec :: ReadPrec [DescribeConfigurationSets]
readPrec :: ReadPrec DescribeConfigurationSets
$creadPrec :: ReadPrec DescribeConfigurationSets
readList :: ReadS [DescribeConfigurationSets]
$creadList :: ReadS [DescribeConfigurationSets]
readsPrec :: Int -> ReadS DescribeConfigurationSets
$creadsPrec :: Int -> ReadS DescribeConfigurationSets
Prelude.Read, Int -> DescribeConfigurationSets -> ShowS
[DescribeConfigurationSets] -> ShowS
DescribeConfigurationSets -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeConfigurationSets] -> ShowS
$cshowList :: [DescribeConfigurationSets] -> ShowS
show :: DescribeConfigurationSets -> String
$cshow :: DescribeConfigurationSets -> String
showsPrec :: Int -> DescribeConfigurationSets -> ShowS
$cshowsPrec :: Int -> DescribeConfigurationSets -> ShowS
Prelude.Show, forall x.
Rep DescribeConfigurationSets x -> DescribeConfigurationSets
forall x.
DescribeConfigurationSets -> Rep DescribeConfigurationSets x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeConfigurationSets x -> DescribeConfigurationSets
$cfrom :: forall x.
DescribeConfigurationSets -> Rep DescribeConfigurationSets x
Prelude.Generic)

-- |
-- Create a value of 'DescribeConfigurationSets' 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:
--
-- 'configurationSetNames', 'describeConfigurationSets_configurationSetNames' - An array of strings. Each element can be either a ConfigurationSetName
-- or ConfigurationSetArn.
--
-- 'filters', 'describeConfigurationSets_filters' - An array of filters to apply to the results that are returned.
--
-- 'maxResults', 'describeConfigurationSets_maxResults' - The maximum number of results to return per each request.
--
-- 'nextToken', 'describeConfigurationSets_nextToken' - The token to be used for the next set of paginated results. You don\'t
-- need to supply a value for this field in the initial request.
newDescribeConfigurationSets ::
  DescribeConfigurationSets
newDescribeConfigurationSets :: DescribeConfigurationSets
newDescribeConfigurationSets =
  DescribeConfigurationSets'
    { $sel:configurationSetNames:DescribeConfigurationSets' :: Maybe [Text]
configurationSetNames =
        forall a. Maybe a
Prelude.Nothing,
      $sel:filters:DescribeConfigurationSets' :: Maybe [ConfigurationSetFilter]
filters = forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:DescribeConfigurationSets' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeConfigurationSets' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing
    }

-- | An array of strings. Each element can be either a ConfigurationSetName
-- or ConfigurationSetArn.
describeConfigurationSets_configurationSetNames :: Lens.Lens' DescribeConfigurationSets (Prelude.Maybe [Prelude.Text])
describeConfigurationSets_configurationSetNames :: Lens' DescribeConfigurationSets (Maybe [Text])
describeConfigurationSets_configurationSetNames = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConfigurationSets' {Maybe [Text]
configurationSetNames :: Maybe [Text]
$sel:configurationSetNames:DescribeConfigurationSets' :: DescribeConfigurationSets -> Maybe [Text]
configurationSetNames} -> Maybe [Text]
configurationSetNames) (\s :: DescribeConfigurationSets
s@DescribeConfigurationSets' {} Maybe [Text]
a -> DescribeConfigurationSets
s {$sel:configurationSetNames:DescribeConfigurationSets' :: Maybe [Text]
configurationSetNames = Maybe [Text]
a} :: DescribeConfigurationSets) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | An array of filters to apply to the results that are returned.
describeConfigurationSets_filters :: Lens.Lens' DescribeConfigurationSets (Prelude.Maybe [ConfigurationSetFilter])
describeConfigurationSets_filters :: Lens' DescribeConfigurationSets (Maybe [ConfigurationSetFilter])
describeConfigurationSets_filters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConfigurationSets' {Maybe [ConfigurationSetFilter]
filters :: Maybe [ConfigurationSetFilter]
$sel:filters:DescribeConfigurationSets' :: DescribeConfigurationSets -> Maybe [ConfigurationSetFilter]
filters} -> Maybe [ConfigurationSetFilter]
filters) (\s :: DescribeConfigurationSets
s@DescribeConfigurationSets' {} Maybe [ConfigurationSetFilter]
a -> DescribeConfigurationSets
s {$sel:filters:DescribeConfigurationSets' :: Maybe [ConfigurationSetFilter]
filters = Maybe [ConfigurationSetFilter]
a} :: DescribeConfigurationSets) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The maximum number of results to return per each request.
describeConfigurationSets_maxResults :: Lens.Lens' DescribeConfigurationSets (Prelude.Maybe Prelude.Natural)
describeConfigurationSets_maxResults :: Lens' DescribeConfigurationSets (Maybe Natural)
describeConfigurationSets_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConfigurationSets' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:DescribeConfigurationSets' :: DescribeConfigurationSets -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: DescribeConfigurationSets
s@DescribeConfigurationSets' {} Maybe Natural
a -> DescribeConfigurationSets
s {$sel:maxResults:DescribeConfigurationSets' :: Maybe Natural
maxResults = Maybe Natural
a} :: DescribeConfigurationSets)

-- | The token to be used for the next set of paginated results. You don\'t
-- need to supply a value for this field in the initial request.
describeConfigurationSets_nextToken :: Lens.Lens' DescribeConfigurationSets (Prelude.Maybe Prelude.Text)
describeConfigurationSets_nextToken :: Lens' DescribeConfigurationSets (Maybe Text)
describeConfigurationSets_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConfigurationSets' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeConfigurationSets' :: DescribeConfigurationSets -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeConfigurationSets
s@DescribeConfigurationSets' {} Maybe Text
a -> DescribeConfigurationSets
s {$sel:nextToken:DescribeConfigurationSets' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeConfigurationSets)

instance Core.AWSPager DescribeConfigurationSets where
  page :: DescribeConfigurationSets
-> AWSResponse DescribeConfigurationSets
-> Maybe DescribeConfigurationSets
page DescribeConfigurationSets
rq AWSResponse DescribeConfigurationSets
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeConfigurationSets
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeConfigurationSetsResponse (Maybe Text)
describeConfigurationSetsResponse_nextToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeConfigurationSets
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  DescribeConfigurationSetsResponse
  (Maybe [ConfigurationSetInformation])
describeConfigurationSetsResponse_configurationSets
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ DescribeConfigurationSets
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' DescribeConfigurationSets (Maybe Text)
describeConfigurationSets_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeConfigurationSets
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeConfigurationSetsResponse (Maybe Text)
describeConfigurationSetsResponse_nextToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest DescribeConfigurationSets where
  type
    AWSResponse DescribeConfigurationSets =
      DescribeConfigurationSetsResponse
  request :: (Service -> Service)
-> DescribeConfigurationSets -> Request DescribeConfigurationSets
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DescribeConfigurationSets
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeConfigurationSets)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe [ConfigurationSetInformation]
-> Maybe Text -> Int -> DescribeConfigurationSetsResponse
DescribeConfigurationSetsResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"ConfigurationSets"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NextToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable DescribeConfigurationSets where
  hashWithSalt :: Int -> DescribeConfigurationSets -> Int
hashWithSalt Int
_salt DescribeConfigurationSets' {Maybe Natural
Maybe [Text]
Maybe [ConfigurationSetFilter]
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe [ConfigurationSetFilter]
configurationSetNames :: Maybe [Text]
$sel:nextToken:DescribeConfigurationSets' :: DescribeConfigurationSets -> Maybe Text
$sel:maxResults:DescribeConfigurationSets' :: DescribeConfigurationSets -> Maybe Natural
$sel:filters:DescribeConfigurationSets' :: DescribeConfigurationSets -> Maybe [ConfigurationSetFilter]
$sel:configurationSetNames:DescribeConfigurationSets' :: DescribeConfigurationSets -> Maybe [Text]
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
configurationSetNames
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [ConfigurationSetFilter]
filters
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken

instance Prelude.NFData DescribeConfigurationSets where
  rnf :: DescribeConfigurationSets -> ()
rnf DescribeConfigurationSets' {Maybe Natural
Maybe [Text]
Maybe [ConfigurationSetFilter]
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe [ConfigurationSetFilter]
configurationSetNames :: Maybe [Text]
$sel:nextToken:DescribeConfigurationSets' :: DescribeConfigurationSets -> Maybe Text
$sel:maxResults:DescribeConfigurationSets' :: DescribeConfigurationSets -> Maybe Natural
$sel:filters:DescribeConfigurationSets' :: DescribeConfigurationSets -> Maybe [ConfigurationSetFilter]
$sel:configurationSetNames:DescribeConfigurationSets' :: DescribeConfigurationSets -> Maybe [Text]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
configurationSetNames
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [ConfigurationSetFilter]
filters
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken

instance Data.ToHeaders DescribeConfigurationSets where
  toHeaders :: DescribeConfigurationSets -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"PinpointSMSVoiceV2.DescribeConfigurationSets" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.0" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON DescribeConfigurationSets where
  toJSON :: DescribeConfigurationSets -> Value
toJSON DescribeConfigurationSets' {Maybe Natural
Maybe [Text]
Maybe [ConfigurationSetFilter]
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe [ConfigurationSetFilter]
configurationSetNames :: Maybe [Text]
$sel:nextToken:DescribeConfigurationSets' :: DescribeConfigurationSets -> Maybe Text
$sel:maxResults:DescribeConfigurationSets' :: DescribeConfigurationSets -> Maybe Natural
$sel:filters:DescribeConfigurationSets' :: DescribeConfigurationSets -> Maybe [ConfigurationSetFilter]
$sel:configurationSetNames:DescribeConfigurationSets' :: DescribeConfigurationSets -> Maybe [Text]
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"ConfigurationSetNames" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
configurationSetNames,
            (Key
"Filters" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ConfigurationSetFilter]
filters,
            (Key
"MaxResults" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
            (Key
"NextToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken
          ]
      )

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

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

-- | /See:/ 'newDescribeConfigurationSetsResponse' smart constructor.
data DescribeConfigurationSetsResponse = DescribeConfigurationSetsResponse'
  { -- | An array of ConfigurationSets objects.
    DescribeConfigurationSetsResponse
-> Maybe [ConfigurationSetInformation]
configurationSets :: Prelude.Maybe [ConfigurationSetInformation],
    -- | The token to be used for the next set of paginated results. If this
    -- field is empty then there are no more results.
    DescribeConfigurationSetsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeConfigurationSetsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeConfigurationSetsResponse
-> DescribeConfigurationSetsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeConfigurationSetsResponse
-> DescribeConfigurationSetsResponse -> Bool
$c/= :: DescribeConfigurationSetsResponse
-> DescribeConfigurationSetsResponse -> Bool
== :: DescribeConfigurationSetsResponse
-> DescribeConfigurationSetsResponse -> Bool
$c== :: DescribeConfigurationSetsResponse
-> DescribeConfigurationSetsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeConfigurationSetsResponse]
ReadPrec DescribeConfigurationSetsResponse
Int -> ReadS DescribeConfigurationSetsResponse
ReadS [DescribeConfigurationSetsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeConfigurationSetsResponse]
$creadListPrec :: ReadPrec [DescribeConfigurationSetsResponse]
readPrec :: ReadPrec DescribeConfigurationSetsResponse
$creadPrec :: ReadPrec DescribeConfigurationSetsResponse
readList :: ReadS [DescribeConfigurationSetsResponse]
$creadList :: ReadS [DescribeConfigurationSetsResponse]
readsPrec :: Int -> ReadS DescribeConfigurationSetsResponse
$creadsPrec :: Int -> ReadS DescribeConfigurationSetsResponse
Prelude.Read, Int -> DescribeConfigurationSetsResponse -> ShowS
[DescribeConfigurationSetsResponse] -> ShowS
DescribeConfigurationSetsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeConfigurationSetsResponse] -> ShowS
$cshowList :: [DescribeConfigurationSetsResponse] -> ShowS
show :: DescribeConfigurationSetsResponse -> String
$cshow :: DescribeConfigurationSetsResponse -> String
showsPrec :: Int -> DescribeConfigurationSetsResponse -> ShowS
$cshowsPrec :: Int -> DescribeConfigurationSetsResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeConfigurationSetsResponse x
-> DescribeConfigurationSetsResponse
forall x.
DescribeConfigurationSetsResponse
-> Rep DescribeConfigurationSetsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeConfigurationSetsResponse x
-> DescribeConfigurationSetsResponse
$cfrom :: forall x.
DescribeConfigurationSetsResponse
-> Rep DescribeConfigurationSetsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeConfigurationSetsResponse' 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:
--
-- 'configurationSets', 'describeConfigurationSetsResponse_configurationSets' - An array of ConfigurationSets objects.
--
-- 'nextToken', 'describeConfigurationSetsResponse_nextToken' - The token to be used for the next set of paginated results. If this
-- field is empty then there are no more results.
--
-- 'httpStatus', 'describeConfigurationSetsResponse_httpStatus' - The response's http status code.
newDescribeConfigurationSetsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeConfigurationSetsResponse
newDescribeConfigurationSetsResponse :: Int -> DescribeConfigurationSetsResponse
newDescribeConfigurationSetsResponse Int
pHttpStatus_ =
  DescribeConfigurationSetsResponse'
    { $sel:configurationSets:DescribeConfigurationSetsResponse' :: Maybe [ConfigurationSetInformation]
configurationSets =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeConfigurationSetsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeConfigurationSetsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An array of ConfigurationSets objects.
describeConfigurationSetsResponse_configurationSets :: Lens.Lens' DescribeConfigurationSetsResponse (Prelude.Maybe [ConfigurationSetInformation])
describeConfigurationSetsResponse_configurationSets :: Lens'
  DescribeConfigurationSetsResponse
  (Maybe [ConfigurationSetInformation])
describeConfigurationSetsResponse_configurationSets = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConfigurationSetsResponse' {Maybe [ConfigurationSetInformation]
configurationSets :: Maybe [ConfigurationSetInformation]
$sel:configurationSets:DescribeConfigurationSetsResponse' :: DescribeConfigurationSetsResponse
-> Maybe [ConfigurationSetInformation]
configurationSets} -> Maybe [ConfigurationSetInformation]
configurationSets) (\s :: DescribeConfigurationSetsResponse
s@DescribeConfigurationSetsResponse' {} Maybe [ConfigurationSetInformation]
a -> DescribeConfigurationSetsResponse
s {$sel:configurationSets:DescribeConfigurationSetsResponse' :: Maybe [ConfigurationSetInformation]
configurationSets = Maybe [ConfigurationSetInformation]
a} :: DescribeConfigurationSetsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The token to be used for the next set of paginated results. If this
-- field is empty then there are no more results.
describeConfigurationSetsResponse_nextToken :: Lens.Lens' DescribeConfigurationSetsResponse (Prelude.Maybe Prelude.Text)
describeConfigurationSetsResponse_nextToken :: Lens' DescribeConfigurationSetsResponse (Maybe Text)
describeConfigurationSetsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConfigurationSetsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeConfigurationSetsResponse' :: DescribeConfigurationSetsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeConfigurationSetsResponse
s@DescribeConfigurationSetsResponse' {} Maybe Text
a -> DescribeConfigurationSetsResponse
s {$sel:nextToken:DescribeConfigurationSetsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeConfigurationSetsResponse)

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

instance
  Prelude.NFData
    DescribeConfigurationSetsResponse
  where
  rnf :: DescribeConfigurationSetsResponse -> ()
rnf DescribeConfigurationSetsResponse' {Int
Maybe [ConfigurationSetInformation]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
configurationSets :: Maybe [ConfigurationSetInformation]
$sel:httpStatus:DescribeConfigurationSetsResponse' :: DescribeConfigurationSetsResponse -> Int
$sel:nextToken:DescribeConfigurationSetsResponse' :: DescribeConfigurationSetsResponse -> Maybe Text
$sel:configurationSets:DescribeConfigurationSetsResponse' :: DescribeConfigurationSetsResponse
-> Maybe [ConfigurationSetInformation]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [ConfigurationSetInformation]
configurationSets
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus