{-# 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.CostExplorer.ListCostCategoryDefinitions
-- 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 the name, Amazon Resource Name (ARN), @NumberOfRules@ and
-- effective dates of all Cost Categories defined in the account. You have
-- the option to use @EffectiveOn@ to return a list of Cost Categories that
-- were active on a specific date. If there is no @EffectiveOn@ specified,
-- you’ll see Cost Categories that are effective on the current date. If
-- Cost Category is still effective, @EffectiveEnd@ is omitted in the
-- response. @ListCostCategoryDefinitions@ supports pagination. The request
-- can have a @MaxResults@ range up to 100.
module Amazonka.CostExplorer.ListCostCategoryDefinitions
  ( -- * Creating a Request
    ListCostCategoryDefinitions (..),
    newListCostCategoryDefinitions,

    -- * Request Lenses
    listCostCategoryDefinitions_effectiveOn,
    listCostCategoryDefinitions_maxResults,
    listCostCategoryDefinitions_nextToken,

    -- * Destructuring the Response
    ListCostCategoryDefinitionsResponse (..),
    newListCostCategoryDefinitionsResponse,

    -- * Response Lenses
    listCostCategoryDefinitionsResponse_costCategoryReferences,
    listCostCategoryDefinitionsResponse_nextToken,
    listCostCategoryDefinitionsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import Amazonka.CostExplorer.Types
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:/ 'newListCostCategoryDefinitions' smart constructor.
data ListCostCategoryDefinitions = ListCostCategoryDefinitions'
  { -- | The date when the Cost Category was effective.
    ListCostCategoryDefinitions -> Maybe Text
effectiveOn :: Prelude.Maybe Prelude.Text,
    -- | The number of entries a paginated response contains.
    ListCostCategoryDefinitions -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The token to retrieve the next set of results. Amazon Web Services
    -- provides the token when the response from a previous call has more
    -- results than the maximum page size.
    ListCostCategoryDefinitions -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
  }
  deriving (ListCostCategoryDefinitions -> ListCostCategoryDefinitions -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListCostCategoryDefinitions -> ListCostCategoryDefinitions -> Bool
$c/= :: ListCostCategoryDefinitions -> ListCostCategoryDefinitions -> Bool
== :: ListCostCategoryDefinitions -> ListCostCategoryDefinitions -> Bool
$c== :: ListCostCategoryDefinitions -> ListCostCategoryDefinitions -> Bool
Prelude.Eq, ReadPrec [ListCostCategoryDefinitions]
ReadPrec ListCostCategoryDefinitions
Int -> ReadS ListCostCategoryDefinitions
ReadS [ListCostCategoryDefinitions]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListCostCategoryDefinitions]
$creadListPrec :: ReadPrec [ListCostCategoryDefinitions]
readPrec :: ReadPrec ListCostCategoryDefinitions
$creadPrec :: ReadPrec ListCostCategoryDefinitions
readList :: ReadS [ListCostCategoryDefinitions]
$creadList :: ReadS [ListCostCategoryDefinitions]
readsPrec :: Int -> ReadS ListCostCategoryDefinitions
$creadsPrec :: Int -> ReadS ListCostCategoryDefinitions
Prelude.Read, Int -> ListCostCategoryDefinitions -> ShowS
[ListCostCategoryDefinitions] -> ShowS
ListCostCategoryDefinitions -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListCostCategoryDefinitions] -> ShowS
$cshowList :: [ListCostCategoryDefinitions] -> ShowS
show :: ListCostCategoryDefinitions -> String
$cshow :: ListCostCategoryDefinitions -> String
showsPrec :: Int -> ListCostCategoryDefinitions -> ShowS
$cshowsPrec :: Int -> ListCostCategoryDefinitions -> ShowS
Prelude.Show, forall x.
Rep ListCostCategoryDefinitions x -> ListCostCategoryDefinitions
forall x.
ListCostCategoryDefinitions -> Rep ListCostCategoryDefinitions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListCostCategoryDefinitions x -> ListCostCategoryDefinitions
$cfrom :: forall x.
ListCostCategoryDefinitions -> Rep ListCostCategoryDefinitions x
Prelude.Generic)

