{-# 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.GetSavingsPlansUtilization
(
GetSavingsPlansUtilization (..),
newGetSavingsPlansUtilization,
getSavingsPlansUtilization_granularity,
getSavingsPlansUtilization_filter,
getSavingsPlansUtilization_sortBy,
getSavingsPlansUtilization_timePeriod,
GetSavingsPlansUtilizationResponse (..),
newGetSavingsPlansUtilizationResponse,
getSavingsPlansUtilizationResponse_savingsPlansUtilizationsByTime,
getSavingsPlansUtilizationResponse_httpStatus,
getSavingsPlansUtilizationResponse_total,
)
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 GetSavingsPlansUtilization = GetSavingsPlansUtilization'
{
GetSavingsPlansUtilization -> Maybe Granularity
granularity :: Prelude.Maybe Granularity,
GetSavingsPlansUtilization -> Maybe Expression
filter' :: Prelude.Maybe Expression,
GetSavingsPlansUtilization -> Maybe SortDefinition
sortBy :: Prelude.Maybe SortDefinition,
GetSavingsPlansUtilization -> DateInterval
timePeriod :: DateInterval
}
deriving (GetSavingsPlansUtilization -> GetSavingsPlansUtilization -> Bool
(GetSavingsPlansUtilization -> GetSavingsPlansUtilization -> Bool)
-> (GetSavingsPlansUtilization
-> GetSavingsPlansUtilization -> Bool)
-> Eq GetSavingsPlansUtilization
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetSavingsPlansUtilization -> GetSavingsPlansUtilization -> Bool
$c/= :: GetSavingsPlansUtilization -> GetSavingsPlansUtilization -> Bool
== :: GetSavingsPlansUtilization -> GetSavingsPlansUtilization -> Bool
$c== :: GetSavingsPlansUtilization -> GetSavingsPlansUtilization -> Bool
Prelude.Eq, ReadPrec [GetSavingsPlansUtilization]
ReadPrec GetSavingsPlansUtilization
Int -> ReadS GetSavingsPlansUtilization
ReadS [GetSavingsPlansUtilization]
(Int -> ReadS GetSavingsPlansUtilization)
-> ReadS [GetSavingsPlansUtilization]
-> ReadPrec GetSavingsPlansUtilization
-> ReadPrec [GetSavingsPlansUtilization]
-> Read GetSavingsPlansUtilization
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetSavingsPlansUtilization]
$creadListPrec :: ReadPrec [GetSavingsPlansUtilization]
readPrec :: ReadPrec GetSavingsPlansUtilization
$creadPrec :: ReadPrec GetSavingsPlansUtilization
readList :: ReadS [GetSavingsPlansUtilization]
$creadList :: ReadS [GetSavingsPlansUtilization]
readsPrec :: Int -> ReadS GetSavingsPlansUtilization
$creadsPrec :: Int -> ReadS GetSavingsPlansUtilization
Prelude.Read, Int -> GetSavingsPlansUtilization -> ShowS
[GetSavingsPlansUtilization] -> ShowS
GetSavingsPlansUtilization -> String
(Int -> GetSavingsPlansUtilization -> ShowS)
-> (GetSavingsPlansUtilization -> String)
-> ([GetSavingsPlansUtilization] -> ShowS)
-> Show GetSavingsPlansUtilization
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetSavingsPlansUtilization] -> ShowS
$cshowList :: [GetSavingsPlansUtilization] -> ShowS
show :: GetSavingsPlansUtilization -> String
$cshow :: GetSavingsPlansUtilization -> String
showsPrec :: Int -> GetSavingsPlansUtilization -> ShowS
$cshowsPrec :: Int -> GetSavingsPlansUtilization -> ShowS
Prelude.Show, (forall x.
GetSavingsPlansUtilization -> Rep GetSavingsPlansUtilization x)
-> (forall x.
Rep GetSavingsPlansUtilization x -> GetSavingsPlansUtilization)
-> Generic GetSavingsPlansUtilization
forall x.
Rep GetSavingsPlansUtilization x -> GetSavingsPlansUtilization
forall x.
GetSavingsPlansUtilization -> Rep GetSavingsPlansUtilization x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetSavingsPlansUtilization x -> GetSavingsPlansUtilization
$cfrom :: forall x.
GetSavingsPlansUtilization -> Rep GetSavingsPlansUtilization x
Prelude.Generic)
newGetSavingsPlansUtilization ::
DateInterval ->
GetSavingsPlansUtilization
newGetSavingsPlansUtilization :: DateInterval -> GetSavingsPlansUtilization
newGetSavingsPlansUtilization DateInterval
pTimePeriod_ =
GetSavingsPlansUtilization' :: Maybe Granularity
-> Maybe Expression
-> Maybe SortDefinition
-> DateInterval
-> GetSavingsPlansUtilization
GetSavingsPlansUtilization'
{ $sel:granularity:GetSavingsPlansUtilization' :: Maybe Granularity
granularity =
Maybe Granularity
forall a. Maybe a
Prelude.Nothing,
$sel:filter':GetSavingsPlansUtilization' :: Maybe Expression
filter' = Maybe Expression
forall a. Maybe a
Prelude.Nothing,
$sel:sortBy:GetSavingsPlansUtilization' :: Maybe SortDefinition
sortBy = Maybe SortDefinition
forall a. Maybe a
Prelude.Nothing,
$sel:timePeriod:GetSavingsPlansUtilization' :: DateInterval
timePeriod = DateInterval
pTimePeriod_
}
getSavingsPlansUtilization_granularity :: Lens.Lens' GetSavingsPlansUtilization (Prelude.Maybe Granularity)
getSavingsPlansUtilization_granularity :: (Maybe Granularity -> f (Maybe Granularity))
-> GetSavingsPlansUtilization -> f GetSavingsPlansUtilization
getSavingsPlansUtilization_granularity = (GetSavingsPlansUtilization -> Maybe Granularity)
-> (GetSavingsPlansUtilization
-> Maybe Granularity -> GetSavingsPlansUtilization)
-> Lens
GetSavingsPlansUtilization
GetSavingsPlansUtilization
(Maybe Granularity)
(Maybe Granularity)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSavingsPlansUtilization' {Maybe Granularity
granularity :: Maybe Granularity
$sel:granularity:GetSavingsPlansUtilization' :: GetSavingsPlansUtilization -> Maybe Granularity
granularity} -> Maybe Granularity
granularity) (\s :: GetSavingsPlansUtilization
s@GetSavingsPlansUtilization' {} Maybe Granularity
a -> GetSavingsPlansUtilization
s {$sel:granularity:GetSavingsPlansUtilization' :: Maybe Granularity
granularity = Maybe Granularity
a} :: GetSavingsPlansUtilization)
getSavingsPlansUtilization_filter :: Lens.Lens' GetSavingsPlansUtilization (Prelude.Maybe Expression)
getSavingsPlansUtilization_filter :: (Maybe Expression -> f (Maybe Expression))
-> GetSavingsPlansUtilization -> f GetSavingsPlansUtilization
getSavingsPlansUtilization_filter = (GetSavingsPlansUtilization -> Maybe Expression)
-> (GetSavingsPlansUtilization
-> Maybe Expression -> GetSavingsPlansUtilization)
-> Lens
GetSavingsPlansUtilization
GetSavingsPlansUtilization
(Maybe Expression)
(Maybe Expression)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSavingsPlansUtilization' {Maybe Expression
filter' :: Maybe Expression
$sel:filter':GetSavingsPlansUtilization' :: GetSavingsPlansUtilization -> Maybe Expression
filter'} -> Maybe Expression
filter') (\s :: GetSavingsPlansUtilization
s@GetSavingsPlansUtilization' {} Maybe Expression
a -> GetSavingsPlansUtilization
s {$sel:filter':GetSavingsPlansUtilization' :: Maybe Expression
filter' = Maybe Expression
a} :: GetSavingsPlansUtilization)
getSavingsPlansUtilization_sortBy :: Lens.Lens' GetSavingsPlansUtilization (Prelude.Maybe SortDefinition)
getSavingsPlansUtilization_sortBy :: (Maybe SortDefinition -> f (Maybe SortDefinition))
-> GetSavingsPlansUtilization -> f GetSavingsPlansUtilization
getSavingsPlansUtilization_sortBy = (GetSavingsPlansUtilization -> Maybe SortDefinition)
-> (GetSavingsPlansUtilization
-> Maybe SortDefinition -> GetSavingsPlansUtilization)
-> Lens
GetSavingsPlansUtilization
GetSavingsPlansUtilization
(Maybe SortDefinition)
(Maybe SortDefinition)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSavingsPlansUtilization' {Maybe SortDefinition
sortBy :: Maybe SortDefinition
$sel:sortBy:GetSavingsPlansUtilization' :: GetSavingsPlansUtilization -> Maybe SortDefinition
sortBy} -> Maybe SortDefinition
sortBy) (\s :: GetSavingsPlansUtilization
s@GetSavingsPlansUtilization' {} Maybe SortDefinition
a -> GetSavingsPlansUtilization
s {$sel:sortBy:GetSavingsPlansUtilization' :: Maybe SortDefinition
sortBy = Maybe SortDefinition
a} :: GetSavingsPlansUtilization)
getSavingsPlansUtilization_timePeriod :: Lens.Lens' GetSavingsPlansUtilization DateInterval
getSavingsPlansUtilization_timePeriod :: (DateInterval -> f DateInterval)
-> GetSavingsPlansUtilization -> f GetSavingsPlansUtilization
getSavingsPlansUtilization_timePeriod = (GetSavingsPlansUtilization -> DateInterval)
-> (GetSavingsPlansUtilization
-> DateInterval -> GetSavingsPlansUtilization)
-> Lens
GetSavingsPlansUtilization
GetSavingsPlansUtilization
DateInterval
DateInterval
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSavingsPlansUtilization' {DateInterval
timePeriod :: DateInterval
$sel:timePeriod:GetSavingsPlansUtilization' :: GetSavingsPlansUtilization -> DateInterval
timePeriod} -> DateInterval
timePeriod) (\s :: GetSavingsPlansUtilization
s@GetSavingsPlansUtilization' {} DateInterval
a -> GetSavingsPlansUtilization
s {$sel:timePeriod:GetSavingsPlansUtilization' :: DateInterval
timePeriod = DateInterval
a} :: GetSavingsPlansUtilization)
instance Core.AWSRequest GetSavingsPlansUtilization where
type
AWSResponse GetSavingsPlansUtilization =
GetSavingsPlansUtilizationResponse
request :: GetSavingsPlansUtilization -> Request GetSavingsPlansUtilization
request = Service
-> GetSavingsPlansUtilization -> Request GetSavingsPlansUtilization
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy GetSavingsPlansUtilization
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetSavingsPlansUtilization)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GetSavingsPlansUtilization))
-> Logger
-> Service
-> Proxy GetSavingsPlansUtilization
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetSavingsPlansUtilization)))
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 [SavingsPlansUtilizationByTime]
-> Int
-> SavingsPlansUtilizationAggregates
-> GetSavingsPlansUtilizationResponse
GetSavingsPlansUtilizationResponse'
(Maybe [SavingsPlansUtilizationByTime]
-> Int
-> SavingsPlansUtilizationAggregates
-> GetSavingsPlansUtilizationResponse)
-> Either String (Maybe [SavingsPlansUtilizationByTime])
-> Either
String
(Int
-> SavingsPlansUtilizationAggregates
-> GetSavingsPlansUtilizationResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object
-> Key
-> Either String (Maybe (Maybe [SavingsPlansUtilizationByTime]))
forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Core..?> Key
"SavingsPlansUtilizationsByTime"
Either String (Maybe (Maybe [SavingsPlansUtilizationByTime]))
-> Maybe [SavingsPlansUtilizationByTime]
-> Either String (Maybe [SavingsPlansUtilizationByTime])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [SavingsPlansUtilizationByTime]
forall a. Monoid a => a
Prelude.mempty
)
Either
String
(Int
-> SavingsPlansUtilizationAggregates
-> GetSavingsPlansUtilizationResponse)
-> Either String Int
-> Either
String
(SavingsPlansUtilizationAggregates
-> GetSavingsPlansUtilizationResponse)
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
(SavingsPlansUtilizationAggregates
-> GetSavingsPlansUtilizationResponse)
-> Either String SavingsPlansUtilizationAggregates
-> Either String GetSavingsPlansUtilizationResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Key -> Either String SavingsPlansUtilizationAggregates
forall a. FromJSON a => Object -> Key -> Either String a
Core..:> Key
"Total")
)
instance Prelude.Hashable GetSavingsPlansUtilization
instance Prelude.NFData GetSavingsPlansUtilization
instance Core.ToHeaders GetSavingsPlansUtilization where
toHeaders :: GetSavingsPlansUtilization -> ResponseHeaders
toHeaders =
ResponseHeaders -> GetSavingsPlansUtilization -> 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.GetSavingsPlansUtilization" ::
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 GetSavingsPlansUtilization where
toJSON :: GetSavingsPlansUtilization -> Value
toJSON GetSavingsPlansUtilization' {Maybe Granularity
Maybe SortDefinition
Maybe Expression
DateInterval
timePeriod :: DateInterval
sortBy :: Maybe SortDefinition
filter' :: Maybe Expression
granularity :: Maybe Granularity
$sel:timePeriod:GetSavingsPlansUtilization' :: GetSavingsPlansUtilization -> DateInterval
$sel:sortBy:GetSavingsPlansUtilization' :: GetSavingsPlansUtilization -> Maybe SortDefinition
$sel:filter':GetSavingsPlansUtilization' :: GetSavingsPlansUtilization -> Maybe Expression
$sel:granularity:GetSavingsPlansUtilization' :: GetSavingsPlansUtilization -> Maybe Granularity
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"Granularity" Key -> Granularity -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Core..=) (Granularity -> Pair) -> Maybe Granularity -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Granularity
granularity,
(Key
"Filter" Key -> Expression -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> 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',
(Key
"SortBy" Key -> SortDefinition -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> 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 (Key
"TimePeriod" Key -> DateInterval -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Core..= DateInterval
timePeriod)
]
)
instance Core.ToPath GetSavingsPlansUtilization where
toPath :: GetSavingsPlansUtilization -> ByteString
toPath = ByteString -> GetSavingsPlansUtilization -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery GetSavingsPlansUtilization where
toQuery :: GetSavingsPlansUtilization -> QueryString
toQuery = QueryString -> GetSavingsPlansUtilization -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data GetSavingsPlansUtilizationResponse = GetSavingsPlansUtilizationResponse'
{
GetSavingsPlansUtilizationResponse
-> Maybe [SavingsPlansUtilizationByTime]
savingsPlansUtilizationsByTime :: Prelude.Maybe [SavingsPlansUtilizationByTime],
GetSavingsPlansUtilizationResponse -> Int
httpStatus :: Prelude.Int,
GetSavingsPlansUtilizationResponse
-> SavingsPlansUtilizationAggregates
total :: SavingsPlansUtilizationAggregates
}
deriving (GetSavingsPlansUtilizationResponse
-> GetSavingsPlansUtilizationResponse -> Bool
(GetSavingsPlansUtilizationResponse
-> GetSavingsPlansUtilizationResponse -> Bool)
-> (GetSavingsPlansUtilizationResponse
-> GetSavingsPlansUtilizationResponse -> Bool)
-> Eq GetSavingsPlansUtilizationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetSavingsPlansUtilizationResponse
-> GetSavingsPlansUtilizationResponse -> Bool
$c/= :: GetSavingsPlansUtilizationResponse
-> GetSavingsPlansUtilizationResponse -> Bool
== :: GetSavingsPlansUtilizationResponse
-> GetSavingsPlansUtilizationResponse -> Bool
$c== :: GetSavingsPlansUtilizationResponse
-> GetSavingsPlansUtilizationResponse -> Bool
Prelude.Eq, ReadPrec [GetSavingsPlansUtilizationResponse]
ReadPrec GetSavingsPlansUtilizationResponse
Int -> ReadS GetSavingsPlansUtilizationResponse
ReadS [GetSavingsPlansUtilizationResponse]
(Int -> ReadS GetSavingsPlansUtilizationResponse)
-> ReadS [GetSavingsPlansUtilizationResponse]
-> ReadPrec GetSavingsPlansUtilizationResponse
-> ReadPrec [GetSavingsPlansUtilizationResponse]
-> Read GetSavingsPlansUtilizationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetSavingsPlansUtilizationResponse]
$creadListPrec :: ReadPrec [GetSavingsPlansUtilizationResponse]
readPrec :: ReadPrec GetSavingsPlansUtilizationResponse
$creadPrec :: ReadPrec GetSavingsPlansUtilizationResponse
readList :: ReadS [GetSavingsPlansUtilizationResponse]
$creadList :: ReadS [GetSavingsPlansUtilizationResponse]
readsPrec :: Int -> ReadS GetSavingsPlansUtilizationResponse
$creadsPrec :: Int -> ReadS GetSavingsPlansUtilizationResponse
Prelude.Read, Int -> GetSavingsPlansUtilizationResponse -> ShowS
[GetSavingsPlansUtilizationResponse] -> ShowS
GetSavingsPlansUtilizationResponse -> String
(Int -> GetSavingsPlansUtilizationResponse -> ShowS)
-> (GetSavingsPlansUtilizationResponse -> String)
-> ([GetSavingsPlansUtilizationResponse] -> ShowS)
-> Show GetSavingsPlansUtilizationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetSavingsPlansUtilizationResponse] -> ShowS
$cshowList :: [GetSavingsPlansUtilizationResponse] -> ShowS
show :: GetSavingsPlansUtilizationResponse -> String
$cshow :: GetSavingsPlansUtilizationResponse -> String
showsPrec :: Int -> GetSavingsPlansUtilizationResponse -> ShowS
$cshowsPrec :: Int -> GetSavingsPlansUtilizationResponse -> ShowS
Prelude.Show, (forall x.
GetSavingsPlansUtilizationResponse
-> Rep GetSavingsPlansUtilizationResponse x)
-> (forall x.
Rep GetSavingsPlansUtilizationResponse x
-> GetSavingsPlansUtilizationResponse)
-> Generic GetSavingsPlansUtilizationResponse
forall x.
Rep GetSavingsPlansUtilizationResponse x
-> GetSavingsPlansUtilizationResponse
forall x.
GetSavingsPlansUtilizationResponse
-> Rep GetSavingsPlansUtilizationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetSavingsPlansUtilizationResponse x
-> GetSavingsPlansUtilizationResponse
$cfrom :: forall x.
GetSavingsPlansUtilizationResponse
-> Rep GetSavingsPlansUtilizationResponse x
Prelude.Generic)
newGetSavingsPlansUtilizationResponse ::
Prelude.Int ->
SavingsPlansUtilizationAggregates ->
GetSavingsPlansUtilizationResponse
newGetSavingsPlansUtilizationResponse :: Int
-> SavingsPlansUtilizationAggregates
-> GetSavingsPlansUtilizationResponse
newGetSavingsPlansUtilizationResponse
Int
pHttpStatus_
SavingsPlansUtilizationAggregates
pTotal_ =
GetSavingsPlansUtilizationResponse' :: Maybe [SavingsPlansUtilizationByTime]
-> Int
-> SavingsPlansUtilizationAggregates
-> GetSavingsPlansUtilizationResponse
GetSavingsPlansUtilizationResponse'
{ $sel:savingsPlansUtilizationsByTime:GetSavingsPlansUtilizationResponse' :: Maybe [SavingsPlansUtilizationByTime]
savingsPlansUtilizationsByTime =
Maybe [SavingsPlansUtilizationByTime]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetSavingsPlansUtilizationResponse' :: Int
httpStatus = Int
pHttpStatus_,
$sel:total:GetSavingsPlansUtilizationResponse' :: SavingsPlansUtilizationAggregates
total = SavingsPlansUtilizationAggregates
pTotal_
}
getSavingsPlansUtilizationResponse_savingsPlansUtilizationsByTime :: Lens.Lens' GetSavingsPlansUtilizationResponse (Prelude.Maybe [SavingsPlansUtilizationByTime])
getSavingsPlansUtilizationResponse_savingsPlansUtilizationsByTime :: (Maybe [SavingsPlansUtilizationByTime]
-> f (Maybe [SavingsPlansUtilizationByTime]))
-> GetSavingsPlansUtilizationResponse
-> f GetSavingsPlansUtilizationResponse
getSavingsPlansUtilizationResponse_savingsPlansUtilizationsByTime = (GetSavingsPlansUtilizationResponse
-> Maybe [SavingsPlansUtilizationByTime])
-> (GetSavingsPlansUtilizationResponse
-> Maybe [SavingsPlansUtilizationByTime]
-> GetSavingsPlansUtilizationResponse)
-> Lens
GetSavingsPlansUtilizationResponse
GetSavingsPlansUtilizationResponse
(Maybe [SavingsPlansUtilizationByTime])
(Maybe [SavingsPlansUtilizationByTime])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSavingsPlansUtilizationResponse' {Maybe [SavingsPlansUtilizationByTime]
savingsPlansUtilizationsByTime :: Maybe [SavingsPlansUtilizationByTime]
$sel:savingsPlansUtilizationsByTime:GetSavingsPlansUtilizationResponse' :: GetSavingsPlansUtilizationResponse
-> Maybe [SavingsPlansUtilizationByTime]
savingsPlansUtilizationsByTime} -> Maybe [SavingsPlansUtilizationByTime]
savingsPlansUtilizationsByTime) (\s :: GetSavingsPlansUtilizationResponse
s@GetSavingsPlansUtilizationResponse' {} Maybe [SavingsPlansUtilizationByTime]
a -> GetSavingsPlansUtilizationResponse
s {$sel:savingsPlansUtilizationsByTime:GetSavingsPlansUtilizationResponse' :: Maybe [SavingsPlansUtilizationByTime]
savingsPlansUtilizationsByTime = Maybe [SavingsPlansUtilizationByTime]
a} :: GetSavingsPlansUtilizationResponse) ((Maybe [SavingsPlansUtilizationByTime]
-> f (Maybe [SavingsPlansUtilizationByTime]))
-> GetSavingsPlansUtilizationResponse
-> f GetSavingsPlansUtilizationResponse)
-> ((Maybe [SavingsPlansUtilizationByTime]
-> f (Maybe [SavingsPlansUtilizationByTime]))
-> Maybe [SavingsPlansUtilizationByTime]
-> f (Maybe [SavingsPlansUtilizationByTime]))
-> (Maybe [SavingsPlansUtilizationByTime]
-> f (Maybe [SavingsPlansUtilizationByTime]))
-> GetSavingsPlansUtilizationResponse
-> f GetSavingsPlansUtilizationResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[SavingsPlansUtilizationByTime]
[SavingsPlansUtilizationByTime]
[SavingsPlansUtilizationByTime]
[SavingsPlansUtilizationByTime]
-> Iso
(Maybe [SavingsPlansUtilizationByTime])
(Maybe [SavingsPlansUtilizationByTime])
(Maybe [SavingsPlansUtilizationByTime])
(Maybe [SavingsPlansUtilizationByTime])
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
[SavingsPlansUtilizationByTime]
[SavingsPlansUtilizationByTime]
[SavingsPlansUtilizationByTime]
[SavingsPlansUtilizationByTime]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
getSavingsPlansUtilizationResponse_httpStatus :: Lens.Lens' GetSavingsPlansUtilizationResponse Prelude.Int
getSavingsPlansUtilizationResponse_httpStatus :: (Int -> f Int)
-> GetSavingsPlansUtilizationResponse
-> f GetSavingsPlansUtilizationResponse
getSavingsPlansUtilizationResponse_httpStatus = (GetSavingsPlansUtilizationResponse -> Int)
-> (GetSavingsPlansUtilizationResponse
-> Int -> GetSavingsPlansUtilizationResponse)
-> Lens
GetSavingsPlansUtilizationResponse
GetSavingsPlansUtilizationResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSavingsPlansUtilizationResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetSavingsPlansUtilizationResponse' :: GetSavingsPlansUtilizationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetSavingsPlansUtilizationResponse
s@GetSavingsPlansUtilizationResponse' {} Int
a -> GetSavingsPlansUtilizationResponse
s {$sel:httpStatus:GetSavingsPlansUtilizationResponse' :: Int
httpStatus = Int
a} :: GetSavingsPlansUtilizationResponse)
getSavingsPlansUtilizationResponse_total :: Lens.Lens' GetSavingsPlansUtilizationResponse SavingsPlansUtilizationAggregates
getSavingsPlansUtilizationResponse_total :: (SavingsPlansUtilizationAggregates
-> f SavingsPlansUtilizationAggregates)
-> GetSavingsPlansUtilizationResponse
-> f GetSavingsPlansUtilizationResponse
getSavingsPlansUtilizationResponse_total = (GetSavingsPlansUtilizationResponse
-> SavingsPlansUtilizationAggregates)
-> (GetSavingsPlansUtilizationResponse
-> SavingsPlansUtilizationAggregates
-> GetSavingsPlansUtilizationResponse)
-> Lens
GetSavingsPlansUtilizationResponse
GetSavingsPlansUtilizationResponse
SavingsPlansUtilizationAggregates
SavingsPlansUtilizationAggregates
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSavingsPlansUtilizationResponse' {SavingsPlansUtilizationAggregates
total :: SavingsPlansUtilizationAggregates
$sel:total:GetSavingsPlansUtilizationResponse' :: GetSavingsPlansUtilizationResponse
-> SavingsPlansUtilizationAggregates
total} -> SavingsPlansUtilizationAggregates
total) (\s :: GetSavingsPlansUtilizationResponse
s@GetSavingsPlansUtilizationResponse' {} SavingsPlansUtilizationAggregates
a -> GetSavingsPlansUtilizationResponse
s {$sel:total:GetSavingsPlansUtilizationResponse' :: SavingsPlansUtilizationAggregates
total = SavingsPlansUtilizationAggregates
a} :: GetSavingsPlansUtilizationResponse)
instance
Prelude.NFData
GetSavingsPlansUtilizationResponse