{-# 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 #-}
module Amazonka.CostExplorer.GetCostCategories
(
GetCostCategories (..),
newGetCostCategories,
getCostCategories_nextPageToken,
getCostCategories_searchString,
getCostCategories_costCategoryName,
getCostCategories_filter,
getCostCategories_maxResults,
getCostCategories_sortBy,
getCostCategories_timePeriod,
GetCostCategoriesResponse (..),
newGetCostCategoriesResponse,
getCostCategoriesResponse_nextPageToken,
getCostCategoriesResponse_costCategoryNames,
getCostCategoriesResponse_costCategoryValues,
getCostCategoriesResponse_httpStatus,
getCostCategoriesResponse_returnSize,
getCostCategoriesResponse_totalSize,
)
where
import qualified Amazonka.Core as Core
import Amazonka.CostExplorer.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data GetCostCategories = GetCostCategories'
{
GetCostCategories -> Maybe Text
nextPageToken :: Prelude.Maybe Prelude.Text,
GetCostCategories -> Maybe Text
searchString :: Prelude.Maybe Prelude.Text,
GetCostCategories -> Maybe Text
costCategoryName :: Prelude.Maybe Prelude.Text,
GetCostCategories -> Maybe Expression
filter' :: Prelude.Maybe Expression,
GetCostCategories -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
GetCostCategories -> Maybe [SortDefinition]
sortBy :: Prelude.Maybe [SortDefinition],
GetCostCategories -> DateInterval
timePeriod :: DateInterval
}
deriving (GetCostCategories -> GetCostCategories -> Bool
(GetCostCategories -> GetCostCategories -> Bool)
-> (GetCostCategories -> GetCostCategories -> Bool)
-> Eq GetCostCategories
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetCostCategories -> GetCostCategories -> Bool
$c/= :: GetCostCategories -> GetCostCategories -> Bool
== :: GetCostCategories -> GetCostCategories -> Bool
$c== :: GetCostCategories -> GetCostCategories -> Bool
Prelude.Eq, ReadPrec [GetCostCategories]
ReadPrec GetCostCategories
Int -> ReadS GetCostCategories
ReadS [GetCostCategories]
(Int -> ReadS GetCostCategories)
-> ReadS [GetCostCategories]
-> ReadPrec GetCostCategories
-> ReadPrec [GetCostCategories]
-> Read GetCostCategories
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetCostCategories]
$creadListPrec :: ReadPrec [GetCostCategories]
readPrec :: ReadPrec GetCostCategories
$creadPrec :: ReadPrec GetCostCategories
readList :: ReadS [GetCostCategories]
$creadList :: ReadS [GetCostCategories]
readsPrec :: Int -> ReadS GetCostCategories
$creadsPrec :: Int -> ReadS GetCostCategories
Prelude.Read, Int -> GetCostCategories -> ShowS
[GetCostCategories] -> ShowS
GetCostCategories -> String
(Int -> GetCostCategories -> ShowS)
-> (GetCostCategories -> String)
-> ([GetCostCategories] -> ShowS)
-> Show GetCostCategories
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetCostCategories] -> ShowS
$cshowList :: [GetCostCategories] -> ShowS
show :: GetCostCategories -> String
$cshow :: GetCostCategories -> String
showsPrec :: Int -> GetCostCategories -> ShowS
$cshowsPrec :: Int -> GetCostCategories -> ShowS
Prelude.Show, (forall x. GetCostCategories -> Rep GetCostCategories x)
-> (forall x. Rep GetCostCategories x -> GetCostCategories)
-> Generic GetCostCategories
forall x. Rep GetCostCategories x -> GetCostCategories
forall x. GetCostCategories -> Rep GetCostCategories x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetCostCategories x -> GetCostCategories
$cfrom :: forall x. GetCostCategories -> Rep GetCostCategories x
Prelude.Generic)
newGetCostCategories ::
DateInterval ->
GetCostCategories
newGetCostCategories :: DateInterval -> GetCostCategories
newGetCostCategories DateInterval
pTimePeriod_ =
GetCostCategories' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Expression
-> Maybe Natural
-> Maybe [SortDefinition]
-> DateInterval
-> GetCostCategories
GetCostCategories'
{ $sel:nextPageToken:GetCostCategories' :: Maybe Text
nextPageToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:searchString:GetCostCategories' :: Maybe Text
searchString = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:costCategoryName:GetCostCategories' :: Maybe Text
costCategoryName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:filter':GetCostCategories' :: Maybe Expression
filter' = Maybe Expression
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:GetCostCategories' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:sortBy:GetCostCategories' :: Maybe [SortDefinition]
sortBy = Maybe [SortDefinition]
forall a. Maybe a
Prelude.Nothing,
$sel:timePeriod:GetCostCategories' :: DateInterval
timePeriod = DateInterval
pTimePeriod_
}
getCostCategories_nextPageToken :: Lens.Lens' GetCostCategories (Prelude.Maybe Prelude.Text)
getCostCategories_nextPageToken :: (Maybe Text -> f (Maybe Text))
-> GetCostCategories -> f GetCostCategories
getCostCategories_nextPageToken = (GetCostCategories -> Maybe Text)
-> (GetCostCategories -> Maybe Text -> GetCostCategories)
-> Lens
GetCostCategories GetCostCategories (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCostCategories' {Maybe Text
nextPageToken :: Maybe Text
$sel:nextPageToken:GetCostCategories' :: GetCostCategories -> Maybe Text
nextPageToken} -> Maybe Text
nextPageToken) (\s :: GetCostCategories
s@GetCostCategories' {} Maybe Text
a -> GetCostCategories
s {$sel:nextPageToken:GetCostCategories' :: Maybe Text
nextPageToken = Maybe Text
a} :: GetCostCategories)
getCostCategories_searchString :: Lens.Lens' GetCostCategories (Prelude.Maybe Prelude.Text)
getCostCategories_searchString :: (Maybe Text -> f (Maybe Text))
-> GetCostCategories -> f GetCostCategories
getCostCategories_searchString = (GetCostCategories -> Maybe Text)
-> (GetCostCategories -> Maybe Text -> GetCostCategories)
-> Lens
GetCostCategories GetCostCategories (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCostCategories' {Maybe Text
searchString :: Maybe Text
$sel:searchString:GetCostCategories' :: GetCostCategories -> Maybe Text
searchString} -> Maybe Text
searchString) (\s :: GetCostCategories
s@GetCostCategories' {} Maybe Text
a -> GetCostCategories
s {$sel:searchString:GetCostCategories' :: Maybe Text
searchString = Maybe Text
a} :: GetCostCategories)
getCostCategories_costCategoryName :: Lens.Lens' GetCostCategories (Prelude.Maybe Prelude.Text)
getCostCategories_costCategoryName :: (Maybe Text -> f (Maybe Text))
-> GetCostCategories -> f GetCostCategories
getCostCategories_costCategoryName = (GetCostCategories -> Maybe Text)
-> (GetCostCategories -> Maybe Text -> GetCostCategories)
-> Lens
GetCostCategories GetCostCategories (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCostCategories' {Maybe Text
costCategoryName :: Maybe Text
$sel:costCategoryName:GetCostCategories' :: GetCostCategories -> Maybe Text
costCategoryName} -> Maybe Text
costCategoryName) (\s :: GetCostCategories
s@GetCostCategories' {} Maybe Text
a -> GetCostCategories
s {$sel:costCategoryName:GetCostCategories' :: Maybe Text
costCategoryName = Maybe Text
a} :: GetCostCategories)
getCostCategories_filter :: Lens.Lens' GetCostCategories (Prelude.Maybe Expression)
getCostCategories_filter :: (Maybe Expression -> f (Maybe Expression))
-> GetCostCategories -> f GetCostCategories
getCostCategories_filter = (GetCostCategories -> Maybe Expression)
-> (GetCostCategories -> Maybe Expression -> GetCostCategories)
-> Lens
GetCostCategories
GetCostCategories
(Maybe Expression)
(Maybe Expression)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCostCategories' {Maybe Expression
filter' :: Maybe Expression
$sel:filter':GetCostCategories' :: GetCostCategories -> Maybe Expression
filter'} -> Maybe Expression
filter') (\s :: GetCostCategories
s@GetCostCategories' {} Maybe Expression
a -> GetCostCategories
s {$sel:filter':GetCostCategories' :: Maybe Expression
filter' = Maybe Expression
a} :: GetCostCategories)
getCostCategories_maxResults :: Lens.Lens' GetCostCategories (Prelude.Maybe Prelude.Natural)
getCostCategories_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> GetCostCategories -> f GetCostCategories
getCostCategories_maxResults = (GetCostCategories -> Maybe Natural)
-> (GetCostCategories -> Maybe Natural -> GetCostCategories)
-> Lens
GetCostCategories GetCostCategories (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCostCategories' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:GetCostCategories' :: GetCostCategories -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: GetCostCategories
s@GetCostCategories' {} Maybe Natural
a -> GetCostCategories
s {$sel:maxResults:GetCostCategories' :: Maybe Natural
maxResults = Maybe Natural
a} :: GetCostCategories)
getCostCategories_sortBy :: Lens.Lens' GetCostCategories (Prelude.Maybe [SortDefinition])
getCostCategories_sortBy :: (Maybe [SortDefinition] -> f (Maybe [SortDefinition]))
-> GetCostCategories -> f GetCostCategories
getCostCategories_sortBy = (GetCostCategories -> Maybe [SortDefinition])
-> (GetCostCategories
-> Maybe [SortDefinition] -> GetCostCategories)
-> Lens
GetCostCategories
GetCostCategories
(Maybe [SortDefinition])
(Maybe [SortDefinition])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCostCategories' {Maybe [SortDefinition]
sortBy :: Maybe [SortDefinition]
$sel:sortBy:GetCostCategories' :: GetCostCategories -> Maybe [SortDefinition]
sortBy} -> Maybe [SortDefinition]
sortBy) (\s :: GetCostCategories
s@GetCostCategories' {} Maybe [SortDefinition]
a -> GetCostCategories
s {$sel:sortBy:GetCostCategories' :: Maybe [SortDefinition]
sortBy = Maybe [SortDefinition]
a} :: GetCostCategories) ((Maybe [SortDefinition] -> f (Maybe [SortDefinition]))
-> GetCostCategories -> f GetCostCategories)
-> ((Maybe [SortDefinition] -> f (Maybe [SortDefinition]))
-> Maybe [SortDefinition] -> f (Maybe [SortDefinition]))
-> (Maybe [SortDefinition] -> f (Maybe [SortDefinition]))
-> GetCostCategories
-> f GetCostCategories
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[SortDefinition] [SortDefinition] [SortDefinition] [SortDefinition]
-> Iso
(Maybe [SortDefinition])
(Maybe [SortDefinition])
(Maybe [SortDefinition])
(Maybe [SortDefinition])
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
[SortDefinition] [SortDefinition] [SortDefinition] [SortDefinition]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
getCostCategories_timePeriod :: Lens.Lens' GetCostCategories DateInterval
getCostCategories_timePeriod :: (DateInterval -> f DateInterval)
-> GetCostCategories -> f GetCostCategories
getCostCategories_timePeriod = (GetCostCategories -> DateInterval)
-> (GetCostCategories -> DateInterval -> GetCostCategories)
-> Lens
GetCostCategories GetCostCategories DateInterval DateInterval
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCostCategories' {DateInterval
timePeriod :: DateInterval
$sel:timePeriod:GetCostCategories' :: GetCostCategories -> DateInterval
timePeriod} -> DateInterval
timePeriod) (\s :: GetCostCategories
s@GetCostCategories' {} DateInterval
a -> GetCostCategories
s {$sel:timePeriod:GetCostCategories' :: DateInterval
timePeriod = DateInterval
a} :: GetCostCategories)
instance Core.AWSRequest GetCostCategories where
type
AWSResponse GetCostCategories =
GetCostCategoriesResponse
request :: GetCostCategories -> Request GetCostCategories
request = Service -> GetCostCategories -> Request GetCostCategories
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy GetCostCategories
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetCostCategories)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GetCostCategories))
-> Logger
-> Service
-> Proxy GetCostCategories
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetCostCategories)))
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 Text
-> Maybe [Text]
-> Maybe [Text]
-> Int
-> Int
-> Int
-> GetCostCategoriesResponse
GetCostCategoriesResponse'
(Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Int
-> Int
-> Int
-> GetCostCategoriesResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe [Text]
-> Maybe [Text] -> Int -> Int -> Int -> GetCostCategoriesResponse)
forall (f :: * -> *) a b. Functor 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
"NextPageToken")
Either
String
(Maybe [Text]
-> Maybe [Text] -> Int -> Int -> Int -> GetCostCategoriesResponse)
-> Either String (Maybe [Text])
-> Either
String
(Maybe [Text] -> Int -> Int -> Int -> GetCostCategoriesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CostCategoryNames"
Either String (Maybe (Maybe [Text]))
-> Maybe [Text] -> Either String (Maybe [Text])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
)
Either
String
(Maybe [Text] -> Int -> Int -> Int -> GetCostCategoriesResponse)
-> Either String (Maybe [Text])
-> Either String (Int -> Int -> Int -> GetCostCategoriesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CostCategoryValues"
Either String (Maybe (Maybe [Text]))
-> Maybe [Text] -> Either String (Maybe [Text])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
)
Either String (Int -> Int -> Int -> GetCostCategoriesResponse)
-> Either String Int
-> Either String (Int -> Int -> GetCostCategoriesResponse)
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))
Either String (Int -> Int -> GetCostCategoriesResponse)
-> Either String Int
-> Either String (Int -> GetCostCategoriesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Int
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"ReturnSize")
Either String (Int -> GetCostCategoriesResponse)
-> Either String Int -> Either String GetCostCategoriesResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Int
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"TotalSize")
)
instance Prelude.Hashable GetCostCategories
instance Prelude.NFData GetCostCategories
instance Core.ToHeaders GetCostCategories where
toHeaders :: GetCostCategories -> ResponseHeaders
toHeaders =
ResponseHeaders -> GetCostCategories -> 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
"AWSInsightsIndexService.GetCostCategories" ::
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 GetCostCategories where
toJSON :: GetCostCategories -> Value
toJSON GetCostCategories' {Maybe Natural
Maybe [SortDefinition]
Maybe Text
Maybe Expression
DateInterval
timePeriod :: DateInterval
sortBy :: Maybe [SortDefinition]
maxResults :: Maybe Natural
filter' :: Maybe Expression
costCategoryName :: Maybe Text
searchString :: Maybe Text
nextPageToken :: Maybe Text
$sel:timePeriod:GetCostCategories' :: GetCostCategories -> DateInterval
$sel:sortBy:GetCostCategories' :: GetCostCategories -> Maybe [SortDefinition]
$sel:maxResults:GetCostCategories' :: GetCostCategories -> Maybe Natural
$sel:filter':GetCostCategories' :: GetCostCategories -> Maybe Expression
$sel:costCategoryName:GetCostCategories' :: GetCostCategories -> Maybe Text
$sel:searchString:GetCostCategories' :: GetCostCategories -> Maybe Text
$sel:nextPageToken:GetCostCategories' :: GetCostCategories -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"NextPageToken" 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
nextPageToken,
(Text
"SearchString" 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
searchString,
(Text
"CostCategoryName" 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
costCategoryName,
(Text
"Filter" Text -> Expression -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Expression -> Pair) -> Maybe Expression -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Expression
filter',
(Text
"MaxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
(Text
"SortBy" Text -> [SortDefinition] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([SortDefinition] -> Pair) -> Maybe [SortDefinition] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [SortDefinition]
sortBy,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"TimePeriod" Text -> DateInterval -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= DateInterval
timePeriod)
]
)
instance Core.ToPath GetCostCategories where
toPath :: GetCostCategories -> ByteString
toPath = ByteString -> GetCostCategories -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery GetCostCategories where
toQuery :: GetCostCategories -> QueryString
toQuery = QueryString -> GetCostCategories -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data GetCostCategoriesResponse = GetCostCategoriesResponse'
{
GetCostCategoriesResponse -> Maybe Text
nextPageToken :: Prelude.Maybe Prelude.Text,
GetCostCategoriesResponse -> Maybe [Text]
costCategoryNames :: Prelude.Maybe [Prelude.Text],
GetCostCategoriesResponse -> Maybe [Text]
costCategoryValues :: Prelude.Maybe [Prelude.Text],
GetCostCategoriesResponse -> Int
httpStatus :: Prelude.Int,
GetCostCategoriesResponse -> Int
returnSize :: Prelude.Int,
GetCostCategoriesResponse -> Int
totalSize :: Prelude.Int
}
deriving (GetCostCategoriesResponse -> GetCostCategoriesResponse -> Bool
(GetCostCategoriesResponse -> GetCostCategoriesResponse -> Bool)
-> (GetCostCategoriesResponse -> GetCostCategoriesResponse -> Bool)
-> Eq GetCostCategoriesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetCostCategoriesResponse -> GetCostCategoriesResponse -> Bool
$c/= :: GetCostCategoriesResponse -> GetCostCategoriesResponse -> Bool
== :: GetCostCategoriesResponse -> GetCostCategoriesResponse -> Bool
$c== :: GetCostCategoriesResponse -> GetCostCategoriesResponse -> Bool
Prelude.Eq, ReadPrec [GetCostCategoriesResponse]
ReadPrec GetCostCategoriesResponse
Int -> ReadS GetCostCategoriesResponse
ReadS [GetCostCategoriesResponse]
(Int -> ReadS GetCostCategoriesResponse)
-> ReadS [GetCostCategoriesResponse]
-> ReadPrec GetCostCategoriesResponse
-> ReadPrec [GetCostCategoriesResponse]
-> Read GetCostCategoriesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetCostCategoriesResponse]
$creadListPrec :: ReadPrec [GetCostCategoriesResponse]
readPrec :: ReadPrec GetCostCategoriesResponse
$creadPrec :: ReadPrec GetCostCategoriesResponse
readList :: ReadS [GetCostCategoriesResponse]
$creadList :: ReadS [GetCostCategoriesResponse]
readsPrec :: Int -> ReadS GetCostCategoriesResponse
$creadsPrec :: Int -> ReadS GetCostCategoriesResponse
Prelude.Read, Int -> GetCostCategoriesResponse -> ShowS
[GetCostCategoriesResponse] -> ShowS
GetCostCategoriesResponse -> String
(Int -> GetCostCategoriesResponse -> ShowS)
-> (GetCostCategoriesResponse -> String)
-> ([GetCostCategoriesResponse] -> ShowS)
-> Show GetCostCategoriesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetCostCategoriesResponse] -> ShowS
$cshowList :: [GetCostCategoriesResponse] -> ShowS
show :: GetCostCategoriesResponse -> String
$cshow :: GetCostCategoriesResponse -> String
showsPrec :: Int -> GetCostCategoriesResponse -> ShowS
$cshowsPrec :: Int -> GetCostCategoriesResponse -> ShowS
Prelude.Show, (forall x.
GetCostCategoriesResponse -> Rep GetCostCategoriesResponse x)
-> (forall x.
Rep GetCostCategoriesResponse x -> GetCostCategoriesResponse)
-> Generic GetCostCategoriesResponse
forall x.
Rep GetCostCategoriesResponse x -> GetCostCategoriesResponse
forall x.
GetCostCategoriesResponse -> Rep GetCostCategoriesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetCostCategoriesResponse x -> GetCostCategoriesResponse
$cfrom :: forall x.
GetCostCategoriesResponse -> Rep GetCostCategoriesResponse x
Prelude.Generic)
newGetCostCategoriesResponse ::
Prelude.Int ->
Prelude.Int ->
Prelude.Int ->
GetCostCategoriesResponse
newGetCostCategoriesResponse :: Int -> Int -> Int -> GetCostCategoriesResponse
newGetCostCategoriesResponse
Int
pHttpStatus_
Int
pReturnSize_
Int
pTotalSize_ =
GetCostCategoriesResponse' :: Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Int
-> Int
-> Int
-> GetCostCategoriesResponse
GetCostCategoriesResponse'
{ $sel:nextPageToken:GetCostCategoriesResponse' :: Maybe Text
nextPageToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:costCategoryNames:GetCostCategoriesResponse' :: Maybe [Text]
costCategoryNames = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:costCategoryValues:GetCostCategoriesResponse' :: Maybe [Text]
costCategoryValues = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetCostCategoriesResponse' :: Int
httpStatus = Int
pHttpStatus_,
$sel:returnSize:GetCostCategoriesResponse' :: Int
returnSize = Int
pReturnSize_,
$sel:totalSize:GetCostCategoriesResponse' :: Int
totalSize = Int
pTotalSize_
}
getCostCategoriesResponse_nextPageToken :: Lens.Lens' GetCostCategoriesResponse (Prelude.Maybe Prelude.Text)
getCostCategoriesResponse_nextPageToken :: (Maybe Text -> f (Maybe Text))
-> GetCostCategoriesResponse -> f GetCostCategoriesResponse
getCostCategoriesResponse_nextPageToken = (GetCostCategoriesResponse -> Maybe Text)
-> (GetCostCategoriesResponse
-> Maybe Text -> GetCostCategoriesResponse)
-> Lens
GetCostCategoriesResponse
GetCostCategoriesResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCostCategoriesResponse' {Maybe Text
nextPageToken :: Maybe Text
$sel:nextPageToken:GetCostCategoriesResponse' :: GetCostCategoriesResponse -> Maybe Text
nextPageToken} -> Maybe Text
nextPageToken) (\s :: GetCostCategoriesResponse
s@GetCostCategoriesResponse' {} Maybe Text
a -> GetCostCategoriesResponse
s {$sel:nextPageToken:GetCostCategoriesResponse' :: Maybe Text
nextPageToken = Maybe Text
a} :: GetCostCategoriesResponse)
getCostCategoriesResponse_costCategoryNames :: Lens.Lens' GetCostCategoriesResponse (Prelude.Maybe [Prelude.Text])
getCostCategoriesResponse_costCategoryNames :: (Maybe [Text] -> f (Maybe [Text]))
-> GetCostCategoriesResponse -> f GetCostCategoriesResponse
getCostCategoriesResponse_costCategoryNames = (GetCostCategoriesResponse -> Maybe [Text])
-> (GetCostCategoriesResponse
-> Maybe [Text] -> GetCostCategoriesResponse)
-> Lens
GetCostCategoriesResponse
GetCostCategoriesResponse
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCostCategoriesResponse' {Maybe [Text]
costCategoryNames :: Maybe [Text]
$sel:costCategoryNames:GetCostCategoriesResponse' :: GetCostCategoriesResponse -> Maybe [Text]
costCategoryNames} -> Maybe [Text]
costCategoryNames) (\s :: GetCostCategoriesResponse
s@GetCostCategoriesResponse' {} Maybe [Text]
a -> GetCostCategoriesResponse
s {$sel:costCategoryNames:GetCostCategoriesResponse' :: Maybe [Text]
costCategoryNames = Maybe [Text]
a} :: GetCostCategoriesResponse) ((Maybe [Text] -> f (Maybe [Text]))
-> GetCostCategoriesResponse -> f GetCostCategoriesResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> GetCostCategoriesResponse
-> f GetCostCategoriesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
getCostCategoriesResponse_costCategoryValues :: Lens.Lens' GetCostCategoriesResponse (Prelude.Maybe [Prelude.Text])
getCostCategoriesResponse_costCategoryValues :: (Maybe [Text] -> f (Maybe [Text]))
-> GetCostCategoriesResponse -> f GetCostCategoriesResponse
getCostCategoriesResponse_costCategoryValues = (GetCostCategoriesResponse -> Maybe [Text])
-> (GetCostCategoriesResponse
-> Maybe [Text] -> GetCostCategoriesResponse)
-> Lens
GetCostCategoriesResponse
GetCostCategoriesResponse
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCostCategoriesResponse' {Maybe [Text]
costCategoryValues :: Maybe [Text]
$sel:costCategoryValues:GetCostCategoriesResponse' :: GetCostCategoriesResponse -> Maybe [Text]
costCategoryValues} -> Maybe [Text]
costCategoryValues) (\s :: GetCostCategoriesResponse
s@GetCostCategoriesResponse' {} Maybe [Text]
a -> GetCostCategoriesResponse
s {$sel:costCategoryValues:GetCostCategoriesResponse' :: Maybe [Text]
costCategoryValues = Maybe [Text]
a} :: GetCostCategoriesResponse) ((Maybe [Text] -> f (Maybe [Text]))
-> GetCostCategoriesResponse -> f GetCostCategoriesResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> GetCostCategoriesResponse
-> f GetCostCategoriesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
getCostCategoriesResponse_httpStatus :: Lens.Lens' GetCostCategoriesResponse Prelude.Int
getCostCategoriesResponse_httpStatus :: (Int -> f Int)
-> GetCostCategoriesResponse -> f GetCostCategoriesResponse
getCostCategoriesResponse_httpStatus = (GetCostCategoriesResponse -> Int)
-> (GetCostCategoriesResponse -> Int -> GetCostCategoriesResponse)
-> Lens GetCostCategoriesResponse GetCostCategoriesResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCostCategoriesResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetCostCategoriesResponse' :: GetCostCategoriesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetCostCategoriesResponse
s@GetCostCategoriesResponse' {} Int
a -> GetCostCategoriesResponse
s {$sel:httpStatus:GetCostCategoriesResponse' :: Int
httpStatus = Int
a} :: GetCostCategoriesResponse)
getCostCategoriesResponse_returnSize :: Lens.Lens' GetCostCategoriesResponse Prelude.Int
getCostCategoriesResponse_returnSize :: (Int -> f Int)
-> GetCostCategoriesResponse -> f GetCostCategoriesResponse
getCostCategoriesResponse_returnSize = (GetCostCategoriesResponse -> Int)
-> (GetCostCategoriesResponse -> Int -> GetCostCategoriesResponse)
-> Lens GetCostCategoriesResponse GetCostCategoriesResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCostCategoriesResponse' {Int
returnSize :: Int
$sel:returnSize:GetCostCategoriesResponse' :: GetCostCategoriesResponse -> Int
returnSize} -> Int
returnSize) (\s :: GetCostCategoriesResponse
s@GetCostCategoriesResponse' {} Int
a -> GetCostCategoriesResponse
s {$sel:returnSize:GetCostCategoriesResponse' :: Int
returnSize = Int
a} :: GetCostCategoriesResponse)
getCostCategoriesResponse_totalSize :: Lens.Lens' GetCostCategoriesResponse Prelude.Int
getCostCategoriesResponse_totalSize :: (Int -> f Int)
-> GetCostCategoriesResponse -> f GetCostCategoriesResponse
getCostCategoriesResponse_totalSize = (GetCostCategoriesResponse -> Int)
-> (GetCostCategoriesResponse -> Int -> GetCostCategoriesResponse)
-> Lens GetCostCategoriesResponse GetCostCategoriesResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCostCategoriesResponse' {Int
totalSize :: Int
$sel:totalSize:GetCostCategoriesResponse' :: GetCostCategoriesResponse -> Int
totalSize} -> Int
totalSize) (\s :: GetCostCategoriesResponse
s@GetCostCategoriesResponse' {} Int
a -> GetCostCategoriesResponse
s {$sel:totalSize:GetCostCategoriesResponse' :: Int
totalSize = Int
a} :: GetCostCategoriesResponse)
instance Prelude.NFData GetCostCategoriesResponse