{-# 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.AppStream.DescribeUsageReportSubscriptions
-- 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)
--
-- Retrieves a list that describes one or more usage report subscriptions.
module Amazonka.AppStream.DescribeUsageReportSubscriptions
  ( -- * Creating a Request
    DescribeUsageReportSubscriptions (..),
    newDescribeUsageReportSubscriptions,

    -- * Request Lenses
    describeUsageReportSubscriptions_nextToken,
    describeUsageReportSubscriptions_maxResults,

    -- * Destructuring the Response
    DescribeUsageReportSubscriptionsResponse (..),
    newDescribeUsageReportSubscriptionsResponse,

    -- * Response Lenses
    describeUsageReportSubscriptionsResponse_usageReportSubscriptions,
    describeUsageReportSubscriptionsResponse_nextToken,
    describeUsageReportSubscriptionsResponse_httpStatus,
  )
where

import Amazonka.AppStream.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:/ 'newDescribeUsageReportSubscriptions' smart constructor.
data DescribeUsageReportSubscriptions = DescribeUsageReportSubscriptions'
  { -- | The pagination token to use to retrieve the next page of results for
    -- this operation. If this value is null, it retrieves the first page.
    DescribeUsageReportSubscriptions -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum size of each page of results.
    DescribeUsageReportSubscriptions -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int
  }
  deriving (DescribeUsageReportSubscriptions
-> DescribeUsageReportSubscriptions -> Bool
(DescribeUsageReportSubscriptions
 -> DescribeUsageReportSubscriptions -> Bool)
-> (DescribeUsageReportSubscriptions
    -> DescribeUsageReportSubscriptions -> Bool)
-> Eq DescribeUsageReportSubscriptions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeUsageReportSubscriptions
-> DescribeUsageReportSubscriptions -> Bool
$c/= :: DescribeUsageReportSubscriptions
-> DescribeUsageReportSubscriptions -> Bool
== :: DescribeUsageReportSubscriptions
-> DescribeUsageReportSubscriptions -> Bool
$c== :: DescribeUsageReportSubscriptions
-> DescribeUsageReportSubscriptions -> Bool
Prelude.Eq, ReadPrec [DescribeUsageReportSubscriptions]
ReadPrec DescribeUsageReportSubscriptions
Int -> ReadS DescribeUsageReportSubscriptions
ReadS [DescribeUsageReportSubscriptions]
(Int -> ReadS DescribeUsageReportSubscriptions)
-> ReadS [DescribeUsageReportSubscriptions]
-> ReadPrec DescribeUsageReportSubscriptions
-> ReadPrec [DescribeUsageReportSubscriptions]
-> Read DescribeUsageReportSubscriptions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeUsageReportSubscriptions]
$creadListPrec :: ReadPrec [DescribeUsageReportSubscriptions]
readPrec :: ReadPrec DescribeUsageReportSubscriptions
$creadPrec :: ReadPrec DescribeUsageReportSubscriptions
readList :: ReadS [DescribeUsageReportSubscriptions]
$creadList :: ReadS [DescribeUsageReportSubscriptions]
readsPrec :: Int -> ReadS DescribeUsageReportSubscriptions
$creadsPrec :: Int -> ReadS DescribeUsageReportSubscriptions
Prelude.Read, Int -> DescribeUsageReportSubscriptions -> ShowS
[DescribeUsageReportSubscriptions] -> ShowS
DescribeUsageReportSubscriptions -> String
(Int -> DescribeUsageReportSubscriptions -> ShowS)
-> (DescribeUsageReportSubscriptions -> String)
-> ([DescribeUsageReportSubscriptions] -> ShowS)
-> Show DescribeUsageReportSubscriptions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeUsageReportSubscriptions] -> ShowS
$cshowList :: [DescribeUsageReportSubscriptions] -> ShowS
show :: DescribeUsageReportSubscriptions -> String
$cshow :: DescribeUsageReportSubscriptions -> String
showsPrec :: Int -> DescribeUsageReportSubscriptions -> ShowS
$cshowsPrec :: Int -> DescribeUsageReportSubscriptions -> ShowS
Prelude.Show, (forall x.
 DescribeUsageReportSubscriptions
 -> Rep DescribeUsageReportSubscriptions x)
