{-# 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_costCategoryName,
getCostCategories_filter,
getCostCategories_maxResults,
getCostCategories_nextPageToken,
getCostCategories_searchString,
getCostCategories_sortBy,
getCostCategories_timePeriod,
GetCostCategoriesResponse (..),
newGetCostCategoriesResponse,
getCostCategoriesResponse_costCategoryNames,
getCostCategoriesResponse_costCategoryValues,
getCostCategoriesResponse_nextPageToken,
getCostCategoriesResponse_httpStatus,
getCostCategoriesResponse_returnSize,
getCostCategoriesResponse_totalSize,
)
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
data GetCostCategories = GetCostCategories'
{ 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 Text
nextPageToken :: Prelude.Maybe Prelude.Text,
GetCostCategories -> Maybe Text
searchString :: Prelude.Maybe Prelude.Text,
GetCostCategories -> Maybe [SortDefinition]
sortBy :: Prelude.Maybe [SortDefinition],
GetCostCategories -> DateInterval
timePeriod :: DateInterval
}
deriving (GetCostCategories -> GetCostCategories -> Bool
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]
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
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. 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'
{ $sel:costCategoryName:GetCostCategories' :: Maybe Text
costCategoryName =
forall a. Maybe a
Prelude.Nothing,
$sel:filter':GetCostCategories' :: Maybe Expression
filter' = forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:GetCostCategories' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
$sel:nextPageToken:GetCostCategories' :: Maybe Text
nextPageToken = forall a. Maybe a
Prelude.Nothing,
$sel:searchString:GetCostCategories' :: Maybe Text
searchString = forall a. Maybe a
Prelude.Nothing,
$sel:sortBy:GetCostCategories' :: Maybe [SortDefinition]
sortBy = forall a. Maybe a
Prelude.Nothing,
$sel:timePeriod:GetCostCategories' :: DateInterval
timePeriod = DateInterval
pTimePeriod_
}
getCostCategories_costCategoryName :: Lens.Lens' GetCostCategories (Prelude.Maybe Prelude.Text)
getCostCategories_costCategoryName :: Lens' GetCostCategories (Maybe Text)
getCostCategories_costCategoryName = 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 :: Lens' GetCostCategories (Maybe Expression)
getCostCategories_filter = 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 :: Lens' GetCostCategories (Maybe Natural)
getCostCategories_maxResults = 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_nextPageToken :: Lens.Lens' GetCostCategories (Prelude.Maybe Prelude.Text)
getCostCategories_nextPageToken :: Lens' GetCostCategories (Maybe Text)
getCostCategories_nextPageToken = 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 :: Lens' GetCostCategories (Maybe Text)
getCostCategories_searchString = 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_sortBy :: Lens.Lens' GetCostCategories (Prelude.Maybe [SortDefinition])
getCostCategories_sortBy :: Lens' GetCostCategories (Maybe [SortDefinition])
getCostCategories_sortBy = 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) 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
getCostCategories_timePeriod :: Lens.Lens' GetCostCategories DateInterval
getCostCategories_timePeriod :: Lens' GetCostCategories DateInterval
getCostCategories_timePeriod = 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 :: (Service -> Service)
-> GetCostCategories -> Request GetCostCategories
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 GetCostCategories
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetCostCategories)))
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 [Text]
-> Maybe [Text]
-> Maybe Text
-> Int
-> Int
-> Int
-> GetCostCategoriesResponse
GetCostCategoriesResponse'
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
"CostCategoryNames"
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
"CostCategoryValues"
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))
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"ReturnSize")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"TotalSize")
)
instance Prelude.Hashable GetCostCategories where
hashWithSalt :: Int -> GetCostCategories -> Int
hashWithSalt Int
_salt GetCostCategories' {Maybe Natural
Maybe [SortDefinition]
Maybe Text
Maybe Expression
DateInterval
timePeriod :: DateInterval
sortBy :: Maybe [SortDefinition]
searchString :: Maybe Text
nextPageToken :: Maybe Text
maxResults :: Maybe Natural
filter' :: Maybe Expression
costCategoryName :: Maybe Text
$sel:timePeriod:GetCostCategories' :: GetCostCategories -> DateInterval
$sel:sortBy:GetCostCategories' :: GetCostCategories -> Maybe [SortDefinition]
$sel:searchString:GetCostCategories' :: GetCostCategories -> Maybe Text
$sel:nextPageToken:GetCostCategories' :: GetCostCategories -> Maybe Text
$sel:maxResults:GetCostCategories' :: GetCostCategories -> Maybe Natural
$sel:filter':GetCostCategories' :: GetCostCategories -> Maybe Expression
$sel:costCategoryName:GetCostCategories' :: GetCostCategories -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
costCategoryName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Expression
filter'
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextPageToken
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
searchString
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [SortDefinition]
sortBy
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` DateInterval
timePeriod
instance Prelude.NFData GetCostCategories where
rnf :: GetCostCategories -> ()
rnf GetCostCategories' {Maybe Natural
Maybe [SortDefinition]
Maybe Text
Maybe Expression
DateInterval
timePeriod :: DateInterval
sortBy :: Maybe [SortDefinition]
searchString :: Maybe Text
nextPageToken :: Maybe Text
maxResults :: Maybe Natural
filter' :: Maybe Expression
costCategoryName :: Maybe Text
$sel:timePeriod:GetCostCategories' :: GetCostCategories -> DateInterval
$sel:sortBy:GetCostCategories' :: GetCostCategories -> Maybe [SortDefinition]
$sel:searchString:GetCostCategories' :: GetCostCategories -> Maybe Text
$sel:nextPageToken:GetCostCategories' :: GetCostCategories -> Maybe Text
$sel:maxResults:GetCostCategories' :: GetCostCategories -> Maybe Natural
$sel:filter':GetCostCategories' :: GetCostCategories -> Maybe Expression
$sel:costCategoryName:GetCostCategories' :: GetCostCategories -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
costCategoryName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Expression
filter'
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
nextPageToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
searchString
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [SortDefinition]
sortBy
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf DateInterval
timePeriod
instance Data.ToHeaders GetCostCategories where
toHeaders :: GetCostCategories -> 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.GetCostCategories" ::
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 GetCostCategories where
toJSON :: GetCostCategories -> Value
toJSON GetCostCategories' {Maybe Natural
Maybe [SortDefinition]
Maybe Text
Maybe Expression
DateInterval
timePeriod :: DateInterval
sortBy :: Maybe [SortDefinition]
searchString :: Maybe Text
nextPageToken :: Maybe Text
maxResults :: Maybe Natural
filter' :: Maybe Expression
costCategoryName :: Maybe Text
$sel:timePeriod:GetCostCategories' :: GetCostCategories -> DateInterval
$sel:sortBy:GetCostCategories' :: GetCostCategories -> Maybe [SortDefinition]
$sel:searchString:GetCostCategories' :: GetCostCategories -> Maybe Text
$sel:nextPageToken:GetCostCategories' :: GetCostCategories -> Maybe Text
$sel:maxResults:GetCostCategories' :: GetCostCategories -> Maybe Natural
$sel:filter':GetCostCategories' :: GetCostCategories -> Maybe Expression
$sel:costCategoryName:GetCostCategories' :: GetCostCategories -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"CostCategoryName" 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
costCategoryName,
(Key
"Filter" 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 Expression
filter',
(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
"NextPageToken" 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
nextPageToken,
(Key
"SearchString" 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
searchString,
(Key
"SortBy" 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 [SortDefinition]
sortBy,
forall a. a -> Maybe a
Prelude.Just (Key
"TimePeriod" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= DateInterval
timePeriod)
]
)
instance Data.ToPath GetCostCategories where
toPath :: GetCostCategories -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery GetCostCategories where
toQuery :: GetCostCategories -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data GetCostCategoriesResponse = GetCostCategoriesResponse'
{
GetCostCategoriesResponse -> Maybe [Text]
costCategoryNames :: Prelude.Maybe [Prelude.Text],
GetCostCategoriesResponse -> Maybe [Text]
costCategoryValues :: Prelude.Maybe [Prelude.Text],
GetCostCategoriesResponse -> Maybe Text
nextPageToken :: Prelude.Maybe Prelude.Text,
GetCostCategoriesResponse -> Int
httpStatus :: Prelude.Int,
GetCostCategoriesResponse -> Int
returnSize :: Prelude.Int,
GetCostCategoriesResponse -> Int
totalSize :: Prelude.Int
}
deriving (GetCostCategoriesResponse -> GetCostCategoriesResponse -> Bool
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]
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
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.
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'
{ $sel:costCategoryNames:GetCostCategoriesResponse' :: Maybe [Text]
costCategoryNames =
forall a. Maybe a
Prelude.Nothing,
$sel:costCategoryValues:GetCostCategoriesResponse' :: Maybe [Text]
costCategoryValues = forall a. Maybe a
Prelude.Nothing,
$sel:nextPageToken:GetCostCategoriesResponse' :: Maybe Text
nextPageToken = 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_costCategoryNames :: Lens.Lens' GetCostCategoriesResponse (Prelude.Maybe [Prelude.Text])
getCostCategoriesResponse_costCategoryNames :: Lens' GetCostCategoriesResponse (Maybe [Text])
getCostCategoriesResponse_costCategoryNames = 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) 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
getCostCategoriesResponse_costCategoryValues :: Lens.Lens' GetCostCategoriesResponse (Prelude.Maybe [Prelude.Text])
getCostCategoriesResponse_costCategoryValues :: Lens' GetCostCategoriesResponse (Maybe [Text])
getCostCategoriesResponse_costCategoryValues = 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) 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
getCostCategoriesResponse_nextPageToken :: Lens.Lens' GetCostCategoriesResponse (Prelude.Maybe Prelude.Text)
getCostCategoriesResponse_nextPageToken :: Lens' GetCostCategoriesResponse (Maybe Text)
getCostCategoriesResponse_nextPageToken = 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_httpStatus :: Lens.Lens' GetCostCategoriesResponse Prelude.Int
getCostCategoriesResponse_httpStatus :: Lens' GetCostCategoriesResponse Int
getCostCategoriesResponse_httpStatus = 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 :: Lens' GetCostCategoriesResponse Int
getCostCategoriesResponse_returnSize = 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 :: Lens' GetCostCategoriesResponse Int
getCostCategoriesResponse_totalSize = 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 where
rnf :: GetCostCategoriesResponse -> ()
rnf GetCostCategoriesResponse' {Int
Maybe [Text]
Maybe Text
totalSize :: Int
returnSize :: Int
httpStatus :: Int
nextPageToken :: Maybe Text
costCategoryValues :: Maybe [Text]
costCategoryNames :: Maybe [Text]
$sel:totalSize:GetCostCategoriesResponse' :: GetCostCategoriesResponse -> Int
$sel:returnSize:GetCostCategoriesResponse' :: GetCostCategoriesResponse -> Int
$sel:httpStatus:GetCostCategoriesResponse' :: GetCostCategoriesResponse -> Int
$sel:nextPageToken:GetCostCategoriesResponse' :: GetCostCategoriesResponse -> Maybe Text
$sel:costCategoryValues:GetCostCategoriesResponse' :: GetCostCategoriesResponse -> Maybe [Text]
$sel:costCategoryNames:GetCostCategoriesResponse' :: GetCostCategoriesResponse -> Maybe [Text]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
costCategoryNames
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
costCategoryValues
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
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
returnSize
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
totalSize