{-# 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.GetCostForecast
(
GetCostForecast (..),
newGetCostForecast,
getCostForecast_predictionIntervalLevel,
getCostForecast_filter,
getCostForecast_timePeriod,
getCostForecast_metric,
getCostForecast_granularity,
GetCostForecastResponse (..),
newGetCostForecastResponse,
getCostForecastResponse_forecastResultsByTime,
getCostForecastResponse_total,
getCostForecastResponse_httpStatus,
)
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 GetCostForecast = GetCostForecast'
{
GetCostForecast -> Maybe Natural
predictionIntervalLevel :: Prelude.Maybe Prelude.Natural,
GetCostForecast -> Maybe Expression
filter' :: Prelude.Maybe Expression,
GetCostForecast -> DateInterval
timePeriod :: DateInterval,
GetCostForecast -> Metric
metric :: Metric,
GetCostForecast -> Granularity
granularity :: Granularity
}
deriving (GetCostForecast -> GetCostForecast -> Bool
(GetCostForecast -> GetCostForecast -> Bool)
-> (GetCostForecast -> GetCostForecast -> Bool)
-> Eq GetCostForecast
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetCostForecast -> GetCostForecast -> Bool
$c/= :: GetCostForecast -> GetCostForecast -> Bool
== :: GetCostForecast -> GetCostForecast -> Bool
$c== :: GetCostForecast -> GetCostForecast -> Bool
Prelude.Eq, ReadPrec [GetCostForecast]
ReadPrec GetCostForecast
Int -> ReadS GetCostForecast
ReadS [GetCostForecast]
(Int -> ReadS GetCostForecast)
-> ReadS [GetCostForecast]
-> ReadPrec GetCostForecast
-> ReadPrec [GetCostForecast]
-> Read GetCostForecast
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetCostForecast]
$creadListPrec :: ReadPrec [GetCostForecast]
readPrec :: ReadPrec GetCostForecast
$creadPrec :: ReadPrec GetCostForecast
readList :: ReadS [GetCostForecast]
$creadList :: ReadS [GetCostForecast]
readsPrec :: Int -> ReadS GetCostForecast
$creadsPrec :: Int -> ReadS GetCostForecast
Prelude.Read, Int -> GetCostForecast -> ShowS
[GetCostForecast] -> ShowS
GetCostForecast -> String
(Int -> GetCostForecast -> ShowS)
-> (GetCostForecast -> String)
-> ([GetCostForecast] -> ShowS)
-> Show GetCostForecast
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetCostForecast] -> ShowS
$cshowList :: [GetCostForecast] -> ShowS
show :: GetCostForecast -> String
$cshow :: GetCostForecast -> String
showsPrec :: Int -> GetCostForecast -> ShowS
$cshowsPrec :: Int -> GetCostForecast -> ShowS
Prelude.Show, (forall x. GetCostForecast -> Rep GetCostForecast x)
-> (forall x. Rep GetCostForecast x -> GetCostForecast)
-> Generic GetCostForecast
forall x. Rep GetCostForecast x -> GetCostForecast
forall x. GetCostForecast -> Rep GetCostForecast x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetCostForecast x -> GetCostForecast
$cfrom :: forall x. GetCostForecast -> Rep GetCostForecast x
Prelude.Generic)
newGetCostForecast ::
DateInterval ->
Metric ->
Granularity ->
GetCostForecast
newGetCostForecast :: DateInterval -> Metric -> Granularity -> GetCostForecast
newGetCostForecast
DateInterval
pTimePeriod_
Metric
pMetric_
Granularity
pGranularity_ =
GetCostForecast' :: Maybe Natural
-> Maybe Expression
-> DateInterval
-> Metric
-> Granularity
-> GetCostForecast
GetCostForecast'
{ $sel:predictionIntervalLevel:GetCostForecast' :: Maybe Natural
predictionIntervalLevel =
Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:filter':GetCostForecast' :: Maybe Expression
filter' = Maybe Expression
forall a. Maybe a
Prelude.Nothing,
$sel:timePeriod:GetCostForecast' :: DateInterval
timePeriod = DateInterval
pTimePeriod_,
$sel:metric:GetCostForecast' :: Metric
metric = Metric
pMetric_,
$sel:granularity:GetCostForecast' :: Granularity
granularity = Granularity
pGranularity_
}
getCostForecast_predictionIntervalLevel :: Lens.Lens' GetCostForecast (Prelude.Maybe Prelude.Natural)
getCostForecast_predictionIntervalLevel :: (Maybe Natural -> f (Maybe Natural))
-> GetCostForecast -> f GetCostForecast
getCostForecast_predictionIntervalLevel = (GetCostForecast -> Maybe Natural)
-> (GetCostForecast -> Maybe Natural -> GetCostForecast)
-> Lens
GetCostForecast GetCostForecast (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCostForecast' {Maybe Natural
predictionIntervalLevel :: Maybe Natural
$sel:predictionIntervalLevel:GetCostForecast' :: GetCostForecast -> Maybe Natural
predictionIntervalLevel} -> Maybe Natural
predictionIntervalLevel) (\s :: GetCostForecast
s@GetCostForecast' {} Maybe Natural
a -> GetCostForecast
s {$sel:predictionIntervalLevel:GetCostForecast' :: Maybe Natural
predictionIntervalLevel = Maybe Natural
a} :: GetCostForecast)
getCostForecast_filter :: Lens.Lens' GetCostForecast (Prelude.Maybe Expression)
getCostForecast_filter :: (Maybe Expression -> f (Maybe Expression))
-> GetCostForecast -> f GetCostForecast
getCostForecast_filter = (GetCostForecast -> Maybe Expression)
-> (GetCostForecast -> Maybe Expression -> GetCostForecast)
-> Lens
GetCostForecast
GetCostForecast
(Maybe Expression)
(Maybe Expression)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCostForecast' {Maybe Expression
filter' :: Maybe Expression
$sel:filter':GetCostForecast' :: GetCostForecast -> Maybe Expression
filter'} -> Maybe Expression
filter') (\s :: GetCostForecast
s@GetCostForecast' {} Maybe Expression
a -> GetCostForecast
s {$sel:filter':GetCostForecast' :: Maybe Expression
filter' = Maybe Expression
a} :: GetCostForecast)
getCostForecast_timePeriod :: Lens.Lens' GetCostForecast DateInterval
getCostForecast_timePeriod :: (DateInterval -> f DateInterval)
-> GetCostForecast -> f GetCostForecast
getCostForecast_timePeriod = (GetCostForecast -> DateInterval)
-> (GetCostForecast -> DateInterval -> GetCostForecast)
-> Lens GetCostForecast GetCostForecast DateInterval DateInterval
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCostForecast' {DateInterval
timePeriod :: DateInterval
$sel:timePeriod:GetCostForecast' :: GetCostForecast -> DateInterval
timePeriod} -> DateInterval
timePeriod) (\s :: GetCostForecast
s@GetCostForecast' {} DateInterval
a -> GetCostForecast
s {$sel:timePeriod:GetCostForecast' :: DateInterval
timePeriod = DateInterval
a} :: GetCostForecast)
getCostForecast_metric :: Lens.Lens' GetCostForecast Metric
getCostForecast_metric :: (Metric -> f Metric) -> GetCostForecast -> f GetCostForecast
getCostForecast_metric = (GetCostForecast -> Metric)
-> (GetCostForecast -> Metric -> GetCostForecast)
-> Lens GetCostForecast GetCostForecast Metric Metric
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCostForecast' {Metric
metric :: Metric
$sel:metric:GetCostForecast' :: GetCostForecast -> Metric
metric} -> Metric
metric) (\s :: GetCostForecast
s@GetCostForecast' {} Metric
a -> GetCostForecast
s {$sel:metric:GetCostForecast' :: Metric
metric = Metric
a} :: GetCostForecast)
getCostForecast_granularity :: Lens.Lens' GetCostForecast Granularity
getCostForecast_granularity :: (Granularity -> f Granularity)
-> GetCostForecast -> f GetCostForecast
getCostForecast_granularity = (GetCostForecast -> Granularity)
-> (GetCostForecast -> Granularity -> GetCostForecast)
-> Lens GetCostForecast GetCostForecast Granularity Granularity
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCostForecast' {Granularity
granularity :: Granularity
$sel:granularity:GetCostForecast' :: GetCostForecast -> Granularity
granularity} -> Granularity
granularity) (\s :: GetCostForecast
s@GetCostForecast' {} Granularity
a -> GetCostForecast
s {$sel:granularity:GetCostForecast' :: Granularity
granularity = Granularity
a} :: GetCostForecast)
instance Core.AWSRequest GetCostForecast where
type
AWSResponse GetCostForecast =
GetCostForecastResponse
request :: GetCostForecast -> Request GetCostForecast
request = Service -> GetCostForecast -> Request GetCostForecast
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy GetCostForecast
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetCostForecast)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GetCostForecast))
-> Logger
-> Service
-> Proxy GetCostForecast
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetCostForecast)))
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 [ForecastResult]
-> Maybe MetricValue -> Int -> GetCostForecastResponse
GetCostForecastResponse'
(Maybe [ForecastResult]
-> Maybe MetricValue -> Int -> GetCostForecastResponse)
-> Either String (Maybe [ForecastResult])
-> Either
String (Maybe MetricValue -> Int -> GetCostForecastResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Key -> Either String (Maybe (Maybe [ForecastResult]))
forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Core..?> Key
"ForecastResultsByTime"
Either String (Maybe (Maybe [ForecastResult]))
-> Maybe [ForecastResult] -> Either String (Maybe [ForecastResult])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [ForecastResult]
forall a. Monoid a => a
Prelude.mempty
)
Either String (Maybe MetricValue -> Int -> GetCostForecastResponse)
-> Either String (Maybe MetricValue)
-> Either String (Int -> GetCostForecastResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Key -> Either String (Maybe MetricValue)
forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Core..?> Key
"Total")
Either String (Int -> GetCostForecastResponse)
-> Either String Int -> Either String GetCostForecastResponse
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))
)
instance Prelude.Hashable GetCostForecast
instance Prelude.NFData GetCostForecast
instance Core.ToHeaders GetCostForecast where
toHeaders :: GetCostForecast -> ResponseHeaders
toHeaders =
ResponseHeaders -> GetCostForecast -> 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.GetCostForecast" ::
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 GetCostForecast where
toJSON :: GetCostForecast -> Value
toJSON GetCostForecast' {Maybe Natural
Maybe Expression
DateInterval
Granularity
Metric
granularity :: Granularity
metric :: Metric
timePeriod :: DateInterval
filter' :: Maybe Expression
predictionIntervalLevel :: Maybe Natural
$sel:granularity:GetCostForecast' :: GetCostForecast -> Granularity
$sel:metric:GetCostForecast' :: GetCostForecast -> Metric
$sel:timePeriod:GetCostForecast' :: GetCostForecast -> DateInterval
$sel:filter':GetCostForecast' :: GetCostForecast -> Maybe Expression
$sel:predictionIntervalLevel:GetCostForecast' :: GetCostForecast -> Maybe Natural
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"PredictionIntervalLevel" Key -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Core..=)
(Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
predictionIntervalLevel,
(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',
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),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Key
"Metric" Key -> Metric -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Core..= Metric
metric),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Key
"Granularity" Key -> Granularity -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Core..= Granularity
granularity)
]
)
instance Core.ToPath GetCostForecast where
toPath :: GetCostForecast -> ByteString
toPath = ByteString -> GetCostForecast -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery GetCostForecast where
toQuery :: GetCostForecast -> QueryString
toQuery = QueryString -> GetCostForecast -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data GetCostForecastResponse = GetCostForecastResponse'
{
GetCostForecastResponse -> Maybe [ForecastResult]
forecastResultsByTime :: Prelude.Maybe [ForecastResult],
GetCostForecastResponse -> Maybe MetricValue
total :: Prelude.Maybe MetricValue,
GetCostForecastResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetCostForecastResponse -> GetCostForecastResponse -> Bool
(GetCostForecastResponse -> GetCostForecastResponse -> Bool)
-> (GetCostForecastResponse -> GetCostForecastResponse -> Bool)
-> Eq GetCostForecastResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetCostForecastResponse -> GetCostForecastResponse -> Bool
$c/= :: GetCostForecastResponse -> GetCostForecastResponse -> Bool
== :: GetCostForecastResponse -> GetCostForecastResponse -> Bool
$c== :: GetCostForecastResponse -> GetCostForecastResponse -> Bool
Prelude.Eq, ReadPrec [GetCostForecastResponse]
ReadPrec GetCostForecastResponse
Int -> ReadS GetCostForecastResponse
ReadS [GetCostForecastResponse]
(Int -> ReadS GetCostForecastResponse)
-> ReadS [GetCostForecastResponse]
-> ReadPrec GetCostForecastResponse
-> ReadPrec [GetCostForecastResponse]
-> Read GetCostForecastResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetCostForecastResponse]
$creadListPrec :: ReadPrec [GetCostForecastResponse]
readPrec :: ReadPrec GetCostForecastResponse
$creadPrec :: ReadPrec GetCostForecastResponse
readList :: ReadS [GetCostForecastResponse]
$creadList :: ReadS [GetCostForecastResponse]
readsPrec :: Int -> ReadS GetCostForecastResponse
$creadsPrec :: Int -> ReadS GetCostForecastResponse
Prelude.Read, Int -> GetCostForecastResponse -> ShowS
[GetCostForecastResponse] -> ShowS
GetCostForecastResponse -> String
(Int -> GetCostForecastResponse -> ShowS)
-> (GetCostForecastResponse -> String)
-> ([GetCostForecastResponse] -> ShowS)
-> Show GetCostForecastResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetCostForecastResponse] -> ShowS
$cshowList :: [GetCostForecastResponse] -> ShowS
show :: GetCostForecastResponse -> String
$cshow :: GetCostForecastResponse -> String
showsPrec :: Int -> GetCostForecastResponse -> ShowS
$cshowsPrec :: Int -> GetCostForecastResponse -> ShowS
Prelude.Show, (forall x.
GetCostForecastResponse -> Rep GetCostForecastResponse x)
-> (forall x.
Rep GetCostForecastResponse x -> GetCostForecastResponse)
-> Generic GetCostForecastResponse
forall x. Rep GetCostForecastResponse x -> GetCostForecastResponse
forall x. GetCostForecastResponse -> Rep GetCostForecastResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetCostForecastResponse x -> GetCostForecastResponse
$cfrom :: forall x. GetCostForecastResponse -> Rep GetCostForecastResponse x
Prelude.Generic)
newGetCostForecastResponse ::
Prelude.Int ->
GetCostForecastResponse
newGetCostForecastResponse :: Int -> GetCostForecastResponse
newGetCostForecastResponse Int
pHttpStatus_ =
GetCostForecastResponse' :: Maybe [ForecastResult]
-> Maybe MetricValue -> Int -> GetCostForecastResponse
GetCostForecastResponse'
{ $sel:forecastResultsByTime:GetCostForecastResponse' :: Maybe [ForecastResult]
forecastResultsByTime =
Maybe [ForecastResult]
forall a. Maybe a
Prelude.Nothing,
$sel:total:GetCostForecastResponse' :: Maybe MetricValue
total = Maybe MetricValue
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetCostForecastResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getCostForecastResponse_forecastResultsByTime :: Lens.Lens' GetCostForecastResponse (Prelude.Maybe [ForecastResult])
getCostForecastResponse_forecastResultsByTime :: (Maybe [ForecastResult] -> f (Maybe [ForecastResult]))
-> GetCostForecastResponse -> f GetCostForecastResponse
getCostForecastResponse_forecastResultsByTime = (GetCostForecastResponse -> Maybe [ForecastResult])
-> (GetCostForecastResponse
-> Maybe [ForecastResult] -> GetCostForecastResponse)
-> Lens
GetCostForecastResponse
GetCostForecastResponse
(Maybe [ForecastResult])
(Maybe [ForecastResult])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCostForecastResponse' {Maybe [ForecastResult]
forecastResultsByTime :: Maybe [ForecastResult]
$sel:forecastResultsByTime:GetCostForecastResponse' :: GetCostForecastResponse -> Maybe [ForecastResult]
forecastResultsByTime} -> Maybe [ForecastResult]
forecastResultsByTime) (\s :: GetCostForecastResponse
s@GetCostForecastResponse' {} Maybe [ForecastResult]
a -> GetCostForecastResponse
s {$sel:forecastResultsByTime:GetCostForecastResponse' :: Maybe [ForecastResult]
forecastResultsByTime = Maybe [ForecastResult]
a} :: GetCostForecastResponse) ((Maybe [ForecastResult] -> f (Maybe [ForecastResult]))
-> GetCostForecastResponse -> f GetCostForecastResponse)
-> ((Maybe [ForecastResult] -> f (Maybe [ForecastResult]))
-> Maybe [ForecastResult] -> f (Maybe [ForecastResult]))
-> (Maybe [ForecastResult] -> f (Maybe [ForecastResult]))
-> GetCostForecastResponse
-> f GetCostForecastResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[ForecastResult] [ForecastResult] [ForecastResult] [ForecastResult]
-> Iso
(Maybe [ForecastResult])
(Maybe [ForecastResult])
(Maybe [ForecastResult])
(Maybe [ForecastResult])
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
[ForecastResult] [ForecastResult] [ForecastResult] [ForecastResult]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
getCostForecastResponse_total :: Lens.Lens' GetCostForecastResponse (Prelude.Maybe MetricValue)
getCostForecastResponse_total :: (Maybe MetricValue -> f (Maybe MetricValue))
-> GetCostForecastResponse -> f GetCostForecastResponse
getCostForecastResponse_total = (GetCostForecastResponse -> Maybe MetricValue)
-> (GetCostForecastResponse
-> Maybe MetricValue -> GetCostForecastResponse)
-> Lens
GetCostForecastResponse
GetCostForecastResponse
(Maybe MetricValue)
(Maybe MetricValue)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCostForecastResponse' {Maybe MetricValue
total :: Maybe MetricValue
$sel:total:GetCostForecastResponse' :: GetCostForecastResponse -> Maybe MetricValue
total} -> Maybe MetricValue
total) (\s :: GetCostForecastResponse
s@GetCostForecastResponse' {} Maybe MetricValue
a -> GetCostForecastResponse
s {$sel:total:GetCostForecastResponse' :: Maybe MetricValue
total = Maybe MetricValue
a} :: GetCostForecastResponse)
getCostForecastResponse_httpStatus :: Lens.Lens' GetCostForecastResponse Prelude.Int
getCostForecastResponse_httpStatus :: (Int -> f Int)
-> GetCostForecastResponse -> f GetCostForecastResponse
getCostForecastResponse_httpStatus = (GetCostForecastResponse -> Int)
-> (GetCostForecastResponse -> Int -> GetCostForecastResponse)
-> Lens GetCostForecastResponse GetCostForecastResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCostForecastResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetCostForecastResponse' :: GetCostForecastResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetCostForecastResponse
s@GetCostForecastResponse' {} Int
a -> GetCostForecastResponse
s {$sel:httpStatus:GetCostForecastResponse' :: Int
httpStatus = Int
a} :: GetCostForecastResponse)
instance Prelude.NFData GetCostForecastResponse