-> (forall x.
    Rep DescribeUsageReportSubscriptions x
    -> DescribeUsageReportSubscriptions)
-> Generic DescribeUsageReportSubscriptions
forall x.
Rep DescribeUsageReportSubscriptions x
-> DescribeUsageReportSubscriptions
forall x.
DescribeUsageReportSubscriptions
-> Rep DescribeUsageReportSubscriptions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeUsageReportSubscriptions x
-> DescribeUsageReportSubscriptions
$cfrom :: forall x.
DescribeUsageReportSubscriptions
-> Rep DescribeUsageReportSubscriptions x
Prelude.Generic)

-- |
-- Create a value of 'DescribeUsageReportSubscriptions' 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:
--
-- 'nextToken', 'describeUsageReportSubscriptions_nextToken' - The pagination token to use to retrieve the next page of results for
-- this operation. If this value is null, it retrieves the first page.
--
-- 'maxResults', 'describeUsageReportSubscriptions_maxResults' - The maximum size of each page of results.
newDescribeUsageReportSubscriptions ::
  DescribeUsageReportSubscriptions
newDescribeUsageReportSubscriptions :: DescribeUsageReportSubscriptions
newDescribeUsageReportSubscriptions =
  DescribeUsageReportSubscriptions' :: Maybe Text -> Maybe Int -> DescribeUsageReportSubscriptions
DescribeUsageReportSubscriptions'
    { $sel:nextToken:DescribeUsageReportSubscriptions' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:DescribeUsageReportSubscriptions' :: Maybe Int
maxResults = Maybe Int
forall a. Maybe a
Prelude.Nothing
    }

-- | The pagination token to use to retrieve the next page of results for
-- this operation. If this value is null, it retrieves the first page.
describeUsageReportSubscriptions_nextToken :: Lens.Lens' DescribeUsageReportSubscriptions (Prelude.Maybe Prelude.Text)
describeUsageReportSubscriptions_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeUsageReportSubscriptions
-> f DescribeUsageReportSubscriptions
describeUsageReportSubscriptions_nextToken = (DescribeUsageReportSubscriptions -> Maybe Text)
-> (DescribeUsageReportSubscriptions
    -> Maybe Text -> DescribeUsageReportSubscriptions)
-> Lens
     DescribeUsageReportSubscriptions
     DescribeUsageReportSubscriptions
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeUsageReportSubscriptions' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeUsageReportSubscriptions' :: DescribeUsageReportSubscriptions -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeUsageReportSubscriptions
s@DescribeUsageReportSubscriptions' {} Maybe Text
a -> DescribeUsageReportSubscriptions
s {$sel:nextToken:DescribeUsageReportSubscriptions' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeUsageReportSubscriptions)

-- | The maximum size of each page of results.
describeUsageReportSubscriptions_maxResults :: Lens.Lens' DescribeUsageReportSubscriptions (Prelude.Maybe Prelude.Int)
describeUsageReportSubscriptions_maxResults :: (Maybe Int -> f (Maybe Int))
-> DescribeUsageReportSubscriptions
-> f DescribeUsageReportSubscriptions
describeUsageReportSubscriptions_maxResults = (DescribeUsageReportSubscriptions -> Maybe Int)
-> (DescribeUsageReportSubscriptions
    -> Maybe Int -> DescribeUsageReportSubscriptions)
-> Lens
     DescribeUsageReportSubscriptions
     DescribeUsageReportSubscriptions
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeUsageReportSubscriptions' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:DescribeUsageReportSubscriptions' :: DescribeUsageReportSubscriptions -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: DescribeUsageReportSubscriptions
s@DescribeUsageReportSubscriptions' {} Maybe Int
a -> DescribeUsageReportSubscriptions
s {$sel:maxResults:DescribeUsageReportSubscriptions' :: Maybe Int
maxResults = Maybe Int
a} :: DescribeUsageReportSubscriptions)

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

instance
  Prelude.NFData
    DescribeUsageReportSubscriptions

instance
  Core.ToHeaders
    DescribeUsageReportSubscriptions
  where
  toHeaders :: DescribeUsageReportSubscriptions -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> DescribeUsageReportSubscriptions -> 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
"PhotonAdminProxyService.DescribeUsageReportSubscriptions" ::
                          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 DescribeUsageReportSubscriptions where
  toJSON :: DescribeUsageReportSubscriptions -> Value
toJSON DescribeUsageReportSubscriptions' {Maybe Int
Maybe Text
maxResults :: Maybe Int
nextToken :: Maybe Text
$sel:maxResults:DescribeUsageReportSubscriptions' :: DescribeUsageReportSubscriptions -> Maybe Int
$sel:nextToken:DescribeUsageReportSubscriptions' :: DescribeUsageReportSubscriptions -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"NextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Text
"MaxResults" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maxResults
          ]
      )

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

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

-- | /See:/ 'newDescribeUsageReportSubscriptionsResponse' smart constructor.
data DescribeUsageReportSubscriptionsResponse = DescribeUsageReportSubscriptionsResponse'
  { -- | Information about the usage report subscription.
    DescribeUsageReportSubscriptionsResponse
-> Maybe [UsageReportSubscription]
usageReportSubscriptions :: Prelude.Maybe [UsageReportSubscription],
    -- | The pagination token to use to retrieve the next page of results for
    -- this operation. If there are no more pages, this value is null.
    DescribeUsageReportSubscriptionsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeUsageReportSubscriptionsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeUsageReportSubscriptionsResponse
-> DescribeUsageReportSubscriptionsResponse -> Bool
(DescribeUsageReportSubscriptionsResponse
 -> DescribeUsageReportSubscriptionsResponse -> Bool)
-> (DescribeUsageReportSubscriptionsResponse
    -> DescribeUsageReportSubscriptionsResponse -> Bool)
-> Eq DescribeUsageReportSubscriptionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeUsageReportSubscriptionsResponse
-> DescribeUsageReportSubscriptionsResponse -> Bool
$c/= :: DescribeUsageReportSubscriptionsResponse
-> DescribeUsageReportSubscriptionsResponse -> Bool
== :: DescribeUsageReportSubscriptionsResponse
-> DescribeUsageReportSubscriptionsResponse -> Bool
$c== :: DescribeUsageReportSubscriptionsResponse
-> DescribeUsageReportSubscriptionsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeUsageReportSubscriptionsResponse]
ReadPrec DescribeUsageReportSubscriptionsResponse
Int -> ReadS DescribeUsageReportSubscriptionsResponse
ReadS [DescribeUsageReportSubscriptionsResponse]
(Int -> ReadS DescribeUsageReportSubscriptionsResponse)
-> ReadS [DescribeUsageReportSubscriptionsResponse]
-> ReadPrec DescribeUsageReportSubscriptionsResponse
-> ReadPrec [DescribeUsageReportSubscriptionsResponse]
-> Read DescribeUsageReportSubscriptionsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeUsageReportSubscriptionsResponse]
$creadListPrec :: ReadPrec [DescribeUsageReportSubscriptionsResponse]
readPrec :: ReadPrec DescribeUsageReportSubscriptionsResponse
$creadPrec :: ReadPrec DescribeUsageReportSubscriptionsResponse
readList :: ReadS [DescribeUsageReportSubscriptionsResponse]
$creadList :: ReadS [DescribeUsageReportSubscriptionsResponse]
readsPrec :: Int -> ReadS DescribeUsageReportSubscriptionsResponse
$creadsPrec :: Int -> ReadS DescribeUsageReportSubscriptionsResponse
Prelude.Read, Int -> DescribeUsageReportSubscriptionsResponse -> ShowS
[DescribeUsageReportSubscriptionsResponse] -> ShowS
DescribeUsageReportSubscriptionsResponse -> String
(Int -> DescribeUsageReportSubscriptionsResponse -> ShowS)
-> (DescribeUsageReportSubscriptionsResponse -> String)
-> ([DescribeUsageReportSubscriptionsResponse] -> ShowS)
-> Show DescribeUsageReportSubscriptionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeUsageReportSubscriptionsResponse] -> ShowS
$cshowList :: [DescribeUsageReportSubscriptionsResponse] -> ShowS
show :: DescribeUsageReportSubscriptionsResponse -> String
$cshow :: DescribeUsageReportSubscriptionsResponse -> String
showsPrec :: Int -> DescribeUsageReportSubscriptionsResponse -> ShowS
$cshowsPrec :: Int -> DescribeUsageReportSubscriptionsResponse -> ShowS
Prelude.Show, (forall x.
 DescribeUsageReportSubscriptionsResponse
 -> Rep DescribeUsageReportSubscriptionsResponse x)
