{-# 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.ServiceCatalog.ListBudgetsForResource
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists all the budgets associated to the specified resource.
module Amazonka.ServiceCatalog.ListBudgetsForResource
  ( -- * Creating a Request
    ListBudgetsForResource (..),
    newListBudgetsForResource,

    -- * Request Lenses
    listBudgetsForResource_acceptLanguage,
    listBudgetsForResource_pageSize,
    listBudgetsForResource_pageToken,
    listBudgetsForResource_resourceId,

    -- * Destructuring the Response
    ListBudgetsForResourceResponse (..),
    newListBudgetsForResourceResponse,

    -- * Response Lenses
    listBudgetsForResourceResponse_budgets,
    listBudgetsForResourceResponse_nextPageToken,
    listBudgetsForResourceResponse_httpStatus,
  )
where

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
import Amazonka.ServiceCatalog.Types

-- | /See:/ 'newListBudgetsForResource' smart constructor.
data ListBudgetsForResource = ListBudgetsForResource'
  { -- | The language code.
    --
    -- -   @en@ - English (default)
    --
    -- -   @jp@ - Japanese
    --
    -- -   @zh@ - Chinese
    ListBudgetsForResource -> Maybe Text
acceptLanguage :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of items to return with this call.
    ListBudgetsForResource -> Maybe Natural
pageSize :: Prelude.Maybe Prelude.Natural,
    -- | The page token for the next set of results. To retrieve the first set of
    -- results, use null.
    ListBudgetsForResource -> Maybe Text
pageToken :: Prelude.Maybe Prelude.Text,
    -- | The resource identifier.
    ListBudgetsForResource -> Text
resourceId :: Prelude.Text
  }
  deriving (ListBudgetsForResource -> ListBudgetsForResource -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListBudgetsForResource -> ListBudgetsForResource -> Bool
$c/= :: ListBudgetsForResource -> ListBudgetsForResource -> Bool
== :: ListBudgetsForResource -> ListBudgetsForResource -> Bool
$c== :: ListBudgetsForResource -> ListBudgetsForResource -> Bool
Prelude.Eq, ReadPrec [ListBudgetsForResource]
ReadPrec ListBudgetsForResource
Int -> ReadS ListBudgetsForResource
ReadS [ListBudgetsForResource]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListBudgetsForResource]
$creadListPrec :: ReadPrec [ListBudgetsForResource]
readPrec :: ReadPrec ListBudgetsForResource
$creadPrec :: ReadPrec ListBudgetsForResource
readList :: ReadS [ListBudgetsForResource]
$creadList :: ReadS [ListBudgetsForResource]
readsPrec :: Int -> ReadS ListBudgetsForResource
$creadsPrec :: Int -> ReadS ListBudgetsForResource
Prelude.Read, Int -> ListBudgetsForResource -> ShowS
[ListBudgetsForResource] -> ShowS
ListBudgetsForResource -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListBudgetsForResource] -> ShowS
$cshowList :: [ListBudgetsForResource] -> ShowS
show :: ListBudgetsForResource -> String
$cshow :: ListBudgetsForResource -> String
showsPrec :: Int -> ListBudgetsForResource -> ShowS
$cshowsPrec :: Int -> ListBudgetsForResource -> ShowS
Prelude.Show, forall x. Rep ListBudgetsForResource x -> ListBudgetsForResource
forall x. ListBudgetsForResource -> Rep ListBudgetsForResource x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListBudgetsForResource x -> ListBudgetsForResource
$cfrom :: forall x. ListBudgetsForResource -> Rep ListBudgetsForResource x
Prelude.Generic)

-- |
-- Create a value of 'ListBudgetsForResource' 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:
--
-- 'acceptLanguage', 'listBudgetsForResource_acceptLanguage' - The language code.
--
-- -   @en@ - English (default)
--
-- -   @jp@ - Japanese
--
-- -   @zh@ - Chinese
--
-- 'pageSize', 'listBudgetsForResource_pageSize' - The maximum number of items to return with this call.
--
-- 'pageToken', 'listBudgetsForResource_pageToken' - The page token for the next set of results. To retrieve the first set of
-- results, use null.
--
-- 'resourceId', 'listBudgetsForResource_resourceId' - The resource identifier.
newListBudgetsForResource ::
  -- | 'resourceId'
  Prelude.Text ->
  ListBudgetsForResource