-- |
-- Create a value of 'ListCostCategoryDefinitions' 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:
--
-- 'effectiveOn', 'listCostCategoryDefinitions_effectiveOn' - The date when the Cost Category was effective.
--
-- 'maxResults', 'listCostCategoryDefinitions_maxResults' - The number of entries a paginated response contains.
--
-- 'nextToken', 'listCostCategoryDefinitions_nextToken' - The token to retrieve the next set of results. Amazon Web Services
-- provides the token when the response from a previous call has more
-- results than the maximum page size.
newListCostCategoryDefinitions ::
  ListCostCategoryDefinitions
newListCostCategoryDefinitions :: ListCostCategoryDefinitions
newListCostCategoryDefinitions =
  ListCostCategoryDefinitions'
    { $sel:effectiveOn:ListCostCategoryDefinitions' :: Maybe Text
effectiveOn =
        forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListCostCategoryDefinitions' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListCostCategoryDefinitions' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing
    }

-- | The date when the Cost Category was effective.
listCostCategoryDefinitions_effectiveOn :: Lens.Lens' ListCostCategoryDefinitions (Prelude.Maybe Prelude.Text)
listCostCategoryDefinitions_effectiveOn :: Lens' ListCostCategoryDefinitions (Maybe Text)
listCostCategoryDefinitions_effectiveOn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCostCategoryDefinitions' {Maybe Text
effectiveOn :: Maybe Text
$sel:effectiveOn:ListCostCategoryDefinitions' :: ListCostCategoryDefinitions -> Maybe Text
effectiveOn} -> Maybe Text
effectiveOn) (\s :: ListCostCategoryDefinitions
s@ListCostCategoryDefinitions' {} Maybe Text
a -> ListCostCategoryDefinitions
s {$sel:effectiveOn:ListCostCategoryDefinitions' :: Maybe Text
effectiveOn = Maybe Text
a} :: ListCostCategoryDefinitions)

-- | The number of entries a paginated response contains.
listCostCategoryDefinitions_maxResults :: Lens.Lens' ListCostCategoryDefinitions (Prelude.Maybe Prelude.Natural)
listCostCategoryDefinitions_maxResults :: Lens' ListCostCategoryDefinitions (Maybe Natural)
listCostCategoryDefinitions_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCostCategoryDefinitions' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListCostCategoryDefinitions' :: ListCostCategoryDefinitions -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListCostCategoryDefinitions
s@ListCostCategoryDefinitions' {} Maybe Natural
a -> ListCostCategoryDefinitions
s {$sel:maxResults:ListCostCategoryDefinitions' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListCostCategoryDefinitions)

-- | The token to retrieve the next set of results. Amazon Web Services
-- provides the token when the response from a previous call has more
-- results than the maximum page size.
listCostCategoryDefinitions_nextToken :: Lens.Lens' ListCostCategoryDefinitions (Prelude.Maybe Prelude.Text)
listCostCategoryDefinitions_nextToken :: Lens' ListCostCategoryDefinitions (Maybe Text)
listCostCategoryDefinitions_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCostCategoryDefinitions' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListCostCategoryDefinitions' :: ListCostCategoryDefinitions -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListCostCategoryDefinitions
s@ListCostCategoryDefinitions' {} Maybe Text
a -> ListCostCategoryDefinitions
s {$sel:nextToken:ListCostCategoryDefinitions' :: Maybe Text
nextToken = Maybe Text
a} :: ListCostCategoryDefinitions)

instance Core.AWSRequest ListCostCategoryDefinitions where
  type
    AWSResponse ListCostCategoryDefinitions =
      ListCostCategoryDefinitionsResponse
  request :: (Service -> Service)
-> ListCostCategoryDefinitions
-> Request ListCostCategoryDefinitions
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 ListCostCategoryDefinitions
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListCostCategoryDefinitions)))
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 [CostCategoryReference]
-> Maybe Text -> Int -> ListCostCategoryDefinitionsResponse
ListCostCategoryDefinitionsResponse'
            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
"CostCategoryReferences"
                            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 ListCostCategoryDefinitions where
  hashWithSalt :: Int -> ListCostCategoryDefinitions -> Int