-> (forall x.
    Rep DescribeUsageReportSubscriptionsResponse x
    -> DescribeUsageReportSubscriptionsResponse)
-> Generic DescribeUsageReportSubscriptionsResponse
forall x.
Rep DescribeUsageReportSubscriptionsResponse x
-> DescribeUsageReportSubscriptionsResponse
forall x.
DescribeUsageReportSubscriptionsResponse
-> Rep DescribeUsageReportSubscriptionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeUsageReportSubscriptionsResponse x
-> DescribeUsageReportSubscriptionsResponse
$cfrom :: forall x.
DescribeUsageReportSubscriptionsResponse
-> Rep DescribeUsageReportSubscriptionsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeUsageReportSubscriptionsResponse' 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:
--
-- 'usageReportSubscriptions', 'describeUsageReportSubscriptionsResponse_usageReportSubscriptions' - Information about the usage report subscription.
--
-- 'nextToken', 'describeUsageReportSubscriptionsResponse_nextToken' - The pagination token to use to retrieve the next page of results for
-- this operation. If there are no more pages, this value is null.
--
-- 'httpStatus', 'describeUsageReportSubscriptionsResponse_httpStatus' - The response's http status code.
newDescribeUsageReportSubscriptionsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeUsageReportSubscriptionsResponse
newDescribeUsageReportSubscriptionsResponse :: Int -> DescribeUsageReportSubscriptionsResponse
newDescribeUsageReportSubscriptionsResponse
  Int
pHttpStatus_ =
    DescribeUsageReportSubscriptionsResponse' :: Maybe [UsageReportSubscription]
