{-# 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.DescribeAggregationAuthorizations
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns a list of authorizations granted to various aggregator accounts
-- and regions.
--
-- This operation returns paginated results.
module Amazonka.Config.DescribeAggregationAuthorizations
  ( -- * Creating a Request
    DescribeAggregationAuthorizations (..),
    newDescribeAggregationAuthorizations,

    -- * Request Lenses
    describeAggregationAuthorizations_limit,
    describeAggregationAuthorizations_nextToken,

    -- * Destructuring the Response
    DescribeAggregationAuthorizationsResponse (..),
    newDescribeAggregationAuthorizationsResponse,

    -- * Response Lenses
    describeAggregationAuthorizationsResponse_aggregationAuthorizations,
    describeAggregationAuthorizationsResponse_nextToken,
    describeAggregationAuthorizationsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newDescribeAggregationAuthorizations' smart constructor.
data DescribeAggregationAuthorizations = DescribeAggregationAuthorizations'
  { -- | The maximum number of AggregationAuthorizations returned on each page.
    -- The default is maximum. If you specify 0, Config uses the default.
    DescribeAggregationAuthorizations -> Maybe Natural
limit :: Prelude.Maybe Prelude.Natural,
    -- | The @nextToken@ string returned on a previous page that you use to get
    -- the next page of results in a paginated response.
    DescribeAggregationAuthorizations -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
  }
  deriving (DescribeAggregationAuthorizations
-> DescribeAggregationAuthorizations -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeAggregationAuthorizations
-> DescribeAggregationAuthorizations -> Bool
$c/= :: DescribeAggregationAuthorizations
-> DescribeAggregationAuthorizations -> Bool
== :: DescribeAggregationAuthorizations
-> DescribeAggregationAuthorizations -> Bool
$c== :: DescribeAggregationAuthorizations
-> DescribeAggregationAuthorizations -> Bool
Prelude.Eq, ReadPrec [DescribeAggregationAuthorizations]
ReadPrec DescribeAggregationAuthorizations
Int -> ReadS DescribeAggregationAuthorizations
ReadS [DescribeAggregationAuthorizations]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeAggregationAuthorizations]
$creadListPrec :: ReadPrec [DescribeAggregationAuthorizations]
readPrec :: ReadPrec DescribeAggregationAuthorizations
$creadPrec :: ReadPrec DescribeAggregationAuthorizations
readList :: ReadS [DescribeAggregationAuthorizations]
$creadList :: ReadS [DescribeAggregationAuthorizations]
readsPrec :: Int -> ReadS DescribeAggregationAuthorizations
$creadsPrec :: Int -> ReadS DescribeAggregationAuthorizations
Prelude.Read, Int -> DescribeAggregationAuthorizations -> ShowS
[DescribeAggregationAuthorizations] -> ShowS
DescribeAggregationAuthorizations -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeAggregationAuthorizations] -> ShowS
$cshowList :: [DescribeAggregationAuthorizations] -> ShowS
show :: DescribeAggregationAuthorizations -> String
$cshow :: DescribeAggregationAuthorizations -> String
showsPrec :: Int -> DescribeAggregationAuthorizations -> ShowS
$cshowsPrec :: Int -> DescribeAggregationAuthorizations -> ShowS
Prelude.Show, forall x.
Rep DescribeAggregationAuthorizations x
-> DescribeAggregationAuthorizations
forall x.
DescribeAggregationAuthorizations
-> Rep DescribeAggregationAuthorizations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeAggregationAuthorizations x
-> DescribeAggregationAuthorizations
$cfrom :: forall x.
DescribeAggregationAuthorizations
-> Rep DescribeAggregationAuthorizations x
Prelude.Generic)