newListBudgetsForResource :: Text -> ListBudgetsForResource
newListBudgetsForResource Text
pResourceId_ =
  ListBudgetsForResource'
    { $sel:acceptLanguage:ListBudgetsForResource' :: Maybe Text
acceptLanguage =
        forall a. Maybe a
Prelude.Nothing,
      $sel:pageSize:ListBudgetsForResource' :: Maybe Natural
pageSize = forall a. Maybe a
Prelude.Nothing,
      $sel:pageToken:ListBudgetsForResource' :: Maybe Text
pageToken = forall a. Maybe a
Prelude.Nothing,
      $sel:resourceId:ListBudgetsForResource' :: Text
resourceId = Text
pResourceId_
    }

-- | The language code.
--
-- -   @en@ - English (default)
--
-- -   @jp@ - Japanese
--
-- -   @zh@ - Chinese
listBudgetsForResource_acceptLanguage :: Lens.Lens' ListBudgetsForResource (Prelude.Maybe Prelude.Text)
listBudgetsForResource_acceptLanguage :: Lens' ListBudgetsForResource (Maybe Text)
listBudgetsForResource_acceptLanguage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBudgetsForResource' {Maybe Text
acceptLanguage :: Maybe Text
$sel:acceptLanguage:ListBudgetsForResource' :: ListBudgetsForResource -> Maybe Text
acceptLanguage} -> Maybe Text
acceptLanguage) (\s :: ListBudgetsForResource
s@ListBudgetsForResource' {} Maybe Text
a -> ListBudgetsForResource
s {$sel:acceptLanguage:ListBudgetsForResource' :: Maybe Text
acceptLanguage = Maybe Text
a} :: ListBudgetsForResource)

-- | The maximum number of items to return with this call.
listBudgetsForResource_pageSize :: Lens.Lens' ListBudgetsForResource (Prelude.Maybe Prelude.Natural)
listBudgetsForResource_pageSize :: Lens' ListBudgetsForResource (Maybe Natural)
listBudgetsForResource_pageSize = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBudgetsForResource' {Maybe Natural
pageSize :: Maybe Natural
$sel:pageSize:ListBudgetsForResource' :: ListBudgetsForResource -> Maybe Natural
pageSize} -> Maybe Natural
pageSize) (\s :: ListBudgetsForResource
s@ListBudgetsForResource' {} Maybe Natural
a -> ListBudgetsForResource
s {$sel:pageSize:ListBudgetsForResource' :: Maybe Natural
pageSize = Maybe Natural
a} :: ListBudgetsForResource)

-- | The page token for the next set of results. To retrieve the first set of
-- results, use null.
listBudgetsForResource_pageToken :: Lens.Lens' ListBudgetsForResource (Prelude.Maybe Prelude.Text)
listBudgetsForResource_pageToken :: Lens' ListBudgetsForResource (Maybe Text)
listBudgetsForResource_pageToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBudgetsForResource' {Maybe Text
pageToken :: Maybe Text
$sel:pageToken:ListBudgetsForResource' :: ListBudgetsForResource -> Maybe Text
pageToken} -> Maybe Text
pageToken) (\s :: ListBudgetsForResource
s@ListBudgetsForResource' {} Maybe Text
a -> ListBudgetsForResource
s {$sel:pageToken:ListBudgetsForResource' :: Maybe Text
pageToken = Maybe Text
a} :: ListBudgetsForResource)

-- | The resource identifier.
listBudgetsForResource_resourceId :: Lens.Lens' ListBudgetsForResource Prelude.Text
listBudgetsForResource_resourceId :: Lens' ListBudgetsForResource Text
listBudgetsForResource_resourceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBudgetsForResource' {Text
resourceId :: Text
$sel:resourceId:ListBudgetsForResource' :: ListBudgetsForResource -> Text
resourceId} -> Text
resourceId) (\s :: ListBudgetsForResource
s@ListBudgetsForResource' {} Text
a -> ListBudgetsForResource
s {$sel:resourceId:ListBudgetsForResource' :: Text
resourceId = Text
a} :: ListBudgetsForResource)

instance Core.AWSRequest ListBudgetsForResource where
  type
    AWSResponse ListBudgetsForResource =
      ListBudgetsForResourceResponse
  request :: (Service -> Service)
-> ListBudgetsForResource -> Request ListBudgetsForResource
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 ListBudgetsForResource
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListBudgetsForResource)))
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 [BudgetDetail]
-> Maybe Text -> Int -> ListBudgetsForResourceResponse
ListBudgetsForResourceResponse'
            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
"Budgets" 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
"NextPageToken")
            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 ListBudgetsForResource where
  hashWithSalt :: Int -> ListBudgetsForResource -> Int