-> Maybe Text -> Int -> DescribeUsageReportSubscriptionsResponse
DescribeUsageReportSubscriptionsResponse'
      { $sel:usageReportSubscriptions:DescribeUsageReportSubscriptionsResponse' :: Maybe [UsageReportSubscription]
usageReportSubscriptions =
          Maybe [UsageReportSubscription]
forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:DescribeUsageReportSubscriptionsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribeUsageReportSubscriptionsResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | Information about the usage report subscription.
describeUsageReportSubscriptionsResponse_usageReportSubscriptions :: Lens.Lens' DescribeUsageReportSubscriptionsResponse (Prelude.Maybe [UsageReportSubscription])
describeUsageReportSubscriptionsResponse_usageReportSubscriptions :: (Maybe [UsageReportSubscription]
 -> f (Maybe [UsageReportSubscription]))
-> DescribeUsageReportSubscriptionsResponse
-> f DescribeUsageReportSubscriptionsResponse
describeUsageReportSubscriptionsResponse_usageReportSubscriptions = (DescribeUsageReportSubscriptionsResponse
 -> Maybe [UsageReportSubscription])
-> (DescribeUsageReportSubscriptionsResponse
    -> Maybe [UsageReportSubscription]
    -> DescribeUsageReportSubscriptionsResponse)
-> Lens
     DescribeUsageReportSubscriptionsResponse
     DescribeUsageReportSubscriptionsResponse
     (Maybe [UsageReportSubscription])
     (Maybe [UsageReportSubscription])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeUsageReportSubscriptionsResponse' {Maybe [UsageReportSubscription]
usageReportSubscriptions :: Maybe [UsageReportSubscription]
$sel:usageReportSubscriptions:DescribeUsageReportSubscriptionsResponse' :: DescribeUsageReportSubscriptionsResponse
-> Maybe [UsageReportSubscription]
usageReportSubscriptions} -> Maybe [UsageReportSubscription]
usageReportSubscriptions) (\s :: DescribeUsageReportSubscriptionsResponse
s@DescribeUsageReportSubscriptionsResponse' {} Maybe [UsageReportSubscription]
a -> DescribeUsageReportSubscriptionsResponse
s {$sel:usageReportSubscriptions:DescribeUsageReportSubscriptionsResponse' :: Maybe [UsageReportSubscription]
usageReportSubscriptions = Maybe [UsageReportSubscription]
a} :: DescribeUsageReportSubscriptionsResponse) ((Maybe [UsageReportSubscription]
  -> f (Maybe [UsageReportSubscription]))
 -> DescribeUsageReportSubscriptionsResponse
 -> f DescribeUsageReportSubscriptionsResponse)
-> ((Maybe [UsageReportSubscription]
     -> f (Maybe [UsageReportSubscription]))
    -> Maybe [UsageReportSubscription]
    -> f (Maybe [UsageReportSubscription]))
-> (Maybe [UsageReportSubscription]
    -> f (Maybe [UsageReportSubscription]))
-> DescribeUsageReportSubscriptionsResponse
-> f DescribeUsageReportSubscriptionsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [UsageReportSubscription]
  [UsageReportSubscription]
  [UsageReportSubscription]
  [UsageReportSubscription]
-> Iso
     (Maybe [UsageReportSubscription])
     (Maybe [UsageReportSubscription])
     (Maybe [UsageReportSubscription])
     (Maybe [UsageReportSubscription])
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
  [UsageReportSubscription]
  [UsageReportSubscription]
  [UsageReportSubscription]
  [UsageReportSubscription]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The pagination token to use to retrieve the next page of results for
-- this operation. If there are no more pages, this value is null.
describeUsageReportSubscriptionsResponse_nextToken :: Lens.Lens' DescribeUsageReportSubscriptionsResponse (Prelude.Maybe Prelude.Text)
describeUsageReportSubscriptionsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeUsageReportSubscriptionsResponse
-> f DescribeUsageReportSubscriptionsResponse
describeUsageReportSubscriptionsResponse_nextToken = (DescribeUsageReportSubscriptionsResponse -> Maybe Text)
-> (DescribeUsageReportSubscriptionsResponse
    -> Maybe Text -> DescribeUsageReportSubscriptionsResponse)
-> Lens
     DescribeUsageReportSubscriptionsResponse
     DescribeUsageReportSubscriptionsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeUsageReportSubscriptionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeUsageReportSubscriptionsResponse' :: DescribeUsageReportSubscriptionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeUsageReportSubscriptionsResponse
s@DescribeUsageReportSubscriptionsResponse' {} Maybe Text
a -> DescribeUsageReportSubscriptionsResponse
s {$sel:nextToken:DescribeUsageReportSubscriptionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeUsageReportSubscriptionsResponse)

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

instance
  Prelude.NFData
    DescribeUsageReportSubscriptionsResponse