hashWithSalt Int
_salt ListCostCategoryDefinitions' {Maybe Natural
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
effectiveOn :: Maybe Text
$sel:nextToken:ListCostCategoryDefinitions' :: ListCostCategoryDefinitions -> Maybe Text
$sel:maxResults:ListCostCategoryDefinitions' :: ListCostCategoryDefinitions -> Maybe Natural
$sel:effectiveOn:ListCostCategoryDefinitions' :: ListCostCategoryDefinitions -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
effectiveOn
      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 ListCostCategoryDefinitions where
  rnf :: ListCostCategoryDefinitions -> ()
rnf ListCostCategoryDefinitions' {Maybe Natural
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
effectiveOn :: Maybe Text
$sel:nextToken:ListCostCategoryDefinitions' :: ListCostCategoryDefinitions -> Maybe Text
$sel:maxResults:ListCostCategoryDefinitions' :: ListCostCategoryDefinitions -> Maybe Natural
$sel:effectiveOn:ListCostCategoryDefinitions' :: ListCostCategoryDefinitions -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
effectiveOn
      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 ListCostCategoryDefinitions where
  toHeaders :: ListCostCategoryDefinitions -> 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
"AWSInsightsIndexService.ListCostCategoryDefinitions" ::
                          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 ListCostCategoryDefinitions where
  toJSON :: ListCostCategoryDefinitions -> Value
toJSON ListCostCategoryDefinitions' {Maybe Natural
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
effectiveOn :: Maybe Text
$sel:nextToken:ListCostCategoryDefinitions' :: ListCostCategoryDefinitions -> Maybe Text
$sel:maxResults:ListCostCategoryDefinitions' :: ListCostCategoryDefinitions -> Maybe Natural
$sel:effectiveOn:ListCostCategoryDefinitions' :: ListCostCategoryDefinitions -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"EffectiveOn" 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
effectiveOn,
            (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 ListCostCategoryDefinitions where
  toPath :: ListCostCategoryDefinitions -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newListCostCategoryDefinitionsResponse' smart constructor.
data ListCostCategoryDefinitionsResponse = ListCostCategoryDefinitionsResponse'
  { -- | A reference to a Cost Category that contains enough information to
    -- identify the Cost Category.
    ListCostCategoryDefinitionsResponse
-> Maybe [CostCategoryReference]
costCategoryReferences :: Prelude.Maybe [CostCategoryReference],
    -- | The token to retrieve the next set of results. Amazon Web Services
    -- provides the token when the response from a previous call has more
    -- results than the maximum page size.
    ListCostCategoryDefinitionsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListCostCategoryDefinitionsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListCostCategoryDefinitionsResponse
-> ListCostCategoryDefinitionsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListCostCategoryDefinitionsResponse
-> ListCostCategoryDefinitionsResponse -> Bool
$c/= :: ListCostCategoryDefinitionsResponse
-> ListCostCategoryDefinitionsResponse -> Bool
== :: ListCostCategoryDefinitionsResponse
-> ListCostCategoryDefinitionsResponse -> Bool
$c== :: ListCostCategoryDefinitionsResponse
-> ListCostCategoryDefinitionsResponse -> Bool
Prelude.Eq, ReadPrec [ListCostCategoryDefinitionsResponse]
ReadPrec ListCostCategoryDefinitionsResponse
Int -> ReadS ListCostCategoryDefinitionsResponse
ReadS [ListCostCategoryDefinitionsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListCostCategoryDefinitionsResponse]
$creadListPrec :: ReadPrec [ListCostCategoryDefinitionsResponse]
readPrec :: ReadPrec ListCostCategoryDefinitionsResponse
$creadPrec :: ReadPrec ListCostCategoryDefinitionsResponse
readList :: ReadS [ListCostCategoryDefinitionsResponse]
$creadList :: ReadS [ListCostCategoryDefinitionsResponse]
readsPrec :: Int -> ReadS ListCostCategoryDefinitionsResponse
$creadsPrec :: Int -> ReadS ListCostCategoryDefinitionsResponse
Prelude.Read, Int -> ListCostCategoryDefinitionsResponse -> ShowS
[ListCostCategoryDefinitionsResponse] -> ShowS
ListCostCategoryDefinitionsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListCostCategoryDefinitionsResponse] -> ShowS
$cshowList :: [ListCostCategoryDefinitionsResponse] -> ShowS
show :: ListCostCategoryDefinitionsResponse -> String
$cshow :: ListCostCategoryDefinitionsResponse -> String
showsPrec :: Int -> ListCostCategoryDefinitionsResponse -> ShowS
$cshowsPrec :: Int -> ListCostCategoryDefinitionsResponse -> ShowS
Prelude.Show, forall x.
Rep ListCostCategoryDefinitionsResponse x
-> ListCostCategoryDefinitionsResponse
forall x.
ListCostCategoryDefinitionsResponse
-> Rep ListCostCategoryDefinitionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListCostCategoryDefinitionsResponse x
-> ListCostCategoryDefinitionsResponse
$cfrom :: forall x.
ListCostCategoryDefinitionsResponse
-> Rep ListCostCategoryDefinitionsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListCostCategoryDefinitionsResponse' 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:
--
-- 'costCategoryReferences', 'listCostCategoryDefinitionsResponse_costCategoryReferences' - A reference to a Cost Category that contains enough information to
-- identify the Cost Category.
--
-- 'nextToken', 'listCostCategoryDefinitionsResponse_nextToken' - The token to retrieve the next set of results. Amazon Web Services
-- provides the token when the response from a previous call has more
-- results than the maximum page size.
--
-- 'httpStatus', 'listCostCategoryDefinitionsResponse_httpStatus' - The response's http status code.
newListCostCategoryDefinitionsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListCostCategoryDefinitionsResponse
newListCostCategoryDefinitionsResponse :: Int -> ListCostCategoryDefinitionsResponse
newListCostCategoryDefinitionsResponse Int
pHttpStatus_ =
  ListCostCategoryDefinitionsResponse'
    { $sel:costCategoryReferences:ListCostCategoryDefinitionsResponse' :: Maybe [CostCategoryReference]
costCategoryReferences =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListCostCategoryDefinitionsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListCostCategoryDefinitionsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A reference to a Cost Category that contains enough information to
-- identify the Cost Category.
listCostCategoryDefinitionsResponse_costCategoryReferences :: Lens.Lens' ListCostCategoryDefinitionsResponse (Prelude.Maybe [CostCategoryReference])
listCostCategoryDefinitionsResponse_costCategoryReferences :: Lens'
  ListCostCategoryDefinitionsResponse (Maybe [CostCategoryReference])
listCostCategoryDefinitionsResponse_costCategoryReferences = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCostCategoryDefinitionsResponse' {Maybe [CostCategoryReference]
costCategoryReferences :: Maybe [CostCategoryReference]
$sel:costCategoryReferences:ListCostCategoryDefinitionsResponse' :: ListCostCategoryDefinitionsResponse
-> Maybe [CostCategoryReference]
costCategoryReferences} -> Maybe [CostCategoryReference]
costCategoryReferences) (\s :: ListCostCategoryDefinitionsResponse
s@ListCostCategoryDefinitionsResponse' {} Maybe [CostCategoryReference]
a -> ListCostCategoryDefinitionsResponse
s {$sel:costCategoryReferences:ListCostCategoryDefinitionsResponse' :: Maybe [CostCategoryReference]
costCategoryReferences = Maybe [CostCategoryReference]
a} :: ListCostCategoryDefinitionsResponse) 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 retrieve the next set of results. Amazon Web Services
-- provides the token when the response from a previous call has more
-- results than the maximum page size.
listCostCategoryDefinitionsResponse_nextToken :: Lens.Lens' ListCostCategoryDefinitionsResponse (Prelude.Maybe Prelude.Text)
listCostCategoryDefinitionsResponse_nextToken :: Lens' ListCostCategoryDefinitionsResponse (Maybe Text)
listCostCategoryDefinitionsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCostCategoryDefinitionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListCostCategoryDefinitionsResponse' :: ListCostCategoryDefinitionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListCostCategoryDefinitionsResponse
s@ListCostCategoryDefinitionsResponse' {} Maybe Text
a -> ListCostCategoryDefinitionsResponse
s {$sel:nextToken:ListCostCategoryDefinitionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListCostCategoryDefinitionsResponse)

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

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