hashWithSalt Int
_salt ListBudgetsForResource' {Maybe Natural
Maybe Text
Text
resourceId :: Text
pageToken :: Maybe Text
pageSize :: Maybe Natural
acceptLanguage :: Maybe Text
$sel:resourceId:ListBudgetsForResource' :: ListBudgetsForResource -> Text
$sel:pageToken:ListBudgetsForResource' :: ListBudgetsForResource -> Maybe Text
$sel:pageSize:ListBudgetsForResource' :: ListBudgetsForResource -> Maybe Natural
$sel:acceptLanguage:ListBudgetsForResource' :: ListBudgetsForResource -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
acceptLanguage
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
pageSize
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
pageToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
resourceId

instance Prelude.NFData ListBudgetsForResource where
  rnf :: ListBudgetsForResource -> ()
rnf ListBudgetsForResource' {Maybe Natural
Maybe Text
Text
resourceId :: Text
pageToken :: Maybe Text
pageSize :: Maybe Natural
acceptLanguage :: Maybe Text
$sel:resourceId:ListBudgetsForResource' :: ListBudgetsForResource -> Text
$sel:pageToken:ListBudgetsForResource' :: ListBudgetsForResource -> Maybe Text
$sel:pageSize:ListBudgetsForResource' :: ListBudgetsForResource -> Maybe Natural
$sel:acceptLanguage:ListBudgetsForResource' :: ListBudgetsForResource -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
acceptLanguage
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
pageSize
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
pageToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
resourceId

instance Data.ToHeaders ListBudgetsForResource where
  toHeaders :: ListBudgetsForResource -> 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
"AWS242ServiceCatalogService.ListBudgetsForResource" ::
                          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 ListBudgetsForResource where
  toJSON :: ListBudgetsForResource -> Value
toJSON ListBudgetsForResource' {Maybe Natural
Maybe Text
Text
resourceId :: Text
pageToken :: Maybe Text
pageSize :: Maybe Natural
acceptLanguage :: Maybe Text
$sel:resourceId:ListBudgetsForResource' :: ListBudgetsForResource -> Text
$sel:pageToken:ListBudgetsForResource' :: ListBudgetsForResource -> Maybe Text
$sel:pageSize:ListBudgetsForResource' :: ListBudgetsForResource -> Maybe Natural
$sel:acceptLanguage:ListBudgetsForResource' :: ListBudgetsForResource -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"AcceptLanguage" 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
acceptLanguage,
            (Key
"PageSize" 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
pageSize,
            (Key
"PageToken" 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
pageToken,
            forall a. a -> Maybe a
Prelude.Just (Key
"ResourceId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
resourceId)
          ]
      )

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

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