-- |
-- Create a value of 'DescribeAggregationAuthorizations' 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:
--
-- 'limit', 'describeAggregationAuthorizations_limit' - The maximum number of AggregationAuthorizations returned on each page.
-- The default is maximum. If you specify 0, Config uses the default.
--
-- 'nextToken', 'describeAggregationAuthorizations_nextToken' - The @nextToken@ string returned on a previous page that you use to get
-- the next page of results in a paginated response.
newDescribeAggregationAuthorizations ::
  DescribeAggregationAuthorizations
newDescribeAggregationAuthorizations :: DescribeAggregationAuthorizations
newDescribeAggregationAuthorizations =
  DescribeAggregationAuthorizations'
    { $sel:limit:DescribeAggregationAuthorizations' :: Maybe Natural
limit =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeAggregationAuthorizations' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing
    }

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

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

instance
  Core.AWSPager
    DescribeAggregationAuthorizations
  where
  page :: DescribeAggregationAuthorizations
-> AWSResponse DescribeAggregationAuthorizations
-> Maybe DescribeAggregationAuthorizations
page DescribeAggregationAuthorizations
rq AWSResponse DescribeAggregationAuthorizations
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeAggregationAuthorizations
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeAggregationAuthorizationsResponse (Maybe Text)
describeAggregationAuthorizationsResponse_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 DescribeAggregationAuthorizations
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  DescribeAggregationAuthorizationsResponse
  (Maybe [AggregationAuthorization])
describeAggregationAuthorizationsResponse_aggregationAuthorizations
            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.$ DescribeAggregationAuthorizations
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' DescribeAggregationAuthorizations (Maybe Text)
describeAggregationAuthorizations_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeAggregationAuthorizations
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeAggregationAuthorizationsResponse (Maybe Text)
describeAggregationAuthorizationsResponse_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
    DescribeAggregationAuthorizations
  where
  type
    AWSResponse DescribeAggregationAuthorizations =
      DescribeAggregationAuthorizationsResponse
  request :: (Service -> Service)
-> DescribeAggregationAuthorizations
-> Request DescribeAggregationAuthorizations
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 DescribeAggregationAuthorizations
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse DescribeAggregationAuthorizations)))
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 [AggregationAuthorization]
-> Maybe Text -> Int -> DescribeAggregationAuthorizationsResponse
DescribeAggregationAuthorizationsResponse'
            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
"AggregationAuthorizations"
                            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
    DescribeAggregationAuthorizations
  where
  hashWithSalt :: Int -> DescribeAggregationAuthorizations -> Int
hashWithSalt
    Int
_salt
    DescribeAggregationAuthorizations' {Maybe Natural
Maybe Text
nextToken :: Maybe Text
limit :: Maybe Natural
$sel:nextToken:DescribeAggregationAuthorizations' :: DescribeAggregationAuthorizations -> Maybe Text
$sel:limit:DescribeAggregationAuthorizations' :: DescribeAggregationAuthorizations -> Maybe Natural
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
limit
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken

instance
  Prelude.NFData
    DescribeAggregationAuthorizations
  where
  rnf :: DescribeAggregationAuthorizations -> ()
rnf DescribeAggregationAuthorizations' {Maybe Natural
Maybe Text
nextToken :: Maybe Text
limit :: Maybe Natural
$sel:nextToken:DescribeAggregationAuthorizations' :: DescribeAggregationAuthorizations -> Maybe Text
$sel:limit:DescribeAggregationAuthorizations' :: DescribeAggregationAuthorizations -> Maybe Natural
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
limit
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken

instance
  Data.ToHeaders
    DescribeAggregationAuthorizations
  where
  toHeaders :: DescribeAggregationAuthorizations -> 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
"StarlingDoveService.DescribeAggregationAuthorizations" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance
  Data.ToJSON
    DescribeAggregationAuthorizations
  where
  toJSON :: DescribeAggregationAuthorizations -> Value
toJSON DescribeAggregationAuthorizations' {Maybe Natural
Maybe Text
nextToken :: Maybe Text
limit :: Maybe Natural
$sel:nextToken:DescribeAggregationAuthorizations' :: DescribeAggregationAuthorizations -> Maybe Text
$sel:limit:DescribeAggregationAuthorizations' :: DescribeAggregationAuthorizations -> Maybe Natural
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"Limit" 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
limit,
            (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
    DescribeAggregationAuthorizations
  where
  toPath :: DescribeAggregationAuthorizations -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newDescribeAggregationAuthorizationsResponse' smart constructor.
data DescribeAggregationAuthorizationsResponse = DescribeAggregationAuthorizationsResponse'
  { -- | Returns a list of authorizations granted to various aggregator accounts
    -- and regions.
    DescribeAggregationAuthorizationsResponse
-> Maybe [AggregationAuthorization]
aggregationAuthorizations :: Prelude.Maybe [AggregationAuthorization],
    -- | The @nextToken@ string returned on a previous page that you use to get
    -- the next page of results in a paginated response.
    DescribeAggregationAuthorizationsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeAggregationAuthorizationsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeAggregationAuthorizationsResponse
-> DescribeAggregationAuthorizationsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeAggregationAuthorizationsResponse
-> DescribeAggregationAuthorizationsResponse -> Bool
$c/= :: DescribeAggregationAuthorizationsResponse
-> DescribeAggregationAuthorizationsResponse -> Bool
== :: DescribeAggregationAuthorizationsResponse
-> DescribeAggregationAuthorizationsResponse -> Bool
$c== :: DescribeAggregationAuthorizationsResponse
-> DescribeAggregationAuthorizationsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeAggregationAuthorizationsResponse]
ReadPrec DescribeAggregationAuthorizationsResponse
Int -> ReadS DescribeAggregationAuthorizationsResponse
ReadS [DescribeAggregationAuthorizationsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeAggregationAuthorizationsResponse]
$creadListPrec :: ReadPrec [DescribeAggregationAuthorizationsResponse]
readPrec :: ReadPrec DescribeAggregationAuthorizationsResponse
$creadPrec :: ReadPrec DescribeAggregationAuthorizationsResponse
readList :: ReadS [DescribeAggregationAuthorizationsResponse]
$creadList :: ReadS [DescribeAggregationAuthorizationsResponse]
readsPrec :: Int -> ReadS DescribeAggregationAuthorizationsResponse
$creadsPrec :: Int -> ReadS DescribeAggregationAuthorizationsResponse
Prelude.Read, Int -> DescribeAggregationAuthorizationsResponse -> ShowS
[DescribeAggregationAuthorizationsResponse] -> ShowS
DescribeAggregationAuthorizationsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeAggregationAuthorizationsResponse] -> ShowS
$cshowList :: [DescribeAggregationAuthorizationsResponse] -> ShowS
show :: DescribeAggregationAuthorizationsResponse -> String
$cshow :: DescribeAggregationAuthorizationsResponse -> String
showsPrec :: Int -> DescribeAggregationAuthorizationsResponse -> ShowS
$cshowsPrec :: Int -> DescribeAggregationAuthorizationsResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeAggregationAuthorizationsResponse x
-> DescribeAggregationAuthorizationsResponse
forall x.
DescribeAggregationAuthorizationsResponse
-> Rep DescribeAggregationAuthorizationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeAggregationAuthorizationsResponse x
-> DescribeAggregationAuthorizationsResponse
$cfrom :: forall x.
DescribeAggregationAuthorizationsResponse
-> Rep DescribeAggregationAuthorizationsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeAggregationAuthorizationsResponse' 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:
--
-- 'aggregationAuthorizations', 'describeAggregationAuthorizationsResponse_aggregationAuthorizations' - Returns a list of authorizations granted to various aggregator accounts
-- and regions.
--
-- 'nextToken', 'describeAggregationAuthorizationsResponse_nextToken' - The @nextToken@ string returned on a previous page that you use to get
-- the next page of results in a paginated response.
--
-- 'httpStatus', 'describeAggregationAuthorizationsResponse_httpStatus' - The response's http status code.
newDescribeAggregationAuthorizationsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeAggregationAuthorizationsResponse
newDescribeAggregationAuthorizationsResponse :: Int -> DescribeAggregationAuthorizationsResponse
newDescribeAggregationAuthorizationsResponse
  Int
pHttpStatus_ =
    DescribeAggregationAuthorizationsResponse'
      { $sel:aggregationAuthorizations:DescribeAggregationAuthorizationsResponse' :: Maybe [AggregationAuthorization]
aggregationAuthorizations =
          forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:DescribeAggregationAuthorizationsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribeAggregationAuthorizationsResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | Returns a list of authorizations granted to various aggregator accounts
-- and regions.
describeAggregationAuthorizationsResponse_aggregationAuthorizations :: Lens.Lens' DescribeAggregationAuthorizationsResponse (Prelude.Maybe [AggregationAuthorization])
describeAggregationAuthorizationsResponse_aggregationAuthorizations :: Lens'
  DescribeAggregationAuthorizationsResponse
  (Maybe [AggregationAuthorization])
describeAggregationAuthorizationsResponse_aggregationAuthorizations = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAggregationAuthorizationsResponse' {Maybe [AggregationAuthorization]
aggregationAuthorizations :: Maybe [AggregationAuthorization]
$sel:aggregationAuthorizations:DescribeAggregationAuthorizationsResponse' :: DescribeAggregationAuthorizationsResponse
-> Maybe [AggregationAuthorization]
aggregationAuthorizations} -> Maybe [AggregationAuthorization]
aggregationAuthorizations) (\s :: DescribeAggregationAuthorizationsResponse
s@DescribeAggregationAuthorizationsResponse' {} Maybe [AggregationAuthorization]
a -> DescribeAggregationAuthorizationsResponse
s {$sel:aggregationAuthorizations:DescribeAggregationAuthorizationsResponse' :: Maybe [AggregationAuthorization]
aggregationAuthorizations = Maybe [AggregationAuthorization]
a} :: DescribeAggregationAuthorizationsResponse) 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 @nextToken@ string returned on a previous page that you use to get
-- the next page of results in a paginated response.
describeAggregationAuthorizationsResponse_nextToken :: Lens.Lens' DescribeAggregationAuthorizationsResponse (Prelude.Maybe Prelude.Text)
describeAggregationAuthorizationsResponse_nextToken :: Lens' DescribeAggregationAuthorizationsResponse (Maybe Text)
describeAggregationAuthorizationsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAggregationAuthorizationsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeAggregationAuthorizationsResponse' :: DescribeAggregationAuthorizationsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeAggregationAuthorizationsResponse
s@DescribeAggregationAuthorizationsResponse' {} Maybe Text
a -> DescribeAggregationAuthorizationsResponse
s {$sel:nextToken:DescribeAggregationAuthorizationsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeAggregationAuthorizationsResponse)

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

instance
  Prelude.NFData
    DescribeAggregationAuthorizationsResponse
  where
  rnf :: DescribeAggregationAuthorizationsResponse -> ()
rnf DescribeAggregationAuthorizationsResponse' {Int
Maybe [AggregationAuthorization]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
aggregationAuthorizations :: Maybe [AggregationAuthorization]
$sel:httpStatus:DescribeAggregationAuthorizationsResponse' :: DescribeAggregationAuthorizationsResponse -> Int
$sel:nextToken:DescribeAggregationAuthorizationsResponse' :: DescribeAggregationAuthorizationsResponse -> Maybe Text
$sel:aggregationAuthorizations:DescribeAggregationAuthorizationsResponse' :: DescribeAggregationAuthorizationsResponse
-> Maybe [AggregationAuthorization]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [AggregationAuthorization]
aggregationAuthorizations
      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