-- | /See:/ 'newListBudgetsForResourceResponse' smart constructor.
data ListBudgetsForResourceResponse = ListBudgetsForResourceResponse'
  { -- | Information about the associated budgets.
    ListBudgetsForResourceResponse -> Maybe [BudgetDetail]
budgets :: Prelude.Maybe [BudgetDetail],
    -- | The page token to use to retrieve the next set of results. If there are
    -- no additional results, this value is null.
    ListBudgetsForResourceResponse -> Maybe Text
nextPageToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListBudgetsForResourceResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListBudgetsForResourceResponse
-> ListBudgetsForResourceResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListBudgetsForResourceResponse
-> ListBudgetsForResourceResponse -> Bool
$c/= :: ListBudgetsForResourceResponse
-> ListBudgetsForResourceResponse -> Bool
== :: ListBudgetsForResourceResponse
-> ListBudgetsForResourceResponse -> Bool
$c== :: ListBudgetsForResourceResponse
-> ListBudgetsForResourceResponse -> Bool
Prelude.Eq, ReadPrec [ListBudgetsForResourceResponse]
ReadPrec ListBudgetsForResourceResponse
Int -> ReadS ListBudgetsForResourceResponse
ReadS [ListBudgetsForResourceResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListBudgetsForResourceResponse]
$creadListPrec :: ReadPrec [ListBudgetsForResourceResponse]
readPrec :: ReadPrec ListBudgetsForResourceResponse
$creadPrec :: ReadPrec ListBudgetsForResourceResponse
readList :: ReadS [ListBudgetsForResourceResponse]
$creadList :: ReadS [ListBudgetsForResourceResponse]
readsPrec :: Int -> ReadS ListBudgetsForResourceResponse
$creadsPrec :: Int -> ReadS ListBudgetsForResourceResponse
Prelude.Read, Int -> ListBudgetsForResourceResponse -> ShowS
[ListBudgetsForResourceResponse] -> ShowS
ListBudgetsForResourceResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListBudgetsForResourceResponse] -> ShowS
$cshowList :: [ListBudgetsForResourceResponse] -> ShowS
show :: ListBudgetsForResourceResponse -> String
$cshow :: ListBudgetsForResourceResponse -> String
showsPrec :: Int -> ListBudgetsForResourceResponse -> ShowS
$cshowsPrec :: Int -> ListBudgetsForResourceResponse -> ShowS
Prelude.Show, forall x.
Rep ListBudgetsForResourceResponse x
-> ListBudgetsForResourceResponse
forall x.
ListBudgetsForResourceResponse
-> Rep ListBudgetsForResourceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListBudgetsForResourceResponse x
-> ListBudgetsForResourceResponse
$cfrom :: forall x.
ListBudgetsForResourceResponse
-> Rep ListBudgetsForResourceResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListBudgetsForResourceResponse' 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:
--
-- 'budgets', 'listBudgetsForResourceResponse_budgets' - Information about the associated budgets.
--
-- 'nextPageToken', 'listBudgetsForResourceResponse_nextPageToken' - The page token to use to retrieve the next set of results. If there are
-- no additional results, this value is null.
--
-- 'httpStatus', 'listBudgetsForResourceResponse_httpStatus' - The response's http status code.
newListBudgetsForResourceResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListBudgetsForResourceResponse
newListBudgetsForResourceResponse :: Int -> ListBudgetsForResourceResponse
newListBudgetsForResourceResponse Int
pHttpStatus_ =
  ListBudgetsForResourceResponse'
    { $sel:budgets:ListBudgetsForResourceResponse' :: Maybe [BudgetDetail]
budgets =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextPageToken:ListBudgetsForResourceResponse' :: Maybe Text
nextPageToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListBudgetsForResourceResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Information about the associated budgets.
listBudgetsForResourceResponse_budgets :: Lens.Lens' ListBudgetsForResourceResponse (Prelude.Maybe [BudgetDetail])
listBudgetsForResourceResponse_budgets :: Lens' ListBudgetsForResourceResponse (Maybe [BudgetDetail])
listBudgetsForResourceResponse_budgets = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBudgetsForResourceResponse' {Maybe [BudgetDetail]
budgets :: Maybe [BudgetDetail]
$sel:budgets:ListBudgetsForResourceResponse' :: ListBudgetsForResourceResponse -> Maybe [BudgetDetail]
budgets} -> Maybe [BudgetDetail]
budgets) (\s :: ListBudgetsForResourceResponse
s@ListBudgetsForResourceResponse' {} Maybe [BudgetDetail]
a -> ListBudgetsForResourceResponse
s {$sel:budgets:ListBudgetsForResourceResponse' :: Maybe [BudgetDetail]
budgets = Maybe [BudgetDetail]
a} :: ListBudgetsForResourceResponse) 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 page token to use to retrieve the next set of results. If there are
-- no additional results, this value is null.
listBudgetsForResourceResponse_nextPageToken :: Lens.Lens' ListBudgetsForResourceResponse (Prelude.Maybe Prelude.Text)
listBudgetsForResourceResponse_nextPageToken :: Lens' ListBudgetsForResourceResponse (Maybe Text)
listBudgetsForResourceResponse_nextPageToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBudgetsForResourceResponse' {Maybe Text
nextPageToken :: Maybe Text
$sel:nextPageToken:ListBudgetsForResourceResponse' :: ListBudgetsForResourceResponse -> Maybe Text
nextPageToken} -> Maybe Text
nextPageToken) (\s :: ListBudgetsForResourceResponse
s@ListBudgetsForResourceResponse' {} Maybe Text
a -> ListBudgetsForResourceResponse
s {$sel:nextPageToken:ListBudgetsForResourceResponse' :: Maybe Text
nextPageToken = Maybe Text
a} :: ListBudgetsForResourceResponse)

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

instance
  Prelude.NFData
    ListBudgetsForResourceResponse
  where
  rnf :: ListBudgetsForResourceResponse -> ()
rnf ListBudgetsForResourceResponse' {Int
Maybe [BudgetDetail]
Maybe Text
httpStatus :: Int
nextPageToken :: Maybe Text
budgets :: Maybe [BudgetDetail]
$sel:httpStatus:ListBudgetsForResourceResponse' :: ListBudgetsForResourceResponse -> Int
$sel:nextPageToken:ListBudgetsForResourceResponse' :: ListBudgetsForResourceResponse -> Maybe Text
$sel:budgets:ListBudgetsForResourceResponse' :: ListBudgetsForResourceResponse -> Maybe [BudgetDetail]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [BudgetDetail]
budgets
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextPageToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus